8892699a40d1f443fc46af0735c6aae1.json
12.8 KB
{"ast":null,"code":"'use strict';\n\nvar $ = require('../internals/export');\n\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\n\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\nvar setToStringTag = require('../internals/set-to-string-tag');\n\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar redefine = require('../internals/redefine');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar Iterators = require('../internals/iterators');\n\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () {\n return this;\n};\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS:\n return function keys() {\n return new IteratorConstructor(this, KIND);\n };\n\n case VALUES:\n return function values() {\n return new IteratorConstructor(this, KIND);\n };\n\n case ENTRIES:\n return function entries() {\n return new IteratorConstructor(this, KIND);\n };\n }\n\n return function () {\n return new IteratorConstructor(this);\n };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY; // fix native\n\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n } // Set @@toStringTag to native iterators\n\n\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n\n defaultIterator = function values() {\n return nativeIterator.call(this);\n };\n } // define iterator\n\n\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n\n Iterators[NAME] = defaultIterator; // export additional methods\n\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({\n target: NAME,\n proto: true,\n forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME\n }, methods);\n }\n\n return methods;\n};","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/core-js-pure/internals/define-iterator.js"],"names":["$","require","createIteratorConstructor","getPrototypeOf","setPrototypeOf","setToStringTag","createNonEnumerableProperty","redefine","wellKnownSymbol","IS_PURE","Iterators","IteratorsCore","IteratorPrototype","BUGGY_SAFARI_ITERATORS","ITERATOR","KEYS","VALUES","ENTRIES","returnThis","module","exports","Iterable","NAME","IteratorConstructor","next","DEFAULT","IS_SET","FORCED","getIterationMethod","KIND","defaultIterator","IterablePrototype","keys","values","entries","TO_STRING_TAG","INCORRECT_VALUES_NAME","prototype","nativeIterator","anyNativeIterator","CurrentIteratorPrototype","methods","KEY","call","Object","name","target","proto","forced"],"mappings":"AAAA;;AACA,IAAIA,CAAC,GAAGC,OAAO,CAAC,qBAAD,CAAf;;AACA,IAAIC,yBAAyB,GAAGD,OAAO,CAAC,0CAAD,CAAvC;;AACA,IAAIE,cAAc,GAAGF,OAAO,CAAC,sCAAD,CAA5B;;AACA,IAAIG,cAAc,GAAGH,OAAO,CAAC,sCAAD,CAA5B;;AACA,IAAII,cAAc,GAAGJ,OAAO,CAAC,gCAAD,CAA5B;;AACA,IAAIK,2BAA2B,GAAGL,OAAO,CAAC,6CAAD,CAAzC;;AACA,IAAIM,QAAQ,GAAGN,OAAO,CAAC,uBAAD,CAAtB;;AACA,IAAIO,eAAe,GAAGP,OAAO,CAAC,gCAAD,CAA7B;;AACA,IAAIQ,OAAO,GAAGR,OAAO,CAAC,sBAAD,CAArB;;AACA,IAAIS,SAAS,GAAGT,OAAO,CAAC,wBAAD,CAAvB;;AACA,IAAIU,aAAa,GAAGV,OAAO,CAAC,6BAAD,CAA3B;;AAEA,IAAIW,iBAAiB,GAAGD,aAAa,CAACC,iBAAtC;AACA,IAAIC,sBAAsB,GAAGF,aAAa,CAACE,sBAA3C;AACA,IAAIC,QAAQ,GAAGN,eAAe,CAAC,UAAD,CAA9B;AACA,IAAIO,IAAI,GAAG,MAAX;AACA,IAAIC,MAAM,GAAG,QAAb;AACA,IAAIC,OAAO,GAAG,SAAd;;AAE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eAAe,GAAG,SAASG,MAAT,GAAkB;AAAE,aAAOK,cAAc,CAACK,IAAf,CAAoB,IAApB,CAAP;AAAmC,KAAzE;AACD,GA5C4F,CA8C7F;;;AACA,MAAI,CAAC,CAAClC,OAAD,IAAYkB,MAAb,KAAwBI,iBAAiB,CAACjB,QAAD,CAAjB,KAAgCgB,eAA5D,EAA6E;AAC3ExB,IAAAA,2BAA2B,CAACyB,iBAAD,EAAoBjB,QAApB,EAA8BgB,eAA9B,CAA3B;AACD;;AACDpB,EAAAA,SAAS,CAACY,IAAD,CAAT,GAAkBQ,eAAlB,CAlD6F,CAoD7F;;AACA,MAAIL,OAAJ,EAAa;AACXgB,IAAAA,OAAO,GAAG;AACRR,MAAAA,MAAM,EAAEL,kBAAkB,CAACZ,MAAD,CADlB;AAERgB,MAAAA,IAAI,EAAEN,MAAM,GAAGI,eAAH,GAAqBF,kBAAkB,CAACb,IAAD,CAF3C;AAGRmB,MAAAA,OAAO,EAAEN,kBAAkB,CAACX,OAAD;AAHnB,KAAV;AAKA,QAAIU,MAAJ,EAAY,KAAKe,GAAL,IAAYD,OAAZ,EAAqB;AAC/B,UAAI5B,sBAAsB,IAAIuB,qBAA1B,IAAmD,EAAEM,GAAG,IAAIX,iBAAT,CAAvD,EAAoF;AAClFxB,QAAAA,QAAQ,CAACwB,iBAAD,EAAoBW,GAApB,EAAyBD,OAAO,CAACC,GAAD,CAAhC,CAAR;AACD;AACF,KAJD,MAIO1C,CAAC,CAAC;AAAE8C,MAAAA,MAAM,EAAExB,IAAV;AAAgByB,MAAAA,KAAK,EAAE,IAAvB;AAA6BC,MAAAA,MAAM,EAAEnC,sBAAsB,IAAIuB;AAA/D,KAAD,EAAyFK,OAAzF,CAAD;AACR;;AAED,SAAOA,OAAP;AACD,CAnED","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n"]},"metadata":{},"sourceType":"script"}