-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolyfilled.js
3041 lines (2684 loc) · 96.6 KB
/
polyfilled.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
if (Environment.platform === "iOS") {
var version = -1;
try {
version = parseInt(Environment.platformVersion.split(".")[0]);
} catch (e) {}
if (version <= 12) {
var commonjsGlobal =
typeof globalThis !== "undefined"
? globalThis
: typeof window !== "undefined"
? window
: typeof global !== "undefined"
? global
: typeof self !== "undefined"
? self
: {};
function createCommonjsModule(fn, basedir, module) {
return (
(module = {
path: basedir,
exports: {},
require: function (path, base) {
return commonjsRequire(
path,
base === undefined || base === null ? module.path : base
);
},
}),
fn(module, module.exports),
module.exports
);
}
function commonjsRequire() {
throw new Error(
"Dynamic requires are not currently supported by @rollup/plugin-commonjs"
);
}
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global_1 =
// eslint-disable-next-line es/no-global-this -- safe
check(typeof globalThis == "object" && globalThis) ||
check(typeof window == "object" && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == "object" && self) ||
check(typeof commonjsGlobal == "object" && commonjsGlobal) ||
// eslint-disable-next-line no-new-func -- fallback
(function () {
return this;
})() ||
Function("return this")();
var fails = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
// Detect IE8's incomplete defineProperty implementation
var descriptors = !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return (
Object.defineProperty({}, 1, {
get: function () {
return 7;
},
})[1] != 7
);
});
var functionBindNative = !fails(function () {
// eslint-disable-next-line es/no-function-prototype-bind -- safe
var test = function () {
/* empty */
}.bind();
// eslint-disable-next-line no-prototype-builtins -- safe
return typeof test != "function" || test.hasOwnProperty("prototype");
});
var call$2 = Function.prototype.call;
var functionCall = functionBindNative
? call$2.bind(call$2)
: function () {
return call$2.apply(call$2, arguments);
};
var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG =
getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
var f$7 = NASHORN_BUG
? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor$1(this, V);
return !!descriptor && descriptor.enumerable;
}
: $propertyIsEnumerable$1;
var objectPropertyIsEnumerable = {
f: f$7,
};
var createPropertyDescriptor = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value,
};
};
var FunctionPrototype$2 = Function.prototype;
var call$1 = FunctionPrototype$2.call;
var uncurryThisWithBind =
functionBindNative && FunctionPrototype$2.bind.bind(call$1, call$1);
var functionUncurryThis = functionBindNative
? uncurryThisWithBind
: function (fn) {
return function () {
return call$1.apply(fn, arguments);
};
};
var toString$1 = functionUncurryThis({}.toString);
var stringSlice$1 = functionUncurryThis("".slice);
var classofRaw = function (it) {
return stringSlice$1(toString$1(it), 8, -1);
};
var $Object$4 = Object;
var split = functionUncurryThis("".split);
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var indexedObject = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins -- safe
return !$Object$4("z").propertyIsEnumerable(0);
})
? function (it) {
return classofRaw(it) == "String" ? split(it, "") : $Object$4(it);
}
: $Object$4;
// we can't use just `it == null` since of `document.all` special case
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
var isNullOrUndefined = function (it) {
return it === null || it === undefined;
};
var $TypeError$9 = TypeError;
// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
var requireObjectCoercible = function (it) {
if (isNullOrUndefined(it))
throw $TypeError$9("Can't call method on " + it);
return it;
};
// toObject with fallback for non-array-like ES3 strings
var toIndexedObject = function (it) {
return indexedObject(requireObjectCoercible(it));
};
var documentAll$2 = typeof document == "object" && document.all;
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
var IS_HTMLDDA =
typeof documentAll$2 == "undefined" && documentAll$2 !== undefined;
var documentAll_1 = {
all: documentAll$2,
IS_HTMLDDA: IS_HTMLDDA,
};
var documentAll$1 = documentAll_1.all;
// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
var isCallable = documentAll_1.IS_HTMLDDA
? function (argument) {
return typeof argument == "function" || argument === documentAll$1;
}
: function (argument) {
return typeof argument == "function";
};
var documentAll = documentAll_1.all;
var isObject = documentAll_1.IS_HTMLDDA
? function (it) {
return typeof it == "object"
? it !== null
: isCallable(it) || it === documentAll;
}
: function (it) {
return typeof it == "object" ? it !== null : isCallable(it);
};
var aFunction = function (argument) {
return isCallable(argument) ? argument : undefined;
};
var getBuiltIn = function (namespace, method) {
return arguments.length < 2
? aFunction(global_1[namespace])
: global_1[namespace] && global_1[namespace][method];
};
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
var engineUserAgent =
(typeof navigator != "undefined" && String(navigator.userAgent)) || "";
var process = global_1.process;
var Deno = global_1.Deno;
var versions = (process && process.versions) || (Deno && Deno.version);
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split(".");
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
// but their correct versions are not interesting for us
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && engineUserAgent) {
match = engineUserAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = engineUserAgent.match(/Chrome\/(\d+)/);
if (match) version = +match[1];
}
}
var engineV8Version = version;
/* eslint-disable es/no-symbol -- required for testing */
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
var symbolConstructorDetection =
!!Object.getOwnPropertySymbols &&
!fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return (
!String(symbol) ||
!(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
(!Symbol.sham && engineV8Version && engineV8Version < 41)
);
});
/* eslint-disable es/no-symbol -- required for testing */
var useSymbolAsUid =
symbolConstructorDetection &&
!Symbol.sham &&
typeof Symbol.iterator == "symbol";
var $Object$3 = Object;
var isSymbol = useSymbolAsUid
? function (it) {
return typeof it == "symbol";
}
: function (it) {
var $Symbol = getBuiltIn("Symbol");
return (
isCallable($Symbol) &&
objectIsPrototypeOf($Symbol.prototype, $Object$3(it))
);
};
var $String$4 = String;
var tryToString = function (argument) {
try {
return $String$4(argument);
} catch (error) {
return "Object";
}
};
var $TypeError$8 = TypeError;
// `Assert: IsCallable(argument) is true`
var aCallable = function (argument) {
if (isCallable(argument)) return argument;
throw $TypeError$8(tryToString(argument) + " is not a function");
};
// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
var getMethod = function (V, P) {
var func = V[P];
return isNullOrUndefined(func) ? undefined : aCallable(func);
};
var $TypeError$7 = TypeError;
// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
var ordinaryToPrimitive = function (input, pref) {
var fn, val;
if (
pref === "string" &&
isCallable((fn = input.toString)) &&
!isObject((val = functionCall(fn, input)))
)
return val;
if (
isCallable((fn = input.valueOf)) &&
!isObject((val = functionCall(fn, input)))
)
return val;
if (
pref !== "string" &&
isCallable((fn = input.toString)) &&
!isObject((val = functionCall(fn, input)))
)
return val;
throw $TypeError$7("Can't convert object to primitive value");
};
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty$4 = Object.defineProperty;
var defineGlobalProperty = function (key, value) {
try {
defineProperty$4(global_1, key, {
value: value,
configurable: true,
writable: true,
});
} catch (error) {
global_1[key] = value;
}
return value;
};
var SHARED = "__core-js_shared__";
var store$1 = global_1[SHARED] || defineGlobalProperty(SHARED, {});
var sharedStore = store$1;
var shared = createCommonjsModule(function (module) {
(module.exports = function (key, value) {
return (
sharedStore[key] ||
(sharedStore[key] = value !== undefined ? value : {})
);
})("versions", []).push({
version: "3.30.0",
mode: "global",
copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
license: "https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",
source: "https://github.com/zloirock/core-js",
});
});
var $Object$2 = Object;
// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
var toObject = function (argument) {
return $Object$2(requireObjectCoercible(argument));
};
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es/no-object-hasown -- safe
var hasOwnProperty_1 =
Object.hasOwn ||
function hasOwn(it, key) {
return hasOwnProperty(toObject(it), key);
};
var id = 0;
var postfix = Math.random();
var toString = functionUncurryThis((1.0).toString);
var uid = function (key) {
return (
"Symbol(" +
(key === undefined ? "" : key) +
")_" +
toString(++id + postfix, 36)
);
};
var Symbol$3 = global_1.Symbol;
var WellKnownSymbolsStore$2 = shared("wks");
var createWellKnownSymbol = useSymbolAsUid
? Symbol$3["for"] || Symbol$3
: (Symbol$3 && Symbol$3.withoutSetter) || uid;
var wellKnownSymbol = function (name) {
if (!hasOwnProperty_1(WellKnownSymbolsStore$2, name)) {
WellKnownSymbolsStore$2[name] =
symbolConstructorDetection && hasOwnProperty_1(Symbol$3, name)
? Symbol$3[name]
: createWellKnownSymbol("Symbol." + name);
}
return WellKnownSymbolsStore$2[name];
};
var $TypeError$6 = TypeError;
var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
var toPrimitive = function (input, pref) {
if (!isObject(input) || isSymbol(input)) return input;
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
var result;
if (exoticToPrim) {
if (pref === undefined) pref = "default";
result = functionCall(exoticToPrim, input, pref);
if (!isObject(result) || isSymbol(result)) return result;
throw $TypeError$6("Can't convert object to primitive value");
}
if (pref === undefined) pref = "number";
return ordinaryToPrimitive(input, pref);
};
// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
var toPropertyKey = function (argument) {
var key = toPrimitive(argument, "string");
return isSymbol(key) ? key : key + "";
};
var document$1 = global_1.document;
// typeof document.createElement is 'object' in old IE
var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
var documentCreateElement = function (it) {
return EXISTS$1 ? document$1.createElement(it) : {};
};
// Thanks to IE8 for its funny defineProperty
var ie8DomDefine =
!descriptors &&
!fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return (
Object.defineProperty(documentCreateElement("div"), "a", {
get: function () {
return 7;
},
}).a != 7
);
});
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
var f$6 = descriptors
? $getOwnPropertyDescriptor$2
: function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPropertyKey(P);
if (ie8DomDefine)
try {
return $getOwnPropertyDescriptor$2(O, P);
} catch (error) {
/* empty */
}
if (hasOwnProperty_1(O, P))
return createPropertyDescriptor(
!functionCall(objectPropertyIsEnumerable.f, O, P),
O[P]
);
};
var objectGetOwnPropertyDescriptor = {
f: f$6,
};
// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
var v8PrototypeDefineBug =
descriptors &&
fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return (
Object.defineProperty(
function () {
/* empty */
},
"prototype",
{
value: 42,
writable: false,
}
).prototype != 42
);
});
var $String$3 = String;
var $TypeError$5 = TypeError;
// `Assert: Type(argument) is Object`
var anObject = function (argument) {
if (isObject(argument)) return argument;
throw $TypeError$5($String$3(argument) + " is not an object");
};
var $TypeError$4 = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty$1 = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
var ENUMERABLE = "enumerable";
var CONFIGURABLE$1 = "configurable";
var WRITABLE = "writable";
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
var f$5 = descriptors
? v8PrototypeDefineBug
? function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (
typeof O === "function" &&
P === "prototype" &&
"value" in Attributes &&
WRITABLE in Attributes &&
!Attributes[WRITABLE]
) {
var current = $getOwnPropertyDescriptor$1(O, P);
if (current && current[WRITABLE]) {
O[P] = Attributes.value;
Attributes = {
configurable:
CONFIGURABLE$1 in Attributes
? Attributes[CONFIGURABLE$1]
: current[CONFIGURABLE$1],
enumerable:
ENUMERABLE in Attributes
? Attributes[ENUMERABLE]
: current[ENUMERABLE],
writable: false,
};
}
}
return $defineProperty$1(O, P, Attributes);
}
: $defineProperty$1
: function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (ie8DomDefine)
try {
return $defineProperty$1(O, P, Attributes);
} catch (error) {
/* empty */
}
if ("get" in Attributes || "set" in Attributes)
throw $TypeError$4("Accessors not supported");
if ("value" in Attributes) O[P] = Attributes.value;
return O;
};
var objectDefineProperty = {
f: f$5,
};
var createNonEnumerableProperty = descriptors
? function (object, key, value) {
return objectDefineProperty.f(
object,
key,
createPropertyDescriptor(1, value)
);
}
: function (object, key, value) {
object[key] = value;
return object;
};
var FunctionPrototype$1 = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, "name");
// additional protection from minified / mangled / dropped function names
var PROPER =
EXISTS &&
function something() {
/* empty */
}.name === "something";
var CONFIGURABLE =
EXISTS &&
(!descriptors ||
(descriptors &&
getDescriptor(FunctionPrototype$1, "name").configurable));
var functionName = {
EXISTS: EXISTS,
PROPER: PROPER,
CONFIGURABLE: CONFIGURABLE,
};
var functionToString = functionUncurryThis(Function.toString);
// this helper broken in `[email protected]`, so we can't use `shared` helper
if (!isCallable(sharedStore.inspectSource)) {
sharedStore.inspectSource = function (it) {
return functionToString(it);
};
}
var inspectSource = sharedStore.inspectSource;
var WeakMap$1 = global_1.WeakMap;
var weakMapBasicDetection =
isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
var keys = shared("keys");
var sharedKey = function (key) {
return keys[key] || (keys[key] = uid(key));
};
var hiddenKeys$1 = {};
var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
var TypeError$2 = global_1.TypeError;
var WeakMap = global_1.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError$2("Incompatible receiver, " + TYPE + " required");
}
return state;
};
};
if (weakMapBasicDetection || sharedStore.state) {
var store = sharedStore.state || (sharedStore.state = new WeakMap());
/* eslint-disable no-self-assign -- prototype methods protection */
store.get = store.get;
store.has = store.has;
store.set = store.set;
/* eslint-enable no-self-assign -- prototype methods protection */
set = function (it, metadata) {
if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
store.set(it, metadata);
return metadata;
};
get = function (it) {
return store.get(it) || {};
};
has = function (it) {
return store.has(it);
};
} else {
var STATE = sharedKey("state");
hiddenKeys$1[STATE] = true;
set = function (it, metadata) {
if (hasOwnProperty_1(it, STATE))
throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return hasOwnProperty_1(it, STATE);
};
}
var internalState = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor,
};
var makeBuiltIn_1 = createCommonjsModule(function (module) {
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
var enforceInternalState = internalState.enforce;
var getInternalState = internalState.get;
var $String = String;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
var stringSlice = functionUncurryThis("".slice);
var replace = functionUncurryThis("".replace);
var join = functionUncurryThis([].join);
var CONFIGURABLE_LENGTH =
descriptors &&
!fails(function () {
return (
defineProperty(
function () {
/* empty */
},
"length",
{ value: 8 }
).length !== 8
);
});
var TEMPLATE = String(String).split("String");
var makeBuiltIn = (module.exports = function (value, name, options) {
if (stringSlice($String(name), 0, 7) === "Symbol(") {
name = "[" + replace($String(name), /^Symbol\(([^)]*)\)/, "$1") + "]";
}
if (options && options.getter) name = "get " + name;
if (options && options.setter) name = "set " + name;
if (
!hasOwnProperty_1(value, "name") ||
(CONFIGURABLE_FUNCTION_NAME && value.name !== name)
) {
if (descriptors)
defineProperty(value, "name", { value: name, configurable: true });
else value.name = name;
}
if (
CONFIGURABLE_LENGTH &&
options &&
hasOwnProperty_1(options, "arity") &&
value.length !== options.arity
) {
defineProperty(value, "length", { value: options.arity });
}
try {
if (
options &&
hasOwnProperty_1(options, "constructor") &&
options.constructor
) {
if (descriptors)
defineProperty(value, "prototype", { writable: false });
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
} else if (value.prototype) value.prototype = undefined;
} catch (error) {
/* empty */
}
var state = enforceInternalState(value);
if (!hasOwnProperty_1(state, "source")) {
state.source = join(TEMPLATE, typeof name == "string" ? name : "");
}
return value;
});
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
// eslint-disable-next-line no-extend-native -- required
Function.prototype.toString = makeBuiltIn(function toString() {
return (
(isCallable(this) && getInternalState(this).source) ||
inspectSource(this)
);
}, "toString");
});
var defineBuiltIn = function (O, key, value, options) {
if (!options) options = {};
var simple = options.enumerable;
var name = options.name !== undefined ? options.name : key;
if (isCallable(value)) makeBuiltIn_1(value, name, options);
if (options.global) {
if (simple) O[key] = value;
else defineGlobalProperty(key, value);
} else {
try {
if (!options.unsafe) delete O[key];
else if (O[key]) simple = true;
} catch (error) {
/* empty */
}
if (simple) O[key] = value;
else
objectDefineProperty.f(O, key, {
value: value,
enumerable: false,
configurable: !options.nonConfigurable,
writable: !options.nonWritable,
});
}
return O;
};
var ceil = Math.ceil;
var floor = Math.floor;
// `Math.trunc` method
// https://tc39.es/ecma262/#sec-math.trunc
// eslint-disable-next-line es/no-math-trunc -- safe
var mathTrunc =
Math.trunc ||
function trunc(x) {
var n = +x;
return (n > 0 ? floor : ceil)(n);
};
// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
var toIntegerOrInfinity = function (argument) {
var number = +argument;
// eslint-disable-next-line no-self-compare -- NaN check
return number !== number || number === 0 ? 0 : mathTrunc(number);
};
var max$1 = Math.max;
var min$1 = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
var toAbsoluteIndex = function (index, length) {
var integer = toIntegerOrInfinity(index);
return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
};
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
var toLength = function (argument) {
return argument > 0
? min(toIntegerOrInfinity(argument), 0x1fffffffffffff)
: 0; // 2 ** 53 - 1 == 9007199254740991
};
// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
var lengthOfArrayLike = function (obj) {
return toLength(obj.length);
};
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod$1 = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = lengthOfArrayLike(O);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el != el)
while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare -- NaN check
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
}
else
for (; length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el)
return IS_INCLUDES || index || 0;
}
return !IS_INCLUDES && -1;
};
};
var arrayIncludes = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod$1(true),
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod$1(false),
};
var indexOf = arrayIncludes.indexOf;
var push$3 = functionUncurryThis([].push);
var objectKeysInternal = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O)
!hasOwnProperty_1(hiddenKeys$1, key) &&
hasOwnProperty_1(O, key) &&
push$3(result, key);
// Don't enum bug & hidden keys
while (names.length > i)
if (hasOwnProperty_1(O, (key = names[i++]))) {
~indexOf(result, key) || push$3(result, key);
}
return result;
};
// IE8- don't enum bug keys
var enumBugKeys = [
"constructor",
"hasOwnProperty",
"isPrototypeOf",
"propertyIsEnumerable",
"toLocaleString",
"toString",
"valueOf",
];
var hiddenKeys = enumBugKeys.concat("length", "prototype");
// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
var f$4 =
Object.getOwnPropertyNames ||
function getOwnPropertyNames(O) {
return objectKeysInternal(O, hiddenKeys);
};
var objectGetOwnPropertyNames = {
f: f$4,
};
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
var f$3 = Object.getOwnPropertySymbols;
var objectGetOwnPropertySymbols = {
f: f$3,
};
var concat = functionUncurryThis([].concat);
// all object keys, includes non-enumerable and symbols
var ownKeys =
getBuiltIn("Reflect", "ownKeys") ||
function ownKeys(it) {
var keys = objectGetOwnPropertyNames.f(anObject(it));
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
return getOwnPropertySymbols
? concat(keys, getOwnPropertySymbols(it))
: keys;
};
var copyConstructorProperties = function (target, source, exceptions) {
var keys = ownKeys(source);
var defineProperty = objectDefineProperty.f;
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (
!hasOwnProperty_1(target, key) &&
!(exceptions && hasOwnProperty_1(exceptions, key))
) {
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
}
};
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL
? true
: value == NATIVE
? false