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