e0f7a5f4f6a3e042e39ed17db492e897077e9e3a
[rails.git] / vendor / assets / iD / iD.js
1 (function () {
2         var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3
4         function commonjsRequire () {
5                 throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
6         }
7
8         function unwrapExports (x) {
9                 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
10         }
11
12         function createCommonjsModule(fn, module) {
13                 return module = { exports: {} }, fn(module, module.exports), module.exports;
14         }
15
16         function getCjsExportFromNamespace (n) {
17                 return n && n['default'] || n;
18         }
19
20         var isImplemented = function () {
21                 var set, iterator, result;
22                 if (typeof Set !== 'function') return false;
23                 set = new Set(['raz', 'dwa', 'trzy']);
24                 if (String(set) !== '[object Set]') return false;
25                 if (set.size !== 3) return false;
26                 if (typeof set.add !== 'function') return false;
27                 if (typeof set.clear !== 'function') return false;
28                 if (typeof set.delete !== 'function') return false;
29                 if (typeof set.entries !== 'function') return false;
30                 if (typeof set.forEach !== 'function') return false;
31                 if (typeof set.has !== 'function') return false;
32                 if (typeof set.keys !== 'function') return false;
33                 if (typeof set.values !== 'function') return false;
34
35                 iterator = set.values();
36                 result = iterator.next();
37                 if (result.done !== false) return false;
38                 if (result.value !== 'raz') return false;
39
40                 return true;
41         };
42
43         // eslint-disable-next-line no-empty-function
44         var noop = function () {};
45
46         var _undefined = noop(); // Support ES3 engines
47
48         var isValue = function (val) {
49          return (val !== _undefined) && (val !== null);
50         };
51
52         var validValue = function (value) {
53                 if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
54                 return value;
55         };
56
57         var clear = function () {
58                 validValue(this).length = 0;
59                 return this;
60         };
61
62         var isImplemented$1 = function () {
63                 var numberIsNaN = Number.isNaN;
64                 if (typeof numberIsNaN !== "function") return false;
65                 return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
66         };
67
68         var shim = function (value) {
69                 // eslint-disable-next-line no-self-compare
70                 return value !== value;
71         };
72
73         var isNan = isImplemented$1()
74                 ? Number.isNaN
75                 : shim;
76
77         var isImplemented$2 = function () {
78                 var sign = Math.sign;
79                 if (typeof sign !== "function") return false;
80                 return (sign(10) === 1) && (sign(-20) === -1);
81         };
82
83         var shim$1 = function (value) {
84                 value = Number(value);
85                 if (isNaN(value) || (value === 0)) return value;
86                 return value > 0 ? 1 : -1;
87         };
88
89         var sign = isImplemented$2()
90                 ? Math.sign
91                 : shim$1;
92
93         var abs = Math.abs, floor = Math.floor;
94
95         var toInteger = function (value) {
96                 if (isNaN(value)) return 0;
97                 value = Number(value);
98                 if ((value === 0) || !isFinite(value)) return value;
99                 return sign(value) * floor(abs(value));
100         };
101
102         var max = Math.max;
103
104         var toPosInteger = function (value) {
105          return max(0, toInteger(value));
106         };
107
108         var indexOf           = Array.prototype.indexOf
109           , objHasOwnProperty = Object.prototype.hasOwnProperty
110           , abs$1               = Math.abs
111           , floor$1             = Math.floor;
112
113         var eIndexOf = function (searchElement /*, fromIndex*/) {
114                 var i, length, fromIndex, val;
115                 if (!isNan(searchElement)) return indexOf.apply(this, arguments);
116
117                 length = toPosInteger(validValue(this).length);
118                 fromIndex = arguments[1];
119                 if (isNaN(fromIndex)) fromIndex = 0;
120                 else if (fromIndex >= 0) fromIndex = floor$1(fromIndex);
121                 else fromIndex = toPosInteger(this.length) - floor$1(abs$1(fromIndex));
122
123                 for (i = fromIndex; i < length; ++i) {
124                         if (objHasOwnProperty.call(this, i)) {
125                                 val = this[i];
126                                 if (isNan(val)) return i; // Jslint: ignore
127                         }
128                 }
129                 return -1;
130         };
131
132         var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {};
133
134         var isImplemented$3 = function (/* CustomCreate*/) {
135                 var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create;
136                 if (typeof setPrototypeOf !== "function") return false;
137                 return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject;
138         };
139
140         var map = { function: true, object: true };
141
142         var isObject = function (value) {
143                 return (isValue(value) && map[typeof value]) || false;
144         };
145
146         var create$1 = Object.create, shim$2;
147
148         if (!isImplemented$3()) {
149                 shim$2 = shim$3;
150         }
151
152         var create_1 = (function () {
153                 var nullObject, polyProps, desc;
154                 if (!shim$2) return create$1;
155                 if (shim$2.level !== 1) return create$1;
156
157                 nullObject = {};
158                 polyProps = {};
159                 desc = {
160                         configurable: false,
161                         enumerable: false,
162                         writable: true,
163                         value: undefined
164                 };
165                 Object.getOwnPropertyNames(Object.prototype).forEach(function (name) {
166                         if (name === "__proto__") {
167                                 polyProps[name] = {
168                                         configurable: true,
169                                         enumerable: false,
170                                         writable: true,
171                                         value: undefined
172                                 };
173                                 return;
174                         }
175                         polyProps[name] = desc;
176                 });
177                 Object.defineProperties(nullObject, polyProps);
178
179                 Object.defineProperty(shim$2, "nullPolyfill", {
180                         configurable: false,
181                         enumerable: false,
182                         writable: false,
183                         value: nullObject
184                 });
185
186                 return function (prototype, props) {
187                         return create$1(prototype === null ? nullObject : prototype, props);
188                 };
189         }());
190
191         var objIsPrototypeOf = Object.prototype.isPrototypeOf
192           , defineProperty  = Object.defineProperty
193           , nullDesc        = {
194                 configurable: true,
195                 enumerable: false,
196                 writable: true,
197                 value: undefined
198         }
199           , validate;
200
201         validate = function (obj, prototype) {
202                 validValue(obj);
203                 if (prototype === null || isObject(prototype)) return obj;
204                 throw new TypeError("Prototype must be null or an object");
205         };
206
207         var shim$3 = (function (status) {
208                 var fn, set;
209                 if (!status) return null;
210                 if (status.level === 2) {
211                         if (status.set) {
212                                 set = status.set;
213                                 fn = function (obj, prototype) {
214                                         set.call(validate(obj, prototype), prototype);
215                                         return obj;
216                                 };
217                         } else {
218                                 fn = function (obj, prototype) {
219                                         validate(obj, prototype).__proto__ = prototype;
220                                         return obj;
221                                 };
222                         }
223                 } else {
224                         fn = function self(obj, prototype) {
225                                 var isNullBase;
226                                 validate(obj, prototype);
227                                 isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj);
228                                 if (isNullBase) delete self.nullPolyfill.__proto__;
229                                 if (prototype === null) prototype = self.nullPolyfill;
230                                 obj.__proto__ = prototype;
231                                 if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc);
232                                 return obj;
233                         };
234                 }
235                 return Object.defineProperty(fn, "level", {
236                         configurable: false,
237                         enumerable: false,
238                         writable: false,
239                         value: status.level
240                 });
241         }(
242                 (function () {
243                         var tmpObj1 = Object.create(null)
244                           , tmpObj2 = {}
245                           , set
246                           , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
247
248                         if (desc) {
249                                 try {
250                                         set = desc.set; // Opera crashes at this point
251                                         set.call(tmpObj1, tmpObj2);
252                                 } catch (ignore) {}
253                                 if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 };
254                         }
255
256                         tmpObj1.__proto__ = tmpObj2;
257                         if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 };
258
259                         tmpObj1 = {};
260                         tmpObj1.__proto__ = tmpObj2;
261                         if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 };
262
263                         return false;
264                 })()
265         ));
266
267         var setPrototypeOf = isImplemented$3()
268                 ? Object.setPrototypeOf
269                 : shim$3;
270
271         var validCallable = function (fn) {
272                 if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
273                 return fn;
274         };
275
276         var isImplemented$4 = function () {
277                 var assign = Object.assign, obj;
278                 if (typeof assign !== "function") return false;
279                 obj = { foo: "raz" };
280                 assign(obj, { bar: "dwa" }, { trzy: "trzy" });
281                 return (obj.foo + obj.bar + obj.trzy) === "razdwatrzy";
282         };
283
284         var isImplemented$5 = function () {
285                 try {
286                         Object.keys("primitive");
287                         return true;
288                 } catch (e) {
289                         return false;
290                 }
291         };
292
293         var keys = Object.keys;
294
295         var shim$4 = function (object) { return keys(isValue(object) ? Object(object) : object); };
296
297         var keys$1 = isImplemented$5() ? Object.keys : shim$4;
298
299         var max$1   = Math.max;
300
301         var shim$5 = function (dest, src /*, …srcn*/) {
302                 var error, i, length = max$1(arguments.length, 2), assign;
303                 dest = Object(validValue(dest));
304                 assign = function (key) {
305                         try {
306                                 dest[key] = src[key];
307                         } catch (e) {
308                                 if (!error) error = e;
309                         }
310                 };
311                 for (i = 1; i < length; ++i) {
312                         src = arguments[i];
313                         keys$1(src).forEach(assign);
314                 }
315                 if (error !== undefined) throw error;
316                 return dest;
317         };
318
319         var assign = isImplemented$4()
320                 ? Object.assign
321                 : shim$5;
322
323         var forEach = Array.prototype.forEach, create$2 = Object.create;
324
325         var process$1 = function (src, obj) {
326                 var key;
327                 for (key in src) obj[key] = src[key];
328         };
329
330         // eslint-disable-next-line no-unused-vars
331         var normalizeOptions = function (opts1 /*, …options*/) {
332                 var result = create$2(null);
333                 forEach.call(arguments, function (options) {
334                         if (!isValue(options)) return;
335                         process$1(Object(options), result);
336                 });
337                 return result;
338         };
339
340         // Deprecated
341
342         var isCallable = function (obj) {
343          return typeof obj === "function";
344         };
345
346         var str = "razdwatrzy";
347
348         var isImplemented$6 = function () {
349                 if (typeof str.contains !== "function") return false;
350                 return (str.contains("dwa") === true) && (str.contains("foo") === false);
351         };
352
353         var indexOf$1 = String.prototype.indexOf;
354
355         var shim$6 = function (searchString/*, position*/) {
356                 return indexOf$1.call(this, searchString, arguments[1]) > -1;
357         };
358
359         var contains = isImplemented$6()
360                 ? String.prototype.contains
361                 : shim$6;
362
363         var d_1 = createCommonjsModule(function (module) {
364
365         var d;
366
367         d = module.exports = function (dscr, value/*, options*/) {
368                 var c, e, w, options, desc;
369                 if ((arguments.length < 2) || (typeof dscr !== 'string')) {
370                         options = value;
371                         value = dscr;
372                         dscr = null;
373                 } else {
374                         options = arguments[2];
375                 }
376                 if (dscr == null) {
377                         c = w = true;
378                         e = false;
379                 } else {
380                         c = contains.call(dscr, 'c');
381                         e = contains.call(dscr, 'e');
382                         w = contains.call(dscr, 'w');
383                 }
384
385                 desc = { value: value, configurable: c, enumerable: e, writable: w };
386                 return !options ? desc : assign(normalizeOptions(options), desc);
387         };
388
389         d.gs = function (dscr, get, set/*, options*/) {
390                 var c, e, options, desc;
391                 if (typeof dscr !== 'string') {
392                         options = set;
393                         set = get;
394                         get = dscr;
395                         dscr = null;
396                 } else {
397                         options = arguments[3];
398                 }
399                 if (get == null) {
400                         get = undefined;
401                 } else if (!isCallable(get)) {
402                         options = get;
403                         get = set = undefined;
404                 } else if (set == null) {
405                         set = undefined;
406                 } else if (!isCallable(set)) {
407                         options = set;
408                         set = undefined;
409                 }
410                 if (dscr == null) {
411                         c = true;
412                         e = false;
413                 } else {
414                         c = contains.call(dscr, 'c');
415                         e = contains.call(dscr, 'e');
416                 }
417
418                 desc = { get: get, set: set, configurable: c, enumerable: e };
419                 return !options ? desc : assign(normalizeOptions(options), desc);
420         };
421         });
422
423         var eventEmitter = createCommonjsModule(function (module, exports) {
424
425         var apply = Function.prototype.apply, call = Function.prototype.call
426           , create = Object.create, defineProperty = Object.defineProperty
427           , defineProperties = Object.defineProperties
428           , hasOwnProperty = Object.prototype.hasOwnProperty
429           , descriptor = { configurable: true, enumerable: false, writable: true }
430
431           , on, once, off, emit, methods, descriptors, base;
432
433         on = function (type, listener) {
434                 var data;
435
436                 validCallable(listener);
437
438                 if (!hasOwnProperty.call(this, '__ee__')) {
439                         data = descriptor.value = create(null);
440                         defineProperty(this, '__ee__', descriptor);
441                         descriptor.value = null;
442                 } else {
443                         data = this.__ee__;
444                 }
445                 if (!data[type]) data[type] = listener;
446                 else if (typeof data[type] === 'object') data[type].push(listener);
447                 else data[type] = [data[type], listener];
448
449                 return this;
450         };
451
452         once = function (type, listener) {
453                 var once, self;
454
455                 validCallable(listener);
456                 self = this;
457                 on.call(this, type, once = function () {
458                         off.call(self, type, once);
459                         apply.call(listener, this, arguments);
460                 });
461
462                 once.__eeOnceListener__ = listener;
463                 return this;
464         };
465
466         off = function (type, listener) {
467                 var data, listeners, candidate, i;
468
469                 validCallable(listener);
470
471                 if (!hasOwnProperty.call(this, '__ee__')) return this;
472                 data = this.__ee__;
473                 if (!data[type]) return this;
474                 listeners = data[type];
475
476                 if (typeof listeners === 'object') {
477                         for (i = 0; (candidate = listeners[i]); ++i) {
478                                 if ((candidate === listener) ||
479                                                 (candidate.__eeOnceListener__ === listener)) {
480                                         if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
481                                         else listeners.splice(i, 1);
482                                 }
483                         }
484                 } else {
485                         if ((listeners === listener) ||
486                                         (listeners.__eeOnceListener__ === listener)) {
487                                 delete data[type];
488                         }
489                 }
490
491                 return this;
492         };
493
494         emit = function (type) {
495                 var i, l, listener, listeners, args;
496
497                 if (!hasOwnProperty.call(this, '__ee__')) return;
498                 listeners = this.__ee__[type];
499                 if (!listeners) return;
500
501                 if (typeof listeners === 'object') {
502                         l = arguments.length;
503                         args = new Array(l - 1);
504                         for (i = 1; i < l; ++i) args[i - 1] = arguments[i];
505
506                         listeners = listeners.slice();
507                         for (i = 0; (listener = listeners[i]); ++i) {
508                                 apply.call(listener, this, args);
509                         }
510                 } else {
511                         switch (arguments.length) {
512                         case 1:
513                                 call.call(listeners, this);
514                                 break;
515                         case 2:
516                                 call.call(listeners, this, arguments[1]);
517                                 break;
518                         case 3:
519                                 call.call(listeners, this, arguments[1], arguments[2]);
520                                 break;
521                         default:
522                                 l = arguments.length;
523                                 args = new Array(l - 1);
524                                 for (i = 1; i < l; ++i) {
525                                         args[i - 1] = arguments[i];
526                                 }
527                                 apply.call(listeners, this, args);
528                         }
529                 }
530         };
531
532         methods = {
533                 on: on,
534                 once: once,
535                 off: off,
536                 emit: emit
537         };
538
539         descriptors = {
540                 on: d_1(on),
541                 once: d_1(once),
542                 off: d_1(off),
543                 emit: d_1(emit)
544         };
545
546         base = defineProperties({}, descriptors);
547
548         module.exports = exports = function (o) {
549                 return (o == null) ? create(base) : defineProperties(Object(o), descriptors);
550         };
551         exports.methods = methods;
552         });
553         var eventEmitter_1 = eventEmitter.methods;
554
555         var validTypes = { object: true, symbol: true };
556
557         var isImplemented$7 = function () {
558                 var symbol;
559                 if (typeof Symbol !== 'function') return false;
560                 symbol = Symbol('test symbol');
561                 try { String(symbol); } catch (e) { return false; }
562
563                 // Return 'true' also for polyfills
564                 if (!validTypes[typeof Symbol.iterator]) return false;
565                 if (!validTypes[typeof Symbol.toPrimitive]) return false;
566                 if (!validTypes[typeof Symbol.toStringTag]) return false;
567
568                 return true;
569         };
570
571         var isSymbol = function (x) {
572                 if (!x) return false;
573                 if (typeof x === 'symbol') return true;
574                 if (!x.constructor) return false;
575                 if (x.constructor.name !== 'Symbol') return false;
576                 return (x[x.constructor.toStringTag] === 'Symbol');
577         };
578
579         var validateSymbol = function (value) {
580                 if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
581                 return value;
582         };
583
584         var create$3 = Object.create, defineProperties = Object.defineProperties
585           , defineProperty$1 = Object.defineProperty, objPrototype = Object.prototype
586           , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create$3(null)
587           , isNativeSafe;
588
589         if (typeof Symbol === 'function') {
590                 NativeSymbol = Symbol;
591                 try {
592                         String(NativeSymbol());
593                         isNativeSafe = true;
594                 } catch (ignore) {}
595         }
596
597         var generateName = (function () {
598                 var created = create$3(null);
599                 return function (desc) {
600                         var postfix = 0, name, ie11BugWorkaround;
601                         while (created[desc + (postfix || '')]) ++postfix;
602                         desc += (postfix || '');
603                         created[desc] = true;
604                         name = '@@' + desc;
605                         defineProperty$1(objPrototype, name, d_1.gs(null, function (value) {
606                                 // For IE11 issue see:
607                                 // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
608                                 //    ie11-broken-getters-on-dom-objects
609                                 // https://github.com/medikoo/es6-symbol/issues/12
610                                 if (ie11BugWorkaround) return;
611                                 ie11BugWorkaround = true;
612                                 defineProperty$1(this, name, d_1(value));
613                                 ie11BugWorkaround = false;
614                         }));
615                         return name;
616                 };
617         }());
618
619         // Internal constructor (not one exposed) for creating Symbol instances.
620         // This one is used to ensure that `someSymbol instanceof Symbol` always return false
621         HiddenSymbol = function Symbol(description) {
622                 if (this instanceof HiddenSymbol) throw new TypeError('Symbol is not a constructor');
623                 return SymbolPolyfill(description);
624         };
625
626         // Exposed `Symbol` constructor
627         // (returns instances of HiddenSymbol)
628         var polyfill = SymbolPolyfill = function Symbol(description) {
629                 var symbol;
630                 if (this instanceof Symbol) throw new TypeError('Symbol is not a constructor');
631                 if (isNativeSafe) return NativeSymbol(description);
632                 symbol = create$3(HiddenSymbol.prototype);
633                 description = (description === undefined ? '' : String(description));
634                 return defineProperties(symbol, {
635                         __description__: d_1('', description),
636                         __name__: d_1('', generateName(description))
637                 });
638         };
639         defineProperties(SymbolPolyfill, {
640                 for: d_1(function (key) {
641                         if (globalSymbols[key]) return globalSymbols[key];
642                         return (globalSymbols[key] = SymbolPolyfill(String(key)));
643                 }),
644                 keyFor: d_1(function (s) {
645                         var key;
646                         validateSymbol(s);
647                         for (key in globalSymbols) if (globalSymbols[key] === s) return key;
648                 }),
649
650                 // To ensure proper interoperability with other native functions (e.g. Array.from)
651                 // fallback to eventual native implementation of given symbol
652                 hasInstance: d_1('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
653                 isConcatSpreadable: d_1('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
654                         SymbolPolyfill('isConcatSpreadable')),
655                 iterator: d_1('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
656                 match: d_1('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
657                 replace: d_1('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
658                 search: d_1('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
659                 species: d_1('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
660                 split: d_1('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
661                 toPrimitive: d_1('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
662                 toStringTag: d_1('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
663                 unscopables: d_1('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))
664         });
665
666         // Internal tweaks for real symbol producer
667         defineProperties(HiddenSymbol.prototype, {
668                 constructor: d_1(SymbolPolyfill),
669                 toString: d_1('', function () { return this.__name__; })
670         });
671
672         // Proper implementation of methods exposed on Symbol.prototype
673         // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
674         defineProperties(SymbolPolyfill.prototype, {
675                 toString: d_1(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
676                 valueOf: d_1(function () { return validateSymbol(this); })
677         });
678         defineProperty$1(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d_1('', function () {
679                 var symbol = validateSymbol(this);
680                 if (typeof symbol === 'symbol') return symbol;
681                 return symbol.toString();
682         }));
683         defineProperty$1(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d_1('c', 'Symbol'));
684
685         // Proper implementaton of toPrimitive and toStringTag for returned symbol instances
686         defineProperty$1(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
687                 d_1('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
688
689         // Note: It's important to define `toPrimitive` as last one, as some implementations
690         // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
691         // And that may invoke error in definition flow:
692         // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
693         defineProperty$1(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
694                 d_1('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
695
696         var es6Symbol = isImplemented$7() ? Symbol : polyfill;
697
698         var objToString = Object.prototype.toString
699           , id = objToString.call(
700                 (function () {
701                         return arguments;
702                 })()
703         );
704
705         var isArguments = function (value) {
706                 return objToString.call(value) === id;
707         };
708
709         var objToString$1 = Object.prototype.toString, id$1 = objToString$1.call("");
710
711         var isString = function (value) {
712                 return (
713                         typeof value === "string" ||
714                         (value &&
715                                 typeof value === "object" &&
716                                 (value instanceof String || objToString$1.call(value) === id$1)) ||
717                         false
718                 );
719         };
720
721         var iteratorSymbol = es6Symbol.iterator
722           , isArray        = Array.isArray;
723
724         var isIterable = function (value) {
725                 if (!isValue(value)) return false;
726                 if (isArray(value)) return true;
727                 if (isString(value)) return true;
728                 if (isArguments(value)) return true;
729                 return typeof value[iteratorSymbol] === "function";
730         };
731
732         var validIterable = function (value) {
733                 if (!isIterable(value)) throw new TypeError(value + " is not iterable");
734                 return value;
735         };
736
737         var isImplemented$8 = function () {
738                 var from = Array.from, arr, result;
739                 if (typeof from !== "function") return false;
740                 arr = ["raz", "dwa"];
741                 result = from(arr);
742                 return Boolean(result && (result !== arr) && (result[1] === "dwa"));
743         };
744
745         var objToString$2 = Object.prototype.toString, id$2 = objToString$2.call(noop);
746
747         var isFunction = function (value) {
748                 return typeof value === "function" && objToString$2.call(value) === id$2;
749         };
750
751         var iteratorSymbol$1 = es6Symbol.iterator
752           , isArray$1        = Array.isArray
753           , call           = Function.prototype.call
754           , desc           = { configurable: true, enumerable: true, writable: true, value: null }
755           , defineProperty$2 = Object.defineProperty;
756
757         // eslint-disable-next-line complexity, max-lines-per-function
758         var shim$7 = function (arrayLike /*, mapFn, thisArg*/) {
759                 var mapFn = arguments[1]
760                   , thisArg = arguments[2]
761                   , Context
762                   , i
763                   , j
764                   , arr
765                   , length
766                   , code
767                   , iterator
768                   , result
769                   , getIterator
770                   , value;
771
772                 arrayLike = Object(validValue(arrayLike));
773
774                 if (isValue(mapFn)) validCallable(mapFn);
775                 if (!this || this === Array || !isFunction(this)) {
776                         // Result: Plain array
777                         if (!mapFn) {
778                                 if (isArguments(arrayLike)) {
779                                         // Source: Arguments
780                                         length = arrayLike.length;
781                                         if (length !== 1) return Array.apply(null, arrayLike);
782                                         arr = new Array(1);
783                                         arr[0] = arrayLike[0];
784                                         return arr;
785                                 }
786                                 if (isArray$1(arrayLike)) {
787                                         // Source: Array
788                                         arr = new Array(length = arrayLike.length);
789                                         for (i = 0; i < length; ++i) arr[i] = arrayLike[i];
790                                         return arr;
791                                 }
792                         }
793                         arr = [];
794                 } else {
795                         // Result: Non plain array
796                         Context = this;
797                 }
798
799                 if (!isArray$1(arrayLike)) {
800                         if ((getIterator = arrayLike[iteratorSymbol$1]) !== undefined) {
801                                 // Source: Iterator
802                                 iterator = validCallable(getIterator).call(arrayLike);
803                                 if (Context) arr = new Context();
804                                 result = iterator.next();
805                                 i = 0;
806                                 while (!result.done) {
807                                         value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
808                                         if (Context) {
809                                                 desc.value = value;
810                                                 defineProperty$2(arr, i, desc);
811                                         } else {
812                                                 arr[i] = value;
813                                         }
814                                         result = iterator.next();
815                                         ++i;
816                                 }
817                                 length = i;
818                         } else if (isString(arrayLike)) {
819                                 // Source: String
820                                 length = arrayLike.length;
821                                 if (Context) arr = new Context();
822                                 for (i = 0, j = 0; i < length; ++i) {
823                                         value = arrayLike[i];
824                                         if (i + 1 < length) {
825                                                 code = value.charCodeAt(0);
826                                                 // eslint-disable-next-line max-depth
827                                                 if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];
828                                         }
829                                         value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
830                                         if (Context) {
831                                                 desc.value = value;
832                                                 defineProperty$2(arr, j, desc);
833                                         } else {
834                                                 arr[j] = value;
835                                         }
836                                         ++j;
837                                 }
838                                 length = j;
839                         }
840                 }
841                 if (length === undefined) {
842                         // Source: array or array-like
843                         length = toPosInteger(arrayLike.length);
844                         if (Context) arr = new Context(length);
845                         for (i = 0; i < length; ++i) {
846                                 value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
847                                 if (Context) {
848                                         desc.value = value;
849                                         defineProperty$2(arr, i, desc);
850                                 } else {
851                                         arr[i] = value;
852                                 }
853                         }
854                 }
855                 if (Context) {
856                         desc.value = null;
857                         arr.length = length;
858                 }
859                 return arr;
860         };
861
862         var from_1 = isImplemented$8()
863                 ? Array.from
864                 : shim$7;
865
866         var copy = function (obj/*, propertyNames, options*/) {
867                 var copy = Object(validValue(obj)), propertyNames = arguments[1], options = Object(arguments[2]);
868                 if (copy !== obj && !propertyNames) return copy;
869                 var result = {};
870                 if (propertyNames) {
871                         from_1(propertyNames, function (propertyName) {
872                                 if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName];
873                         });
874                 } else {
875                         assign(result, obj);
876                 }
877                 return result;
878         };
879
880         var bind                    = Function.prototype.bind
881           , call$1                    = Function.prototype.call
882           , keys$2                    = Object.keys
883           , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
884
885         var _iterate = function (method, defVal) {
886                 return function (obj, cb /*, thisArg, compareFn*/) {
887                         var list, thisArg = arguments[2], compareFn = arguments[3];
888                         obj = Object(validValue(obj));
889                         validCallable(cb);
890
891                         list = keys$2(obj);
892                         if (compareFn) {
893                                 list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined);
894                         }
895                         if (typeof method !== "function") method = list[method];
896                         return call$1.call(method, list, function (key, index) {
897                                 if (!objPropertyIsEnumerable.call(obj, key)) return defVal;
898                                 return call$1.call(cb, thisArg, obj[key], key, obj, index);
899                         });
900                 };
901         };
902
903         var forEach$1 = _iterate("forEach");
904
905         var call$2     = Function.prototype.call;
906
907         var map$1 = function (obj, cb /*, thisArg*/) {
908                 var result = {}, thisArg = arguments[2];
909                 validCallable(cb);
910                 forEach$1(obj, function (value, key, targetObj, index) {
911                         result[key] = call$2.call(cb, thisArg, value, key, targetObj, index);
912                 });
913                 return result;
914         };
915
916         var callable         = validCallable
917
918           , bind$1 = Function.prototype.bind, defineProperty$3 = Object.defineProperty
919           , hasOwnProperty = Object.prototype.hasOwnProperty
920           , define;
921
922         define = function (name, desc, options) {
923                 var value = validValue(desc) && callable(desc.value), dgs;
924                 dgs = copy(desc);
925                 delete dgs.writable;
926                 delete dgs.value;
927                 dgs.get = function () {
928                         if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
929                         desc.value = bind$1.call(value, options.resolveContext ? options.resolveContext(this) : this);
930                         defineProperty$3(this, name, desc);
931                         return this[name];
932                 };
933                 return dgs;
934         };
935
936         var autoBind = function (props/*, options*/) {
937                 var options = normalizeOptions(arguments[1]);
938                 if (options.resolveContext != null) validCallable(options.resolveContext);
939                 return map$1(props, function (desc, name) { return define(name, desc, options); });
940         };
941
942         var defineProperty$4 = Object.defineProperty, defineProperties$1 = Object.defineProperties, Iterator;
943
944         var es6Iterator = Iterator = function (list, context) {
945                 if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'");
946                 defineProperties$1(this, {
947                         __list__: d_1("w", validValue(list)),
948                         __context__: d_1("w", context),
949                         __nextIndex__: d_1("w", 0)
950                 });
951                 if (!context) return;
952                 validCallable(context.on);
953                 context.on("_add", this._onAdd);
954                 context.on("_delete", this._onDelete);
955                 context.on("_clear", this._onClear);
956         };
957
958         // Internal %IteratorPrototype% doesn't expose its constructor
959         delete Iterator.prototype.constructor;
960
961         defineProperties$1(
962                 Iterator.prototype,
963                 assign(
964                         {
965                                 _next: d_1(function () {
966                                         var i;
967                                         if (!this.__list__) return undefined;
968                                         if (this.__redo__) {
969                                                 i = this.__redo__.shift();
970                                                 if (i !== undefined) return i;
971                                         }
972                                         if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;
973                                         this._unBind();
974                                         return undefined;
975                                 }),
976                                 next: d_1(function () {
977                                         return this._createResult(this._next());
978                                 }),
979                                 _createResult: d_1(function (i) {
980                                         if (i === undefined) return { done: true, value: undefined };
981                                         return { done: false, value: this._resolve(i) };
982                                 }),
983                                 _resolve: d_1(function (i) {
984                                         return this.__list__[i];
985                                 }),
986                                 _unBind: d_1(function () {
987                                         this.__list__ = null;
988                                         delete this.__redo__;
989                                         if (!this.__context__) return;
990                                         this.__context__.off("_add", this._onAdd);
991                                         this.__context__.off("_delete", this._onDelete);
992                                         this.__context__.off("_clear", this._onClear);
993                                         this.__context__ = null;
994                                 }),
995                                 toString: d_1(function () {
996                                         return "[object " + (this[es6Symbol.toStringTag] || "Object") + "]";
997                                 })
998                         },
999                         autoBind({
1000                                 _onAdd: d_1(function (index) {
1001                                         if (index >= this.__nextIndex__) return;
1002                                         ++this.__nextIndex__;
1003                                         if (!this.__redo__) {
1004                                                 defineProperty$4(this, "__redo__", d_1("c", [index]));
1005                                                 return;
1006                                         }
1007                                         this.__redo__.forEach(function (redo, i) {
1008                                                 if (redo >= index) this.__redo__[i] = ++redo;
1009                                         }, this);
1010                                         this.__redo__.push(index);
1011                                 }),
1012                                 _onDelete: d_1(function (index) {
1013                                         var i;
1014                                         if (index >= this.__nextIndex__) return;
1015                                         --this.__nextIndex__;
1016                                         if (!this.__redo__) return;
1017                                         i = this.__redo__.indexOf(index);
1018                                         if (i !== -1) this.__redo__.splice(i, 1);
1019                                         this.__redo__.forEach(function (redo, j) {
1020                                                 if (redo > index) this.__redo__[j] = --redo;
1021                                         }, this);
1022                                 }),
1023                                 _onClear: d_1(function () {
1024                                         if (this.__redo__) clear.call(this.__redo__);
1025                                         this.__nextIndex__ = 0;
1026                                 })
1027                         })
1028                 )
1029         );
1030
1031         defineProperty$4(
1032                 Iterator.prototype,
1033                 es6Symbol.iterator,
1034                 d_1(function () {
1035                         return this;
1036                 })
1037         );
1038
1039         var array = createCommonjsModule(function (module) {
1040
1041
1042
1043         var defineProperty = Object.defineProperty, ArrayIterator;
1044
1045         ArrayIterator = module.exports = function (arr, kind) {
1046                 if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'");
1047                 es6Iterator.call(this, arr);
1048                 if (!kind) kind = "value";
1049                 else if (contains.call(kind, "key+value")) kind = "key+value";
1050                 else if (contains.call(kind, "key")) kind = "key";
1051                 else kind = "value";
1052                 defineProperty(this, "__kind__", d_1("", kind));
1053         };
1054         if (setPrototypeOf) setPrototypeOf(ArrayIterator, es6Iterator);
1055
1056         // Internal %ArrayIteratorPrototype% doesn't expose its constructor
1057         delete ArrayIterator.prototype.constructor;
1058
1059         ArrayIterator.prototype = Object.create(es6Iterator.prototype, {
1060                 _resolve: d_1(function (i) {
1061                         if (this.__kind__ === "value") return this.__list__[i];
1062                         if (this.__kind__ === "key+value") return [i, this.__list__[i]];
1063                         return i;
1064                 })
1065         });
1066         defineProperty(ArrayIterator.prototype, es6Symbol.toStringTag, d_1("c", "Array Iterator"));
1067         });
1068
1069         var string = createCommonjsModule(function (module) {
1070
1071
1072
1073         var defineProperty = Object.defineProperty, StringIterator;
1074
1075         StringIterator = module.exports = function (str) {
1076                 if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'");
1077                 str = String(str);
1078                 es6Iterator.call(this, str);
1079                 defineProperty(this, "__length__", d_1("", str.length));
1080         };
1081         if (setPrototypeOf) setPrototypeOf(StringIterator, es6Iterator);
1082
1083         // Internal %ArrayIteratorPrototype% doesn't expose its constructor
1084         delete StringIterator.prototype.constructor;
1085
1086         StringIterator.prototype = Object.create(es6Iterator.prototype, {
1087                 _next: d_1(function () {
1088                         if (!this.__list__) return undefined;
1089                         if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;
1090                         this._unBind();
1091                         return undefined;
1092                 }),
1093                 _resolve: d_1(function (i) {
1094                         var char = this.__list__[i], code;
1095                         if (this.__nextIndex__ === this.__length__) return char;
1096                         code = char.charCodeAt(0);
1097                         if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++];
1098                         return char;
1099                 })
1100         });
1101         defineProperty(StringIterator.prototype, es6Symbol.toStringTag, d_1("c", "String Iterator"));
1102         });
1103
1104         var iteratorSymbol$2 = es6Symbol.iterator;
1105
1106         var get = function (obj) {
1107                 if (typeof validIterable(obj)[iteratorSymbol$2] === "function") return obj[iteratorSymbol$2]();
1108                 if (isArguments(obj)) return new array(obj);
1109                 if (isString(obj)) return new string(obj);
1110                 return new array(obj);
1111         };
1112
1113         var isArray$2 = Array.isArray, call$3 = Function.prototype.call, some = Array.prototype.some;
1114
1115         var forOf = function (iterable, cb /*, thisArg*/) {
1116                 var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code;
1117                 if (isArray$2(iterable) || isArguments(iterable)) mode = "array";
1118                 else if (isString(iterable)) mode = "string";
1119                 else iterable = get(iterable);
1120
1121                 validCallable(cb);
1122                 doBreak = function () {
1123                         broken = true;
1124                 };
1125                 if (mode === "array") {
1126                         some.call(iterable, function (value) {
1127                                 call$3.call(cb, thisArg, value, doBreak);
1128                                 return broken;
1129                         });
1130                         return;
1131                 }
1132                 if (mode === "string") {
1133                         length = iterable.length;
1134                         for (i = 0; i < length; ++i) {
1135                                 char = iterable[i];
1136                                 if (i + 1 < length) {
1137                                         code = char.charCodeAt(0);
1138                                         if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i];
1139                                 }
1140                                 call$3.call(cb, thisArg, char, doBreak);
1141                                 if (broken) break;
1142                         }
1143                         return;
1144                 }
1145                 result = iterable.next();
1146
1147                 while (!result.done) {
1148                         call$3.call(cb, thisArg, result.value, doBreak);
1149                         if (broken) return;
1150                         result = iterable.next();
1151                 }
1152         };
1153
1154         var iterator = createCommonjsModule(function (module) {
1155
1156         var toStringTagSymbol = es6Symbol.toStringTag
1157
1158           , defineProperty = Object.defineProperty
1159           , SetIterator;
1160
1161         SetIterator = module.exports = function (set, kind) {
1162                 if (!(this instanceof SetIterator)) return new SetIterator(set, kind);
1163                 es6Iterator.call(this, set.__setData__, set);
1164                 if (!kind) kind = 'value';
1165                 else if (contains.call(kind, 'key+value')) kind = 'key+value';
1166                 else kind = 'value';
1167                 defineProperty(this, '__kind__', d_1('', kind));
1168         };
1169         if (setPrototypeOf) setPrototypeOf(SetIterator, es6Iterator);
1170
1171         SetIterator.prototype = Object.create(es6Iterator.prototype, {
1172                 constructor: d_1(SetIterator),
1173                 _resolve: d_1(function (i) {
1174                         if (this.__kind__ === 'value') return this.__list__[i];
1175                         return [this.__list__[i], this.__list__[i]];
1176                 }),
1177                 toString: d_1(function () { return '[object Set Iterator]'; })
1178         });
1179         defineProperty(SetIterator.prototype, toStringTagSymbol, d_1('c', 'Set Iterator'));
1180         });
1181
1182         // Exports true if environment provides native `Set` implementation,
1183
1184         var isNativeImplemented = (function () {
1185                 if (typeof Set === 'undefined') return false;
1186                 return (Object.prototype.toString.call(Set.prototype) === '[object Set]');
1187         }());
1188
1189         var iterator$1       = validIterable
1190
1191           , call$4 = Function.prototype.call
1192           , defineProperty$5 = Object.defineProperty, getPrototypeOf$1 = Object.getPrototypeOf
1193           , SetPoly, getValues, NativeSet;
1194
1195         if (isNativeImplemented) NativeSet = Set;
1196
1197         var polyfill$1 = SetPoly = function Set(/*iterable*/) {
1198                 var iterable = arguments[0], self;
1199                 if (!(this instanceof SetPoly)) throw new TypeError('Constructor requires \'new\'');
1200                 if (isNativeImplemented && setPrototypeOf) self = setPrototypeOf(new NativeSet(), getPrototypeOf$1(this));
1201                 else self = this;
1202                 if (iterable != null) iterator$1(iterable);
1203                 defineProperty$5(self, '__setData__', d_1('c', []));
1204                 if (!iterable) return self;
1205                 forOf(iterable, function (value) {
1206                         if (eIndexOf.call(this, value) !== -1) return;
1207                         this.push(value);
1208                 }, self.__setData__);
1209                 return self;
1210         };
1211
1212         if (isNativeImplemented) {
1213                 if (setPrototypeOf) setPrototypeOf(SetPoly, NativeSet);
1214                 SetPoly.prototype = Object.create(NativeSet.prototype, { constructor: d_1(SetPoly) });
1215         }
1216
1217         eventEmitter(Object.defineProperties(SetPoly.prototype, {
1218                 add: d_1(function (value) {
1219                         if (this.has(value)) return this;
1220                         this.emit('_add', this.__setData__.push(value) - 1, value);
1221                         return this;
1222                 }),
1223                 clear: d_1(function () {
1224                         if (!this.__setData__.length) return;
1225                         clear.call(this.__setData__);
1226                         this.emit('_clear');
1227                 }),
1228                 delete: d_1(function (value) {
1229                         var index = eIndexOf.call(this.__setData__, value);
1230                         if (index === -1) return false;
1231                         this.__setData__.splice(index, 1);
1232                         this.emit('_delete', index, value);
1233                         return true;
1234                 }),
1235                 entries: d_1(function () { return new iterator(this, 'key+value'); }),
1236                 forEach: d_1(function (cb/*, thisArg*/) {
1237                         var thisArg = arguments[1], iterator, result, value;
1238                         validCallable(cb);
1239                         iterator = this.values();
1240                         result = iterator._next();
1241                         while (result !== undefined) {
1242                                 value = iterator._resolve(result);
1243                                 call$4.call(cb, thisArg, value, value, this);
1244                                 result = iterator._next();
1245                         }
1246                 }),
1247                 has: d_1(function (value) {
1248                         return (eIndexOf.call(this.__setData__, value) !== -1);
1249                 }),
1250                 keys: d_1(getValues = function () { return this.values(); }),
1251                 size: d_1.gs(function () { return this.__setData__.length; }),
1252                 values: d_1(function () { return new iterator(this); }),
1253                 toString: d_1(function () { return '[object Set]'; })
1254         }));
1255         defineProperty$5(SetPoly.prototype, es6Symbol.iterator, d_1(getValues));
1256         defineProperty$5(SetPoly.prototype, es6Symbol.toStringTag, d_1('c', 'Set'));
1257
1258         var es6Set = isImplemented() ? Set : polyfill$1;
1259
1260         var isImplemented$9 = function () {
1261                 var map, iterator, result;
1262                 if (typeof Map !== 'function') return false;
1263                 try {
1264                         // WebKit doesn't support arguments and crashes
1265                         map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
1266                 } catch (e) {
1267                         return false;
1268                 }
1269                 if (String(map) !== '[object Map]') return false;
1270                 if (map.size !== 3) return false;
1271                 if (typeof map.clear !== 'function') return false;
1272                 if (typeof map.delete !== 'function') return false;
1273                 if (typeof map.entries !== 'function') return false;
1274                 if (typeof map.forEach !== 'function') return false;
1275                 if (typeof map.get !== 'function') return false;
1276                 if (typeof map.has !== 'function') return false;
1277                 if (typeof map.keys !== 'function') return false;
1278                 if (typeof map.set !== 'function') return false;
1279                 if (typeof map.values !== 'function') return false;
1280
1281                 iterator = map.entries();
1282                 result = iterator.next();
1283                 if (result.done !== false) return false;
1284                 if (!result.value) return false;
1285                 if (result.value[0] !== 'raz') return false;
1286                 if (result.value[1] !== 'one') return false;
1287
1288                 return true;
1289         };
1290
1291         var forEach$2 = Array.prototype.forEach, create$4 = Object.create;
1292
1293         // eslint-disable-next-line no-unused-vars
1294         var primitiveSet = function (arg /*, …args*/) {
1295                 var set = create$4(null);
1296                 forEach$2.call(arguments, function (name) {
1297                         set[name] = true;
1298                 });
1299                 return set;
1300         };
1301
1302         var iteratorKinds = primitiveSet('key',
1303                 'value', 'key+value');
1304
1305         var iterator$2 = createCommonjsModule(function (module) {
1306
1307         var toStringTagSymbol = es6Symbol.toStringTag
1308
1309           , defineProperties = Object.defineProperties
1310           , unBind = es6Iterator.prototype._unBind
1311           , MapIterator;
1312
1313         MapIterator = module.exports = function (map, kind) {
1314                 if (!(this instanceof MapIterator)) return new MapIterator(map, kind);
1315                 es6Iterator.call(this, map.__mapKeysData__, map);
1316                 if (!kind || !iteratorKinds[kind]) kind = 'key+value';
1317                 defineProperties(this, {
1318                         __kind__: d_1('', kind),
1319                         __values__: d_1('w', map.__mapValuesData__)
1320                 });
1321         };
1322         if (setPrototypeOf) setPrototypeOf(MapIterator, es6Iterator);
1323
1324         MapIterator.prototype = Object.create(es6Iterator.prototype, {
1325                 constructor: d_1(MapIterator),
1326                 _resolve: d_1(function (i) {
1327                         if (this.__kind__ === 'value') return this.__values__[i];
1328                         if (this.__kind__ === 'key') return this.__list__[i];
1329                         return [this.__list__[i], this.__values__[i]];
1330                 }),
1331                 _unBind: d_1(function () {
1332                         this.__values__ = null;
1333                         unBind.call(this);
1334                 }),
1335                 toString: d_1(function () { return '[object Map Iterator]'; })
1336         });
1337         Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
1338                 d_1('c', 'Map Iterator'));
1339         });
1340
1341         // Exports true if environment provides native `Map` implementation,
1342
1343         var isNativeImplemented$1 = (function () {
1344                 if (typeof Map === 'undefined') return false;
1345                 return (Object.prototype.toString.call(new Map()) === '[object Map]');
1346         }());
1347
1348         var iterator$3       = validIterable
1349
1350           , call$5 = Function.prototype.call
1351           , defineProperties$2 = Object.defineProperties, getPrototypeOf$2 = Object.getPrototypeOf
1352           , MapPoly;
1353
1354         var polyfill$2 = MapPoly = function (/*iterable*/) {
1355                 var iterable = arguments[0], keys, values, self;
1356                 if (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \'new\'');
1357                 if (isNativeImplemented$1 && setPrototypeOf && (Map !== MapPoly)) {
1358                         self = setPrototypeOf(new Map(), getPrototypeOf$2(this));
1359                 } else {
1360                         self = this;
1361                 }
1362                 if (iterable != null) iterator$3(iterable);
1363                 defineProperties$2(self, {
1364                         __mapKeysData__: d_1('c', keys = []),
1365                         __mapValuesData__: d_1('c', values = [])
1366                 });
1367                 if (!iterable) return self;
1368                 forOf(iterable, function (value) {
1369                         var key = validValue(value)[0];
1370                         value = value[1];
1371                         if (eIndexOf.call(keys, key) !== -1) return;
1372                         keys.push(key);
1373                         values.push(value);
1374                 }, self);
1375                 return self;
1376         };
1377
1378         if (isNativeImplemented$1) {
1379                 if (setPrototypeOf) setPrototypeOf(MapPoly, Map);
1380                 MapPoly.prototype = Object.create(Map.prototype, {
1381                         constructor: d_1(MapPoly)
1382                 });
1383         }
1384
1385         eventEmitter(defineProperties$2(MapPoly.prototype, {
1386                 clear: d_1(function () {
1387                         if (!this.__mapKeysData__.length) return;
1388                         clear.call(this.__mapKeysData__);
1389                         clear.call(this.__mapValuesData__);
1390                         this.emit('_clear');
1391                 }),
1392                 delete: d_1(function (key) {
1393                         var index = eIndexOf.call(this.__mapKeysData__, key);
1394                         if (index === -1) return false;
1395                         this.__mapKeysData__.splice(index, 1);
1396                         this.__mapValuesData__.splice(index, 1);
1397                         this.emit('_delete', index, key);
1398                         return true;
1399                 }),
1400                 entries: d_1(function () { return new iterator$2(this, 'key+value'); }),
1401                 forEach: d_1(function (cb/*, thisArg*/) {
1402                         var thisArg = arguments[1], iterator, result;
1403                         validCallable(cb);
1404                         iterator = this.entries();
1405                         result = iterator._next();
1406                         while (result !== undefined) {
1407                                 call$5.call(cb, thisArg, this.__mapValuesData__[result],
1408                                         this.__mapKeysData__[result], this);
1409                                 result = iterator._next();
1410                         }
1411                 }),
1412                 get: d_1(function (key) {
1413                         var index = eIndexOf.call(this.__mapKeysData__, key);
1414                         if (index === -1) return;
1415                         return this.__mapValuesData__[index];
1416                 }),
1417                 has: d_1(function (key) {
1418                         return (eIndexOf.call(this.__mapKeysData__, key) !== -1);
1419                 }),
1420                 keys: d_1(function () { return new iterator$2(this, 'key'); }),
1421                 set: d_1(function (key, value) {
1422                         var index = eIndexOf.call(this.__mapKeysData__, key), emit;
1423                         if (index === -1) {
1424                                 index = this.__mapKeysData__.push(key) - 1;
1425                                 emit = true;
1426                         }
1427                         this.__mapValuesData__[index] = value;
1428                         if (emit) this.emit('_add', index, key);
1429                         return this;
1430                 }),
1431                 size: d_1.gs(function () { return this.__mapKeysData__.length; }),
1432                 values: d_1(function () { return new iterator$2(this, 'value'); }),
1433                 toString: d_1(function () { return '[object Map]'; })
1434         }));
1435         Object.defineProperty(MapPoly.prototype, es6Symbol.iterator, d_1(function () {
1436                 return this.entries();
1437         }));
1438         Object.defineProperty(MapPoly.prototype, es6Symbol.toStringTag, d_1('c', 'Map'));
1439
1440         var es6Map = isImplemented$9() ? Map : polyfill$2;
1441
1442         var toStr = Object.prototype.toString;
1443
1444         var isArguments$1 = function isArguments(value) {
1445                 var str = toStr.call(value);
1446                 var isArgs = str === '[object Arguments]';
1447                 if (!isArgs) {
1448                         isArgs = str !== '[object Array]' &&
1449                                 value !== null &&
1450                                 typeof value === 'object' &&
1451                                 typeof value.length === 'number' &&
1452                                 value.length >= 0 &&
1453                                 toStr.call(value.callee) === '[object Function]';
1454                 }
1455                 return isArgs;
1456         };
1457
1458         var keysShim;
1459         if (!Object.keys) {
1460                 // modified from https://github.com/es-shims/es5-shim
1461                 var has = Object.prototype.hasOwnProperty;
1462                 var toStr$1 = Object.prototype.toString;
1463                 var isArgs = isArguments$1; // eslint-disable-line global-require
1464                 var isEnumerable = Object.prototype.propertyIsEnumerable;
1465                 var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
1466                 var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
1467                 var dontEnums = [
1468                         'toString',
1469                         'toLocaleString',
1470                         'valueOf',
1471                         'hasOwnProperty',
1472                         'isPrototypeOf',
1473                         'propertyIsEnumerable',
1474                         'constructor'
1475                 ];
1476                 var equalsConstructorPrototype = function (o) {
1477                         var ctor = o.constructor;
1478                         return ctor && ctor.prototype === o;
1479                 };
1480                 var excludedKeys = {
1481                         $applicationCache: true,
1482                         $console: true,
1483                         $external: true,
1484                         $frame: true,
1485                         $frameElement: true,
1486                         $frames: true,
1487                         $innerHeight: true,
1488                         $innerWidth: true,
1489                         $outerHeight: true,
1490                         $outerWidth: true,
1491                         $pageXOffset: true,
1492                         $pageYOffset: true,
1493                         $parent: true,
1494                         $scrollLeft: true,
1495                         $scrollTop: true,
1496                         $scrollX: true,
1497                         $scrollY: true,
1498                         $self: true,
1499                         $webkitIndexedDB: true,
1500                         $webkitStorageInfo: true,
1501                         $window: true
1502                 };
1503                 var hasAutomationEqualityBug = (function () {
1504                         /* global window */
1505                         if (typeof window === 'undefined') { return false; }
1506                         for (var k in window) {
1507                                 try {
1508                                         if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
1509                                                 try {
1510                                                         equalsConstructorPrototype(window[k]);
1511                                                 } catch (e) {
1512                                                         return true;
1513                                                 }
1514                                         }
1515                                 } catch (e) {
1516                                         return true;
1517                                 }
1518                         }
1519                         return false;
1520                 }());
1521                 var equalsConstructorPrototypeIfNotBuggy = function (o) {
1522                         /* global window */
1523                         if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
1524                                 return equalsConstructorPrototype(o);
1525                         }
1526                         try {
1527                                 return equalsConstructorPrototype(o);
1528                         } catch (e) {
1529                                 return false;
1530                         }
1531                 };
1532
1533                 keysShim = function keys(object) {
1534                         var isObject = object !== null && typeof object === 'object';
1535                         var isFunction = toStr$1.call(object) === '[object Function]';
1536                         var isArguments = isArgs(object);
1537                         var isString = isObject && toStr$1.call(object) === '[object String]';
1538                         var theKeys = [];
1539
1540                         if (!isObject && !isFunction && !isArguments) {
1541                                 throw new TypeError('Object.keys called on a non-object');
1542                         }
1543
1544                         var skipProto = hasProtoEnumBug && isFunction;
1545                         if (isString && object.length > 0 && !has.call(object, 0)) {
1546                                 for (var i = 0; i < object.length; ++i) {
1547                                         theKeys.push(String(i));
1548                                 }
1549                         }
1550
1551                         if (isArguments && object.length > 0) {
1552                                 for (var j = 0; j < object.length; ++j) {
1553                                         theKeys.push(String(j));
1554                                 }
1555                         } else {
1556                                 for (var name in object) {
1557                                         if (!(skipProto && name === 'prototype') && has.call(object, name)) {
1558                                                 theKeys.push(String(name));
1559                                         }
1560                                 }
1561                         }
1562
1563                         if (hasDontEnumBug) {
1564                                 var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
1565
1566                                 for (var k = 0; k < dontEnums.length; ++k) {
1567                                         if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
1568                                                 theKeys.push(dontEnums[k]);
1569                                         }
1570                                 }
1571                         }
1572                         return theKeys;
1573                 };
1574         }
1575         var implementation = keysShim;
1576
1577         var slice = Array.prototype.slice;
1578
1579
1580         var origKeys = Object.keys;
1581         var keysShim$1 = origKeys ? function keys(o) { return origKeys(o); } : implementation;
1582
1583         var originalKeys = Object.keys;
1584
1585         keysShim$1.shim = function shimObjectKeys() {
1586                 if (Object.keys) {
1587                         var keysWorksWithArguments = (function () {
1588                                 // Safari 5.0 bug
1589                                 var args = Object.keys(arguments);
1590                                 return args && args.length === arguments.length;
1591                         }(1, 2));
1592                         if (!keysWorksWithArguments) {
1593                                 Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1594                                         if (isArguments$1(object)) {
1595                                                 return originalKeys(slice.call(object));
1596                                         }
1597                                         return originalKeys(object);
1598                                 };
1599                         }
1600                 } else {
1601                         Object.keys = keysShim$1;
1602                 }
1603                 return Object.keys || keysShim$1;
1604         };
1605
1606         var objectKeys = keysShim$1;
1607
1608         var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1609
1610         var toStr$2 = Object.prototype.toString;
1611         var concat = Array.prototype.concat;
1612         var origDefineProperty = Object.defineProperty;
1613
1614         var isFunction$1 = function (fn) {
1615                 return typeof fn === 'function' && toStr$2.call(fn) === '[object Function]';
1616         };
1617
1618         var arePropertyDescriptorsSupported = function () {
1619                 var obj = {};
1620                 try {
1621                         origDefineProperty(obj, 'x', { enumerable: false, value: obj });
1622                         // eslint-disable-next-line no-unused-vars, no-restricted-syntax
1623                         for (var _ in obj) { // jscs:ignore disallowUnusedVariables
1624                                 return false;
1625                         }
1626                         return obj.x === obj;
1627                 } catch (e) { /* this is IE 8. */
1628                         return false;
1629                 }
1630         };
1631         var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
1632
1633         var defineProperty$6 = function (object, name, value, predicate) {
1634                 if (name in object && (!isFunction$1(predicate) || !predicate())) {
1635                         return;
1636                 }
1637                 if (supportsDescriptors) {
1638                         origDefineProperty(object, name, {
1639                                 configurable: true,
1640                                 enumerable: false,
1641                                 value: value,
1642                                 writable: true
1643                         });
1644                 } else {
1645                         object[name] = value;
1646                 }
1647         };
1648
1649         var defineProperties$3 = function (object, map) {
1650                 var predicates = arguments.length > 2 ? arguments[2] : {};
1651                 var props = objectKeys(map);
1652                 if (hasSymbols) {
1653                         props = concat.call(props, Object.getOwnPropertySymbols(map));
1654                 }
1655                 for (var i = 0; i < props.length; i += 1) {
1656                         defineProperty$6(object, props[i], map[props[i]], predicates[props[i]]);
1657                 }
1658         };
1659
1660         defineProperties$3.supportsDescriptors = !!supportsDescriptors;
1661
1662         var defineProperties_1 = defineProperties$3;
1663
1664         /* eslint no-invalid-this: 1 */
1665
1666         var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1667         var slice$1 = Array.prototype.slice;
1668         var toStr$3 = Object.prototype.toString;
1669         var funcType = '[object Function]';
1670
1671         var implementation$1 = function bind(that) {
1672             var target = this;
1673             if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
1674                 throw new TypeError(ERROR_MESSAGE + target);
1675             }
1676             var args = slice$1.call(arguments, 1);
1677
1678             var bound;
1679             var binder = function () {
1680                 if (this instanceof bound) {
1681                     var result = target.apply(
1682                         this,
1683                         args.concat(slice$1.call(arguments))
1684                     );
1685                     if (Object(result) === result) {
1686                         return result;
1687                     }
1688                     return this;
1689                 } else {
1690                     return target.apply(
1691                         that,
1692                         args.concat(slice$1.call(arguments))
1693                     );
1694                 }
1695             };
1696
1697             var boundLength = Math.max(0, target.length - args.length);
1698             var boundArgs = [];
1699             for (var i = 0; i < boundLength; i++) {
1700                 boundArgs.push('$' + i);
1701             }
1702
1703             bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1704
1705             if (target.prototype) {
1706                 var Empty = function Empty() {};
1707                 Empty.prototype = target.prototype;
1708                 bound.prototype = new Empty();
1709                 Empty.prototype = null;
1710             }
1711
1712             return bound;
1713         };
1714
1715         var functionBind = Function.prototype.bind || implementation$1;
1716
1717         var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
1718
1719         var isPrimitive = function isPrimitive(value) {
1720                 return value === null || (typeof value !== 'function' && typeof value !== 'object');
1721         };
1722
1723         var fnToStr = Function.prototype.toString;
1724
1725         var constructorRegex = /^\s*class\b/;
1726         var isES6ClassFn = function isES6ClassFunction(value) {
1727                 try {
1728                         var fnStr = fnToStr.call(value);
1729                         return constructorRegex.test(fnStr);
1730                 } catch (e) {
1731                         return false; // not a function
1732                 }
1733         };
1734
1735         var tryFunctionObject = function tryFunctionToStr(value) {
1736                 try {
1737                         if (isES6ClassFn(value)) { return false; }
1738                         fnToStr.call(value);
1739                         return true;
1740                 } catch (e) {
1741                         return false;
1742                 }
1743         };
1744         var toStr$4 = Object.prototype.toString;
1745         var fnClass = '[object Function]';
1746         var genClass = '[object GeneratorFunction]';
1747         var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
1748
1749         var isCallable$1 = function isCallable(value) {
1750                 if (!value) { return false; }
1751                 if (typeof value !== 'function' && typeof value !== 'object') { return false; }
1752                 if (typeof value === 'function' && !value.prototype) { return true; }
1753                 if (hasToStringTag) { return tryFunctionObject(value); }
1754                 if (isES6ClassFn(value)) { return false; }
1755                 var strClass = toStr$4.call(value);
1756                 return strClass === fnClass || strClass === genClass;
1757         };
1758
1759         var getDay = Date.prototype.getDay;
1760         var tryDateObject = function tryDateObject(value) {
1761                 try {
1762                         getDay.call(value);
1763                         return true;
1764                 } catch (e) {
1765                         return false;
1766                 }
1767         };
1768
1769         var toStr$5 = Object.prototype.toString;
1770         var dateClass = '[object Date]';
1771         var hasToStringTag$1 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
1772
1773         var isDateObject = function isDateObject(value) {
1774                 if (typeof value !== 'object' || value === null) { return false; }
1775                 return hasToStringTag$1 ? tryDateObject(value) : toStr$5.call(value) === dateClass;
1776         };
1777
1778         /* eslint complexity: [2, 17], max-statements: [2, 33] */
1779         var shams = function hasSymbols() {
1780                 if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
1781                 if (typeof Symbol.iterator === 'symbol') { return true; }
1782
1783                 var obj = {};
1784                 var sym = Symbol('test');
1785                 var symObj = Object(sym);
1786                 if (typeof sym === 'string') { return false; }
1787
1788                 if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
1789                 if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
1790
1791                 // temp disabled per https://github.com/ljharb/object.assign/issues/17
1792                 // if (sym instanceof Symbol) { return false; }
1793                 // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
1794                 // if (!(symObj instanceof Symbol)) { return false; }
1795
1796                 // if (typeof Symbol.prototype.toString !== 'function') { return false; }
1797                 // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
1798
1799                 var symVal = 42;
1800                 obj[sym] = symVal;
1801                 for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
1802                 if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
1803
1804                 if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
1805
1806                 var syms = Object.getOwnPropertySymbols(obj);
1807                 if (syms.length !== 1 || syms[0] !== sym) { return false; }
1808
1809                 if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
1810
1811                 if (typeof Object.getOwnPropertyDescriptor === 'function') {
1812                         var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
1813                         if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
1814                 }
1815
1816                 return true;
1817         };
1818
1819         var origSymbol = commonjsGlobal.Symbol;
1820
1821
1822         var hasSymbols$1 = function hasNativeSymbols() {
1823                 if (typeof origSymbol !== 'function') { return false; }
1824                 if (typeof Symbol !== 'function') { return false; }
1825                 if (typeof origSymbol('foo') !== 'symbol') { return false; }
1826                 if (typeof Symbol('bar') !== 'symbol') { return false; }
1827
1828                 return shams();
1829         };
1830
1831         var isSymbol$1 = createCommonjsModule(function (module) {
1832
1833         var toStr = Object.prototype.toString;
1834         var hasSymbols = hasSymbols$1();
1835
1836         if (hasSymbols) {
1837                 var symToStr = Symbol.prototype.toString;
1838                 var symStringRegex = /^Symbol\(.*\)$/;
1839                 var isSymbolObject = function isRealSymbolObject(value) {
1840                         if (typeof value.valueOf() !== 'symbol') {
1841                                 return false;
1842                         }
1843                         return symStringRegex.test(symToStr.call(value));
1844                 };
1845
1846                 module.exports = function isSymbol(value) {
1847                         if (typeof value === 'symbol') {
1848                                 return true;
1849                         }
1850                         if (toStr.call(value) !== '[object Symbol]') {
1851                                 return false;
1852                         }
1853                         try {
1854                                 return isSymbolObject(value);
1855                         } catch (e) {
1856                                 return false;
1857                         }
1858                 };
1859         } else {
1860
1861                 module.exports = function isSymbol(value) {
1862                         // this environment does not support Symbols.
1863                         return false ;
1864                 };
1865         }
1866         });
1867
1868         var hasSymbols$2 = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
1869
1870
1871
1872
1873
1874
1875         var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {
1876                 if (typeof O === 'undefined' || O === null) {
1877                         throw new TypeError('Cannot call method on ' + O);
1878                 }
1879                 if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
1880                         throw new TypeError('hint must be "string" or "number"');
1881                 }
1882                 var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
1883                 var method, result, i;
1884                 for (i = 0; i < methodNames.length; ++i) {
1885                         method = O[methodNames[i]];
1886                         if (isCallable$1(method)) {
1887                                 result = method.call(O);
1888                                 if (isPrimitive(result)) {
1889                                         return result;
1890                                 }
1891                         }
1892                 }
1893                 throw new TypeError('No default value');
1894         };
1895
1896         var GetMethod = function GetMethod(O, P) {
1897                 var func = O[P];
1898                 if (func !== null && typeof func !== 'undefined') {
1899                         if (!isCallable$1(func)) {
1900                                 throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');
1901                         }
1902                         return func;
1903                 }
1904                 return void 0;
1905         };
1906
1907         // http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
1908         var es2015 = function ToPrimitive(input) {
1909                 if (isPrimitive(input)) {
1910                         return input;
1911                 }
1912                 var hint = 'default';
1913                 if (arguments.length > 1) {
1914                         if (arguments[1] === String) {
1915                                 hint = 'string';
1916                         } else if (arguments[1] === Number) {
1917                                 hint = 'number';
1918                         }
1919                 }
1920
1921                 var exoticToPrim;
1922                 if (hasSymbols$2) {
1923                         if (Symbol.toPrimitive) {
1924                                 exoticToPrim = GetMethod(input, Symbol.toPrimitive);
1925                         } else if (isSymbol$1(input)) {
1926                                 exoticToPrim = Symbol.prototype.valueOf;
1927                         }
1928                 }
1929                 if (typeof exoticToPrim !== 'undefined') {
1930                         var result = exoticToPrim.call(input, hint);
1931                         if (isPrimitive(result)) {
1932                                 return result;
1933                         }
1934                         throw new TypeError('unable to convert exotic object to primitive');
1935                 }
1936                 if (hint === 'default' && (isDateObject(input) || isSymbol$1(input))) {
1937                         hint = 'string';
1938                 }
1939                 return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
1940         };
1941
1942         var es6 = es2015;
1943
1944         /* globals
1945                 Set,
1946                 Map,
1947                 WeakSet,
1948                 WeakMap,
1949
1950                 Promise,
1951
1952                 Symbol,
1953                 Proxy,
1954
1955                 Atomics,
1956                 SharedArrayBuffer,
1957
1958                 ArrayBuffer,
1959                 DataView,
1960                 Uint8Array,
1961                 Float32Array,
1962                 Float64Array,
1963                 Int8Array,
1964                 Int16Array,
1965                 Int32Array,
1966                 Uint8ClampedArray,
1967                 Uint16Array,
1968                 Uint32Array,
1969         */
1970
1971         var undefined$1; // eslint-disable-line no-shadow-restricted-names
1972
1973         var ThrowTypeError = Object.getOwnPropertyDescriptor
1974                 ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }())
1975                 : function () { throw new TypeError(); };
1976
1977         var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
1978
1979         var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
1980         var generatorFunction =  undefined$1;
1981         var asyncFunction =  undefined$1;
1982         var asyncGenFunction =  undefined$1;
1983
1984         var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
1985
1986         var INTRINSICS = {
1987                 '$ %Array%': Array,
1988                 '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1989                 '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer.prototype,
1990                 '$ %ArrayIteratorPrototype%': hasSymbols$3 ? getProto([][Symbol.iterator]()) : undefined$1,
1991                 '$ %ArrayPrototype%': Array.prototype,
1992                 '$ %ArrayProto_entries%': Array.prototype.entries,
1993                 '$ %ArrayProto_forEach%': Array.prototype.forEach,
1994                 '$ %ArrayProto_keys%': Array.prototype.keys,
1995                 '$ %ArrayProto_values%': Array.prototype.values,
1996                 '$ %AsyncFromSyncIteratorPrototype%': undefined$1,
1997                 '$ %AsyncFunction%': asyncFunction,
1998                 '$ %AsyncFunctionPrototype%':  undefined$1,
1999                 '$ %AsyncGenerator%':  undefined$1,
2000                 '$ %AsyncGeneratorFunction%': asyncGenFunction,
2001                 '$ %AsyncGeneratorPrototype%':  undefined$1,
2002                 '$ %AsyncIteratorPrototype%':  undefined$1,
2003                 '$ %Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
2004                 '$ %Boolean%': Boolean,
2005                 '$ %BooleanPrototype%': Boolean.prototype,
2006                 '$ %DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
2007                 '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined$1 : DataView.prototype,
2008                 '$ %Date%': Date,
2009                 '$ %DatePrototype%': Date.prototype,
2010                 '$ %decodeURI%': decodeURI,
2011                 '$ %decodeURIComponent%': decodeURIComponent,
2012                 '$ %encodeURI%': encodeURI,
2013                 '$ %encodeURIComponent%': encodeURIComponent,
2014                 '$ %Error%': Error,
2015                 '$ %ErrorPrototype%': Error.prototype,
2016                 '$ %eval%': eval, // eslint-disable-line no-eval
2017                 '$ %EvalError%': EvalError,
2018                 '$ %EvalErrorPrototype%': EvalError.prototype,
2019                 '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
2020                 '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array.prototype,
2021                 '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
2022                 '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array.prototype,
2023                 '$ %Function%': Function,
2024                 '$ %FunctionPrototype%': Function.prototype,
2025                 '$ %Generator%':  undefined$1,
2026                 '$ %GeneratorFunction%': generatorFunction,
2027                 '$ %GeneratorPrototype%':  undefined$1,
2028                 '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
2029                 '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2030                 '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
2031                 '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2032                 '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
2033                 '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array.prototype,
2034                 '$ %isFinite%': isFinite,
2035                 '$ %isNaN%': isNaN,
2036                 '$ %IteratorPrototype%': hasSymbols$3 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
2037                 '$ %JSON%': JSON,
2038                 '$ %JSONParse%': JSON.parse,
2039                 '$ %Map%': typeof Map === 'undefined' ? undefined$1 : Map,
2040                 '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
2041                 '$ %MapPrototype%': typeof Map === 'undefined' ? undefined$1 : Map.prototype,
2042                 '$ %Math%': Math,
2043                 '$ %Number%': Number,
2044                 '$ %NumberPrototype%': Number.prototype,
2045                 '$ %Object%': Object,
2046                 '$ %ObjectPrototype%': Object.prototype,
2047                 '$ %ObjProto_toString%': Object.prototype.toString,
2048                 '$ %ObjProto_valueOf%': Object.prototype.valueOf,
2049                 '$ %parseFloat%': parseFloat,
2050                 '$ %parseInt%': parseInt,
2051                 '$ %Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
2052                 '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype,
2053                 '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype.then,
2054                 '$ %Promise_all%': typeof Promise === 'undefined' ? undefined$1 : Promise.all,
2055                 '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined$1 : Promise.reject,
2056                 '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined$1 : Promise.resolve,
2057                 '$ %Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
2058                 '$ %RangeError%': RangeError,
2059                 '$ %RangeErrorPrototype%': RangeError.prototype,
2060                 '$ %ReferenceError%': ReferenceError,
2061                 '$ %ReferenceErrorPrototype%': ReferenceError.prototype,
2062                 '$ %Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
2063                 '$ %RegExp%': RegExp,
2064                 '$ %RegExpPrototype%': RegExp.prototype,
2065                 '$ %Set%': typeof Set === 'undefined' ? undefined$1 : Set,
2066                 '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
2067                 '$ %SetPrototype%': typeof Set === 'undefined' ? undefined$1 : Set.prototype,
2068                 '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
2069                 '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer.prototype,
2070                 '$ %String%': String,
2071                 '$ %StringIteratorPrototype%': hasSymbols$3 ? getProto(''[Symbol.iterator]()) : undefined$1,
2072                 '$ %StringPrototype%': String.prototype,
2073                 '$ %Symbol%': hasSymbols$3 ? Symbol : undefined$1,
2074                 '$ %SymbolPrototype%': hasSymbols$3 ? Symbol.prototype : undefined$1,
2075                 '$ %SyntaxError%': SyntaxError,
2076                 '$ %SyntaxErrorPrototype%': SyntaxError.prototype,
2077                 '$ %ThrowTypeError%': ThrowTypeError,
2078                 '$ %TypedArray%': TypedArray,
2079                 '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined$1,
2080                 '$ %TypeError%': TypeError,
2081                 '$ %TypeErrorPrototype%': TypeError.prototype,
2082                 '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
2083                 '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array.prototype,
2084                 '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
2085                 '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray.prototype,
2086                 '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
2087                 '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array.prototype,
2088                 '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
2089                 '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array.prototype,
2090                 '$ %URIError%': URIError,
2091                 '$ %URIErrorPrototype%': URIError.prototype,
2092                 '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
2093                 '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap.prototype,
2094                 '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
2095                 '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet.prototype
2096         };
2097
2098         var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
2099                 if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
2100                         throw new TypeError('"allowMissing" argument must be a boolean');
2101                 }
2102
2103                 var key = '$ ' + name;
2104                 if (!(key in INTRINSICS)) {
2105                         throw new SyntaxError('intrinsic ' + name + ' does not exist!');
2106                 }
2107
2108                 // istanbul ignore if // hopefully this is impossible to test :-)
2109                 if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {
2110                         throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
2111                 }
2112                 return INTRINSICS[key];
2113         };
2114
2115         var $TypeError = GetIntrinsic('%TypeError%');
2116         var $SyntaxError = GetIntrinsic('%SyntaxError%');
2117
2118
2119
2120         var predicates = {
2121           // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
2122           'Property Descriptor': function isPropertyDescriptor(ES, Desc) {
2123             if (ES.Type(Desc) !== 'Object') {
2124               return false;
2125             }
2126             var allowed = {
2127               '[[Configurable]]': true,
2128               '[[Enumerable]]': true,
2129               '[[Get]]': true,
2130               '[[Set]]': true,
2131               '[[Value]]': true,
2132               '[[Writable]]': true
2133             };
2134
2135             for (var key in Desc) { // eslint-disable-line
2136               if (src(Desc, key) && !allowed[key]) {
2137                 return false;
2138               }
2139             }
2140
2141             var isData = src(Desc, '[[Value]]');
2142             var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2143             if (isData && IsAccessor) {
2144               throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');
2145             }
2146             return true;
2147           }
2148         };
2149
2150         var assertRecord = function assertRecord(ES, recordType, argumentName, value) {
2151           var predicate = predicates[recordType];
2152           if (typeof predicate !== 'function') {
2153             throw new $SyntaxError('unknown record type: ' + recordType);
2154           }
2155           if (!predicate(ES, value)) {
2156             throw new $TypeError(argumentName + ' must be a ' + recordType);
2157           }
2158           console.log(predicate(ES, value), value);
2159         };
2160
2161         var _isNaN = Number.isNaN || function isNaN(a) {
2162                 return a !== a;
2163         };
2164
2165         var $isNaN = Number.isNaN || function (a) { return a !== a; };
2166
2167         var _isFinite = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
2168
2169         var has$1 = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2170
2171         var $assign = Object.assign;
2172
2173         var assign$1 = function assign(target, source) {
2174                 if ($assign) {
2175                         return $assign(target, source);
2176                 }
2177
2178                 for (var key in source) {
2179                         if (has$1(source, key)) {
2180                                 target[key] = source[key];
2181                         }
2182                 }
2183                 return target;
2184         };
2185
2186         var sign$1 = function sign(number) {
2187                 return number >= 0 ? 1 : -1;
2188         };
2189
2190         var mod = function mod(number, modulo) {
2191                 var remain = number % modulo;
2192                 return Math.floor(remain >= 0 ? remain : remain + modulo);
2193         };
2194
2195         var isPrimitive$1 = function isPrimitive(value) {
2196                 return value === null || (typeof value !== 'function' && typeof value !== 'object');
2197         };
2198
2199         var toStr$6 = Object.prototype.toString;
2200
2201
2202
2203
2204
2205         // http://ecma-international.org/ecma-262/5.1/#sec-8.12.8
2206         var ES5internalSlots = {
2207                 '[[DefaultValue]]': function (O) {
2208                         var actualHint;
2209                         if (arguments.length > 1) {
2210                                 actualHint = arguments[1];
2211                         } else {
2212                                 actualHint = toStr$6.call(O) === '[object Date]' ? String : Number;
2213                         }
2214
2215                         if (actualHint === String || actualHint === Number) {
2216                                 var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
2217                                 var value, i;
2218                                 for (i = 0; i < methods.length; ++i) {
2219                                         if (isCallable$1(O[methods[i]])) {
2220                                                 value = O[methods[i]]();
2221                                                 if (isPrimitive(value)) {
2222                                                         return value;
2223                                                 }
2224                                         }
2225                                 }
2226                                 throw new TypeError('No default value');
2227                         }
2228                         throw new TypeError('invalid [[DefaultValue]] hint supplied');
2229                 }
2230         };
2231
2232         // http://ecma-international.org/ecma-262/5.1/#sec-9.1
2233         var es5 = function ToPrimitive(input) {
2234                 if (isPrimitive(input)) {
2235                         return input;
2236                 }
2237                 if (arguments.length > 1) {
2238                         return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);
2239                 }
2240                 return ES5internalSlots['[[DefaultValue]]'](input);
2241         };
2242
2243         var $Object = GetIntrinsic('%Object%');
2244         var $TypeError$1 = GetIntrinsic('%TypeError%');
2245         var $String = GetIntrinsic('%String%');
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259         // https://es5.github.io/#x9
2260         var ES5 = {
2261                 ToPrimitive: es5,
2262
2263                 ToBoolean: function ToBoolean(value) {
2264                         return !!value;
2265                 },
2266                 ToNumber: function ToNumber(value) {
2267                         return +value; // eslint-disable-line no-implicit-coercion
2268                 },
2269                 ToInteger: function ToInteger(value) {
2270                         var number = this.ToNumber(value);
2271                         if (_isNaN(number)) { return 0; }
2272                         if (number === 0 || !_isFinite(number)) { return number; }
2273                         return sign$1(number) * Math.floor(Math.abs(number));
2274                 },
2275                 ToInt32: function ToInt32(x) {
2276                         return this.ToNumber(x) >> 0;
2277                 },
2278                 ToUint32: function ToUint32(x) {
2279                         return this.ToNumber(x) >>> 0;
2280                 },
2281                 ToUint16: function ToUint16(value) {
2282                         var number = this.ToNumber(value);
2283                         if (_isNaN(number) || number === 0 || !_isFinite(number)) { return 0; }
2284                         var posInt = sign$1(number) * Math.floor(Math.abs(number));
2285                         return mod(posInt, 0x10000);
2286                 },
2287                 ToString: function ToString(value) {
2288                         return $String(value);
2289                 },
2290                 ToObject: function ToObject(value) {
2291                         this.CheckObjectCoercible(value);
2292                         return $Object(value);
2293                 },
2294                 CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {
2295                         /* jshint eqnull:true */
2296                         if (value == null) {
2297                                 throw new $TypeError$1(optMessage || 'Cannot call method on ' + value);
2298                         }
2299                         return value;
2300                 },
2301                 IsCallable: isCallable$1,
2302                 SameValue: function SameValue(x, y) {
2303                         if (x === y) { // 0 === -0, but they are not identical.
2304                                 if (x === 0) { return 1 / x === 1 / y; }
2305                                 return true;
2306                         }
2307                         return _isNaN(x) && _isNaN(y);
2308                 },
2309
2310                 // https://www.ecma-international.org/ecma-262/5.1/#sec-8
2311                 Type: function Type(x) {
2312                         if (x === null) {
2313                                 return 'Null';
2314                         }
2315                         if (typeof x === 'undefined') {
2316                                 return 'Undefined';
2317                         }
2318                         if (typeof x === 'function' || typeof x === 'object') {
2319                                 return 'Object';
2320                         }
2321                         if (typeof x === 'number') {
2322                                 return 'Number';
2323                         }
2324                         if (typeof x === 'boolean') {
2325                                 return 'Boolean';
2326                         }
2327                         if (typeof x === 'string') {
2328                                 return 'String';
2329                         }
2330                 },
2331
2332                 // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
2333                 IsPropertyDescriptor: function IsPropertyDescriptor(Desc) {
2334                         if (this.Type(Desc) !== 'Object') {
2335                                 return false;
2336                         }
2337                         var allowed = {
2338                                 '[[Configurable]]': true,
2339                                 '[[Enumerable]]': true,
2340                                 '[[Get]]': true,
2341                                 '[[Set]]': true,
2342                                 '[[Value]]': true,
2343                                 '[[Writable]]': true
2344                         };
2345
2346                         for (var key in Desc) { // eslint-disable-line
2347                                 if (src(Desc, key) && !allowed[key]) {
2348                                         return false;
2349                                 }
2350                         }
2351
2352                         var isData = src(Desc, '[[Value]]');
2353                         var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2354                         if (isData && IsAccessor) {
2355                                 throw new $TypeError$1('Property Descriptors may not be both accessor and data descriptors');
2356                         }
2357                         return true;
2358                 },
2359
2360                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1
2361                 IsAccessorDescriptor: function IsAccessorDescriptor(Desc) {
2362                         if (typeof Desc === 'undefined') {
2363                                 return false;
2364                         }
2365
2366                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
2367
2368                         if (!src(Desc, '[[Get]]') && !src(Desc, '[[Set]]')) {
2369                                 return false;
2370                         }
2371
2372                         return true;
2373                 },
2374
2375                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2
2376                 IsDataDescriptor: function IsDataDescriptor(Desc) {
2377                         if (typeof Desc === 'undefined') {
2378                                 return false;
2379                         }
2380
2381                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
2382
2383                         if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
2384                                 return false;
2385                         }
2386
2387                         return true;
2388                 },
2389
2390                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3
2391                 IsGenericDescriptor: function IsGenericDescriptor(Desc) {
2392                         if (typeof Desc === 'undefined') {
2393                                 return false;
2394                         }
2395
2396                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
2397
2398                         if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) {
2399                                 return true;
2400                         }
2401
2402                         return false;
2403                 },
2404
2405                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4
2406                 FromPropertyDescriptor: function FromPropertyDescriptor(Desc) {
2407                         if (typeof Desc === 'undefined') {
2408                                 return Desc;
2409                         }
2410
2411                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
2412
2413                         if (this.IsDataDescriptor(Desc)) {
2414                                 return {
2415                                         value: Desc['[[Value]]'],
2416                                         writable: !!Desc['[[Writable]]'],
2417                                         enumerable: !!Desc['[[Enumerable]]'],
2418                                         configurable: !!Desc['[[Configurable]]']
2419                                 };
2420                         } else if (this.IsAccessorDescriptor(Desc)) {
2421                                 return {
2422                                         get: Desc['[[Get]]'],
2423                                         set: Desc['[[Set]]'],
2424                                         enumerable: !!Desc['[[Enumerable]]'],
2425                                         configurable: !!Desc['[[Configurable]]']
2426                                 };
2427                         } else {
2428                                 throw new $TypeError$1('FromPropertyDescriptor must be called with a fully populated Property Descriptor');
2429                         }
2430                 },
2431
2432                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5
2433                 ToPropertyDescriptor: function ToPropertyDescriptor(Obj) {
2434                         if (this.Type(Obj) !== 'Object') {
2435                                 throw new $TypeError$1('ToPropertyDescriptor requires an object');
2436                         }
2437
2438                         var desc = {};
2439                         if (src(Obj, 'enumerable')) {
2440                                 desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable);
2441                         }
2442                         if (src(Obj, 'configurable')) {
2443                                 desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable);
2444                         }
2445                         if (src(Obj, 'value')) {
2446                                 desc['[[Value]]'] = Obj.value;
2447                         }
2448                         if (src(Obj, 'writable')) {
2449                                 desc['[[Writable]]'] = this.ToBoolean(Obj.writable);
2450                         }
2451                         if (src(Obj, 'get')) {
2452                                 var getter = Obj.get;
2453                                 if (typeof getter !== 'undefined' && !this.IsCallable(getter)) {
2454                                         throw new TypeError('getter must be a function');
2455                                 }
2456                                 desc['[[Get]]'] = getter;
2457                         }
2458                         if (src(Obj, 'set')) {
2459                                 var setter = Obj.set;
2460                                 if (typeof setter !== 'undefined' && !this.IsCallable(setter)) {
2461                                         throw new $TypeError$1('setter must be a function');
2462                                 }
2463                                 desc['[[Set]]'] = setter;
2464                         }
2465
2466                         if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
2467                                 throw new $TypeError$1('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2468                         }
2469                         return desc;
2470                 }
2471         };
2472
2473         var es5$1 = ES5;
2474
2475         var regexExec = RegExp.prototype.exec;
2476         var gOPD = Object.getOwnPropertyDescriptor;
2477
2478         var tryRegexExecCall = function tryRegexExec(value) {
2479                 try {
2480                         var lastIndex = value.lastIndex;
2481                         value.lastIndex = 0;
2482
2483                         regexExec.call(value);
2484                         return true;
2485                 } catch (e) {
2486                         return false;
2487                 } finally {
2488                         value.lastIndex = lastIndex;
2489                 }
2490         };
2491         var toStr$7 = Object.prototype.toString;
2492         var regexClass = '[object RegExp]';
2493         var hasToStringTag$2 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2494
2495         var isRegex = function isRegex(value) {
2496                 if (!value || typeof value !== 'object') {
2497                         return false;
2498                 }
2499                 if (!hasToStringTag$2) {
2500                         return toStr$7.call(value) === regexClass;
2501                 }
2502
2503                 var descriptor = gOPD(value, 'lastIndex');
2504                 var hasLastIndexDataProperty = descriptor && src(descriptor, 'value');
2505                 if (!hasLastIndexDataProperty) {
2506                         return false;
2507                 }
2508
2509                 return tryRegexExecCall(value);
2510         };
2511
2512         var $TypeError$2 = GetIntrinsic('%TypeError%');
2513         var $SyntaxError$1 = GetIntrinsic('%SyntaxError%');
2514         var $Array = GetIntrinsic('%Array%');
2515         var $String$1 = GetIntrinsic('%String%');
2516         var $Object$1 = GetIntrinsic('%Object%');
2517         var $Number = GetIntrinsic('%Number%');
2518         var $Symbol = GetIntrinsic('%Symbol%', true);
2519         var $RegExp = GetIntrinsic('%RegExp%');
2520
2521         var hasSymbols$4 = !!$Symbol;
2522
2523
2524
2525
2526         var MAX_SAFE_INTEGER = $Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;
2527
2528
2529
2530
2531
2532         var parseInteger = parseInt;
2533
2534         var arraySlice = functionBind.call(Function.call, $Array.prototype.slice);
2535         var strSlice = functionBind.call(Function.call, $String$1.prototype.slice);
2536         var isBinary = functionBind.call(Function.call, $RegExp.prototype.test, /^0b[01]+$/i);
2537         var isOctal = functionBind.call(Function.call, $RegExp.prototype.test, /^0o[0-7]+$/i);
2538         var regexExec$1 = functionBind.call(Function.call, $RegExp.prototype.exec);
2539         var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
2540         var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
2541         var hasNonWS = functionBind.call(Function.call, $RegExp.prototype.test, nonWSregex);
2542         var invalidHexLiteral = /^[-+]0x[0-9a-f]+$/i;
2543         var isInvalidHexLiteral = functionBind.call(Function.call, $RegExp.prototype.test, invalidHexLiteral);
2544         var $charCodeAt = functionBind.call(Function.call, $String$1.prototype.charCodeAt);
2545
2546         var toStr$8 = functionBind.call(Function.call, Object.prototype.toString);
2547
2548         var $NumberValueOf = functionBind.call(Function.call, GetIntrinsic('%NumberPrototype%').valueOf);
2549         var $BooleanValueOf = functionBind.call(Function.call, GetIntrinsic('%BooleanPrototype%').valueOf);
2550         var $StringValueOf = functionBind.call(Function.call, GetIntrinsic('%StringPrototype%').valueOf);
2551         var $DateValueOf = functionBind.call(Function.call, GetIntrinsic('%DatePrototype%').valueOf);
2552
2553         var $floor = Math.floor;
2554         var $abs = Math.abs;
2555
2556         var $ObjectCreate = Object.create;
2557         var $gOPD = $Object$1.getOwnPropertyDescriptor;
2558
2559         var $isExtensible = $Object$1.isExtensible;
2560
2561         var $defineProperty = $Object$1.defineProperty;
2562
2563         // whitespace from: http://es5.github.io/#x15.5.4.20
2564         // implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324
2565         var ws = [
2566                 '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003',
2567                 '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028',
2568                 '\u2029\uFEFF'
2569         ].join('');
2570         var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g');
2571         var replace = functionBind.call(Function.call, $String$1.prototype.replace);
2572         var trim = function (value) {
2573                 return replace(value, trimRegex, '');
2574         };
2575
2576
2577
2578
2579
2580         // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations
2581         var ES6 = assign$1(assign$1({}, es5$1), {
2582
2583                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args
2584                 Call: function Call(F, V) {
2585                         var args = arguments.length > 2 ? arguments[2] : [];
2586                         if (!this.IsCallable(F)) {
2587                                 throw new $TypeError$2(F + ' is not a function');
2588                         }
2589                         return F.apply(V, args);
2590                 },
2591
2592                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive
2593                 ToPrimitive: es6,
2594
2595                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean
2596                 // ToBoolean: ES5.ToBoolean,
2597
2598                 // https://ecma-international.org/ecma-262/6.0/#sec-tonumber
2599                 ToNumber: function ToNumber(argument) {
2600                         var value = isPrimitive$1(argument) ? argument : es6(argument, $Number);
2601                         if (typeof value === 'symbol') {
2602                                 throw new $TypeError$2('Cannot convert a Symbol value to a number');
2603                         }
2604                         if (typeof value === 'string') {
2605                                 if (isBinary(value)) {
2606                                         return this.ToNumber(parseInteger(strSlice(value, 2), 2));
2607                                 } else if (isOctal(value)) {
2608                                         return this.ToNumber(parseInteger(strSlice(value, 2), 8));
2609                                 } else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
2610                                         return NaN;
2611                                 } else {
2612                                         var trimmed = trim(value);
2613                                         if (trimmed !== value) {
2614                                                 return this.ToNumber(trimmed);
2615                                         }
2616                                 }
2617                         }
2618                         return $Number(value);
2619                 },
2620
2621                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger
2622                 // ToInteger: ES5.ToNumber,
2623
2624                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32
2625                 // ToInt32: ES5.ToInt32,
2626
2627                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32
2628                 // ToUint32: ES5.ToUint32,
2629
2630                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16
2631                 ToInt16: function ToInt16(argument) {
2632                         var int16bit = this.ToUint16(argument);
2633                         return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit;
2634                 },
2635
2636                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16
2637                 // ToUint16: ES5.ToUint16,
2638
2639                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8
2640                 ToInt8: function ToInt8(argument) {
2641                         var int8bit = this.ToUint8(argument);
2642                         return int8bit >= 0x80 ? int8bit - 0x100 : int8bit;
2643                 },
2644
2645                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8
2646                 ToUint8: function ToUint8(argument) {
2647                         var number = this.ToNumber(argument);
2648                         if (_isNaN(number) || number === 0 || !_isFinite(number)) { return 0; }
2649                         var posInt = sign$1(number) * $floor($abs(number));
2650                         return mod(posInt, 0x100);
2651                 },
2652
2653                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp
2654                 ToUint8Clamp: function ToUint8Clamp(argument) {
2655                         var number = this.ToNumber(argument);
2656                         if (_isNaN(number) || number <= 0) { return 0; }
2657                         if (number >= 0xFF) { return 0xFF; }
2658                         var f = $floor(argument);
2659                         if (f + 0.5 < number) { return f + 1; }
2660                         if (number < f + 0.5) { return f; }
2661                         if (f % 2 !== 0) { return f + 1; }
2662                         return f;
2663                 },
2664
2665                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring
2666                 ToString: function ToString(argument) {
2667                         if (typeof argument === 'symbol') {
2668                                 throw new $TypeError$2('Cannot convert a Symbol value to a string');
2669                         }
2670                         return $String$1(argument);
2671                 },
2672
2673                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject
2674                 ToObject: function ToObject(value) {
2675                         this.RequireObjectCoercible(value);
2676                         return $Object$1(value);
2677                 },
2678
2679                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey
2680                 ToPropertyKey: function ToPropertyKey(argument) {
2681                         var key = this.ToPrimitive(argument, $String$1);
2682                         return typeof key === 'symbol' ? key : this.ToString(key);
2683                 },
2684
2685                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
2686                 ToLength: function ToLength(argument) {
2687                         var len = this.ToInteger(argument);
2688                         if (len <= 0) { return 0; } // includes converting -0 to +0
2689                         if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
2690                         return len;
2691                 },
2692
2693                 // https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring
2694                 CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) {
2695                         if (toStr$8(argument) !== '[object String]') {
2696                                 throw new $TypeError$2('must be a string');
2697                         }
2698                         if (argument === '-0') { return -0; }
2699                         var n = this.ToNumber(argument);
2700                         if (this.SameValue(this.ToString(n), argument)) { return n; }
2701                         return void 0;
2702                 },
2703
2704                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible
2705                 RequireObjectCoercible: es5$1.CheckObjectCoercible,
2706
2707                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray
2708                 IsArray: $Array.isArray || function IsArray(argument) {
2709                         return toStr$8(argument) === '[object Array]';
2710                 },
2711
2712                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable
2713                 // IsCallable: ES5.IsCallable,
2714
2715                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor
2716                 IsConstructor: function IsConstructor(argument) {
2717                         return typeof argument === 'function' && !!argument.prototype; // unfortunately there's no way to truly check this without try/catch `new argument`
2718                 },
2719
2720                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o
2721                 IsExtensible: Object.preventExtensions
2722                         ? function IsExtensible(obj) {
2723                                 if (isPrimitive$1(obj)) {
2724                                         return false;
2725                                 }
2726                                 return $isExtensible(obj);
2727                         }
2728                         : function isExtensible(obj) { return true; }, // eslint-disable-line no-unused-vars
2729
2730                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger
2731                 IsInteger: function IsInteger(argument) {
2732                         if (typeof argument !== 'number' || _isNaN(argument) || !_isFinite(argument)) {
2733                                 return false;
2734                         }
2735                         var abs = $abs(argument);
2736                         return $floor(abs) === abs;
2737                 },
2738
2739                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey
2740                 IsPropertyKey: function IsPropertyKey(argument) {
2741                         return typeof argument === 'string' || typeof argument === 'symbol';
2742                 },
2743
2744                 // https://ecma-international.org/ecma-262/6.0/#sec-isregexp
2745                 IsRegExp: function IsRegExp(argument) {
2746                         if (!argument || typeof argument !== 'object') {
2747                                 return false;
2748                         }
2749                         if (hasSymbols$4) {
2750                                 var isRegExp = argument[$Symbol.match];
2751                                 if (typeof isRegExp !== 'undefined') {
2752                                         return es5$1.ToBoolean(isRegExp);
2753                                 }
2754                         }
2755                         return isRegex(argument);
2756                 },
2757
2758                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue
2759                 // SameValue: ES5.SameValue,
2760
2761                 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero
2762                 SameValueZero: function SameValueZero(x, y) {
2763                         return (x === y) || (_isNaN(x) && _isNaN(y));
2764                 },
2765
2766                 /**
2767                  * 7.3.2 GetV (V, P)
2768                  * 1. Assert: IsPropertyKey(P) is true.
2769                  * 2. Let O be ToObject(V).
2770                  * 3. ReturnIfAbrupt(O).
2771                  * 4. Return O.[[Get]](P, V).
2772                  */
2773                 GetV: function GetV(V, P) {
2774                         // 7.3.2.1
2775                         if (!this.IsPropertyKey(P)) {
2776                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
2777                         }
2778
2779                         // 7.3.2.2-3
2780                         var O = this.ToObject(V);
2781
2782                         // 7.3.2.4
2783                         return O[P];
2784                 },
2785
2786                 /**
2787                  * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod
2788                  * 1. Assert: IsPropertyKey(P) is true.
2789                  * 2. Let func be GetV(O, P).
2790                  * 3. ReturnIfAbrupt(func).
2791                  * 4. If func is either undefined or null, return undefined.
2792                  * 5. If IsCallable(func) is false, throw a TypeError exception.
2793                  * 6. Return func.
2794                  */
2795                 GetMethod: function GetMethod(O, P) {
2796                         // 7.3.9.1
2797                         if (!this.IsPropertyKey(P)) {
2798                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
2799                         }
2800
2801                         // 7.3.9.2
2802                         var func = this.GetV(O, P);
2803
2804                         // 7.3.9.4
2805                         if (func == null) {
2806                                 return void 0;
2807                         }
2808
2809                         // 7.3.9.5
2810                         if (!this.IsCallable(func)) {
2811                                 throw new $TypeError$2(P + 'is not a function');
2812                         }
2813
2814                         // 7.3.9.6
2815                         return func;
2816                 },
2817
2818                 /**
2819                  * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p
2820                  * 1. Assert: Type(O) is Object.
2821                  * 2. Assert: IsPropertyKey(P) is true.
2822                  * 3. Return O.[[Get]](P, O).
2823                  */
2824                 Get: function Get(O, P) {
2825                         // 7.3.1.1
2826                         if (this.Type(O) !== 'Object') {
2827                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
2828                         }
2829                         // 7.3.1.2
2830                         if (!this.IsPropertyKey(P)) {
2831                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
2832                         }
2833                         // 7.3.1.3
2834                         return O[P];
2835                 },
2836
2837                 Type: function Type(x) {
2838                         if (typeof x === 'symbol') {
2839                                 return 'Symbol';
2840                         }
2841                         return es5$1.Type(x);
2842                 },
2843
2844                 // https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor
2845                 SpeciesConstructor: function SpeciesConstructor(O, defaultConstructor) {
2846                         if (this.Type(O) !== 'Object') {
2847                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
2848                         }
2849                         var C = O.constructor;
2850                         if (typeof C === 'undefined') {
2851                                 return defaultConstructor;
2852                         }
2853                         if (this.Type(C) !== 'Object') {
2854                                 throw new $TypeError$2('O.constructor is not an Object');
2855                         }
2856                         var S = hasSymbols$4 && $Symbol.species ? C[$Symbol.species] : void 0;
2857                         if (S == null) {
2858                                 return defaultConstructor;
2859                         }
2860                         if (this.IsConstructor(S)) {
2861                                 return S;
2862                         }
2863                         throw new $TypeError$2('no constructor found');
2864                 },
2865
2866                 // https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor
2867                 CompletePropertyDescriptor: function CompletePropertyDescriptor(Desc) {
2868                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
2869
2870                         if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) {
2871                                 if (!src(Desc, '[[Value]]')) {
2872                                         Desc['[[Value]]'] = void 0;
2873                                 }
2874                                 if (!src(Desc, '[[Writable]]')) {
2875                                         Desc['[[Writable]]'] = false;
2876                                 }
2877                         } else {
2878                                 if (!src(Desc, '[[Get]]')) {
2879                                         Desc['[[Get]]'] = void 0;
2880                                 }
2881                                 if (!src(Desc, '[[Set]]')) {
2882                                         Desc['[[Set]]'] = void 0;
2883                                 }
2884                         }
2885                         if (!src(Desc, '[[Enumerable]]')) {
2886                                 Desc['[[Enumerable]]'] = false;
2887                         }
2888                         if (!src(Desc, '[[Configurable]]')) {
2889                                 Desc['[[Configurable]]'] = false;
2890                         }
2891                         return Desc;
2892                 },
2893
2894                 // https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw
2895                 Set: function Set(O, P, V, Throw) {
2896                         if (this.Type(O) !== 'Object') {
2897                                 throw new $TypeError$2('O must be an Object');
2898                         }
2899                         if (!this.IsPropertyKey(P)) {
2900                                 throw new $TypeError$2('P must be a Property Key');
2901                         }
2902                         if (this.Type(Throw) !== 'Boolean') {
2903                                 throw new $TypeError$2('Throw must be a Boolean');
2904                         }
2905                         if (Throw) {
2906                                 O[P] = V;
2907                                 return true;
2908                         } else {
2909                                 try {
2910                                         O[P] = V;
2911                                 } catch (e) {
2912                                         return false;
2913                                 }
2914                         }
2915                 },
2916
2917                 // https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty
2918                 HasOwnProperty: function HasOwnProperty(O, P) {
2919                         if (this.Type(O) !== 'Object') {
2920                                 throw new $TypeError$2('O must be an Object');
2921                         }
2922                         if (!this.IsPropertyKey(P)) {
2923                                 throw new $TypeError$2('P must be a Property Key');
2924                         }
2925                         return src(O, P);
2926                 },
2927
2928                 // https://ecma-international.org/ecma-262/6.0/#sec-hasproperty
2929                 HasProperty: function HasProperty(O, P) {
2930                         if (this.Type(O) !== 'Object') {
2931                                 throw new $TypeError$2('O must be an Object');
2932                         }
2933                         if (!this.IsPropertyKey(P)) {
2934                                 throw new $TypeError$2('P must be a Property Key');
2935                         }
2936                         return P in O;
2937                 },
2938
2939                 // https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable
2940                 IsConcatSpreadable: function IsConcatSpreadable(O) {
2941                         if (this.Type(O) !== 'Object') {
2942                                 return false;
2943                         }
2944                         if (hasSymbols$4 && typeof $Symbol.isConcatSpreadable === 'symbol') {
2945                                 var spreadable = this.Get(O, Symbol.isConcatSpreadable);
2946                                 if (typeof spreadable !== 'undefined') {
2947                                         return this.ToBoolean(spreadable);
2948                                 }
2949                         }
2950                         return this.IsArray(O);
2951                 },
2952
2953                 // https://ecma-international.org/ecma-262/6.0/#sec-invoke
2954                 Invoke: function Invoke(O, P) {
2955                         if (!this.IsPropertyKey(P)) {
2956                                 throw new $TypeError$2('P must be a Property Key');
2957                         }
2958                         var argumentsList = arraySlice(arguments, 2);
2959                         var func = this.GetV(O, P);
2960                         return this.Call(func, O, argumentsList);
2961                 },
2962
2963                 // https://ecma-international.org/ecma-262/6.0/#sec-getiterator
2964                 GetIterator: function GetIterator(obj, method) {
2965                         if (!hasSymbols$4) {
2966                                 throw new SyntaxError('ES.GetIterator depends on native iterator support.');
2967                         }
2968
2969                         var actualMethod = method;
2970                         if (arguments.length < 2) {
2971                                 actualMethod = this.GetMethod(obj, $Symbol.iterator);
2972                         }
2973                         var iterator = this.Call(actualMethod, obj);
2974                         if (this.Type(iterator) !== 'Object') {
2975                                 throw new $TypeError$2('iterator must return an object');
2976                         }
2977
2978                         return iterator;
2979                 },
2980
2981                 // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext
2982                 IteratorNext: function IteratorNext(iterator, value) {
2983                         var result = this.Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
2984                         if (this.Type(result) !== 'Object') {
2985                                 throw new $TypeError$2('iterator next must return an object');
2986                         }
2987                         return result;
2988                 },
2989
2990                 // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete
2991                 IteratorComplete: function IteratorComplete(iterResult) {
2992                         if (this.Type(iterResult) !== 'Object') {
2993                                 throw new $TypeError$2('Assertion failed: Type(iterResult) is not Object');
2994                         }
2995                         return this.ToBoolean(this.Get(iterResult, 'done'));
2996                 },
2997
2998                 // https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue
2999                 IteratorValue: function IteratorValue(iterResult) {
3000                         if (this.Type(iterResult) !== 'Object') {
3001                                 throw new $TypeError$2('Assertion failed: Type(iterResult) is not Object');
3002                         }
3003                         return this.Get(iterResult, 'value');
3004                 },
3005
3006                 // https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep
3007                 IteratorStep: function IteratorStep(iterator) {
3008                         var result = this.IteratorNext(iterator);
3009                         var done = this.IteratorComplete(result);
3010                         return done === true ? false : result;
3011                 },
3012
3013                 // https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose
3014                 IteratorClose: function IteratorClose(iterator, completion) {
3015                         if (this.Type(iterator) !== 'Object') {
3016                                 throw new $TypeError$2('Assertion failed: Type(iterator) is not Object');
3017                         }
3018                         if (!this.IsCallable(completion)) {
3019                                 throw new $TypeError$2('Assertion failed: completion is not a thunk for a Completion Record');
3020                         }
3021                         var completionThunk = completion;
3022
3023                         var iteratorReturn = this.GetMethod(iterator, 'return');
3024
3025                         if (typeof iteratorReturn === 'undefined') {
3026                                 return completionThunk();
3027                         }
3028
3029                         var completionRecord;
3030                         try {
3031                                 var innerResult = this.Call(iteratorReturn, iterator, []);
3032                         } catch (e) {
3033                                 // if we hit here, then "e" is the innerResult completion that needs re-throwing
3034
3035                                 // if the completion is of type "throw", this will throw.
3036                                 completionRecord = completionThunk();
3037                                 completionThunk = null; // ensure it's not called twice.
3038
3039                                 // if not, then return the innerResult completion
3040                                 throw e;
3041                         }
3042                         completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
3043                         completionThunk = null; // ensure it's not called twice.
3044
3045                         if (this.Type(innerResult) !== 'Object') {
3046                                 throw new $TypeError$2('iterator .return must return an object');
3047                         }
3048
3049                         return completionRecord;
3050                 },
3051
3052                 // https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject
3053                 CreateIterResultObject: function CreateIterResultObject(value, done) {
3054                         if (this.Type(done) !== 'Boolean') {
3055                                 throw new $TypeError$2('Assertion failed: Type(done) is not Boolean');
3056                         }
3057                         return {
3058                                 value: value,
3059                                 done: done
3060                         };
3061                 },
3062
3063                 // https://ecma-international.org/ecma-262/6.0/#sec-regexpexec
3064                 RegExpExec: function RegExpExec(R, S) {
3065                         if (this.Type(R) !== 'Object') {
3066                                 throw new $TypeError$2('R must be an Object');
3067                         }
3068                         if (this.Type(S) !== 'String') {
3069                                 throw new $TypeError$2('S must be a String');
3070                         }
3071                         var exec = this.Get(R, 'exec');
3072                         if (this.IsCallable(exec)) {
3073                                 var result = this.Call(exec, R, [S]);
3074                                 if (result === null || this.Type(result) === 'Object') {
3075                                         return result;
3076                                 }
3077                                 throw new $TypeError$2('"exec" method must return `null` or an Object');
3078                         }
3079                         return regexExec$1(R, S);
3080                 },
3081
3082                 // https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate
3083                 ArraySpeciesCreate: function ArraySpeciesCreate(originalArray, length) {
3084                         if (!this.IsInteger(length) || length < 0) {
3085                                 throw new $TypeError$2('Assertion failed: length must be an integer >= 0');
3086                         }
3087                         var len = length === 0 ? 0 : length;
3088                         var C;
3089                         var isArray = this.IsArray(originalArray);
3090                         if (isArray) {
3091                                 C = this.Get(originalArray, 'constructor');
3092                                 // TODO: figure out how to make a cross-realm normal Array, a same-realm Array
3093                                 // if (this.IsConstructor(C)) {
3094                                 //      if C is another realm's Array, C = undefined
3095                                 //      Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
3096                                 // }
3097                                 if (this.Type(C) === 'Object' && hasSymbols$4 && $Symbol.species) {
3098                                         C = this.Get(C, $Symbol.species);
3099                                         if (C === null) {
3100                                                 C = void 0;
3101                                         }
3102                                 }
3103                         }
3104                         if (typeof C === 'undefined') {
3105                                 return $Array(len);
3106                         }
3107                         if (!this.IsConstructor(C)) {
3108                                 throw new $TypeError$2('C must be a constructor');
3109                         }
3110                         return new C(len); // this.Construct(C, len);
3111                 },
3112
3113                 CreateDataProperty: function CreateDataProperty(O, P, V) {
3114                         if (this.Type(O) !== 'Object') {
3115                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
3116                         }
3117                         if (!this.IsPropertyKey(P)) {
3118                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
3119                         }
3120                         var oldDesc = $gOPD(O, P);
3121                         var extensible = oldDesc || (typeof $isExtensible !== 'function' || $isExtensible(O));
3122                         var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable);
3123                         if (immutable || !extensible) {
3124                                 return false;
3125                         }
3126                         var newDesc = {
3127                                 configurable: true,
3128                                 enumerable: true,
3129                                 value: V,
3130                                 writable: true
3131                         };
3132                         $defineProperty(O, P, newDesc);
3133                         return true;
3134                 },
3135
3136                 // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow
3137                 CreateDataPropertyOrThrow: function CreateDataPropertyOrThrow(O, P, V) {
3138                         if (this.Type(O) !== 'Object') {
3139                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
3140                         }
3141                         if (!this.IsPropertyKey(P)) {
3142                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
3143                         }
3144                         var success = this.CreateDataProperty(O, P, V);
3145                         if (!success) {
3146                                 throw new $TypeError$2('unable to create data property');
3147                         }
3148                         return success;
3149                 },
3150
3151                 // https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate
3152                 ObjectCreate: function ObjectCreate(proto, internalSlotsList) {
3153                         if (proto !== null && this.Type(proto) !== 'Object') {
3154                                 throw new $TypeError$2('Assertion failed: proto must be null or an object');
3155                         }
3156                         var slots = arguments.length < 2 ? [] : internalSlotsList;
3157                         if (slots.length > 0) {
3158                                 throw new $SyntaxError$1('es-abstract does not yet support internal slots');
3159                         }
3160
3161                         if (proto === null && !$ObjectCreate) {
3162                                 throw new $SyntaxError$1('native Object.create support is required to create null objects');
3163                         }
3164
3165                         return $ObjectCreate(proto);
3166                 },
3167
3168                 // https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex
3169                 AdvanceStringIndex: function AdvanceStringIndex(S, index, unicode) {
3170                         if (this.Type(S) !== 'String') {
3171                                 throw new $TypeError$2('S must be a String');
3172                         }
3173                         if (!this.IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
3174                                 throw new $TypeError$2('Assertion failed: length must be an integer >= 0 and <= 2**53');
3175                         }
3176                         if (this.Type(unicode) !== 'Boolean') {
3177                                 throw new $TypeError$2('Assertion failed: unicode must be a Boolean');
3178                         }
3179                         if (!unicode) {
3180                                 return index + 1;
3181                         }
3182                         var length = S.length;
3183                         if ((index + 1) >= length) {
3184                                 return index + 1;
3185                         }
3186
3187                         var first = $charCodeAt(S, index);
3188                         if (first < 0xD800 || first > 0xDBFF) {
3189                                 return index + 1;
3190                         }
3191
3192                         var second = $charCodeAt(S, index + 1);
3193                         if (second < 0xDC00 || second > 0xDFFF) {
3194                                 return index + 1;
3195                         }
3196
3197                         return index + 2;
3198                 },
3199
3200                 // https://www.ecma-international.org/ecma-262/6.0/#sec-createmethodproperty
3201                 CreateMethodProperty: function CreateMethodProperty(O, P, V) {
3202                         if (this.Type(O) !== 'Object') {
3203                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
3204                         }
3205
3206                         if (!this.IsPropertyKey(P)) {
3207                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
3208                         }
3209
3210                         var newDesc = {
3211                                 configurable: true,
3212                                 enumerable: false,
3213                                 value: V,
3214                                 writable: true
3215                         };
3216                         return !!$defineProperty(O, P, newDesc);
3217                 },
3218
3219                 // https://www.ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow
3220                 DefinePropertyOrThrow: function DefinePropertyOrThrow(O, P, desc) {
3221                         if (this.Type(O) !== 'Object') {
3222                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
3223                         }
3224
3225                         if (!this.IsPropertyKey(P)) {
3226                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
3227                         }
3228
3229                         return !!$defineProperty(O, P, desc);
3230                 },
3231
3232                 // https://www.ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow
3233                 DeletePropertyOrThrow: function DeletePropertyOrThrow(O, P) {
3234                         if (this.Type(O) !== 'Object') {
3235                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
3236                         }
3237
3238                         if (!this.IsPropertyKey(P)) {
3239                                 throw new $TypeError$2('Assertion failed: IsPropertyKey(P) is not true');
3240                         }
3241
3242                         var success = delete O[P];
3243                         if (!success) {
3244                                 throw new TypeError('Attempt to delete property failed.');
3245                         }
3246                         return success;
3247                 },
3248
3249                 // https://www.ecma-international.org/ecma-262/6.0/#sec-enumerableownnames
3250                 EnumerableOwnNames: function EnumerableOwnNames(O) {
3251                         if (this.Type(O) !== 'Object') {
3252                                 throw new $TypeError$2('Assertion failed: Type(O) is not Object');
3253                         }
3254
3255                         return objectKeys(O);
3256                 },
3257
3258                 // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object
3259                 thisNumberValue: function thisNumberValue(value) {
3260                         if (this.Type(value) === 'Number') {
3261                                 return value;
3262                         }
3263
3264                         return $NumberValueOf(value);
3265                 },
3266
3267                 // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object
3268                 thisBooleanValue: function thisBooleanValue(value) {
3269                         if (this.Type(value) === 'Boolean') {
3270                                 return value;
3271                         }
3272
3273                         return $BooleanValueOf(value);
3274                 },
3275
3276                 // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object
3277                 thisStringValue: function thisStringValue(value) {
3278                         if (this.Type(value) === 'String') {
3279                                 return value;
3280                         }
3281
3282                         return $StringValueOf(value);
3283                 },
3284
3285                 // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object
3286                 thisTimeValue: function thisTimeValue(value) {
3287                         return $DateValueOf(value);
3288                 }
3289         });
3290
3291         delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible
3292
3293         var es2015$1 = ES6;
3294
3295         var es6$1 = es2015$1;
3296
3297         var implementation$2 = function find(predicate) {
3298                 var list = es6$1.ToObject(this);
3299                 var length = es6$1.ToInteger(es6$1.ToLength(list.length));
3300                 if (!es6$1.IsCallable(predicate)) {
3301                         throw new TypeError('Array#find: predicate must be a function');
3302                 }
3303                 if (length === 0) {
3304                         return undefined;
3305                 }
3306                 var thisArg = arguments[1];
3307                 for (var i = 0, value; i < length; i++) {
3308                         value = list[i];
3309                         if (es6$1.Call(predicate, thisArg, [value, i, list])) {
3310                                 return value;
3311                         }
3312                 }
3313                 return undefined;
3314         };
3315
3316         var polyfill$3 = function getPolyfill() {
3317                 // Detect if an implementation exists
3318                 // Detect early implementations which skipped holes in sparse arrays
3319           // eslint-disable-next-line no-sparse-arrays
3320                 var implemented = Array.prototype.find && [, 1].find(function () {
3321                         return true;
3322                 }) !== 1;
3323
3324           // eslint-disable-next-line global-require
3325                 return implemented ? Array.prototype.find : implementation$2;
3326         };
3327
3328         var shim$8 = function shimArrayPrototypeFind() {
3329                 var polyfill = polyfill$3();
3330
3331                 defineProperties_1(Array.prototype, { find: polyfill }, {
3332                         find: function () {
3333                                 return Array.prototype.find !== polyfill;
3334                         }
3335                 });
3336
3337                 return polyfill;
3338         };
3339
3340         var slice$2 = Array.prototype.slice;
3341
3342         var polyfill$4 = polyfill$3();
3343
3344         var boundFindShim = function find(array, predicate) { // eslint-disable-line no-unused-vars
3345                 es6$1.RequireObjectCoercible(array);
3346                 var args = slice$2.call(arguments, 1);
3347                 return polyfill$4.apply(array, args);
3348         };
3349
3350         defineProperties_1(boundFindShim, {
3351                 getPolyfill: polyfill$3,
3352                 implementation: implementation$2,
3353                 shim: shim$8
3354         });
3355
3356         var array_prototype_find = boundFindShim;
3357
3358         var implementation$3 = function findIndex(predicate) {
3359                 var list = es6$1.ToObject(this);
3360                 var length = es6$1.ToLength(list.length);
3361                 if (!es6$1.IsCallable(predicate)) {
3362                         throw new TypeError('Array#findIndex: predicate must be a function');
3363                 }
3364                 if (length === 0) return -1;
3365                 var thisArg = arguments[1];
3366                 for (var i = 0, value; i < length; i++) {
3367                         value = list[i];
3368                         if (es6$1.Call(predicate, thisArg, [value, i, list])) return i;
3369                 }
3370                 return -1;
3371         };
3372
3373         var polyfill$5 = function getPolyfill() {
3374                 // Detect if an implementation exists
3375                 // Detect early implementations which skipped holes in sparse arrays
3376                 var implemented = Array.prototype.findIndex && ([, 1].findIndex(function (item, idx) {
3377                         return idx === 0;
3378                 }) === 0);
3379
3380
3381                 return implemented ? Array.prototype.findIndex : implementation$3;
3382         };
3383
3384         var shim$9 = function shimArrayPrototypeFindIndex() {
3385                 var polyfill = polyfill$5();
3386
3387                 defineProperties_1(Array.prototype, { findIndex: polyfill }, {
3388                         findIndex: function () {
3389                                 return Array.prototype.findIndex !== polyfill;
3390                         }
3391                 });
3392
3393                 return polyfill;
3394         };
3395
3396         var slice$3 = Array.prototype.slice;
3397
3398         var polyfill$6 = polyfill$5();
3399
3400         var boundShim = function findIndex(array, predicate) {
3401                 es6$1.RequireObjectCoercible(array);
3402                 var args = slice$3.call(arguments, 1);
3403                 return polyfill$6.apply(array, args);
3404         };
3405
3406         defineProperties_1(boundShim, {
3407                 implementation: implementation$3,
3408                 getPolyfill: polyfill$5,
3409                 shim: shim$9
3410         });
3411
3412         var array_prototype_findindex = boundShim;
3413
3414         var supportsDescriptors$1 = defineProperties_1.supportsDescriptors;
3415
3416         /*! https://mths.be/array-from v0.2.0 by @mathias */
3417         var implementation$4 = function from(arrayLike) {
3418                 var defineProperty = supportsDescriptors$1 ? Object.defineProperty : function put(object, key, descriptor) {
3419                         object[key] = descriptor.value;
3420                 };
3421                 var C = this;
3422                 if (arrayLike === null || typeof arrayLike === 'undefined') {
3423                         throw new TypeError('`Array.from` requires an array-like object, not `null` or `undefined`');
3424                 }
3425                 var items = es6$1.ToObject(arrayLike);
3426
3427                 var mapFn, T;
3428                 if (typeof arguments[1] !== 'undefined') {
3429                         mapFn = arguments[1];
3430                         if (!es6$1.IsCallable(mapFn)) {
3431                                 throw new TypeError('When provided, the second argument to `Array.from` must be a function');
3432                         }
3433                         if (arguments.length > 2) {
3434                                 T = arguments[2];
3435                         }
3436                 }
3437
3438                 var len = es6$1.ToLength(items.length);
3439                 var A = es6$1.IsCallable(C) ? es6$1.ToObject(new C(len)) : new Array(len);
3440                 var k = 0;
3441                 var kValue, mappedValue;
3442                 while (k < len) {
3443                         kValue = items[k];
3444                         if (mapFn) {
3445                                 mappedValue = typeof T === 'undefined' ? mapFn(kValue, k) : es6$1.Call(mapFn, T, [kValue, k]);
3446                         } else {
3447                                 mappedValue = kValue;
3448                         }
3449                         defineProperty(A, k, {
3450                                 'configurable': true,
3451                                 'enumerable': true,
3452                                 'value': mappedValue,
3453                                 'writable': true
3454                         });
3455                         k += 1;
3456                 }
3457                 A.length = len;
3458                 return A;
3459         };
3460
3461         var tryCall = function (fn) {
3462                 try {
3463                         fn();
3464                         return true;
3465                 } catch (e) {
3466                         return false;
3467                 }
3468         };
3469
3470         var polyfill$7 = function getPolyfill() {
3471  &nbs