System.register(["__unresolved_0", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5"], function (_export, _context) {
  "use strict";

  var _req, _req2, _req3, _req4, _req5, _loader, _cjsExports, __cjsMetaURL;

  _export("default", void 0);

  return {
    setters: [function (_unresolved_) {
      _req = _unresolved_.__cjsMetaURL;
    }, function (_unresolved_2) {
      _req2 = _unresolved_2.__cjsMetaURL;
    }, function (_unresolved_3) {
      _req3 = _unresolved_3.__cjsMetaURL;
    }, function (_unresolved_4) {
      _req4 = _unresolved_4.__cjsMetaURL;
    }, function (_unresolved_5) {
      _req5 = _unresolved_5.__cjsMetaURL;
    }, function (_unresolved_6) {
      _loader = _unresolved_6.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        let require = _loader.createRequireWithReqMap({
          "../internals/global": _req,
          "../internals/a-callable": _req2,
          "../internals/to-object": _req3,
          "../internals/indexed-object": _req4,
          "../internals/length-of-array-like": _req5
        }, _require);

        (function () {
          var global = require('../internals/global');

          var aCallable = require('../internals/a-callable');

          var toObject = require('../internals/to-object');

          var IndexedObject = require('../internals/indexed-object');

          var lengthOfArrayLike = require('../internals/length-of-array-like');

          var TypeError = global.TypeError; // `Array.prototype.{ reduce, reduceRight }` methods implementation

          var createMethod = function (IS_RIGHT) {
            return function (that, callbackfn, argumentsLength, memo) {
              aCallable(callbackfn);
              var O = toObject(that);
              var self = IndexedObject(O);
              var length = lengthOfArrayLike(O);
              var index = IS_RIGHT ? length - 1 : 0;
              var i = IS_RIGHT ? -1 : 1;
              if (argumentsLength < 2) while (true) {
                if (index in self) {
                  memo = self[index];
                  index += i;
                  break;
                }

                index += i;

                if (IS_RIGHT ? index < 0 : length <= index) {
                  throw TypeError('Reduce of empty array with no initial value');
                }
              }

              for (; IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
                memo = callbackfn(memo, self[index], index, O);
              }

              return memo;
            };
          };

          module.exports = {
            // `Array.prototype.reduce` method
            // https://tc39.es/ecma262/#sec-array.prototype.reduce
            left: createMethod(false),
            // `Array.prototype.reduceRight` method
            // https://tc39.es/ecma262/#sec-array.prototype.reduceright
            right: createMethod(true)
          };
        })();

        _export("default", _cjsExports = module.exports);
      });

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=array-reduce.js.map