/* * Citation.js -0.4.0-10 taken from https://citation.js.org/ **** * NOTE: This JS lirary is incompatible with RequireJS since it also defines a global variable `require`. * To make this library compatible with MetacatUI, I renamed the `require` variable here to `citationRequire` */ citationRequire=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof citationRequire&&citationRequire;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof citationRequire&&citationRequire,i=0;i 2 ? arguments[2] : undefined; var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); var inc = 1; if (from < to && to < from + count) { inc = -1; from += count - 1; to += count - 1; } while (count-- > 0) { if (from in O) O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; },{"./_to-absolute-index":110,"./_to-length":114,"./_to-object":115}],17:[function(citationRequire,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = citationRequire('./_to-object'); var toAbsoluteIndex = citationRequire('./_to-absolute-index'); var toLength = citationRequire('./_to-length'); module.exports = function fill(value /* , start = 0, end = @length */) { var O = toObject(this); var length = toLength(O.length); var aLen = arguments.length; var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); var end = aLen > 2 ? arguments[2] : undefined; var endPos = end === undefined ? length : toAbsoluteIndex(end, length); while (endPos > index) O[index++] = value; return O; }; },{"./_to-absolute-index":110,"./_to-length":114,"./_to-object":115}],18:[function(citationRequire,module,exports){ // false -> Array#indexOf // true -> Array#includes var toIObject = citationRequire('./_to-iobject'); var toLength = citationRequire('./_to-length'); var toAbsoluteIndex = citationRequire('./_to-absolute-index'); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; },{"./_to-absolute-index":110,"./_to-iobject":113,"./_to-length":114}],19:[function(citationRequire,module,exports){ // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = citationRequire('./_ctx'); var IObject = citationRequire('./_iobject'); var toObject = citationRequire('./_to-object'); var toLength = citationRequire('./_to-length'); var asc = citationRequire('./_array-species-create'); module.exports = function (TYPE, $create) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; var create = $create || asc; return function ($this, callbackfn, that) { var O = toObject($this); var self = IObject(O); var f = ctx(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var val, res; for (;length > index; index++) if (NO_HOLES || index in self) { val = self[index]; res = f(val, index, O); if (TYPE) { if (IS_MAP) result[index] = res; // map else if (res) switch (TYPE) { case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; },{"./_array-species-create":22,"./_ctx":31,"./_iobject":52,"./_to-length":114,"./_to-object":115}],20:[function(citationRequire,module,exports){ var aFunction = citationRequire('./_a-function'); var toObject = citationRequire('./_to-object'); var IObject = citationRequire('./_iobject'); var toLength = citationRequire('./_to-length'); module.exports = function (that, callbackfn, aLen, memo, isRight) { aFunction(callbackfn); var O = toObject(that); var self = IObject(O); var length = toLength(O.length); var index = isRight ? length - 1 : 0; var i = isRight ? -1 : 1; if (aLen < 2) for (;;) { if (index in self) { memo = self[index]; index += i; break; } index += i; if (isRight ? index < 0 : length <= index) { throw TypeError('Reduce of empty array with no initial value'); } } for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; },{"./_a-function":11,"./_iobject":52,"./_to-length":114,"./_to-object":115}],21:[function(citationRequire,module,exports){ var isObject = citationRequire('./_is-object'); var isArray = citationRequire('./_is-array'); var SPECIES = citationRequire('./_wks')('species'); module.exports = function (original) { var C; if (isArray(original)) { C = original.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? Array : C; }; },{"./_is-array":54,"./_is-object":56,"./_wks":125}],22:[function(citationRequire,module,exports){ // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = citationRequire('./_array-species-constructor'); module.exports = function (original, length) { return new (speciesConstructor(original))(length); }; },{"./_array-species-constructor":21}],23:[function(citationRequire,module,exports){ 'use strict'; var aFunction = citationRequire('./_a-function'); var isObject = citationRequire('./_is-object'); var invoke = citationRequire('./_invoke'); var arraySlice = [].slice; var factories = {}; var construct = function (F, len, args) { if (!(len in factories)) { for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; // eslint-disable-next-line no-new-func factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /* , ...args */) { var fn = aFunction(this); var partArgs = arraySlice.call(arguments, 1); var bound = function (/* args... */) { var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if (isObject(fn.prototype)) bound.prototype = fn.prototype; return bound; }; },{"./_a-function":11,"./_invoke":51,"./_is-object":56}],24:[function(citationRequire,module,exports){ // getting tag from 19.1.3.6 Object.prototype.toString() var cof = citationRequire('./_cof'); var TAG = citationRequire('./_wks')('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; },{"./_cof":25,"./_wks":125}],25:[function(citationRequire,module,exports){ var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; },{}],26:[function(citationRequire,module,exports){ 'use strict'; var dP = citationRequire('./_object-dp').f; var create = citationRequire('./_object-create'); var redefineAll = citationRequire('./_redefine-all'); var ctx = citationRequire('./_ctx'); var anInstance = citationRequire('./_an-instance'); var forOf = citationRequire('./_for-of'); var $iterDefine = citationRequire('./_iter-define'); var step = citationRequire('./_iter-step'); var setSpecies = citationRequire('./_set-species'); var DESCRIPTORS = citationRequire('./_descriptors'); var fastKey = citationRequire('./_meta').fastKey; var validate = citationRequire('./_validate-collection'); var SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function (that, key) { // fast case var index = fastKey(key); var entry; if (index !== 'F') return that._i[index]; // frozen object case for (entry = that._f; entry; entry = entry.n) { if (entry.k == key) return entry; } }; module.exports = { getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); that._t = NAME; // collection type that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear() { for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { entry.r = true; if (entry.p) entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function (key) { var that = validate(this, NAME); var entry = getEntry(that, key); if (entry) { var next = entry.n; var prev = entry.p; delete that._i[entry.i]; entry.r = true; if (prev) prev.n = next; if (next) next.p = prev; if (that._f == entry) that._f = next; if (that._l == entry) that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /* , that = undefined */) { validate(this, NAME); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var entry; while (entry = entry ? entry.n : this._f) { f(entry.v, entry.k, this); // revert to the last existing entry while (entry && entry.r) entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key) { return !!getEntry(validate(this, NAME), key); } }); if (DESCRIPTORS) dP(C.prototype, 'size', { get: function () { return validate(this, NAME)[SIZE]; } }); return C; }, def: function (that, key, value) { var entry = getEntry(that, key); var prev, index; // change existing entry if (entry) { entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if (!that._f) that._f = entry; if (prev) prev.n = entry; that[SIZE]++; // add to index if (index !== 'F') that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function (C, NAME, IS_MAP) { // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function (iterated, kind) { this._t = validate(iterated, NAME); // target this._k = kind; // kind this._l = undefined; // previous }, function () { var that = this; var kind = that._k; var entry = that._l; // revert to the last existing entry while (entry && entry.r) entry = entry.p; // get next entry if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { // or finish the iteration that._t = undefined; return step(1); } // return step by kind if (kind == 'keys') return step(0, entry.k); if (kind == 'values') return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; },{"./_an-instance":14,"./_ctx":31,"./_descriptors":35,"./_for-of":44,"./_iter-define":60,"./_iter-step":62,"./_meta":69,"./_object-create":73,"./_object-dp":74,"./_redefine-all":92,"./_set-species":96,"./_validate-collection":122}],27:[function(citationRequire,module,exports){ 'use strict'; var redefineAll = citationRequire('./_redefine-all'); var getWeak = citationRequire('./_meta').getWeak; var anObject = citationRequire('./_an-object'); var isObject = citationRequire('./_is-object'); var anInstance = citationRequire('./_an-instance'); var forOf = citationRequire('./_for-of'); var createArrayMethod = citationRequire('./_array-methods'); var $has = citationRequire('./_has'); var validate = citationRequire('./_validate-collection'); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); var id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function (that) { return that._l || (that._l = new UncaughtFrozenStore()); }; var UncaughtFrozenStore = function () { this.a = []; }; var findUncaughtFrozen = function (store, key) { return arrayFind(store.a, function (it) { return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function (key) { var entry = findUncaughtFrozen(this, key); if (entry) return entry[1]; }, has: function (key) { return !!findUncaughtFrozen(this, key); }, set: function (key, value) { var entry = findUncaughtFrozen(this, key); if (entry) entry[1] = value; else this.a.push([key, value]); }, 'delete': function (key) { var index = arrayFindIndex(this.a, function (it) { return it[0] === key; }); if (~index) this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); that._t = NAME; // collection type that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function (key) { if (!isObject(key)) return false; var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key) { if (!isObject(key)) return false; var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); return data && $has(data, this._i); } }); return C; }, def: function (that, key, value) { var data = getWeak(anObject(key), true); if (data === true) uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; },{"./_an-instance":14,"./_an-object":15,"./_array-methods":19,"./_for-of":44,"./_has":46,"./_is-object":56,"./_meta":69,"./_redefine-all":92,"./_validate-collection":122}],28:[function(citationRequire,module,exports){ 'use strict'; var global = citationRequire('./_global'); var $export = citationRequire('./_export'); var redefine = citationRequire('./_redefine'); var redefineAll = citationRequire('./_redefine-all'); var meta = citationRequire('./_meta'); var forOf = citationRequire('./_for-of'); var anInstance = citationRequire('./_an-instance'); var isObject = citationRequire('./_is-object'); var fails = citationRequire('./_fails'); var $iterDetect = citationRequire('./_iter-detect'); var setToStringTag = citationRequire('./_set-to-string-tag'); var inheritIfcitationRequired = citationRequire('./_inherit-if-citationRequired'); module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { var Base = global[NAME]; var C = Base; var ADDER = IS_MAP ? 'set' : 'add'; var proto = C && C.prototype; var O = {}; var fixMethod = function (KEY) { var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function (a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a) { return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { new C().entries().next(); }))) { // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C(); var index = 5; while (index--) $instance[ADDER](index, index); return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { C = wrapper(function (target, iterable) { anInstance(target, C, NAME); var that = inheritIfcitationRequired(new Base(), target, C); if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && proto.clear) delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); return C; }; },{"./_an-instance":14,"./_export":39,"./_fails":41,"./_for-of":44,"./_global":45,"./_inherit-if-citationRequired":50,"./_is-object":56,"./_iter-detect":61,"./_meta":69,"./_redefine":93,"./_redefine-all":92,"./_set-to-string-tag":97}],29:[function(citationRequire,module,exports){ var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef },{}],30:[function(citationRequire,module,exports){ 'use strict'; var $defineProperty = citationRequire('./_object-dp'); var createDesc = citationRequire('./_property-desc'); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; },{"./_object-dp":74,"./_property-desc":91}],31:[function(citationRequire,module,exports){ // optional / simple context binding var aFunction = citationRequire('./_a-function'); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; },{"./_a-function":11}],32:[function(citationRequire,module,exports){ 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var fails = citationRequire('./_fails'); var getTime = Date.prototype.getTime; var $toISOString = Date.prototype.toISOString; var lz = function (num) { return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations module.exports = (fails(function () { return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; }) || !fails(function () { $toISOString.call(new Date(NaN)); })) ? function toISOString() { if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); var d = this; var y = d.getUTCFullYear(); var m = d.getUTCMilliseconds(); var s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } : $toISOString; },{"./_fails":41}],33:[function(citationRequire,module,exports){ 'use strict'; var anObject = citationRequire('./_an-object'); var toPrimitive = citationRequire('./_to-primitive'); var NUMBER = 'number'; module.exports = function (hint) { if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); }; },{"./_an-object":15,"./_to-primitive":116}],34:[function(citationRequire,module,exports){ // 7.2.1 citationRequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; },{}],35:[function(citationRequire,module,exports){ // Thank's IE8 for his funny defineProperty module.exports = !citationRequire('./_fails')(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); },{"./_fails":41}],36:[function(citationRequire,module,exports){ var isObject = citationRequire('./_is-object'); var document = citationRequire('./_global').document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; },{"./_global":45,"./_is-object":56}],37:[function(citationRequire,module,exports){ // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); },{}],38:[function(citationRequire,module,exports){ // all enumerable object keys, includes symbols var getKeys = citationRequire('./_object-keys'); var gOPS = citationRequire('./_object-gops'); var pIE = citationRequire('./_object-pie'); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; },{"./_object-gops":79,"./_object-keys":82,"./_object-pie":83}],39:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var core = citationRequire('./_core'); var hide = citationRequire('./_hide'); var redefine = citationRequire('./_redefine'); var ctx = citationRequire('./_ctx'); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); var key, own, out, exp; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if (target) redefine(target, key, out, type & $export.U); // export if (exports[key] != out) hide(exports, key, exp); if (IS_PROTO && expProto[key] != out) expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; },{"./_core":29,"./_ctx":31,"./_global":45,"./_hide":47,"./_redefine":93}],40:[function(citationRequire,module,exports){ var MATCH = citationRequire('./_wks')('match'); module.exports = function (KEY) { var re = /./; try { '/./'[KEY](re); } catch (e) { try { re[MATCH] = false; return !'/./'[KEY](re); } catch (f) { /* empty */ } } return true; }; },{"./_wks":125}],41:[function(citationRequire,module,exports){ module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; },{}],42:[function(citationRequire,module,exports){ 'use strict'; var hide = citationRequire('./_hide'); var redefine = citationRequire('./_redefine'); var fails = citationRequire('./_fails'); var defined = citationRequire('./_defined'); var wks = citationRequire('./_wks'); module.exports = function (KEY, length, exec) { var SYMBOL = wks(KEY); var fns = exec(defined, SYMBOL, ''[KEY]); var strfn = fns[0]; var rxfn = fns[1]; if (fails(function () { var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; })) { redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return rxfn.call(string, this); } ); } }; },{"./_defined":34,"./_fails":41,"./_hide":47,"./_redefine":93,"./_wks":125}],43:[function(citationRequire,module,exports){ 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = citationRequire('./_an-object'); module.exports = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; },{"./_an-object":15}],44:[function(citationRequire,module,exports){ var ctx = citationRequire('./_ctx'); var call = citationRequire('./_iter-call'); var isArrayIter = citationRequire('./_is-array-iter'); var anObject = citationRequire('./_an-object'); var toLength = citationRequire('./_to-length'); var getIterFn = citationRequire('./core.get-iterator-method'); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); var f = ctx(fn, that, entries ? 2 : 1); var index = 0; var length, step, iterator, result; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if (result === BREAK || result === RETURN) return result; } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { result = call(iterator, f, step.value, entries); if (result === BREAK || result === RETURN) return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; },{"./_an-object":15,"./_ctx":31,"./_is-array-iter":53,"./_iter-call":58,"./_to-length":114,"./core.get-iterator-method":126}],45:[function(citationRequire,module,exports){ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef },{}],46:[function(citationRequire,module,exports){ var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; },{}],47:[function(citationRequire,module,exports){ var dP = citationRequire('./_object-dp'); var createDesc = citationRequire('./_property-desc'); module.exports = citationRequire('./_descriptors') ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; },{"./_descriptors":35,"./_object-dp":74,"./_property-desc":91}],48:[function(citationRequire,module,exports){ var document = citationRequire('./_global').document; module.exports = document && document.documentElement; },{"./_global":45}],49:[function(citationRequire,module,exports){ module.exports = !citationRequire('./_descriptors') && !citationRequire('./_fails')(function () { return Object.defineProperty(citationRequire('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; }); },{"./_descriptors":35,"./_dom-create":36,"./_fails":41}],50:[function(citationRequire,module,exports){ var isObject = citationRequire('./_is-object'); var setPrototypeOf = citationRequire('./_set-proto').set; module.exports = function (that, target, C) { var S = target.constructor; var P; if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { setPrototypeOf(that, P); } return that; }; },{"./_is-object":56,"./_set-proto":95}],51:[function(citationRequire,module,exports){ // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; switch (args.length) { case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; },{}],52:[function(citationRequire,module,exports){ // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = citationRequire('./_cof'); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; },{"./_cof":25}],53:[function(citationRequire,module,exports){ // check on default Array iterator var Iterators = citationRequire('./_iterators'); var ITERATOR = citationRequire('./_wks')('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; },{"./_iterators":63,"./_wks":125}],54:[function(citationRequire,module,exports){ // 7.2.2 IsArray(argument) var cof = citationRequire('./_cof'); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; },{"./_cof":25}],55:[function(citationRequire,module,exports){ // 20.1.2.3 Number.isInteger(number) var isObject = citationRequire('./_is-object'); var floor = Math.floor; module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; },{"./_is-object":56}],56:[function(citationRequire,module,exports){ module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; },{}],57:[function(citationRequire,module,exports){ // 7.2.8 IsRegExp(argument) var isObject = citationRequire('./_is-object'); var cof = citationRequire('./_cof'); var MATCH = citationRequire('./_wks')('match'); module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; },{"./_cof":25,"./_is-object":56,"./_wks":125}],58:[function(citationRequire,module,exports){ // call something on iterator step with safe closing on error var anObject = citationRequire('./_an-object'); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; },{"./_an-object":15}],59:[function(citationRequire,module,exports){ 'use strict'; var create = citationRequire('./_object-create'); var descriptor = citationRequire('./_property-desc'); var setToStringTag = citationRequire('./_set-to-string-tag'); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() citationRequire('./_hide')(IteratorPrototype, citationRequire('./_wks')('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; },{"./_hide":47,"./_object-create":73,"./_property-desc":91,"./_set-to-string-tag":97,"./_wks":125}],60:[function(citationRequire,module,exports){ 'use strict'; var LIBRARY = citationRequire('./_library'); var $export = citationRequire('./_export'); var redefine = citationRequire('./_redefine'); var hide = citationRequire('./_hide'); var Iterators = citationRequire('./_iterators'); var $iterCreate = citationRequire('./_iter-create'); var setToStringTag = citationRequire('./_set-to-string-tag'); var getPrototypeOf = citationRequire('./_object-gpo'); var ITERATOR = citationRequire('./_wks')('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; },{"./_export":39,"./_hide":47,"./_iter-create":59,"./_iterators":63,"./_library":64,"./_object-gpo":80,"./_redefine":93,"./_set-to-string-tag":97,"./_wks":125}],61:[function(citationRequire,module,exports){ var ITERATOR = citationRequire('./_wks')('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; },{"./_wks":125}],62:[function(citationRequire,module,exports){ module.exports = function (done, value) { return { value: value, done: !!done }; }; },{}],63:[function(citationRequire,module,exports){ module.exports = {}; },{}],64:[function(citationRequire,module,exports){ module.exports = false; },{}],65:[function(citationRequire,module,exports){ // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x) { return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; },{}],66:[function(citationRequire,module,exports){ // 20.2.2.16 Math.fround(x) var sign = citationRequire('./_math-sign'); var pow = Math.pow; var EPSILON = pow(2, -52); var EPSILON32 = pow(2, -23); var MAX32 = pow(2, 127) * (2 - EPSILON32); var MIN32 = pow(2, -126); var roundTiesToEven = function (n) { return n + 1 / EPSILON - 1 / EPSILON; }; module.exports = Math.fround || function fround(x) { var $abs = Math.abs(x); var $sign = sign(x); var a, result; if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); // eslint-disable-next-line no-self-compare if (result > MAX32 || result != result) return $sign * Infinity; return $sign * result; }; },{"./_math-sign":68}],67:[function(citationRequire,module,exports){ // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; },{}],68:[function(citationRequire,module,exports){ // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x) { // eslint-disable-next-line no-self-compare return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; },{}],69:[function(citationRequire,module,exports){ var META = citationRequire('./_uid')('meta'); var isObject = citationRequire('./_is-object'); var has = citationRequire('./_has'); var setDesc = citationRequire('./_object-dp').f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !citationRequire('./_fails')(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; },{"./_fails":41,"./_has":46,"./_is-object":56,"./_object-dp":74,"./_uid":120}],70:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var macrotask = citationRequire('./_task').set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; var isNode = citationRequire('./_cof')(process) == 'process'; module.exports = function () { var head, last, notify; var flush = function () { var parent, fn; if (isNode && (parent = process.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; try { fn(); } catch (e) { if (head) notify(); else last = undefined; throw e; } } last = undefined; if (parent) parent.enter(); }; // Node.js if (isNode) { notify = function () { process.nextTick(flush); }; // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 } else if (Observer && !(global.navigator && global.navigator.standalone)) { var toggle = true; var node = document.createTextNode(''); new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 var promise = Promise.resolve(undefined); notify = function () { promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function () { // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function (fn) { var task = { fn: fn, next: undefined }; if (last) last.next = task; if (!head) { head = task; notify(); } last = task; }; }; },{"./_cof":25,"./_global":45,"./_task":109}],71:[function(citationRequire,module,exports){ 'use strict'; // 25.4.1.5 NewPromiseCapability(C) var aFunction = citationRequire('./_a-function'); function PromiseCapability(C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); } module.exports.f = function (C) { return new PromiseCapability(C); }; },{"./_a-function":11}],72:[function(citationRequire,module,exports){ 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = citationRequire('./_object-keys'); var gOPS = citationRequire('./_object-gops'); var pIE = citationRequire('./_object-pie'); var toObject = citationRequire('./_to-object'); var IObject = citationRequire('./_iobject'); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || citationRequire('./_fails')(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; } return T; } : $assign; },{"./_fails":41,"./_iobject":52,"./_object-gops":79,"./_object-keys":82,"./_object-pie":83,"./_to-object":115}],73:[function(citationRequire,module,exports){ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = citationRequire('./_an-object'); var dPs = citationRequire('./_object-dps'); var enumBugKeys = citationRequire('./_enum-bug-keys'); var IE_PROTO = citationRequire('./_shared-key')('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = citationRequire('./_dom-create')('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; citationRequire('./_html').appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; },{"./_an-object":15,"./_dom-create":36,"./_enum-bug-keys":37,"./_html":48,"./_object-dps":75,"./_shared-key":98}],74:[function(citationRequire,module,exports){ var anObject = citationRequire('./_an-object'); var IE8_DOM_DEFINE = citationRequire('./_ie8-dom-define'); var toPrimitive = citationRequire('./_to-primitive'); var dP = Object.defineProperty; exports.f = citationRequire('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; },{"./_an-object":15,"./_descriptors":35,"./_ie8-dom-define":49,"./_to-primitive":116}],75:[function(citationRequire,module,exports){ var dP = citationRequire('./_object-dp'); var anObject = citationRequire('./_an-object'); var getKeys = citationRequire('./_object-keys'); module.exports = citationRequire('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; },{"./_an-object":15,"./_descriptors":35,"./_object-dp":74,"./_object-keys":82}],76:[function(citationRequire,module,exports){ var pIE = citationRequire('./_object-pie'); var createDesc = citationRequire('./_property-desc'); var toIObject = citationRequire('./_to-iobject'); var toPrimitive = citationRequire('./_to-primitive'); var has = citationRequire('./_has'); var IE8_DOM_DEFINE = citationRequire('./_ie8-dom-define'); var gOPD = Object.getOwnPropertyDescriptor; exports.f = citationRequire('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; },{"./_descriptors":35,"./_has":46,"./_ie8-dom-define":49,"./_object-pie":83,"./_property-desc":91,"./_to-iobject":113,"./_to-primitive":116}],77:[function(citationRequire,module,exports){ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = citationRequire('./_to-iobject'); var gOPN = citationRequire('./_object-gopn').f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; },{"./_object-gopn":78,"./_to-iobject":113}],78:[function(citationRequire,module,exports){ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = citationRequire('./_object-keys-internal'); var hiddenKeys = citationRequire('./_enum-bug-keys').concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; },{"./_enum-bug-keys":37,"./_object-keys-internal":81}],79:[function(citationRequire,module,exports){ exports.f = Object.getOwnPropertySymbols; },{}],80:[function(citationRequire,module,exports){ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = citationRequire('./_has'); var toObject = citationRequire('./_to-object'); var IE_PROTO = citationRequire('./_shared-key')('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; },{"./_has":46,"./_shared-key":98,"./_to-object":115}],81:[function(citationRequire,module,exports){ var has = citationRequire('./_has'); var toIObject = citationRequire('./_to-iobject'); var arrayIndexOf = citationRequire('./_array-includes')(false); var IE_PROTO = citationRequire('./_shared-key')('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; },{"./_array-includes":18,"./_has":46,"./_shared-key":98,"./_to-iobject":113}],82:[function(citationRequire,module,exports){ // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = citationRequire('./_object-keys-internal'); var enumBugKeys = citationRequire('./_enum-bug-keys'); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; },{"./_enum-bug-keys":37,"./_object-keys-internal":81}],83:[function(citationRequire,module,exports){ exports.f = {}.propertyIsEnumerable; },{}],84:[function(citationRequire,module,exports){ // most Object methods by ES6 should accept primitives var $export = citationRequire('./_export'); var core = citationRequire('./_core'); var fails = citationRequire('./_fails'); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; },{"./_core":29,"./_export":39,"./_fails":41}],85:[function(citationRequire,module,exports){ var getKeys = citationRequire('./_object-keys'); var toIObject = citationRequire('./_to-iobject'); var isEnum = citationRequire('./_object-pie').f; module.exports = function (isEntries) { return function (it) { var O = toIObject(it); var keys = getKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) if (isEnum.call(O, key = keys[i++])) { result.push(isEntries ? [key, O[key]] : O[key]); } return result; }; }; },{"./_object-keys":82,"./_object-pie":83,"./_to-iobject":113}],86:[function(citationRequire,module,exports){ // all object keys, includes non-enumerable and symbols var gOPN = citationRequire('./_object-gopn'); var gOPS = citationRequire('./_object-gops'); var anObject = citationRequire('./_an-object'); var Reflect = citationRequire('./_global').Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { var keys = gOPN.f(anObject(it)); var getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; },{"./_an-object":15,"./_global":45,"./_object-gopn":78,"./_object-gops":79}],87:[function(citationRequire,module,exports){ var $parseFloat = citationRequire('./_global').parseFloat; var $trim = citationRequire('./_string-trim').trim; module.exports = 1 / $parseFloat(citationRequire('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { var string = $trim(String(str), 3); var result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; },{"./_global":45,"./_string-trim":107,"./_string-ws":108}],88:[function(citationRequire,module,exports){ var $parseInt = citationRequire('./_global').parseInt; var $trim = citationRequire('./_string-trim').trim; var ws = citationRequire('./_string-ws'); var hex = /^[-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; },{"./_global":45,"./_string-trim":107,"./_string-ws":108}],89:[function(citationRequire,module,exports){ module.exports = function (exec) { try { return { e: false, v: exec() }; } catch (e) { return { e: true, v: e }; } }; },{}],90:[function(citationRequire,module,exports){ var anObject = citationRequire('./_an-object'); var isObject = citationRequire('./_is-object'); var newPromiseCapability = citationRequire('./_new-promise-capability'); module.exports = function (C, x) { anObject(C); if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); return promiseCapability.promise; }; },{"./_an-object":15,"./_is-object":56,"./_new-promise-capability":71}],91:[function(citationRequire,module,exports){ module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; },{}],92:[function(citationRequire,module,exports){ var redefine = citationRequire('./_redefine'); module.exports = function (target, src, safe) { for (var key in src) redefine(target, key, src[key], safe); return target; }; },{"./_redefine":93}],93:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var hide = citationRequire('./_hide'); var has = citationRequire('./_has'); var SRC = citationRequire('./_uid')('src'); var TO_STRING = 'toString'; var $toString = Function[TO_STRING]; var TPL = ('' + $toString).split(TO_STRING); citationRequire('./_core').inspectSource = function (it) { return $toString.call(it); }; (module.exports = function (O, key, val, safe) { var isFunction = typeof val == 'function'; if (isFunction) has(val, 'name') || hide(val, 'name', key); if (O[key] === val) return; if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if (O === global) { O[key] = val; } else if (!safe) { delete O[key]; hide(O, key, val); } else if (O[key]) { O[key] = val; } else { hide(O, key, val); } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString() { return typeof this == 'function' && this[SRC] || $toString.call(this); }); },{"./_core":29,"./_global":45,"./_has":46,"./_hide":47,"./_uid":120}],94:[function(citationRequire,module,exports){ // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; },{}],95:[function(citationRequire,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = citationRequire('./_is-object'); var anObject = citationRequire('./_an-object'); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = citationRequire('./_ctx')(Function.call, citationRequire('./_object-gopd').f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; },{"./_an-object":15,"./_ctx":31,"./_is-object":56,"./_object-gopd":76}],96:[function(citationRequire,module,exports){ 'use strict'; var global = citationRequire('./_global'); var dP = citationRequire('./_object-dp'); var DESCRIPTORS = citationRequire('./_descriptors'); var SPECIES = citationRequire('./_wks')('species'); module.exports = function (KEY) { var C = global[KEY]; if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { configurable: true, get: function () { return this; } }); }; },{"./_descriptors":35,"./_global":45,"./_object-dp":74,"./_wks":125}],97:[function(citationRequire,module,exports){ var def = citationRequire('./_object-dp').f; var has = citationRequire('./_has'); var TAG = citationRequire('./_wks')('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; },{"./_has":46,"./_object-dp":74,"./_wks":125}],98:[function(citationRequire,module,exports){ var shared = citationRequire('./_shared')('keys'); var uid = citationRequire('./_uid'); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; },{"./_shared":99,"./_uid":120}],99:[function(citationRequire,module,exports){ var core = citationRequire('./_core'); var global = citationRequire('./_global'); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: citationRequire('./_library') ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); },{"./_core":29,"./_global":45,"./_library":64}],100:[function(citationRequire,module,exports){ // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = citationRequire('./_an-object'); var aFunction = citationRequire('./_a-function'); var SPECIES = citationRequire('./_wks')('species'); module.exports = function (O, D) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; },{"./_a-function":11,"./_an-object":15,"./_wks":125}],101:[function(citationRequire,module,exports){ 'use strict'; var fails = citationRequire('./_fails'); module.exports = function (method, arg) { return !!method && fails(function () { // eslint-disable-next-line no-useless-call arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); }); }; },{"./_fails":41}],102:[function(citationRequire,module,exports){ var toInteger = citationRequire('./_to-integer'); var defined = citationRequire('./_defined'); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; },{"./_defined":34,"./_to-integer":112}],103:[function(citationRequire,module,exports){ // helper for String#{startsWith, endsWith, includes} var isRegExp = citationRequire('./_is-regexp'); var defined = citationRequire('./_defined'); module.exports = function (that, searchString, NAME) { if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; },{"./_defined":34,"./_is-regexp":57}],104:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var fails = citationRequire('./_fails'); var defined = citationRequire('./_defined'); var quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function (string, tag, attribute, value) { var S = String(defined(string)); var p1 = '<' + tag; if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function (NAME, exec) { var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function () { var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); }; },{"./_defined":34,"./_export":39,"./_fails":41}],105:[function(citationRequire,module,exports){ // https://github.com/tc39/proposal-string-pad-start-end var toLength = citationRequire('./_to-length'); var repeat = citationRequire('./_string-repeat'); var defined = citationRequire('./_defined'); module.exports = function (that, maxLength, fillString, left) { var S = String(defined(that)); var stringLength = S.length; var fillStr = fillString === undefined ? ' ' : String(fillString); var intMaxLength = toLength(maxLength); if (intMaxLength <= stringLength || fillStr == '') return S; var fillLen = intMaxLength - stringLength; var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; },{"./_defined":34,"./_string-repeat":106,"./_to-length":114}],106:[function(citationRequire,module,exports){ 'use strict'; var toInteger = citationRequire('./_to-integer'); var defined = citationRequire('./_defined'); module.exports = function repeat(count) { var str = String(defined(this)); var res = ''; var n = toInteger(count); if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; return res; }; },{"./_defined":34,"./_to-integer":112}],107:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var defined = citationRequire('./_defined'); var fails = citationRequire('./_fails'); var spaces = citationRequire('./_string-ws'); var space = '[' + spaces + ']'; var non = '\u200b\u0085'; var ltrim = RegExp('^' + space + space + '*'); var rtrim = RegExp(space + space + '*$'); var exporter = function (KEY, exec, ALIAS) { var exp = {}; var FORCE = fails(function () { return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if (ALIAS) exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function (string, TYPE) { string = String(defined(string)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; module.exports = exporter; },{"./_defined":34,"./_export":39,"./_fails":41,"./_string-ws":108}],108:[function(citationRequire,module,exports){ module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; },{}],109:[function(citationRequire,module,exports){ var ctx = citationRequire('./_ctx'); var invoke = citationRequire('./_invoke'); var html = citationRequire('./_html'); var cel = citationRequire('./_dom-create'); var global = citationRequire('./_global'); var process = global.process; var setTask = global.setImmediate; var clearTask = global.clearImmediate; var MessageChannel = global.MessageChannel; var Dispatch = global.Dispatch; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var defer, channel, port; var run = function () { var id = +this; // eslint-disable-next-line no-prototype-builtins if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function (event) { run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!setTask || !clearTask) { setTask = function setImmediate(fn) { var args = []; var i = 1; while (arguments.length > i) args.push(arguments[i++]); queue[++counter] = function () { // eslint-disable-next-line no-new-func invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (citationRequire('./_cof')(process) == 'process') { defer = function (id) { process.nextTick(ctx(run, id, 1)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if (MessageChannel) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { defer = function (id) { global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in cel('script')) { defer = function (id) { html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; },{"./_cof":25,"./_ctx":31,"./_dom-create":36,"./_global":45,"./_html":48,"./_invoke":51}],110:[function(citationRequire,module,exports){ var toInteger = citationRequire('./_to-integer'); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; },{"./_to-integer":112}],111:[function(citationRequire,module,exports){ // https://tc39.github.io/ecma262/#sec-toindex var toInteger = citationRequire('./_to-integer'); var toLength = citationRequire('./_to-length'); module.exports = function (it) { if (it === undefined) return 0; var number = toInteger(it); var length = toLength(number); if (number !== length) throw RangeError('Wrong length!'); return length; }; },{"./_to-integer":112,"./_to-length":114}],112:[function(citationRequire,module,exports){ // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; },{}],113:[function(citationRequire,module,exports){ // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = citationRequire('./_iobject'); var defined = citationRequire('./_defined'); module.exports = function (it) { return IObject(defined(it)); }; },{"./_defined":34,"./_iobject":52}],114:[function(citationRequire,module,exports){ // 7.1.15 ToLength var toInteger = citationRequire('./_to-integer'); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; },{"./_to-integer":112}],115:[function(citationRequire,module,exports){ // 7.1.13 ToObject(argument) var defined = citationRequire('./_defined'); module.exports = function (it) { return Object(defined(it)); }; },{"./_defined":34}],116:[function(citationRequire,module,exports){ // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = citationRequire('./_is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; },{"./_is-object":56}],117:[function(citationRequire,module,exports){ 'use strict'; if (citationRequire('./_descriptors')) { var LIBRARY = citationRequire('./_library'); var global = citationRequire('./_global'); var fails = citationRequire('./_fails'); var $export = citationRequire('./_export'); var $typed = citationRequire('./_typed'); var $buffer = citationRequire('./_typed-buffer'); var ctx = citationRequire('./_ctx'); var anInstance = citationRequire('./_an-instance'); var propertyDesc = citationRequire('./_property-desc'); var hide = citationRequire('./_hide'); var redefineAll = citationRequire('./_redefine-all'); var toInteger = citationRequire('./_to-integer'); var toLength = citationRequire('./_to-length'); var toIndex = citationRequire('./_to-index'); var toAbsoluteIndex = citationRequire('./_to-absolute-index'); var toPrimitive = citationRequire('./_to-primitive'); var has = citationRequire('./_has'); var classof = citationRequire('./_classof'); var isObject = citationRequire('./_is-object'); var toObject = citationRequire('./_to-object'); var isArrayIter = citationRequire('./_is-array-iter'); var create = citationRequire('./_object-create'); var getPrototypeOf = citationRequire('./_object-gpo'); var gOPN = citationRequire('./_object-gopn').f; var getIterFn = citationRequire('./core.get-iterator-method'); var uid = citationRequire('./_uid'); var wks = citationRequire('./_wks'); var createArrayMethod = citationRequire('./_array-methods'); var createArrayIncludes = citationRequire('./_array-includes'); var speciesConstructor = citationRequire('./_species-constructor'); var ArrayIterators = citationRequire('./es6.array.iterator'); var Iterators = citationRequire('./_iterators'); var $iterDetect = citationRequire('./_iter-detect'); var setSpecies = citationRequire('./_set-species'); var arrayFill = citationRequire('./_array-fill'); var arrayCopyWithin = citationRequire('./_array-copy-within'); var $DP = citationRequire('./_object-dp'); var $GOPD = citationRequire('./_object-gopd'); var dP = $DP.f; var gOPD = $GOPD.f; var RangeError = global.RangeError; var TypeError = global.TypeError; var Uint8Array = global.Uint8Array; var ARRAY_BUFFER = 'ArrayBuffer'; var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; var PROTOTYPE = 'prototype'; var ArrayProto = Array[PROTOTYPE]; var $ArrayBuffer = $buffer.ArrayBuffer; var $DataView = $buffer.DataView; var arrayForEach = createArrayMethod(0); var arrayFilter = createArrayMethod(2); var arraySome = createArrayMethod(3); var arrayEvery = createArrayMethod(4); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); var arrayIncludes = createArrayIncludes(true); var arrayIndexOf = createArrayIncludes(false); var arrayValues = ArrayIterators.values; var arrayKeys = ArrayIterators.keys; var arrayEntries = ArrayIterators.entries; var arrayLastIndexOf = ArrayProto.lastIndexOf; var arrayReduce = ArrayProto.reduce; var arrayReduceRight = ArrayProto.reduceRight; var arrayJoin = ArrayProto.join; var arraySort = ArrayProto.sort; var arraySlice = ArrayProto.slice; var arrayToString = ArrayProto.toString; var arrayToLocaleString = ArrayProto.toLocaleString; var ITERATOR = wks('iterator'); var TAG = wks('toStringTag'); var TYPED_CONSTRUCTOR = uid('typed_constructor'); var DEF_CONSTRUCTOR = uid('def_constructor'); var ALL_CONSTRUCTORS = $typed.CONSTR; var TYPED_ARRAY = $typed.TYPED; var VIEW = $typed.VIEW; var WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function (O, length) { return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function () { // eslint-disable-next-line no-undef return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { new Uint8Array(1).set({}); }); var toOffset = function (it, BYTES) { var offset = toInteger(it); if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); return offset; }; var validate = function (it) { if (isObject(it) && TYPED_ARRAY in it) return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function (C, length) { if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function (O, list) { return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function (C, list) { var index = 0; var length = list.length; var result = allocate(C, length); while (length > index) result[index] = list[index++]; return result; }; var addGetter = function (it, key, internal) { dP(it, key, { get: function () { return this._d[internal]; } }); }; var $from = function from(source /* , mapfn, thisArg */) { var O = toObject(source); var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var iterFn = getIterFn(O); var i, length, values, result, step, iterator; if (iterFn != undefined && !isArrayIter(iterFn)) { for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { values.push(step.value); } O = values; } if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/* ...items */) { var index = 0; var length = arguments.length; var result = allocate(this, length); while (length > index) result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString() { return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /* , end */) { return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /* , thisArg */) { return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /* , thisArg */) { return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /* , thisArg */) { return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /* , thisArg */) { return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /* , thisArg */) { arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /* , fromIndex */) { return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /* , fromIndex */) { return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator) { // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /* , thisArg */) { return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse() { var that = this; var length = validate(that).length; var middle = Math.floor(length / 2); var index = 0; var value; while (index < middle) { value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /* , thisArg */) { return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn) { return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end) { var O = validate(this); var length = O.length; var $begin = toAbsoluteIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end) { return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /* , offset */) { validate(this); var offset = toOffset(arguments[1], 1); var length = this.length; var src = toObject(arrayLike); var len = toLength(src.length); var index = 0; if (len + offset > length) throw RangeError(WRONG_LENGTH); while (index < len) this[offset + index] = src[index++]; }; var $iterators = { entries: function entries() { return arrayEntries.call(validate(this)); }, keys: function keys() { return arrayKeys.call(validate(this)); }, values: function values() { return arrayValues.call(validate(this)); } }; var isTAIndex = function (target, key) { return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key) { return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc) { if (isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ) { target[key] = desc.value; return target; } return dP(target, key, desc); }; if (!ALL_CONSTRUCTORS) { $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if (fails(function () { arrayToString.call({}); })) { arrayToString = arrayToLocaleString = function toString() { return arrayJoin.call(this); }; } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function () { /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function () { return this[TYPED_ARRAY]; } }); // eslint-disable-next-line max-statements module.exports = function (KEY, BYTES, wrapper, CLAMPED) { CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; var GETTER = 'get' + KEY; var SETTER = 'set' + KEY; var TypedArray = global[NAME]; var Base = TypedArray || {}; var TAC = TypedArray && getPrototypeOf(TypedArray); var FORCED = !TypedArray || !$typed.ABV; var O = {}; var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function (that, index) { var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function (that, index, value) { var data = that._d; if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function (that, index) { dP(that, index, { get: function () { return getter(this, index); }, set: function (value) { return setter(this, index, value); }, enumerable: true }); }; if (FORCED) { TypedArray = wrapper(function (that, data, $offset, $length) { anInstance(that, TypedArray, NAME, '_d'); var index = 0; var offset = 0; var buffer, byteLength, length, klass; if (!isObject(data)) { length = toIndex(data); byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if ($length === undefined) { if ($len % BYTES) throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if (byteLength < 0) throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if (TYPED_ARRAY in data) { return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while (index < length) addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if (!fails(function () { TypedArray(1); }) || !fails(function () { new TypedArray(-1); // eslint-disable-line no-new }) || !$iterDetect(function (iter) { new TypedArray(); // eslint-disable-line no-new new TypedArray(null); // eslint-disable-line no-new new TypedArray(1.5); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)) { TypedArray = wrapper(function (that, data, $offset, $length) { anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if (!isObject(data)) return new Base(toIndex(data)); if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if (TYPED_ARRAY in data) return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR]; var CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); var $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { dP(TypedArrayPrototype, TAG, { get: function () { return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES }); $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { from: $from, of: $of }); if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; $export($export.P + $export.F * fails(function () { new TypedArray(1).slice(); }), NAME, { slice: $slice }); $export($export.P + $export.F * (fails(function () { return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); }) || !fails(function () { TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, { toLocaleString: $toLocaleString }); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function () { /* empty */ }; },{"./_an-instance":14,"./_array-copy-within":16,"./_array-fill":17,"./_array-includes":18,"./_array-methods":19,"./_classof":24,"./_ctx":31,"./_descriptors":35,"./_export":39,"./_fails":41,"./_global":45,"./_has":46,"./_hide":47,"./_is-array-iter":53,"./_is-object":56,"./_iter-detect":61,"./_iterators":63,"./_library":64,"./_object-create":73,"./_object-dp":74,"./_object-gopd":76,"./_object-gopn":78,"./_object-gpo":80,"./_property-desc":91,"./_redefine-all":92,"./_set-species":96,"./_species-constructor":100,"./_to-absolute-index":110,"./_to-index":111,"./_to-integer":112,"./_to-length":114,"./_to-object":115,"./_to-primitive":116,"./_typed":119,"./_typed-buffer":118,"./_uid":120,"./_wks":125,"./core.get-iterator-method":126,"./es6.array.iterator":137}],118:[function(citationRequire,module,exports){ 'use strict'; var global = citationRequire('./_global'); var DESCRIPTORS = citationRequire('./_descriptors'); var LIBRARY = citationRequire('./_library'); var $typed = citationRequire('./_typed'); var hide = citationRequire('./_hide'); var redefineAll = citationRequire('./_redefine-all'); var fails = citationRequire('./_fails'); var anInstance = citationRequire('./_an-instance'); var toInteger = citationRequire('./_to-integer'); var toLength = citationRequire('./_to-length'); var toIndex = citationRequire('./_to-index'); var gOPN = citationRequire('./_object-gopn').f; var dP = citationRequire('./_object-dp').f; var arrayFill = citationRequire('./_array-fill'); var setToStringTag = citationRequire('./_set-to-string-tag'); var ARRAY_BUFFER = 'ArrayBuffer'; var DATA_VIEW = 'DataView'; var PROTOTYPE = 'prototype'; var WRONG_LENGTH = 'Wrong length!'; var WRONG_INDEX = 'Wrong index!'; var $ArrayBuffer = global[ARRAY_BUFFER]; var $DataView = global[DATA_VIEW]; var Math = global.Math; var RangeError = global.RangeError; // eslint-disable-next-line no-shadow-restricted-names var Infinity = global.Infinity; var BaseBuffer = $ArrayBuffer; var abs = Math.abs; var pow = Math.pow; var floor = Math.floor; var log = Math.log; var LN2 = Math.LN2; var BUFFER = 'buffer'; var BYTE_LENGTH = 'byteLength'; var BYTE_OFFSET = 'byteOffset'; var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 function packIEEE754(value, mLen, nBytes) { var buffer = new Array(nBytes); var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1; var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; var i = 0; var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; var e, m, c; value = abs(value); // eslint-disable-next-line no-self-compare if (value != value || value === Infinity) { // eslint-disable-next-line no-self-compare m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if (value * (c = pow(2, -e)) < 1) { e--; c *= 2; } if (e + eBias >= 1) { value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if (value * c >= 2) { e++; c /= 2; } if (e + eBias >= eMax) { m = 0; e = eMax; } else if (e + eBias >= 1) { m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; } function unpackIEEE754(buffer, mLen, nBytes) { var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1; var nBits = eLen - 7; var i = nBytes - 1; var s = buffer[i--]; var e = s & 127; var m; s >>= 7; for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if (e === 0) { e = 1 - eBias; } else if (e === eMax) { return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); } function unpackI32(bytes) { return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; } function packI8(it) { return [it & 0xff]; } function packI16(it) { return [it & 0xff, it >> 8 & 0xff]; } function packI32(it) { return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; } function packF64(it) { return packIEEE754(it, 52, 8); } function packF32(it) { return packIEEE754(it, 23, 4); } function addGetter(C, key, internal) { dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); } function get(view, bytes, index, isLittleEndian) { var numIndex = +index; var intIndex = toIndex(numIndex); if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b; var start = intIndex + view[$OFFSET]; var pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); } function set(view, bytes, index, conversion, value, isLittleEndian) { var numIndex = +index; var intIndex = toIndex(numIndex); if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b; var start = intIndex + view[$OFFSET]; var pack = conversion(+value); for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; } if (!$typed.ABV) { $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, $ArrayBuffer, ARRAY_BUFFER); var byteLength = toIndex(length); this._b = arrayFill.call(new Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength) { anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH]; var offset = toInteger(byteOffset); if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if (DESCRIPTORS) { addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset) { return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset) { return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /* , littleEndian */) { var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /* , littleEndian */) { var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /* , littleEndian */) { return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /* , littleEndian */) { return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /* , littleEndian */) { return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /* , littleEndian */) { return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value) { set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value) { set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /* , littleEndian */) { set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /* , littleEndian */) { set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /* , littleEndian */) { set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /* , littleEndian */) { set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if (!fails(function () { $ArrayBuffer(1); }) || !fails(function () { new $ArrayBuffer(-1); // eslint-disable-line no-new }) || fails(function () { new $ArrayBuffer(); // eslint-disable-line no-new new $ArrayBuffer(1.5); // eslint-disable-line no-new new $ArrayBuffer(NaN); // eslint-disable-line no-new return $ArrayBuffer.name != ARRAY_BUFFER; })) { $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, $ArrayBuffer); return new BaseBuffer(toIndex(length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); } if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)); var $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value) { $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value) { $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; },{"./_an-instance":14,"./_array-fill":17,"./_descriptors":35,"./_fails":41,"./_global":45,"./_hide":47,"./_library":64,"./_object-dp":74,"./_object-gopn":78,"./_redefine-all":92,"./_set-to-string-tag":97,"./_to-index":111,"./_to-integer":112,"./_to-length":114,"./_typed":119}],119:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var hide = citationRequire('./_hide'); var uid = citationRequire('./_uid'); var TYPED = uid('typed_array'); var VIEW = uid('view'); var ABV = !!(global.ArrayBuffer && global.DataView); var CONSTR = ABV; var i = 0; var l = 9; var Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while (i < l) { if (Typed = global[TypedArrayConstructors[i++]]) { hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW }; },{"./_global":45,"./_hide":47,"./_uid":120}],120:[function(citationRequire,module,exports){ var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; },{}],121:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; },{"./_global":45}],122:[function(citationRequire,module,exports){ var isObject = citationRequire('./_is-object'); module.exports = function (it, TYPE) { if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' citationRequired!'); return it; }; },{"./_is-object":56}],123:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var core = citationRequire('./_core'); var LIBRARY = citationRequire('./_library'); var wksExt = citationRequire('./_wks-ext'); var defineProperty = citationRequire('./_object-dp').f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; },{"./_core":29,"./_global":45,"./_library":64,"./_object-dp":74,"./_wks-ext":124}],124:[function(citationRequire,module,exports){ exports.f = citationRequire('./_wks'); },{"./_wks":125}],125:[function(citationRequire,module,exports){ var store = citationRequire('./_shared')('wks'); var uid = citationRequire('./_uid'); var Symbol = citationRequire('./_global').Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; },{"./_global":45,"./_shared":99,"./_uid":120}],126:[function(citationRequire,module,exports){ var classof = citationRequire('./_classof'); var ITERATOR = citationRequire('./_wks')('iterator'); var Iterators = citationRequire('./_iterators'); module.exports = citationRequire('./_core').getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; },{"./_classof":24,"./_core":29,"./_iterators":63,"./_wks":125}],127:[function(citationRequire,module,exports){ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = citationRequire('./_export'); $export($export.P, 'Array', { copyWithin: citationRequire('./_array-copy-within') }); citationRequire('./_add-to-unscopables')('copyWithin'); },{"./_add-to-unscopables":13,"./_array-copy-within":16,"./_export":39}],128:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $every = citationRequire('./_array-methods')(4); $export($export.P + $export.F * !citationRequire('./_strict-method')([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */) { return $every(this, callbackfn, arguments[1]); } }); },{"./_array-methods":19,"./_export":39,"./_strict-method":101}],129:[function(citationRequire,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = citationRequire('./_export'); $export($export.P, 'Array', { fill: citationRequire('./_array-fill') }); citationRequire('./_add-to-unscopables')('fill'); },{"./_add-to-unscopables":13,"./_array-fill":17,"./_export":39}],130:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $filter = citationRequire('./_array-methods')(2); $export($export.P + $export.F * !citationRequire('./_strict-method')([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments[1]); } }); },{"./_array-methods":19,"./_export":39,"./_strict-method":101}],131:[function(citationRequire,module,exports){ 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = citationRequire('./_export'); var $find = citationRequire('./_array-methods')(6); var KEY = 'findIndex'; var forced = true; // Shouldn't skip holes if (KEY in []) Array(1)[KEY](function () { forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn /* , that = undefined */) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); citationRequire('./_add-to-unscopables')(KEY); },{"./_add-to-unscopables":13,"./_array-methods":19,"./_export":39}],132:[function(citationRequire,module,exports){ 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = citationRequire('./_export'); var $find = citationRequire('./_array-methods')(5); var KEY = 'find'; var forced = true; // Shouldn't skip holes if (KEY in []) Array(1)[KEY](function () { forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn /* , that = undefined */) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); citationRequire('./_add-to-unscopables')(KEY); },{"./_add-to-unscopables":13,"./_array-methods":19,"./_export":39}],133:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $forEach = citationRequire('./_array-methods')(0); var STRICT = citationRequire('./_strict-method')([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */) { return $forEach(this, callbackfn, arguments[1]); } }); },{"./_array-methods":19,"./_export":39,"./_strict-method":101}],134:[function(citationRequire,module,exports){ 'use strict'; var ctx = citationRequire('./_ctx'); var $export = citationRequire('./_export'); var toObject = citationRequire('./_to-object'); var call = citationRequire('./_iter-call'); var isArrayIter = citationRequire('./_is-array-iter'); var toLength = citationRequire('./_to-length'); var createProperty = citationRequire('./_create-property'); var getIterFn = citationRequire('./core.get-iterator-method'); $export($export.S + $export.F * !citationRequire('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); },{"./_create-property":30,"./_ctx":31,"./_export":39,"./_is-array-iter":53,"./_iter-call":58,"./_iter-detect":61,"./_to-length":114,"./_to-object":115,"./core.get-iterator-method":126}],135:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $indexOf = citationRequire('./_array-includes')(false); var $native = [].indexOf; var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !citationRequire('./_strict-method')($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } }); },{"./_array-includes":18,"./_export":39,"./_strict-method":101}],136:[function(citationRequire,module,exports){ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = citationRequire('./_export'); $export($export.S, 'Array', { isArray: citationRequire('./_is-array') }); },{"./_export":39,"./_is-array":54}],137:[function(citationRequire,module,exports){ 'use strict'; var addToUnscopables = citationRequire('./_add-to-unscopables'); var step = citationRequire('./_iter-step'); var Iterators = citationRequire('./_iterators'); var toIObject = citationRequire('./_to-iobject'); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = citationRequire('./_iter-define')(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); },{"./_add-to-unscopables":13,"./_iter-define":60,"./_iter-step":62,"./_iterators":63,"./_to-iobject":113}],138:[function(citationRequire,module,exports){ 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = citationRequire('./_export'); var toIObject = citationRequire('./_to-iobject'); var arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (citationRequire('./_iobject') != Object || !citationRequire('./_strict-method')(arrayJoin)), 'Array', { join: function join(separator) { return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } }); },{"./_export":39,"./_iobject":52,"./_strict-method":101,"./_to-iobject":113}],139:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var toIObject = citationRequire('./_to-iobject'); var toInteger = citationRequire('./_to-integer'); var toLength = citationRequire('./_to-length'); var $native = [].lastIndexOf; var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !citationRequire('./_strict-method')($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { // convert -0 to +0 if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; var O = toIObject(this); var length = toLength(O.length); var index = length - 1; if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); if (index < 0) index = length + index; for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; return -1; } }); },{"./_export":39,"./_strict-method":101,"./_to-integer":112,"./_to-iobject":113,"./_to-length":114}],140:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $map = citationRequire('./_array-methods')(1); $export($export.P + $export.F * !citationRequire('./_strict-method')([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments[1]); } }); },{"./_array-methods":19,"./_export":39,"./_strict-method":101}],141:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var createProperty = citationRequire('./_create-property'); // WebKit Array.of isn't generic $export($export.S + $export.F * citationRequire('./_fails')(function () { function F() { /* empty */ } return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */) { var index = 0; var aLen = arguments.length; var result = new (typeof this == 'function' ? this : Array)(aLen); while (aLen > index) createProperty(result, index, arguments[index++]); result.length = aLen; return result; } }); },{"./_create-property":30,"./_export":39,"./_fails":41}],142:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $reduce = citationRequire('./_array-reduce'); $export($export.P + $export.F * !citationRequire('./_strict-method')([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */) { return $reduce(this, callbackfn, arguments.length, arguments[1], true); } }); },{"./_array-reduce":20,"./_export":39,"./_strict-method":101}],143:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $reduce = citationRequire('./_array-reduce'); $export($export.P + $export.F * !citationRequire('./_strict-method')([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */) { return $reduce(this, callbackfn, arguments.length, arguments[1], false); } }); },{"./_array-reduce":20,"./_export":39,"./_strict-method":101}],144:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var html = citationRequire('./_html'); var cof = citationRequire('./_cof'); var toAbsoluteIndex = citationRequire('./_to-absolute-index'); var toLength = citationRequire('./_to-length'); var arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * citationRequire('./_fails')(function () { if (html) arraySlice.call(html); }), 'Array', { slice: function slice(begin, end) { var len = toLength(this.length); var klass = cof(this); end = end === undefined ? len : end; if (klass == 'Array') return arraySlice.call(this, begin, end); var start = toAbsoluteIndex(begin, len); var upTo = toAbsoluteIndex(end, len); var size = toLength(upTo - start); var cloned = new Array(size); var i = 0; for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } }); },{"./_cof":25,"./_export":39,"./_fails":41,"./_html":48,"./_to-absolute-index":110,"./_to-length":114}],145:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $some = citationRequire('./_array-methods')(3); $export($export.P + $export.F * !citationRequire('./_strict-method')([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */) { return $some(this, callbackfn, arguments[1]); } }); },{"./_array-methods":19,"./_export":39,"./_strict-method":101}],146:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var aFunction = citationRequire('./_a-function'); var toObject = citationRequire('./_to-object'); var fails = citationRequire('./_fails'); var $sort = [].sort; var test = [1, 2, 3]; $export($export.P + $export.F * (fails(function () { // IE8- test.sort(undefined); }) || !fails(function () { // V8 bug test.sort(null); // Old WebKit }) || !citationRequire('./_strict-method')($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn) { return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } }); },{"./_a-function":11,"./_export":39,"./_fails":41,"./_strict-method":101,"./_to-object":115}],147:[function(citationRequire,module,exports){ citationRequire('./_set-species')('Array'); },{"./_set-species":96}],148:[function(citationRequire,module,exports){ // 20.3.3.1 / 15.9.4.4 Date.now() var $export = citationRequire('./_export'); $export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); },{"./_export":39}],149:[function(citationRequire,module,exports){ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = citationRequire('./_export'); var toISOString = citationRequire('./_date-to-iso-string'); // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { toISOString: toISOString }); },{"./_date-to-iso-string":32,"./_export":39}],150:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var toObject = citationRequire('./_to-object'); var toPrimitive = citationRequire('./_to-primitive'); $export($export.P + $export.F * citationRequire('./_fails')(function () { return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; }), 'Date', { // eslint-disable-next-line no-unused-vars toJSON: function toJSON(key) { var O = toObject(this); var pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } }); },{"./_export":39,"./_fails":41,"./_to-object":115,"./_to-primitive":116}],151:[function(citationRequire,module,exports){ var TO_PRIMITIVE = citationRequire('./_wks')('toPrimitive'); var proto = Date.prototype; if (!(TO_PRIMITIVE in proto)) citationRequire('./_hide')(proto, TO_PRIMITIVE, citationRequire('./_date-to-primitive')); },{"./_date-to-primitive":33,"./_hide":47,"./_wks":125}],152:[function(citationRequire,module,exports){ var DateProto = Date.prototype; var INVALID_DATE = 'Invalid Date'; var TO_STRING = 'toString'; var $toString = DateProto[TO_STRING]; var getTime = DateProto.getTime; if (new Date(NaN) + '' != INVALID_DATE) { citationRequire('./_redefine')(DateProto, TO_STRING, function toString() { var value = getTime.call(this); // eslint-disable-next-line no-self-compare return value === value ? $toString.call(this) : INVALID_DATE; }); } },{"./_redefine":93}],153:[function(citationRequire,module,exports){ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = citationRequire('./_export'); $export($export.P, 'Function', { bind: citationRequire('./_bind') }); },{"./_bind":23,"./_export":39}],154:[function(citationRequire,module,exports){ 'use strict'; var isObject = citationRequire('./_is-object'); var getPrototypeOf = citationRequire('./_object-gpo'); var HAS_INSTANCE = citationRequire('./_wks')('hasInstance'); var FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if (!(HAS_INSTANCE in FunctionProto)) citationRequire('./_object-dp').f(FunctionProto, HAS_INSTANCE, { value: function (O) { if (typeof this != 'function' || !isObject(O)) return false; if (!isObject(this.prototype)) return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while (O = getPrototypeOf(O)) if (this.prototype === O) return true; return false; } }); },{"./_is-object":56,"./_object-dp":74,"./_object-gpo":80,"./_wks":125}],155:[function(citationRequire,module,exports){ var dP = citationRequire('./_object-dp').f; var FProto = Function.prototype; var nameRE = /^\s*function ([^ (]*)/; var NAME = 'name'; // 19.2.4.2 name NAME in FProto || citationRequire('./_descriptors') && dP(FProto, NAME, { configurable: true, get: function () { try { return ('' + this).match(nameRE)[1]; } catch (e) { return ''; } } }); },{"./_descriptors":35,"./_object-dp":74}],156:[function(citationRequire,module,exports){ 'use strict'; var strong = citationRequire('./_collection-strong'); var validate = citationRequire('./_validate-collection'); var MAP = 'Map'; // 23.1 Map Objects module.exports = citationRequire('./_collection')(MAP, function (get) { return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key) { var entry = strong.getEntry(validate(this, MAP), key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value) { return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); } }, strong, true); },{"./_collection":28,"./_collection-strong":26,"./_validate-collection":122}],157:[function(citationRequire,module,exports){ // 20.2.2.3 Math.acosh(x) var $export = citationRequire('./_export'); var log1p = citationRequire('./_math-log1p'); var sqrt = Math.sqrt; var $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x) { return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } }); },{"./_export":39,"./_math-log1p":67}],158:[function(citationRequire,module,exports){ // 20.2.2.5 Math.asinh(x) var $export = citationRequire('./_export'); var $asinh = Math.asinh; function asinh(x) { return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); },{"./_export":39}],159:[function(citationRequire,module,exports){ // 20.2.2.7 Math.atanh(x) var $export = citationRequire('./_export'); var $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x) { return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } }); },{"./_export":39}],160:[function(citationRequire,module,exports){ // 20.2.2.9 Math.cbrt(x) var $export = citationRequire('./_export'); var sign = citationRequire('./_math-sign'); $export($export.S, 'Math', { cbrt: function cbrt(x) { return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } }); },{"./_export":39,"./_math-sign":68}],161:[function(citationRequire,module,exports){ // 20.2.2.11 Math.clz32(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { clz32: function clz32(x) { return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } }); },{"./_export":39}],162:[function(citationRequire,module,exports){ // 20.2.2.12 Math.cosh(x) var $export = citationRequire('./_export'); var exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x) { return (exp(x = +x) + exp(-x)) / 2; } }); },{"./_export":39}],163:[function(citationRequire,module,exports){ // 20.2.2.14 Math.expm1(x) var $export = citationRequire('./_export'); var $expm1 = citationRequire('./_math-expm1'); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); },{"./_export":39,"./_math-expm1":65}],164:[function(citationRequire,module,exports){ // 20.2.2.16 Math.fround(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { fround: citationRequire('./_math-fround') }); },{"./_export":39,"./_math-fround":66}],165:[function(citationRequire,module,exports){ // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = citationRequire('./_export'); var abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars var sum = 0; var i = 0; var aLen = arguments.length; var larg = 0; var arg, div; while (i < aLen) { arg = abs(arguments[i++]); if (larg < arg) { div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if (arg > 0) { div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } }); },{"./_export":39}],166:[function(citationRequire,module,exports){ // 20.2.2.18 Math.imul(x, y) var $export = citationRequire('./_export'); var $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * citationRequire('./_fails')(function () { return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y) { var UINT16 = 0xffff; var xn = +x; var yn = +y; var xl = UINT16 & xn; var yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } }); },{"./_export":39,"./_fails":41}],167:[function(citationRequire,module,exports){ // 20.2.2.21 Math.log10(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { log10: function log10(x) { return Math.log(x) * Math.LOG10E; } }); },{"./_export":39}],168:[function(citationRequire,module,exports){ // 20.2.2.20 Math.log1p(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { log1p: citationRequire('./_math-log1p') }); },{"./_export":39,"./_math-log1p":67}],169:[function(citationRequire,module,exports){ // 20.2.2.22 Math.log2(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { log2: function log2(x) { return Math.log(x) / Math.LN2; } }); },{"./_export":39}],170:[function(citationRequire,module,exports){ // 20.2.2.28 Math.sign(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { sign: citationRequire('./_math-sign') }); },{"./_export":39,"./_math-sign":68}],171:[function(citationRequire,module,exports){ // 20.2.2.30 Math.sinh(x) var $export = citationRequire('./_export'); var expm1 = citationRequire('./_math-expm1'); var exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * citationRequire('./_fails')(function () { return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x) { return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } }); },{"./_export":39,"./_fails":41,"./_math-expm1":65}],172:[function(citationRequire,module,exports){ // 20.2.2.33 Math.tanh(x) var $export = citationRequire('./_export'); var expm1 = citationRequire('./_math-expm1'); var exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x) { var a = expm1(x = +x); var b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } }); },{"./_export":39,"./_math-expm1":65}],173:[function(citationRequire,module,exports){ // 20.2.2.34 Math.trunc(x) var $export = citationRequire('./_export'); $export($export.S, 'Math', { trunc: function trunc(it) { return (it > 0 ? Math.floor : Math.ceil)(it); } }); },{"./_export":39}],174:[function(citationRequire,module,exports){ 'use strict'; var global = citationRequire('./_global'); var has = citationRequire('./_has'); var cof = citationRequire('./_cof'); var inheritIfcitationRequired = citationRequire('./_inherit-if-citationRequired'); var toPrimitive = citationRequire('./_to-primitive'); var fails = citationRequire('./_fails'); var gOPN = citationRequire('./_object-gopn').f; var gOPD = citationRequire('./_object-gopd').f; var dP = citationRequire('./_object-dp').f; var $trim = citationRequire('./_string-trim').trim; var NUMBER = 'Number'; var $Number = global[NUMBER]; var Base = $Number; var proto = $Number.prototype; // Opera ~12 has broken Object#toString var BROKEN_COF = cof(citationRequire('./_object-create')(proto)) == NUMBER; var TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) var toNumber = function (argument) { var it = toPrimitive(argument, false); if (typeof it == 'string' && it.length > 2) { it = TRIM ? it.trim() : $trim(it, 3); var first = it.charCodeAt(0); var third, radix, maxCode; if (first === 43 || first === 45) { third = it.charCodeAt(2); if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (it.charCodeAt(1)) { case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i default: return +it; } for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; } return parseInt(digits, radix); } } return +it; }; if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { $Number = function Number(value) { var it = arguments.length < 1 ? 0 : value; var that = this; return that instanceof $Number // check on 1..constructor(foo) case && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) ? inheritIfcitationRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); }; for (var keys = citationRequire('./_descriptors') ? gOPN(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics citationRequired before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++) { if (has(Base, key = keys[j]) && !has($Number, key)) { dP($Number, key, gOPD(Base, key)); } } $Number.prototype = proto; proto.constructor = $Number; citationRequire('./_redefine')(global, NUMBER, $Number); } },{"./_cof":25,"./_descriptors":35,"./_fails":41,"./_global":45,"./_has":46,"./_inherit-if-citationRequired":50,"./_object-create":73,"./_object-dp":74,"./_object-gopd":76,"./_object-gopn":78,"./_redefine":93,"./_string-trim":107,"./_to-primitive":116}],175:[function(citationRequire,module,exports){ // 20.1.2.1 Number.EPSILON var $export = citationRequire('./_export'); $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); },{"./_export":39}],176:[function(citationRequire,module,exports){ // 20.1.2.2 Number.isFinite(number) var $export = citationRequire('./_export'); var _isFinite = citationRequire('./_global').isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it) { return typeof it == 'number' && _isFinite(it); } }); },{"./_export":39,"./_global":45}],177:[function(citationRequire,module,exports){ // 20.1.2.3 Number.isInteger(number) var $export = citationRequire('./_export'); $export($export.S, 'Number', { isInteger: citationRequire('./_is-integer') }); },{"./_export":39,"./_is-integer":55}],178:[function(citationRequire,module,exports){ // 20.1.2.4 Number.isNaN(number) var $export = citationRequire('./_export'); $export($export.S, 'Number', { isNaN: function isNaN(number) { // eslint-disable-next-line no-self-compare return number != number; } }); },{"./_export":39}],179:[function(citationRequire,module,exports){ // 20.1.2.5 Number.isSafeInteger(number) var $export = citationRequire('./_export'); var isInteger = citationRequire('./_is-integer'); var abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number) { return isInteger(number) && abs(number) <= 0x1fffffffffffff; } }); },{"./_export":39,"./_is-integer":55}],180:[function(citationRequire,module,exports){ // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = citationRequire('./_export'); $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); },{"./_export":39}],181:[function(citationRequire,module,exports){ // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = citationRequire('./_export'); $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); },{"./_export":39}],182:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var $parseFloat = citationRequire('./_parse-float'); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); },{"./_export":39,"./_parse-float":87}],183:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var $parseInt = citationRequire('./_parse-int'); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); },{"./_export":39,"./_parse-int":88}],184:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var toInteger = citationRequire('./_to-integer'); var aNumberValue = citationRequire('./_a-number-value'); var repeat = citationRequire('./_string-repeat'); var $toFixed = 1.0.toFixed; var floor = Math.floor; var data = [0, 0, 0, 0, 0, 0]; var ERROR = 'Number.toFixed: incorrect invocation!'; var ZERO = '0'; var multiply = function (n, c) { var i = -1; var c2 = c; while (++i < 6) { c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function (n) { var i = 6; var c = 0; while (--i >= 0) { c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function () { var i = 6; var s = ''; while (--i >= 0) { if (s !== '' || i === 0 || data[i] !== 0) { var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function (x, n, acc) { return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function (x) { var n = 0; var x2 = x; while (x2 >= 4096) { n += 12; x2 /= 4096; } while (x2 >= 2) { n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128.0.toFixed(0) !== '1000000000000000128' ) || !citationRequire('./_fails')(function () { // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits) { var x = aNumberValue(this, ERROR); var f = toInteger(fractionDigits); var s = ''; var m = ZERO; var e, z, j, k; if (f < 0 || f > 20) throw RangeError(ERROR); // eslint-disable-next-line no-self-compare if (x != x) return 'NaN'; if (x <= -1e21 || x >= 1e21) return String(x); if (x < 0) { s = '-'; x = -x; } if (x > 1e-21) { e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if (e > 0) { multiply(0, z); j = f; while (j >= 7) { multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while (j >= 23) { divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if (f > 0) { k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } }); },{"./_a-number-value":12,"./_export":39,"./_fails":41,"./_string-repeat":106,"./_to-integer":112}],185:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $fails = citationRequire('./_fails'); var aNumberValue = citationRequire('./_a-number-value'); var $toPrecision = 1.0.toPrecision; $export($export.P + $export.F * ($fails(function () { // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function () { // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision) { var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } }); },{"./_a-number-value":12,"./_export":39,"./_fails":41}],186:[function(citationRequire,module,exports){ // 19.1.3.1 Object.assign(target, source) var $export = citationRequire('./_export'); $export($export.S + $export.F, 'Object', { assign: citationRequire('./_object-assign') }); },{"./_export":39,"./_object-assign":72}],187:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: citationRequire('./_object-create') }); },{"./_export":39,"./_object-create":73}],188:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !citationRequire('./_descriptors'), 'Object', { defineProperties: citationRequire('./_object-dps') }); },{"./_descriptors":35,"./_export":39,"./_object-dps":75}],189:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !citationRequire('./_descriptors'), 'Object', { defineProperty: citationRequire('./_object-dp').f }); },{"./_descriptors":35,"./_export":39,"./_object-dp":74}],190:[function(citationRequire,module,exports){ // 19.1.2.5 Object.freeze(O) var isObject = citationRequire('./_is-object'); var meta = citationRequire('./_meta').onFreeze; citationRequire('./_object-sap')('freeze', function ($freeze) { return function freeze(it) { return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; }); },{"./_is-object":56,"./_meta":69,"./_object-sap":84}],191:[function(citationRequire,module,exports){ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = citationRequire('./_to-iobject'); var $getOwnPropertyDescriptor = citationRequire('./_object-gopd').f; citationRequire('./_object-sap')('getOwnPropertyDescriptor', function () { return function getOwnPropertyDescriptor(it, key) { return $getOwnPropertyDescriptor(toIObject(it), key); }; }); },{"./_object-gopd":76,"./_object-sap":84,"./_to-iobject":113}],192:[function(citationRequire,module,exports){ // 19.1.2.7 Object.getOwnPropertyNames(O) citationRequire('./_object-sap')('getOwnPropertyNames', function () { return citationRequire('./_object-gopn-ext').f; }); },{"./_object-gopn-ext":77,"./_object-sap":84}],193:[function(citationRequire,module,exports){ // 19.1.2.9 Object.getPrototypeOf(O) var toObject = citationRequire('./_to-object'); var $getPrototypeOf = citationRequire('./_object-gpo'); citationRequire('./_object-sap')('getPrototypeOf', function () { return function getPrototypeOf(it) { return $getPrototypeOf(toObject(it)); }; }); },{"./_object-gpo":80,"./_object-sap":84,"./_to-object":115}],194:[function(citationRequire,module,exports){ // 19.1.2.11 Object.isExtensible(O) var isObject = citationRequire('./_is-object'); citationRequire('./_object-sap')('isExtensible', function ($isExtensible) { return function isExtensible(it) { return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; }); },{"./_is-object":56,"./_object-sap":84}],195:[function(citationRequire,module,exports){ // 19.1.2.12 Object.isFrozen(O) var isObject = citationRequire('./_is-object'); citationRequire('./_object-sap')('isFrozen', function ($isFrozen) { return function isFrozen(it) { return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; }); },{"./_is-object":56,"./_object-sap":84}],196:[function(citationRequire,module,exports){ // 19.1.2.13 Object.isSealed(O) var isObject = citationRequire('./_is-object'); citationRequire('./_object-sap')('isSealed', function ($isSealed) { return function isSealed(it) { return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; }); },{"./_is-object":56,"./_object-sap":84}],197:[function(citationRequire,module,exports){ // 19.1.3.10 Object.is(value1, value2) var $export = citationRequire('./_export'); $export($export.S, 'Object', { is: citationRequire('./_same-value') }); },{"./_export":39,"./_same-value":94}],198:[function(citationRequire,module,exports){ // 19.1.2.14 Object.keys(O) var toObject = citationRequire('./_to-object'); var $keys = citationRequire('./_object-keys'); citationRequire('./_object-sap')('keys', function () { return function keys(it) { return $keys(toObject(it)); }; }); },{"./_object-keys":82,"./_object-sap":84,"./_to-object":115}],199:[function(citationRequire,module,exports){ // 19.1.2.15 Object.preventExtensions(O) var isObject = citationRequire('./_is-object'); var meta = citationRequire('./_meta').onFreeze; citationRequire('./_object-sap')('preventExtensions', function ($preventExtensions) { return function preventExtensions(it) { return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; }); },{"./_is-object":56,"./_meta":69,"./_object-sap":84}],200:[function(citationRequire,module,exports){ // 19.1.2.17 Object.seal(O) var isObject = citationRequire('./_is-object'); var meta = citationRequire('./_meta').onFreeze; citationRequire('./_object-sap')('seal', function ($seal) { return function seal(it) { return $seal && isObject(it) ? $seal(meta(it)) : it; }; }); },{"./_is-object":56,"./_meta":69,"./_object-sap":84}],201:[function(citationRequire,module,exports){ // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = citationRequire('./_export'); $export($export.S, 'Object', { setPrototypeOf: citationRequire('./_set-proto').set }); },{"./_export":39,"./_set-proto":95}],202:[function(citationRequire,module,exports){ 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = citationRequire('./_classof'); var test = {}; test[citationRequire('./_wks')('toStringTag')] = 'z'; if (test + '' != '[object z]') { citationRequire('./_redefine')(Object.prototype, 'toString', function toString() { return '[object ' + classof(this) + ']'; }, true); } },{"./_classof":24,"./_redefine":93,"./_wks":125}],203:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var $parseFloat = citationRequire('./_parse-float'); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); },{"./_export":39,"./_parse-float":87}],204:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var $parseInt = citationRequire('./_parse-int'); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); },{"./_export":39,"./_parse-int":88}],205:[function(citationRequire,module,exports){ 'use strict'; var LIBRARY = citationRequire('./_library'); var global = citationRequire('./_global'); var ctx = citationRequire('./_ctx'); var classof = citationRequire('./_classof'); var $export = citationRequire('./_export'); var isObject = citationRequire('./_is-object'); var aFunction = citationRequire('./_a-function'); var anInstance = citationRequire('./_an-instance'); var forOf = citationRequire('./_for-of'); var speciesConstructor = citationRequire('./_species-constructor'); var task = citationRequire('./_task').set; var microtask = citationRequire('./_microtask')(); var newPromiseCapabilityModule = citationRequire('./_new-promise-capability'); var perform = citationRequire('./_perform'); var userAgent = citationRequire('./_user-agent'); var promiseResolve = citationRequire('./_promise-resolve'); var PROMISE = 'Promise'; var TypeError = global.TypeError; var process = global.process; var versions = process && process.versions; var v8 = versions && versions.v8 || ''; var $Promise = global[PROMISE]; var isNode = classof(process) == 'process'; var empty = function () { /* empty */ }; var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; var USE_NATIVE = !!function () { try { // correct subclassing with @@species support var promise = $Promise.resolve(1); var FakePromise = (promise.constructor = {})[citationRequire('./_wks')('species')] = function (exec) { exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // we can't detect it synchronously, so just check versions && v8.indexOf('6.6') !== 0 && userAgent.indexOf('Chrome/66') === -1; } catch (e) { /* empty */ } }(); // helpers var isThenable = function (it) { var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var notify = function (promise, isReject) { if (promise._n) return; promise._n = true; var chain = promise._c; microtask(function () { var value = promise._v; var ok = promise._s == 1; var i = 0; var run = function (reaction) { var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (promise._h == 2) onHandleUnhandled(promise); promise._h = 1; } if (handler === true) result = value; else { if (domain) domain.enter(); result = handler(value); // may throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(TypeError('Promise-chain cycle')); } else if (then = isThenable(result)) { then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch (e) { if (domain && !exited) domain.exit(); reject(e); } }; while (chain.length > i) run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if (isReject && !promise._h) onUnhandled(promise); }); }; var onUnhandled = function (promise) { task.call(global, function () { var value = promise._v; var unhandled = isUnhandled(promise); var result, handler, console; if (unhandled) { result = perform(function () { if (isNode) { process.emit('unhandledRejection', value, promise); } else if (handler = global.onunhandledrejection) { handler({ promise: promise, reason: value }); } else if ((console = global.console) && console.error) { console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if (unhandled && result.e) throw result.v; }); }; var isUnhandled = function (promise) { return promise._h !== 1 && (promise._a || promise._c).length === 0; }; var onHandleUnhandled = function (promise) { task.call(global, function () { var handler; if (isNode) { process.emit('rejectionHandled', promise); } else if (handler = global.onrejectionhandled) { handler({ promise: promise, reason: promise._v }); } }); }; var $reject = function (value) { var promise = this; if (promise._d) return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if (!promise._a) promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function (value) { var promise = this; var then; if (promise._d) return; promise._d = true; promise = promise._w || promise; // unwrap try { if (promise === value) throw TypeError("Promise can't be resolved itself"); if (then = isThenable(value)) { microtask(function () { var wrapper = { _w: promise, _d: false }; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch (e) { $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch (e) { $reject.call({ _w: promise, _d: false }, e); // wrap } }; // constructor polyfill if (!USE_NATIVE) { // 25.4.3.1 Promise(executor) $Promise = function Promise(executor) { anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch (err) { $reject.call(this, err); } }; // eslint-disable-next-line no-unused-vars Internal = function Promise(executor) { this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = citationRequire('./_redefine-all')($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected) { var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if (this._a) this._a.push(reaction); if (this._s) notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function (onRejected) { return this.then(undefined, onRejected); } }); OwnPromiseCapability = function () { var promise = new Internal(); this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; newPromiseCapabilityModule.f = newPromiseCapability = function (C) { return C === $Promise || C === Wrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); citationRequire('./_set-to-string-tag')($Promise, PROMISE); citationRequire('./_set-species')(PROMISE); Wrapper = citationRequire('./_core')[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r) { var capability = newPromiseCapability(this); var $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x) { return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); } }); $export($export.S + $export.F * !(USE_NATIVE && citationRequire('./_iter-detect')(function (iter) { $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable) { var C = this; var capability = newPromiseCapability(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var values = []; var index = 0; var remaining = 1; forOf(iterable, false, function (promise) { var $index = index++; var alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.e) reject(result.v); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable) { var C = this; var capability = newPromiseCapability(C); var reject = capability.reject; var result = perform(function () { forOf(iterable, false, function (promise) { C.resolve(promise).then(capability.resolve, reject); }); }); if (result.e) reject(result.v); return capability.promise; } }); },{"./_a-function":11,"./_an-instance":14,"./_classof":24,"./_core":29,"./_ctx":31,"./_export":39,"./_for-of":44,"./_global":45,"./_is-object":56,"./_iter-detect":61,"./_library":64,"./_microtask":70,"./_new-promise-capability":71,"./_perform":89,"./_promise-resolve":90,"./_redefine-all":92,"./_set-species":96,"./_set-to-string-tag":97,"./_species-constructor":100,"./_task":109,"./_user-agent":121,"./_wks":125}],206:[function(citationRequire,module,exports){ // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = citationRequire('./_export'); var aFunction = citationRequire('./_a-function'); var anObject = citationRequire('./_an-object'); var rApply = (citationRequire('./_global').Reflect || {}).apply; var fApply = Function.apply; // MS Edge argumentsList argument is optional $export($export.S + $export.F * !citationRequire('./_fails')(function () { rApply(function () { /* empty */ }); }), 'Reflect', { apply: function apply(target, thisArgument, argumentsList) { var T = aFunction(target); var L = anObject(argumentsList); return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); } }); },{"./_a-function":11,"./_an-object":15,"./_export":39,"./_fails":41,"./_global":45}],207:[function(citationRequire,module,exports){ // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = citationRequire('./_export'); var create = citationRequire('./_object-create'); var aFunction = citationRequire('./_a-function'); var anObject = citationRequire('./_an-object'); var isObject = citationRequire('./_is-object'); var fails = citationRequire('./_fails'); var bind = citationRequire('./_bind'); var rConstruct = (citationRequire('./_global').Reflect || {}).construct; // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function () { function F() { /* empty */ } return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); }); var ARGS_BUG = !fails(function () { rConstruct(function () { /* empty */ }); }); $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { construct: function construct(Target, args /* , newTarget */) { aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); if (Target == newTarget) { // w/o altered newTarget, optimization for 0-4 arguments switch (args.length) { case 0: return new Target(); case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args))(); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype; var instance = create(isObject(proto) ? proto : Object.prototype); var result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } }); },{"./_a-function":11,"./_an-object":15,"./_bind":23,"./_export":39,"./_fails":41,"./_global":45,"./_is-object":56,"./_object-create":73}],208:[function(citationRequire,module,exports){ // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = citationRequire('./_object-dp'); var $export = citationRequire('./_export'); var anObject = citationRequire('./_an-object'); var toPrimitive = citationRequire('./_to-primitive'); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * citationRequire('./_fails')(function () { // eslint-disable-next-line no-undef Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes) { anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch (e) { return false; } } }); },{"./_an-object":15,"./_export":39,"./_fails":41,"./_object-dp":74,"./_to-primitive":116}],209:[function(citationRequire,module,exports){ // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = citationRequire('./_export'); var gOPD = citationRequire('./_object-gopd').f; var anObject = citationRequire('./_an-object'); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey) { var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } }); },{"./_an-object":15,"./_export":39,"./_object-gopd":76}],210:[function(citationRequire,module,exports){ 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = citationRequire('./_export'); var anObject = citationRequire('./_an-object'); var Enumerate = function (iterated) { this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = []; // keys var key; for (key in iterated) keys.push(key); }; citationRequire('./_iter-create')(Enumerate, 'Object', function () { var that = this; var keys = that._k; var key; do { if (that._i >= keys.length) return { value: undefined, done: true }; } while (!((key = keys[that._i++]) in that._t)); return { value: key, done: false }; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target) { return new Enumerate(target); } }); },{"./_an-object":15,"./_export":39,"./_iter-create":59}],211:[function(citationRequire,module,exports){ // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = citationRequire('./_object-gopd'); var $export = citationRequire('./_export'); var anObject = citationRequire('./_an-object'); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { return gOPD.f(anObject(target), propertyKey); } }); },{"./_an-object":15,"./_export":39,"./_object-gopd":76}],212:[function(citationRequire,module,exports){ // 26.1.8 Reflect.getPrototypeOf(target) var $export = citationRequire('./_export'); var getProto = citationRequire('./_object-gpo'); var anObject = citationRequire('./_an-object'); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target) { return getProto(anObject(target)); } }); },{"./_an-object":15,"./_export":39,"./_object-gpo":80}],213:[function(citationRequire,module,exports){ // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = citationRequire('./_object-gopd'); var getPrototypeOf = citationRequire('./_object-gpo'); var has = citationRequire('./_has'); var $export = citationRequire('./_export'); var isObject = citationRequire('./_is-object'); var anObject = citationRequire('./_an-object'); function get(target, propertyKey /* , receiver */) { var receiver = arguments.length < 3 ? target : arguments[2]; var desc, proto; if (anObject(target) === receiver) return target[propertyKey]; if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', { get: get }); },{"./_an-object":15,"./_export":39,"./_has":46,"./_is-object":56,"./_object-gopd":76,"./_object-gpo":80}],214:[function(citationRequire,module,exports){ // 26.1.9 Reflect.has(target, propertyKey) var $export = citationRequire('./_export'); $export($export.S, 'Reflect', { has: function has(target, propertyKey) { return propertyKey in target; } }); },{"./_export":39}],215:[function(citationRequire,module,exports){ // 26.1.10 Reflect.isExtensible(target) var $export = citationRequire('./_export'); var anObject = citationRequire('./_an-object'); var $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target) { anObject(target); return $isExtensible ? $isExtensible(target) : true; } }); },{"./_an-object":15,"./_export":39}],216:[function(citationRequire,module,exports){ // 26.1.11 Reflect.ownKeys(target) var $export = citationRequire('./_export'); $export($export.S, 'Reflect', { ownKeys: citationRequire('./_own-keys') }); },{"./_export":39,"./_own-keys":86}],217:[function(citationRequire,module,exports){ // 26.1.12 Reflect.preventExtensions(target) var $export = citationRequire('./_export'); var anObject = citationRequire('./_an-object'); var $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target) { anObject(target); try { if ($preventExtensions) $preventExtensions(target); return true; } catch (e) { return false; } } }); },{"./_an-object":15,"./_export":39}],218:[function(citationRequire,module,exports){ // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = citationRequire('./_export'); var setProto = citationRequire('./_set-proto'); if (setProto) $export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto) { setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch (e) { return false; } } }); },{"./_export":39,"./_set-proto":95}],219:[function(citationRequire,module,exports){ // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = citationRequire('./_object-dp'); var gOPD = citationRequire('./_object-gopd'); var getPrototypeOf = citationRequire('./_object-gpo'); var has = citationRequire('./_has'); var $export = citationRequire('./_export'); var createDesc = citationRequire('./_property-desc'); var anObject = citationRequire('./_an-object'); var isObject = citationRequire('./_is-object'); function set(target, propertyKey, V /* , receiver */) { var receiver = arguments.length < 4 ? target : arguments[3]; var ownDesc = gOPD.f(anObject(target), propertyKey); var existingDescriptor, proto; if (!ownDesc) { if (isObject(proto = getPrototypeOf(target))) { return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if (has(ownDesc, 'value')) { if (ownDesc.writable === false || !isObject(receiver)) return false; if (existingDescriptor = gOPD.f(receiver, propertyKey)) { if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); } else dP.f(receiver, propertyKey, createDesc(0, V)); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', { set: set }); },{"./_an-object":15,"./_export":39,"./_has":46,"./_is-object":56,"./_object-dp":74,"./_object-gopd":76,"./_object-gpo":80,"./_property-desc":91}],220:[function(citationRequire,module,exports){ var global = citationRequire('./_global'); var inheritIfcitationRequired = citationRequire('./_inherit-if-citationRequired'); var dP = citationRequire('./_object-dp').f; var gOPN = citationRequire('./_object-gopn').f; var isRegExp = citationRequire('./_is-regexp'); var $flags = citationRequire('./_flags'); var $RegExp = global.RegExp; var Base = $RegExp; var proto = $RegExp.prototype; var re1 = /a/g; var re2 = /a/g; // "new" creates a new object, old webkit buggy here var CORRECT_NEW = new $RegExp(re1) !== re1; if (citationRequire('./_descriptors') && (!CORRECT_NEW || citationRequire('./_fails')(function () { re2[citationRequire('./_wks')('match')] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; }))) { $RegExp = function RegExp(p, f) { var tiRE = this instanceof $RegExp; var piRE = isRegExp(p); var fiU = f === undefined; return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfcitationRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) , tiRE ? this : proto, $RegExp); }; var proxy = function (key) { key in $RegExp || dP($RegExp, key, { configurable: true, get: function () { return Base[key]; }, set: function (it) { Base[key] = it; } }); }; for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); proto.constructor = $RegExp; $RegExp.prototype = proto; citationRequire('./_redefine')(global, 'RegExp', $RegExp); } citationRequire('./_set-species')('RegExp'); },{"./_descriptors":35,"./_fails":41,"./_flags":43,"./_global":45,"./_inherit-if-citationRequired":50,"./_is-regexp":57,"./_object-dp":74,"./_object-gopn":78,"./_redefine":93,"./_set-species":96,"./_wks":125}],221:[function(citationRequire,module,exports){ // 21.2.5.3 get RegExp.prototype.flags() if (citationRequire('./_descriptors') && /./g.flags != 'g') citationRequire('./_object-dp').f(RegExp.prototype, 'flags', { configurable: true, get: citationRequire('./_flags') }); },{"./_descriptors":35,"./_flags":43,"./_object-dp":74}],222:[function(citationRequire,module,exports){ // @@match logic citationRequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) { // 21.1.3.11 String.prototype.match(regexp) return [function match(regexp) { 'use strict'; var O = defined(this); var fn = regexp == undefined ? undefined : regexp[MATCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, $match]; }); },{"./_fix-re-wks":42}],223:[function(citationRequire,module,exports){ // @@replace logic citationRequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) { // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) return [function replace(searchValue, replaceValue) { 'use strict'; var O = defined(this); var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); }, $replace]; }); },{"./_fix-re-wks":42}],224:[function(citationRequire,module,exports){ // @@search logic citationRequire('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search) { // 21.1.3.15 String.prototype.search(regexp) return [function search(regexp) { 'use strict'; var O = defined(this); var fn = regexp == undefined ? undefined : regexp[SEARCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); }, $search]; }); },{"./_fix-re-wks":42}],225:[function(citationRequire,module,exports){ // @@split logic citationRequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) { 'use strict'; var isRegExp = citationRequire('./_is-regexp'); var _split = $split; var $push = [].push; var $SPLIT = 'split'; var LENGTH = 'length'; var LAST_INDEX = 'lastIndex'; if ( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ) { var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group // based on es5-shim implementation, need to rework it $split = function (separator, limit) { var string = String(this); if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split if (!isRegExp(separator)) return _split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var separator2, match, lastIndex, lastLength, i; // Doesn't need flags gy, but they don't hurt if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); while (match = separatorCopy.exec(string)) { // `separatorCopy.lastIndex` is not reliable cross-browser lastIndex = match.index + match[0][LENGTH]; if (lastIndex > lastLastIndex) { output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG // eslint-disable-next-line no-loop-func if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () { for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined; }); if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if (output[LENGTH] >= splitLimit) break; } if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if (lastLastIndex === string[LENGTH]) { if (lastLength || !separatorCopy.test('')) output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { $split = function (separator, limit) { return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); }; } // 21.1.3.17 String.prototype.split(separator, limit) return [function split(separator, limit) { var O = defined(this); var fn = separator == undefined ? undefined : separator[SPLIT]; return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); }, $split]; }); },{"./_fix-re-wks":42,"./_is-regexp":57}],226:[function(citationRequire,module,exports){ 'use strict'; citationRequire('./es6.regexp.flags'); var anObject = citationRequire('./_an-object'); var $flags = citationRequire('./_flags'); var DESCRIPTORS = citationRequire('./_descriptors'); var TO_STRING = 'toString'; var $toString = /./[TO_STRING]; var define = function (fn) { citationRequire('./_redefine')(RegExp.prototype, TO_STRING, fn, true); }; // 21.2.5.14 RegExp.prototype.toString() if (citationRequire('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { define(function toString() { var R = anObject(this); return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); }); // FF44- RegExp#toString has a wrong name } else if ($toString.name != TO_STRING) { define(function toString() { return $toString.call(this); }); } },{"./_an-object":15,"./_descriptors":35,"./_fails":41,"./_flags":43,"./_redefine":93,"./es6.regexp.flags":221}],227:[function(citationRequire,module,exports){ 'use strict'; var strong = citationRequire('./_collection-strong'); var validate = citationRequire('./_validate-collection'); var SET = 'Set'; // 23.2 Set Objects module.exports = citationRequire('./_collection')(SET, function (get) { return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value) { return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); } }, strong); },{"./_collection":28,"./_collection-strong":26,"./_validate-collection":122}],228:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.2 String.prototype.anchor(name) citationRequire('./_string-html')('anchor', function (createHTML) { return function anchor(name) { return createHTML(this, 'a', 'name', name); }; }); },{"./_string-html":104}],229:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.3 String.prototype.big() citationRequire('./_string-html')('big', function (createHTML) { return function big() { return createHTML(this, 'big', '', ''); }; }); },{"./_string-html":104}],230:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.4 String.prototype.blink() citationRequire('./_string-html')('blink', function (createHTML) { return function blink() { return createHTML(this, 'blink', '', ''); }; }); },{"./_string-html":104}],231:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.5 String.prototype.bold() citationRequire('./_string-html')('bold', function (createHTML) { return function bold() { return createHTML(this, 'b', '', ''); }; }); },{"./_string-html":104}],232:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $at = citationRequire('./_string-at')(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos) { return $at(this, pos); } }); },{"./_export":39,"./_string-at":102}],233:[function(citationRequire,module,exports){ // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = citationRequire('./_export'); var toLength = citationRequire('./_to-length'); var context = citationRequire('./_string-context'); var ENDS_WITH = 'endsWith'; var $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * citationRequire('./_fails-is-regexp')(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /* , endPosition = @length */) { var that = context(this, searchString, ENDS_WITH); var endPosition = arguments.length > 1 ? arguments[1] : undefined; var len = toLength(that.length); var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); var search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } }); },{"./_export":39,"./_fails-is-regexp":40,"./_string-context":103,"./_to-length":114}],234:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.6 String.prototype.fixed() citationRequire('./_string-html')('fixed', function (createHTML) { return function fixed() { return createHTML(this, 'tt', '', ''); }; }); },{"./_string-html":104}],235:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) citationRequire('./_string-html')('fontcolor', function (createHTML) { return function fontcolor(color) { return createHTML(this, 'font', 'color', color); }; }); },{"./_string-html":104}],236:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.8 String.prototype.fontsize(size) citationRequire('./_string-html')('fontsize', function (createHTML) { return function fontsize(size) { return createHTML(this, 'font', 'size', size); }; }); },{"./_string-html":104}],237:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var toAbsoluteIndex = citationRequire('./_to-absolute-index'); var fromCharCode = String.fromCharCode; var $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars var res = []; var aLen = arguments.length; var i = 0; var code; while (aLen > i) { code = +arguments[i++]; if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); },{"./_export":39,"./_to-absolute-index":110}],238:[function(citationRequire,module,exports){ // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = citationRequire('./_export'); var context = citationRequire('./_string-context'); var INCLUDES = 'includes'; $export($export.P + $export.F * citationRequire('./_fails-is-regexp')(INCLUDES), 'String', { includes: function includes(searchString /* , position = 0 */) { return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); },{"./_export":39,"./_fails-is-regexp":40,"./_string-context":103}],239:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.9 String.prototype.italics() citationRequire('./_string-html')('italics', function (createHTML) { return function italics() { return createHTML(this, 'i', '', ''); }; }); },{"./_string-html":104}],240:[function(citationRequire,module,exports){ 'use strict'; var $at = citationRequire('./_string-at')(true); // 21.1.3.27 String.prototype[@@iterator]() citationRequire('./_iter-define')(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); },{"./_iter-define":60,"./_string-at":102}],241:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.10 String.prototype.link(url) citationRequire('./_string-html')('link', function (createHTML) { return function link(url) { return createHTML(this, 'a', 'href', url); }; }); },{"./_string-html":104}],242:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var toIObject = citationRequire('./_to-iobject'); var toLength = citationRequire('./_to-length'); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite) { var tpl = toIObject(callSite.raw); var len = toLength(tpl.length); var aLen = arguments.length; var res = []; var i = 0; while (len > i) { res.push(String(tpl[i++])); if (i < aLen) res.push(String(arguments[i])); } return res.join(''); } }); },{"./_export":39,"./_to-iobject":113,"./_to-length":114}],243:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: citationRequire('./_string-repeat') }); },{"./_export":39,"./_string-repeat":106}],244:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.11 String.prototype.small() citationRequire('./_string-html')('small', function (createHTML) { return function small() { return createHTML(this, 'small', '', ''); }; }); },{"./_string-html":104}],245:[function(citationRequire,module,exports){ // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = citationRequire('./_export'); var toLength = citationRequire('./_to-length'); var context = citationRequire('./_string-context'); var STARTS_WITH = 'startsWith'; var $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * citationRequire('./_fails-is-regexp')(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /* , position = 0 */) { var that = context(this, searchString, STARTS_WITH); var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); var search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); },{"./_export":39,"./_fails-is-regexp":40,"./_string-context":103,"./_to-length":114}],246:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.12 String.prototype.strike() citationRequire('./_string-html')('strike', function (createHTML) { return function strike() { return createHTML(this, 'strike', '', ''); }; }); },{"./_string-html":104}],247:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.13 String.prototype.sub() citationRequire('./_string-html')('sub', function (createHTML) { return function sub() { return createHTML(this, 'sub', '', ''); }; }); },{"./_string-html":104}],248:[function(citationRequire,module,exports){ 'use strict'; // B.2.3.14 String.prototype.sup() citationRequire('./_string-html')('sup', function (createHTML) { return function sup() { return createHTML(this, 'sup', '', ''); }; }); },{"./_string-html":104}],249:[function(citationRequire,module,exports){ 'use strict'; // 21.1.3.25 String.prototype.trim() citationRequire('./_string-trim')('trim', function ($trim) { return function trim() { return $trim(this, 3); }; }); },{"./_string-trim":107}],250:[function(citationRequire,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var global = citationRequire('./_global'); var has = citationRequire('./_has'); var DESCRIPTORS = citationRequire('./_descriptors'); var $export = citationRequire('./_export'); var redefine = citationRequire('./_redefine'); var META = citationRequire('./_meta').KEY; var $fails = citationRequire('./_fails'); var shared = citationRequire('./_shared'); var setToStringTag = citationRequire('./_set-to-string-tag'); var uid = citationRequire('./_uid'); var wks = citationRequire('./_wks'); var wksExt = citationRequire('./_wks-ext'); var wksDefine = citationRequire('./_wks-define'); var enumKeys = citationRequire('./_enum-keys'); var isArray = citationRequire('./_is-array'); var anObject = citationRequire('./_an-object'); var isObject = citationRequire('./_is-object'); var toIObject = citationRequire('./_to-iobject'); var toPrimitive = citationRequire('./_to-primitive'); var createDesc = citationRequire('./_property-desc'); var _create = citationRequire('./_object-create'); var gOPNExt = citationRequire('./_object-gopn-ext'); var $GOPD = citationRequire('./_object-gopd'); var $DP = citationRequire('./_object-dp'); var $keys = citationRequire('./_object-keys'); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function'; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; citationRequire('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; citationRequire('./_object-pie').f = $propertyIsEnumerable; citationRequire('./_object-gops').f = $getOwnPropertySymbols; if (DESCRIPTORS && !citationRequire('./_library')) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || citationRequire('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); },{"./_an-object":15,"./_descriptors":35,"./_enum-keys":38,"./_export":39,"./_fails":41,"./_global":45,"./_has":46,"./_hide":47,"./_is-array":54,"./_is-object":56,"./_library":64,"./_meta":69,"./_object-create":73,"./_object-dp":74,"./_object-gopd":76,"./_object-gopn":78,"./_object-gopn-ext":77,"./_object-gops":79,"./_object-keys":82,"./_object-pie":83,"./_property-desc":91,"./_redefine":93,"./_set-to-string-tag":97,"./_shared":99,"./_to-iobject":113,"./_to-primitive":116,"./_uid":120,"./_wks":125,"./_wks-define":123,"./_wks-ext":124}],251:[function(citationRequire,module,exports){ 'use strict'; var $export = citationRequire('./_export'); var $typed = citationRequire('./_typed'); var buffer = citationRequire('./_typed-buffer'); var anObject = citationRequire('./_an-object'); var toAbsoluteIndex = citationRequire('./_to-absolute-index'); var toLength = citationRequire('./_to-length'); var isObject = citationRequire('./_is-object'); var ArrayBuffer = citationRequire('./_global').ArrayBuffer; var speciesConstructor = citationRequire('./_species-constructor'); var $ArrayBuffer = buffer.ArrayBuffer; var $DataView = buffer.DataView; var $isView = $typed.ABV && ArrayBuffer.isView; var $slice = $ArrayBuffer.prototype.slice; var VIEW = $typed.VIEW; var ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it) { return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * citationRequire('./_fails')(function () { return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end) { if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength; var first = toAbsoluteIndex(start, len); var fin = toAbsoluteIndex(end === undefined ? len : end, len); var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); var viewS = new $DataView(this); var viewT = new $DataView(result); var index = 0; while (first < fin) { viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); citationRequire('./_set-species')(ARRAY_BUFFER); },{"./_an-object":15,"./_export":39,"./_fails":41,"./_global":45,"./_is-object":56,"./_set-species":96,"./_species-constructor":100,"./_to-absolute-index":110,"./_to-length":114,"./_typed":119,"./_typed-buffer":118}],252:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); $export($export.G + $export.W + $export.F * !citationRequire('./_typed').ABV, { DataView: citationRequire('./_typed-buffer').DataView }); },{"./_export":39,"./_typed":119,"./_typed-buffer":118}],253:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Float32', 4, function (init) { return function Float32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],254:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Float64', 8, function (init) { return function Float64Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],255:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Int16', 2, function (init) { return function Int16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],256:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Int32', 4, function (init) { return function Int32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],257:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Int8', 1, function (init) { return function Int8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],258:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Uint16', 2, function (init) { return function Uint16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],259:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Uint32', 4, function (init) { return function Uint32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],260:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Uint8', 1, function (init) { return function Uint8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); },{"./_typed-array":117}],261:[function(citationRequire,module,exports){ citationRequire('./_typed-array')('Uint8', 1, function (init) { return function Uint8ClampedArray(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }, true); },{"./_typed-array":117}],262:[function(citationRequire,module,exports){ 'use strict'; var each = citationRequire('./_array-methods')(0); var redefine = citationRequire('./_redefine'); var meta = citationRequire('./_meta'); var assign = citationRequire('./_object-assign'); var weak = citationRequire('./_collection-weak'); var isObject = citationRequire('./_is-object'); var fails = citationRequire('./_fails'); var validate = citationRequire('./_validate-collection'); var WEAK_MAP = 'WeakMap'; var getWeak = meta.getWeak; var isExtensible = Object.isExtensible; var uncaughtFrozenStore = weak.ufstore; var tmp = {}; var InternalMap; var wrapper = function (get) { return function WeakMap() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key) { if (isObject(key)) { var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value) { return weak.def(validate(this, WEAK_MAP), key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = citationRequire('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { InternalMap = weak.getConstructor(wrapper, WEAK_MAP); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function (key) { var proto = $WeakMap.prototype; var method = proto[key]; redefine(proto, key, function (a, b) { // store frozen objects on internal weakmap shim if (isObject(a) && !isExtensible(a)) { if (!this._f) this._f = new InternalMap(); var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); } },{"./_array-methods":19,"./_collection":28,"./_collection-weak":27,"./_fails":41,"./_is-object":56,"./_meta":69,"./_object-assign":72,"./_redefine":93,"./_validate-collection":122}],263:[function(citationRequire,module,exports){ 'use strict'; var weak = citationRequire('./_collection-weak'); var validate = citationRequire('./_validate-collection'); var WEAK_SET = 'WeakSet'; // 23.4 WeakSet Objects citationRequire('./_collection')(WEAK_SET, function (get) { return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value) { return weak.def(validate(this, WEAK_SET), value, true); } }, weak, false, true); },{"./_collection":28,"./_collection-weak":27,"./_validate-collection":122}],264:[function(citationRequire,module,exports){ 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = citationRequire('./_export'); var $includes = citationRequire('./_array-includes')(true); $export($export.P, 'Array', { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); citationRequire('./_add-to-unscopables')('includes'); },{"./_add-to-unscopables":13,"./_array-includes":18,"./_export":39}],265:[function(citationRequire,module,exports){ // https://github.com/tc39/proposal-object-values-entries var $export = citationRequire('./_export'); var $entries = citationRequire('./_object-to-array')(true); $export($export.S, 'Object', { entries: function entries(it) { return $entries(it); } }); },{"./_export":39,"./_object-to-array":85}],266:[function(citationRequire,module,exports){ // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = citationRequire('./_export'); var ownKeys = citationRequire('./_own-keys'); var toIObject = citationRequire('./_to-iobject'); var gOPD = citationRequire('./_object-gopd'); var createProperty = citationRequire('./_create-property'); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { var O = toIObject(object); var getDesc = gOPD.f; var keys = ownKeys(O); var result = {}; var i = 0; var key, desc; while (keys.length > i) { desc = getDesc(O, key = keys[i++]); if (desc !== undefined) createProperty(result, key, desc); } return result; } }); },{"./_create-property":30,"./_export":39,"./_object-gopd":76,"./_own-keys":86,"./_to-iobject":113}],267:[function(citationRequire,module,exports){ // https://github.com/tc39/proposal-object-values-entries var $export = citationRequire('./_export'); var $values = citationRequire('./_object-to-array')(false); $export($export.S, 'Object', { values: function values(it) { return $values(it); } }); },{"./_export":39,"./_object-to-array":85}],268:[function(citationRequire,module,exports){ // https://github.com/tc39/proposal-promise-finally 'use strict'; var $export = citationRequire('./_export'); var core = citationRequire('./_core'); var global = citationRequire('./_global'); var speciesConstructor = citationRequire('./_species-constructor'); var promiseResolve = citationRequire('./_promise-resolve'); $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { var C = speciesConstructor(this, core.Promise || global.Promise); var isFunction = typeof onFinally == 'function'; return this.then( isFunction ? function (x) { return promiseResolve(C, onFinally()).then(function () { return x; }); } : onFinally, isFunction ? function (e) { return promiseResolve(C, onFinally()).then(function () { throw e; }); } : onFinally ); } }); },{"./_core":29,"./_export":39,"./_global":45,"./_promise-resolve":90,"./_species-constructor":100}],269:[function(citationRequire,module,exports){ 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = citationRequire('./_export'); var $pad = citationRequire('./_string-pad'); var userAgent = citationRequire('./_user-agent'); // https://github.com/zloirock/core-js/issues/280 $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { padEnd: function padEnd(maxLength /* , fillString = ' ' */) { return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } }); },{"./_export":39,"./_string-pad":105,"./_user-agent":121}],270:[function(citationRequire,module,exports){ 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = citationRequire('./_export'); var $pad = citationRequire('./_string-pad'); var userAgent = citationRequire('./_user-agent'); // https://github.com/zloirock/core-js/issues/280 $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { padStart: function padStart(maxLength /* , fillString = ' ' */) { return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } }); },{"./_export":39,"./_string-pad":105,"./_user-agent":121}],271:[function(citationRequire,module,exports){ citationRequire('./_wks-define')('asyncIterator'); },{"./_wks-define":123}],272:[function(citationRequire,module,exports){ var $iterators = citationRequire('./es6.array.iterator'); var getKeys = citationRequire('./_object-keys'); var redefine = citationRequire('./_redefine'); var global = citationRequire('./_global'); var hide = citationRequire('./_hide'); var Iterators = citationRequire('./_iterators'); var wks = citationRequire('./_wks'); var ITERATOR = wks('iterator'); var TO_STRING_TAG = wks('toStringTag'); var ArrayValues = Iterators.Array; var DOMIterables = { CSSRuleList: true, // TODO: Not spec compliant, should be false. CSSStyleDeclaration: false, CSSValueList: false, ClientRectList: false, DOMRectList: false, DOMStringList: false, DOMTokenList: true, DataTransferItemList: false, FileList: false, HTMLAllCollection: false, HTMLCollection: false, HTMLFormElement: false, HTMLSelectElement: false, MediaList: true, // TODO: Not spec compliant, should be false. MimeTypeArray: false, NamedNodeMap: false, NodeList: true, PaintRequestList: false, Plugin: false, PluginArray: false, SVGLengthList: false, SVGNumberList: false, SVGPathSegList: false, SVGPointList: false, SVGStringList: false, SVGTransformList: false, SourceBufferList: false, StyleSheetList: true, // TODO: Not spec compliant, should be false. TextTrackCueList: false, TextTrackList: false, TouchList: false }; for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { var NAME = collections[i]; var explicit = DOMIterables[NAME]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; var key; if (proto) { if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = ArrayValues; if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); } } },{"./_global":45,"./_hide":47,"./_iterators":63,"./_object-keys":82,"./_redefine":93,"./_wks":125,"./es6.array.iterator":137}],273:[function(citationRequire,module,exports){ var $export = citationRequire('./_export'); var $task = citationRequire('./_task'); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear }); },{"./_export":39,"./_task":109}],274:[function(citationRequire,module,exports){ // ie9- setTimeout & setInterval additional parameters fix var global = citationRequire('./_global'); var $export = citationRequire('./_export'); var userAgent = citationRequire('./_user-agent'); var slice = [].slice; var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check var wrap = function (set) { return function (fn, time /* , ...args */) { var boundArgs = arguments.length > 2; var args = boundArgs ? slice.call(arguments, 2) : false; return set(boundArgs ? function () { // eslint-disable-next-line no-new-func (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); } : fn, time); }; }; $export($export.G + $export.B + $export.F * MSIE, { setTimeout: wrap(global.setTimeout), setInterval: wrap(global.setInterval) }); },{"./_export":39,"./_global":45,"./_user-agent":121}],275:[function(citationRequire,module,exports){ citationRequire('../modules/web.timers'); citationRequire('../modules/web.immediate'); citationRequire('../modules/web.dom.iterable'); module.exports = citationRequire('../modules/_core'); },{"../modules/_core":29,"../modules/web.dom.iterable":272,"../modules/web.immediate":273,"../modules/web.timers":274}],276:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "parse", { enumerable: true, get: function get() { return _input.default; } }); Object.defineProperty(exports, "format", { enumerable: true, get: function get() { return _output.default; } }); citationRequire("@babel/polyfill"); var _input = _interopcitationRequireDefault(citationRequire("./input")); var _output = _interopcitationRequireDefault(citationRequire("./output")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"./input":277,"./output":278,"@babel/polyfill":1}],277:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var monthMap = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }; var getMonth = function getMonth(monthName) { return monthMap[monthName.toLowerCase().slice(0, 3)]; }; var parseEpoch = function parseEpoch(date) { var epoch = new Date(date); if (typeof date === 'number' && !isNaN(epoch.valueOf())) { return [epoch.getFullYear(), epoch.getMonth() + 1, epoch.getDate()]; } else { return null; } }; var parseIso8601 = function parseIso8601(date) { var pattern = /^(\d{4}|[-+]\d{6,})-(\d{2})-(\d{2})/; if (typeof date !== 'string' || !pattern.test(date)) { return null; } var _date$match = date.match(pattern), _date$match2 = _slicedToArray(_date$match, 4), year = _date$match2[1], month = _date$match2[2], day = _date$match2[3]; if (!+month) { return [year]; } else if (!+day) { return [year, month]; } else { return [year, month, day]; } }; var parseRfc2822 = function parseRfc2822(date) { var pattern = /^(?:[a-z]{3},\s*)?(\d{1,2}) ([a-z]{3}) (\d{4,})/i; if (typeof date !== 'string' || !pattern.test(date)) { return null; } var _date$match3 = date.match(pattern), _date$match4 = _slicedToArray(_date$match3, 4), day = _date$match4[1], month = _date$match4[2], year = _date$match4[3]; month = getMonth(month); if (!month) { return null; } return [year, month, day]; }; var parseAmericanDay = function parseAmericanDay(date) { var pattern = /^(\d{1,2})\/(\d{1,2})\/(\d{2}(?:\d{2})?)/; if (typeof date !== 'string' || !pattern.test(date)) { return null; } var _date$match5 = date.match(pattern), _date$match6 = _slicedToArray(_date$match5, 4), month = _date$match6[1], day = _date$match6[2], year = _date$match6[3]; var check = new Date(year, month, day); if (check.getMonth() === parseInt(month)) { return [year, month, day]; } else { return null; } }; var parseDay = function parseDay(date) { var pattern = /^(\d{1,2})[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](-?\d+)/i; var reversePattern = /^(-?\d+)[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](\d{1,2})/i; var year; var month; var day; if (typeof date !== 'string') { return null; } else if (pattern.test(date)) { var _date$match7 = date.match(pattern); var _date$match8 = _slicedToArray(_date$match7, 4); day = _date$match8[1]; month = _date$match8[2]; year = _date$match8[3]; } else if (reversePattern.test(date)) { var _date$match9 = date.match(reversePattern); var _date$match10 = _slicedToArray(_date$match9, 4); year = _date$match10[1]; month = _date$match10[2]; day = _date$match10[3]; } else { return null; } if (getMonth(month)) { month = getMonth(month); } else if (isNaN(month)) { return null; } return [year, month, day]; }; var parseMonth = function parseMonth(date) { var pattern = /^([a-z]{3,10}|-?\d+)[^\w-]+([a-z]{3,10}|-?\d+)$/i; if (typeof date === 'string' && pattern.test(date)) { var values = date.match(pattern).slice(1, 3); var month; if (getMonth(values[1])) { month = getMonth(values.pop()); } else if (getMonth(values[0])) { month = getMonth(values.shift()); } else if (values.some(isNaN) || values.every(function (value) { return +value < 0; })) { return null; } else if (+values[0] < 0) { month = values.pop(); } else if (+values[0] > +values[1] && +values[1] > 0) { month = values.pop(); } else { month = values.shift(); } var year = values.pop(); return [year, month]; } else { return null; } }; var parseYear = function parseYear(date) { if (typeof date === 'string' && /^-?\d+$/.test(date)) { return [date]; } else { return null; } }; var parseDate = function parseDate(value) { var dateParts = parseEpoch(value) || parseIso8601(value) || parseRfc2822(value) || parseAmericanDay(value) || parseDay(value) || parseMonth(value) || parseYear(value); if (dateParts) { dateParts = dateParts.map(function (string) { return parseInt(string); }); return { 'date-parts': [dateParts] }; } else { return { raw: value }; } }; var _default = parseDate; exports.default = _default; },{}],278:[function(citationRequire,module,exports){ "use strict"; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var getDate = function getDate(_ref) { var _ref$dateParts = _slicedToArray(_ref['date-parts'], 1), date = _ref$dateParts[0]; var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-'; var dateParts = date.map(function (part) { return part.toString(); }); switch (dateParts.length) { case 3: dateParts[2] = dateParts[2].padStart(2, '0'); case 2: dateParts[1] = dateParts[1].padStart(2, '0'); case 1: dateParts[0] = dateParts[0].padStart(4, '0'); break; } return dateParts.join(delimiter); }; var _default = getDate; exports.default = _default; },{}],279:[function(citationRequire,module,exports){ arguments[4][276][0].apply(exports,arguments) },{"./input":280,"./output":281,"@babel/polyfill":1,"dup":276}],280:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = exports.types = exports.scope = void 0; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var punctutationMatcher = function punctutationMatcher(string) { return string.replace(/$|( )|(?!^)(?=[A-Z])/g, '\\.?$1'); }; var getListMatcher = function getListMatcher(list) { return "(?:".concat(list.join('|'), ")\\b"); }; var getSplittingRegex = function getSplittingRegex(matcher, flags) { return new RegExp("(?:^| )(".concat(matcher, "$)"), flags); }; var titles = ['mr', 'mrs', 'ms', 'miss', 'dr', 'herr', 'monsieur', 'hr', 'frau', 'a v m', 'admiraal', 'admiral', 'air cdre', 'air commodore', 'air marshal', 'air vice marshal', 'alderman', 'alhaji', 'ambassador', 'baron', 'barones', 'brig', 'brig gen', 'brig general', 'brigadier', 'brigadier general', 'brother', 'canon', 'capt', 'captain', 'cardinal', 'cdr', 'chief', 'cik', 'cmdr', 'coach', 'col', 'col dr', 'colonel', 'commandant', 'commander', 'commissioner', 'commodore', 'comte', 'comtessa', 'congressman', 'conseiller', 'consul', 'conte', 'contessa', 'corporal', 'councillor', 'count', 'countess', 'crown prince', 'crown princess', 'dame', 'datin', 'dato', 'datuk', 'datuk seri', 'deacon', 'deaconess', 'dean', 'dhr', 'dipl ing', 'doctor', 'dott', 'dott sa', 'dr', 'dr ing', 'dra', 'drs', 'embajador', 'embajadora', 'en', 'encik', 'eng', 'eur ing', 'exma sra', 'exmo sr', 'f o', 'father', 'first lieutient', 'first officer', 'flt lieut', 'flying officer', 'fr', 'frau', 'fraulein', 'fru', 'gen', 'generaal', 'general', 'governor', 'graaf', 'gravin', 'group captain', 'grp capt', 'h e dr', 'h h', 'h m', 'h r h', 'hajah', 'haji', 'hajim', 'her highness', 'her majesty', 'herr', 'high chief', 'his highness', 'his holiness', 'his majesty', 'hon', 'hr', 'hra', 'ing', 'ir', 'jonkheer', 'judge', 'justice', 'khun ying', 'kolonel', 'lady', 'lcda', 'lic', 'lieut', 'lieut cdr', 'lieut col', 'lieut gen', 'lord', 'm', 'm l', 'm r', 'madame', 'mademoiselle', 'maj gen', 'major', 'master', 'mevrouw', 'miss', 'mlle', 'mme', 'monsieur', 'monsignor', 'mr', 'mrs', 'ms', 'mstr', 'nti', 'pastor', 'president', 'prince', 'princess', 'princesse', 'prinses', 'prof', 'prof dr', 'prof sir', 'professor', 'puan', 'puan sri', 'rabbi', 'rear admiral', 'rev', 'rev canon', 'rev dr', 'rev mother', 'reverend', 'rva', 'senator', 'sergeant', 'sheikh', 'sheikha', 'sig', 'sig na', 'sig ra', 'sir', 'sister', 'sqn ldr', 'sr', 'sr d', 'sra', 'srta', 'sultan', 'tan sri', 'tan sri dato', 'tengku', 'teuku', 'than puying', 'the hon dr', 'the hon justice', 'the hon miss', 'the hon mr', 'the hon mrs', 'the hon ms', 'the hon sir', 'the very rev', 'toh puan', 'tun', 'vice admiral', 'viscount', 'viscountess', 'wg cdr']; var suffixes = ['I', 'II', 'III', 'IV', 'V', 'Senior', 'Junior', 'Jr', 'Sr', 'PhD', 'Ph\\.D', 'APR', 'RPh', 'PE', 'MD', 'MA', 'DMD', 'CME', 'BVM', 'CFRE', 'CLU', 'CPA', 'CSC', 'CSJ', 'DC', 'DD', 'DDS', 'DO', 'DVM', 'EdD', 'Esq', 'JD', 'LLD', 'OD', 'OSB', 'PC', 'Ret', 'RGS', 'RN', 'RNC', 'SHCJ', 'SJ', 'SNJM', 'SSMO', 'USA', 'USAF', 'USAFR', 'USAR', 'USCG', 'USMC', 'USMCR', 'USN', 'USNR']; var particles = ['Vere', 'Von', 'Van', 'De', 'Del', 'Della', 'Di', 'Da', 'Pietro', 'Vanden', 'Du', 'St.', 'St', 'La', 'Lo', 'Ter', 'O', 'O\'', 'Mac', 'Fitz']; var titleMatcher = getListMatcher(titles.map(punctutationMatcher)); var suffixMatcher = getListMatcher(suffixes.map(punctutationMatcher)); var particleMatcher = getListMatcher(particles); var titleSplitter = new RegExp("^((?:".concat(titleMatcher, " )*)(.*)$"), 'i'); var suffixSplitter = getSplittingRegex("(?:".concat(suffixMatcher, ", )*(?:").concat(suffixMatcher, ")"), 'i'); var particleSplitter = getSplittingRegex("".concat(/(?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89])/.source, ".*")); var endSplitter = getSplittingRegex("(?:".concat(/(?:[a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43])/.source, ".*|").concat(particleMatcher, ".*|\\S*)")); var parseName = function parseName() { var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; if (typeof name !== 'string') { name = name + ''; } var start = ''; var mid = ''; var end = ''; if (/[^.], /.test(name)) { var parts = name.split(', '); end = parts.shift(); var suffixMatch = RegExp(suffixMatcher).exec(parts.join(', ')); start = parts.splice(suffixMatch && suffixMatch.index !== 0 ? 0 : -1, 1)[0]; mid = parts.join(', '); } else { var _parts = name.split(suffixSplitter, 2); var main = _parts.shift().split(endSplitter, 2); start = main[0]; end = main[1]; mid = _parts.pop(); } var _start$match = start.match(titleSplitter), _start$match2 = _slicedToArray(_start$match, 3), droppingParticle = _start$match2[1], given = _start$match2[2]; var suffix = mid; var _end$split$reverse = end.split(particleSplitter, 2).reverse(), _end$split$reverse2 = _slicedToArray(_end$split$reverse, 2), family = _end$split$reverse2[0], nonDroppingParticle = _end$split$reverse2[1]; if (!given && family) { return family.includes(' ') ? { literal: family } : { family: family }; } else if (family) { var nameObject = { 'dropping-particle': droppingParticle, given: given, suffix: suffix, 'non-dropping-particle': nonDroppingParticle, family: family }; Object.keys(nameObject).forEach(function (key) { if (!nameObject[key]) { delete nameObject[key]; } }); return nameObject; } else { return { literal: name }; } }; exports.default = exports.parse = parseName; var scope = '@name'; exports.scope = scope; var types = '@name'; exports.types = types; },{}],281:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var startParts = ['dropping-particle', 'given']; var suffixParts = ['suffix']; var endParts = ['non-dropping-particle', 'family']; var getName = function getName(name) { var reversed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var get = function get(parts) { return parts.map(function (entry) { return name[entry] || ''; }).filter(Boolean).join(' '); }; if (name.literal) { return name.literal; } else if (reversed) { var suffixPart = get(suffixParts) ? ", ".concat(get(suffixParts)) : ''; var startPart = get(startParts) ? ", ".concat(get(startParts)) : ''; return get(endParts) + suffixPart + startPart; } else { return "".concat(get(startParts.concat(suffixParts, endParts))); } }; var _default = getName; exports.default = _default; },{}],282:[function(citationRequire,module,exports){ "use strict";function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}var CSL={PROCESSOR_VERSION:"1.1.210",CONDITION_LEVEL_TOP:1,CONDITION_LEVEL_BOTTOM:2,PLAIN_HYPHEN_REGEX:/(?:[^\\]-|\u2013)/,LOCATOR_LABELS_REGEXP:new RegExp("^((art|ch|subch|col|fig|l|n|no|op|p|pp|para|subpara|pt|r|sec|subsec|sv|sch|tit|vrs|vol)\\.)\\s+(.*)"),STATUTE_SUBDIV_GROUPED_REGEX:/((?:^| )(?:art|bk|ch|subch|col|fig|fol|l|n|no|op|p|pp|para|subpara|pt|r|sec|subsec|sv|sch|tit|vrs|vol)\. *)/g,STATUTE_SUBDIV_PLAIN_REGEX:/(?:(?:^| )(?:art|bk|ch|subch|col|fig|fol|l|n|no|op|p|pp|para|subpara|pt|r|sec|subsec|sv|sch|tit|vrs|vol)\. *)/,STATUTE_SUBDIV_PLAIN_REGEX_FRONT:/(?:^\s*[.,;]*\s*(?:art|bk|ch|subch|col|fig|fol|l|n|no|op|p|pp|para|subpara|pt|r|sec|subsec|sv|sch|tit|vrs|vol)\. *)/,STATUTE_SUBDIV_STRINGS:{"art.":"article","bk.":"book","ch.":"chapter","subch.":"subchapter","p.":"page","pp.":"page","para.":"paragraph","subpara.":"subparagraph","pt.":"part","r.":"rule","sec.":"section","subsec.":"subsection","sch.":"schedule","tit.":"title","col.":"column","fig.":"figure","fol.":"folio","l.":"line","n.":"note","no.":"issue","op.":"opus","sv.":"sub-verbo","vrs.":"verse","vol.":"volume"},STATUTE_SUBDIV_STRINGS_REVERSE:{"article":"art.","book":"bk.","chapter":"ch.","subchapter":"subch.","page":"p.","paragraph":"para.","subparagraph":"subpara.","part":"pt.","rule":"r.","section":"sec.","subsection":"subsec.","schedule":"sch.","title":"tit.","column":"col.","figure":"fig.","folio":"fol.","line":"l.","note":"n.","issue":"no.","opus":"op.","sub-verbo":"sv.","sub verbo":"sv.","verse":"vrs.","volume":"vol."},LOCATOR_LABELS_MAP:{"art":"article","bk":"book","ch":"chapter","subch":"subchapter","col":"column","fig":"figure","fol":"folio","l":"line","n":"note","no":"issue","op":"opus","p":"page","pp":"page","para":"paragraph","subpara":"subparagraph","pt":"part","r":"rule","sec":"section","subsec":"subsection","sv":"sub-verbo","sch":"schedule","tit":"title","vrs":"verse","vol":"volume"},MODULE_MACROS:{"juris-pretitle":true,"juris-title":true,"juris-pretitle-short":true,"juris-title-short":true,"juris-main":true,"juris-main-short":true,"juris-tail":true,"juris-tail-short":true,"juris-locator":true},MODULE_TYPES:{"legal_case":true,"legislation":true,"bill":true,"hearing":true,"gazette":true,"report":true,"regulation":true,"standard":true},NestedBraces:[["(","["],[")","]"]],checkNestedBrace:function checkNestedBrace(state){if(state.opt.xclass==="note"){this.depth=0;this.update=function(str){var str=str?str:'';var lst=str.split(/([\(\)])/);for(var i=1,ilen=lst.length;i-1){var raw_locator=item.locator;item.locator=raw_locator.slice(0,idx);raw_locator=raw_locator.slice(idx+1);var m=raw_locator.match(/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*/);if(m){item["locator-date"]=this.fun.dateparser.parseDateToObject(m[1]);raw_locator=raw_locator.slice(m[1].length);}item["locator-extra"]=raw_locator.replace(/^\s+/,"").replace(/\s+$/,"");}}}if(item.locator){item.locator=(""+item.locator).replace(/\s+$/,'');}return item;},normalizeLocaleStr:function normalizeLocaleStr(str){if(!str)return;var lst=str.split('-');lst[0]=lst[0].toLowerCase();if(lst[1]){lst[1]=lst[1].toUpperCase();}return lst.join("-");},isDatePart:function isDatePart(str,less,more){if(str.length>less&&str.length0){if(!this.isDatePart(strLst[0],3,5)){return false;}}if(strLst.length>1){if(!this.isDatePart(strLst[1],0,3)){return false;}}if(strLst.length>2){if(!this.isDatePart(strLst[2],0,3)){return false;}}if(strLst.length>3){return false;}return true;},parseNoteFieldHacks:function parseNoteFieldHacks(Item,validFieldsForType,allowDateOverride){if("string"!==typeof Item.note)return;var elems=[];var lines=Item.note.split('\n');var lastline="";for(var i=0,ilen=lines.length;i0||j>1)&&!elems[j-1].match(CSL.NOTE_FIELD_REGEXP)){break;}else{elems[j]='\n'+elems[j].slice(2,-1).trim()+'\n';}}lines[i]=elems.join('');}}lines=lines.join('\n').split('\n');var offset=0;var names={};for(var i=0,ilen=lines.length;i-1){if(allowDateOverride){Item[key]={raw:val};if(!validFieldsForType||validFieldsForType[key]&&this.isDateString(val)){lines[i]="";}}}else if(!Item[key]){if(CSL.NAME_VARIABLES.indexOf(key)>-1){if(!names[key]){names[key]=[];}var lst=val.split(/\s*\|\|\s*/);if(lst.length===1){names[key].push({literal:lst[0]});}else if(lst.length===2){var name={family:lst[0],given:lst[1]};CSL.parseParticles(name);names[key].push(name);}}else{Item[key]=val;}if(!validFieldsForType||validFieldsForType[key]){lines[i]="";}}}for(var key in names){Item[key]=names[key];}if(validFieldsForType){if(lines[offset].trim()){lines[offset]='\n'+lines[offset];}for(var i=offset-1;i>-1;i--){if(!lines[i].trim()){lines=lines.slice(0,i).concat(lines.slice(i+1));}}}Item.note=lines.join("\n").trim();},GENDERS:["masculine","feminine"],ERROR_NO_RENDERED_FORM:1,PREVIEW:"Just for laughs.",ASSUME_ALL_ITEMS_REGISTERED:2,START:0,END:1,SINGLETON:2,SEEN:6,SUCCESSOR:3,SUCCESSOR_OF_SUCCESSOR:4,SUPPRESS:5,SINGULAR:0,PLURAL:1,LITERAL:true,BEFORE:1,AFTER:2,DESCENDING:1,ASCENDING:2,ONLY_FIRST:1,ALWAYS:2,ONLY_LAST:3,FINISH:1,POSITION_FIRST:0,POSITION_SUBSEQUENT:1,POSITION_IBID:2,POSITION_IBID_WITH_LOCATOR:3,MARK_TRAILING_NAMES:true,POSITION_TEST_VARS:["position","first-reference-note-number","near-note"],AREAS:["citation","citation_sort","bibliography","bibliography_sort"],CITE_FIELDS:["first-reference-note-number","locator","locator-extra"],MINIMAL_NAME_FIELDS:["literal","family"],SWAPPING_PUNCTUATION:[".","!","?",":",","],TERMINAL_PUNCTUATION:[":",".",";","!","?"," "],NONE:0,NUMERIC:1,POSITION:2,COLLAPSE_VALUES:["citation-number","year","year-suffix"],DATE_PARTS:["year","month","day"],DATE_PARTS_ALL:["year","month","day","season"],DATE_PARTS_INTERNAL:["year","month","day","year_end","month_end","day_end"],NAME_PARTS:["non-dropping-particle","family","given","dropping-particle","suffix","literal"],DECORABLE_NAME_PARTS:["given","family","suffix"],DISAMBIGUATE_OPTIONS:["disambiguate-add-names","disambiguate-add-givenname","disambiguate-add-year-suffix"],GIVENNAME_DISAMBIGUATION_RULES:["all-names","all-names-with-initials","primary-name","primary-name-with-initials","by-cite"],NAME_ATTRIBUTES:["and","delimiter-precedes-last","delimiter-precedes-et-al","initialize-with","initialize","name-as-sort-order","sort-separator","et-al-min","et-al-use-first","et-al-subsequent-min","et-al-subsequent-use-first","form","prefix","suffix","delimiter"],PARALLEL_MATCH_VARS:["container-title"],PARALLEL_TYPES:["bill","gazette","regulation","legislation","legal_case","treaty","article-magazine","article-journal"],PARALLEL_COLLAPSING_MID_VARSET:["volume","issue","container-title","section","collection-number"],LOOSE:0,STRICT:1,TOLERANT:2,PREFIX_PUNCTUATION:/[.;:]\s*$/,SUFFIX_PUNCTUATION:/^\s*[.;:,\(\)]/,NUMBER_REGEXP:/(?:^\d+|\d+$)/,NAME_INITIAL_REGEXP:/^([A-Z\u0e01-\u0e5b\u00c0-\u017f\u0400-\u042f\u0590-\u05d4\u05d6-\u05ff\u0600-\u06ff\u0370\u0372\u0376\u0386\u0388-\u03ab\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03fd-\u03ff])([a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0400-\u052f\u0600-\u06ff\u0370-\u03ff\u1f00-\u1fff]*|)/,ROMANESQUE_REGEXP:/[-0-9a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]/,ROMANESQUE_NOT_REGEXP:/[^a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]/g,STARTSWITH_ROMANESQUE_REGEXP:/^[&a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]/,ENDSWITH_ROMANESQUE_REGEXP:/[.;:&a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]$/,ALL_ROMANESQUE_REGEXP:/^[a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]+$/,VIETNAMESE_SPECIALS:/[\u00c0-\u00c3\u00c8-\u00ca\u00cc\u00cd\u00d2-\u00d5\u00d9\u00da\u00dd\u00e0-\u00e3\u00e8-\u00ea\u00ec\u00ed\u00f2-\u00f5\u00f9\u00fa\u00fd\u0101\u0103\u0110\u0111\u0128\u0129\u0168\u0169\u01a0\u01a1\u01af\u01b0\u1ea0-\u1ef9]/,VIETNAMESE_NAMES:/^(?:(?:[.AaBbCcDdEeGgHhIiKkLlMmNnOoPpQqRrSsTtUuVvXxYy \u00c0-\u00c3\u00c8-\u00ca\u00cc\u00cd\u00d2-\u00d5\u00d9\u00da\u00dd\u00e0-\u00e3\u00e8-\u00ea\u00ec\u00ed\u00f2-\u00f5\u00f9\u00fa\u00fd\u0101\u0103\u0110\u0111\u0128\u0129\u0168\u0169\u01a0\u01a1\u01af\u01b0\u1ea0-\u1ef9]{2,6})(\s+|$))+$/,NOTE_FIELDS_REGEXP:/\{:(?:[\-_a-z]+|[A-Z]+):[^\}]+\}/g,NOTE_FIELD_REGEXP:/^([\-_a-z]+|[A-Z]+):\s*([^\}]+)$/,PARTICLE_GIVEN_REGEXP:/^([^ ]+(?:\u02bb |\u2019 | |\' ) *)(.+)$/,PARTICLE_FAMILY_REGEXP:/^([^ ]+(?:\-|\u02bb|\u2019| |\') *)(.+)$/,DISPLAY_CLASSES:["block","left-margin","right-inline","indent"],NAME_VARIABLES:["author","collection-editor","composer","container-author","director","editor","editorial-director","illustrator","interviewer","original-author","recipient","reviewed-author","translator"],NUMERIC_VARIABLES:["call-number","chapter-number","collection-number","edition","page","issue","locator","number","number-of-pages","number-of-volumes","volume","citation-number"],DATE_VARIABLES:["locator-date","issued","event-date","accessed","container","original-date","publication-date","original-date","available-date","submitted"],TITLE_FIELD_SPLITS:function TITLE_FIELD_SPLITS(seg){var keys=["title","short","main","sub"];var ret={};for(var i=0,ilen=keys.length;i");while(open>-1&&close>-1){if(open>close){end=open+1;}else{end=close+1;}if(open");}ret[ret.length-1]+=str;return ret;},demoteNoiseWords:function demoteNoiseWords(state,fld,drop_or_demote){var SKIP_WORDS=state.locale[state.opt.lang].opts["leading-noise-words"];if(fld&&drop_or_demote){fld=fld.split(/\s+/);fld.reverse();var toEnd=[];for(var j=fld.length-1;j>-1;j+=-1){if(SKIP_WORDS.indexOf(fld[j].toLowerCase())>-1){toEnd.push(fld.pop());}else{break;}}fld.reverse();var start=fld.join(" ");var end=toEnd.join(" ");if("drop"===drop_or_demote||!end){fld=start;}else if("demote"===drop_or_demote){fld=[start,end].join(", ");}}return fld;},extractTitleAndSubtitle:function extractTitleAndSubtitle(Item){var segments=["","container-"];for(var i=0,ilen=segments.length;i-1){var callbacks=[];if(state.opt.development_extensions.thin_non_breaking_space_html_hack&&state.opt.mode==="html"){callbacks.push(function(txt){return txt.replace(/\u202f/g,'');});}if(callbacks.length){return function(txt){for(var i=0,ilen=callbacks.length;i-1;}else if(state.tmp.group_context.tip.condition.test==="comma-safe"){var empty=!termtxt;var alpha=termtxt.slice(0,1).match(CSL.ALL_ROMANESQUE_REGEXP);var num=state.tmp.just_did_number;if(empty){testres=true;}else if(num){if(alpha&&!valueTerm){testres=true;}else{testres=false;}}else{if(alpha&&!valueTerm){testres=true;}else{testres=false;}}}if(testres){state.tmp.group_context.tip.force_suppress=false;}else{state.tmp.group_context.tip.force_suppress=true;}if(state.tmp.group_context.tip.condition.not){state.tmp.group_context.tip.force_suppress=!state.tmp.group_context.tip.force_suppress;}}}else{if(termtxt.slice(-1).match(/[0-9]/)){state.tmp.just_did_number=true;}else{state.tmp.just_did_number=false;}}},locale:{},locale_opts:{},locale_dates:{}};if(typeof citationRequire!=="undefined"&&typeof module!=='undefined'&&"exports"in module){var CSL_IS_NODEJS=true;exports.CSL=CSL;}CSL.TERMINAL_PUNCTUATION_REGEXP=new RegExp("^(["+CSL.TERMINAL_PUNCTUATION.slice(0,-1).join("")+"])(.*)");CSL.CLOSURES=new RegExp(".*[\\]\\)]");module.exports=CSL;if("undefined"===typeof console){CSL.debug=function(str){dump("CSL: "+str+"\n");};CSL.error=function(str){dump("CSL error: "+str+"\n");};}else{CSL.debug=function(str){console.log("CSL: "+str);};CSL.error=function(str){console.log("CSL error: "+str);};}module.exports=CSL;CSL.XmlJSON=function(dataObj){this.dataObj=dataObj;this.institution={name:"institution",attrs:{"institution-parts":"long","delimiter":", ","substitute-use-first":"1","use-last":"1"},children:[{name:"institution-part",attrs:{name:"long"},children:[]}]};};CSL.XmlJSON.prototype.clean=function(json){return json;};CSL.XmlJSON.prototype.getStyleId=function(myjson,styleName){var tagName='id';if(styleName){tagName='title';}var ret="";var children=myjson.children;for(var i=0,ilen=children.length;i-1&&!myjson.children[i].attrs.prefix&&!myjson.children[i].attrs.suffix){mustHaves=mustHaves.slice(0,haveVarname).concat(mustHaves.slice(haveVarname+1));}else{useme=false;break;}}if(useme&&!mustHaves.length){myjson.attrs["has-publisher-and-publisher-place"]=true;}}for(var i=0,ilen=myjson.children.length;i0){var myparents=parents.slice();var parent=myparents.pop();if(parent==="substitute"){return true;}else{return this.isChildOfSubstitute(myparents);}}return false;};CSL.XmlJSON.prototype.addMissingNameNodes=function(myjson,parents){if(!parents){parents=[];}if(myjson.name==="names"){if(!this.isChildOfSubstitute(parents)){var addName=true;for(var i=0,ilen=myjson.children.length;i-1){var institution=this.nodeCopy(this.institution);for(var i=0,ilen=CSL.INSTITUTION_KEYS.length;i/,"");xml=xml.replace(//g,"");xml=xml.replace(/^\s+/g,"");xml=xml.replace(/\s+$/g,"");return xml;};CSL.parseXml=function(str){var _pos=0;var _obj={children:[]};var _stack=[_obj.children];function _listifyString(str){str=str.split(/(?:\r\n|\n|\r)/).join(" ").replace(/>[ ]+<").replace(/<\!--.*?-->/g,"");var lst=str.split("><");var stylePos=null;for(var i=0,ilen=lst.length;i0){lst[i]="<"+lst[i];}if(i";}if("number"!=typeof stylePos){if(lst[i].slice(0,7)==="", "vancouver": "", "harvard1": "" } },{}],348:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.templates = exports.default = void 0; var _register = _interopcitationRequireDefault(citationRequire("../../../util/register")); var _styles = _interopcitationRequireDefault(citationRequire("./styles.json")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var templates = new _register.default(_styles.default); exports.templates = templates; var fetchStyle = function fetchStyle(style) { if (templates.has(style)) { return templates.get(style); } else { return templates.get('apa'); } }; var _default = fetchStyle; exports.default = _default; },{"../../../util/register":405,"./styles.json":347}],349:[function(citationRequire,module,exports){ "use strict"; var _plugins = citationRequire("../../plugins/"); var modules = _interopcitationRequireWildcard(citationRequire("./modules")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } for (var name in modules) { var _module = modules[name]; (0, _plugins.add)(name, { output: _module }); } },{"../../plugins/":399,"./modules":352}],350:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.getJsonWrapper = void 0; var _deepCopy = _interopcitationRequireDefault(citationRequire("../../util/deepCopy.js")); var _dict = citationRequire("../dict"); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var appendCommas = function appendCommas(string, index, array) { return string + (index < array.length - 1 ? ',' : ''); }; var getJsonObject = function getJsonObject(src, dict) { var isArray = Array.isArray(src); var entries; if (isArray) { entries = src.map(function (entry) { return getJsonValue(entry, dict); }); } else { entries = Object.entries(src).map(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), prop = _ref2[0], value = _ref2[1]; return "\"".concat(prop, "\": ").concat(getJsonValue(value, dict)); }); } entries = entries.map(appendCommas).map(function (entry) { return dict.listItem.join(entry); }); entries = dict.list.join(entries.join('')); return isArray ? "[".concat(entries, "]") : "{".concat(entries, "}"); }; var getJsonValue = function getJsonValue(src, dict) { if (_typeof(src) === 'object' && src !== null) { if (src.length === 0) { return '[]'; } else if (Object.keys(src).length === 0) { return '{}'; } else { return getJsonObject(src, dict); } } else { return JSON.stringify(src) + ''; } }; var getJson = function getJson(src, dict) { var entries = src.map(function (entry) { return getJsonObject(entry, dict); }); entries = entries.map(appendCommas).map(function (entry) { return dict.entry.join(entry); }); entries = entries.join(''); return dict.bibliographyContainer.join("[".concat(entries, "]")); }; var getJsonWrapper = function getJsonWrapper(src) { return getJson(src, (0, _dict.get)('html')); }; exports.getJsonWrapper = getJsonWrapper; var _default = { data: function data(_data) { var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, type = _ref3.type, _ref3$format = _ref3.format, format = _ref3$format === void 0 ? type || 'text' : _ref3$format; if (format === 'object') { return (0, _deepCopy.default)(_data); } else if (format === 'text') { return JSON.stringify(_data, null, 2); } else { logger.warn('[get]', 'This feature (JSON output with special formatting) is unstable. See https://github.com/larsgw/citation.js/issues/144'); return (0, _dict.has)(format) ? getJson(_data, (0, _dict.get)(format)) : ''; } } }; exports.default = _default; },{"../../util/deepCopy.js":400,"../dict":331}],351:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.getLabel = void 0; var _label = _interopcitationRequireDefault(citationRequire("./bibtex/label")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var getLabel = _label.default; exports.getLabel = getLabel; var _default = { label: function label(data) { return data.reduce(function (object, entry) { object[entry.id] = getLabel(entry); return object; }, {}); } }; exports.default = _default; },{"./bibtex/label":336}],352:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "bibtex", { enumerable: true, get: function get() { return _bibtex.default; } }); Object.defineProperty(exports, "data", { enumerable: true, get: function get() { return _json.default; } }); Object.defineProperty(exports, "label", { enumerable: true, get: function get() { return _label.default; } }); Object.defineProperty(exports, "ris", { enumerable: true, get: function get() { return _ris.default; } }); citationRequire("./csl/"); var _bibtex = _interopcitationRequireDefault(citationRequire("./bibtex/")); var _json = _interopcitationRequireDefault(citationRequire("./json")); var _label = _interopcitationRequireDefault(citationRequire("./label")); var _ris = _interopcitationRequireDefault(citationRequire("./ris/")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"./bibtex/":334,"./csl/":344,"./json":350,"./label":351,"./ris/":353}],353:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _name = _interopcitationRequireDefault(citationRequire("../../name")); var _date = _interopcitationRequireDefault(citationRequire("../../date")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var typeMap = { graphic: 'ART', bill: 'BILL', 'post-webblog': 'BLOG', book: 'BOOK', 'review-book': 'BOOK', legal_case: 'CASE', chapter: 'CHAP', 'paper-conference': 'CONF', dataset: 'DATA', 'entry-dictionary': 'DICT', 'entry-encyclopedia': 'ENCYC', figure: 'FIGURE', interview: 'GEN', treaty: 'GEN', post: 'ICOMM', article: 'JOUR', 'article-journal': 'JOUR', review: 'JOUR', legislation: 'LEGAL', manuscript: 'MANSCPT', map: 'MAP', 'article-magazine': 'MGZN', broadcast: 'MPCT', motion_picture: 'MPCT', musical_score: 'MUSIC', 'article-newspaper': 'NEWS', pamphlet: 'PAMP', patent: 'PAT', personal_communication: 'PCOMM', report: 'RPRT', song: 'SOUND', speech: 'SOUND', thesis: 'THES' }; var name = function name(names) { return names.map(function (name) { return (0, _name.default)(name, true); }); }; var fieldMap = { TY: { fieldName: 'type', convert: function convert(type) { return typeMap[type] || 'GEN'; } }, AU: [{ type: ['review', 'review-book'], fieldName: 'reviewed-author', convert: name }, { type: '__default', fieldName: 'author', convert: name }], DA: { fieldName: 'issued', convert: function convert(date) { return (0, _date.default)(date, '/'); } }, PY: { fieldName: 'issued', convert: function convert(date) { return date['date-parts'][0][0]; } }, Y2: { fieldName: 'accessed', convert: function convert(date) { return (0, _date.default)(date, '/'); } }, AB: 'abstract', CN: 'call-number', CY: ['event-place', 'publisher-place'], DO: 'DOI', ET: [{ type: 'book', fieldName: ['version', 'edition'] }], IS: [{ type: '__default', fieldName: 'issue' }], J2: ['journalAbbreviation'], LA: 'language', LB: 'citation-label', M1: 'number', M3: ['genre', 'medium'], N1: 'note', RI: 'reviewed-title', SE: 'section', SN: [{ type: '__default', fieldName: ['ISBN', 'ISSN'] }, { type: ['patent', 'report'], fieldName: 'number' }], SP: { fieldName: ['first-page', 'page'] }, T2: ['container-title', 'collection-title'], T3: { fieldName: ['container-title', 'collection-title'], keepAll: true, convert: function convert(con, col) { return con ? col : undefined; } }, TI: ['original-title', 'title'], TT: { fieldName: ['original-title', 'title'], keepAll: true, convert: function convert(origTitle, title) { return origTitle ? title : undefined; } }, UR: 'URL', VL: 'volume', A2: { fieldName: 'editor', convert: name }, C1: [{ type: 'chapter', fieldName: 'section' }, { type: 'paper-conference', fieldName: 'publisher-place' }, { type: 'map', fieldName: 'scale' }, { type: 'musical_score', fieldName: 'medium' }], C2: [{ type: ['article-journal', 'article'], fieldName: 'PMCID' }, { type: 'paper-conference', fieldName: 'issued', convert: function convert(date) { return date['date-parts'][0][0]; } }, { type: 'article-newspaper', fieldName: 'issue' }], C3: [{ type: ['graphic', 'speech', 'sound', 'map'], fieldName: 'dimensions' }, { type: 'paper-conference', fieldName: 'container-title' }], C4: [{ type: ['review', 'review-book'], fieldName: 'author', convert: name }, { type: ['motion_picture', 'broadcast'], fieldName: 'genre' }], C5: [{ type: ['graphic', 'speech', 'sound', 'motion_picture', 'broadcast'], fieldName: 'medium' }], C6: [{ type: 'report', fieldName: 'issue' }, { type: 'patent', fieldName: 'status' }], C7: [{ type: ['article-journal', 'article'], fieldName: 'number' }], BT: [{ type: 'chapter', fieldName: 'container-title' }], DB: 'archive', DP: 'source', ED: { fieldName: 'editor', convert: name }, ID: 'id', NV: 'number-of-volumes', OP: 'references', PP: 'publiser-place', ST: ['short-title', 'titleShort'] }; var parseFieldInfo = function parseFieldInfo(fieldInfo, field, entry) { if (typeof fieldInfo === 'string') { return { sourceFields: [fieldInfo] }; } else if (Array.isArray(fieldInfo) && typeof fieldInfo[0] === 'string') { return { sourceFields: fieldInfo }; } else if (Array.isArray(fieldInfo) && _typeof(fieldInfo[0]) === 'object') { var specificInfo; var genericInfo; fieldInfo.forEach(function (infoPart) { if (typeof infoPart.type === 'string' && infoPart.type === entry.type || Array.isArray(infoPart.type) && infoPart.type.includes(entry.type)) { specificInfo = infoPart; } else if (infoPart.type === '__default') { genericInfo = infoPart; } }); var combinedInfo = specificInfo || genericInfo; if (!combinedInfo) { return {}; } return parseFieldInfo(combinedInfo.convert ? combinedInfo : combinedInfo.fieldName, field, entry); } else if (_typeof(fieldInfo) === 'object' && fieldInfo !== null) { return { sourceFields: [].concat(fieldInfo.fieldName), workOnEmptyInput: fieldInfo.fieldName === undefined, convert: fieldInfo.convert, keepAll: fieldInfo.keepAll === true }; } }; var json = function json(entry) { var target = {}; for (var field in fieldMap) { var _parseFieldInfo = parseFieldInfo(fieldMap[field], field, entry), _parseFieldInfo$sourc = _parseFieldInfo.sourceFields, sourceFields = _parseFieldInfo$sourc === void 0 ? [] : _parseFieldInfo$sourc, _parseFieldInfo$workO = _parseFieldInfo.workOnEmptyInput, workOnEmptyInput = _parseFieldInfo$workO === void 0 ? false : _parseFieldInfo$workO, _parseFieldInfo$conve = _parseFieldInfo.convert, convert = _parseFieldInfo$conve === void 0 ? false : _parseFieldInfo$conve, _parseFieldInfo$keepA = _parseFieldInfo.keepAll, keepAll = _parseFieldInfo$keepA === void 0 ? false : _parseFieldInfo$keepA; if (!keepAll) { sourceFields = sourceFields.filter(entry.hasOwnProperty.bind(entry)); } if (!workOnEmptyInput && sourceFields.length === 0) { continue; } var value = sourceFields.map(function (sourceField) { return entry[sourceField]; }); if (typeof convert === 'function') { value = convert.call.apply(convert, [entry].concat(_toConsumableArray(value))); if (value !== undefined) { target[field] = value; } } else { target[field] = value[0]; } } return target; }; var getRisLine = function getRisLine(prop) { var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; return "".concat(prop, " - ").concat(value, "\n"); }; var getRisField = function getRisField(_ref) { var _ref2 = _slicedToArray(_ref, 2), prop = _ref2[0], value = _ref2[1]; if (Array.isArray(value)) { return value.map(function (valuePart) { return getRisLine(prop, valuePart); }).join(''); } else { return getRisLine(prop, value); } }; var getRisPropList = function getRisPropList(entry) { var props = Object.entries(entry); if (props[0][0] !== 'TY') { var typeTagIndex = props.findIndex(function (_ref3) { var _ref4 = _slicedToArray(_ref3, 1), prop = _ref4[0]; return prop === 'TY'; }); var _props$splice = props.splice(typeTagIndex, 1), _props$splice2 = _slicedToArray(_props$splice, 1), typeTag = _props$splice2[0]; props.unshift(typeTag); } props.push(['ER']); return props.map(getRisField).join(''); }; var getRis = function getRis(entries) { return entries.map(json).map(getRisPropList).join(''); }; var _default = { ris: function ris(data) { var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, type = _ref5.type, _ref5$format = _ref5.format, format = _ref5$format === void 0 ? type || 'text' : _ref5$format; if (format === 'object') { return data.map(json); } else { return getRis(data); } } }; exports.default = _default; },{"../../date":330,"../../name":354}],354:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _name = citationRequire("@citation-js/name"); var _default = _name.format; exports.default = _default; },{"@citation-js/name":279}],355:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.format = exports.list = exports.has = exports.remove = exports.add = exports.register = void 0; var _register = _interopcitationRequireDefault(citationRequire("../util/register")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var validate = function validate(name, formatter) { if (typeof name !== 'string') { throw new TypeError("Invalid output format name, expected string, got ".concat(_typeof(name))); } else if (typeof formatter !== 'function') { throw new TypeError("Invalid formatter, expected function, got ".concat(_typeof(formatter))); } }; var register = new _register.default(); exports.register = register; var add = function add(name, formatter) { validate(name, formatter); register.set(name, formatter); }; exports.add = add; var remove = function remove(name) { register.remove(name); }; exports.remove = remove; var has = function has(name) { return register.has(name); }; exports.has = has; var list = function list() { return register.list(); }; exports.list = list; var format = function format(name, data) { if (!register.has(name)) { logger.error('[get]', "Output plugin \"".concat(name, "\" unavailable")); return undefined; } for (var _len = arguments.length, options = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { options[_key - 2] = arguments[_key]; } return register.get(name).apply(void 0, [data].concat(options)); }; exports.format = format; },{"../util/register":405}],356:[function(citationRequire,module,exports){ (function (process,global){ "use strict"; if (process.env.TEST_MOCHA === 'true') { global.logger = { error: function error() {}, warn: function warn() {}, info: function info() {} }; } else if (typeof console.Console === 'function') { global.logger = new console.Console(process.stderr); } else { global.logger = console; } }).call(this,citationRequire('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"_process":286}],357:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _name = _interopcitationRequireDefault(citationRequire("./name")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var NAME = 1; var NAME_LIST = 2; var DATE = 3; var fieldTypes = { author: NAME_LIST, 'collection-editor': NAME_LIST, composer: NAME_LIST, 'container-author': NAME_LIST, editor: NAME_LIST, 'editorial-director': NAME_LIST, director: NAME_LIST, interviewer: NAME_LIST, illustrator: NAME_LIST, 'original-author': NAME_LIST, 'reviewed-author': NAME_LIST, recipient: NAME_LIST, translator: NAME_LIST, accessed: DATE, container: DATE, 'event-date': DATE, issued: DATE, 'original-date': DATE, submitted: DATE, categories: 'object', id: ['string', 'number'], type: 'string', language: 'string', journalAbbreviation: 'string', shortTitle: 'string', abstract: 'string', annote: 'string', archive: 'string', archive_location: 'string', 'archive-place': 'string', authority: 'string', 'call-number': 'string', 'chapter-number': 'string', 'citation-number': 'string', 'citation-label': 'string', 'collection-number': 'string', 'collection-title': 'string', 'container-title': 'string', 'container-title-short': 'string', dimensions: 'string', DOI: 'string', edition: ['string', 'number'], event: 'string', 'event-place': 'string', 'first-reference-note-number': 'string', genre: 'string', ISBN: 'string', ISSN: 'string', issue: ['string', 'number'], jurisdiction: 'string', keyword: 'string', locator: 'string', medium: 'string', note: 'string', number: ['string', 'number'], 'number-of-pages': 'string', 'number-of-volumes': ['string', 'number'], 'original-publisher': 'string', 'original-publisher-place': 'string', 'original-title': 'string', page: 'string', 'page-first': 'string', PMCID: 'string', PMID: 'string', publisher: 'string', 'publisher-place': 'string', references: 'string', 'reviewed-title': 'string', scale: 'string', section: 'string', source: 'string', status: 'string', title: 'string', 'title-short': 'string', URL: 'string', version: 'string', volume: ['string', 'number'], 'year-suffix': 'string' }; var correctName = function correctName(name) { var bestGuessConversions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (_typeof(name) === 'object' && (name.literal || name.given || name.family)) { return name; } else if (!bestGuessConversions) { return undefined; } else if (typeof name === 'string') { return (0, _name.default)(name); } }; var correctNameList = function correctNameList(nameList) { var bestGuessConversions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (nameList instanceof Array) { return nameList.map(function (name) { return correctName(name, bestGuessConversions); }).filter(Boolean) || undefined; } }; var correctDate = function correctDate(date) { var bestGuessConversions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var dp = 'date-parts'; if (date && date[dp] instanceof Array && date[dp].every(function (part) { return part instanceof Array; })) { if (date[dp].every(function (part) { return part.every(function (datePart) { return typeof datePart === 'number'; }); })) { return _defineProperty({}, dp, date[dp].map(function (part) { return part.slice(); })); } else if (!bestGuessConversions) { return undefined; } else if (date[dp].some(function (part) { return part.some(function (datePart) { return typeof datePart === 'string'; }); })) { return _defineProperty({}, dp, date[dp].map(function (part) { return part.map(parseFloat); })); } } else if (date && date instanceof Array && date[0][dp] instanceof Array) { if (date[0][dp].every(function (datePart) { return typeof datePart === 'number'; })) { return _defineProperty({}, dp, [date[0][dp].slice()]); } else if (!bestGuessConversions) { return undefined; } else if (date[0][dp].every(function (datePart) { return typeof datePart === 'string'; })) { return _defineProperty({}, dp, [date[0][dp].map(parseFloat)]); } } }; var correctField = function correctField(fieldName, value) { var bestGuessConversions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; var fieldType = [].concat(fieldTypes[fieldName]); switch (fieldTypes[fieldName]) { case NAME: return correctName(value, bestGuessConversions); case NAME_LIST: return correctNameList(value, bestGuessConversions); case DATE: return correctDate(value, bestGuessConversions); } if (fieldType.includes(_typeof(value))) { return value; } else if (/^_/.test(value)) { return value; } else if (!bestGuessConversions) { return undefined; } else if (typeof value === 'string' && fieldType.includes('number') && parseFloat(value)) { return parseFloat(value); } else if (typeof value === 'number' && fieldType.includes('string') && !fieldType.includes('number')) { return value.toString(); } else if (Array.isArray(value) && value.length) { return correctField(fieldName, value[0]); } }; var parseCsl = function parseCsl(data) { return data.map(function (entry) { var clean = {}; for (var field in entry) { var correction = correctField(field, entry[field]); if (correction !== undefined) { clean[field] = correction; } } return clean; }); }; var _default = parseCsl; exports.default = _default; },{"./name":397}],358:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "parse", { enumerable: true, get: function get() { return _date.parse; } }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _date.parse; } }); exports.types = exports.scope = void 0; var _date = citationRequire("@citation-js/date"); var scope = '@date'; exports.scope = scope; var types = '@date'; exports.types = types; },{"@citation-js/date":276}],359:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { wikidata: true, bibtex: true, bibtxt: true, bibjson: true, doi: true, input: true, json: true, date: true, name: true, csl: true }; Object.defineProperty(exports, "json", { enumerable: true, get: function get() { return _json.parse; } }); Object.defineProperty(exports, "date", { enumerable: true, get: function get() { return _date.default; } }); Object.defineProperty(exports, "name", { enumerable: true, get: function get() { return _name.default; } }); Object.defineProperty(exports, "csl", { enumerable: true, get: function get() { return _csl.default; } }); exports.input = exports.doi = exports.bibjson = exports.bibtxt = exports.bibtex = exports.wikidata = void 0; citationRequire("./modules/"); var _chain = citationRequire("./interface/chain"); var _data = citationRequire("./interface/data"); var _type = citationRequire("./interface/type"); var _bibjson = citationRequire("./modules/bibjson/"); var _bibtex = citationRequire("./modules/bibtex/"); var _doi = citationRequire("./modules/doi/"); var _wikidata = citationRequire("./modules/wikidata/"); var _json = citationRequire("./modules/other/json"); var _date = _interopcitationRequireDefault(citationRequire("./date")); var _name = _interopcitationRequireDefault(citationRequire("./name")); var _csl = _interopcitationRequireDefault(citationRequire("./csl")); var _interface = citationRequire("./interface/"); Object.keys(_interface).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _interface[key]; } }); }); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var wikidata = { list: _wikidata.parsers.list.parse, json: _wikidata.parsers.json.parse, prop: _wikidata.parsers.prop.parse, type: _wikidata.parsers.type.parse, async: { json: _wikidata.parsers.json.parseAsync, prop: _wikidata.parsers.prop.parseAsync } }; exports.wikidata = wikidata; var bibtex = { json: _bibtex.parsers.json.parse, text: _bibtex.parsers.text.parse, prop: _bibtex.parsers.prop.parse, type: _bibtex.parsers.type.parse }; exports.bibtex = bibtex; var bibtxt = { text: _bibtex.parsers.bibtxt.text, textEntry: _bibtex.parsers.bibtxt.textEntry }; exports.bibtxt = bibtxt; var bibjson = _bibjson.parsers.json.parse; exports.bibjson = bibjson; var doi = { id: _doi.parsers.id.parse, api: _doi.parsers.api.parse, async: { api: _doi.parsers.api.parseAsync } }; exports.doi = doi; var input = { chain: _chain.chain, chainAsync: _chain.chainAsync, chainLink: _chain.chainLink, chainLinkAsync: _chain.chainLinkAsync, data: _data.data, dataAsync: _data.dataAsync, type: _type.type, async: { chain: _chain.chainAsync, chainLink: _chain.chainLinkAsync, data: _data.dataAsync } }; exports.input = input; },{"./csl":357,"./date":358,"./interface/":364,"./interface/chain":360,"./interface/data":361,"./interface/type":367,"./modules/":382,"./modules/bibjson/":368,"./modules/bibtex/":371,"./modules/doi/":379,"./modules/other/json":388,"./modules/wikidata/":391,"./name":397}],360:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.chainLinkAsync = exports.chainAsync = exports.chainLink = exports.chain = void 0; var _deepCopy = _interopcitationRequireDefault(citationRequire("../../util/deepCopy")); var _type = citationRequire("./type"); var _data = citationRequire("./data"); var _graph = citationRequire("./graph"); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var chain = function chain(input) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var _options$maxChainLeng = options.maxChainLength, maxChainLength = _options$maxChainLeng === void 0 ? 10 : _options$maxChainLeng, _options$generateGrap = options.generateGraph, generateGraph = _options$generateGrap === void 0 ? true : _options$generateGrap, forceType = options.forceType; var type = forceType || (0, _type.type)(input); var output = type.match(/object$/) ? (0, _deepCopy.default)(input) : input; var graph = [{ type: type, data: input }]; while (type !== '@csl/list+object') { if (maxChainLength-- <= 0) { logger.error('[set]', 'Max. number of parsing iterations reached'); return []; } output = (0, _data.data)(output, type); type = (0, _type.type)(output); graph.push({ type: type }); } return output.map(generateGraph ? function (entry) { return (0, _graph.applyGraph)(entry, graph); } : _graph.removeGraph); }; exports.chain = chain; var chainLink = function chainLink(input) { var type = (0, _type.type)(input); var output = type.match(/array|object/) ? (0, _deepCopy.default)(input) : input; return (0, _data.data)(output, type); }; exports.chainLink = chainLink; var chainAsync = function () { var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(input) { var options, _options$maxChainLeng2, maxChainLength, _options$generateGrap2, generateGraph, forceType, type, output, graph, _args = arguments; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; _options$maxChainLeng2 = options.maxChainLength, maxChainLength = _options$maxChainLeng2 === void 0 ? 10 : _options$maxChainLeng2, _options$generateGrap2 = options.generateGraph, generateGraph = _options$generateGrap2 === void 0 ? true : _options$generateGrap2, forceType = options.forceType; type = forceType || (0, _type.type)(input); output = type.match(/array|object/) ? (0, _deepCopy.default)(input) : input; graph = [{ type: type, data: input }]; case 5: if (!(type !== '@csl/list+object')) { _context.next = 16; break; } if (!(maxChainLength-- <= 0)) { _context.next = 9; break; } logger.error('[set]', 'Max. number of parsing iterations reached'); return _context.abrupt("return", []); case 9: _context.next = 11; return (0, _data.dataAsync)(output, type); case 11: output = _context.sent; type = (0, _type.type)(output); graph.push({ type: type }); _context.next = 5; break; case 16: return _context.abrupt("return", output.map(generateGraph ? function (entry) { return (0, _graph.applyGraph)(entry, graph); } : _graph.removeGraph)); case 17: case "end": return _context.stop(); } } }, _callee, this); })); return function chainAsync(_x) { return _ref.apply(this, arguments); }; }(); exports.chainAsync = chainAsync; var chainLinkAsync = function () { var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(input) { var type, output; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: type = (0, _type.type)(input); output = type.match(/array|object/) ? (0, _deepCopy.default)(input) : input; return _context2.abrupt("return", (0, _data.dataAsync)(output, type)); case 3: case "end": return _context2.stop(); } } }, _callee2, this); })); return function chainLinkAsync(_x2) { return _ref2.apply(this, arguments); }; }(); exports.chainLinkAsync = chainLinkAsync; },{"../../util/deepCopy":400,"./data":361,"./graph":363,"./type":367}],361:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.listDataParser = exports.removeDataParser = exports.hasDataParser = exports.addDataParser = exports.dataAsync = exports.data = void 0; var _chain = citationRequire("./chain"); function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } var flatten = function flatten(array) { var _ref; return (_ref = []).concat.apply(_ref, _toConsumableArray(array)); }; var parsers = {}; var asyncParsers = {}; var nativeParsers = { '@csl/object': function cslObject(input) { return [input]; }, '@csl/list+object': function cslListObject(input) { return input; }, '@else/list+object': function elseListObject(input) { return flatten(input.map(_chain.chain)); }, '@invalid': function invalid() { return []; } }; var nativeAsyncParsers = { '@else/list+object': function () { var _elseListObject = _asyncToGenerator(regeneratorRuntime.mark(function _callee(input) { return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.t0 = flatten; _context.next = 3; return Promise.all(input.map(_chain.chainAsync)); case 3: _context.t1 = _context.sent; return _context.abrupt("return", (0, _context.t0)(_context.t1)); case 5: case "end": return _context.stop(); } } }, _callee, this); })); return function elseListObject(_x) { return _elseListObject.apply(this, arguments); }; }() }; var data = function data(input, type) { if (parsers.hasOwnProperty(type)) { return parsers[type](input); } else if (nativeParsers.hasOwnProperty(type)) { return nativeParsers[type](input); } else { logger.error('[set]', "No synchronous parser found for ".concat(type)); return null; } }; exports.data = data; var dataAsync = function () { var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(input, type) { return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: if (!asyncParsers.hasOwnProperty(type)) { _context2.next = 4; break; } return _context2.abrupt("return", asyncParsers[type](input)); case 4: if (!nativeAsyncParsers.hasOwnProperty(type)) { _context2.next = 8; break; } return _context2.abrupt("return", nativeAsyncParsers[type](input)); case 8: if (!hasDataParser(type, false)) { _context2.next = 12; break; } return _context2.abrupt("return", data(input, type)); case 12: logger.error('[set]', "No parser found for ".concat(type)); return _context2.abrupt("return", null); case 14: case "end": return _context2.stop(); } } }, _callee2, this); })); return function dataAsync(_x2, _x3) { return _ref2.apply(this, arguments); }; }(); exports.dataAsync = dataAsync; var addDataParser = function addDataParser(format, _ref3) { var parser = _ref3.parser, async = _ref3.async; if (async) { asyncParsers[format] = parser; } else { parsers[format] = parser; } }; exports.addDataParser = addDataParser; var hasDataParser = function hasDataParser(type, async) { return async ? asyncParsers[type] || nativeAsyncParsers[type] : parsers[type] || nativeParsers[type]; }; exports.hasDataParser = hasDataParser; var removeDataParser = function removeDataParser(type, async) { delete (async ? asyncParsers : parsers)[type]; }; exports.removeDataParser = removeDataParser; var listDataParser = function listDataParser(async) { return Object.keys(async ? asyncParsers : parsers); }; exports.listDataParser = listDataParser; },{"./chain":360}],362:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dataTypeOf = exports.typeOf = void 0; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var typeOf = function typeOf(thing) { switch (thing) { case undefined: return 'Undefined'; case null: return 'Null'; default: return thing.constructor.name; } }; exports.typeOf = typeOf; var dataTypeOf = function dataTypeOf(thing) { switch (_typeof(thing)) { case 'string': return 'String'; case 'object': if (Array.isArray(thing)) { return 'Array'; } else if (typeOf(thing) === 'Object') { return 'SimpleObject'; } else if (typeOf(thing) !== 'Null') { return 'ComplexObject'; } default: return 'Primitive'; } }; exports.dataTypeOf = dataTypeOf; },{}],363:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeGraph = exports.applyGraph = void 0; function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } var applyGraph = function applyGraph(entry, graph) { var isArrayElse = function isArrayElse(_ref) { var type = _ref.type; return type === '@else/list+object'; }; if (!Array.isArray(entry._graph)) { entry._graph = graph; } else if (graph.find(isArrayElse)) { graph.splice.apply(graph, [graph.findIndex(isArrayElse), 1].concat(_toConsumableArray(entry._graph.slice(0, -1)))); entry._graph = graph; } return entry; }; exports.applyGraph = applyGraph; var removeGraph = function removeGraph(entry) { delete entry._graph; return entry; }; exports.removeGraph = removeGraph; },{}],364:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { util: true }; exports.util = void 0; var dataType = _interopcitationRequireWildcard(citationRequire("./dataType")); var graph = _interopcitationRequireWildcard(citationRequire("./graph")); var parser = _interopcitationRequireWildcard(citationRequire("./parser")); var _register = citationRequire("./register"); Object.keys(_register).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _register[key]; } }); }); var _chain = citationRequire("./chain"); Object.keys(_chain).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _chain[key]; } }); }); var _type = citationRequire("./type"); Object.keys(_type).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _type[key]; } }); }); var _data = citationRequire("./data"); Object.keys(_data).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _data[key]; } }); }); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var util = _objectSpread({}, dataType, graph, parser); exports.util = util; },{"./chain":360,"./data":361,"./dataType":362,"./graph":363,"./parser":365,"./register":366,"./type":367}],365:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FormatParser = exports.DataParser = exports.TypeParser = void 0; var _type = citationRequire("./type"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var TypeParser = function () { function TypeParser(data) { _classCallCheck(this, TypeParser); _defineProperty(this, "validDataTypes", ['String', 'Array', 'SimpleObject', 'ComplexObject', 'Primitive']); this.data = data; } _createClass(TypeParser, [{ key: "validateDataType", value: function validateDataType() { var dataType = this.data.dataType; if (dataType && !this.validDataTypes.includes(dataType)) { throw new RangeError("dataType was ".concat(dataType, "; expected one of ").concat(this.validDataTypes)); } } }, { key: "validateParseType", value: function validateParseType() { var predicate = this.data.predicate; if (predicate && !(predicate instanceof RegExp || typeof predicate === 'function')) { throw new TypeError("predicate was ".concat(_typeof(predicate), "; expected RegExp or function")); } } }, { key: "validateTokenList", value: function validateTokenList() { var tokenList = this.data.tokenList; if (tokenList && _typeof(tokenList) !== 'object') { throw new TypeError("tokenList was ".concat(_typeof(tokenList), "; expected object or RegExp")); } } }, { key: "validatePropertyConstraint", value: function validatePropertyConstraint() { var propertyConstraint = this.data.propertyConstraint; if (propertyConstraint && _typeof(propertyConstraint) !== 'object') { throw new TypeError("propertyConstraint was ".concat(_typeof(propertyConstraint), "; expected array or object")); } } }, { key: "validateElementConstraint", value: function validateElementConstraint() { var elementConstraint = this.data.elementConstraint; if (elementConstraint && typeof elementConstraint !== 'string') { throw new TypeError("elementConstraint was ".concat(_typeof(elementConstraint), "; expected string")); } } }, { key: "validateExtends", value: function validateExtends() { var extend = this.data.extends; if (extend && typeof extend !== 'string') { throw new TypeError("extends was ".concat(_typeof(extend), "; expected string")); } } }, { key: "validate", value: function validate() { if (this.data === null || _typeof(this.data) !== 'object') { throw new TypeError("typeParser was ".concat(_typeof(this.data), "; expected object")); } this.validateDataType(); this.validateParseType(); this.validateTokenList(); this.validatePropertyConstraint(); this.validateElementConstraint(); this.validateExtends(); } }, { key: "parseTokenList", value: function parseTokenList() { var tokenList = this.data.tokenList; if (!tokenList) { return []; } else if (tokenList instanceof RegExp) { tokenList = { token: tokenList }; } var _tokenList = tokenList, token = _tokenList.token, _tokenList$split = _tokenList.split, split = _tokenList$split === void 0 ? /\s+/ : _tokenList$split, _tokenList$trim = _tokenList.trim, trim = _tokenList$trim === void 0 ? true : _tokenList$trim, _tokenList$every = _tokenList.every, every = _tokenList$every === void 0 ? true : _tokenList$every; var trimInput = function trimInput(input) { return trim ? input.trim() : input; }; var testTokens = every ? 'every' : 'some'; var predicate = function predicate(input) { return trimInput(input).split(split)[testTokens](function (part) { return token.test(part); }); }; return [predicate]; } }, { key: "parsePropertyConstraint", value: function parsePropertyConstraint() { var constraints = [].concat(this.data.propertyConstraint || []); return constraints.map(function (_ref) { var props = _ref.props, _ref$match = _ref.match, match = _ref$match === void 0 ? 'every' : _ref$match, _ref$value = _ref.value, value = _ref$value === void 0 ? function () { return true; } : _ref$value; props = [].concat(props); return function (input) { return props[match](function (prop) { return prop in input && value(input[prop]); }); }; }); } }, { key: "parseElementConstraint", value: function parseElementConstraint() { var constraint = this.data.elementConstraint; return !constraint ? [] : [function (input) { return input.every(function (entry) { return (0, _type.type)(entry) === constraint; }); }]; } }, { key: "parsePredicate", value: function parsePredicate() { if (this.data.predicate instanceof RegExp) { return [this.data.predicate.test.bind(this.data.predicate)]; } else if (this.data.predicate) { return [this.data.predicate]; } else { return []; } } }, { key: "getCombinedPredicate", value: function getCombinedPredicate() { var predicates = _toConsumableArray(this.parsePredicate()).concat(_toConsumableArray(this.parseTokenList()), _toConsumableArray(this.parsePropertyConstraint()), _toConsumableArray(this.parseElementConstraint())); if (predicates.length === 0) { return function () { return true; }; } else if (predicates.length === 1) { return predicates[0]; } else { return function (input) { return predicates.every(function (predicate) { return predicate(input); }); }; } } }, { key: "getDataType", value: function getDataType() { if (this.data.dataType) { return this.data.dataType; } else if (this.data.predicate instanceof RegExp) { return 'String'; } else if (this.data.tokenList) { return 'String'; } else if (this.data.elementConstraint) { return 'Array'; } else { return 'Primitive'; } } }, { key: "dataType", get: function get() { return this.getDataType(); } }, { key: "predicate", get: function get() { return this.getCombinedPredicate(); } }, { key: "extends", get: function get() { return this.data.extends; } }]); return TypeParser; }(); exports.TypeParser = TypeParser; var DataParser = function () { function DataParser(parser) { var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, async = _ref2.async; _classCallCheck(this, DataParser); this.parser = parser; this.async = async; } _createClass(DataParser, [{ key: "validate", value: function validate() { var parser = this.parser; if (typeof parser !== 'function') { throw new TypeError("parser was ".concat(_typeof(parser), "; expected function")); } } }]); return DataParser; }(); exports.DataParser = DataParser; var FormatParser = function () { function FormatParser(format) { var parsers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck(this, FormatParser); this.format = format; if (parsers.parseType) { this.typeParser = new TypeParser(parsers.parseType); } if (parsers.parse) { this.dataParser = new DataParser(parsers.parse, { async: false }); } if (parsers.parseAsync) { this.asyncDataParser = new DataParser(parsers.parseAsync, { async: true }); } } _createClass(FormatParser, [{ key: "validateFormat", value: function validateFormat() { var format = this.format; if (!_type.typeMatcher.test(format)) { throw new TypeError("format name was \"".concat(format, "\"; didn't match expected pattern")); } } }, { key: "validate", value: function validate() { this.validateFormat(); if (this.typeParser) { this.typeParser.validate(); } if (this.dataParser) { this.dataParser.validate(); } if (this.asyncDataParser) { this.asyncDataParser.validate(); } } }]); return FormatParser; }(); exports.FormatParser = FormatParser; },{"./type":367}],366:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.list = exports.has = exports.remove = exports.add = void 0; var _parser = citationRequire("./parser"); var _type = citationRequire("./type"); var _data = citationRequire("./data"); var formats = {}; var add = function add(format, parsers) { var formatParser = new _parser.FormatParser(format, parsers); formatParser.validate(); var index = formats[format] = {}; if (formatParser.typeParser) { (0, _type.addTypeParser)(format, formatParser.typeParser); index.type = true; } if (formatParser.dataParser) { (0, _data.addDataParser)(format, formatParser.dataParser); index.data = true; } if (formatParser.asyncDataParser) { (0, _data.addDataParser)(format, formatParser.asyncDataParser); index.asyncData = true; } }; exports.add = add; var remove = function remove(format) { var index = formats[format]; if (!index) { return; } if (index.type) { (0, _type.removeTypeParser)(format); } if (index.data) { (0, _data.removeDataParser)(format); } if (index.asyncData) { (0, _data.removeDataParser)(format, true); } delete formats[format]; }; exports.remove = remove; var has = function has(format) { return format in formats; }; exports.has = has; var list = function list() { return Object.keys(formats); }; exports.list = list; },{"./data":361,"./parser":365,"./type":367}],367:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.typeMatcher = exports.treeTypeParser = exports.listTypeParser = exports.removeTypeParser = exports.hasTypeParser = exports.addTypeParser = exports.type = void 0; var _dataType = citationRequire("./dataType"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } var types = {}; var dataTypes = {}; var unregExts = {}; var parseNativeTypes = function parseNativeTypes(input, dataType) { switch (dataType) { case 'Array': if (input.length === 0 || input.every(function (entry) { return type(entry) === '@csl/object'; })) { return '@csl/list+object'; } else { return '@else/list+object'; } case 'SimpleObject': case 'ComplexObject': return '@csl/object'; default: logger.warn('[set]', 'This format is not supported or recognized'); return '@invalid'; } }; var matchType = function matchType() { var typeList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var data = arguments.length > 1 ? arguments[1] : undefined; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = typeList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _type = _step.value; if (types[_type].predicate(data)) { return matchType(types[_type].extensions, data) || _type; } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } }; var type = function type(input) { var dataType = (0, _dataType.dataTypeOf)(input); if (dataType === 'Array' && input.length === 0) { return parseNativeTypes(input, dataType); } var match = matchType(dataTypes[dataType], input); return match || parseNativeTypes(input, dataType); }; exports.type = type; var addTypeParser = function addTypeParser(format, _ref) { var dataType = _ref.dataType, predicate = _ref.predicate, extend = _ref.extends; var extensions = []; if (format in unregExts) { extensions = unregExts[format]; delete unregExts[format]; logger.info('[set]', "Subclasses \"".concat(extensions, "\" finally registered to parent type \"").concat(format, "\"")); } var object = { predicate: predicate, extensions: extensions }; types[format] = object; if (extend) { var parentTypeParser = types[extend]; if (parentTypeParser) { parentTypeParser.extensions.push(format); } else { if (!unregExts[extend]) { unregExts[extend] = []; } unregExts[extend].push(format); logger.info('[set]', "Subclass \"".concat(format, "\" is waiting on parent type \"").concat(extend, "\"")); } } else { var typeList = dataTypes[dataType] || (dataTypes[dataType] = []); typeList.push(format); } }; exports.addTypeParser = addTypeParser; var hasTypeParser = function hasTypeParser(type) { return types.hasOwnProperty(type); }; exports.hasTypeParser = hasTypeParser; var removeTypeParser = function removeTypeParser(type) { delete types[type]; var typeLists = _toConsumableArray(Object.values(dataTypes)).concat(_toConsumableArray(Object.values(types).map(function (type) { return type.extensions; }).filter(function (list) { return list.length > 0; }))); typeLists.forEach(function (typeList) { var index = typeList.indexOf(type); if (index > -1) { typeList.splice(index, 1); } }); }; exports.removeTypeParser = removeTypeParser; var listTypeParser = function listTypeParser() { return Object.keys(types); }; exports.listTypeParser = listTypeParser; var treeTypeParser = function treeTypeParser() { var attachNode = function attachNode(name) { return { name: name, children: types[name].extensions.map(attachNode) }; }; return { name: 'Type tree', children: Object.entries(dataTypes).map(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), name = _ref3[0], children = _ref3[1]; return { name: name, children: children.map(attachNode) }; }) }; }; exports.treeTypeParser = treeTypeParser; var typeMatcher = /^(?:@(.+?))(?:\/(?:(.+?)\+)?(?:(.+)))?$/; exports.typeMatcher = typeMatcher; },{"./dataType":362}],368:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formats = exports.parsers = exports.ref = void 0; var json = _interopcitationRequireWildcard(citationRequire("./json")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var scraperLinks = ['fulltext_html', 'fulltext_xml', 'fulltext_pdf']; var ref = '@bibjson'; exports.ref = ref; var parsers = { json: json }; exports.parsers = parsers; var formats = { '@bibjson/quickscrape+record+object': { parse: json.quickscrapeRecord, parseType: { propertyConstraint: { props: 'link', value: function value(links) { return scraperLinks.some(function (link) { return links.find(function (_ref) { var type = _ref.type; return type === link; }); }); } }, extends: '@bibjson/record+object' } }, '@bibjson/record+object': { parse: json.record, parseType: { dataType: 'SimpleObject', propertyConstraint: [{ props: 'title' }, { props: ['author', 'editor'], match: 'some', value: function value(authors) { return Array.isArray(authors) && authors[0] && 'name' in authors[0]; } }] } }, '@bibjson/collection+object': { parse: function parse(collection) { return collection.records; }, parseType: { dataType: 'SimpleObject', propertyConstraint: [{ props: 'metadata', value: function value(metadata) { return 'collection' in metadata; } }, { props: 'records', value: function value(records) { return Array.isArray(records); } }] } } }; exports.formats = formats; },{"./json":369}],369:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.record = exports.quickscrapeRecord = void 0; var _date = _interopcitationRequireDefault(citationRequire("../../date")); var _name = _interopcitationRequireDefault(citationRequire("../../name")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function nameProps(person) { var firstname = person.firstname, lastname = person.lastname, _person$firstName = person.firstName, given = _person$firstName === void 0 ? firstname : _person$firstName, _person$lastName = person.lastName, family = _person$lastName === void 0 ? lastname : _person$lastName; if (given && family) { return { given: given, family: family }; } else if (person.name) { return (0, _name.default)(person.name); } } var identifiers = ['PMID', 'PMCID', 'DOI', 'ISBN']; var journalIdentifiers = ['ISSN']; function idProps(input, identifiers) { var output = {}; for (var prop in input) { var upperCaseProp = prop.toUpperCase(); if (identifiers.includes(upperCaseProp)) { output[upperCaseProp] = input[prop]; } } if (input.identifier) { var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = input.identifier[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _ref2 = _step.value; var id = _ref2.id, _ref2$type = _ref2.type, type = _ref2$type === void 0 ? '' : _ref2$type; type = type.toUpperCase(); if (identifiers.includes(type)) { output[type] = id; } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } } return output; } var typeMap = { article: 'article', book: 'book', booklet: 'book', proceedings: 'book', mastersthesis: 'thesis', inbook: 'chapter', incollection: 'chapter', conference: 'paper-conference', inproceedings: 'paper-conference', online: 'website', patent: 'patent', phdthesis: 'thesis', techreport: 'report', unpublished: 'manuscript', manual: undefined, misc: undefined }; function quickscrapeSpecificProps() { return { type: 'article-journal' }; } function generalProps(input) { var output = { type: typeMap[input.type] || 'book' }; if (input.title) { output.title = input.title; } if (input.author) { output.author = input.author.map(nameProps).filter(Boolean); } if (input.editor) { output.editor = input.editor.map(nameProps).filter(Boolean); } if (input.reviewer) { if (input.author) { output['reviewed-author'] = output.author; } output.author = input.reviewer.map(nameProps).filter(Boolean); } if (Array.isArray(input.keywords)) { output.keyword = input.keywords.join(); } else if (input.keywords) { output.keyword = input.keywords; } if (input.publisher) { output.publisher = input.publisher.name || input.publisher; } if (input.date && Object.keys(input.date).length > 0) { var dates = input.date; if (dates.submitted) { output.submitted = (0, _date.default)(dates.submitted); } if (dates.published) { output.issued = (0, _date.default)(dates.published); } } else if (input.year) { output.issued = { 'date-parts': [[+input.year]] }; } if (input.journal) { var journal = input.journal; if (journal.name) { output['container-title'] = journal.name; } if (journal.volume) { output.volume = +journal.volume; } if (journal.issue) { output.issue = +journal.issue; } Object.assign(output, idProps(journal, journalIdentifiers)); if (journal.firstpage) { output['page-first'] = journal.firstpage; } if (journal.pages) { output.page = journal.pages.replace('--', '-'); } else if (journal.firstpage && journal.lastpage) { output.page = journal.firstpage + '-' + journal.lastpage; } } if (input.link && _typeof(input.link[0]) === 'object') { output.URL = input.link[0].url; } Object.assign(output, idProps(input, identifiers)); if (input.cid) { output.id = input.cid; } else if (output.DOI) { output.id = output.DOI; } return output; } var parseContentMine = function parseContentMine(data) { return Object.assign(generalProps(data), quickscrapeSpecificProps(data)); }; exports.quickscrapeRecord = parseContentMine; var parseBibJson = function parseBibJson(data) { return generalProps(data); }; exports.record = parseBibJson; },{"../../date":358,"../../name":397}],370:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.textEntry = exports.text = exports.parse = void 0; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var bibTxtRegex = { splitEntries: /\n\s*(?=\[)/g, parseEntry: /^\[(.+?)\]\s*(?:\n([\s\S]+))?$/, splitPairs: /((?=.)\s)*\n\s*/g, splitPair: /:(.*)/ }; var parseBibTxtEntry = function parseBibTxtEntry(entry) { var _ref = entry.match(bibTxtRegex.parseEntry) || [], _ref2 = _slicedToArray(_ref, 3), label = _ref2[1], pairs = _ref2[2]; if (!label || !pairs) { return {}; } else { var out = { type: 'book', label: label, properties: {} }; pairs.trim().split(bibTxtRegex.splitPairs).filter(function (v) { return v; }).forEach(function (pair) { var _pair$split = pair.split(bibTxtRegex.splitPair), _pair$split2 = _slicedToArray(_pair$split, 2), key = _pair$split2[0], value = _pair$split2[1]; if (value) { key = key.trim(); value = value.trim(); if (key === 'type') { out.type = value; } else { out.properties[key] = value; } } }); return out; } }; exports.textEntry = parseBibTxtEntry; var parseBibTxt = function parseBibTxt(src) { return src.trim().split(bibTxtRegex.splitEntries).map(parseBibTxtEntry); }; exports.text = exports.parse = parseBibTxt; },{}],371:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formats = exports.parsers = exports.ref = void 0; var text = _interopcitationRequireWildcard(citationRequire("./text")); var json = _interopcitationRequireWildcard(citationRequire("./json")); var prop = _interopcitationRequireWildcard(citationRequire("./prop")); var type = _interopcitationRequireWildcard(citationRequire("./type")); var bibtxt = _interopcitationRequireWildcard(citationRequire("./bibtxt")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var ref = '@bibtex'; exports.ref = ref; var parsers = { text: text, json: json, prop: prop, type: type, bibtxt: bibtxt }; exports.parsers = parsers; var formats = { '@bibtex/text': { parse: text.parse, parseType: { dataType: 'String', predicate: /@\s{0,5}[A-Za-z]{1,13}\s{0,5}\{\s{0,5}[^@{}"=,\\\s]{0,100}\s{0,5},[\s\S]*\}/ } }, '@bibtxt/text': { parse: bibtxt.parse, parseType: { dataType: 'String', predicate: /^\s*(\[(?!\s*[{[]).*?\]\s*(\n\s*[^[]((?!:)\S)+\s*:\s*.+?\s*)*\s*)+$/ } }, '@bibtex/object': { parse: json.parse, parseType: { dataType: 'SimpleObject', propertyConstraint: { props: ['type', 'label', 'properties'] } } }, '@bibtex/prop': { parse: prop.parse }, '@bibtex/type': { parse: type.parse } }; exports.formats = formats; },{"./bibtxt":370,"./json":372,"./prop":373,"./text":374,"./type":376}],372:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var _prop2 = _interopcitationRequireDefault(citationRequire("./prop")); var _type = _interopcitationRequireDefault(citationRequire("./type")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var parseBibTeXJSON = function parseBibTeXJSON(data) { return [].concat(data).map(function (entry) { var newEntry = {}; var toMerge = []; for (var prop in entry.properties) { var oldValue = entry.properties[prop]; var _ref = (0, _prop2.default)(prop, oldValue) || [], _ref2 = _slicedToArray(_ref, 2), cslField = _ref2[0], cslValue = _ref2[1]; if (cslField) { if (/^[^:\s]+?:[^.\s]+(\.[^.\s]+)*$/.test(cslField)) { toMerge.push([cslField, cslValue]); } else { newEntry[cslField] = cslValue; } } } newEntry.type = (0, _type.default)(entry.type); newEntry.id = newEntry['citation-label'] = entry.label; if (/\d(\D+)$/.test(entry.label)) { newEntry['year-suffix'] = entry.label.match(/\d(\D+)$/)[1]; } toMerge.forEach(function (_ref3) { var _ref4 = _slicedToArray(_ref3, 2), cslField = _ref4[0], value = _ref4[1]; var props = cslField.split(/:|\./g); var cursor = newEntry; while (props.length > 0) { var _prop = props.shift(); cursor = cursor[_prop] || (cursor[_prop] = !props.length ? value : isNaN(+props[0]) ? {} : []); } }); return newEntry; }); }; exports.default = exports.parse = parseBibTeXJSON; },{"./prop":373,"./type":376}],373:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var _name = _interopcitationRequireDefault(citationRequire("../../name")); var _date = _interopcitationRequireDefault(citationRequire("../../date")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var months = [/jan(uary)?\.?/i, /feb(ruary)?\.?/i, /mar(ch)?\.?/i, /apr(il)?\.?/i, /may\.?/i, /jun(e)?\.?/i, /jul(y)?\.?/i, /aug(ust)?\.?/i, /sep(tember)?\.?/i, /oct(ober)?\.?/i, /nov(ember)?\.?/i, /dec(ember)?\.?/i]; var parseBibtexDate = function parseBibtexDate(value) { if (/{|}/.test(value)) { return { literal: value.replace(/[{}]/g, '') }; } else { return (0, _date.default)(value); } }; var parseBibtexName = function parseBibtexName(name) { if (/{|}/.test(name)) { return { literal: name.replace(/[{}]/g, '') }; } else { return (0, _name.default)(name); } }; var parseBibtexNameList = function parseBibtexNameList(list) { var literals = []; list = list.replace(/%/g, '%0').replace(/{.*?}/g, function (m) { return "%[".concat(literals.push(m) - 1, "]"); }); return list.split(' and ').map(function (name) { return name.replace(/%\[(\d+)\]/, function (_, i) { return literals[+i]; }).replace(/%0/g, '%'); }).map(parseBibtexName); }; var richTextMappings = { textit: 'i', textbf: 'b', textsc: 'sc', textsuperscript: 'sup', textsubscript: 'sub' }; var parseBibtexRichText = function parseBibtexRichText(text) { var tokens = text.split(/((?:\\text[a-z]+)?{|})/); var closingTags = []; var hasTopLevelTag = text[0] === '{' && text[text.length - 1] === '}'; tokens = tokens.map(function (token, index) { if (index % 2 === 0) { return token; } else if (token[0] === '\\') { var tag = richTextMappings[token.slice(1, -1)]; closingTags.push("")); return "<".concat(tag, ">"); } else if (token === '{') { closingTags.push(''); return ''; } else if (token === '}') { if (closingTags.length === 1 && index !== tokens.length - 2) { hasTopLevelTag = false; } return closingTags.pop(); } }); if (hasTopLevelTag) { tokens.splice(0, 2); tokens.splice(-2, 2); } return tokens.join(''); }; var propMap = { address: 'publisher-place', author: true, booktitle: 'container-title', doi: 'DOI', date: 'issued', edition: true, editor: true, isbn: 'ISBN', issn: 'ISSN', issue: 'issue', journal: 'container-title', language: true, location: 'publisher-place', note: true, number: 'issue', numpages: 'number-of-pages', pages: 'page', pmid: 'PMID', pmcid: 'PMCID', publisher: true, series: 'collection-title', title: true, url: 'URL', volume: true, year: 'issued:date-parts.0.0', month: 'issued:date-parts.0.1', day: 'issued:date-parts.0.2', crossref: false, keywords: false }; var parseBibTeXProp = function parseBibTeXProp(name, value) { if (!propMap.hasOwnProperty(name)) { logger.info('[set]', "Unknown property: ".concat(name)); return undefined; } else if (propMap[name] === false) { return undefined; } var cslProp = propMap[name] === true ? name : propMap[name]; var cslValue = function (name, value) { switch (name) { case 'author': case 'editor': return parseBibtexNameList(value); case 'issued': return parseBibtexDate(value); case 'edition': return value; case 'issued:date-parts.0.1': return parseFloat(value) ? value : months.findIndex(function (month) { return month.test(value); }) + 1; case 'page': return value.replace(/[—–]/, '-'); case 'title': return parseBibtexRichText(value); default: return value.replace(/[{}]/g, ''); } }(cslProp, value); return [cslProp, cslValue]; }; exports.default = exports.parse = parseBibTeXProp; },{"../../date":358,"../../name":397}],374:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var _stack = _interopcitationRequireDefault(citationRequire("../../../util/stack")); var _tokens = _interopcitationRequireDefault(citationRequire("./tokens.json")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var tokenPattern = /\\url|\\href|{\\[a-zA-Z]+}|\$\\[a-zA-Z]+\$|\$[_^]{[0-9()+=\-n]}\$|`{2,3}|'{2,3}|-{2,3}|[!?]!|!\?|{\\~}|\\[#$%&~_^\\{}]|{\\(?:[a-z] |[`"'^~=.])\\?[a-zA-Z]}|[\s\S]/g; var whitespace = /^\s$/; var syntax = /^[@{}"=,\\]$/; var delimiters = { '"': '"', '{': '}', '': '' }; var getTokenizedBibtex = function getTokenizedBibtex(str) { str = str.replace(/(\\[`"'^~=.]){\\?([A-Za-z])}/g, '{$1$2}').replace(/(\\[a-z]) ?{\\?([A-Za-z])}/g, '{$1 $2}'); return str.match(tokenPattern); }; var parseBibTeX = function parseBibTeX(str) { var entries = []; var tokens = getTokenizedBibtex(str); var stack = new _stack.default(tokens); try { stack.consumeWhitespace(); while (stack.tokensLeft()) { stack.consumeToken('@', { spaced: false }); stack.consumeWhitespace(); var type = stack.consume([whitespace, syntax], { inverse: true }).toLowerCase(); stack.consumeToken('{'); var label = stack.consume([whitespace, syntax], { inverse: true }); stack.consumeToken(','); var properties = {}; var _loop = function _loop() { var key = stack.consume([whitespace, '='], { inverse: true }).toLowerCase(); stack.consumeToken('='); var startDelimiter = stack.consume(/^({|"|)$/g); var endDelimiter = delimiters[startDelimiter]; if (!delimiters.hasOwnProperty(startDelimiter)) { throw new SyntaxError("Unexpected field delimiter at index ".concat(stack.index, ". Expected ") + "".concat(Object.keys(delimiters).map(function (v) { return "\"".concat(v, "\""); }).join(', '), "; got \"").concat(startDelimiter, "\"")); } var tokenMap = function tokenMap(token) { if (_tokens.default.hasOwnProperty(token)) { return _tokens.default[token]; } else if (token.match(/^\\[#$%&~_^\\{}]$/)) { return token.slice(1); } else if (token.length > 1) { throw new SyntaxError("Escape sequence not recognized: ".concat(token)); } else { return token; } }; var openBrackets = 0; var val = stack.consume(function (token, index) { if (token === '{') { openBrackets++; } if (stack.tokensLeft() < endDelimiter.length) { throw new SyntaxError("Unmatched delimiter at index ".concat(stack.index, ": Expected ").concat(endDelimiter)); } else if (!endDelimiter.length) { return ![whitespace, syntax].some(function (rgx) { return rgx.test(token); }); } else { return token === '}' && openBrackets-- || !stack.matchesSequence(endDelimiter); } }, { tokenMap: tokenMap }); properties[key] = val; stack.consumeN(endDelimiter.length); stack.consumeWhitespace(); if (stack.matches('}')) { return "break"; } stack.consumeToken(',', { spaced: false }); stack.consumeWhitespace(); if (stack.matches('}')) { return "break"; } }; while (stack.tokensLeft()) { var _ret = _loop(); if (_ret === "break") break; } stack.consumeToken('}', { spaced: false }); stack.consumeWhitespace(); if (stack.matches(',')) { stack.consumeToken(','); stack.consumeWhitespace(); } entries.push({ type: type, label: label, properties: properties }); } } catch (e) { logger.error("Uncaught SyntaxError: ".concat(e.message, ". Returning completed entries.")); entries.pop(); } return entries; }; exports.default = exports.parse = parseBibTeX; },{"../../../util/stack":406,"./tokens.json":375}],375:[function(citationRequire,module,exports){ module.exports={ "\\url":"", "\\href":"", "{\\textexclamdown}":"\u00A1", "{\\textcent}":"\u00A2", "{\\textsterling}":"\u00A3", "{\\textyen}":"\u00A5", "{\\textbrokenbar}":"\u00A6", "{\\textsection}":"\u00A7", "{\\textasciidieresis}":"\u00A8", "{\\textcopyright}":"\u00A9", "{\\textordfeminine}":"\u00AA", "{\\guillemotleft}":"\u00AB", "{\\textlnot}":"\u00AC", "{\\textregistered}":"\u00AE", "{\\textasciimacron}":"\u00AF", "{\\textdegree}":"\u00B0", "{\\textpm}":"\u00B1", "{\\texttwosuperior}":"\u00B2", "{\\textthreesuperior}":"\u00B3", "{\\textasciiacute}":"\u00B4", "{\\textmu}":"\u00B5", "{\\textparagraph}":"\u00B6", "{\\textperiodcentered}":"\u00B7", "{\\c\\ }":"\u00B8", "{\\textonesuperior}":"\u00B9", "{\\textordmasculine}":"\u00BA", "{\\guillemotright}":"\u00BB", "{\\textonequarter}":"\u00BC", "{\\textonehalf}":"\u00BD", "{\\textthreequarters}":"\u00BE", "{\\textquestiondown}":"\u00BF", "{\\AE}":"\u00C6", "{\\DH}":"\u00D0", "{\\texttimes}":"\u00D7", "{\\O}":"\u00D8", "{\\TH}":"\u00DE", "{\\ss}":"\u00DF", "{\\ae}":"\u00E6", "{\\dh}":"\u00F0", "{\\textdiv}":"\u00F7", "{\\o}":"\u00F8", "{\\th}":"\u00FE", "{\\i}":"\u0131", "{\\NG}":"\u014A", "{\\ng}":"\u014B", "{\\OE}":"\u0152", "{\\oe}":"\u0153", "{\\textasciicircum}":"\u02C6", "{\\textacutedbl}":"\u02DD", "$\\Gamma$":"\u0393", "$\\Delta$":"\u0394", "$\\Theta$":"\u0398", "$\\Lambda$":"\u039B", "$\\Xi$":"\u039E", "$\\Pi$":"\u03A0", "$\\Sigma$":"\u03A3", "$\\Phi$":"\u03A6", "$\\Psi$":"\u03A8", "$\\Omega$":"\u03A9", "$\\alpha$":"\u03B1", "$\\beta$":"\u03B2", "$\\gamma$":"\u03B3", "$\\delta$":"\u03B4", "$\\varepsilon$":"\u03B5", "$\\zeta$":"\u03B6", "$\\eta$":"\u03B7", "$\\theta$":"\u03B8", "$\\iota$":"\u03B9", "$\\kappa$":"\u03BA", "$\\lambda$":"\u03BB", "$\\mu$":"\u03BC", "$\\nu$":"\u03BD", "$\\xi$":"\u03BE", "$\\pi$":"\u03C0", "$\\rho$":"\u03C1", "$\\varsigma$":"\u03C2", "$\\sigma$":"\u03C3", "$\\tau$":"\u03C4", "$\\upsilon$":"\u03C5", "$\\varphi$":"\u03C6", "$\\chi$":"\u03C7", "$\\psi$":"\u03C8", "$\\omega$":"\u03C9", "$\\vartheta$":"\u03D1", "$\\Upsilon$":"\u03D2", "$\\phi$":"\u03D5", "$\\varpi$":"\u03D6", "$\\varrho$":"\u03F1", "$\\epsilon$":"\u03F5", "{\\textendash}":"\u2013", "{\\textemdash}":"\u2014", "---":"\u2014", "--":"\u2013", "{\\textbardbl}":"\u2016", "{\\textunderscore}":"\u2017", "{\\textquoteleft}":"\u2018", "{\\textquoteright}":"\u2019", "{\\quotesinglbase}":"\u201A", "{\\textquotedblleft}":"\u201C", "{\\textquotedblright}":"\u201D", "{\\quotedblbase}":"\u201E", "{\\textdagger}":"\u2020", "{\\textdaggerdbl}":"\u2021", "{\\textbullet}":"\u2022", "{\\textellipsis}":"\u2026", "{\\textperthousand}":"\u2030", "'''":"\u2034", "''":"\u201D", "``":"\u201C", "```":"\u2037", "{\\guilsinglleft}":"\u2039", "{\\guilsinglright}":"\u203A", "!!":"\u203C", "{\\textfractionsolidus}":"\u2044", "?!":"\u2048", "!?":"\u2049", "$^{0}$":"\u2070", "$^{4}$":"\u2074", "$^{5}$":"\u2075", "$^{6}$":"\u2076", "$^{7}$":"\u2077", "$^{8}$":"\u2078", "$^{9}$":"\u2079", "$^{+}$":"\u207A", "$^{-}$":"\u207B", "$^{=}$":"\u207C", "$^{(}$":"\u207D", "$^{)}$":"\u207E", "$^{n}$":"\u207F", "$_{0}$":"\u2080", "$_{1}$":"\u2081", "$_{2}$":"\u2082", "$_{3}$":"\u2083", "$_{4}$":"\u2084", "$_{5}$":"\u2085", "$_{6}$":"\u2086", "$_{7}$":"\u2087", "$_{8}$":"\u2088", "$_{9}$":"\u2089", "$_{+}$":"\u208A", "$_{-}$":"\u208B", "$_{=}$":"\u208C", "$_{(}$":"\u208D", "$_{)}$":"\u208E", "{\\texteuro}":"\u20AC", "{\\textcelsius}":"\u2103", "{\\textnumero}":"\u2116", "{\\textcircledP}":"\u2117", "{\\textservicemark}":"\u2120", "{TEL}":"\u2121", "{\\texttrademark}":"\u2122", "{\\textohm}":"\u2126", "{\\textestimated}":"\u212E", "{\\`A}":"\u00C0", "{\\'A}":"\u00C1", "{\\^A}":"\u00C2", "{\\~A}":"\u00C3", "{\\\"A}":"\u00C4", "{\\r A}":"\u00C5", "{\\c C}":"\u00C7", "{\\`E}":"\u00C8", "{\\'E}":"\u00C9", "{\\^E}":"\u00CA", "{\\\"E}":"\u00CB", "{\\`I}":"\u00CC", "{\\'I}":"\u00CD", "{\\^I}":"\u00CE", "{\\\"I}":"\u00CF", "{\\~N}":"\u00D1", "{\\`O}":"\u00D2", "{\\'O}":"\u00D3", "{\\^O}":"\u00D4", "{\\~O}":"\u00D5", "{\\\"O}":"\u00D6", "{\\`U}":"\u00D9", "{\\'U}":"\u00DA", "{\\^U}":"\u00DB", "{\\\"U}":"\u00DC", "{\\'Y}":"\u00DD", "{\\`a}":"\u00E0", "{\\'a}":"\u00E1", "{\\^a}":"\u00E2", "{\\~a}":"\u00E3", "{\\\"a}":"\u00E4", "{\\r a}":"\u00E5", "{\\c c}":"\u00E7", "{\\`e}":"\u00E8", "{\\'e}":"\u00E9", "{\\^e}":"\u00EA", "{\\\"e}":"\u00EB", "{\\`i}":"\u00EC", "{\\'i}":"\u00ED", "{\\^i}":"\u00EE", "{\\\"i}":"\u00EF", "{\\~n}":"\u00F1", "{\\`o}":"\u00F2", "{\\'o}":"\u00F3", "{\\^o}":"\u00F4", "{\\~o}":"\u00F5", "{\\\"o}":"\u00F6", "{\\`u}":"\u00F9", "{\\'u}":"\u00FA", "{\\^u}":"\u00FB", "{\\\"u}":"\u00FC", "{\\'y}":"\u00FD", "{\\\"y}":"\u00FF", "{\\=A}":"\u0100", "{\\=a}":"\u0101", "{\\u A}":"\u0102", "{\\u a}":"\u0103", "{\\k A}":"\u0104", "{\\k a}":"\u0105", "{\\'C}":"\u0106", "{\\'c}":"\u0107", "{\\^C}":"\u0108", "{\\^c}":"\u0109", "{\\.C}":"\u010A", "{\\.c}":"\u010B", "{\\v C}":"\u010C", "{\\v c}":"\u010D", "{\\v D}":"\u010E", "{\\v d}":"\u010F", "{\\=E}":"\u0112", "{\\=e}":"\u0113", "{\\u E}":"\u0114", "{\\u e}":"\u0115", "{\\.E}":"\u0116", "{\\.e}":"\u0117", "{\\k E}":"\u0118", "{\\k e}":"\u0119", "{\\v E}":"\u011A", "{\\v e}":"\u011B", "{\\^G}":"\u011C", "{\\^g}":"\u011D", "{\\u G}":"\u011E", "{\\u g}":"\u011F", "{\\.G}":"\u0120", "{\\.g}":"\u0121", "{\\c G}":"\u0122", "{\\c g}":"\u0123", "{\\^H}":"\u0124", "{\\^h}":"\u0125", "{\\~I}":"\u0128", "{\\~i}":"\u0129", "{\\=I}":"\u012A", "{\\=i}":"\u012B", "{\\=\\i}":"\u012B", "{\\u I}":"\u012C", "{\\u i}":"\u012D", "{\\k I}":"\u012E", "{\\k i}":"\u012F", "{\\.I}":"\u0130", "{\\^J}":"\u0134", "{\\^j}":"\u0135", "{\\c K}":"\u0136", "{\\c k}":"\u0137", "{\\'L}":"\u0139", "{\\'l}":"\u013A", "{\\c L}":"\u013B", "{\\c l}":"\u013C", "{\\v L}":"\u013D", "{\\v l}":"\u013E", "{\\L }":"\u0141", "{\\l }":"\u0142", "{\\'N}":"\u0143", "{\\'n}":"\u0144", "{\\c N}":"\u0145", "{\\c n}":"\u0146", "{\\v N}":"\u0147", "{\\v n}":"\u0148", "{\\=O}":"\u014C", "{\\=o}":"\u014D", "{\\u O}":"\u014E", "{\\u o}":"\u014F", "{\\H O}":"\u0150", "{\\H o}":"\u0151", "{\\'R}":"\u0154", "{\\'r}":"\u0155", "{\\c R}":"\u0156", "{\\c r}":"\u0157", "{\\v R}":"\u0158", "{\\v r}":"\u0159", "{\\'S}":"\u015A", "{\\'s}":"\u015B", "{\\^S}":"\u015C", "{\\^s}":"\u015D", "{\\c S}":"\u015E", "{\\c s}":"\u015F", "{\\v S}":"\u0160", "{\\v s}":"\u0161", "{\\c T}":"\u0162", "{\\c t}":"\u0163", "{\\v T}":"\u0164", "{\\v t}":"\u0165", "{\\~U}":"\u0168", "{\\~u}":"\u0169", "{\\=U}":"\u016A", "{\\=u}":"\u016B", "{\\u U}":"\u016C", "{\\u u}":"\u016D", "{\\r U}":"\u016E", "{\\r u}":"\u016F", "{\\H U}":"\u0170", "{\\H u}":"\u0171", "{\\k U}":"\u0172", "{\\k u}":"\u0173", "{\\^W}":"\u0174", "{\\^w}":"\u0175", "{\\^Y}":"\u0176", "{\\^y}":"\u0177", "{\\\"Y}":"\u0178", "{\\'Z}":"\u0179", "{\\'z}":"\u017A", "{\\.Z}":"\u017B", "{\\.z}":"\u017C", "{\\v Z}":"\u017D", "{\\v z}":"\u017E", "{\\v A}":"\u01CD", "{\\v a}":"\u01CE", "{\\v I}":"\u01CF", "{\\v i}":"\u01D0", "{\\v O}":"\u01D1", "{\\v o}":"\u01D2", "{\\v U}":"\u01D3", "{\\v u}":"\u01D4", "{\\v G}":"\u01E6", "{\\v g}":"\u01E7", "{\\v K}":"\u01E8", "{\\v k}":"\u01E9", "{\\k O}":"\u01EA", "{\\k o}":"\u01EB", "{\\v j}":"\u01F0", "{\\'G}":"\u01F4", "{\\'g}":"\u01F5", "{\\.B}":"\u1E02", "{\\.b}":"\u1E03", "{\\d B}":"\u1E04", "{\\d b}":"\u1E05", "{\\b B}":"\u1E06", "{\\b b}":"\u1E07", "{\\.D}":"\u1E0A", "{\\.d}":"\u1E0B", "{\\d D}":"\u1E0C", "{\\d d}":"\u1E0D", "{\\b D}":"\u1E0E", "{\\b d}":"\u1E0F", "{\\c D}":"\u1E10", "{\\c d}":"\u1E11", "{\\.F}":"\u1E1E", "{\\.f}":"\u1E1F", "{\\=G}":"\u1E20", "{\\=g}":"\u1E21", "{\\.H}":"\u1E22", "{\\.h}":"\u1E23", "{\\d H}":"\u1E24", "{\\d h}":"\u1E25", "{\\\"H}":"\u1E26", "{\\\"h}":"\u1E27", "{\\c H}":"\u1E28", "{\\c h}":"\u1E29", "{\\'K}":"\u1E30", "{\\'k}":"\u1E31", "{\\d K}":"\u1E32", "{\\d k}":"\u1E33", "{\\b K}":"\u1E34", "{\\b k}":"\u1E35", "{\\d L}":"\u1E36", "{\\d l}":"\u1E37", "{\\b L}":"\u1E3A", "{\\b l}":"\u1E3B", "{\\'M}":"\u1E3E", "{\\'m}":"\u1E3F", "{\\.M}":"\u1E40", "{\\.m}":"\u1E41", "{\\d M}":"\u1E42", "{\\d m}":"\u1E43", "{\\.N}":"\u1E44", "{\\.n}":"\u1E45", "{\\d N}":"\u1E46", "{\\d n}":"\u1E47", "{\\b N}":"\u1E48", "{\\b n}":"\u1E49", "{\\'P}":"\u1E54", "{\\'p}":"\u1E55", "{\\.P}":"\u1E56", "{\\.p}":"\u1E57", "{\\.R}":"\u1E58", "{\\.r}":"\u1E59", "{\\d R}":"\u1E5A", "{\\d r}":"\u1E5B", "{\\b R}":"\u1E5E", "{\\b r}":"\u1E5F", "{\\.S}":"\u1E60", "{\\.s}":"\u1E61", "{\\d S}":"\u1E62", "{\\d s}":"\u1E63", "{\\.T}":"\u1E6A", "{\\.t}":"\u1E6B", "{\\d T}":"\u1E6C", "{\\d t}":"\u1E6D", "{\\b T}":"\u1E6E", "{\\b t}":"\u1E6F", "{\\~V}":"\u1E7C", "{\\~v}":"\u1E7D", "{\\d V}":"\u1E7E", "{\\d v}":"\u1E7F", "{\\`W}":"\u1E80", "{\\`w}":"\u1E81", "{\\'W}":"\u1E82", "{\\'w}":"\u1E83", "{\\\"W}":"\u1E84", "{\\\"w}":"\u1E85", "{\\.W}":"\u1E86", "{\\.w}":"\u1E87", "{\\d W}":"\u1E88", "{\\d w}":"\u1E89", "{\\.X}":"\u1E8A", "{\\.x}":"\u1E8B", "{\\\"X}":"\u1E8C", "{\\\"x}":"\u1E8D", "{\\.Y}":"\u1E8E", "{\\.y}":"\u1E8F", "{\\^Z}":"\u1E90", "{\\^z}":"\u1E91", "{\\d Z}":"\u1E92", "{\\d z}":"\u1E93", "{\\b Z}":"\u1E94", "{\\b z}":"\u1E95", "{\\b h}":"\u1E96", "{\\\"t}":"\u1E97", "{\\r w}":"\u1E98", "{\\r y}":"\u1e99", "{\\d A}":"\u1EA0", "{\\d a}":"\u1EA1", "{\\d E}":"\u1EB8", "{\\d e}":"\u1EB9", "{\\~E}":"\u1EBC", "{\\~e}":"\u1EBD", "{\\d I}":"\u1ECA", "{\\d i}":"\u1ECB", "{\\d O}":"\u1ECC", "{\\d o}":"\u1ECD", "{\\d U}":"\u1EE4", "{\\d u}":"\u1EE5", "{\\`Y}":"\u1EF2", "{\\`y}":"\u1EF3", "{\\d Y}":"\u1EF4", "{\\d y}":"\u1EF5", "{\\~Y}":"\u1EF8", "{\\~y}":"\u1EF9", "{\\~}":"\u223C", "~":"\u00A0" } },{}],376:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var typeMap = { article: 'article-journal', book: 'book', booklet: 'book', proceedings: 'book', manual: false, mastersthesis: 'thesis', misc: false, inbook: 'chapter', incollection: 'chapter', conference: 'paper-conference', inproceedings: 'paper-conference', online: 'website', patent: 'patent', phdthesis: 'thesis', techreport: 'report', unpublished: 'manuscript' }; var parseBibTeXType = function parseBibTeXType(pubType) { if (!typeMap.hasOwnProperty(pubType)) { logger.warn('[set]', "BibTeX publication type not recognized: ".concat(pubType, ". Defaulting to \"book\".")); return 'book'; } else if (typeMap[pubType] === false) { return 'book'; } else { return typeMap[pubType]; } }; exports.default = exports.parse = parseBibTeXType; },{}],377:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseAsync = exports.parse = void 0; var _json = _interopcitationRequireDefault(citationRequire("./json")); var _fetchFile = _interopcitationRequireDefault(citationRequire("../../../util/fetchFile")); var _fetchFileAsync = _interopcitationRequireDefault(citationRequire("../../../util/fetchFileAsync")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var apiHeaders = { Accept: 'application/vnd.citationstyles.csl+json' }; var fetchDoiApiAsync = function () { var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(url) { var result; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return (0, _fetchFileAsync.default)(url, { headers: apiHeaders }); case 2: result = _context.sent; return _context.abrupt("return", result === '[]' ? {} : JSON.parse(result)); case 4: case "end": return _context.stop(); } } }, _callee, this); })); return function fetchDoiApiAsync(_x) { return _ref.apply(this, arguments); }; }(); var parseDoiApiAsync = function () { var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(data) { var doiJsonList; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return Promise.all([].concat(data).map(fetchDoiApiAsync)); case 2: doiJsonList = _context2.sent; return _context2.abrupt("return", doiJsonList.map(_json.default)); case 4: case "end": return _context2.stop(); } } }, _callee2, this); })); return function parseDoiApiAsync(_x2) { return _ref2.apply(this, arguments); }; }(); exports.parseAsync = parseDoiApiAsync; var fetchDoiApi = function fetchDoiApi(url) { var result = (0, _fetchFile.default)(url, { headers: apiHeaders }); return result === '[]' ? {} : JSON.parse(result); }; var parseDoiApi = function parseDoiApi(data) { return [].concat(data).map(fetchDoiApi).map(_json.default); }; exports.parse = parseDoiApi; },{"../../../util/fetchFile":401,"../../../util/fetchFileAsync":402,"./json":380}],378:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var parseDoi = function parseDoi(data) { var list = Array.isArray(data) ? data : data.trim().split(/(?:\s+)/g); return list.map(function (doi) { return "https://doi.org/".concat(doi); }); }; exports.default = exports.parse = parseDoi; },{}],379:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formats = exports.parsers = exports.ref = void 0; var id = _interopcitationRequireWildcard(citationRequire("./id")); var api = _interopcitationRequireWildcard(citationRequire("./api")); var json = _interopcitationRequireWildcard(citationRequire("./json")); var type = _interopcitationRequireWildcard(citationRequire("./type")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var ref = '@doi'; exports.ref = ref; var parsers = { id: id, api: api, json: json, type: type }; exports.parsers = parsers; var formats = { '@doi/api': { parse: api.parse, parseAsync: api.parseAsync, parseType: { dataType: 'String', predicate: /^\s*(https?:\/\/(?:dx\.)?doi\.org\/(10.\d{4,9}\/[-._;()/:A-Z0-9]+))\s*$/i, extends: '@else/url' } }, '@doi/id': { parse: id.parse, parseType: { dataType: 'String', predicate: /^\s*(10.\d{4,9}\/[-._;()/:A-Z0-9]+)\s*$/i } }, '@doi/list+text': { parse: id.parse, parseType: { dataType: 'String', tokenList: /^10.\d{4,9}\/[-._;()/:A-Z0-9]+$/i } }, '@doi/list+object': { parse: id.parse, parseType: { dataType: 'Array', elementConstraint: '@doi/id' } }, '@doi/type': { parse: type.parse } }; exports.formats = formats; },{"./api":377,"./id":378,"./json":380,"./type":381}],380:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var _type = _interopcitationRequireDefault(citationRequire("./type")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var parseDoiJson = function parseDoiJson(data) { var res = { type: (0, _type.default)(data.type) }; var dateFields = ['submitted', 'issued', 'event-date', 'original-date', 'container', 'accessed']; dateFields.forEach(function (field) { var value = data[field]; if (value && value['date-parts'] && typeof value['date-parts'][0] === 'number') { value['date-parts'] = [value['date-parts']]; } }); return Object.assign({}, data, res); }; exports.default = exports.parse = parseDoiJson; },{"./type":381}],381:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var varDoiTypes = { 'journal-article': 'article-journal', 'book-chapter': 'chapter', 'posted-content': 'manuscript', 'proceedings-article': 'paper-conference' }; var fetchDoiType = function fetchDoiType(value) { return varDoiTypes[value] || value; }; exports.default = exports.parse = fetchDoiType; },{}],382:[function(citationRequire,module,exports){ "use strict"; var _plugins = citationRequire("../../plugins/"); var modules = _interopcitationRequireWildcard(citationRequire("./modules")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } for (var _module in modules) { var _modules$module = modules[_module], ref = _modules$module.ref, formats = _modules$module.formats; (0, _plugins.add)(ref, { input: formats }); } },{"../../plugins/":399,"./modules":383}],383:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.other = exports.wikidata = exports.doi = exports.bibtex = exports.bibjson = void 0; var bibjson = _interopcitationRequireWildcard(citationRequire("./bibjson/")); exports.bibjson = bibjson; var bibtex = _interopcitationRequireWildcard(citationRequire("./bibtex/")); exports.bibtex = bibtex; var doi = _interopcitationRequireWildcard(citationRequire("./doi/")); exports.doi = doi; var wikidata = _interopcitationRequireWildcard(citationRequire("./wikidata/")); exports.wikidata = wikidata; var other = _interopcitationRequireWildcard(citationRequire("./other/")); exports.other = other; function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } },{"./bibjson/":368,"./bibtex/":371,"./doi/":379,"./other/":386,"./wikidata/":391}],384:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = void 0; var parse = function parse() { return []; }; exports.parse = parse; },{}],385:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = void 0; var parse = function parse(input) { return input.value || input.textContent; }; exports.parse = parse; },{}],386:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formats = exports.parsers = exports.ref = void 0; var empty = _interopcitationRequireWildcard(citationRequire("./empty")); var url = _interopcitationRequireWildcard(citationRequire("./url")); var json = _interopcitationRequireWildcard(citationRequire("./json")); var jquery = _interopcitationRequireWildcard(citationRequire("./jquery")); var html = _interopcitationRequireWildcard(citationRequire("./html")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var ref = '@else'; exports.ref = ref; var parsers = { empty: empty, url: url, json: json, jquery: jquery, html: html }; exports.parsers = parsers; var formats = { '@empty/text': { parse: empty.parse, parseType: { dataType: 'String', predicate: function predicate(input) { return input === ''; } } }, '@empty/whitespace+text': { parse: empty.parse, parseType: { dataType: 'String', predicate: /^\s+$/ } }, '@empty': { parse: empty.parse, parseType: { dataType: 'Primitive', predicate: function predicate(input) { return input == null; } } }, '@else/json': { parse: json.parse, parseType: { dataType: 'String', predicate: /^\s*(\{[\S\s]*\}|\[[\S\s]*\])\s*$/ } }, '@else/url': { parse: url.parse, parseAsync: url.parseAsync, parseType: { dataType: 'String', predicate: /^https?:\/\/(([\w-]+\.)*[\w-]+)(:\d+)?(\/[^?/]*)*(\?[^#]*)?(#.*)?$/i } }, '@else/jquery': { parse: jquery.parse, parseType: { dataType: 'ComplexObject', predicate: function predicate(input) { return typeof jQuery !== 'undefined' && input instanceof jQuery; } } }, '@else/html': { parse: html.parse, parseType: { dataType: 'ComplexObject', predicate: function predicate(input) { return typeof HTMLElement !== 'undefined' && input instanceof HTMLElement; } } } }; exports.formats = formats; },{"./empty":384,"./html":385,"./jquery":387,"./json":388,"./url":389}],387:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = void 0; var parse = function parse(input) { return input.val() || input.text() || input.html(); }; exports.parse = parse; },{}],388:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var substituters = [[/((?:\[|:|,)\s*)'((?:\\'|[^'])*?[^\\])?'(?=\s*(?:\]|}|,))/g, '$1"$2"'], [/((?:(?:"|]|}|\/[gmiuys]|\.|(?:\d|\.|-)*\d)\s*,|{)\s*)(?:"([^":\n]+?)"|'([^":\n]+?)'|([^":\n]+?))(\s*):/g, '$1"$2$3$4"$5:']]; var parseJSON = function parseJSON(str) { try { return JSON.parse(str); } catch (e) { logger.info('[set]', 'Input was not valid JSON, switching to experimental parser for invalid JSON'); try { substituters.forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), regex = _ref2[0], subst = _ref2[1]; str = str.replace(regex, subst); }); return JSON.parse(str); } catch (e) { logger.error('[set]', 'Experimental parser failed. Please improve the JSON. If this is not JSON, please re-read the supported formats.'); return undefined; } } }; exports.default = exports.parse = parseJSON; },{}],389:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "parse", { enumerable: true, get: function get() { return _fetchFile.default; } }); Object.defineProperty(exports, "parseAsync", { enumerable: true, get: function get() { return _fetchFileAsync.default; } }); var _fetchFile = _interopcitationRequireDefault(citationRequire("../../../util/fetchFile")); var _fetchFileAsync = _interopcitationRequireDefault(citationRequire("../../../util/fetchFileAsync")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"../../../util/fetchFile":401,"../../../util/fetchFileAsync":402}],390:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "parse", { enumerable: true, get: function get() { return _fetchFile.default; } }); Object.defineProperty(exports, "parseAsync", { enumerable: true, get: function get() { return _fetchFileAsync.default; } }); var _fetchFile = _interopcitationRequireDefault(citationRequire("../../../util/fetchFile")); var _fetchFileAsync = _interopcitationRequireDefault(citationRequire("../../../util/fetchFileAsync")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"../../../util/fetchFile":401,"../../../util/fetchFileAsync":402}],391:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formats = exports.parsers = exports.ref = void 0; var list = _interopcitationRequireWildcard(citationRequire("./list")); var json = _interopcitationRequireWildcard(citationRequire("./json")); var prop = _interopcitationRequireWildcard(citationRequire("./prop")); var type = _interopcitationRequireWildcard(citationRequire("./type")); var url = _interopcitationRequireWildcard(citationRequire("./url")); var api = _interopcitationRequireWildcard(citationRequire("./api")); function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var ref = '@wikidata'; exports.ref = ref; var parsers = { list: list, json: json, prop: prop, type: type, url: url, api: api }; exports.parsers = parsers; var formats = { '@wikidata/id': { parse: list.parse, parseType: { dataType: 'String', predicate: /^\s*(Q\d+)\s*$/ } }, '@wikidata/list+text': { parse: list.parse, parseType: { dataType: 'String', predicate: /^\s*((?:Q\d+(?:\s+|,|))*Q\d+)\s*$/ } }, '@wikidata/api': { parse: api.parse, parseAsync: api.parseAsync, parseType: { dataType: 'String', predicate: /^(https?:\/\/(?:www\.)?wikidata.org\/w\/api\.php(?:\?.*)?)$/, extends: '@else/url' } }, '@wikidata/url': { parse: url.parse, parseType: { dataType: 'String', predicate: /\/(Q\d+)(?:[#?/]|\s*$)/, extends: '@else/url' } }, '@wikidata/list+object': { parse: list.parse, parseType: { dataType: 'Array', elementConstraint: '@wikidata/id' } }, '@wikidata/object': { parse: json.parse, parseAsync: json.parseAsync, parseType: { dataType: 'SimpleObject', propertyConstraint: { props: 'entities' } } }, '@wikidata/prop': { parse: prop.parse }, '@wikidata/type': { parse: type.parse } }; exports.formats = formats; },{"./api":390,"./json":392,"./list":393,"./prop":394,"./type":395,"./url":396}],392:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseAsync = exports.default = exports.parse = void 0; var _wikidataSdk = _interopcitationRequireDefault(citationRequire("wikidata-sdk")); var _prop = citationRequire("./prop"); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var parseWikidataJSONAsync = function () { var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(data) { return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: return _context3.abrupt("return", Promise.all(Object.keys(data.entities).map(function () { var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(entityKey) { var _data$entities$entity, labels, claims, entity, json; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _data$entities$entity = data.entities[entityKey], labels = _data$entities$entity.labels, claims = _data$entities$entity.claims; entity = _wikidataSdk.default.simplifyClaims(claims, null, null, true); json = { _wikiId: entityKey, id: entityKey }; _context2.next = 5; return Promise.all(Object.keys(entity).map(function () { var _ref3 = _asyncToGenerator(regeneratorRuntime.mark(function _callee(prop) { var field, _field, fieldName, fieldValue; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return (0, _prop.parseAsync)(prop, entity[prop], 'en'); case 2: field = _context.sent; if (field) { _field = _slicedToArray(field, 2), fieldName = _field[0], fieldValue = _field[1]; if (Array.isArray(json[fieldName])) { json[fieldName] = json[fieldName].concat(fieldValue); } else if (fieldValue !== undefined) { json[fieldName] = fieldValue; } } case 4: case "end": return _context.stop(); } } }, _callee, this); })); return function (_x3) { return _ref3.apply(this, arguments); }; }())); case 5: if (Array.isArray(json.author)) { json.author.sort(function (_ref4, _ref5) { var a = _ref4._ordinal; var b = _ref5._ordinal; return a - b; }); } if (!json.title) { json.title = labels['en'].value; } return _context2.abrupt("return", json); case 8: case "end": return _context2.stop(); } } }, _callee2, this); })); return function (_x2) { return _ref2.apply(this, arguments); }; }()))); case 1: case "end": return _context3.stop(); } } }, _callee3, this); })); return function parseWikidataJSONAsync(_x) { return _ref.apply(this, arguments); }; }(); exports.parseAsync = parseWikidataJSONAsync; var parseWikidataJSON = function parseWikidataJSON(data) { return Object.keys(data.entities).map(function (entityKey) { var _data$entities$entity2 = data.entities[entityKey], labels = _data$entities$entity2.labels, claims = _data$entities$entity2.claims; var entity = _wikidataSdk.default.simplifyClaims(claims, null, null, true); var json = { _wikiId: entityKey, id: entityKey }; Object.keys(entity).forEach(function (prop) { var field = (0, _prop.parse)(prop, entity[prop], 'en'); if (field) { var _field2 = _slicedToArray(field, 2), fieldName = _field2[0], fieldValue = _field2[1]; if (Array.isArray(json[fieldName])) { json[fieldName] = json[fieldName].concat(fieldValue); } else if (fieldValue !== undefined) { json[fieldName] = fieldValue; } } }); if (Array.isArray(json.author)) { json.author.sort(function (_ref6, _ref7) { var a = _ref6._ordinal; var b = _ref7._ordinal; return a - b; }); } if (!json.title) { json.title = labels['en'].value; } return json; }); }; exports.default = exports.parse = parseWikidataJSON; },{"./prop":394,"wikidata-sdk":309}],393:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var _wikidataSdk = _interopcitationRequireDefault(citationRequire("wikidata-sdk")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var parseWikidata = function parseWikidata(data) { var list = Array.isArray(data) ? data : data.trim().split(/(?:[\s,]\s*)/g); return [].concat(_wikidataSdk.default.getEntities(list, ['en'])); }; exports.default = exports.parse = parseWikidata; },{"wikidata-sdk":309}],394:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseAsync = exports.default = exports.parse = void 0; var _wikidataSdk = _interopcitationRequireDefault(citationRequire("wikidata-sdk")); var _fetchFile = _interopcitationRequireDefault(citationRequire("../../../util/fetchFile")); var _fetchFileAsync = _interopcitationRequireDefault(citationRequire("../../../util/fetchFileAsync")); var _type = _interopcitationRequireDefault(citationRequire("./type")); var _date = _interopcitationRequireDefault(citationRequire("../../date")); var _name = _interopcitationRequireDefault(citationRequire("../../name")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var getSeriesOrdinal = function getSeriesOrdinal(qualifiers) { return qualifiers.P1545 ? parseInt(qualifiers.P1545[0]) : -1; }; var getStatedAs = function getStatedAs(qualifiers) { return qualifiers.P1932; }; var propMap = { P31: 'type', P50: 'author', P57: 'director', P86: 'composer', P98: 'editor', P110: 'illustrator', P123: 'publisher', P136: 'genre', P212: 'ISBN', P236: 'ISSN', P291: 'publisher-place', P304: 'page', P348: 'version', P356: 'DOI', P393: 'edition', P433: 'issue', P478: 'volume', P577: 'issued', P655: 'translator', P698: 'PMID', P932: 'PMCID', P953: 'URL', P957: 'ISBN', P1104: 'number-of-pages', P1433: 'container-title', P1476: 'title', P2093: 'author', P2860: false, P921: false, P3181: false, P364: false }; var fetchWikidataLabel = function fetchWikidataLabel(q, lang) { var ids = Array.isArray(q) ? q : typeof q === 'string' ? q.split('|') : ''; var url = _wikidataSdk.default.getEntities(ids, [lang], 'labels'); var entities = JSON.parse((0, _fetchFile.default)(url)).entities || {}; return Object.keys(entities).map(function (entityKey) { return (entities[entityKey].labels[lang] || {}).value; }); }; var parseWikidataName = function parseWikidataName(_ref, lang) { var value = _ref.value, qualifiers = _ref.qualifiers; var statedAs = getStatedAs(qualifiers); var name = statedAs || fetchWikidataLabel(value, lang)[0]; name = (0, _name.default)(name); name._ordinal = getSeriesOrdinal(qualifiers); return name; }; var parseWikidataProp = function parseWikidataProp(name, value, lang) { if (!propMap.hasOwnProperty(name)) { logger.info('[set]', "Unknown property: ".concat(name)); return undefined; } else if (propMap[name] === false) { return undefined; } var cslProp = propMap[name]; if (!value) { return cslProp; } var cslValue = function (prop, valueList) { var value = valueList[0].value; switch (prop) { case 'P31': var type = (0, _type.default)(value); if (!type) { logger.warn('[set]', "Wikidata entry type not recognized: ".concat(value, ". Defaulting to \"book\".")); return 'book'; } return type; case 'P50': case 'P57': case 'P86': case 'P98': case 'P110': case 'P655': return valueList.map(function (name) { return parseWikidataName(name, lang); }); case 'P577': return (0, _date.default)(value); case 'P123': case 'P136': case 'P291': case 'P1433': return fetchWikidataLabel(value, lang)[0]; case 'P2093': return valueList.map(function (_ref2) { var value = _ref2.value, qualifiers = _ref2.qualifiers; var name = (0, _name.default)(value); name._ordinal = getSeriesOrdinal(qualifiers); return name; }); default: return value; } }(name, value); return [cslProp, cslValue]; }; exports.default = exports.parse = parseWikidataProp; var fetchWikidataLabelAsync = function () { var _ref3 = _asyncToGenerator(regeneratorRuntime.mark(function _callee(q, lang) { var ids, url, entities; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: ids = Array.isArray(q) ? q : typeof q === 'string' ? q.split('|') : ''; url = _wikidataSdk.default.getEntities(ids, [lang], 'labels'); _context.t1 = JSON; _context.next = 5; return (0, _fetchFileAsync.default)(url); case 5: _context.t2 = _context.sent; _context.t0 = _context.t1.parse.call(_context.t1, _context.t2).entities; if (_context.t0) { _context.next = 9; break; } _context.t0 = {}; case 9: entities = _context.t0; return _context.abrupt("return", Object.keys(entities).map(function (entityKey) { return (entities[entityKey].labels[lang] || {}).value; })); case 11: case "end": return _context.stop(); } } }, _callee, this); })); return function fetchWikidataLabelAsync(_x, _x2) { return _ref3.apply(this, arguments); }; }(); var parseWikidataNameAsync = function () { var _ref5 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(_ref4, lang) { var value, qualifiers, statedAs, name; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: value = _ref4.value, qualifiers = _ref4.qualifiers; statedAs = getStatedAs(qualifiers); _context2.t0 = statedAs; if (_context2.t0) { _context2.next = 7; break; } _context2.next = 6; return fetchWikidataLabelAsync(value, lang); case 6: _context2.t0 = _context2.sent[0]; case 7: name = _context2.t0; name = (0, _name.default)(name); name._ordinal = getSeriesOrdinal(qualifiers); return _context2.abrupt("return", name); case 11: case "end": return _context2.stop(); } } }, _callee2, this); })); return function parseWikidataNameAsync(_x3, _x4) { return _ref5.apply(this, arguments); }; }(); var parseWikidataPropAsync = function () { var _ref6 = _asyncToGenerator(regeneratorRuntime.mark(function _callee4(prop, value, lang) { var cslValue; return regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; return function () { var _ref7 = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(prop, valueList) { var value; return regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: value = valueList[0].value; _context3.t0 = prop; _context3.next = _context3.t0 === 'P50' ? 4 : _context3.t0 === 'P57' ? 4 : _context3.t0 === 'P86' ? 4 : _context3.t0 === 'P98' ? 4 : _context3.t0 === 'P110' ? 4 : _context3.t0 === 'P655' ? 4 : _context3.t0 === 'P123' ? 5 : _context3.t0 === 'P136' ? 5 : _context3.t0 === 'P291' ? 5 : _context3.t0 === 'P1433' ? 5 : 8; break; case 4: return _context3.abrupt("return", Promise.all(valueList.map(function (name) { return parseWikidataNameAsync(name, lang); }))); case 5: _context3.next = 7; return fetchWikidataLabelAsync(value, lang); case 7: return _context3.abrupt("return", _context3.sent[0]); case 8: case "end": return _context3.stop(); } } }, _callee3, this); })); return function (_x8, _x9) { return _ref7.apply(this, arguments); }; }()(prop, value); case 2: cslValue = _context4.sent; if (!cslValue) { _context4.next = 7; break; } return _context4.abrupt("return", [parseWikidataProp(prop), cslValue]); case 7: return _context4.abrupt("return", parseWikidataProp(prop, value, lang)); case 8: case "end": return _context4.stop(); } } }, _callee4, this); })); return function parseWikidataPropAsync(_x5, _x6, _x7) { return _ref6.apply(this, arguments); }; }(); exports.parseAsync = parseWikidataPropAsync; },{"../../../util/fetchFile":401,"../../../util/fetchFileAsync":402,"../../date":358,"../../name":397,"./type":395,"wikidata-sdk":309}],395:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.parse = void 0; var varWikidataTypes = { Q49848: 'article', Q191067: 'article', Q13442814: 'article-journal', Q18918145: 'article-journal', Q38926: 'article-newspaper', Q5707594: 'article-newspaper', Q30070590: 'article-magazine', Q686822: 'bill', Q3331189: 'book', Q571: 'book', Q1555508: 'broadcast', Q15416: 'broadcast', Q1980247: 'chapter', Q1172284: 'dataset', Q10389811: 'entry', Q19389637: 'entry', Q17329259: 'entry-encyclopedia', Q30070753: 'figure', Q1027879: 'graphic', Q4502142: 'graphic', Q478798: 'graphic', Q838948: 'graphic', Q178651: 'interview', Q49371: 'legislation', Q820655: 'legislation', Q2334719: 'legal_case', Q87167: 'manuscript', Q4006: 'map', Q11424: 'motion_picture', Q30070675: 'motion_picture', Q187947: 'musical_score', Q18536349: 'pamphlet', Q190399: 'pamphlet', Q26973022: 'paper-conference', Q23927052: 'paper-conference', Q253623: 'patent', Q30070565: 'personal_communication', Q30070439: 'personal_communication', Q133492: 'personal_communication', Q628523: 'personal_communication', Q7216866: 'post', Q17928402: 'post-blog', Q10870555: 'report', Q265158: 'review', Q637866: 'review-book', Q7366: 'song', Q3741908: 'song', Q30070318: 'song', Q24634210: 'song', Q861911: 'speech', Q1266946: 'thesis', Q187685: 'thesis', Q131569: 'treaty', Q36774: 'webpage' }; var fetchWikidataType = function fetchWikidataType(value) { return varWikidataTypes[value]; }; exports.default = exports.parse = fetchWikidataType; },{}],396:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = void 0; var parse = function parse(input) { return input.match(/\/(Q\d+)(?:[#?/]|\s*$)/)[1]; }; exports.parse = parse; },{}],397:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "parse", { enumerable: true, get: function get() { return _name.parse; } }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _name.parse; } }); exports.types = exports.scope = void 0; var _name = citationRequire("@citation-js/name"); var scope = '@name'; exports.scope = scope; var types = '@name'; exports.types = types; },{"@citation-js/name":279}],398:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.remove = exports.get = exports.add = void 0; var configs = {}; var add = function add(ref, config) { configs[ref] = config; }; exports.add = add; var get = function get(ref) { return configs[ref]; }; exports.get = get; var remove = function remove(ref) { delete configs[ref]; }; exports.remove = remove; },{}],399:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.config = exports.dict = exports.output = exports.input = exports.list = exports.has = exports.remove = exports.add = void 0; var input = _interopcitationRequireWildcard(citationRequire("../parse/interface/")); exports.input = input; var output = _interopcitationRequireWildcard(citationRequire("../get/registrar")); exports.output = output; var dict = _interopcitationRequireWildcard(citationRequire("../get/dict")); exports.dict = dict; var config = _interopcitationRequireWildcard(citationRequire("./config")); exports.config = config; function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var registers = { input: input, output: output, dict: dict, config: config }; var indices = {}; var add = function add(ref) { var plugins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var mainIndex = indices[ref] = {}; if ('config' in plugins) { registers.config.add(ref, plugins.config); delete plugins.config; } for (var type in plugins) { var typeIndex = mainIndex[type] = {}; var typePlugins = plugins[type]; for (var name in typePlugins) { var typePlugin = typePlugins[name]; typeIndex[name] = true; registers[type].add(name, typePlugin); } } }; exports.add = add; var remove = function remove(ref) { var mainIndex = indices[ref]; for (var type in mainIndex) { var typeIndex = mainIndex[type]; for (var name in typeIndex) { registers[type].remove(name); } } delete indices[ref]; }; exports.remove = remove; var has = function has(ref) { return ref in indices; }; exports.has = has; var list = function list() { return Object.keys(indices); }; exports.list = list; },{"../get/dict":331,"../get/registrar":355,"../parse/interface/":364,"./config":398}],400:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var deepCopy = function deepCopy(obj) { return JSON.parse(JSON.stringify(obj)); }; var _default = deepCopy; exports.default = _default; },{}],401:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _syncRequest = _interopcitationRequireDefault(citationRequire("sync-request")); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var fetchFile = function fetchFile(url) { var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var reqOpts = {}; if (opts.headers) { reqOpts.headers = opts.headers; reqOpts.allowRedirectHeaders = Object.keys(opts.headers); } try { return (0, _syncRequest.default)('GET', url, reqOpts).getBody('utf8'); } catch (e) { logger.error('[set]', "File '".concat(url, "' could not be fetched:"), e.message); return '[]'; } }; var _default = fetchFile; exports.default = _default; },{"sync-request":291}],402:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; citationRequire("isomorphic-fetch"); function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var fetchFileAsync = function () { var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(url) { var opts, reqOpts, _args = arguments; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: opts = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; reqOpts = {}; if (opts.headers) { reqOpts.headers = opts.headers; reqOpts.allowRedirectHeaders = Object.keys(opts.headers); } _context.prev = 3; return _context.abrupt("return", fetch(url, reqOpts).then(function (response) { return response.text(); })); case 7: _context.prev = 7; _context.t0 = _context["catch"](3); logger.error('[set]', "File '".concat(url, "' could not be fetched:"), _context.t0.message); return _context.abrupt("return", '[]'); case 11: case "end": return _context.stop(); } } }, _callee, this, [[3, 7]]); })); return function fetchFileAsync(_x) { return _ref.apply(this, arguments); }; }(); var _default = fetchFileAsync; exports.default = _default; },{"isomorphic-fetch":284}],403:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var fetchId = function fetchId(list, prefix) { var id; while (list.includes(id)) { id = "".concat(prefix).concat(Math.random().toString().slice(2)); } return id; }; var _default = fetchId; exports.default = _default; },{}],404:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "deepCopy", { enumerable: true, get: function get() { return _deepCopy.default; } }); Object.defineProperty(exports, "fetchFile", { enumerable: true, get: function get() { return _fetchFile.default; } }); Object.defineProperty(exports, "fetchFileAsync", { enumerable: true, get: function get() { return _fetchFileAsync.default; } }); Object.defineProperty(exports, "fetchId", { enumerable: true, get: function get() { return _fetchId.default; } }); Object.defineProperty(exports, "TokenStack", { enumerable: true, get: function get() { return _stack.default; } }); Object.defineProperty(exports, "Register", { enumerable: true, get: function get() { return _register.default; } }); exports.attr = void 0; var _deepCopy = _interopcitationRequireDefault(citationRequire("./deepCopy")); var _fetchFile = _interopcitationRequireDefault(citationRequire("./fetchFile")); var _fetchFileAsync = _interopcitationRequireDefault(citationRequire("./fetchFileAsync")); var _fetchId = _interopcitationRequireDefault(citationRequire("./fetchId")); var _stack = _interopcitationRequireDefault(citationRequire("./stack")); var _register = _interopcitationRequireDefault(citationRequire("./register")); var _attr = citationRequire("../get/modules/csl/attr"); var _affix = citationRequire("../get/modules/csl/affix"); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var attr = { getAttributedEntry: _attr.getAttributedEntry, getPrefixedEntry: _attr.getPrefixedEntry, getWrappedEntry: _affix.getWrappedEntry }; exports.attr = attr; },{"../get/modules/csl/affix":339,"../get/modules/csl/attr":340,"./deepCopy":400,"./fetchFile":401,"./fetchFileAsync":402,"./fetchId":403,"./register":405,"./stack":406}],405:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var Register = function () { function Register() { var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, Register); this.data = data; } _createClass(Register, [{ key: "set", value: function set(key, value) { this.data[key] = value; return this; } }, { key: "add", value: function add() { return this.set.apply(this, arguments); } }, { key: "delete", value: function _delete(key) { delete this.data[key]; return this; } }, { key: "remove", value: function remove() { return this.delete.apply(this, arguments); } }, { key: "get", value: function get(key) { return this.data[key]; } }, { key: "has", value: function has(key) { return this.data.hasOwnProperty(key); } }, { key: "list", value: function list() { return Object.keys(this.data); } }]); return Register; }(); var _default = Register; exports.default = _default; },{}],406:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var TokenStack = function () { function TokenStack(array) { _classCallCheck(this, TokenStack); this.stack = array; this.index = 0; this.current = this.stack[this.index]; } _createClass(TokenStack, [{ key: "tokensLeft", value: function tokensLeft() { return this.stack.length - this.index; } }, { key: "matches", value: function matches(pattern) { return TokenStack.getMatchCallback(pattern)(this.current, this.index, this.stack); } }, { key: "matchesSequence", value: function matchesSequence(sequence) { var part = this.stack.slice(this.index, this.index + sequence.length).join(''); return typeof sequence === 'string' ? part === sequence : sequence.every(function (pattern, index) { return TokenStack.getMatchCallback(pattern)(part[index]); }); } }, { key: "consumeToken", value: function consumeToken() { var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : /^[\s\S]$/; var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$inverse = _ref.inverse, inverse = _ref$inverse === void 0 ? false : _ref$inverse, _ref$spaced = _ref.spaced, spaced = _ref$spaced === void 0 ? true : _ref$spaced; if (spaced) { this.consumeWhitespace(); } var token = this.current; var match = TokenStack.getMatchCallback(pattern)(token, this.index, this.stack); if (match) { this.current = this.stack[++this.index]; } else { throw new SyntaxError("Unexpected token at index ".concat(this.index, ": Expected ").concat(TokenStack.getPatternText(pattern), ", got \"").concat(token, "\"")); } if (spaced) { this.consumeWhitespace(); } return token; } }, { key: "consumeWhitespace", value: function consumeWhitespace() { var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : /^\s$/; var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref2$optional = _ref2.optional, optional = _ref2$optional === void 0 ? true : _ref2$optional; return this.consume(pattern, { min: +!optional }); } }, { key: "consumeN", value: function consumeN(length) { if (this.tokensLeft() < length) { throw new SyntaxError('Not enough tokens left'); } var start = this.index; while (length--) { this.current = this.stack[++this.index]; } return this.stack.slice(start, this.index).join(''); } }, { key: "consumeSequence", value: function consumeSequence(sequence) { if (this.matchesSequence(sequence)) { return this.consumeN(sequence.length); } else { throw new SyntaxError("Expected \"".concat(sequence, "\", got \"").concat(this.consumeN(sequence.length), "\"")); } } }, { key: "consume", value: function consume() { var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : /^[\s\S]$/; var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref3$min = _ref3.min, min = _ref3$min === void 0 ? 0 : _ref3$min, _ref3$max = _ref3.max, max = _ref3$max === void 0 ? Infinity : _ref3$max, _ref3$inverse = _ref3.inverse, inverse = _ref3$inverse === void 0 ? false : _ref3$inverse, tokenMap = _ref3.tokenMap, tokenFilter = _ref3.tokenFilter; var start = this.index; var match = TokenStack.getMatchCallback(pattern); while (match(this.current, this.index, this.stack) !== inverse) { this.current = this.stack[++this.index]; } var consumed = this.stack.slice(start, this.index); if (consumed.length < min) { throw new SyntaxError("Not enough ".concat(TokenStack.getPatternText(pattern))); } else if (consumed.length > max) { throw new SyntaxError("Too many ".concat(TokenStack.getPatternText(pattern))); } if (tokenMap) { consumed = consumed.map(tokenMap); } if (tokenFilter) { consumed = consumed.filter(tokenFilter); } return consumed.join(''); } }], [{ key: "getPatternText", value: function getPatternText(pattern) { return "\"".concat(pattern instanceof RegExp ? pattern.source : pattern, "\""); } }, { key: "getMatchCallback", value: function getMatchCallback(pattern) { if (Array.isArray(pattern)) { var matches = pattern.map(TokenStack.getMatchCallback); return function (token) { return matches.some(function (matchCallback) { return matchCallback(token); }); }; } else if (pattern instanceof Function) { return pattern; } else if (pattern instanceof RegExp) { return function (token) { return pattern.test(token); }; } else { return function (token) { return pattern === token; }; } } }]); return TokenStack; }(); var _default = TokenStack; exports.default = _default; },{}],407:[function(citationRequire,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "cite", { enumerable: true, get: function get() { return _package.version; } }); Object.defineProperty(exports, "citeproc", { enumerable: true, get: function get() { return _citeproc.PROCESSOR_VERSION; } }); var _package = citationRequire("../package.json"); var _citeproc = citationRequire("citeproc"); },{"../package.json":320,"citeproc":282}],"citation-js":[function(citationRequire,module,exports){ "use strict"; citationRequire("@babel/polyfill"); citationRequire("./logger"); var staticMethods = _interopcitationRequireWildcard(citationRequire("./Cite/static")); var plugins = _interopcitationRequireWildcard(citationRequire("./plugins/index")); var get = _interopcitationRequireWildcard(citationRequire("./get/index")); var parse = _interopcitationRequireWildcard(citationRequire("./parse/index")); var util = _interopcitationRequireWildcard(citationRequire("./util/index")); var version = _interopcitationRequireWildcard(citationRequire("./version")); var _index5 = _interopcitationRequireDefault(citationRequire("./Cite/index")); var _locales = _interopcitationRequireWildcard(citationRequire("./get/modules/csl/locales")); var _styles = _interopcitationRequireWildcard(citationRequire("./get/modules/csl/styles")); var _engines = citationRequire("./get/modules/csl/engines"); function _interopcitationRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopcitationRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var CSL = { engine: _engines.fetchEngine, style: _styles.default, locale: _locales.default, item: function item(data) { return function (id) { return data.find(function (entry) { return entry.id === id; }); }; }, register: { addTemplate: _styles.templates.add.bind(_styles.templates), getTemplate: _styles.templates.get.bind(_styles.templates), hasTemplate: _styles.templates.has.bind(_styles.templates), addLocale: _locales.locales.add.bind(_locales.locales), getLocale: _locales.locales.get.bind(_locales.locales), hasLocale: _locales.locales.has.bind(_locales.locales) } }; Object.assign(_index5.default, staticMethods, { plugins: plugins, get: get, CSL: CSL, parse: parse, util: util, version: version, input: parse.chain, inputAsync: parse.chainAsync }); module.exports = _index5.default; },{"./Cite/index":323,"./Cite/static":328,"./get/index":332,"./get/modules/csl/engines":343,"./get/modules/csl/locales":346,"./get/modules/csl/styles":348,"./logger":356,"./parse/index":359,"./plugins/index":399,"./util/index":404,"./version":407,"@babel/polyfill":1}]},{},[]);