@bcrumbs.net/bc-api 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1769 -1838
- package/index.esm.js +1769 -1838
- package/package.json +4 -4
- package/src/lib/clients/utils.d.ts +6 -0
package/index.esm.js
CHANGED
|
@@ -1275,130 +1275,21 @@ $$8({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }
|
|
|
1275
1275
|
assign: assign
|
|
1276
1276
|
});
|
|
1277
1277
|
|
|
1278
|
-
var global$b = global$l;
|
|
1279
|
-
var classof$5 = classofRaw$2;
|
|
1280
|
-
|
|
1281
|
-
var engineIsNode = classof$5(global$b.process) === 'process';
|
|
1282
|
-
|
|
1283
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
1284
|
-
var aCallable$6 = aCallable$8;
|
|
1285
|
-
|
|
1286
|
-
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1287
|
-
try {
|
|
1288
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1289
|
-
return uncurryThis$8(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1290
|
-
} catch (error) { /* empty */ }
|
|
1291
|
-
};
|
|
1292
|
-
|
|
1293
|
-
var isObject$4 = isObject$a;
|
|
1294
|
-
|
|
1295
|
-
var isPossiblePrototype$1 = function (argument) {
|
|
1296
|
-
return isObject$4(argument) || argument === null;
|
|
1297
|
-
};
|
|
1298
|
-
|
|
1299
|
-
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1300
|
-
|
|
1301
|
-
var $String$1 = String;
|
|
1302
|
-
var $TypeError$7 = TypeError;
|
|
1303
|
-
|
|
1304
|
-
var aPossiblePrototype$1 = function (argument) {
|
|
1305
|
-
if (isPossiblePrototype(argument)) return argument;
|
|
1306
|
-
throw new $TypeError$7("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1307
|
-
};
|
|
1308
|
-
|
|
1309
|
-
/* eslint-disable no-proto -- safe */
|
|
1310
|
-
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1311
|
-
var isObject$3 = isObject$a;
|
|
1312
|
-
var requireObjectCoercible$3 = requireObjectCoercible$6;
|
|
1313
|
-
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1314
|
-
|
|
1315
|
-
// `Object.setPrototypeOf` method
|
|
1316
|
-
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1317
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1318
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1319
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1320
|
-
var CORRECT_SETTER = false;
|
|
1321
|
-
var test = {};
|
|
1322
|
-
var setter;
|
|
1323
|
-
try {
|
|
1324
|
-
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1325
|
-
setter(test, []);
|
|
1326
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1327
|
-
} catch (error) { /* empty */ }
|
|
1328
|
-
return function setPrototypeOf(O, proto) {
|
|
1329
|
-
requireObjectCoercible$3(O);
|
|
1330
|
-
aPossiblePrototype(proto);
|
|
1331
|
-
if (!isObject$3(O)) return O;
|
|
1332
|
-
if (CORRECT_SETTER) setter(O, proto);
|
|
1333
|
-
else O.__proto__ = proto;
|
|
1334
|
-
return O;
|
|
1335
|
-
};
|
|
1336
|
-
}() : undefined);
|
|
1337
|
-
|
|
1338
|
-
var defineProperty$3 = objectDefineProperty.f;
|
|
1339
|
-
var hasOwn$2 = hasOwnProperty_1;
|
|
1340
1278
|
var wellKnownSymbol$e = wellKnownSymbol$g;
|
|
1341
1279
|
|
|
1342
1280
|
var TO_STRING_TAG$2 = wellKnownSymbol$e('toStringTag');
|
|
1343
|
-
|
|
1344
|
-
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1345
|
-
if (target && !STATIC) target = target.prototype;
|
|
1346
|
-
if (target && !hasOwn$2(target, TO_STRING_TAG$2)) {
|
|
1347
|
-
defineProperty$3(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
|
|
1351
|
-
var makeBuiltIn = makeBuiltInExports;
|
|
1352
|
-
var defineProperty$2 = objectDefineProperty;
|
|
1353
|
-
|
|
1354
|
-
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
1355
|
-
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
1356
|
-
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
1357
|
-
return defineProperty$2.f(target, name, descriptor);
|
|
1358
|
-
};
|
|
1359
|
-
|
|
1360
|
-
var getBuiltIn$4 = getBuiltIn$7;
|
|
1361
|
-
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
1362
|
-
var wellKnownSymbol$d = wellKnownSymbol$g;
|
|
1363
|
-
var DESCRIPTORS$3 = descriptors;
|
|
1364
|
-
|
|
1365
|
-
var SPECIES$3 = wellKnownSymbol$d('species');
|
|
1366
|
-
|
|
1367
|
-
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1368
|
-
var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
|
|
1369
|
-
|
|
1370
|
-
if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$3]) {
|
|
1371
|
-
defineBuiltInAccessor(Constructor, SPECIES$3, {
|
|
1372
|
-
configurable: true,
|
|
1373
|
-
get: function () { return this; }
|
|
1374
|
-
});
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
|
|
1378
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1379
|
-
|
|
1380
|
-
var $TypeError$6 = TypeError;
|
|
1381
|
-
|
|
1382
|
-
var anInstance$1 = function (it, Prototype) {
|
|
1383
|
-
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1384
|
-
throw new $TypeError$6('Incorrect invocation');
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
var wellKnownSymbol$c = wellKnownSymbol$g;
|
|
1388
|
-
|
|
1389
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
|
|
1390
1281
|
var test = {};
|
|
1391
1282
|
|
|
1392
|
-
test[TO_STRING_TAG$
|
|
1283
|
+
test[TO_STRING_TAG$2] = 'z';
|
|
1393
1284
|
|
|
1394
1285
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1395
1286
|
|
|
1396
1287
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1397
1288
|
var isCallable$a = isCallable$l;
|
|
1398
1289
|
var classofRaw$1 = classofRaw$2;
|
|
1399
|
-
var wellKnownSymbol$
|
|
1290
|
+
var wellKnownSymbol$d = wellKnownSymbol$g;
|
|
1400
1291
|
|
|
1401
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1292
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$d('toStringTag');
|
|
1402
1293
|
var $Object$1 = Object;
|
|
1403
1294
|
|
|
1404
1295
|
// ES3 wrong here
|
|
@@ -1412,1891 +1303,2048 @@ var tryGet = function (it, key) {
|
|
|
1412
1303
|
};
|
|
1413
1304
|
|
|
1414
1305
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1415
|
-
var classof$
|
|
1306
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1416
1307
|
var O, tag, result;
|
|
1417
1308
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1418
1309
|
// @@toStringTag case
|
|
1419
|
-
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1310
|
+
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
1420
1311
|
// builtinTag case
|
|
1421
1312
|
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1422
1313
|
// ES3 arguments fallback
|
|
1423
1314
|
: (result = classofRaw$1(O)) === 'Object' && isCallable$a(O.callee) ? 'Arguments' : result;
|
|
1424
1315
|
};
|
|
1425
1316
|
|
|
1426
|
-
var
|
|
1427
|
-
var fails$8 = fails$i;
|
|
1428
|
-
var isCallable$9 = isCallable$l;
|
|
1429
|
-
var classof$3 = classof$4;
|
|
1430
|
-
var getBuiltIn$3 = getBuiltIn$7;
|
|
1431
|
-
var inspectSource$1 = inspectSource$3;
|
|
1432
|
-
|
|
1433
|
-
var noop = function () { /* empty */ };
|
|
1434
|
-
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
1435
|
-
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1436
|
-
var exec$1 = uncurryThis$7(constructorRegExp.exec);
|
|
1437
|
-
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1438
|
-
|
|
1439
|
-
var isConstructorModern = function isConstructor(argument) {
|
|
1440
|
-
if (!isCallable$9(argument)) return false;
|
|
1441
|
-
try {
|
|
1442
|
-
construct(noop, [], argument);
|
|
1443
|
-
return true;
|
|
1444
|
-
} catch (error) {
|
|
1445
|
-
return false;
|
|
1446
|
-
}
|
|
1447
|
-
};
|
|
1448
|
-
|
|
1449
|
-
var isConstructorLegacy = function isConstructor(argument) {
|
|
1450
|
-
if (!isCallable$9(argument)) return false;
|
|
1451
|
-
switch (classof$3(argument)) {
|
|
1452
|
-
case 'AsyncFunction':
|
|
1453
|
-
case 'GeneratorFunction':
|
|
1454
|
-
case 'AsyncGeneratorFunction': return false;
|
|
1455
|
-
}
|
|
1456
|
-
try {
|
|
1457
|
-
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1458
|
-
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1459
|
-
// (for example, `DOMQuad` and similar in FF41-)
|
|
1460
|
-
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
|
|
1461
|
-
} catch (error) {
|
|
1462
|
-
return true;
|
|
1463
|
-
}
|
|
1464
|
-
};
|
|
1465
|
-
|
|
1466
|
-
isConstructorLegacy.sham = true;
|
|
1467
|
-
|
|
1468
|
-
// `IsConstructor` abstract operation
|
|
1469
|
-
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1470
|
-
var isConstructor$1 = !construct || fails$8(function () {
|
|
1471
|
-
var called;
|
|
1472
|
-
return isConstructorModern(isConstructorModern.call)
|
|
1473
|
-
|| !isConstructorModern(Object)
|
|
1474
|
-
|| !isConstructorModern(function () { called = true; })
|
|
1475
|
-
|| called;
|
|
1476
|
-
}) ? isConstructorLegacy : isConstructorModern;
|
|
1477
|
-
|
|
1478
|
-
var isConstructor = isConstructor$1;
|
|
1479
|
-
var tryToString$2 = tryToString$4;
|
|
1317
|
+
var classof$4 = classof$5;
|
|
1480
1318
|
|
|
1481
|
-
var $
|
|
1319
|
+
var $String$1 = String;
|
|
1482
1320
|
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
throw new $TypeError$5(tryToString$2(argument) + ' is not a constructor');
|
|
1321
|
+
var toString$4 = function (argument) {
|
|
1322
|
+
if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
1323
|
+
return $String$1(argument);
|
|
1487
1324
|
};
|
|
1488
1325
|
|
|
1489
1326
|
var anObject$a = anObject$d;
|
|
1490
|
-
var aConstructor = aConstructor$1;
|
|
1491
|
-
var isNullOrUndefined$3 = isNullOrUndefined$6;
|
|
1492
|
-
var wellKnownSymbol$a = wellKnownSymbol$g;
|
|
1493
|
-
|
|
1494
|
-
var SPECIES$2 = wellKnownSymbol$a('species');
|
|
1495
1327
|
|
|
1496
|
-
// `
|
|
1497
|
-
// https://tc39.es/ecma262/#sec-
|
|
1498
|
-
var
|
|
1499
|
-
var
|
|
1500
|
-
var
|
|
1501
|
-
|
|
1328
|
+
// `RegExp.prototype.flags` getter implementation
|
|
1329
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1330
|
+
var regexpFlags$1 = function () {
|
|
1331
|
+
var that = anObject$a(this);
|
|
1332
|
+
var result = '';
|
|
1333
|
+
if (that.hasIndices) result += 'd';
|
|
1334
|
+
if (that.global) result += 'g';
|
|
1335
|
+
if (that.ignoreCase) result += 'i';
|
|
1336
|
+
if (that.multiline) result += 'm';
|
|
1337
|
+
if (that.dotAll) result += 's';
|
|
1338
|
+
if (that.unicode) result += 'u';
|
|
1339
|
+
if (that.unicodeSets) result += 'v';
|
|
1340
|
+
if (that.sticky) result += 'y';
|
|
1341
|
+
return result;
|
|
1502
1342
|
};
|
|
1503
1343
|
|
|
1504
|
-
var
|
|
1344
|
+
var fails$8 = fails$i;
|
|
1345
|
+
var global$b = global$l;
|
|
1505
1346
|
|
|
1506
|
-
|
|
1507
|
-
var
|
|
1508
|
-
var call$c = FunctionPrototype.call;
|
|
1347
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1348
|
+
var $RegExp$2 = global$b.RegExp;
|
|
1509
1349
|
|
|
1510
|
-
|
|
1511
|
-
var
|
|
1512
|
-
|
|
1350
|
+
var UNSUPPORTED_Y$1 = fails$8(function () {
|
|
1351
|
+
var re = $RegExp$2('a', 'y');
|
|
1352
|
+
re.lastIndex = 2;
|
|
1353
|
+
return re.exec('abcd') !== null;
|
|
1513
1354
|
});
|
|
1514
1355
|
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
1521
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
1522
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$6(fn);
|
|
1523
|
-
};
|
|
1524
|
-
|
|
1525
|
-
var uncurryThis$5 = functionUncurryThisClause;
|
|
1526
|
-
var aCallable$5 = aCallable$8;
|
|
1527
|
-
var NATIVE_BIND = functionBindNative;
|
|
1356
|
+
// UC Browser bug
|
|
1357
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
1358
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
1359
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
1360
|
+
});
|
|
1528
1361
|
|
|
1529
|
-
var
|
|
1362
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
1363
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1364
|
+
var re = $RegExp$2('^r', 'gy');
|
|
1365
|
+
re.lastIndex = 2;
|
|
1366
|
+
return re.exec('str') !== null;
|
|
1367
|
+
});
|
|
1530
1368
|
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
return fn.apply(that, arguments);
|
|
1536
|
-
};
|
|
1369
|
+
var regexpStickyHelpers = {
|
|
1370
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
1371
|
+
MISSED_STICKY: MISSED_STICKY,
|
|
1372
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1537
1373
|
};
|
|
1538
1374
|
|
|
1539
|
-
var
|
|
1540
|
-
|
|
1541
|
-
var html$2 = getBuiltIn$2('document', 'documentElement');
|
|
1542
|
-
|
|
1543
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
1544
|
-
|
|
1545
|
-
var arraySlice$1 = uncurryThis$4([].slice);
|
|
1375
|
+
var objectDefineProperties = {};
|
|
1546
1376
|
|
|
1547
|
-
var $
|
|
1377
|
+
var DESCRIPTORS$3 = descriptors;
|
|
1378
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1379
|
+
var definePropertyModule = objectDefineProperty;
|
|
1380
|
+
var anObject$9 = anObject$d;
|
|
1381
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
1382
|
+
var objectKeys = objectKeys$2;
|
|
1548
1383
|
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1384
|
+
// `Object.defineProperties` method
|
|
1385
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1386
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1387
|
+
objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1388
|
+
anObject$9(O);
|
|
1389
|
+
var props = toIndexedObject$1(Properties);
|
|
1390
|
+
var keys = objectKeys(Properties);
|
|
1391
|
+
var length = keys.length;
|
|
1392
|
+
var index = 0;
|
|
1393
|
+
var key;
|
|
1394
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1395
|
+
return O;
|
|
1552
1396
|
};
|
|
1553
1397
|
|
|
1554
|
-
var
|
|
1398
|
+
var getBuiltIn$4 = getBuiltIn$7;
|
|
1555
1399
|
|
|
1556
|
-
|
|
1557
|
-
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1400
|
+
var html$2 = getBuiltIn$4('document', 'documentElement');
|
|
1558
1401
|
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1561
|
-
var
|
|
1562
|
-
var
|
|
1563
|
-
var
|
|
1564
|
-
var fails$7 = fails$i;
|
|
1402
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
1403
|
+
var anObject$8 = anObject$d;
|
|
1404
|
+
var definePropertiesModule = objectDefineProperties;
|
|
1405
|
+
var enumBugKeys = enumBugKeys$3;
|
|
1406
|
+
var hiddenKeys = hiddenKeys$4;
|
|
1565
1407
|
var html$1 = html$2;
|
|
1566
|
-
var
|
|
1567
|
-
var
|
|
1568
|
-
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1569
|
-
var IS_IOS$1 = engineIsIos;
|
|
1570
|
-
var IS_NODE$3 = engineIsNode;
|
|
1408
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
1409
|
+
var sharedKey$1 = sharedKey$3;
|
|
1571
1410
|
|
|
1572
|
-
var
|
|
1573
|
-
var
|
|
1574
|
-
var
|
|
1575
|
-
var
|
|
1576
|
-
var
|
|
1577
|
-
var MessageChannel = global$a.MessageChannel;
|
|
1578
|
-
var String$1 = global$a.String;
|
|
1579
|
-
var counter = 0;
|
|
1580
|
-
var queue$2 = {};
|
|
1581
|
-
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1582
|
-
var $location, defer, channel, port;
|
|
1411
|
+
var GT = '>';
|
|
1412
|
+
var LT = '<';
|
|
1413
|
+
var PROTOTYPE = 'prototype';
|
|
1414
|
+
var SCRIPT = 'script';
|
|
1415
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1583
1416
|
|
|
1584
|
-
|
|
1585
|
-
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1586
|
-
$location = global$a.location;
|
|
1587
|
-
});
|
|
1417
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
1588
1418
|
|
|
1589
|
-
var
|
|
1590
|
-
|
|
1591
|
-
var fn = queue$2[id];
|
|
1592
|
-
delete queue$2[id];
|
|
1593
|
-
fn();
|
|
1594
|
-
}
|
|
1419
|
+
var scriptTag = function (content) {
|
|
1420
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
1595
1421
|
};
|
|
1596
1422
|
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1423
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
1424
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
1425
|
+
activeXDocument.write(scriptTag(''));
|
|
1426
|
+
activeXDocument.close();
|
|
1427
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
1428
|
+
activeXDocument = null; // avoid memory leak
|
|
1429
|
+
return temp;
|
|
1601
1430
|
};
|
|
1602
1431
|
|
|
1603
|
-
|
|
1604
|
-
|
|
1432
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1433
|
+
var NullProtoObjectViaIFrame = function () {
|
|
1434
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
1435
|
+
var iframe = documentCreateElement$1('iframe');
|
|
1436
|
+
var JS = 'java' + SCRIPT + ':';
|
|
1437
|
+
var iframeDocument;
|
|
1438
|
+
iframe.style.display = 'none';
|
|
1439
|
+
html$1.appendChild(iframe);
|
|
1440
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
1441
|
+
iframe.src = String(JS);
|
|
1442
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1443
|
+
iframeDocument.open();
|
|
1444
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1445
|
+
iframeDocument.close();
|
|
1446
|
+
return iframeDocument.F;
|
|
1605
1447
|
};
|
|
1606
1448
|
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1449
|
+
// Check for document.domain and active x support
|
|
1450
|
+
// No need to use active x approach when document.domain is not set
|
|
1451
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1452
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1453
|
+
// avoid IE GC bug
|
|
1454
|
+
var activeXDocument;
|
|
1455
|
+
var NullProtoObject = function () {
|
|
1456
|
+
try {
|
|
1457
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
1458
|
+
} catch (error) { /* ignore */ }
|
|
1459
|
+
NullProtoObject = typeof document != 'undefined'
|
|
1460
|
+
? document.domain && activeXDocument
|
|
1461
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1462
|
+
: NullProtoObjectViaIFrame()
|
|
1463
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1464
|
+
var length = enumBugKeys.length;
|
|
1465
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1466
|
+
return NullProtoObject();
|
|
1610
1467
|
};
|
|
1611
1468
|
|
|
1612
|
-
|
|
1613
|
-
if (!set || !clear) {
|
|
1614
|
-
set = function setImmediate(handler) {
|
|
1615
|
-
validateArgumentsLength(arguments.length, 1);
|
|
1616
|
-
var fn = isCallable$8(handler) ? handler : Function$1(handler);
|
|
1617
|
-
var args = arraySlice(arguments, 1);
|
|
1618
|
-
queue$2[++counter] = function () {
|
|
1619
|
-
apply$1(fn, undefined, args);
|
|
1620
|
-
};
|
|
1621
|
-
defer(counter);
|
|
1622
|
-
return counter;
|
|
1623
|
-
};
|
|
1624
|
-
clear = function clearImmediate(id) {
|
|
1625
|
-
delete queue$2[id];
|
|
1626
|
-
};
|
|
1627
|
-
// Node.js 0.8-
|
|
1628
|
-
if (IS_NODE$3) {
|
|
1629
|
-
defer = function (id) {
|
|
1630
|
-
process$3.nextTick(runner(id));
|
|
1631
|
-
};
|
|
1632
|
-
// Sphere (JS game engine) Dispatch API
|
|
1633
|
-
} else if (Dispatch && Dispatch.now) {
|
|
1634
|
-
defer = function (id) {
|
|
1635
|
-
Dispatch.now(runner(id));
|
|
1636
|
-
};
|
|
1637
|
-
// Browsers with MessageChannel, includes WebWorkers
|
|
1638
|
-
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
1639
|
-
} else if (MessageChannel && !IS_IOS$1) {
|
|
1640
|
-
channel = new MessageChannel();
|
|
1641
|
-
port = channel.port2;
|
|
1642
|
-
channel.port1.onmessage = eventListener;
|
|
1643
|
-
defer = bind$3(port.postMessage, port);
|
|
1644
|
-
// Browsers with postMessage, skip WebWorkers
|
|
1645
|
-
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1646
|
-
} else if (
|
|
1647
|
-
global$a.addEventListener &&
|
|
1648
|
-
isCallable$8(global$a.postMessage) &&
|
|
1649
|
-
!global$a.importScripts &&
|
|
1650
|
-
$location && $location.protocol !== 'file:' &&
|
|
1651
|
-
!fails$7(globalPostMessageDefer)
|
|
1652
|
-
) {
|
|
1653
|
-
defer = globalPostMessageDefer;
|
|
1654
|
-
global$a.addEventListener('message', eventListener, false);
|
|
1655
|
-
// IE8-
|
|
1656
|
-
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
1657
|
-
defer = function (id) {
|
|
1658
|
-
html$1.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
1659
|
-
html$1.removeChild(this);
|
|
1660
|
-
run(id);
|
|
1661
|
-
};
|
|
1662
|
-
};
|
|
1663
|
-
// Rest old browsers
|
|
1664
|
-
} else {
|
|
1665
|
-
defer = function (id) {
|
|
1666
|
-
setTimeout(runner(id), 0);
|
|
1667
|
-
};
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1469
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
1670
1470
|
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1471
|
+
// `Object.create` method
|
|
1472
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
1473
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
1474
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
1475
|
+
var result;
|
|
1476
|
+
if (O !== null) {
|
|
1477
|
+
EmptyConstructor[PROTOTYPE] = anObject$8(O);
|
|
1478
|
+
result = new EmptyConstructor();
|
|
1479
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1480
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1481
|
+
result[IE_PROTO$1] = O;
|
|
1482
|
+
} else result = NullProtoObject();
|
|
1483
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1674
1484
|
};
|
|
1675
1485
|
|
|
1676
|
-
var
|
|
1677
|
-
var
|
|
1486
|
+
var fails$7 = fails$i;
|
|
1487
|
+
var global$a = global$l;
|
|
1678
1488
|
|
|
1679
|
-
//
|
|
1680
|
-
var
|
|
1489
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1490
|
+
var $RegExp$1 = global$a.RegExp;
|
|
1681
1491
|
|
|
1682
|
-
|
|
1683
|
-
var
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
return descriptor && descriptor.value;
|
|
1687
|
-
};
|
|
1492
|
+
var regexpUnsupportedDotAll = fails$7(function () {
|
|
1493
|
+
var re = $RegExp$1('.', 's');
|
|
1494
|
+
return !(re.dotAll && re.test('\n') && re.flags === 's');
|
|
1495
|
+
});
|
|
1688
1496
|
|
|
1689
|
-
var
|
|
1690
|
-
|
|
1691
|
-
this.tail = null;
|
|
1692
|
-
};
|
|
1497
|
+
var fails$6 = fails$i;
|
|
1498
|
+
var global$9 = global$l;
|
|
1693
1499
|
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
var entry = { item: item, next: null };
|
|
1697
|
-
var tail = this.tail;
|
|
1698
|
-
if (tail) tail.next = entry;
|
|
1699
|
-
else this.head = entry;
|
|
1700
|
-
this.tail = entry;
|
|
1701
|
-
},
|
|
1702
|
-
get: function () {
|
|
1703
|
-
var entry = this.head;
|
|
1704
|
-
if (entry) {
|
|
1705
|
-
var next = this.head = entry.next;
|
|
1706
|
-
if (next === null) this.tail = null;
|
|
1707
|
-
return entry.item;
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
};
|
|
1500
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1501
|
+
var $RegExp = global$9.RegExp;
|
|
1711
1502
|
|
|
1712
|
-
var
|
|
1503
|
+
var regexpUnsupportedNcg = fails$6(function () {
|
|
1504
|
+
var re = $RegExp('(?<a>b)', 'g');
|
|
1505
|
+
return re.exec('b').groups.a !== 'b' ||
|
|
1506
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
|
1507
|
+
});
|
|
1713
1508
|
|
|
1714
|
-
|
|
1509
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1510
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1511
|
+
var call$c = functionCall;
|
|
1512
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1513
|
+
var toString$3 = toString$4;
|
|
1514
|
+
var regexpFlags = regexpFlags$1;
|
|
1515
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
1516
|
+
var shared = shared$4;
|
|
1517
|
+
var create$2 = objectCreate;
|
|
1518
|
+
var getInternalState$1 = internalState.get;
|
|
1519
|
+
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
1520
|
+
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
1715
1521
|
|
|
1716
|
-
var
|
|
1522
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1523
|
+
var nativeExec = RegExp.prototype.exec;
|
|
1524
|
+
var patchedExec = nativeExec;
|
|
1525
|
+
var charAt$3 = uncurryThis$8(''.charAt);
|
|
1526
|
+
var indexOf = uncurryThis$8(''.indexOf);
|
|
1527
|
+
var replace$1 = uncurryThis$8(''.replace);
|
|
1528
|
+
var stringSlice$3 = uncurryThis$8(''.slice);
|
|
1717
1529
|
|
|
1718
|
-
var
|
|
1530
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1531
|
+
var re1 = /a/;
|
|
1532
|
+
var re2 = /b*/g;
|
|
1533
|
+
call$c(nativeExec, re1, 'a');
|
|
1534
|
+
call$c(nativeExec, re2, 'a');
|
|
1535
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1536
|
+
})();
|
|
1719
1537
|
|
|
1720
|
-
var
|
|
1538
|
+
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
1721
1539
|
|
|
1722
|
-
|
|
1723
|
-
var
|
|
1724
|
-
var bind$2 = functionBindContext;
|
|
1725
|
-
var macrotask = task$1.set;
|
|
1726
|
-
var Queue$1 = queue$1;
|
|
1727
|
-
var IS_IOS = engineIsIos;
|
|
1728
|
-
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
1729
|
-
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
1730
|
-
var IS_NODE$2 = engineIsNode;
|
|
1540
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
1541
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
1731
1542
|
|
|
1732
|
-
var
|
|
1733
|
-
var document$2 = global$8.document;
|
|
1734
|
-
var process$2 = global$8.process;
|
|
1735
|
-
var Promise$1 = global$8.Promise;
|
|
1736
|
-
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
1737
|
-
var notify$1, toggle, node, promise, then;
|
|
1543
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
1738
1544
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1545
|
+
if (PATCH) {
|
|
1546
|
+
patchedExec = function exec(string) {
|
|
1547
|
+
var re = this;
|
|
1548
|
+
var state = getInternalState$1(re);
|
|
1549
|
+
var str = toString$3(string);
|
|
1550
|
+
var raw = state.raw;
|
|
1551
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
|
1742
1552
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
} catch (error) {
|
|
1749
|
-
if (queue.head) notify$1();
|
|
1750
|
-
throw error;
|
|
1553
|
+
if (raw) {
|
|
1554
|
+
raw.lastIndex = re.lastIndex;
|
|
1555
|
+
result = call$c(patchedExec, raw, str);
|
|
1556
|
+
re.lastIndex = raw.lastIndex;
|
|
1557
|
+
return result;
|
|
1751
1558
|
}
|
|
1752
|
-
if (parent) parent.enter();
|
|
1753
|
-
};
|
|
1754
1559
|
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
notify$1 = function () {
|
|
1762
|
-
node.data = toggle = !toggle;
|
|
1763
|
-
};
|
|
1764
|
-
// environments with maybe non-completely correct, but existent Promise
|
|
1765
|
-
} else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
|
|
1766
|
-
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
1767
|
-
promise = Promise$1.resolve(undefined);
|
|
1768
|
-
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
1769
|
-
promise.constructor = Promise$1;
|
|
1770
|
-
then = bind$2(promise.then, promise);
|
|
1771
|
-
notify$1 = function () {
|
|
1772
|
-
then(flush);
|
|
1773
|
-
};
|
|
1774
|
-
// Node.js without promises
|
|
1775
|
-
} else if (IS_NODE$2) {
|
|
1776
|
-
notify$1 = function () {
|
|
1777
|
-
process$2.nextTick(flush);
|
|
1778
|
-
};
|
|
1779
|
-
// for other environments - macrotask based on:
|
|
1780
|
-
// - setImmediate
|
|
1781
|
-
// - MessageChannel
|
|
1782
|
-
// - window.postMessage
|
|
1783
|
-
// - onreadystatechange
|
|
1784
|
-
// - setTimeout
|
|
1785
|
-
} else {
|
|
1786
|
-
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
1787
|
-
macrotask = bind$2(macrotask, global$8);
|
|
1788
|
-
notify$1 = function () {
|
|
1789
|
-
macrotask(flush);
|
|
1790
|
-
};
|
|
1791
|
-
}
|
|
1560
|
+
var groups = state.groups;
|
|
1561
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1562
|
+
var flags = call$c(regexpFlags, re);
|
|
1563
|
+
var source = re.source;
|
|
1564
|
+
var charsAdded = 0;
|
|
1565
|
+
var strCopy = str;
|
|
1792
1566
|
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1567
|
+
if (sticky) {
|
|
1568
|
+
flags = replace$1(flags, 'y', '');
|
|
1569
|
+
if (indexOf(flags, 'g') === -1) {
|
|
1570
|
+
flags += 'g';
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
strCopy = stringSlice$3(str, re.lastIndex);
|
|
1574
|
+
// Support anchored sticky behavior.
|
|
1575
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
|
1576
|
+
source = '(?: ' + source + ')';
|
|
1577
|
+
strCopy = ' ' + strCopy;
|
|
1578
|
+
charsAdded++;
|
|
1579
|
+
}
|
|
1580
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
1581
|
+
// simulate the 'y' flag.
|
|
1582
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
if (NPCG_INCLUDED) {
|
|
1586
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
1587
|
+
}
|
|
1588
|
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1589
|
+
|
|
1590
|
+
match = call$c(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1591
|
+
|
|
1592
|
+
if (sticky) {
|
|
1593
|
+
if (match) {
|
|
1594
|
+
match.input = stringSlice$3(match.input, charsAdded);
|
|
1595
|
+
match[0] = stringSlice$3(match[0], charsAdded);
|
|
1596
|
+
match.index = re.lastIndex;
|
|
1597
|
+
re.lastIndex += match[0].length;
|
|
1598
|
+
} else re.lastIndex = 0;
|
|
1599
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
1600
|
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
1601
|
+
}
|
|
1602
|
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1603
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1604
|
+
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1605
|
+
call$c(nativeReplace, match[0], reCopy, function () {
|
|
1606
|
+
for (i = 1; i < arguments.length - 2; i++) {
|
|
1607
|
+
if (arguments[i] === undefined) match[i] = undefined;
|
|
1608
|
+
}
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
if (match && groups) {
|
|
1613
|
+
match.groups = object = create$2(null);
|
|
1614
|
+
for (i = 0; i < groups.length; i++) {
|
|
1615
|
+
group = groups[i];
|
|
1616
|
+
object[group[0]] = match[group[1]];
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
return match;
|
|
1796
1621
|
};
|
|
1797
1622
|
}
|
|
1798
1623
|
|
|
1799
|
-
var
|
|
1624
|
+
var regexpExec$2 = patchedExec;
|
|
1800
1625
|
|
|
1801
|
-
var
|
|
1802
|
-
|
|
1803
|
-
// eslint-disable-next-line no-console -- safe
|
|
1804
|
-
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
1805
|
-
} catch (error) { /* empty */ }
|
|
1806
|
-
};
|
|
1626
|
+
var $$7 = _export;
|
|
1627
|
+
var exec$1 = regexpExec$2;
|
|
1807
1628
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
}
|
|
1814
|
-
};
|
|
1629
|
+
// `RegExp.prototype.exec` method
|
|
1630
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1631
|
+
$$7({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
1632
|
+
exec: exec$1
|
|
1633
|
+
});
|
|
1815
1634
|
|
|
1816
|
-
var
|
|
1635
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
1817
1636
|
|
|
1818
|
-
var
|
|
1637
|
+
var FunctionPrototype = Function.prototype;
|
|
1638
|
+
var apply$2 = FunctionPrototype.apply;
|
|
1639
|
+
var call$b = FunctionPrototype.call;
|
|
1819
1640
|
|
|
1820
|
-
|
|
1821
|
-
var
|
|
1641
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
1642
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$b.bind(apply$2) : function () {
|
|
1643
|
+
return call$b.apply(apply$2, arguments);
|
|
1644
|
+
});
|
|
1822
1645
|
|
|
1823
|
-
|
|
1824
|
-
var IS_NODE$1 = engineIsNode;
|
|
1646
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1825
1647
|
|
|
1826
|
-
var
|
|
1827
|
-
|
|
1828
|
-
|
|
1648
|
+
var call$a = functionCall;
|
|
1649
|
+
var defineBuiltIn$4 = defineBuiltIn$6;
|
|
1650
|
+
var regexpExec$1 = regexpExec$2;
|
|
1651
|
+
var fails$5 = fails$i;
|
|
1652
|
+
var wellKnownSymbol$c = wellKnownSymbol$g;
|
|
1653
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
1829
1654
|
|
|
1830
|
-
var
|
|
1831
|
-
var
|
|
1832
|
-
var isCallable$7 = isCallable$l;
|
|
1833
|
-
var isForced = isForced_1;
|
|
1834
|
-
var inspectSource = inspectSource$3;
|
|
1835
|
-
var wellKnownSymbol$9 = wellKnownSymbol$g;
|
|
1836
|
-
var IS_BROWSER = engineIsBrowser;
|
|
1837
|
-
var IS_DENO = engineIsDeno;
|
|
1838
|
-
var V8_VERSION = engineV8Version;
|
|
1655
|
+
var SPECIES$3 = wellKnownSymbol$c('species');
|
|
1656
|
+
var RegExpPrototype = RegExp.prototype;
|
|
1839
1657
|
|
|
1840
|
-
|
|
1841
|
-
var
|
|
1842
|
-
var SUBCLASSING = false;
|
|
1843
|
-
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$7(global$6.PromiseRejectionEvent);
|
|
1658
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
1659
|
+
var SYMBOL = wellKnownSymbol$c(KEY);
|
|
1844
1660
|
|
|
1845
|
-
var
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1661
|
+
var DELEGATES_TO_SYMBOL = !fails$5(function () {
|
|
1662
|
+
// String methods call symbol-named RegExp methods
|
|
1663
|
+
var O = {};
|
|
1664
|
+
O[SYMBOL] = function () { return 7; };
|
|
1665
|
+
return ''[KEY](O) !== 7;
|
|
1666
|
+
});
|
|
1667
|
+
|
|
1668
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$5(function () {
|
|
1669
|
+
// Symbol-named RegExp methods call .exec
|
|
1670
|
+
var execCalled = false;
|
|
1671
|
+
var re = /a/;
|
|
1672
|
+
|
|
1673
|
+
if (KEY === 'split') {
|
|
1674
|
+
// We can't use real regex here since it causes deoptimization
|
|
1675
|
+
// and serious performance degradation in V8
|
|
1676
|
+
// https://github.com/zloirock/core-js/issues/306
|
|
1677
|
+
re = {};
|
|
1678
|
+
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
1679
|
+
// a new one. We need to return the patched regex when creating the new one.
|
|
1680
|
+
re.constructor = {};
|
|
1681
|
+
re.constructor[SPECIES$3] = function () { return re; };
|
|
1682
|
+
re.flags = '';
|
|
1683
|
+
re[SYMBOL] = /./[SYMBOL];
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
re.exec = function () {
|
|
1687
|
+
execCalled = true;
|
|
1688
|
+
return null;
|
|
1860
1689
|
};
|
|
1861
|
-
var constructor = promise.constructor = {};
|
|
1862
|
-
constructor[SPECIES$1] = FakePromise;
|
|
1863
|
-
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1864
|
-
if (!SUBCLASSING) return true;
|
|
1865
|
-
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
1866
|
-
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
1867
|
-
});
|
|
1868
1690
|
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1691
|
+
re[SYMBOL]('');
|
|
1692
|
+
return !execCalled;
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
if (
|
|
1696
|
+
!DELEGATES_TO_SYMBOL ||
|
|
1697
|
+
!DELEGATES_TO_EXEC ||
|
|
1698
|
+
FORCED
|
|
1699
|
+
) {
|
|
1700
|
+
var nativeRegExpMethod = /./[SYMBOL];
|
|
1701
|
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
1702
|
+
var $exec = regexp.exec;
|
|
1703
|
+
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
1704
|
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
1705
|
+
// The native String method already delegates to @@method (this
|
|
1706
|
+
// polyfilled function), leasing to infinite recursion.
|
|
1707
|
+
// We avoid it by directly calling the native @@method method.
|
|
1708
|
+
return { done: true, value: call$a(nativeRegExpMethod, regexp, str, arg2) };
|
|
1709
|
+
}
|
|
1710
|
+
return { done: true, value: call$a(nativeMethod, str, regexp, arg2) };
|
|
1711
|
+
}
|
|
1712
|
+
return { done: false };
|
|
1713
|
+
});
|
|
1714
|
+
|
|
1715
|
+
defineBuiltIn$4(String.prototype, KEY, methods[0]);
|
|
1716
|
+
defineBuiltIn$4(RegExpPrototype, SYMBOL, methods[1]);
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
if (SHAM) createNonEnumerableProperty$2(RegExpPrototype[SYMBOL], 'sham', true);
|
|
1873
1720
|
};
|
|
1874
1721
|
|
|
1875
|
-
var
|
|
1722
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1723
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
1724
|
+
var toString$2 = toString$4;
|
|
1725
|
+
var requireObjectCoercible$3 = requireObjectCoercible$6;
|
|
1876
1726
|
|
|
1877
|
-
var
|
|
1727
|
+
var charAt$2 = uncurryThis$7(''.charAt);
|
|
1728
|
+
var charCodeAt = uncurryThis$7(''.charCodeAt);
|
|
1729
|
+
var stringSlice$2 = uncurryThis$7(''.slice);
|
|
1878
1730
|
|
|
1879
|
-
var
|
|
1731
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
1732
|
+
return function ($this, pos) {
|
|
1733
|
+
var S = toString$2(requireObjectCoercible$3($this));
|
|
1734
|
+
var position = toIntegerOrInfinity$1(pos);
|
|
1735
|
+
var size = S.length;
|
|
1736
|
+
var first, second;
|
|
1737
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1738
|
+
first = charCodeAt(S, position);
|
|
1739
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1740
|
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1741
|
+
? CONVERT_TO_STRING
|
|
1742
|
+
? charAt$2(S, position)
|
|
1743
|
+
: first
|
|
1744
|
+
: CONVERT_TO_STRING
|
|
1745
|
+
? stringSlice$2(S, position, position + 2)
|
|
1746
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1880
1749
|
|
|
1881
|
-
var
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
this.resolve = aCallable$4(resolve);
|
|
1889
|
-
this.reject = aCallable$4(reject);
|
|
1750
|
+
var stringMultibyte = {
|
|
1751
|
+
// `String.prototype.codePointAt` method
|
|
1752
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
1753
|
+
codeAt: createMethod(false),
|
|
1754
|
+
// `String.prototype.at` method
|
|
1755
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
1756
|
+
charAt: createMethod(true)
|
|
1890
1757
|
};
|
|
1891
1758
|
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1759
|
+
var charAt$1 = stringMultibyte.charAt;
|
|
1760
|
+
|
|
1761
|
+
// `AdvanceStringIndex` abstract operation
|
|
1762
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
1763
|
+
var advanceStringIndex$1 = function (S, index, unicode) {
|
|
1764
|
+
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
1896
1765
|
};
|
|
1897
1766
|
|
|
1898
|
-
var
|
|
1899
|
-
var
|
|
1900
|
-
var global$5 = global$l;
|
|
1901
|
-
var call$b = functionCall;
|
|
1902
|
-
var defineBuiltIn$4 = defineBuiltIn$6;
|
|
1903
|
-
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
1904
|
-
var setToStringTag$3 = setToStringTag$4;
|
|
1905
|
-
var setSpecies = setSpecies$1;
|
|
1906
|
-
var aCallable$3 = aCallable$8;
|
|
1907
|
-
var isCallable$6 = isCallable$l;
|
|
1908
|
-
var isObject$2 = isObject$a;
|
|
1909
|
-
var anInstance = anInstance$1;
|
|
1910
|
-
var speciesConstructor = speciesConstructor$1;
|
|
1911
|
-
var task = task$1.set;
|
|
1912
|
-
var microtask = microtask_1;
|
|
1913
|
-
var hostReportErrors = hostReportErrors$1;
|
|
1914
|
-
var perform$2 = perform$3;
|
|
1915
|
-
var Queue = queue$1;
|
|
1916
|
-
var InternalStateModule$1 = internalState;
|
|
1917
|
-
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
1918
|
-
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
1919
|
-
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
1767
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1768
|
+
var toObject$1 = toObject$4;
|
|
1920
1769
|
|
|
1921
|
-
var
|
|
1922
|
-
var
|
|
1923
|
-
var
|
|
1924
|
-
var
|
|
1925
|
-
|
|
1926
|
-
var
|
|
1927
|
-
var
|
|
1928
|
-
var PromiseConstructor = NativePromiseConstructor$2;
|
|
1929
|
-
var PromisePrototype = NativePromisePrototype$1;
|
|
1930
|
-
var TypeError$1 = global$5.TypeError;
|
|
1931
|
-
var document$1 = global$5.document;
|
|
1932
|
-
var process$1 = global$5.process;
|
|
1933
|
-
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
1934
|
-
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
1770
|
+
var floor = Math.floor;
|
|
1771
|
+
var charAt = uncurryThis$6(''.charAt);
|
|
1772
|
+
var replace = uncurryThis$6(''.replace);
|
|
1773
|
+
var stringSlice$1 = uncurryThis$6(''.slice);
|
|
1774
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
1775
|
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
1776
|
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
1935
1777
|
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
1942
|
-
|
|
1943
|
-
|
|
1778
|
+
// `GetSubstitution` abstract operation
|
|
1779
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
1780
|
+
var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
1781
|
+
var tailPos = position + matched.length;
|
|
1782
|
+
var m = captures.length;
|
|
1783
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
1784
|
+
if (namedCaptures !== undefined) {
|
|
1785
|
+
namedCaptures = toObject$1(namedCaptures);
|
|
1786
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
1787
|
+
}
|
|
1788
|
+
return replace(replacement, symbols, function (match, ch) {
|
|
1789
|
+
var capture;
|
|
1790
|
+
switch (charAt(ch, 0)) {
|
|
1791
|
+
case '$': return '$';
|
|
1792
|
+
case '&': return matched;
|
|
1793
|
+
case '`': return stringSlice$1(str, 0, position);
|
|
1794
|
+
case "'": return stringSlice$1(str, tailPos);
|
|
1795
|
+
case '<':
|
|
1796
|
+
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
|
1797
|
+
break;
|
|
1798
|
+
default: // \d\d?
|
|
1799
|
+
var n = +ch;
|
|
1800
|
+
if (n === 0) return match;
|
|
1801
|
+
if (n > m) {
|
|
1802
|
+
var f = floor(n / 10);
|
|
1803
|
+
if (f === 0) return match;
|
|
1804
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
1805
|
+
return match;
|
|
1806
|
+
}
|
|
1807
|
+
capture = captures[n - 1];
|
|
1808
|
+
}
|
|
1809
|
+
return capture === undefined ? '' : capture;
|
|
1810
|
+
});
|
|
1811
|
+
};
|
|
1944
1812
|
|
|
1945
|
-
var
|
|
1813
|
+
var call$9 = functionCall;
|
|
1814
|
+
var anObject$7 = anObject$d;
|
|
1815
|
+
var isCallable$9 = isCallable$l;
|
|
1816
|
+
var classof$3 = classofRaw$2;
|
|
1817
|
+
var regexpExec = regexpExec$2;
|
|
1946
1818
|
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1819
|
+
var $TypeError$7 = TypeError;
|
|
1820
|
+
|
|
1821
|
+
// `RegExpExec` abstract operation
|
|
1822
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
|
1823
|
+
var regexpExecAbstract = function (R, S) {
|
|
1824
|
+
var exec = R.exec;
|
|
1825
|
+
if (isCallable$9(exec)) {
|
|
1826
|
+
var result = call$9(exec, R, S);
|
|
1827
|
+
if (result !== null) anObject$7(result);
|
|
1828
|
+
return result;
|
|
1829
|
+
}
|
|
1830
|
+
if (classof$3(R) === 'RegExp') return call$9(regexpExec, R, S);
|
|
1831
|
+
throw new $TypeError$7('RegExp#exec called on incompatible receiver');
|
|
1951
1832
|
};
|
|
1952
1833
|
|
|
1953
|
-
var
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1834
|
+
var apply$1 = functionApply;
|
|
1835
|
+
var call$8 = functionCall;
|
|
1836
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1837
|
+
var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
|
|
1838
|
+
var fails$4 = fails$i;
|
|
1839
|
+
var anObject$6 = anObject$d;
|
|
1840
|
+
var isCallable$8 = isCallable$l;
|
|
1841
|
+
var isNullOrUndefined$3 = isNullOrUndefined$6;
|
|
1842
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
1843
|
+
var toLength = toLength$2;
|
|
1844
|
+
var toString$1 = toString$4;
|
|
1845
|
+
var requireObjectCoercible$2 = requireObjectCoercible$6;
|
|
1846
|
+
var advanceStringIndex = advanceStringIndex$1;
|
|
1847
|
+
var getMethod$3 = getMethod$5;
|
|
1848
|
+
var getSubstitution = getSubstitution$1;
|
|
1849
|
+
var regExpExec$1 = regexpExecAbstract;
|
|
1850
|
+
var wellKnownSymbol$b = wellKnownSymbol$g;
|
|
1851
|
+
|
|
1852
|
+
var REPLACE = wellKnownSymbol$b('replace');
|
|
1853
|
+
var max = Math.max;
|
|
1854
|
+
var min = Math.min;
|
|
1855
|
+
var concat = uncurryThis$5([].concat);
|
|
1856
|
+
var push = uncurryThis$5([].push);
|
|
1857
|
+
var stringIndexOf = uncurryThis$5(''.indexOf);
|
|
1858
|
+
var stringSlice = uncurryThis$5(''.slice);
|
|
1859
|
+
|
|
1860
|
+
var maybeToString = function (it) {
|
|
1861
|
+
return it === undefined ? it : String(it);
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
1865
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
1866
|
+
var REPLACE_KEEPS_$0 = (function () {
|
|
1867
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
1868
|
+
return 'a'.replace(/./, '$0') === '$0';
|
|
1869
|
+
})();
|
|
1870
|
+
|
|
1871
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
1872
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
1873
|
+
if (/./[REPLACE]) {
|
|
1874
|
+
return /./[REPLACE]('a', '$0') === '';
|
|
1875
|
+
}
|
|
1876
|
+
return false;
|
|
1877
|
+
})();
|
|
1878
|
+
|
|
1879
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$4(function () {
|
|
1880
|
+
var re = /./;
|
|
1881
|
+
re.exec = function () {
|
|
1882
|
+
var result = [];
|
|
1883
|
+
result.groups = { a: '7' };
|
|
1884
|
+
return result;
|
|
1885
|
+
};
|
|
1886
|
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
1887
|
+
return ''.replace(re, '$<a>') !== '7';
|
|
1888
|
+
});
|
|
1889
|
+
|
|
1890
|
+
// @@replace logic
|
|
1891
|
+
fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCallNative) {
|
|
1892
|
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
1893
|
+
|
|
1894
|
+
return [
|
|
1895
|
+
// `String.prototype.replace` method
|
|
1896
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
1897
|
+
function replace(searchValue, replaceValue) {
|
|
1898
|
+
var O = requireObjectCoercible$2(this);
|
|
1899
|
+
var replacer = isNullOrUndefined$3(searchValue) ? undefined : getMethod$3(searchValue, REPLACE);
|
|
1900
|
+
return replacer
|
|
1901
|
+
? call$8(replacer, searchValue, O, replaceValue)
|
|
1902
|
+
: call$8(nativeReplace, toString$1(O), searchValue, replaceValue);
|
|
1903
|
+
},
|
|
1904
|
+
// `RegExp.prototype[@@replace]` method
|
|
1905
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
1906
|
+
function (string, replaceValue) {
|
|
1907
|
+
var rx = anObject$6(this);
|
|
1908
|
+
var S = toString$1(string);
|
|
1909
|
+
|
|
1910
|
+
if (
|
|
1911
|
+
typeof replaceValue == 'string' &&
|
|
1912
|
+
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
1913
|
+
stringIndexOf(replaceValue, '$<') === -1
|
|
1914
|
+
) {
|
|
1915
|
+
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
1916
|
+
if (res.done) return res.value;
|
|
1966
1917
|
}
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1918
|
+
|
|
1919
|
+
var functionalReplace = isCallable$8(replaceValue);
|
|
1920
|
+
if (!functionalReplace) replaceValue = toString$1(replaceValue);
|
|
1921
|
+
|
|
1922
|
+
var global = rx.global;
|
|
1923
|
+
var fullUnicode;
|
|
1924
|
+
if (global) {
|
|
1925
|
+
fullUnicode = rx.unicode;
|
|
1926
|
+
rx.lastIndex = 0;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
var results = [];
|
|
1930
|
+
var result;
|
|
1931
|
+
while (true) {
|
|
1932
|
+
result = regExpExec$1(rx, S);
|
|
1933
|
+
if (result === null) break;
|
|
1934
|
+
|
|
1935
|
+
push(results, result);
|
|
1936
|
+
if (!global) break;
|
|
1937
|
+
|
|
1938
|
+
var matchStr = toString$1(result[0]);
|
|
1939
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
var accumulatedResult = '';
|
|
1943
|
+
var nextSourcePosition = 0;
|
|
1944
|
+
for (var i = 0; i < results.length; i++) {
|
|
1945
|
+
result = results[i];
|
|
1946
|
+
|
|
1947
|
+
var matched = toString$1(result[0]);
|
|
1948
|
+
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
1949
|
+
var captures = [];
|
|
1950
|
+
var replacement;
|
|
1951
|
+
// NOTE: This is equivalent to
|
|
1952
|
+
// captures = result.slice(1).map(maybeToString)
|
|
1953
|
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
1954
|
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
1955
|
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
1956
|
+
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
1957
|
+
var namedCaptures = result.groups;
|
|
1958
|
+
if (functionalReplace) {
|
|
1959
|
+
var replacerArgs = concat([matched], captures, position, S);
|
|
1960
|
+
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
1961
|
+
replacement = toString$1(apply$1(replaceValue, undefined, replacerArgs));
|
|
1962
|
+
} else {
|
|
1963
|
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
1964
|
+
}
|
|
1965
|
+
if (position >= nextSourcePosition) {
|
|
1966
|
+
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
1967
|
+
nextSourcePosition = position + matched.length;
|
|
1974
1968
|
}
|
|
1975
1969
|
}
|
|
1976
|
-
if (result === reaction.promise) {
|
|
1977
|
-
reject(new TypeError$1('Promise-chain cycle'));
|
|
1978
|
-
} else if (then = isThenable(result)) {
|
|
1979
|
-
call$b(then, result, resolve, reject);
|
|
1980
|
-
} else resolve(result);
|
|
1981
|
-
} else reject(value);
|
|
1982
|
-
} catch (error) {
|
|
1983
|
-
if (domain && !exited) domain.exit();
|
|
1984
|
-
reject(error);
|
|
1985
|
-
}
|
|
1986
|
-
};
|
|
1987
1970
|
|
|
1988
|
-
|
|
1989
|
-
if (state.notified) return;
|
|
1990
|
-
state.notified = true;
|
|
1991
|
-
microtask(function () {
|
|
1992
|
-
var reactions = state.reactions;
|
|
1993
|
-
var reaction;
|
|
1994
|
-
while (reaction = reactions.get()) {
|
|
1995
|
-
callReaction(reaction, state);
|
|
1971
|
+
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
|
1996
1972
|
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1973
|
+
];
|
|
1974
|
+
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
1975
|
+
|
|
1976
|
+
// `SameValue` abstract operation
|
|
1977
|
+
// https://tc39.es/ecma262/#sec-samevalue
|
|
1978
|
+
// eslint-disable-next-line es/no-object-is -- safe
|
|
1979
|
+
var sameValue$1 = Object.is || function is(x, y) {
|
|
1980
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
1981
|
+
return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
|
|
2000
1982
|
};
|
|
2001
1983
|
|
|
2002
|
-
var
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
1984
|
+
var call$7 = functionCall;
|
|
1985
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
1986
|
+
var anObject$5 = anObject$d;
|
|
1987
|
+
var isNullOrUndefined$2 = isNullOrUndefined$6;
|
|
1988
|
+
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
1989
|
+
var sameValue = sameValue$1;
|
|
1990
|
+
var toString = toString$4;
|
|
1991
|
+
var getMethod$2 = getMethod$5;
|
|
1992
|
+
var regExpExec = regexpExecAbstract;
|
|
1993
|
+
|
|
1994
|
+
// @@search logic
|
|
1995
|
+
fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
|
|
1996
|
+
return [
|
|
1997
|
+
// `String.prototype.search` method
|
|
1998
|
+
// https://tc39.es/ecma262/#sec-string.prototype.search
|
|
1999
|
+
function search(regexp) {
|
|
2000
|
+
var O = requireObjectCoercible$1(this);
|
|
2001
|
+
var searcher = isNullOrUndefined$2(regexp) ? undefined : getMethod$2(regexp, SEARCH);
|
|
2002
|
+
return searcher ? call$7(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
|
|
2003
|
+
},
|
|
2004
|
+
// `RegExp.prototype[@@search]` method
|
|
2005
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
|
2006
|
+
function (string) {
|
|
2007
|
+
var rx = anObject$5(this);
|
|
2008
|
+
var S = toString(string);
|
|
2009
|
+
var res = maybeCallNative(nativeSearch, rx, S);
|
|
2010
|
+
|
|
2011
|
+
if (res.done) return res.value;
|
|
2012
|
+
|
|
2013
|
+
var previousLastIndex = rx.lastIndex;
|
|
2014
|
+
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
|
2015
|
+
var result = regExpExec(rx, S);
|
|
2016
|
+
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
|
2017
|
+
return result === null ? -1 : result.index;
|
|
2018
|
+
}
|
|
2019
|
+
];
|
|
2020
|
+
});
|
|
2021
|
+
|
|
2022
|
+
function loadParams() {
|
|
2023
|
+
if (typeof window !== 'undefined') {
|
|
2024
|
+
const list = window.location.search.substring(1).split('&');
|
|
2025
|
+
const m = {};
|
|
2026
|
+
for (let i = 0; i < list.length; i++) {
|
|
2027
|
+
const indexOf = list[i].indexOf('=');
|
|
2028
|
+
if (indexOf >= 0) {
|
|
2029
|
+
m[list[i].substring(0, indexOf)] = decodeURIComponent(list[i].substring(indexOf + 1));
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
return m;
|
|
2033
|
+
}
|
|
2034
|
+
return {};
|
|
2035
|
+
}
|
|
2036
|
+
function initBackendsLocations() {
|
|
2037
|
+
params = loadParams();
|
|
2038
|
+
api = params['api'];
|
|
2039
|
+
if (typeof window !== 'undefined' && window.location) {
|
|
2040
|
+
currentUrl = window.location.href;
|
|
2041
|
+
}
|
|
2042
|
+
switch (api) {
|
|
2043
|
+
case 'prod':
|
|
2044
|
+
dBackend = 'https://query.bcrumbs.net';
|
|
2045
|
+
frontend = 'https://app.bcrumbs.net';
|
|
2046
|
+
apiBackend = 'https://api.bcrumbs.net';
|
|
2047
|
+
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
2048
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2049
|
+
break;
|
|
2050
|
+
case 'test':
|
|
2051
|
+
dBackend = 'https://query.bcrumbs.net';
|
|
2052
|
+
frontend = 'https://dev.bcrumbs.net';
|
|
2053
|
+
apiBackend = 'https://api.bcrumbs.net';
|
|
2054
|
+
apiV2Backend = 'apiv2-dev.bcrumbs.net';
|
|
2055
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2056
|
+
break;
|
|
2057
|
+
case 'local':
|
|
2058
|
+
dBackend = 'https://localhost:44322';
|
|
2059
|
+
frontend = 'http://localhost:4200';
|
|
2060
|
+
apiBackend = 'http://localhost:6085';
|
|
2061
|
+
apiV2Backend = 'https://apiv2-dev.bcrumbs.net';
|
|
2062
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2063
|
+
break;
|
|
2064
|
+
default:
|
|
2065
|
+
if (currentUrl && currentUrl.indexOf('localhost') > -1) {
|
|
2066
|
+
dBackend = 'https://query.bcrumbs.net';
|
|
2067
|
+
frontend = 'http://localhost:4200';
|
|
2068
|
+
apiBackend = 'https://api.bcrumbs.net';
|
|
2069
|
+
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
2070
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2071
|
+
} else if (currentUrl && currentUrl.indexOf('dconfig.com') > -1) {
|
|
2072
|
+
dBackend = 'https://query.bcrumbs.net';
|
|
2073
|
+
frontend = 'https://app.bcrumbs.net';
|
|
2074
|
+
apiBackend = 'https://api.bcrumbs.net';
|
|
2075
|
+
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
2076
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2077
|
+
} else if (currentUrl && currentUrl.indexOf('dev.bcrumbs.net') > -1) {
|
|
2078
|
+
dBackend = 'https://query.bcrumbs.net';
|
|
2079
|
+
frontend = 'https://dev.bcrumbs.net';
|
|
2080
|
+
apiBackend = 'https://api.bcrumbs.net';
|
|
2081
|
+
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
2082
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2083
|
+
} else {
|
|
2084
|
+
dBackend = 'https://query.bcrumbs.net';
|
|
2085
|
+
frontend = 'https://app.bcrumbs.net';
|
|
2086
|
+
apiBackend = 'https://api.bcrumbs.net';
|
|
2087
|
+
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
2088
|
+
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
2089
|
+
}
|
|
2090
|
+
break;
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
let params;
|
|
2094
|
+
let currentUrl;
|
|
2095
|
+
let frontend;
|
|
2096
|
+
let dBackend;
|
|
2097
|
+
let apiBackend;
|
|
2098
|
+
let apiV2Backend;
|
|
2099
|
+
let showcaseRenderer;
|
|
2100
|
+
let api;
|
|
2101
|
+
initBackendsLocations();
|
|
2102
|
+
const appConfig = {
|
|
2103
|
+
dconfig: {
|
|
2104
|
+
networkInterface: apiBackend
|
|
2105
|
+
},
|
|
2106
|
+
dquery: {
|
|
2107
|
+
networkInterface: dBackend + '/graphql'
|
|
2108
|
+
},
|
|
2109
|
+
showcase: {
|
|
2110
|
+
networkInterface: showcaseRenderer
|
|
2111
|
+
},
|
|
2112
|
+
billing: {
|
|
2113
|
+
networkInterface: apiV2Backend + '/billing'
|
|
2114
|
+
},
|
|
2115
|
+
core: {
|
|
2116
|
+
networkInterface: apiV2Backend + '/core'
|
|
2117
|
+
},
|
|
2118
|
+
bot: {
|
|
2119
|
+
networkInterface: apiV2Backend + '/bot'
|
|
2120
|
+
},
|
|
2121
|
+
// sw path
|
|
2122
|
+
sw: {
|
|
2123
|
+
path: 'assets/sw.js'
|
|
2124
|
+
}
|
|
2013
2125
|
};
|
|
2014
2126
|
|
|
2015
|
-
var
|
|
2016
|
-
|
|
2017
|
-
var promise = state.facade;
|
|
2018
|
-
var value = state.value;
|
|
2019
|
-
var IS_UNHANDLED = isUnhandled(state);
|
|
2020
|
-
var result;
|
|
2021
|
-
if (IS_UNHANDLED) {
|
|
2022
|
-
result = perform$2(function () {
|
|
2023
|
-
if (IS_NODE) {
|
|
2024
|
-
process$1.emit('unhandledRejection', value, promise);
|
|
2025
|
-
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2026
|
-
});
|
|
2027
|
-
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
2028
|
-
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
2029
|
-
if (result.error) throw result.value;
|
|
2030
|
-
}
|
|
2031
|
-
});
|
|
2032
|
-
};
|
|
2127
|
+
var global$8 = global$l;
|
|
2128
|
+
var classof$2 = classofRaw$2;
|
|
2033
2129
|
|
|
2034
|
-
var
|
|
2035
|
-
return state.rejection !== HANDLED && !state.parent;
|
|
2036
|
-
};
|
|
2130
|
+
var engineIsNode = classof$2(global$8.process) === 'process';
|
|
2037
2131
|
|
|
2038
|
-
var
|
|
2039
|
-
|
|
2040
|
-
var promise = state.facade;
|
|
2041
|
-
if (IS_NODE) {
|
|
2042
|
-
process$1.emit('rejectionHandled', promise);
|
|
2043
|
-
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2044
|
-
});
|
|
2045
|
-
};
|
|
2132
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
2133
|
+
var aCallable$6 = aCallable$8;
|
|
2046
2134
|
|
|
2047
|
-
var
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2135
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
2136
|
+
try {
|
|
2137
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2138
|
+
return uncurryThis$4(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
2139
|
+
} catch (error) { /* empty */ }
|
|
2051
2140
|
};
|
|
2052
2141
|
|
|
2053
|
-
var
|
|
2054
|
-
if (state.done) return;
|
|
2055
|
-
state.done = true;
|
|
2056
|
-
if (unwrap) state = unwrap;
|
|
2057
|
-
state.value = value;
|
|
2058
|
-
state.state = REJECTED;
|
|
2059
|
-
notify(state, true);
|
|
2060
|
-
};
|
|
2142
|
+
var isObject$4 = isObject$a;
|
|
2061
2143
|
|
|
2062
|
-
var
|
|
2063
|
-
|
|
2064
|
-
state.done = true;
|
|
2065
|
-
if (unwrap) state = unwrap;
|
|
2066
|
-
try {
|
|
2067
|
-
if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
|
|
2068
|
-
var then = isThenable(value);
|
|
2069
|
-
if (then) {
|
|
2070
|
-
microtask(function () {
|
|
2071
|
-
var wrapper = { done: false };
|
|
2072
|
-
try {
|
|
2073
|
-
call$b(then, value,
|
|
2074
|
-
bind$1(internalResolve, wrapper, state),
|
|
2075
|
-
bind$1(internalReject, wrapper, state)
|
|
2076
|
-
);
|
|
2077
|
-
} catch (error) {
|
|
2078
|
-
internalReject(wrapper, error, state);
|
|
2079
|
-
}
|
|
2080
|
-
});
|
|
2081
|
-
} else {
|
|
2082
|
-
state.value = value;
|
|
2083
|
-
state.state = FULFILLED;
|
|
2084
|
-
notify(state, false);
|
|
2085
|
-
}
|
|
2086
|
-
} catch (error) {
|
|
2087
|
-
internalReject({ done: false }, error, state);
|
|
2088
|
-
}
|
|
2144
|
+
var isPossiblePrototype$1 = function (argument) {
|
|
2145
|
+
return isObject$4(argument) || argument === null;
|
|
2089
2146
|
};
|
|
2090
2147
|
|
|
2091
|
-
|
|
2092
|
-
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
2093
|
-
// 25.4.3.1 Promise(executor)
|
|
2094
|
-
PromiseConstructor = function Promise(executor) {
|
|
2095
|
-
anInstance(this, PromisePrototype);
|
|
2096
|
-
aCallable$3(executor);
|
|
2097
|
-
call$b(Internal, this);
|
|
2098
|
-
var state = getInternalPromiseState(this);
|
|
2099
|
-
try {
|
|
2100
|
-
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
2101
|
-
} catch (error) {
|
|
2102
|
-
internalReject(state, error);
|
|
2103
|
-
}
|
|
2104
|
-
};
|
|
2105
|
-
|
|
2106
|
-
PromisePrototype = PromiseConstructor.prototype;
|
|
2148
|
+
var isPossiblePrototype = isPossiblePrototype$1;
|
|
2107
2149
|
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
setInternalState$1(this, {
|
|
2111
|
-
type: PROMISE,
|
|
2112
|
-
done: false,
|
|
2113
|
-
notified: false,
|
|
2114
|
-
parent: false,
|
|
2115
|
-
reactions: new Queue(),
|
|
2116
|
-
rejection: false,
|
|
2117
|
-
state: PENDING,
|
|
2118
|
-
value: undefined
|
|
2119
|
-
});
|
|
2120
|
-
};
|
|
2150
|
+
var $String = String;
|
|
2151
|
+
var $TypeError$6 = TypeError;
|
|
2121
2152
|
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
2127
|
-
state.parent = true;
|
|
2128
|
-
reaction.ok = isCallable$6(onFulfilled) ? onFulfilled : true;
|
|
2129
|
-
reaction.fail = isCallable$6(onRejected) && onRejected;
|
|
2130
|
-
reaction.domain = IS_NODE ? process$1.domain : undefined;
|
|
2131
|
-
if (state.state === PENDING) state.reactions.add(reaction);
|
|
2132
|
-
else microtask(function () {
|
|
2133
|
-
callReaction(reaction, state);
|
|
2134
|
-
});
|
|
2135
|
-
return reaction.promise;
|
|
2136
|
-
});
|
|
2153
|
+
var aPossiblePrototype$1 = function (argument) {
|
|
2154
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
2155
|
+
throw new $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
|
|
2156
|
+
};
|
|
2137
2157
|
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
this.reject = bind$1(internalReject, state);
|
|
2144
|
-
};
|
|
2158
|
+
/* eslint-disable no-proto -- safe */
|
|
2159
|
+
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
2160
|
+
var isObject$3 = isObject$a;
|
|
2161
|
+
var requireObjectCoercible = requireObjectCoercible$6;
|
|
2162
|
+
var aPossiblePrototype = aPossiblePrototype$1;
|
|
2145
2163
|
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2164
|
+
// `Object.setPrototypeOf` method
|
|
2165
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
2166
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
2167
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
2168
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
2169
|
+
var CORRECT_SETTER = false;
|
|
2170
|
+
var test = {};
|
|
2171
|
+
var setter;
|
|
2172
|
+
try {
|
|
2173
|
+
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
2174
|
+
setter(test, []);
|
|
2175
|
+
CORRECT_SETTER = test instanceof Array;
|
|
2176
|
+
} catch (error) { /* empty */ }
|
|
2177
|
+
return function setPrototypeOf(O, proto) {
|
|
2178
|
+
requireObjectCoercible(O);
|
|
2179
|
+
aPossiblePrototype(proto);
|
|
2180
|
+
if (!isObject$3(O)) return O;
|
|
2181
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
2182
|
+
else O.__proto__ = proto;
|
|
2183
|
+
return O;
|
|
2150
2184
|
};
|
|
2185
|
+
}() : undefined);
|
|
2151
2186
|
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
2156
|
-
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
2157
|
-
defineBuiltIn$4(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2158
|
-
var that = this;
|
|
2159
|
-
return new PromiseConstructor(function (resolve, reject) {
|
|
2160
|
-
call$b(nativeThen, that, resolve, reject);
|
|
2161
|
-
}).then(onFulfilled, onRejected);
|
|
2162
|
-
// https://github.com/zloirock/core-js/issues/640
|
|
2163
|
-
}, { unsafe: true });
|
|
2164
|
-
}
|
|
2187
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
2188
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
2189
|
+
var wellKnownSymbol$a = wellKnownSymbol$g;
|
|
2165
2190
|
|
|
2166
|
-
|
|
2167
|
-
try {
|
|
2168
|
-
delete NativePromisePrototype$1.constructor;
|
|
2169
|
-
} catch (error) { /* empty */ }
|
|
2191
|
+
var TO_STRING_TAG = wellKnownSymbol$a('toStringTag');
|
|
2170
2192
|
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
}
|
|
2193
|
+
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
2194
|
+
if (target && !STATIC) target = target.prototype;
|
|
2195
|
+
if (target && !hasOwn$2(target, TO_STRING_TAG)) {
|
|
2196
|
+
defineProperty$3(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
2175
2197
|
}
|
|
2176
|
-
}
|
|
2198
|
+
};
|
|
2177
2199
|
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
});
|
|
2200
|
+
var makeBuiltIn = makeBuiltInExports;
|
|
2201
|
+
var defineProperty$2 = objectDefineProperty;
|
|
2181
2202
|
|
|
2182
|
-
|
|
2183
|
-
|
|
2203
|
+
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
2204
|
+
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
2205
|
+
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
2206
|
+
return defineProperty$2.f(target, name, descriptor);
|
|
2207
|
+
};
|
|
2184
2208
|
|
|
2185
|
-
var
|
|
2209
|
+
var getBuiltIn$3 = getBuiltIn$7;
|
|
2210
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
2211
|
+
var wellKnownSymbol$9 = wellKnownSymbol$g;
|
|
2212
|
+
var DESCRIPTORS$2 = descriptors;
|
|
2186
2213
|
|
|
2187
|
-
var
|
|
2188
|
-
var Iterators$4 = iterators;
|
|
2214
|
+
var SPECIES$2 = wellKnownSymbol$9('species');
|
|
2189
2215
|
|
|
2190
|
-
var
|
|
2191
|
-
var
|
|
2216
|
+
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
2217
|
+
var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
|
|
2192
2218
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2219
|
+
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$2]) {
|
|
2220
|
+
defineBuiltInAccessor(Constructor, SPECIES$2, {
|
|
2221
|
+
configurable: true,
|
|
2222
|
+
get: function () { return this; }
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2196
2225
|
};
|
|
2197
2226
|
|
|
2198
|
-
var
|
|
2199
|
-
var getMethod$3 = getMethod$5;
|
|
2200
|
-
var isNullOrUndefined$2 = isNullOrUndefined$6;
|
|
2201
|
-
var Iterators$3 = iterators;
|
|
2202
|
-
var wellKnownSymbol$7 = wellKnownSymbol$g;
|
|
2227
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
2203
2228
|
|
|
2204
|
-
var
|
|
2229
|
+
var $TypeError$5 = TypeError;
|
|
2205
2230
|
|
|
2206
|
-
var
|
|
2207
|
-
if (
|
|
2208
|
-
|
|
2209
|
-
|| Iterators$3[classof$2(it)];
|
|
2231
|
+
var anInstance$1 = function (it, Prototype) {
|
|
2232
|
+
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
2233
|
+
throw new $TypeError$5('Incorrect invocation');
|
|
2210
2234
|
};
|
|
2211
2235
|
|
|
2212
|
-
var
|
|
2213
|
-
var
|
|
2214
|
-
var
|
|
2215
|
-
var
|
|
2216
|
-
var
|
|
2236
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
2237
|
+
var fails$3 = fails$i;
|
|
2238
|
+
var isCallable$7 = isCallable$l;
|
|
2239
|
+
var classof$1 = classof$5;
|
|
2240
|
+
var getBuiltIn$2 = getBuiltIn$7;
|
|
2241
|
+
var inspectSource$1 = inspectSource$3;
|
|
2217
2242
|
|
|
2218
|
-
var
|
|
2243
|
+
var noop = function () { /* empty */ };
|
|
2244
|
+
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
2245
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
2246
|
+
var exec = uncurryThis$3(constructorRegExp.exec);
|
|
2247
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
2219
2248
|
|
|
2220
|
-
var
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2249
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
2250
|
+
if (!isCallable$7(argument)) return false;
|
|
2251
|
+
try {
|
|
2252
|
+
construct(noop, [], argument);
|
|
2253
|
+
return true;
|
|
2254
|
+
} catch (error) {
|
|
2255
|
+
return false;
|
|
2256
|
+
}
|
|
2224
2257
|
};
|
|
2225
2258
|
|
|
2226
|
-
var
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2259
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
2260
|
+
if (!isCallable$7(argument)) return false;
|
|
2261
|
+
switch (classof$1(argument)) {
|
|
2262
|
+
case 'AsyncFunction':
|
|
2263
|
+
case 'GeneratorFunction':
|
|
2264
|
+
case 'AsyncGeneratorFunction': return false;
|
|
2265
|
+
}
|
|
2233
2266
|
try {
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
}
|
|
2239
|
-
innerResult = call$9(innerResult, iterator);
|
|
2267
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
2268
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
2269
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
2270
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
2240
2271
|
} catch (error) {
|
|
2241
|
-
|
|
2242
|
-
innerResult = error;
|
|
2272
|
+
return true;
|
|
2243
2273
|
}
|
|
2244
|
-
if (kind === 'throw') throw value;
|
|
2245
|
-
if (innerError) throw innerResult;
|
|
2246
|
-
anObject$8(innerResult);
|
|
2247
|
-
return value;
|
|
2248
2274
|
};
|
|
2249
2275
|
|
|
2250
|
-
|
|
2251
|
-
var call$8 = functionCall;
|
|
2252
|
-
var anObject$7 = anObject$d;
|
|
2253
|
-
var tryToString = tryToString$4;
|
|
2254
|
-
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2255
|
-
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
2256
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
2257
|
-
var getIterator = getIterator$1;
|
|
2258
|
-
var getIteratorMethod = getIteratorMethod$2;
|
|
2259
|
-
var iteratorClose = iteratorClose$1;
|
|
2260
|
-
|
|
2261
|
-
var $TypeError$1 = TypeError;
|
|
2276
|
+
isConstructorLegacy.sham = true;
|
|
2262
2277
|
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2278
|
+
// `IsConstructor` abstract operation
|
|
2279
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
2280
|
+
var isConstructor$1 = !construct || fails$3(function () {
|
|
2281
|
+
var called;
|
|
2282
|
+
return isConstructorModern(isConstructorModern.call)
|
|
2283
|
+
|| !isConstructorModern(Object)
|
|
2284
|
+
|| !isConstructorModern(function () { called = true; })
|
|
2285
|
+
|| called;
|
|
2286
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
2267
2287
|
|
|
2268
|
-
var
|
|
2288
|
+
var isConstructor = isConstructor$1;
|
|
2289
|
+
var tryToString$2 = tryToString$4;
|
|
2269
2290
|
|
|
2270
|
-
var
|
|
2271
|
-
var that = options && options.that;
|
|
2272
|
-
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2273
|
-
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
2274
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2275
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2276
|
-
var fn = bind(unboundFunction, that);
|
|
2277
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
2291
|
+
var $TypeError$4 = TypeError;
|
|
2278
2292
|
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2293
|
+
// `Assert: IsConstructor(argument) is true`
|
|
2294
|
+
var aConstructor$1 = function (argument) {
|
|
2295
|
+
if (isConstructor(argument)) return argument;
|
|
2296
|
+
throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
|
|
2297
|
+
};
|
|
2283
2298
|
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2289
|
-
};
|
|
2299
|
+
var anObject$4 = anObject$d;
|
|
2300
|
+
var aConstructor = aConstructor$1;
|
|
2301
|
+
var isNullOrUndefined$1 = isNullOrUndefined$6;
|
|
2302
|
+
var wellKnownSymbol$8 = wellKnownSymbol$g;
|
|
2290
2303
|
|
|
2291
|
-
|
|
2292
|
-
iterator = iterable.iterator;
|
|
2293
|
-
} else if (IS_ITERATOR) {
|
|
2294
|
-
iterator = iterable;
|
|
2295
|
-
} else {
|
|
2296
|
-
iterFn = getIteratorMethod(iterable);
|
|
2297
|
-
if (!iterFn) throw new $TypeError$1(tryToString(iterable) + ' is not iterable');
|
|
2298
|
-
// optimisation for array iterators
|
|
2299
|
-
if (isArrayIteratorMethod(iterFn)) {
|
|
2300
|
-
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
2301
|
-
result = callFn(iterable[index]);
|
|
2302
|
-
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
2303
|
-
} return new Result(false);
|
|
2304
|
-
}
|
|
2305
|
-
iterator = getIterator(iterable, iterFn);
|
|
2306
|
-
}
|
|
2304
|
+
var SPECIES$1 = wellKnownSymbol$8('species');
|
|
2307
2305
|
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
}
|
|
2315
|
-
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
2316
|
-
} return new Result(false);
|
|
2306
|
+
// `SpeciesConstructor` abstract operation
|
|
2307
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2308
|
+
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
2309
|
+
var C = anObject$4(O).constructor;
|
|
2310
|
+
var S;
|
|
2311
|
+
return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
2317
2312
|
};
|
|
2318
2313
|
|
|
2319
|
-
var
|
|
2320
|
-
|
|
2321
|
-
var ITERATOR$3 = wellKnownSymbol$6('iterator');
|
|
2322
|
-
var SAFE_CLOSING = false;
|
|
2323
|
-
|
|
2324
|
-
try {
|
|
2325
|
-
var called = 0;
|
|
2326
|
-
var iteratorWithReturn = {
|
|
2327
|
-
next: function () {
|
|
2328
|
-
return { done: !!called++ };
|
|
2329
|
-
},
|
|
2330
|
-
'return': function () {
|
|
2331
|
-
SAFE_CLOSING = true;
|
|
2332
|
-
}
|
|
2333
|
-
};
|
|
2334
|
-
iteratorWithReturn[ITERATOR$3] = function () {
|
|
2335
|
-
return this;
|
|
2336
|
-
};
|
|
2337
|
-
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
2338
|
-
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
2339
|
-
} catch (error) { /* empty */ }
|
|
2314
|
+
var classofRaw = classofRaw$2;
|
|
2315
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
2340
2316
|
|
|
2341
|
-
var
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
try {
|
|
2347
|
-
var object = {};
|
|
2348
|
-
object[ITERATOR$3] = function () {
|
|
2349
|
-
return {
|
|
2350
|
-
next: function () {
|
|
2351
|
-
return { done: ITERATION_SUPPORT = true };
|
|
2352
|
-
}
|
|
2353
|
-
};
|
|
2354
|
-
};
|
|
2355
|
-
exec(object);
|
|
2356
|
-
} catch (error) { /* empty */ }
|
|
2357
|
-
return ITERATION_SUPPORT;
|
|
2317
|
+
var functionUncurryThisClause = function (fn) {
|
|
2318
|
+
// Nashorn bug:
|
|
2319
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
2320
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
2321
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
|
|
2358
2322
|
};
|
|
2359
2323
|
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
2362
|
-
var
|
|
2363
|
-
|
|
2364
|
-
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
2365
|
-
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
2366
|
-
});
|
|
2324
|
+
var uncurryThis$1 = functionUncurryThisClause;
|
|
2325
|
+
var aCallable$5 = aCallable$8;
|
|
2326
|
+
var NATIVE_BIND = functionBindNative;
|
|
2367
2327
|
|
|
2368
|
-
var
|
|
2369
|
-
var call$7 = functionCall;
|
|
2370
|
-
var aCallable$1 = aCallable$8;
|
|
2371
|
-
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2372
|
-
var perform$1 = perform$3;
|
|
2373
|
-
var iterate$1 = iterate$2;
|
|
2374
|
-
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
2328
|
+
var bind$4 = uncurryThis$1(uncurryThis$1.bind);
|
|
2375
2329
|
|
|
2376
|
-
//
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
var reject = capability.reject;
|
|
2384
|
-
var result = perform$1(function () {
|
|
2385
|
-
var $promiseResolve = aCallable$1(C.resolve);
|
|
2386
|
-
var values = [];
|
|
2387
|
-
var counter = 0;
|
|
2388
|
-
var remaining = 1;
|
|
2389
|
-
iterate$1(iterable, function (promise) {
|
|
2390
|
-
var index = counter++;
|
|
2391
|
-
var alreadyCalled = false;
|
|
2392
|
-
remaining++;
|
|
2393
|
-
call$7($promiseResolve, C, promise).then(function (value) {
|
|
2394
|
-
if (alreadyCalled) return;
|
|
2395
|
-
alreadyCalled = true;
|
|
2396
|
-
values[index] = value;
|
|
2397
|
-
--remaining || resolve(values);
|
|
2398
|
-
}, reject);
|
|
2399
|
-
});
|
|
2400
|
-
--remaining || resolve(values);
|
|
2401
|
-
});
|
|
2402
|
-
if (result.error) reject(result.value);
|
|
2403
|
-
return capability.promise;
|
|
2404
|
-
}
|
|
2405
|
-
});
|
|
2330
|
+
// optional / simple context binding
|
|
2331
|
+
var functionBindContext = function (fn, that) {
|
|
2332
|
+
aCallable$5(fn);
|
|
2333
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
2334
|
+
return fn.apply(that, arguments);
|
|
2335
|
+
};
|
|
2336
|
+
};
|
|
2406
2337
|
|
|
2407
|
-
var
|
|
2408
|
-
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2409
|
-
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2410
|
-
var getBuiltIn$1 = getBuiltIn$7;
|
|
2411
|
-
var isCallable$5 = isCallable$l;
|
|
2412
|
-
var defineBuiltIn$3 = defineBuiltIn$6;
|
|
2338
|
+
var uncurryThis = functionUncurryThis;
|
|
2413
2339
|
|
|
2414
|
-
var
|
|
2340
|
+
var arraySlice$1 = uncurryThis([].slice);
|
|
2415
2341
|
|
|
2416
|
-
|
|
2417
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
2418
|
-
$$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
2419
|
-
'catch': function (onRejected) {
|
|
2420
|
-
return this.then(undefined, onRejected);
|
|
2421
|
-
}
|
|
2422
|
-
});
|
|
2342
|
+
var $TypeError$3 = TypeError;
|
|
2423
2343
|
|
|
2424
|
-
|
|
2425
|
-
if (
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
defineBuiltIn$3(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2429
|
-
}
|
|
2430
|
-
}
|
|
2344
|
+
var validateArgumentsLength$1 = function (passed, required) {
|
|
2345
|
+
if (passed < required) throw new $TypeError$3('Not enough arguments');
|
|
2346
|
+
return passed;
|
|
2347
|
+
};
|
|
2431
2348
|
|
|
2432
|
-
var
|
|
2433
|
-
var call$6 = functionCall;
|
|
2434
|
-
var aCallable = aCallable$8;
|
|
2435
|
-
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2436
|
-
var perform = perform$3;
|
|
2437
|
-
var iterate = iterate$2;
|
|
2438
|
-
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
2349
|
+
var userAgent$2 = engineUserAgent;
|
|
2439
2350
|
|
|
2440
|
-
//
|
|
2441
|
-
|
|
2442
|
-
$$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
2443
|
-
race: function race(iterable) {
|
|
2444
|
-
var C = this;
|
|
2445
|
-
var capability = newPromiseCapabilityModule$1.f(C);
|
|
2446
|
-
var reject = capability.reject;
|
|
2447
|
-
var result = perform(function () {
|
|
2448
|
-
var $promiseResolve = aCallable(C.resolve);
|
|
2449
|
-
iterate(iterable, function (promise) {
|
|
2450
|
-
call$6($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2451
|
-
});
|
|
2452
|
-
});
|
|
2453
|
-
if (result.error) reject(result.value);
|
|
2454
|
-
return capability.promise;
|
|
2455
|
-
}
|
|
2456
|
-
});
|
|
2351
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
2352
|
+
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
2457
2353
|
|
|
2458
|
-
var
|
|
2459
|
-
var
|
|
2460
|
-
var
|
|
2354
|
+
var global$7 = global$l;
|
|
2355
|
+
var apply = functionApply;
|
|
2356
|
+
var bind$3 = functionBindContext;
|
|
2357
|
+
var isCallable$6 = isCallable$l;
|
|
2358
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
2359
|
+
var fails$2 = fails$i;
|
|
2360
|
+
var html = html$2;
|
|
2361
|
+
var arraySlice = arraySlice$1;
|
|
2362
|
+
var createElement = documentCreateElement$2;
|
|
2363
|
+
var validateArgumentsLength = validateArgumentsLength$1;
|
|
2364
|
+
var IS_IOS$1 = engineIsIos;
|
|
2365
|
+
var IS_NODE$3 = engineIsNode;
|
|
2461
2366
|
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2367
|
+
var set = global$7.setImmediate;
|
|
2368
|
+
var clear = global$7.clearImmediate;
|
|
2369
|
+
var process$3 = global$7.process;
|
|
2370
|
+
var Dispatch = global$7.Dispatch;
|
|
2371
|
+
var Function$1 = global$7.Function;
|
|
2372
|
+
var MessageChannel = global$7.MessageChannel;
|
|
2373
|
+
var String$1 = global$7.String;
|
|
2374
|
+
var counter = 0;
|
|
2375
|
+
var queue$2 = {};
|
|
2376
|
+
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
2377
|
+
var $location, defer, channel, port;
|
|
2378
|
+
|
|
2379
|
+
fails$2(function () {
|
|
2380
|
+
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
2381
|
+
$location = global$7.location;
|
|
2471
2382
|
});
|
|
2472
2383
|
|
|
2473
|
-
var
|
|
2474
|
-
|
|
2475
|
-
var
|
|
2384
|
+
var run = function (id) {
|
|
2385
|
+
if (hasOwn$1(queue$2, id)) {
|
|
2386
|
+
var fn = queue$2[id];
|
|
2387
|
+
delete queue$2[id];
|
|
2388
|
+
fn();
|
|
2389
|
+
}
|
|
2390
|
+
};
|
|
2476
2391
|
|
|
2477
|
-
var
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
var resolve = promiseCapability.resolve;
|
|
2482
|
-
resolve(x);
|
|
2483
|
-
return promiseCapability.promise;
|
|
2392
|
+
var runner = function (id) {
|
|
2393
|
+
return function () {
|
|
2394
|
+
run(id);
|
|
2395
|
+
};
|
|
2484
2396
|
};
|
|
2485
2397
|
|
|
2486
|
-
var
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
var promiseResolve = promiseResolve$1;
|
|
2398
|
+
var eventListener = function (event) {
|
|
2399
|
+
run(event.data);
|
|
2400
|
+
};
|
|
2490
2401
|
|
|
2491
|
-
|
|
2402
|
+
var globalPostMessageDefer = function (id) {
|
|
2403
|
+
// old engines have not location.origin
|
|
2404
|
+
global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
2405
|
+
};
|
|
2492
2406
|
|
|
2493
|
-
//
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2407
|
+
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
2408
|
+
if (!set || !clear) {
|
|
2409
|
+
set = function setImmediate(handler) {
|
|
2410
|
+
validateArgumentsLength(arguments.length, 1);
|
|
2411
|
+
var fn = isCallable$6(handler) ? handler : Function$1(handler);
|
|
2412
|
+
var args = arraySlice(arguments, 1);
|
|
2413
|
+
queue$2[++counter] = function () {
|
|
2414
|
+
apply(fn, undefined, args);
|
|
2415
|
+
};
|
|
2416
|
+
defer(counter);
|
|
2417
|
+
return counter;
|
|
2418
|
+
};
|
|
2419
|
+
clear = function clearImmediate(id) {
|
|
2420
|
+
delete queue$2[id];
|
|
2421
|
+
};
|
|
2422
|
+
// Node.js 0.8-
|
|
2423
|
+
if (IS_NODE$3) {
|
|
2424
|
+
defer = function (id) {
|
|
2425
|
+
process$3.nextTick(runner(id));
|
|
2426
|
+
};
|
|
2427
|
+
// Sphere (JS game engine) Dispatch API
|
|
2428
|
+
} else if (Dispatch && Dispatch.now) {
|
|
2429
|
+
defer = function (id) {
|
|
2430
|
+
Dispatch.now(runner(id));
|
|
2431
|
+
};
|
|
2432
|
+
// Browsers with MessageChannel, includes WebWorkers
|
|
2433
|
+
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
2434
|
+
} else if (MessageChannel && !IS_IOS$1) {
|
|
2435
|
+
channel = new MessageChannel();
|
|
2436
|
+
port = channel.port2;
|
|
2437
|
+
channel.port1.onmessage = eventListener;
|
|
2438
|
+
defer = bind$3(port.postMessage, port);
|
|
2439
|
+
// Browsers with postMessage, skip WebWorkers
|
|
2440
|
+
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
2441
|
+
} else if (
|
|
2442
|
+
global$7.addEventListener &&
|
|
2443
|
+
isCallable$6(global$7.postMessage) &&
|
|
2444
|
+
!global$7.importScripts &&
|
|
2445
|
+
$location && $location.protocol !== 'file:' &&
|
|
2446
|
+
!fails$2(globalPostMessageDefer)
|
|
2447
|
+
) {
|
|
2448
|
+
defer = globalPostMessageDefer;
|
|
2449
|
+
global$7.addEventListener('message', eventListener, false);
|
|
2450
|
+
// IE8-
|
|
2451
|
+
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
2452
|
+
defer = function (id) {
|
|
2453
|
+
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
2454
|
+
html.removeChild(this);
|
|
2455
|
+
run(id);
|
|
2456
|
+
};
|
|
2457
|
+
};
|
|
2458
|
+
// Rest old browsers
|
|
2459
|
+
} else {
|
|
2460
|
+
defer = function (id) {
|
|
2461
|
+
setTimeout(runner(id), 0);
|
|
2462
|
+
};
|
|
2498
2463
|
}
|
|
2499
|
-
}
|
|
2464
|
+
}
|
|
2500
2465
|
|
|
2501
|
-
var
|
|
2466
|
+
var task$1 = {
|
|
2467
|
+
set: set,
|
|
2468
|
+
clear: clear
|
|
2469
|
+
};
|
|
2502
2470
|
|
|
2503
|
-
var $
|
|
2471
|
+
var global$6 = global$l;
|
|
2472
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2504
2473
|
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2474
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2475
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2476
|
+
|
|
2477
|
+
// Avoid NodeJS experimental warning
|
|
2478
|
+
var safeGetBuiltIn$1 = function (name) {
|
|
2479
|
+
if (!DESCRIPTORS$1) return global$6[name];
|
|
2480
|
+
var descriptor = getOwnPropertyDescriptor(global$6, name);
|
|
2481
|
+
return descriptor && descriptor.value;
|
|
2508
2482
|
};
|
|
2509
2483
|
|
|
2510
|
-
var
|
|
2484
|
+
var Queue$2 = function () {
|
|
2485
|
+
this.head = null;
|
|
2486
|
+
this.tail = null;
|
|
2487
|
+
};
|
|
2511
2488
|
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
var
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2489
|
+
Queue$2.prototype = {
|
|
2490
|
+
add: function (item) {
|
|
2491
|
+
var entry = { item: item, next: null };
|
|
2492
|
+
var tail = this.tail;
|
|
2493
|
+
if (tail) tail.next = entry;
|
|
2494
|
+
else this.head = entry;
|
|
2495
|
+
this.tail = entry;
|
|
2496
|
+
},
|
|
2497
|
+
get: function () {
|
|
2498
|
+
var entry = this.head;
|
|
2499
|
+
if (entry) {
|
|
2500
|
+
var next = this.head = entry.next;
|
|
2501
|
+
if (next === null) this.tail = null;
|
|
2502
|
+
return entry.item;
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2526
2505
|
};
|
|
2527
2506
|
|
|
2528
|
-
var
|
|
2529
|
-
var global$4 = global$l;
|
|
2507
|
+
var queue$1 = Queue$2;
|
|
2530
2508
|
|
|
2531
|
-
|
|
2532
|
-
var $RegExp$2 = global$4.RegExp;
|
|
2509
|
+
var userAgent$1 = engineUserAgent;
|
|
2533
2510
|
|
|
2534
|
-
var
|
|
2535
|
-
var re = $RegExp$2('a', 'y');
|
|
2536
|
-
re.lastIndex = 2;
|
|
2537
|
-
return re.exec('abcd') !== null;
|
|
2538
|
-
});
|
|
2511
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
|
|
2539
2512
|
|
|
2540
|
-
|
|
2541
|
-
// https://github.com/zloirock/core-js/issues/1008
|
|
2542
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
|
|
2543
|
-
return !$RegExp$2('a', 'y').sticky;
|
|
2544
|
-
});
|
|
2513
|
+
var userAgent = engineUserAgent;
|
|
2545
2514
|
|
|
2546
|
-
var
|
|
2547
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
2548
|
-
var re = $RegExp$2('^r', 'gy');
|
|
2549
|
-
re.lastIndex = 2;
|
|
2550
|
-
return re.exec('str') !== null;
|
|
2551
|
-
});
|
|
2515
|
+
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
2552
2516
|
|
|
2553
|
-
var
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2517
|
+
var global$5 = global$l;
|
|
2518
|
+
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
2519
|
+
var bind$2 = functionBindContext;
|
|
2520
|
+
var macrotask = task$1.set;
|
|
2521
|
+
var Queue$1 = queue$1;
|
|
2522
|
+
var IS_IOS = engineIsIos;
|
|
2523
|
+
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
2524
|
+
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
2525
|
+
var IS_NODE$2 = engineIsNode;
|
|
2558
2526
|
|
|
2559
|
-
var
|
|
2527
|
+
var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
|
|
2528
|
+
var document$2 = global$5.document;
|
|
2529
|
+
var process$2 = global$5.process;
|
|
2530
|
+
var Promise$1 = global$5.Promise;
|
|
2531
|
+
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
2532
|
+
var notify$1, toggle, node, promise, then;
|
|
2560
2533
|
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
var
|
|
2564
|
-
var anObject$4 = anObject$d;
|
|
2565
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
2566
|
-
var objectKeys = objectKeys$2;
|
|
2534
|
+
// modern engines have queueMicrotask method
|
|
2535
|
+
if (!microtask$1) {
|
|
2536
|
+
var queue = new Queue$1();
|
|
2567
2537
|
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
return O;
|
|
2580
|
-
};
|
|
2538
|
+
var flush = function () {
|
|
2539
|
+
var parent, fn;
|
|
2540
|
+
if (IS_NODE$2 && (parent = process$2.domain)) parent.exit();
|
|
2541
|
+
while (fn = queue.get()) try {
|
|
2542
|
+
fn();
|
|
2543
|
+
} catch (error) {
|
|
2544
|
+
if (queue.head) notify$1();
|
|
2545
|
+
throw error;
|
|
2546
|
+
}
|
|
2547
|
+
if (parent) parent.enter();
|
|
2548
|
+
};
|
|
2581
2549
|
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2550
|
+
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
2551
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
2552
|
+
if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
|
|
2553
|
+
toggle = true;
|
|
2554
|
+
node = document$2.createTextNode('');
|
|
2555
|
+
new MutationObserver(flush).observe(node, { characterData: true });
|
|
2556
|
+
notify$1 = function () {
|
|
2557
|
+
node.data = toggle = !toggle;
|
|
2558
|
+
};
|
|
2559
|
+
// environments with maybe non-completely correct, but existent Promise
|
|
2560
|
+
} else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
|
|
2561
|
+
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
2562
|
+
promise = Promise$1.resolve(undefined);
|
|
2563
|
+
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
2564
|
+
promise.constructor = Promise$1;
|
|
2565
|
+
then = bind$2(promise.then, promise);
|
|
2566
|
+
notify$1 = function () {
|
|
2567
|
+
then(flush);
|
|
2568
|
+
};
|
|
2569
|
+
// Node.js without promises
|
|
2570
|
+
} else if (IS_NODE$2) {
|
|
2571
|
+
notify$1 = function () {
|
|
2572
|
+
process$2.nextTick(flush);
|
|
2573
|
+
};
|
|
2574
|
+
// for other environments - macrotask based on:
|
|
2575
|
+
// - setImmediate
|
|
2576
|
+
// - MessageChannel
|
|
2577
|
+
// - window.postMessage
|
|
2578
|
+
// - onreadystatechange
|
|
2579
|
+
// - setTimeout
|
|
2580
|
+
} else {
|
|
2581
|
+
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
2582
|
+
macrotask = bind$2(macrotask, global$5);
|
|
2583
|
+
notify$1 = function () {
|
|
2584
|
+
macrotask(flush);
|
|
2585
|
+
};
|
|
2586
|
+
}
|
|
2590
2587
|
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2588
|
+
microtask$1 = function (fn) {
|
|
2589
|
+
if (!queue.head) notify$1();
|
|
2590
|
+
queue.add(fn);
|
|
2591
|
+
};
|
|
2592
|
+
}
|
|
2596
2593
|
|
|
2597
|
-
var
|
|
2594
|
+
var microtask_1 = microtask$1;
|
|
2598
2595
|
|
|
2599
|
-
var
|
|
2600
|
-
|
|
2596
|
+
var hostReportErrors$1 = function (a, b) {
|
|
2597
|
+
try {
|
|
2598
|
+
// eslint-disable-next-line no-console -- safe
|
|
2599
|
+
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
2600
|
+
} catch (error) { /* empty */ }
|
|
2601
2601
|
};
|
|
2602
2602
|
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
return temp;
|
|
2603
|
+
var perform$3 = function (exec) {
|
|
2604
|
+
try {
|
|
2605
|
+
return { error: false, value: exec() };
|
|
2606
|
+
} catch (error) {
|
|
2607
|
+
return { error: true, value: error };
|
|
2608
|
+
}
|
|
2610
2609
|
};
|
|
2611
2610
|
|
|
2612
|
-
|
|
2613
|
-
var NullProtoObjectViaIFrame = function () {
|
|
2614
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
2615
|
-
var iframe = documentCreateElement$1('iframe');
|
|
2616
|
-
var JS = 'java' + SCRIPT + ':';
|
|
2617
|
-
var iframeDocument;
|
|
2618
|
-
iframe.style.display = 'none';
|
|
2619
|
-
html.appendChild(iframe);
|
|
2620
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
2621
|
-
iframe.src = String(JS);
|
|
2622
|
-
iframeDocument = iframe.contentWindow.document;
|
|
2623
|
-
iframeDocument.open();
|
|
2624
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
2625
|
-
iframeDocument.close();
|
|
2626
|
-
return iframeDocument.F;
|
|
2627
|
-
};
|
|
2611
|
+
var global$4 = global$l;
|
|
2628
2612
|
|
|
2629
|
-
|
|
2630
|
-
// No need to use active x approach when document.domain is not set
|
|
2631
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
2632
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
2633
|
-
// avoid IE GC bug
|
|
2634
|
-
var activeXDocument;
|
|
2635
|
-
var NullProtoObject = function () {
|
|
2636
|
-
try {
|
|
2637
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
2638
|
-
} catch (error) { /* ignore */ }
|
|
2639
|
-
NullProtoObject = typeof document != 'undefined'
|
|
2640
|
-
? document.domain && activeXDocument
|
|
2641
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
2642
|
-
: NullProtoObjectViaIFrame()
|
|
2643
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
2644
|
-
var length = enumBugKeys.length;
|
|
2645
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
2646
|
-
return NullProtoObject();
|
|
2647
|
-
};
|
|
2613
|
+
var promiseNativeConstructor = global$4.Promise;
|
|
2648
2614
|
|
|
2649
|
-
|
|
2615
|
+
/* global Deno -- Deno case */
|
|
2616
|
+
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
2650
2617
|
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
var
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
EmptyConstructor[PROTOTYPE] = anObject$3(O);
|
|
2658
|
-
result = new EmptyConstructor();
|
|
2659
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
2660
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
2661
|
-
result[IE_PROTO$1] = O;
|
|
2662
|
-
} else result = NullProtoObject();
|
|
2663
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
2664
|
-
};
|
|
2618
|
+
var IS_DENO$1 = engineIsDeno;
|
|
2619
|
+
var IS_NODE$1 = engineIsNode;
|
|
2620
|
+
|
|
2621
|
+
var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
|
|
2622
|
+
&& typeof window == 'object'
|
|
2623
|
+
&& typeof document == 'object';
|
|
2665
2624
|
|
|
2666
|
-
var fails$5 = fails$i;
|
|
2667
2625
|
var global$3 = global$l;
|
|
2626
|
+
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
2627
|
+
var isCallable$5 = isCallable$l;
|
|
2628
|
+
var isForced = isForced_1;
|
|
2629
|
+
var inspectSource = inspectSource$3;
|
|
2630
|
+
var wellKnownSymbol$7 = wellKnownSymbol$g;
|
|
2631
|
+
var IS_BROWSER = engineIsBrowser;
|
|
2632
|
+
var IS_DENO = engineIsDeno;
|
|
2633
|
+
var V8_VERSION = engineV8Version;
|
|
2668
2634
|
|
|
2669
|
-
|
|
2670
|
-
var
|
|
2635
|
+
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
2636
|
+
var SPECIES = wellKnownSymbol$7('species');
|
|
2637
|
+
var SUBCLASSING = false;
|
|
2638
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$5(global$3.PromiseRejectionEvent);
|
|
2671
2639
|
|
|
2672
|
-
var
|
|
2673
|
-
var
|
|
2674
|
-
|
|
2640
|
+
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
2641
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
2642
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
2643
|
+
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
2644
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
2645
|
+
// We can't detect it synchronously, so just check versions
|
|
2646
|
+
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
2647
|
+
// We can't use @@species feature detection in V8 since it causes
|
|
2648
|
+
// deoptimization and performance degradation
|
|
2649
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
2650
|
+
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
2651
|
+
// Detect correctness of subclassing with @@species support
|
|
2652
|
+
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
2653
|
+
var FakePromise = function (exec) {
|
|
2654
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
2655
|
+
};
|
|
2656
|
+
var constructor = promise.constructor = {};
|
|
2657
|
+
constructor[SPECIES] = FakePromise;
|
|
2658
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
2659
|
+
if (!SUBCLASSING) return true;
|
|
2660
|
+
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
2661
|
+
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2675
2662
|
});
|
|
2676
2663
|
|
|
2677
|
-
var
|
|
2678
|
-
|
|
2664
|
+
var promiseConstructorDetection = {
|
|
2665
|
+
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
2666
|
+
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
2667
|
+
SUBCLASSING: SUBCLASSING
|
|
2668
|
+
};
|
|
2679
2669
|
|
|
2680
|
-
|
|
2681
|
-
var $RegExp = global$2.RegExp;
|
|
2670
|
+
var newPromiseCapability$2 = {};
|
|
2682
2671
|
|
|
2683
|
-
var
|
|
2684
|
-
var re = $RegExp('(?<a>b)', 'g');
|
|
2685
|
-
return re.exec('b').groups.a !== 'b' ||
|
|
2686
|
-
'b'.replace(re, '$<a>c') !== 'bc';
|
|
2687
|
-
});
|
|
2672
|
+
var aCallable$4 = aCallable$8;
|
|
2688
2673
|
|
|
2689
|
-
|
|
2690
|
-
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
2691
|
-
var call$5 = functionCall;
|
|
2692
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
2693
|
-
var toString$3 = toString$4;
|
|
2694
|
-
var regexpFlags = regexpFlags$1;
|
|
2695
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
2696
|
-
var shared = shared$4;
|
|
2697
|
-
var create$2 = objectCreate;
|
|
2698
|
-
var getInternalState$1 = internalState.get;
|
|
2699
|
-
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
2700
|
-
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
2674
|
+
var $TypeError$2 = TypeError;
|
|
2701
2675
|
|
|
2702
|
-
var
|
|
2703
|
-
var
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2676
|
+
var PromiseCapability = function (C) {
|
|
2677
|
+
var resolve, reject;
|
|
2678
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
2679
|
+
if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
|
|
2680
|
+
resolve = $$resolve;
|
|
2681
|
+
reject = $$reject;
|
|
2682
|
+
});
|
|
2683
|
+
this.resolve = aCallable$4(resolve);
|
|
2684
|
+
this.reject = aCallable$4(reject);
|
|
2685
|
+
};
|
|
2709
2686
|
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
2716
|
-
})();
|
|
2687
|
+
// `NewPromiseCapability` abstract operation
|
|
2688
|
+
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
2689
|
+
newPromiseCapability$2.f = function (C) {
|
|
2690
|
+
return new PromiseCapability(C);
|
|
2691
|
+
};
|
|
2717
2692
|
|
|
2718
|
-
var
|
|
2693
|
+
var $$6 = _export;
|
|
2694
|
+
var IS_NODE = engineIsNode;
|
|
2695
|
+
var global$2 = global$l;
|
|
2696
|
+
var call$6 = functionCall;
|
|
2697
|
+
var defineBuiltIn$3 = defineBuiltIn$6;
|
|
2698
|
+
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
2699
|
+
var setToStringTag$3 = setToStringTag$4;
|
|
2700
|
+
var setSpecies = setSpecies$1;
|
|
2701
|
+
var aCallable$3 = aCallable$8;
|
|
2702
|
+
var isCallable$4 = isCallable$l;
|
|
2703
|
+
var isObject$2 = isObject$a;
|
|
2704
|
+
var anInstance = anInstance$1;
|
|
2705
|
+
var speciesConstructor = speciesConstructor$1;
|
|
2706
|
+
var task = task$1.set;
|
|
2707
|
+
var microtask = microtask_1;
|
|
2708
|
+
var hostReportErrors = hostReportErrors$1;
|
|
2709
|
+
var perform$2 = perform$3;
|
|
2710
|
+
var Queue = queue$1;
|
|
2711
|
+
var InternalStateModule$1 = internalState;
|
|
2712
|
+
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
2713
|
+
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
2714
|
+
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
2719
2715
|
|
|
2720
|
-
|
|
2721
|
-
var
|
|
2716
|
+
var PROMISE = 'Promise';
|
|
2717
|
+
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
2718
|
+
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
2719
|
+
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
2720
|
+
var getInternalPromiseState = InternalStateModule$1.getterFor(PROMISE);
|
|
2721
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
2722
|
+
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
2723
|
+
var PromiseConstructor = NativePromiseConstructor$2;
|
|
2724
|
+
var PromisePrototype = NativePromisePrototype$1;
|
|
2725
|
+
var TypeError$1 = global$2.TypeError;
|
|
2726
|
+
var document$1 = global$2.document;
|
|
2727
|
+
var process$1 = global$2.process;
|
|
2728
|
+
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
2729
|
+
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
2730
|
+
|
|
2731
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$2.dispatchEvent);
|
|
2732
|
+
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
2733
|
+
var REJECTION_HANDLED = 'rejectionhandled';
|
|
2734
|
+
var PENDING = 0;
|
|
2735
|
+
var FULFILLED = 1;
|
|
2736
|
+
var REJECTED = 2;
|
|
2737
|
+
var HANDLED = 1;
|
|
2738
|
+
var UNHANDLED = 2;
|
|
2739
|
+
|
|
2740
|
+
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
2741
|
+
|
|
2742
|
+
// helpers
|
|
2743
|
+
var isThenable = function (it) {
|
|
2744
|
+
var then;
|
|
2745
|
+
return isObject$2(it) && isCallable$4(then = it.then) ? then : false;
|
|
2746
|
+
};
|
|
2747
|
+
|
|
2748
|
+
var callReaction = function (reaction, state) {
|
|
2749
|
+
var value = state.value;
|
|
2750
|
+
var ok = state.state === FULFILLED;
|
|
2751
|
+
var handler = ok ? reaction.ok : reaction.fail;
|
|
2752
|
+
var resolve = reaction.resolve;
|
|
2753
|
+
var reject = reaction.reject;
|
|
2754
|
+
var domain = reaction.domain;
|
|
2755
|
+
var result, then, exited;
|
|
2756
|
+
try {
|
|
2757
|
+
if (handler) {
|
|
2758
|
+
if (!ok) {
|
|
2759
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
2760
|
+
state.rejection = HANDLED;
|
|
2761
|
+
}
|
|
2762
|
+
if (handler === true) result = value;
|
|
2763
|
+
else {
|
|
2764
|
+
if (domain) domain.enter();
|
|
2765
|
+
result = handler(value); // can throw
|
|
2766
|
+
if (domain) {
|
|
2767
|
+
domain.exit();
|
|
2768
|
+
exited = true;
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
if (result === reaction.promise) {
|
|
2772
|
+
reject(new TypeError$1('Promise-chain cycle'));
|
|
2773
|
+
} else if (then = isThenable(result)) {
|
|
2774
|
+
call$6(then, result, resolve, reject);
|
|
2775
|
+
} else resolve(result);
|
|
2776
|
+
} else reject(value);
|
|
2777
|
+
} catch (error) {
|
|
2778
|
+
if (domain && !exited) domain.exit();
|
|
2779
|
+
reject(error);
|
|
2780
|
+
}
|
|
2781
|
+
};
|
|
2722
2782
|
|
|
2723
|
-
var
|
|
2783
|
+
var notify = function (state, isReject) {
|
|
2784
|
+
if (state.notified) return;
|
|
2785
|
+
state.notified = true;
|
|
2786
|
+
microtask(function () {
|
|
2787
|
+
var reactions = state.reactions;
|
|
2788
|
+
var reaction;
|
|
2789
|
+
while (reaction = reactions.get()) {
|
|
2790
|
+
callReaction(reaction, state);
|
|
2791
|
+
}
|
|
2792
|
+
state.notified = false;
|
|
2793
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
2794
|
+
});
|
|
2795
|
+
};
|
|
2724
2796
|
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2797
|
+
var dispatchEvent = function (name, promise, reason) {
|
|
2798
|
+
var event, handler;
|
|
2799
|
+
if (DISPATCH_EVENT) {
|
|
2800
|
+
event = document$1.createEvent('Event');
|
|
2801
|
+
event.promise = promise;
|
|
2802
|
+
event.reason = reason;
|
|
2803
|
+
event.initEvent(name, false, true);
|
|
2804
|
+
global$2.dispatchEvent(event);
|
|
2805
|
+
} else event = { promise: promise, reason: reason };
|
|
2806
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$2['on' + name])) handler(event);
|
|
2807
|
+
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
2808
|
+
};
|
|
2732
2809
|
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2810
|
+
var onUnhandled = function (state) {
|
|
2811
|
+
call$6(task, global$2, function () {
|
|
2812
|
+
var promise = state.facade;
|
|
2813
|
+
var value = state.value;
|
|
2814
|
+
var IS_UNHANDLED = isUnhandled(state);
|
|
2815
|
+
var result;
|
|
2816
|
+
if (IS_UNHANDLED) {
|
|
2817
|
+
result = perform$2(function () {
|
|
2818
|
+
if (IS_NODE) {
|
|
2819
|
+
process$1.emit('unhandledRejection', value, promise);
|
|
2820
|
+
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2821
|
+
});
|
|
2822
|
+
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
2823
|
+
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
2824
|
+
if (result.error) throw result.value;
|
|
2738
2825
|
}
|
|
2826
|
+
});
|
|
2827
|
+
};
|
|
2739
2828
|
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
var source = re.source;
|
|
2744
|
-
var charsAdded = 0;
|
|
2745
|
-
var strCopy = str;
|
|
2746
|
-
|
|
2747
|
-
if (sticky) {
|
|
2748
|
-
flags = replace$1(flags, 'y', '');
|
|
2749
|
-
if (indexOf(flags, 'g') === -1) {
|
|
2750
|
-
flags += 'g';
|
|
2751
|
-
}
|
|
2829
|
+
var isUnhandled = function (state) {
|
|
2830
|
+
return state.rejection !== HANDLED && !state.parent;
|
|
2831
|
+
};
|
|
2752
2832
|
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
// simulate the 'y' flag.
|
|
2762
|
-
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
2763
|
-
}
|
|
2833
|
+
var onHandleUnhandled = function (state) {
|
|
2834
|
+
call$6(task, global$2, function () {
|
|
2835
|
+
var promise = state.facade;
|
|
2836
|
+
if (IS_NODE) {
|
|
2837
|
+
process$1.emit('rejectionHandled', promise);
|
|
2838
|
+
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2839
|
+
});
|
|
2840
|
+
};
|
|
2764
2841
|
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2842
|
+
var bind$1 = function (fn, state, unwrap) {
|
|
2843
|
+
return function (value) {
|
|
2844
|
+
fn(state, value, unwrap);
|
|
2845
|
+
};
|
|
2846
|
+
};
|
|
2769
2847
|
|
|
2770
|
-
|
|
2848
|
+
var internalReject = function (state, value, unwrap) {
|
|
2849
|
+
if (state.done) return;
|
|
2850
|
+
state.done = true;
|
|
2851
|
+
if (unwrap) state = unwrap;
|
|
2852
|
+
state.value = value;
|
|
2853
|
+
state.state = REJECTED;
|
|
2854
|
+
notify(state, true);
|
|
2855
|
+
};
|
|
2771
2856
|
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2857
|
+
var internalResolve = function (state, value, unwrap) {
|
|
2858
|
+
if (state.done) return;
|
|
2859
|
+
state.done = true;
|
|
2860
|
+
if (unwrap) state = unwrap;
|
|
2861
|
+
try {
|
|
2862
|
+
if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
|
|
2863
|
+
var then = isThenable(value);
|
|
2864
|
+
if (then) {
|
|
2865
|
+
microtask(function () {
|
|
2866
|
+
var wrapper = { done: false };
|
|
2867
|
+
try {
|
|
2868
|
+
call$6(then, value,
|
|
2869
|
+
bind$1(internalResolve, wrapper, state),
|
|
2870
|
+
bind$1(internalReject, wrapper, state)
|
|
2871
|
+
);
|
|
2872
|
+
} catch (error) {
|
|
2873
|
+
internalReject(wrapper, error, state);
|
|
2788
2874
|
}
|
|
2789
2875
|
});
|
|
2876
|
+
} else {
|
|
2877
|
+
state.value = value;
|
|
2878
|
+
state.state = FULFILLED;
|
|
2879
|
+
notify(state, false);
|
|
2790
2880
|
}
|
|
2881
|
+
} catch (error) {
|
|
2882
|
+
internalReject({ done: false }, error, state);
|
|
2883
|
+
}
|
|
2884
|
+
};
|
|
2791
2885
|
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2886
|
+
// constructor polyfill
|
|
2887
|
+
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
2888
|
+
// 25.4.3.1 Promise(executor)
|
|
2889
|
+
PromiseConstructor = function Promise(executor) {
|
|
2890
|
+
anInstance(this, PromisePrototype);
|
|
2891
|
+
aCallable$3(executor);
|
|
2892
|
+
call$6(Internal, this);
|
|
2893
|
+
var state = getInternalPromiseState(this);
|
|
2894
|
+
try {
|
|
2895
|
+
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
2896
|
+
} catch (error) {
|
|
2897
|
+
internalReject(state, error);
|
|
2798
2898
|
}
|
|
2799
|
-
|
|
2800
|
-
return match;
|
|
2801
2899
|
};
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
var regexpExec$2 = patchedExec;
|
|
2805
2900
|
|
|
2806
|
-
|
|
2807
|
-
var exec = regexpExec$2;
|
|
2901
|
+
PromisePrototype = PromiseConstructor.prototype;
|
|
2808
2902
|
|
|
2809
|
-
// `
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2903
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2904
|
+
Internal = function Promise(executor) {
|
|
2905
|
+
setInternalState$1(this, {
|
|
2906
|
+
type: PROMISE,
|
|
2907
|
+
done: false,
|
|
2908
|
+
notified: false,
|
|
2909
|
+
parent: false,
|
|
2910
|
+
reactions: new Queue(),
|
|
2911
|
+
rejection: false,
|
|
2912
|
+
state: PENDING,
|
|
2913
|
+
value: undefined
|
|
2914
|
+
});
|
|
2915
|
+
};
|
|
2814
2916
|
|
|
2815
|
-
//
|
|
2917
|
+
// `Promise.prototype.then` method
|
|
2918
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
2919
|
+
Internal.prototype = defineBuiltIn$3(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
2920
|
+
var state = getInternalPromiseState(this);
|
|
2921
|
+
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
2922
|
+
state.parent = true;
|
|
2923
|
+
reaction.ok = isCallable$4(onFulfilled) ? onFulfilled : true;
|
|
2924
|
+
reaction.fail = isCallable$4(onRejected) && onRejected;
|
|
2925
|
+
reaction.domain = IS_NODE ? process$1.domain : undefined;
|
|
2926
|
+
if (state.state === PENDING) state.reactions.add(reaction);
|
|
2927
|
+
else microtask(function () {
|
|
2928
|
+
callReaction(reaction, state);
|
|
2929
|
+
});
|
|
2930
|
+
return reaction.promise;
|
|
2931
|
+
});
|
|
2816
2932
|
|
|
2817
|
-
|
|
2818
|
-
var
|
|
2819
|
-
var
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2933
|
+
OwnPromiseCapability = function () {
|
|
2934
|
+
var promise = new Internal();
|
|
2935
|
+
var state = getInternalPromiseState(promise);
|
|
2936
|
+
this.promise = promise;
|
|
2937
|
+
this.resolve = bind$1(internalResolve, state);
|
|
2938
|
+
this.reject = bind$1(internalReject, state);
|
|
2939
|
+
};
|
|
2823
2940
|
|
|
2824
|
-
|
|
2825
|
-
|
|
2941
|
+
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
2942
|
+
return C === PromiseConstructor || C === PromiseWrapper
|
|
2943
|
+
? new OwnPromiseCapability(C)
|
|
2944
|
+
: newGenericPromiseCapability(C);
|
|
2945
|
+
};
|
|
2826
2946
|
|
|
2827
|
-
|
|
2828
|
-
|
|
2947
|
+
if (isCallable$4(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
2948
|
+
nativeThen = NativePromisePrototype$1.then;
|
|
2829
2949
|
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2950
|
+
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
2951
|
+
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
2952
|
+
defineBuiltIn$3(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2953
|
+
var that = this;
|
|
2954
|
+
return new PromiseConstructor(function (resolve, reject) {
|
|
2955
|
+
call$6(nativeThen, that, resolve, reject);
|
|
2956
|
+
}).then(onFulfilled, onRejected);
|
|
2957
|
+
// https://github.com/zloirock/core-js/issues/640
|
|
2958
|
+
}, { unsafe: true });
|
|
2959
|
+
}
|
|
2836
2960
|
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2961
|
+
// make `.constructor === Promise` work for native promise-based APIs
|
|
2962
|
+
try {
|
|
2963
|
+
delete NativePromisePrototype$1.constructor;
|
|
2964
|
+
} catch (error) { /* empty */ }
|
|
2841
2965
|
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
// https://github.com/zloirock/core-js/issues/306
|
|
2846
|
-
re = {};
|
|
2847
|
-
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
2848
|
-
// a new one. We need to return the patched regex when creating the new one.
|
|
2849
|
-
re.constructor = {};
|
|
2850
|
-
re.constructor[SPECIES] = function () { return re; };
|
|
2851
|
-
re.flags = '';
|
|
2852
|
-
re[SYMBOL] = /./[SYMBOL];
|
|
2966
|
+
// make `instanceof Promise` work for native promise-based APIs
|
|
2967
|
+
if (setPrototypeOf$1) {
|
|
2968
|
+
setPrototypeOf$1(NativePromisePrototype$1, PromisePrototype);
|
|
2853
2969
|
}
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2854
2972
|
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
};
|
|
2973
|
+
$$6({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
2974
|
+
Promise: PromiseConstructor
|
|
2975
|
+
});
|
|
2859
2976
|
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
});
|
|
2977
|
+
setToStringTag$3(PromiseConstructor, PROMISE, false);
|
|
2978
|
+
setSpecies(PROMISE);
|
|
2863
2979
|
|
|
2864
|
-
|
|
2865
|
-
!DELEGATES_TO_SYMBOL ||
|
|
2866
|
-
!DELEGATES_TO_EXEC ||
|
|
2867
|
-
FORCED
|
|
2868
|
-
) {
|
|
2869
|
-
var nativeRegExpMethod = /./[SYMBOL];
|
|
2870
|
-
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
2871
|
-
var $exec = regexp.exec;
|
|
2872
|
-
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
2873
|
-
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
2874
|
-
// The native String method already delegates to @@method (this
|
|
2875
|
-
// polyfilled function), leasing to infinite recursion.
|
|
2876
|
-
// We avoid it by directly calling the native @@method method.
|
|
2877
|
-
return { done: true, value: call$4(nativeRegExpMethod, regexp, str, arg2) };
|
|
2878
|
-
}
|
|
2879
|
-
return { done: true, value: call$4(nativeMethod, str, regexp, arg2) };
|
|
2880
|
-
}
|
|
2881
|
-
return { done: false };
|
|
2882
|
-
});
|
|
2980
|
+
var iterators = {};
|
|
2883
2981
|
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
}
|
|
2982
|
+
var wellKnownSymbol$6 = wellKnownSymbol$g;
|
|
2983
|
+
var Iterators$4 = iterators;
|
|
2887
2984
|
|
|
2888
|
-
|
|
2985
|
+
var ITERATOR$5 = wellKnownSymbol$6('iterator');
|
|
2986
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
2987
|
+
|
|
2988
|
+
// check on default Array iterator
|
|
2989
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
2990
|
+
return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$5] === it);
|
|
2889
2991
|
};
|
|
2890
2992
|
|
|
2891
|
-
var
|
|
2892
|
-
var
|
|
2893
|
-
var
|
|
2894
|
-
var
|
|
2993
|
+
var classof = classof$5;
|
|
2994
|
+
var getMethod$1 = getMethod$5;
|
|
2995
|
+
var isNullOrUndefined = isNullOrUndefined$6;
|
|
2996
|
+
var Iterators$3 = iterators;
|
|
2997
|
+
var wellKnownSymbol$5 = wellKnownSymbol$g;
|
|
2895
2998
|
|
|
2896
|
-
var
|
|
2897
|
-
var charCodeAt = uncurryThis$2(''.charCodeAt);
|
|
2898
|
-
var stringSlice$2 = uncurryThis$2(''.slice);
|
|
2999
|
+
var ITERATOR$4 = wellKnownSymbol$5('iterator');
|
|
2899
3000
|
|
|
2900
|
-
var
|
|
2901
|
-
return
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
var size = S.length;
|
|
2905
|
-
var first, second;
|
|
2906
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
2907
|
-
first = charCodeAt(S, position);
|
|
2908
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
2909
|
-
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
2910
|
-
? CONVERT_TO_STRING
|
|
2911
|
-
? charAt$2(S, position)
|
|
2912
|
-
: first
|
|
2913
|
-
: CONVERT_TO_STRING
|
|
2914
|
-
? stringSlice$2(S, position, position + 2)
|
|
2915
|
-
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
2916
|
-
};
|
|
3001
|
+
var getIteratorMethod$2 = function (it) {
|
|
3002
|
+
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$4)
|
|
3003
|
+
|| getMethod$1(it, '@@iterator')
|
|
3004
|
+
|| Iterators$3[classof(it)];
|
|
2917
3005
|
};
|
|
2918
3006
|
|
|
2919
|
-
var
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
|
2925
|
-
charAt: createMethod(true)
|
|
2926
|
-
};
|
|
3007
|
+
var call$5 = functionCall;
|
|
3008
|
+
var aCallable$2 = aCallable$8;
|
|
3009
|
+
var anObject$3 = anObject$d;
|
|
3010
|
+
var tryToString$1 = tryToString$4;
|
|
3011
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
2927
3012
|
|
|
2928
|
-
var
|
|
3013
|
+
var $TypeError$1 = TypeError;
|
|
2929
3014
|
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3015
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
3016
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
3017
|
+
if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
|
|
3018
|
+
throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
2934
3019
|
};
|
|
2935
3020
|
|
|
2936
|
-
var
|
|
2937
|
-
var
|
|
2938
|
-
|
|
2939
|
-
var floor = Math.floor;
|
|
2940
|
-
var charAt = uncurryThis$1(''.charAt);
|
|
2941
|
-
var replace = uncurryThis$1(''.replace);
|
|
2942
|
-
var stringSlice$1 = uncurryThis$1(''.slice);
|
|
2943
|
-
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
2944
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
2945
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
3021
|
+
var call$4 = functionCall;
|
|
3022
|
+
var anObject$2 = anObject$d;
|
|
3023
|
+
var getMethod = getMethod$5;
|
|
2946
3024
|
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
|
2956
|
-
}
|
|
2957
|
-
return replace(replacement, symbols, function (match, ch) {
|
|
2958
|
-
var capture;
|
|
2959
|
-
switch (charAt(ch, 0)) {
|
|
2960
|
-
case '$': return '$';
|
|
2961
|
-
case '&': return matched;
|
|
2962
|
-
case '`': return stringSlice$1(str, 0, position);
|
|
2963
|
-
case "'": return stringSlice$1(str, tailPos);
|
|
2964
|
-
case '<':
|
|
2965
|
-
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
|
2966
|
-
break;
|
|
2967
|
-
default: // \d\d?
|
|
2968
|
-
var n = +ch;
|
|
2969
|
-
if (n === 0) return match;
|
|
2970
|
-
if (n > m) {
|
|
2971
|
-
var f = floor(n / 10);
|
|
2972
|
-
if (f === 0) return match;
|
|
2973
|
-
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
2974
|
-
return match;
|
|
2975
|
-
}
|
|
2976
|
-
capture = captures[n - 1];
|
|
3025
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
3026
|
+
var innerResult, innerError;
|
|
3027
|
+
anObject$2(iterator);
|
|
3028
|
+
try {
|
|
3029
|
+
innerResult = getMethod(iterator, 'return');
|
|
3030
|
+
if (!innerResult) {
|
|
3031
|
+
if (kind === 'throw') throw value;
|
|
3032
|
+
return value;
|
|
2977
3033
|
}
|
|
2978
|
-
|
|
2979
|
-
})
|
|
3034
|
+
innerResult = call$4(innerResult, iterator);
|
|
3035
|
+
} catch (error) {
|
|
3036
|
+
innerError = true;
|
|
3037
|
+
innerResult = error;
|
|
3038
|
+
}
|
|
3039
|
+
if (kind === 'throw') throw value;
|
|
3040
|
+
if (innerError) throw innerResult;
|
|
3041
|
+
anObject$2(innerResult);
|
|
3042
|
+
return value;
|
|
2980
3043
|
};
|
|
2981
3044
|
|
|
3045
|
+
var bind = functionBindContext;
|
|
2982
3046
|
var call$3 = functionCall;
|
|
2983
|
-
var anObject$
|
|
2984
|
-
var
|
|
2985
|
-
var
|
|
2986
|
-
var
|
|
3047
|
+
var anObject$1 = anObject$d;
|
|
3048
|
+
var tryToString = tryToString$4;
|
|
3049
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
3050
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
3051
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
3052
|
+
var getIterator = getIterator$1;
|
|
3053
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
3054
|
+
var iteratorClose = iteratorClose$1;
|
|
2987
3055
|
|
|
2988
3056
|
var $TypeError = TypeError;
|
|
2989
3057
|
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
3058
|
+
var Result = function (stopped, result) {
|
|
3059
|
+
this.stopped = stopped;
|
|
3060
|
+
this.result = result;
|
|
3061
|
+
};
|
|
3062
|
+
|
|
3063
|
+
var ResultPrototype = Result.prototype;
|
|
3064
|
+
|
|
3065
|
+
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
3066
|
+
var that = options && options.that;
|
|
3067
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
3068
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
3069
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
3070
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
3071
|
+
var fn = bind(unboundFunction, that);
|
|
3072
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
3073
|
+
|
|
3074
|
+
var stop = function (condition) {
|
|
3075
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
3076
|
+
return new Result(true, condition);
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3079
|
+
var callFn = function (value) {
|
|
3080
|
+
if (AS_ENTRIES) {
|
|
3081
|
+
anObject$1(value);
|
|
3082
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
3083
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
3084
|
+
};
|
|
3085
|
+
|
|
3086
|
+
if (IS_RECORD) {
|
|
3087
|
+
iterator = iterable.iterator;
|
|
3088
|
+
} else if (IS_ITERATOR) {
|
|
3089
|
+
iterator = iterable;
|
|
3090
|
+
} else {
|
|
3091
|
+
iterFn = getIteratorMethod(iterable);
|
|
3092
|
+
if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
|
|
3093
|
+
// optimisation for array iterators
|
|
3094
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
3095
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
3096
|
+
result = callFn(iterable[index]);
|
|
3097
|
+
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
3098
|
+
} return new Result(false);
|
|
3099
|
+
}
|
|
3100
|
+
iterator = getIterator(iterable, iterFn);
|
|
2998
3101
|
}
|
|
2999
|
-
|
|
3000
|
-
|
|
3102
|
+
|
|
3103
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
3104
|
+
while (!(step = call$3(next, iterator)).done) {
|
|
3105
|
+
try {
|
|
3106
|
+
result = callFn(step.value);
|
|
3107
|
+
} catch (error) {
|
|
3108
|
+
iteratorClose(iterator, 'throw', error);
|
|
3109
|
+
}
|
|
3110
|
+
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
3111
|
+
} return new Result(false);
|
|
3001
3112
|
};
|
|
3002
3113
|
|
|
3003
|
-
var apply = functionApply;
|
|
3004
|
-
var call$2 = functionCall;
|
|
3005
|
-
var uncurryThis = functionUncurryThis;
|
|
3006
|
-
var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
|
|
3007
|
-
var fails$2 = fails$i;
|
|
3008
|
-
var anObject$1 = anObject$d;
|
|
3009
|
-
var isCallable$3 = isCallable$l;
|
|
3010
|
-
var isNullOrUndefined$1 = isNullOrUndefined$6;
|
|
3011
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
3012
|
-
var toLength = toLength$2;
|
|
3013
|
-
var toString$1 = toString$4;
|
|
3014
|
-
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
3015
|
-
var advanceStringIndex = advanceStringIndex$1;
|
|
3016
|
-
var getMethod$1 = getMethod$5;
|
|
3017
|
-
var getSubstitution = getSubstitution$1;
|
|
3018
|
-
var regExpExec$1 = regexpExecAbstract;
|
|
3019
3114
|
var wellKnownSymbol$4 = wellKnownSymbol$g;
|
|
3020
3115
|
|
|
3021
|
-
var
|
|
3022
|
-
var
|
|
3023
|
-
var min = Math.min;
|
|
3024
|
-
var concat = uncurryThis([].concat);
|
|
3025
|
-
var push = uncurryThis([].push);
|
|
3026
|
-
var stringIndexOf = uncurryThis(''.indexOf);
|
|
3027
|
-
var stringSlice = uncurryThis(''.slice);
|
|
3116
|
+
var ITERATOR$3 = wellKnownSymbol$4('iterator');
|
|
3117
|
+
var SAFE_CLOSING = false;
|
|
3028
3118
|
|
|
3029
|
-
|
|
3030
|
-
|
|
3119
|
+
try {
|
|
3120
|
+
var called = 0;
|
|
3121
|
+
var iteratorWithReturn = {
|
|
3122
|
+
next: function () {
|
|
3123
|
+
return { done: !!called++ };
|
|
3124
|
+
},
|
|
3125
|
+
'return': function () {
|
|
3126
|
+
SAFE_CLOSING = true;
|
|
3127
|
+
}
|
|
3128
|
+
};
|
|
3129
|
+
iteratorWithReturn[ITERATOR$3] = function () {
|
|
3130
|
+
return this;
|
|
3131
|
+
};
|
|
3132
|
+
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
3133
|
+
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
3134
|
+
} catch (error) { /* empty */ }
|
|
3135
|
+
|
|
3136
|
+
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
3137
|
+
try {
|
|
3138
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
3139
|
+
} catch (error) { return false; } // workaround of old WebKit + `eval` bug
|
|
3140
|
+
var ITERATION_SUPPORT = false;
|
|
3141
|
+
try {
|
|
3142
|
+
var object = {};
|
|
3143
|
+
object[ITERATOR$3] = function () {
|
|
3144
|
+
return {
|
|
3145
|
+
next: function () {
|
|
3146
|
+
return { done: ITERATION_SUPPORT = true };
|
|
3147
|
+
}
|
|
3148
|
+
};
|
|
3149
|
+
};
|
|
3150
|
+
exec(object);
|
|
3151
|
+
} catch (error) { /* empty */ }
|
|
3152
|
+
return ITERATION_SUPPORT;
|
|
3031
3153
|
};
|
|
3032
3154
|
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
var
|
|
3036
|
-
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
3037
|
-
return 'a'.replace(/./, '$0') === '$0';
|
|
3038
|
-
})();
|
|
3039
|
-
|
|
3040
|
-
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
3041
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
3042
|
-
if (/./[REPLACE]) {
|
|
3043
|
-
return /./[REPLACE]('a', '$0') === '';
|
|
3044
|
-
}
|
|
3045
|
-
return false;
|
|
3046
|
-
})();
|
|
3155
|
+
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
3156
|
+
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
3157
|
+
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3047
3158
|
|
|
3048
|
-
var
|
|
3049
|
-
|
|
3050
|
-
re.exec = function () {
|
|
3051
|
-
var result = [];
|
|
3052
|
-
result.groups = { a: '7' };
|
|
3053
|
-
return result;
|
|
3054
|
-
};
|
|
3055
|
-
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
3056
|
-
return ''.replace(re, '$<a>') !== '7';
|
|
3159
|
+
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
3160
|
+
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
3057
3161
|
});
|
|
3058
3162
|
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3163
|
+
var $$5 = _export;
|
|
3164
|
+
var call$2 = functionCall;
|
|
3165
|
+
var aCallable$1 = aCallable$8;
|
|
3166
|
+
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
3167
|
+
var perform$1 = perform$3;
|
|
3168
|
+
var iterate$1 = iterate$2;
|
|
3169
|
+
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
3062
3170
|
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3171
|
+
// `Promise.all` method
|
|
3172
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
3173
|
+
$$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
3174
|
+
all: function all(iterable) {
|
|
3175
|
+
var C = this;
|
|
3176
|
+
var capability = newPromiseCapabilityModule$2.f(C);
|
|
3177
|
+
var resolve = capability.resolve;
|
|
3178
|
+
var reject = capability.reject;
|
|
3179
|
+
var result = perform$1(function () {
|
|
3180
|
+
var $promiseResolve = aCallable$1(C.resolve);
|
|
3181
|
+
var values = [];
|
|
3182
|
+
var counter = 0;
|
|
3183
|
+
var remaining = 1;
|
|
3184
|
+
iterate$1(iterable, function (promise) {
|
|
3185
|
+
var index = counter++;
|
|
3186
|
+
var alreadyCalled = false;
|
|
3187
|
+
remaining++;
|
|
3188
|
+
call$2($promiseResolve, C, promise).then(function (value) {
|
|
3189
|
+
if (alreadyCalled) return;
|
|
3190
|
+
alreadyCalled = true;
|
|
3191
|
+
values[index] = value;
|
|
3192
|
+
--remaining || resolve(values);
|
|
3193
|
+
}, reject);
|
|
3194
|
+
});
|
|
3195
|
+
--remaining || resolve(values);
|
|
3196
|
+
});
|
|
3197
|
+
if (result.error) reject(result.value);
|
|
3198
|
+
return capability.promise;
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
3078
3201
|
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
if (res.done) return res.value;
|
|
3086
|
-
}
|
|
3202
|
+
var $$4 = _export;
|
|
3203
|
+
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3204
|
+
var NativePromiseConstructor = promiseNativeConstructor;
|
|
3205
|
+
var getBuiltIn$1 = getBuiltIn$7;
|
|
3206
|
+
var isCallable$3 = isCallable$l;
|
|
3207
|
+
var defineBuiltIn$2 = defineBuiltIn$6;
|
|
3087
3208
|
|
|
3088
|
-
|
|
3089
|
-
if (!functionalReplace) replaceValue = toString$1(replaceValue);
|
|
3209
|
+
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
3090
3210
|
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3211
|
+
// `Promise.prototype.catch` method
|
|
3212
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
3213
|
+
$$4({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
3214
|
+
'catch': function (onRejected) {
|
|
3215
|
+
return this.then(undefined, onRejected);
|
|
3216
|
+
}
|
|
3217
|
+
});
|
|
3097
3218
|
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3219
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
3220
|
+
if (isCallable$3(NativePromiseConstructor)) {
|
|
3221
|
+
var method = getBuiltIn$1('Promise').prototype['catch'];
|
|
3222
|
+
if (NativePromisePrototype['catch'] !== method) {
|
|
3223
|
+
defineBuiltIn$2(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3103
3226
|
|
|
3104
|
-
|
|
3105
|
-
|
|
3227
|
+
var $$3 = _export;
|
|
3228
|
+
var call$1 = functionCall;
|
|
3229
|
+
var aCallable = aCallable$8;
|
|
3230
|
+
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
3231
|
+
var perform = perform$3;
|
|
3232
|
+
var iterate = iterate$2;
|
|
3233
|
+
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
3106
3234
|
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3235
|
+
// `Promise.race` method
|
|
3236
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
3237
|
+
$$3({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
3238
|
+
race: function race(iterable) {
|
|
3239
|
+
var C = this;
|
|
3240
|
+
var capability = newPromiseCapabilityModule$1.f(C);
|
|
3241
|
+
var reject = capability.reject;
|
|
3242
|
+
var result = perform(function () {
|
|
3243
|
+
var $promiseResolve = aCallable(C.resolve);
|
|
3244
|
+
iterate(iterable, function (promise) {
|
|
3245
|
+
call$1($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
3246
|
+
});
|
|
3247
|
+
});
|
|
3248
|
+
if (result.error) reject(result.value);
|
|
3249
|
+
return capability.promise;
|
|
3250
|
+
}
|
|
3251
|
+
});
|
|
3110
3252
|
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
result = results[i];
|
|
3253
|
+
var $$2 = _export;
|
|
3254
|
+
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
3255
|
+
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3115
3256
|
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
var namedCaptures = result.groups;
|
|
3127
|
-
if (functionalReplace) {
|
|
3128
|
-
var replacerArgs = concat([matched], captures, position, S);
|
|
3129
|
-
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
3130
|
-
replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
|
|
3131
|
-
} else {
|
|
3132
|
-
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
3133
|
-
}
|
|
3134
|
-
if (position >= nextSourcePosition) {
|
|
3135
|
-
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
3136
|
-
nextSourcePosition = position + matched.length;
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3257
|
+
// `Promise.reject` method
|
|
3258
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
3259
|
+
$$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
3260
|
+
reject: function reject(r) {
|
|
3261
|
+
var capability = newPromiseCapabilityModule.f(this);
|
|
3262
|
+
var capabilityReject = capability.reject;
|
|
3263
|
+
capabilityReject(r);
|
|
3264
|
+
return capability.promise;
|
|
3265
|
+
}
|
|
3266
|
+
});
|
|
3139
3267
|
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
3268
|
+
var anObject = anObject$d;
|
|
3269
|
+
var isObject$1 = isObject$a;
|
|
3270
|
+
var newPromiseCapability = newPromiseCapability$2;
|
|
3144
3271
|
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
var
|
|
3149
|
-
|
|
3150
|
-
|
|
3272
|
+
var promiseResolve$1 = function (C, x) {
|
|
3273
|
+
anObject(C);
|
|
3274
|
+
if (isObject$1(x) && x.constructor === C) return x;
|
|
3275
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
3276
|
+
var resolve = promiseCapability.resolve;
|
|
3277
|
+
resolve(x);
|
|
3278
|
+
return promiseCapability.promise;
|
|
3151
3279
|
};
|
|
3152
3280
|
|
|
3153
|
-
var
|
|
3154
|
-
var
|
|
3155
|
-
var
|
|
3156
|
-
var
|
|
3157
|
-
var requireObjectCoercible = requireObjectCoercible$6;
|
|
3158
|
-
var sameValue = sameValue$1;
|
|
3159
|
-
var toString = toString$4;
|
|
3160
|
-
var getMethod = getMethod$5;
|
|
3161
|
-
var regExpExec = regexpExecAbstract;
|
|
3162
|
-
|
|
3163
|
-
// @@search logic
|
|
3164
|
-
fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
|
|
3165
|
-
return [
|
|
3166
|
-
// `String.prototype.search` method
|
|
3167
|
-
// https://tc39.es/ecma262/#sec-string.prototype.search
|
|
3168
|
-
function search(regexp) {
|
|
3169
|
-
var O = requireObjectCoercible(this);
|
|
3170
|
-
var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
|
|
3171
|
-
return searcher ? call$1(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
|
|
3172
|
-
},
|
|
3173
|
-
// `RegExp.prototype[@@search]` method
|
|
3174
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
|
3175
|
-
function (string) {
|
|
3176
|
-
var rx = anObject(this);
|
|
3177
|
-
var S = toString(string);
|
|
3178
|
-
var res = maybeCallNative(nativeSearch, rx, S);
|
|
3281
|
+
var $$1 = _export;
|
|
3282
|
+
var getBuiltIn = getBuiltIn$7;
|
|
3283
|
+
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
3284
|
+
var promiseResolve = promiseResolve$1;
|
|
3179
3285
|
|
|
3180
|
-
|
|
3286
|
+
getBuiltIn('Promise');
|
|
3181
3287
|
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
];
|
|
3288
|
+
// `Promise.resolve` method
|
|
3289
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
3290
|
+
$$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
3291
|
+
resolve: function resolve(x) {
|
|
3292
|
+
return promiseResolve(this, x);
|
|
3293
|
+
}
|
|
3189
3294
|
});
|
|
3190
3295
|
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3296
|
+
const handleHandler = ({
|
|
3297
|
+
networkError,
|
|
3298
|
+
graphQLErrors
|
|
3299
|
+
}) => {
|
|
3300
|
+
if (networkError && networkError.statusCode === 401) {
|
|
3301
|
+
// redirect to login page
|
|
3302
|
+
if (typeof window !== 'undefined' && window.location.pathname !== '/account/login') {
|
|
3303
|
+
return window.location.replace('/account/login');
|
|
3304
|
+
}
|
|
3305
|
+
} else if (networkError
|
|
3306
|
+
// &&
|
|
3307
|
+
// ((networkError as ServerError).statusCode > 500 &&
|
|
3308
|
+
// (networkError as ServerError).statusCode !== 503) commented out to include 400 errors
|
|
3309
|
+
) {
|
|
3310
|
+
if (typeof window !== 'undefined' && window.location.pathname !== '/error') {
|
|
3311
|
+
return window.location.replace('/error?message=' + networkError.message);
|
|
3200
3312
|
}
|
|
3201
|
-
return m;
|
|
3202
|
-
}
|
|
3203
|
-
return {};
|
|
3204
|
-
}
|
|
3205
|
-
function initBackendsLocations() {
|
|
3206
|
-
params = loadParams();
|
|
3207
|
-
api = params['api'];
|
|
3208
|
-
if (typeof window !== 'undefined' && window.location) {
|
|
3209
|
-
currentUrl = window.location.href;
|
|
3210
|
-
}
|
|
3211
|
-
switch (api) {
|
|
3212
|
-
case 'prod':
|
|
3213
|
-
dBackend = 'https://query.bcrumbs.net';
|
|
3214
|
-
frontend = 'https://app.bcrumbs.net';
|
|
3215
|
-
apiBackend = 'https://api.bcrumbs.net';
|
|
3216
|
-
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
3217
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3218
|
-
break;
|
|
3219
|
-
case 'test':
|
|
3220
|
-
dBackend = 'https://query.bcrumbs.net';
|
|
3221
|
-
frontend = 'https://dev.bcrumbs.net';
|
|
3222
|
-
apiBackend = 'https://api.bcrumbs.net';
|
|
3223
|
-
apiV2Backend = 'apiv2-dev.bcrumbs.net';
|
|
3224
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3225
|
-
break;
|
|
3226
|
-
case 'local':
|
|
3227
|
-
dBackend = 'https://localhost:44322';
|
|
3228
|
-
frontend = 'http://localhost:4200';
|
|
3229
|
-
apiBackend = 'http://localhost:6085';
|
|
3230
|
-
apiV2Backend = 'https://apiv2-dev.bcrumbs.net';
|
|
3231
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3232
|
-
break;
|
|
3233
|
-
default:
|
|
3234
|
-
if (currentUrl && currentUrl.indexOf('localhost') > -1) {
|
|
3235
|
-
dBackend = 'https://query.bcrumbs.net';
|
|
3236
|
-
frontend = 'http://localhost:4200';
|
|
3237
|
-
apiBackend = 'https://api.bcrumbs.net';
|
|
3238
|
-
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
3239
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3240
|
-
} else if (currentUrl && currentUrl.indexOf('dconfig.com') > -1) {
|
|
3241
|
-
dBackend = 'https://query.bcrumbs.net';
|
|
3242
|
-
frontend = 'https://app.bcrumbs.net';
|
|
3243
|
-
apiBackend = 'https://api.bcrumbs.net';
|
|
3244
|
-
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
3245
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3246
|
-
} else if (currentUrl && currentUrl.indexOf('dev.bcrumbs.net') > -1) {
|
|
3247
|
-
dBackend = 'https://query.bcrumbs.net';
|
|
3248
|
-
frontend = 'https://dev.bcrumbs.net';
|
|
3249
|
-
apiBackend = 'https://api.bcrumbs.net';
|
|
3250
|
-
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
3251
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3252
|
-
} else {
|
|
3253
|
-
dBackend = 'https://query.bcrumbs.net';
|
|
3254
|
-
frontend = 'https://app.bcrumbs.net';
|
|
3255
|
-
apiBackend = 'https://api.bcrumbs.net';
|
|
3256
|
-
apiV2Backend = 'https://apiv2.bcrumbs.net';
|
|
3257
|
-
showcaseRenderer = 'https://test-showcase.bcrumbs.net';
|
|
3258
|
-
}
|
|
3259
|
-
break;
|
|
3260
3313
|
}
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
dconfig: {
|
|
3273
|
-
networkInterface: apiBackend
|
|
3274
|
-
},
|
|
3275
|
-
dquery: {
|
|
3276
|
-
networkInterface: dBackend + '/graphql'
|
|
3277
|
-
},
|
|
3278
|
-
showcase: {
|
|
3279
|
-
networkInterface: showcaseRenderer
|
|
3280
|
-
},
|
|
3281
|
-
billing: {
|
|
3282
|
-
networkInterface: apiV2Backend + '/billing'
|
|
3283
|
-
},
|
|
3284
|
-
core: {
|
|
3285
|
-
networkInterface: apiV2Backend + '/core'
|
|
3286
|
-
},
|
|
3287
|
-
bot: {
|
|
3288
|
-
networkInterface: apiV2Backend + '/bot'
|
|
3289
|
-
},
|
|
3290
|
-
// sw path
|
|
3291
|
-
sw: {
|
|
3292
|
-
path: 'assets/sw.js'
|
|
3314
|
+
if (graphQLErrors && graphQLErrors.find(error => {
|
|
3315
|
+
var _a;
|
|
3316
|
+
return ((_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a['code']) === 'FORBIDDEN';
|
|
3317
|
+
})) {
|
|
3318
|
+
const error = graphQLErrors.find(error => {
|
|
3319
|
+
var _a;
|
|
3320
|
+
return ((_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a['code']) === 'FORBIDDEN';
|
|
3321
|
+
});
|
|
3322
|
+
if (typeof window !== 'undefined' && window.location.pathname !== '/403') {
|
|
3323
|
+
return window.location.replace('/403?message=' + (error === null || error === void 0 ? void 0 : error.message));
|
|
3324
|
+
}
|
|
3293
3325
|
}
|
|
3294
3326
|
};
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3327
|
+
const handleAuth = (operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
|
|
3328
|
+
headers
|
|
3329
|
+
}) {
|
|
3330
|
+
const currentUsertoken = yield getUserToken();
|
|
3331
|
+
const isAPIKey = (currentUsertoken === null || currentUsertoken === void 0 ? void 0 : currentUsertoken.length) === 36;
|
|
3332
|
+
if (headers === undefined) {
|
|
3333
|
+
headers = {};
|
|
3334
|
+
}
|
|
3335
|
+
const resultHeaders = currentUsertoken ? {
|
|
3336
|
+
headers: Object.assign(Object.assign({}, headers), {
|
|
3337
|
+
Accept: 'application/json',
|
|
3338
|
+
Authorization: isAPIKey ? currentUsertoken : `Bearer ${currentUsertoken}`
|
|
3339
|
+
})
|
|
3340
|
+
} : {
|
|
3341
|
+
headers: Object.assign(Object.assign({}, headers), {
|
|
3342
|
+
Accept: 'application/json'
|
|
3343
|
+
})
|
|
3344
|
+
};
|
|
3345
|
+
return resultHeaders;
|
|
3346
|
+
});
|
|
3347
|
+
function getUserToken() {
|
|
3300
3348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3301
3349
|
return new Promise(resolve => {
|
|
3302
3350
|
if (typeof window !== 'undefined') {
|
|
@@ -3318,10 +3366,14 @@ function getUserContext() {
|
|
|
3318
3366
|
});
|
|
3319
3367
|
});
|
|
3320
3368
|
}
|
|
3369
|
+
|
|
3370
|
+
const {
|
|
3371
|
+
networkInterface: uri$4
|
|
3372
|
+
} = appConfig.dconfig;
|
|
3321
3373
|
const authLink$2 = setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
|
|
3322
3374
|
headers
|
|
3323
3375
|
}) {
|
|
3324
|
-
const currentUsertoken = yield getUserToken
|
|
3376
|
+
const currentUsertoken = yield getUserToken();
|
|
3325
3377
|
const currentContext = yield getUserContext();
|
|
3326
3378
|
if (headers === undefined) {
|
|
3327
3379
|
headers = {};
|
|
@@ -3348,15 +3400,15 @@ const errorLink$3 = onError(({
|
|
|
3348
3400
|
}) => {
|
|
3349
3401
|
if (networkError && networkError.statusCode === 401) {
|
|
3350
3402
|
// redirect to login page
|
|
3351
|
-
if (typeof window !== 'undefined') {
|
|
3403
|
+
if (typeof window !== 'undefined' && window.location.pathname !== '/account/login') {
|
|
3352
3404
|
return window.location.replace('/account/login');
|
|
3353
3405
|
}
|
|
3354
3406
|
} else if (networkError && networkError.statusCode > 500 && networkError.statusCode !== 503) {
|
|
3355
|
-
if (typeof window !== 'undefined') {
|
|
3407
|
+
if (typeof window !== 'undefined' && window.location.pathname !== '/error') {
|
|
3356
3408
|
return window.location.replace('/account/error?message=' + networkError.message);
|
|
3357
3409
|
}
|
|
3358
3410
|
} else {
|
|
3359
|
-
if (typeof window !== 'undefined') {
|
|
3411
|
+
if (typeof window !== 'undefined' && window.location.pathname !== '/error') {
|
|
3360
3412
|
return window.location.replace('/account/error?message=Cannot connect to the server, please make sure you have an active internet connection');
|
|
3361
3413
|
}
|
|
3362
3414
|
}
|
|
@@ -3511,20 +3563,7 @@ const {
|
|
|
3511
3563
|
networkInterface: uri$3
|
|
3512
3564
|
} = appConfig.dquery;
|
|
3513
3565
|
const cache$3 = new InMemoryCache();
|
|
3514
|
-
const errorLink$2 = onError(
|
|
3515
|
-
networkError
|
|
3516
|
-
}) => {
|
|
3517
|
-
if (networkError && networkError.statusCode === 401) {
|
|
3518
|
-
// redirect to login page
|
|
3519
|
-
if (typeof window !== 'undefined') {
|
|
3520
|
-
return window.location.replace('/account/login');
|
|
3521
|
-
}
|
|
3522
|
-
} else if (networkError && networkError.statusCode > 500 && networkError.statusCode !== 503) {
|
|
3523
|
-
if (typeof window !== 'undefined') {
|
|
3524
|
-
return window.location.replace('/error?message=' + networkError.message);
|
|
3525
|
-
}
|
|
3526
|
-
}
|
|
3527
|
-
});
|
|
3566
|
+
const errorLink$2 = onError(handleHandler);
|
|
3528
3567
|
/* eslint-disable no-process-env */
|
|
3529
3568
|
const isDevEnv$3 = process.env['NODE_ENV'] !== 'production';
|
|
3530
3569
|
/* eslint-enable no-process-env */
|
|
@@ -86912,63 +86951,9 @@ const showcaseClient = new ApolloClient({
|
|
|
86912
86951
|
const {
|
|
86913
86952
|
networkInterface: uri$1
|
|
86914
86953
|
} = appConfig.core;
|
|
86915
|
-
|
|
86916
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86917
|
-
return new Promise(resolve => {
|
|
86918
|
-
if (typeof window !== 'undefined') {
|
|
86919
|
-
const storedToken = window.localStorage.getItem('token');
|
|
86920
|
-
resolve(storedToken);
|
|
86921
|
-
}
|
|
86922
|
-
resolve(undefined);
|
|
86923
|
-
});
|
|
86924
|
-
});
|
|
86925
|
-
}
|
|
86926
|
-
const authLink$1 = setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
|
|
86927
|
-
headers
|
|
86928
|
-
}) {
|
|
86929
|
-
const currentUsertoken = yield getUserToken$1();
|
|
86930
|
-
const isAPIKey = (currentUsertoken === null || currentUsertoken === void 0 ? void 0 : currentUsertoken.length) === 36;
|
|
86931
|
-
if (headers === undefined) {
|
|
86932
|
-
headers = {};
|
|
86933
|
-
}
|
|
86934
|
-
const resultHeaders = currentUsertoken ? {
|
|
86935
|
-
headers: Object.assign(Object.assign({}, headers), {
|
|
86936
|
-
Accept: 'application/json',
|
|
86937
|
-
Authorization: isAPIKey ? currentUsertoken : `Bearer ${currentUsertoken}`
|
|
86938
|
-
})
|
|
86939
|
-
} : {
|
|
86940
|
-
headers: Object.assign(Object.assign({}, headers), {
|
|
86941
|
-
Accept: 'application/json'
|
|
86942
|
-
})
|
|
86943
|
-
};
|
|
86944
|
-
return resultHeaders;
|
|
86945
|
-
}));
|
|
86954
|
+
const authLink$1 = setContext(handleAuth);
|
|
86946
86955
|
const cache$1 = new InMemoryCache();
|
|
86947
|
-
const errorLink$1 = onError(
|
|
86948
|
-
networkError,
|
|
86949
|
-
graphQLErrors
|
|
86950
|
-
}) => {
|
|
86951
|
-
if (networkError && networkError.statusCode === 401) {
|
|
86952
|
-
// redirect to login page
|
|
86953
|
-
if (typeof window !== 'undefined') {
|
|
86954
|
-
return window.location.replace('/account/login');
|
|
86955
|
-
}
|
|
86956
|
-
} else if (networkError && networkError.statusCode > 500 && networkError.statusCode !== 503) {
|
|
86957
|
-
if (typeof window !== 'undefined') {
|
|
86958
|
-
return window.location.replace('/error?message=' + networkError.message);
|
|
86959
|
-
}
|
|
86960
|
-
}
|
|
86961
|
-
if (graphQLErrors && graphQLErrors.find(error => {
|
|
86962
|
-
var _a;
|
|
86963
|
-
return ((_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a['code']) === 'FORBIDDEN';
|
|
86964
|
-
})) {
|
|
86965
|
-
const error = graphQLErrors.find(error => {
|
|
86966
|
-
var _a;
|
|
86967
|
-
return ((_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a['code']) === 'FORBIDDEN';
|
|
86968
|
-
});
|
|
86969
|
-
return window.location.replace('/403?message=' + (error === null || error === void 0 ? void 0 : error.message));
|
|
86970
|
-
}
|
|
86971
|
-
});
|
|
86956
|
+
const errorLink$1 = onError(handleHandler);
|
|
86972
86957
|
/* eslint-disable no-process-env */
|
|
86973
86958
|
const isDevEnv$1 = process.env['NODE_ENV'] !== 'production';
|
|
86974
86959
|
/* eslint-enable no-process-env */
|
|
@@ -86988,63 +86973,9 @@ const coreClient = new ApolloClient({
|
|
|
86988
86973
|
const {
|
|
86989
86974
|
networkInterface: uri
|
|
86990
86975
|
} = appConfig.bot;
|
|
86991
|
-
|
|
86992
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86993
|
-
return new Promise(resolve => {
|
|
86994
|
-
if (typeof window !== 'undefined') {
|
|
86995
|
-
const storedToken = window.localStorage.getItem('token');
|
|
86996
|
-
resolve(storedToken);
|
|
86997
|
-
}
|
|
86998
|
-
resolve(undefined);
|
|
86999
|
-
});
|
|
87000
|
-
});
|
|
87001
|
-
}
|
|
87002
|
-
const authLink = setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
|
|
87003
|
-
headers
|
|
87004
|
-
}) {
|
|
87005
|
-
const currentUsertoken = yield getUserToken();
|
|
87006
|
-
const isAPIKey = (currentUsertoken === null || currentUsertoken === void 0 ? void 0 : currentUsertoken.length) === 36;
|
|
87007
|
-
if (headers === undefined) {
|
|
87008
|
-
headers = {};
|
|
87009
|
-
}
|
|
87010
|
-
const resultHeaders = currentUsertoken ? {
|
|
87011
|
-
headers: Object.assign(Object.assign({}, headers), {
|
|
87012
|
-
Accept: 'application/json',
|
|
87013
|
-
Authorization: isAPIKey ? currentUsertoken : `Bearer ${currentUsertoken}`
|
|
87014
|
-
})
|
|
87015
|
-
} : {
|
|
87016
|
-
headers: Object.assign(Object.assign({}, headers), {
|
|
87017
|
-
Accept: 'application/json'
|
|
87018
|
-
})
|
|
87019
|
-
};
|
|
87020
|
-
return resultHeaders;
|
|
87021
|
-
}));
|
|
86976
|
+
const authLink = setContext(handleAuth);
|
|
87022
86977
|
const cache = new InMemoryCache();
|
|
87023
|
-
const errorLink = onError(
|
|
87024
|
-
networkError,
|
|
87025
|
-
graphQLErrors
|
|
87026
|
-
}) => {
|
|
87027
|
-
if (networkError && networkError.statusCode === 401) {
|
|
87028
|
-
// redirect to login page
|
|
87029
|
-
if (typeof window !== 'undefined') {
|
|
87030
|
-
return window.location.replace('/account/login');
|
|
87031
|
-
}
|
|
87032
|
-
} else if (networkError && networkError.statusCode > 500 && networkError.statusCode !== 503) {
|
|
87033
|
-
if (typeof window !== 'undefined') {
|
|
87034
|
-
return window.location.replace('/error?message=' + networkError.message);
|
|
87035
|
-
}
|
|
87036
|
-
}
|
|
87037
|
-
if (graphQLErrors && graphQLErrors.find(error => {
|
|
87038
|
-
var _a;
|
|
87039
|
-
return ((_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a['code']) === 'FORBIDDEN';
|
|
87040
|
-
})) {
|
|
87041
|
-
const error = graphQLErrors.find(error => {
|
|
87042
|
-
var _a;
|
|
87043
|
-
return ((_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a['code']) === 'FORBIDDEN';
|
|
87044
|
-
});
|
|
87045
|
-
return window.location.replace('/403?message=' + (error === null || error === void 0 ? void 0 : error.message));
|
|
87046
|
-
}
|
|
87047
|
-
});
|
|
86978
|
+
const errorLink = onError(handleHandler);
|
|
87048
86979
|
/* eslint-disable no-process-env */
|
|
87049
86980
|
const isDevEnv = process.env['NODE_ENV'] !== 'production';
|
|
87050
86981
|
/* eslint-enable no-process-env */
|