@mjhls/mjh-framework 1.0.1023 → 1.0.1024-segment-fix

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.
Files changed (176) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +2 -1
  4. package/dist/cjs/AD300x250x600.js +2 -1
  5. package/dist/cjs/AD728x90.js +2 -1
  6. package/dist/cjs/ADFloatingFooter.js +2 -1
  7. package/dist/cjs/ADGutter.js +2 -1
  8. package/dist/cjs/ADSkyscraper.js +2 -1
  9. package/dist/cjs/ADSponsoredResources.js +2 -1
  10. package/dist/cjs/ADWebcast.js +2 -1
  11. package/dist/cjs/ADWelcome.js +2 -1
  12. package/dist/cjs/AdSlot.js +2 -1
  13. package/dist/cjs/AdSlotsProvider.js +2 -1
  14. package/dist/cjs/AlgoliaSearch.js +513 -1024
  15. package/dist/cjs/ArticleProgramLandingPage.js +4 -3
  16. package/dist/cjs/ArticleSeriesLandingPage.js +4 -3
  17. package/dist/cjs/ArticleSeriesListing.js +2 -1
  18. package/dist/cjs/Auth.js +1463 -10
  19. package/dist/cjs/AuthWrapper.js +1476 -294
  20. package/dist/cjs/CEDeckSupabase.js +3 -2
  21. package/dist/cjs/CMEDeck.js +2 -1
  22. package/dist/cjs/Column3.js +2 -1
  23. package/dist/cjs/ConferenceArticleCard.js +15 -15
  24. package/dist/cjs/ContentCardPaginated.js +5 -4
  25. package/dist/cjs/DeckContent.js +12 -11
  26. package/dist/cjs/DeckQueue.js +3 -2
  27. package/dist/cjs/DeckQueuePaginated.js +4 -3
  28. package/dist/cjs/{Dfp-67646058.js → Dfp-c313a700.js} +2 -1
  29. package/dist/cjs/EventsDeck.js +18 -18
  30. package/dist/cjs/ExternalResources.js +5 -4
  31. package/dist/cjs/GridContent.js +5 -4
  32. package/dist/cjs/GridContentPaginated.js +6 -5
  33. package/dist/cjs/GridHero.js +1 -1
  34. package/dist/cjs/HamMagazine.js +9 -9
  35. package/dist/cjs/HealthCareProfessionalModal.js +1 -1
  36. package/dist/cjs/Hero.js +1 -1
  37. package/dist/cjs/HorizontalArticleListing.js +4 -3
  38. package/dist/cjs/{ImageSlider-fd0cc91c.js → ImageSlider-17fdaf3b.js} +92 -149
  39. package/dist/cjs/IssueLanding.js +35 -34
  40. package/dist/cjs/KMTracker.js +15 -15
  41. package/dist/cjs/LeftNav.js +2 -1
  42. package/dist/cjs/MasterDeck.js +12 -11
  43. package/dist/cjs/MasterDeckPaginated.js +13 -12
  44. package/dist/cjs/{MediaSeriesCard-ae205d40.js → MediaSeriesCard-a90d687a.js} +2 -2
  45. package/dist/cjs/MediaSeriesLanding.js +14 -13
  46. package/dist/cjs/MediaSeriesLandingPaginated.js +15 -14
  47. package/dist/cjs/NavMagazine.js +10 -10
  48. package/dist/cjs/NavNative.js +9 -9
  49. package/dist/cjs/OncliveLargeHero.js +1 -1
  50. package/dist/cjs/{Pagination-6359861a.js → Pagination-842c556f.js} +1 -1
  51. package/dist/cjs/PartnerDetailListing.js +8 -6
  52. package/dist/cjs/PartnerDetailListingPaginated.js +9 -7
  53. package/dist/cjs/PodcastsLanding.js +7 -6
  54. package/dist/cjs/PubSection.js +5 -4
  55. package/dist/cjs/PublicationLanding.js +26 -26
  56. package/dist/cjs/QueueDeckExpanded.js +5 -4
  57. package/dist/cjs/QueueDeckExpandedPaginated.js +6 -5
  58. package/dist/cjs/RelatedContent.js +28 -28
  59. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  60. package/dist/cjs/Segment.js +4 -4
  61. package/dist/cjs/SeriesListingDeck.js +3 -2
  62. package/dist/cjs/{SeriesSlider-0b2a2775.js → SeriesSlider-78004f1c.js} +4 -4
  63. package/dist/cjs/SideFooter.js +2 -2
  64. package/dist/cjs/TaxonomyDescription.js +4 -3
  65. package/dist/cjs/TemplateNormal.js +2 -1
  66. package/dist/cjs/ThumbnailCard.js +1 -1
  67. package/dist/cjs/{Tooltip-980a1d1a.js → Tooltip-4cb8849a.js} +170 -55
  68. package/dist/cjs/VideoProgramLandingPage.js +4 -3
  69. package/dist/cjs/VideoSeriesCard.js +1 -1
  70. package/dist/cjs/VideoSeriesLandingPage.js +4 -3
  71. package/dist/cjs/VideoSeriesListing.js +2 -1
  72. package/dist/cjs/View.js +8 -7
  73. package/dist/cjs/YahooHero.js +1 -1
  74. package/dist/cjs/YoutubeGroup.js +4 -4
  75. package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
  76. package/dist/cjs/{entities-3f9d0f2f.js → entities-df1aed86.js} +4 -0
  77. package/dist/cjs/events-1b438fe7.js +469 -0
  78. package/dist/cjs/getSerializers.js +4 -3
  79. package/dist/cjs/{getTargeting-4439c99d.js → getTargeting-ba942d9a.js} +9 -9
  80. package/dist/cjs/getTargeting.js +1 -1
  81. package/dist/cjs/{index-8041a4eb.js → index-50be6759.js} +15 -9
  82. package/dist/cjs/{index-b78ce702.js → index-b14fa0e9.js} +2 -2
  83. package/dist/cjs/{index-7435b964.js → index-d2a6ef75.js} +2 -467
  84. package/dist/cjs/{index-96c331fd.js → index-f86bb269.js} +52 -53
  85. package/dist/cjs/index.js +13 -11
  86. package/dist/cjs/typeof-1358762e.js +33 -0
  87. package/dist/esm/AD.js +1 -1
  88. package/dist/esm/AD300x250.js +2 -1
  89. package/dist/esm/AD300x250x600.js +2 -1
  90. package/dist/esm/AD728x90.js +2 -1
  91. package/dist/esm/ADFloatingFooter.js +2 -1
  92. package/dist/esm/ADGutter.js +2 -1
  93. package/dist/esm/ADSkyscraper.js +2 -1
  94. package/dist/esm/ADSponsoredResources.js +2 -1
  95. package/dist/esm/ADWebcast.js +2 -1
  96. package/dist/esm/ADWelcome.js +2 -1
  97. package/dist/esm/AdSlot.js +2 -1
  98. package/dist/esm/AdSlotsProvider.js +2 -1
  99. package/dist/esm/AlgoliaSearch.js +513 -1024
  100. package/dist/esm/ArticleProgramLandingPage.js +4 -3
  101. package/dist/esm/ArticleSeriesLandingPage.js +4 -3
  102. package/dist/esm/ArticleSeriesListing.js +2 -1
  103. package/dist/esm/Auth.js +1463 -9
  104. package/dist/esm/AuthWrapper.js +1470 -288
  105. package/dist/esm/CEDeckSupabase.js +3 -2
  106. package/dist/esm/CMEDeck.js +2 -1
  107. package/dist/esm/Column3.js +2 -1
  108. package/dist/esm/ConferenceArticleCard.js +15 -15
  109. package/dist/esm/ContentCardPaginated.js +5 -4
  110. package/dist/esm/DeckContent.js +12 -11
  111. package/dist/esm/DeckQueue.js +3 -2
  112. package/dist/esm/DeckQueuePaginated.js +4 -3
  113. package/dist/esm/{Dfp-cf85d203.js → Dfp-102f0beb.js} +2 -1
  114. package/dist/esm/EventsDeck.js +18 -18
  115. package/dist/esm/ExternalResources.js +5 -4
  116. package/dist/esm/GridContent.js +5 -4
  117. package/dist/esm/GridContentPaginated.js +6 -5
  118. package/dist/esm/GridHero.js +1 -1
  119. package/dist/esm/HamMagazine.js +9 -9
  120. package/dist/esm/HealthCareProfessionalModal.js +1 -1
  121. package/dist/esm/Hero.js +1 -1
  122. package/dist/esm/HorizontalArticleListing.js +4 -3
  123. package/dist/esm/{ImageSlider-c3a57384.js → ImageSlider-f84174cb.js} +10 -67
  124. package/dist/esm/IssueLanding.js +35 -34
  125. package/dist/esm/KMTracker.js +15 -15
  126. package/dist/esm/LeftNav.js +2 -1
  127. package/dist/esm/MasterDeck.js +12 -11
  128. package/dist/esm/MasterDeckPaginated.js +13 -12
  129. package/dist/esm/{MediaSeriesCard-957b218d.js → MediaSeriesCard-f4676da2.js} +2 -2
  130. package/dist/esm/MediaSeriesLanding.js +14 -13
  131. package/dist/esm/MediaSeriesLandingPaginated.js +15 -14
  132. package/dist/esm/NavMagazine.js +10 -10
  133. package/dist/esm/NavNative.js +9 -9
  134. package/dist/esm/OncliveLargeHero.js +1 -1
  135. package/dist/esm/{Pagination-9fe9f61d.js → Pagination-dc30727b.js} +1 -1
  136. package/dist/esm/PartnerDetailListing.js +8 -6
  137. package/dist/esm/PartnerDetailListingPaginated.js +9 -7
  138. package/dist/esm/PodcastsLanding.js +7 -6
  139. package/dist/esm/PubSection.js +5 -4
  140. package/dist/esm/PublicationLanding.js +26 -26
  141. package/dist/esm/QueueDeckExpanded.js +5 -4
  142. package/dist/esm/QueueDeckExpandedPaginated.js +6 -5
  143. package/dist/esm/RelatedContent.js +28 -28
  144. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  145. package/dist/esm/Segment.js +4 -4
  146. package/dist/esm/SeriesListingDeck.js +3 -2
  147. package/dist/esm/{SeriesSlider-3f4d6012.js → SeriesSlider-d64090f7.js} +4 -4
  148. package/dist/esm/SideFooter.js +2 -2
  149. package/dist/esm/TaxonomyDescription.js +4 -3
  150. package/dist/esm/TemplateNormal.js +2 -1
  151. package/dist/esm/ThumbnailCard.js +1 -1
  152. package/dist/esm/{Tooltip-51957f7c.js → Tooltip-95655b44.js} +170 -55
  153. package/dist/esm/VideoProgramLandingPage.js +4 -3
  154. package/dist/esm/VideoSeriesCard.js +1 -1
  155. package/dist/esm/VideoSeriesLandingPage.js +4 -3
  156. package/dist/esm/VideoSeriesListing.js +2 -1
  157. package/dist/esm/View.js +8 -7
  158. package/dist/esm/YahooHero.js +1 -1
  159. package/dist/esm/YoutubeGroup.js +4 -4
  160. package/dist/esm/defineProperty-23a8f8cd.js +68 -0
  161. package/dist/esm/{entities-932b50cf.js → entities-6d9154b4.js} +4 -0
  162. package/dist/esm/events-6c3a7a63.js +467 -0
  163. package/dist/esm/getSerializers.js +4 -3
  164. package/dist/esm/{getTargeting-c6884f34.js → getTargeting-9bd28724.js} +9 -9
  165. package/dist/esm/getTargeting.js +1 -1
  166. package/dist/esm/{index-30a6257d.js → index-79cfd25c.js} +52 -53
  167. package/dist/esm/{index-67e1773f.js → index-98ca9cec.js} +15 -9
  168. package/dist/esm/{index-f2f5b752.js → index-d3548838.js} +2 -2
  169. package/dist/esm/{index-5cc7b406.js → index-f0fc23eb.js} +1 -466
  170. package/dist/esm/index.js +13 -11
  171. package/dist/esm/typeof-2f07d0e8.js +30 -0
  172. package/package.json +116 -116
  173. /package/dist/cjs/{ADInfeed-5dabd71d.js → ADInfeed-15df327c.js} +0 -0
  174. /package/dist/cjs/{ADlgInfeed-1766ce0a.js → ADlgInfeed-b71569ae.js} +0 -0
  175. /package/dist/esm/{ADInfeed-cfc4f7b2.js → ADInfeed-6fdbe522.js} +0 -0
  176. /package/dist/esm/{ADlgInfeed-74c975b9.js → ADlgInfeed-378fbce7.js} +0 -0
package/dist/cjs/Auth.js CHANGED
@@ -13,10 +13,9 @@ var useSWR = require('swr');
13
13
  var index = require('./index-bd6c9f56.js');
14
14
  var Local = require('passport-local');
15
15
  var mysql = require('mysql');
16
- var util$1 = require('./util-93a37fd0.js');
17
- var util = require('util.promisify');
16
+ var util = require('./util-93a37fd0.js');
17
+ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
18
18
  var md5 = require('./md5-e1ca5797.js');
19
- require('./_commonjsHelpers-06173234.js');
20
19
  require('./core.get-iterator-method-5643aa10.js');
21
20
  require('./web.dom.iterable-d98303e0.js');
22
21
  require('./_library-dd23b178.js');
@@ -30,7 +29,6 @@ var Router__default = /*#__PURE__*/_interopDefaultLegacy(Router);
30
29
  var useSWR__default = /*#__PURE__*/_interopDefaultLegacy(useSWR);
31
30
  var Local__default = /*#__PURE__*/_interopDefaultLegacy(Local);
32
31
  var mysql__default = /*#__PURE__*/_interopDefaultLegacy(mysql);
33
- var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
34
32
 
35
33
  var returnFormField = function returnFormField(_ref) {
36
34
  var name = _ref.name,
@@ -1325,7 +1323,1462 @@ var iron = /*#__PURE__*/Object.freeze({
1325
1323
  getSession: getSession
1326
1324
  });
1327
1325
 
1328
- util__default["default"].shim();
1326
+ var toStr$5 = Object.prototype.toString;
1327
+
1328
+ var isArguments = function isArguments(value) {
1329
+ var str = toStr$5.call(value);
1330
+ var isArgs = str === '[object Arguments]';
1331
+ if (!isArgs) {
1332
+ isArgs = str !== '[object Array]' &&
1333
+ value !== null &&
1334
+ typeof value === 'object' &&
1335
+ typeof value.length === 'number' &&
1336
+ value.length >= 0 &&
1337
+ toStr$5.call(value.callee) === '[object Function]';
1338
+ }
1339
+ return isArgs;
1340
+ };
1341
+
1342
+ var keysShim$1;
1343
+ if (!Object.keys) {
1344
+ // modified from https://github.com/es-shims/es5-shim
1345
+ var has$1 = Object.prototype.hasOwnProperty;
1346
+ var toStr$4 = Object.prototype.toString;
1347
+ var isArgs = isArguments; // eslint-disable-line global-require
1348
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
1349
+ var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
1350
+ var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
1351
+ var dontEnums = [
1352
+ 'toString',
1353
+ 'toLocaleString',
1354
+ 'valueOf',
1355
+ 'hasOwnProperty',
1356
+ 'isPrototypeOf',
1357
+ 'propertyIsEnumerable',
1358
+ 'constructor'
1359
+ ];
1360
+ var equalsConstructorPrototype = function (o) {
1361
+ var ctor = o.constructor;
1362
+ return ctor && ctor.prototype === o;
1363
+ };
1364
+ var excludedKeys = {
1365
+ $applicationCache: true,
1366
+ $console: true,
1367
+ $external: true,
1368
+ $frame: true,
1369
+ $frameElement: true,
1370
+ $frames: true,
1371
+ $innerHeight: true,
1372
+ $innerWidth: true,
1373
+ $onmozfullscreenchange: true,
1374
+ $onmozfullscreenerror: true,
1375
+ $outerHeight: true,
1376
+ $outerWidth: true,
1377
+ $pageXOffset: true,
1378
+ $pageYOffset: true,
1379
+ $parent: true,
1380
+ $scrollLeft: true,
1381
+ $scrollTop: true,
1382
+ $scrollX: true,
1383
+ $scrollY: true,
1384
+ $self: true,
1385
+ $webkitIndexedDB: true,
1386
+ $webkitStorageInfo: true,
1387
+ $window: true
1388
+ };
1389
+ var hasAutomationEqualityBug = (function () {
1390
+ /* global window */
1391
+ if (typeof window === 'undefined') { return false; }
1392
+ for (var k in window) {
1393
+ try {
1394
+ if (!excludedKeys['$' + k] && has$1.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
1395
+ try {
1396
+ equalsConstructorPrototype(window[k]);
1397
+ } catch (e) {
1398
+ return true;
1399
+ }
1400
+ }
1401
+ } catch (e) {
1402
+ return true;
1403
+ }
1404
+ }
1405
+ return false;
1406
+ }());
1407
+ var equalsConstructorPrototypeIfNotBuggy = function (o) {
1408
+ /* global window */
1409
+ if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
1410
+ return equalsConstructorPrototype(o);
1411
+ }
1412
+ try {
1413
+ return equalsConstructorPrototype(o);
1414
+ } catch (e) {
1415
+ return false;
1416
+ }
1417
+ };
1418
+
1419
+ keysShim$1 = function keys(object) {
1420
+ var isObject = object !== null && typeof object === 'object';
1421
+ var isFunction = toStr$4.call(object) === '[object Function]';
1422
+ var isArguments = isArgs(object);
1423
+ var isString = isObject && toStr$4.call(object) === '[object String]';
1424
+ var theKeys = [];
1425
+
1426
+ if (!isObject && !isFunction && !isArguments) {
1427
+ throw new TypeError('Object.keys called on a non-object');
1428
+ }
1429
+
1430
+ var skipProto = hasProtoEnumBug && isFunction;
1431
+ if (isString && object.length > 0 && !has$1.call(object, 0)) {
1432
+ for (var i = 0; i < object.length; ++i) {
1433
+ theKeys.push(String(i));
1434
+ }
1435
+ }
1436
+
1437
+ if (isArguments && object.length > 0) {
1438
+ for (var j = 0; j < object.length; ++j) {
1439
+ theKeys.push(String(j));
1440
+ }
1441
+ } else {
1442
+ for (var name in object) {
1443
+ if (!(skipProto && name === 'prototype') && has$1.call(object, name)) {
1444
+ theKeys.push(String(name));
1445
+ }
1446
+ }
1447
+ }
1448
+
1449
+ if (hasDontEnumBug) {
1450
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
1451
+
1452
+ for (var k = 0; k < dontEnums.length; ++k) {
1453
+ if (!(skipConstructor && dontEnums[k] === 'constructor') && has$1.call(object, dontEnums[k])) {
1454
+ theKeys.push(dontEnums[k]);
1455
+ }
1456
+ }
1457
+ }
1458
+ return theKeys;
1459
+ };
1460
+ }
1461
+ var implementation$3 = keysShim$1;
1462
+
1463
+ var slice$1 = Array.prototype.slice;
1464
+
1465
+
1466
+ var origKeys = Object.keys;
1467
+ var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation$3;
1468
+
1469
+ var originalKeys = Object.keys;
1470
+
1471
+ keysShim.shim = function shimObjectKeys() {
1472
+ if (Object.keys) {
1473
+ var keysWorksWithArguments = (function () {
1474
+ // Safari 5.0 bug
1475
+ var args = Object.keys(arguments);
1476
+ return args && args.length === arguments.length;
1477
+ }(1, 2));
1478
+ if (!keysWorksWithArguments) {
1479
+ Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1480
+ if (isArguments(object)) {
1481
+ return originalKeys(slice$1.call(object));
1482
+ }
1483
+ return originalKeys(object);
1484
+ };
1485
+ }
1486
+ } else {
1487
+ Object.keys = keysShim;
1488
+ }
1489
+ return Object.keys || keysShim;
1490
+ };
1491
+
1492
+ var objectKeys = keysShim;
1493
+
1494
+ var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1495
+
1496
+ var toStr$3 = Object.prototype.toString;
1497
+ var concat = Array.prototype.concat;
1498
+ var origDefineProperty = Object.defineProperty;
1499
+
1500
+ var isFunction = function (fn) {
1501
+ return typeof fn === 'function' && toStr$3.call(fn) === '[object Function]';
1502
+ };
1503
+
1504
+ var arePropertyDescriptorsSupported = function () {
1505
+ var obj = {};
1506
+ try {
1507
+ origDefineProperty(obj, 'x', { enumerable: false, value: obj });
1508
+ // eslint-disable-next-line no-unused-vars, no-restricted-syntax
1509
+ for (var _ in obj) { // jscs:ignore disallowUnusedVariables
1510
+ return false;
1511
+ }
1512
+ return obj.x === obj;
1513
+ } catch (e) { /* this is IE 8. */
1514
+ return false;
1515
+ }
1516
+ };
1517
+ var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
1518
+
1519
+ var defineProperty = function (object, name, value, predicate) {
1520
+ if (name in object && (!isFunction(predicate) || !predicate())) {
1521
+ return;
1522
+ }
1523
+ if (supportsDescriptors) {
1524
+ origDefineProperty(object, name, {
1525
+ configurable: true,
1526
+ enumerable: false,
1527
+ value: value,
1528
+ writable: true
1529
+ });
1530
+ } else {
1531
+ object[name] = value;
1532
+ }
1533
+ };
1534
+
1535
+ var defineProperties = function (object, map) {
1536
+ var predicates = arguments.length > 2 ? arguments[2] : {};
1537
+ var props = objectKeys(map);
1538
+ if (hasSymbols$3) {
1539
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
1540
+ }
1541
+ for (var i = 0; i < props.length; i += 1) {
1542
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
1543
+ }
1544
+ };
1545
+
1546
+ defineProperties.supportsDescriptors = !!supportsDescriptors;
1547
+
1548
+ var defineProperties_1 = defineProperties;
1549
+
1550
+ /* eslint no-invalid-this: 1 */
1551
+
1552
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1553
+ var slice = Array.prototype.slice;
1554
+ var toStr$2 = Object.prototype.toString;
1555
+ var funcType = '[object Function]';
1556
+
1557
+ var implementation$2 = function bind(that) {
1558
+ var target = this;
1559
+ if (typeof target !== 'function' || toStr$2.call(target) !== funcType) {
1560
+ throw new TypeError(ERROR_MESSAGE + target);
1561
+ }
1562
+ var args = slice.call(arguments, 1);
1563
+
1564
+ var bound;
1565
+ var binder = function () {
1566
+ if (this instanceof bound) {
1567
+ var result = target.apply(
1568
+ this,
1569
+ args.concat(slice.call(arguments))
1570
+ );
1571
+ if (Object(result) === result) {
1572
+ return result;
1573
+ }
1574
+ return this;
1575
+ } else {
1576
+ return target.apply(
1577
+ that,
1578
+ args.concat(slice.call(arguments))
1579
+ );
1580
+ }
1581
+ };
1582
+
1583
+ var boundLength = Math.max(0, target.length - args.length);
1584
+ var boundArgs = [];
1585
+ for (var i = 0; i < boundLength; i++) {
1586
+ boundArgs.push('$' + i);
1587
+ }
1588
+
1589
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1590
+
1591
+ if (target.prototype) {
1592
+ var Empty = function Empty() {};
1593
+ Empty.prototype = target.prototype;
1594
+ bound.prototype = new Empty();
1595
+ Empty.prototype = null;
1596
+ }
1597
+
1598
+ return bound;
1599
+ };
1600
+
1601
+ var functionBind = Function.prototype.bind || implementation$2;
1602
+
1603
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
1604
+ var shams$1 = function hasSymbols() {
1605
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
1606
+ if (typeof Symbol.iterator === 'symbol') { return true; }
1607
+
1608
+ var obj = {};
1609
+ var sym = Symbol('test');
1610
+ var symObj = Object(sym);
1611
+ if (typeof sym === 'string') { return false; }
1612
+
1613
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
1614
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
1615
+
1616
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
1617
+ // if (sym instanceof Symbol) { return false; }
1618
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
1619
+ // if (!(symObj instanceof Symbol)) { return false; }
1620
+
1621
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
1622
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
1623
+
1624
+ var symVal = 42;
1625
+ obj[sym] = symVal;
1626
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
1627
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
1628
+
1629
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
1630
+
1631
+ var syms = Object.getOwnPropertySymbols(obj);
1632
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
1633
+
1634
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
1635
+
1636
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
1637
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
1638
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
1639
+ }
1640
+
1641
+ return true;
1642
+ };
1643
+
1644
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
1645
+
1646
+
1647
+ var hasSymbols$2 = function hasNativeSymbols() {
1648
+ if (typeof origSymbol !== 'function') { return false; }
1649
+ if (typeof Symbol !== 'function') { return false; }
1650
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
1651
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
1652
+
1653
+ return shams$1();
1654
+ };
1655
+
1656
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
1657
+
1658
+ var undefined$1;
1659
+
1660
+ var $SyntaxError$1 = SyntaxError;
1661
+ var $Function = Function;
1662
+ var $TypeError$5 = TypeError;
1663
+
1664
+ // eslint-disable-next-line consistent-return
1665
+ var getEvalledConstructor = function (expressionSyntax) {
1666
+ try {
1667
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1668
+ } catch (e) {}
1669
+ };
1670
+
1671
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
1672
+ if ($gOPD$2) {
1673
+ try {
1674
+ $gOPD$2({}, '');
1675
+ } catch (e) {
1676
+ $gOPD$2 = null; // this is IE 8, which has a broken gOPD
1677
+ }
1678
+ }
1679
+
1680
+ var throwTypeError = function () {
1681
+ throw new $TypeError$5();
1682
+ };
1683
+ var ThrowTypeError = $gOPD$2
1684
+ ? (function () {
1685
+ try {
1686
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1687
+ arguments.callee; // IE 8 does not throw here
1688
+ return throwTypeError;
1689
+ } catch (calleeThrows) {
1690
+ try {
1691
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1692
+ return $gOPD$2(arguments, 'callee').get;
1693
+ } catch (gOPDthrows) {
1694
+ return throwTypeError;
1695
+ }
1696
+ }
1697
+ }())
1698
+ : throwTypeError;
1699
+
1700
+ var hasSymbols$1 = hasSymbols$2();
1701
+
1702
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
1703
+
1704
+ var needsEval = {};
1705
+
1706
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
1707
+
1708
+ var INTRINSICS = {
1709
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1710
+ '%Array%': Array,
1711
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1712
+ '%ArrayIteratorPrototype%': hasSymbols$1 ? getProto([][Symbol.iterator]()) : undefined$1,
1713
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
1714
+ '%AsyncFunction%': needsEval,
1715
+ '%AsyncGenerator%': needsEval,
1716
+ '%AsyncGeneratorFunction%': needsEval,
1717
+ '%AsyncIteratorPrototype%': needsEval,
1718
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1719
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1720
+ '%Boolean%': Boolean,
1721
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1722
+ '%Date%': Date,
1723
+ '%decodeURI%': decodeURI,
1724
+ '%decodeURIComponent%': decodeURIComponent,
1725
+ '%encodeURI%': encodeURI,
1726
+ '%encodeURIComponent%': encodeURIComponent,
1727
+ '%Error%': Error,
1728
+ '%eval%': eval, // eslint-disable-line no-eval
1729
+ '%EvalError%': EvalError,
1730
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1731
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1732
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1733
+ '%Function%': $Function,
1734
+ '%GeneratorFunction%': needsEval,
1735
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1736
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1737
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1738
+ '%isFinite%': isFinite,
1739
+ '%isNaN%': isNaN,
1740
+ '%IteratorPrototype%': hasSymbols$1 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1741
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1742
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1743
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1744
+ '%Math%': Math,
1745
+ '%Number%': Number,
1746
+ '%Object%': Object,
1747
+ '%parseFloat%': parseFloat,
1748
+ '%parseInt%': parseInt,
1749
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1750
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1751
+ '%RangeError%': RangeError,
1752
+ '%ReferenceError%': ReferenceError,
1753
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1754
+ '%RegExp%': RegExp,
1755
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1756
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1757
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1758
+ '%String%': String,
1759
+ '%StringIteratorPrototype%': hasSymbols$1 ? getProto(''[Symbol.iterator]()) : undefined$1,
1760
+ '%Symbol%': hasSymbols$1 ? Symbol : undefined$1,
1761
+ '%SyntaxError%': $SyntaxError$1,
1762
+ '%ThrowTypeError%': ThrowTypeError,
1763
+ '%TypedArray%': TypedArray,
1764
+ '%TypeError%': $TypeError$5,
1765
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1766
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1767
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1768
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1769
+ '%URIError%': URIError,
1770
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1771
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1772
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1773
+ };
1774
+
1775
+ var doEval = function doEval(name) {
1776
+ var value;
1777
+ if (name === '%AsyncFunction%') {
1778
+ value = getEvalledConstructor('async function () {}');
1779
+ } else if (name === '%GeneratorFunction%') {
1780
+ value = getEvalledConstructor('function* () {}');
1781
+ } else if (name === '%AsyncGeneratorFunction%') {
1782
+ value = getEvalledConstructor('async function* () {}');
1783
+ } else if (name === '%AsyncGenerator%') {
1784
+ var fn = doEval('%AsyncGeneratorFunction%');
1785
+ if (fn) {
1786
+ value = fn.prototype;
1787
+ }
1788
+ } else if (name === '%AsyncIteratorPrototype%') {
1789
+ var gen = doEval('%AsyncGenerator%');
1790
+ if (gen) {
1791
+ value = getProto(gen.prototype);
1792
+ }
1793
+ }
1794
+
1795
+ INTRINSICS[name] = value;
1796
+
1797
+ return value;
1798
+ };
1799
+
1800
+ var LEGACY_ALIASES = {
1801
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1802
+ '%ArrayPrototype%': ['Array', 'prototype'],
1803
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1804
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1805
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1806
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1807
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1808
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1809
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1810
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
1811
+ '%DataViewPrototype%': ['DataView', 'prototype'],
1812
+ '%DatePrototype%': ['Date', 'prototype'],
1813
+ '%ErrorPrototype%': ['Error', 'prototype'],
1814
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1815
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1816
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1817
+ '%FunctionPrototype%': ['Function', 'prototype'],
1818
+ '%Generator%': ['GeneratorFunction', 'prototype'],
1819
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1820
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1821
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1822
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1823
+ '%JSONParse%': ['JSON', 'parse'],
1824
+ '%JSONStringify%': ['JSON', 'stringify'],
1825
+ '%MapPrototype%': ['Map', 'prototype'],
1826
+ '%NumberPrototype%': ['Number', 'prototype'],
1827
+ '%ObjectPrototype%': ['Object', 'prototype'],
1828
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1829
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1830
+ '%PromisePrototype%': ['Promise', 'prototype'],
1831
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1832
+ '%Promise_all%': ['Promise', 'all'],
1833
+ '%Promise_reject%': ['Promise', 'reject'],
1834
+ '%Promise_resolve%': ['Promise', 'resolve'],
1835
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1836
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1837
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
1838
+ '%SetPrototype%': ['Set', 'prototype'],
1839
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1840
+ '%StringPrototype%': ['String', 'prototype'],
1841
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
1842
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1843
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1844
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1845
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1846
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1847
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1848
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1849
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
1850
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1851
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
1852
+ };
1853
+
1854
+
1855
+
1856
+ var $concat$2 = functionBind.call(Function.call, Array.prototype.concat);
1857
+ var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
1858
+ var $replace = functionBind.call(Function.call, String.prototype.replace);
1859
+ var $strSlice = functionBind.call(Function.call, String.prototype.slice);
1860
+
1861
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1862
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1863
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1864
+ var stringToPath = function stringToPath(string) {
1865
+ var first = $strSlice(string, 0, 1);
1866
+ var last = $strSlice(string, -1);
1867
+ if (first === '%' && last !== '%') {
1868
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1869
+ } else if (last === '%' && first !== '%') {
1870
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1871
+ }
1872
+ var result = [];
1873
+ $replace(string, rePropName, function (match, number, quote, subString) {
1874
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1875
+ });
1876
+ return result;
1877
+ };
1878
+ /* end adaptation */
1879
+
1880
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1881
+ var intrinsicName = name;
1882
+ var alias;
1883
+ if (src(LEGACY_ALIASES, intrinsicName)) {
1884
+ alias = LEGACY_ALIASES[intrinsicName];
1885
+ intrinsicName = '%' + alias[0] + '%';
1886
+ }
1887
+
1888
+ if (src(INTRINSICS, intrinsicName)) {
1889
+ var value = INTRINSICS[intrinsicName];
1890
+ if (value === needsEval) {
1891
+ value = doEval(intrinsicName);
1892
+ }
1893
+ if (typeof value === 'undefined' && !allowMissing) {
1894
+ throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1895
+ }
1896
+
1897
+ return {
1898
+ alias: alias,
1899
+ name: intrinsicName,
1900
+ value: value
1901
+ };
1902
+ }
1903
+
1904
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
1905
+ };
1906
+
1907
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1908
+ if (typeof name !== 'string' || name.length === 0) {
1909
+ throw new $TypeError$5('intrinsic name must be a non-empty string');
1910
+ }
1911
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1912
+ throw new $TypeError$5('"allowMissing" argument must be a boolean');
1913
+ }
1914
+
1915
+ var parts = stringToPath(name);
1916
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1917
+
1918
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1919
+ var intrinsicRealName = intrinsic.name;
1920
+ var value = intrinsic.value;
1921
+ var skipFurtherCaching = false;
1922
+
1923
+ var alias = intrinsic.alias;
1924
+ if (alias) {
1925
+ intrinsicBaseName = alias[0];
1926
+ $spliceApply(parts, $concat$2([0, 1], alias));
1927
+ }
1928
+
1929
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1930
+ var part = parts[i];
1931
+ var first = $strSlice(part, 0, 1);
1932
+ var last = $strSlice(part, -1);
1933
+ if (
1934
+ (
1935
+ (first === '"' || first === "'" || first === '`')
1936
+ || (last === '"' || last === "'" || last === '`')
1937
+ )
1938
+ && first !== last
1939
+ ) {
1940
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
1941
+ }
1942
+ if (part === 'constructor' || !isOwn) {
1943
+ skipFurtherCaching = true;
1944
+ }
1945
+
1946
+ intrinsicBaseName += '.' + part;
1947
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
1948
+
1949
+ if (src(INTRINSICS, intrinsicRealName)) {
1950
+ value = INTRINSICS[intrinsicRealName];
1951
+ } else if (value != null) {
1952
+ if (!(part in value)) {
1953
+ if (!allowMissing) {
1954
+ throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
1955
+ }
1956
+ return void undefined$1;
1957
+ }
1958
+ if ($gOPD$2 && (i + 1) >= parts.length) {
1959
+ var desc = $gOPD$2(value, part);
1960
+ isOwn = !!desc;
1961
+
1962
+ // By convention, when a data property is converted to an accessor
1963
+ // property to emulate a data property that does not suffer from
1964
+ // the override mistake, that accessor's getter is marked with
1965
+ // an `originalValue` property. Here, when we detect this, we
1966
+ // uphold the illusion by pretending to see that original data
1967
+ // property, i.e., returning the value rather than the getter
1968
+ // itself.
1969
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1970
+ value = desc.get;
1971
+ } else {
1972
+ value = value[part];
1973
+ }
1974
+ } else {
1975
+ isOwn = src(value, part);
1976
+ value = value[part];
1977
+ }
1978
+
1979
+ if (isOwn && !skipFurtherCaching) {
1980
+ INTRINSICS[intrinsicRealName] = value;
1981
+ }
1982
+ }
1983
+ }
1984
+ return value;
1985
+ };
1986
+
1987
+ var callBind = _commonjsHelpers.createCommonjsModule(function (module) {
1988
+
1989
+
1990
+
1991
+
1992
+ var $apply = getIntrinsic('%Function.prototype.apply%');
1993
+ var $call = getIntrinsic('%Function.prototype.call%');
1994
+ var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
1995
+
1996
+ var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
1997
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
1998
+ var $max = getIntrinsic('%Math.max%');
1999
+
2000
+ if ($defineProperty) {
2001
+ try {
2002
+ $defineProperty({}, 'a', { value: 1 });
2003
+ } catch (e) {
2004
+ // IE 8 has a broken defineProperty
2005
+ $defineProperty = null;
2006
+ }
2007
+ }
2008
+
2009
+ module.exports = function callBind(originalFunction) {
2010
+ var func = $reflectApply(functionBind, $call, arguments);
2011
+ if ($gOPD && $defineProperty) {
2012
+ var desc = $gOPD(func, 'length');
2013
+ if (desc.configurable) {
2014
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
2015
+ $defineProperty(
2016
+ func,
2017
+ 'length',
2018
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
2019
+ );
2020
+ }
2021
+ }
2022
+ return func;
2023
+ };
2024
+
2025
+ var applyBind = function applyBind() {
2026
+ return $reflectApply(functionBind, $apply, arguments);
2027
+ };
2028
+
2029
+ if ($defineProperty) {
2030
+ $defineProperty(module.exports, 'apply', { value: applyBind });
2031
+ } else {
2032
+ module.exports.apply = applyBind;
2033
+ }
2034
+ });
2035
+ callBind.apply;
2036
+
2037
+ var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
2038
+
2039
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2040
+ var intrinsic = getIntrinsic(name, !!allowMissing);
2041
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2042
+ return callBind(intrinsic);
2043
+ }
2044
+ return intrinsic;
2045
+ };
2046
+
2047
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2048
+
2049
+ if ($defineProperty) {
2050
+ try {
2051
+ $defineProperty({}, 'a', { value: 1 });
2052
+ } catch (e) {
2053
+ // IE 8 has a broken defineProperty
2054
+ $defineProperty = null;
2055
+ }
2056
+ }
2057
+
2058
+
2059
+
2060
+ var $isEnumerable$1 = callBound$1('Object.prototype.propertyIsEnumerable');
2061
+
2062
+ // eslint-disable-next-line max-params
2063
+ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
2064
+ if (!$defineProperty) {
2065
+ if (!IsDataDescriptor(desc)) {
2066
+ // ES3 does not support getters/setters
2067
+ return false;
2068
+ }
2069
+ if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {
2070
+ return false;
2071
+ }
2072
+
2073
+ // fallback for ES3
2074
+ if (P in O && $isEnumerable$1(O, P) !== !!desc['[[Enumerable]]']) {
2075
+ // a non-enumerable existing property
2076
+ return false;
2077
+ }
2078
+
2079
+ // property does not exist at all, or exists but is enumerable
2080
+ var V = desc['[[Value]]'];
2081
+ // eslint-disable-next-line no-param-reassign
2082
+ O[P] = V; // will use [[Define]]
2083
+ return SameValue(O[P], V);
2084
+ }
2085
+ $defineProperty(O, P, FromPropertyDescriptor(desc));
2086
+ return true;
2087
+ };
2088
+
2089
+ var $TypeError$4 = getIntrinsic('%TypeError%');
2090
+ var $SyntaxError = getIntrinsic('%SyntaxError%');
2091
+
2092
+
2093
+
2094
+ var predicates = {
2095
+ // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
2096
+ 'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
2097
+ if (Type(Desc) !== 'Object') {
2098
+ return false;
2099
+ }
2100
+ var allowed = {
2101
+ '[[Configurable]]': true,
2102
+ '[[Enumerable]]': true,
2103
+ '[[Get]]': true,
2104
+ '[[Set]]': true,
2105
+ '[[Value]]': true,
2106
+ '[[Writable]]': true
2107
+ };
2108
+
2109
+ for (var key in Desc) { // eslint-disable-line
2110
+ if (src(Desc, key) && !allowed[key]) {
2111
+ return false;
2112
+ }
2113
+ }
2114
+
2115
+ var isData = src(Desc, '[[Value]]');
2116
+ var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2117
+ if (isData && IsAccessor) {
2118
+ throw new $TypeError$4('Property Descriptors may not be both accessor and data descriptors');
2119
+ }
2120
+ return true;
2121
+ }
2122
+ };
2123
+
2124
+ var assertRecord = function assertRecord(Type, recordType, argumentName, value) {
2125
+ var predicate = predicates[recordType];
2126
+ if (typeof predicate !== 'function') {
2127
+ throw new $SyntaxError('unknown record type: ' + recordType);
2128
+ }
2129
+ if (!predicate(Type, value)) {
2130
+ throw new $TypeError$4(argumentName + ' must be a ' + recordType);
2131
+ }
2132
+ };
2133
+
2134
+ // https://262.ecma-international.org/5.1/#sec-8
2135
+
2136
+ var Type$1 = function Type(x) {
2137
+ if (x === null) {
2138
+ return 'Null';
2139
+ }
2140
+ if (typeof x === 'undefined') {
2141
+ return 'Undefined';
2142
+ }
2143
+ if (typeof x === 'function' || typeof x === 'object') {
2144
+ return 'Object';
2145
+ }
2146
+ if (typeof x === 'number') {
2147
+ return 'Number';
2148
+ }
2149
+ if (typeof x === 'boolean') {
2150
+ return 'Boolean';
2151
+ }
2152
+ if (typeof x === 'string') {
2153
+ return 'String';
2154
+ }
2155
+ };
2156
+
2157
+ // https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
2158
+
2159
+ var Type = function Type(x) {
2160
+ if (typeof x === 'symbol') {
2161
+ return 'Symbol';
2162
+ }
2163
+ if (typeof x === 'bigint') {
2164
+ return 'BigInt';
2165
+ }
2166
+ return Type$1(x);
2167
+ };
2168
+
2169
+ // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
2170
+
2171
+ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
2172
+ if (typeof Desc === 'undefined') {
2173
+ return Desc;
2174
+ }
2175
+
2176
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
2177
+
2178
+ var obj = {};
2179
+ if ('[[Value]]' in Desc) {
2180
+ obj.value = Desc['[[Value]]'];
2181
+ }
2182
+ if ('[[Writable]]' in Desc) {
2183
+ obj.writable = Desc['[[Writable]]'];
2184
+ }
2185
+ if ('[[Get]]' in Desc) {
2186
+ obj.get = Desc['[[Get]]'];
2187
+ }
2188
+ if ('[[Set]]' in Desc) {
2189
+ obj.set = Desc['[[Set]]'];
2190
+ }
2191
+ if ('[[Enumerable]]' in Desc) {
2192
+ obj.enumerable = Desc['[[Enumerable]]'];
2193
+ }
2194
+ if ('[[Configurable]]' in Desc) {
2195
+ obj.configurable = Desc['[[Configurable]]'];
2196
+ }
2197
+ return obj;
2198
+ };
2199
+
2200
+ var $gOPD$1 = getIntrinsic('%Object.getOwnPropertyDescriptor%');
2201
+ if ($gOPD$1) {
2202
+ try {
2203
+ $gOPD$1([], 'length');
2204
+ } catch (e) {
2205
+ // IE 8 has a broken gOPD
2206
+ $gOPD$1 = null;
2207
+ }
2208
+ }
2209
+
2210
+ var getOwnPropertyDescriptor = $gOPD$1;
2211
+
2212
+ var $Array = getIntrinsic('%Array%');
2213
+
2214
+ // eslint-disable-next-line global-require
2215
+ var toStr$1 = !$Array.isArray && callBound$1('Object.prototype.toString');
2216
+
2217
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
2218
+
2219
+ var IsArray = $Array.isArray || function IsArray(argument) {
2220
+ return toStr$1(argument) === '[object Array]';
2221
+ };
2222
+
2223
+ // https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
2224
+
2225
+ var IsPropertyKey = function IsPropertyKey(argument) {
2226
+ return typeof argument === 'string' || typeof argument === 'symbol';
2227
+ };
2228
+
2229
+ var shams = function hasToStringTagShams() {
2230
+ return shams$1() && !!Symbol.toStringTag;
2231
+ };
2232
+
2233
+ var hasToStringTag$1 = shams();
2234
+ var has;
2235
+ var $exec;
2236
+ var isRegexMarker;
2237
+ var badStringifier;
2238
+
2239
+ if (hasToStringTag$1) {
2240
+ has = callBound$1('Object.prototype.hasOwnProperty');
2241
+ $exec = callBound$1('RegExp.prototype.exec');
2242
+ isRegexMarker = {};
2243
+
2244
+ var throwRegexMarker = function () {
2245
+ throw isRegexMarker;
2246
+ };
2247
+ badStringifier = {
2248
+ toString: throwRegexMarker,
2249
+ valueOf: throwRegexMarker
2250
+ };
2251
+
2252
+ if (typeof Symbol.toPrimitive === 'symbol') {
2253
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
2254
+ }
2255
+ }
2256
+
2257
+ var $toString = callBound$1('Object.prototype.toString');
2258
+ var gOPD = Object.getOwnPropertyDescriptor;
2259
+ var regexClass = '[object RegExp]';
2260
+
2261
+ var isRegex = hasToStringTag$1
2262
+ // eslint-disable-next-line consistent-return
2263
+ ? function isRegex(value) {
2264
+ if (!value || typeof value !== 'object') {
2265
+ return false;
2266
+ }
2267
+
2268
+ var descriptor = gOPD(value, 'lastIndex');
2269
+ var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
2270
+ if (!hasLastIndexDataProperty) {
2271
+ return false;
2272
+ }
2273
+
2274
+ try {
2275
+ $exec(value, badStringifier);
2276
+ } catch (e) {
2277
+ return e === isRegexMarker;
2278
+ }
2279
+ }
2280
+ : function isRegex(value) {
2281
+ // In older browsers, typeof regex incorrectly returns 'function'
2282
+ if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
2283
+ return false;
2284
+ }
2285
+
2286
+ return $toString(value) === regexClass;
2287
+ };
2288
+
2289
+ // http://262.ecma-international.org/5.1/#sec-9.2
2290
+
2291
+ var ToBoolean = function ToBoolean(value) { return !!value; };
2292
+
2293
+ var $match = getIntrinsic('%Symbol.match%', true);
2294
+
2295
+
2296
+
2297
+
2298
+
2299
+ // https://ecma-international.org/ecma-262/6.0/#sec-isregexp
2300
+
2301
+ var IsRegExp = function IsRegExp(argument) {
2302
+ if (!argument || typeof argument !== 'object') {
2303
+ return false;
2304
+ }
2305
+ if ($match) {
2306
+ var isRegExp = argument[$match];
2307
+ if (typeof isRegExp !== 'undefined') {
2308
+ return ToBoolean(isRegExp);
2309
+ }
2310
+ }
2311
+ return isRegex(argument);
2312
+ };
2313
+
2314
+ var fnToStr = Function.prototype.toString;
2315
+ var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
2316
+ var badArrayLike;
2317
+ var isCallableMarker;
2318
+ if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
2319
+ try {
2320
+ badArrayLike = Object.defineProperty({}, 'length', {
2321
+ get: function () {
2322
+ throw isCallableMarker;
2323
+ }
2324
+ });
2325
+ isCallableMarker = {};
2326
+ // eslint-disable-next-line no-throw-literal
2327
+ reflectApply(function () { throw 42; }, null, badArrayLike);
2328
+ } catch (_) {
2329
+ if (_ !== isCallableMarker) {
2330
+ reflectApply = null;
2331
+ }
2332
+ }
2333
+ } else {
2334
+ reflectApply = null;
2335
+ }
2336
+
2337
+ var constructorRegex = /^\s*class\b/;
2338
+ var isES6ClassFn = function isES6ClassFunction(value) {
2339
+ try {
2340
+ var fnStr = fnToStr.call(value);
2341
+ return constructorRegex.test(fnStr);
2342
+ } catch (e) {
2343
+ return false; // not a function
2344
+ }
2345
+ };
2346
+
2347
+ var tryFunctionObject = function tryFunctionToStr(value) {
2348
+ try {
2349
+ if (isES6ClassFn(value)) { return false; }
2350
+ fnToStr.call(value);
2351
+ return true;
2352
+ } catch (e) {
2353
+ return false;
2354
+ }
2355
+ };
2356
+ var toStr = Object.prototype.toString;
2357
+ var fnClass = '[object Function]';
2358
+ var genClass = '[object GeneratorFunction]';
2359
+ var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
2360
+ /* globals document: false */
2361
+ var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
2362
+
2363
+ var isCallable = reflectApply
2364
+ ? function isCallable(value) {
2365
+ if (value === documentDotAll) { return true; }
2366
+ if (!value) { return false; }
2367
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2368
+ if (typeof value === 'function' && !value.prototype) { return true; }
2369
+ try {
2370
+ reflectApply(value, null, badArrayLike);
2371
+ } catch (e) {
2372
+ if (e !== isCallableMarker) { return false; }
2373
+ }
2374
+ return !isES6ClassFn(value);
2375
+ }
2376
+ : function isCallable(value) {
2377
+ if (value === documentDotAll) { return true; }
2378
+ if (!value) { return false; }
2379
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2380
+ if (typeof value === 'function' && !value.prototype) { return true; }
2381
+ if (hasToStringTag) { return tryFunctionObject(value); }
2382
+ if (isES6ClassFn(value)) { return false; }
2383
+ var strClass = toStr.call(value);
2384
+ return strClass === fnClass || strClass === genClass;
2385
+ };
2386
+
2387
+ // http://262.ecma-international.org/5.1/#sec-9.11
2388
+
2389
+ var IsCallable = isCallable;
2390
+
2391
+ var $TypeError$3 = getIntrinsic('%TypeError%');
2392
+
2393
+
2394
+
2395
+
2396
+
2397
+ // https://262.ecma-international.org/5.1/#sec-8.10.5
2398
+
2399
+ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
2400
+ if (Type(Obj) !== 'Object') {
2401
+ throw new $TypeError$3('ToPropertyDescriptor requires an object');
2402
+ }
2403
+
2404
+ var desc = {};
2405
+ if (src(Obj, 'enumerable')) {
2406
+ desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
2407
+ }
2408
+ if (src(Obj, 'configurable')) {
2409
+ desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
2410
+ }
2411
+ if (src(Obj, 'value')) {
2412
+ desc['[[Value]]'] = Obj.value;
2413
+ }
2414
+ if (src(Obj, 'writable')) {
2415
+ desc['[[Writable]]'] = ToBoolean(Obj.writable);
2416
+ }
2417
+ if (src(Obj, 'get')) {
2418
+ var getter = Obj.get;
2419
+ if (typeof getter !== 'undefined' && !IsCallable(getter)) {
2420
+ throw new $TypeError$3('getter must be a function');
2421
+ }
2422
+ desc['[[Get]]'] = getter;
2423
+ }
2424
+ if (src(Obj, 'set')) {
2425
+ var setter = Obj.set;
2426
+ if (typeof setter !== 'undefined' && !IsCallable(setter)) {
2427
+ throw new $TypeError$3('setter must be a function');
2428
+ }
2429
+ desc['[[Set]]'] = setter;
2430
+ }
2431
+
2432
+ if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
2433
+ throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2434
+ }
2435
+ return desc;
2436
+ };
2437
+
2438
+ var $TypeError$2 = getIntrinsic('%TypeError%');
2439
+
2440
+
2441
+
2442
+ var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
2443
+
2444
+
2445
+
2446
+
2447
+
2448
+
2449
+
2450
+
2451
+
2452
+ // https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
2453
+
2454
+ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
2455
+ if (Type(O) !== 'Object') {
2456
+ throw new $TypeError$2('Assertion failed: O must be an Object');
2457
+ }
2458
+ if (!IsPropertyKey(P)) {
2459
+ throw new $TypeError$2('Assertion failed: P must be a Property Key');
2460
+ }
2461
+ if (!src(O, P)) {
2462
+ return void 0;
2463
+ }
2464
+ if (!getOwnPropertyDescriptor) {
2465
+ // ES3 / IE 8 fallback
2466
+ var arrayLength = IsArray(O) && P === 'length';
2467
+ var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
2468
+ return {
2469
+ '[[Configurable]]': !(arrayLength || regexLastIndex),
2470
+ '[[Enumerable]]': $isEnumerable(O, P),
2471
+ '[[Value]]': O[P],
2472
+ '[[Writable]]': true
2473
+ };
2474
+ }
2475
+ return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
2476
+ };
2477
+
2478
+ // https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
2479
+
2480
+ var IsDataDescriptor = function IsDataDescriptor(Desc) {
2481
+ if (typeof Desc === 'undefined') {
2482
+ return false;
2483
+ }
2484
+
2485
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
2486
+
2487
+ if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
2488
+ return false;
2489
+ }
2490
+
2491
+ return true;
2492
+ };
2493
+
2494
+ var isPrimitive = function isPrimitive(value) {
2495
+ return value === null || (typeof value !== 'function' && typeof value !== 'object');
2496
+ };
2497
+
2498
+ var $Object$1 = getIntrinsic('%Object%');
2499
+
2500
+
2501
+
2502
+ var $preventExtensions = $Object$1.preventExtensions;
2503
+ var $isExtensible = $Object$1.isExtensible;
2504
+
2505
+ // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
2506
+
2507
+ var IsExtensible = $preventExtensions
2508
+ ? function IsExtensible(obj) {
2509
+ return !isPrimitive(obj) && $isExtensible(obj);
2510
+ }
2511
+ : function IsExtensible(obj) {
2512
+ return !isPrimitive(obj);
2513
+ };
2514
+
2515
+ var _isNaN = Number.isNaN || function isNaN(a) {
2516
+ return a !== a;
2517
+ };
2518
+
2519
+ // http://262.ecma-international.org/5.1/#sec-9.12
2520
+
2521
+ var SameValue = function SameValue(x, y) {
2522
+ if (x === y) { // 0 === -0, but they are not identical.
2523
+ if (x === 0) { return 1 / x === 1 / y; }
2524
+ return true;
2525
+ }
2526
+ return _isNaN(x) && _isNaN(y);
2527
+ };
2528
+
2529
+ var $TypeError$1 = getIntrinsic('%TypeError%');
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+
2539
+
2540
+
2541
+ // https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
2542
+
2543
+ var CreateDataProperty = function CreateDataProperty(O, P, V) {
2544
+ if (Type(O) !== 'Object') {
2545
+ throw new $TypeError$1('Assertion failed: Type(O) is not Object');
2546
+ }
2547
+ if (!IsPropertyKey(P)) {
2548
+ throw new $TypeError$1('Assertion failed: IsPropertyKey(P) is not true');
2549
+ }
2550
+ var oldDesc = OrdinaryGetOwnProperty(O, P);
2551
+ var extensible = !oldDesc || IsExtensible(O);
2552
+ var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
2553
+ if (immutable || !extensible) {
2554
+ return false;
2555
+ }
2556
+ return DefineOwnProperty(
2557
+ IsDataDescriptor,
2558
+ SameValue,
2559
+ FromPropertyDescriptor,
2560
+ O,
2561
+ P,
2562
+ {
2563
+ '[[Configurable]]': true,
2564
+ '[[Enumerable]]': true,
2565
+ '[[Value]]': V,
2566
+ '[[Writable]]': true
2567
+ }
2568
+ );
2569
+ };
2570
+
2571
+ var $TypeError = getIntrinsic('%TypeError%');
2572
+
2573
+ // http://262.ecma-international.org/5.1/#sec-9.10
2574
+
2575
+ var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
2576
+ if (value == null) {
2577
+ throw new $TypeError(optMessage || ('Cannot call method on ' + value));
2578
+ }
2579
+ return value;
2580
+ };
2581
+
2582
+ var RequireObjectCoercible = CheckObjectCoercible;
2583
+
2584
+ var $Object = getIntrinsic('%Object%');
2585
+
2586
+
2587
+
2588
+ // https://ecma-international.org/ecma-262/6.0/#sec-toobject
2589
+
2590
+ var ToObject = function ToObject(value) {
2591
+ RequireObjectCoercible(value);
2592
+ return $Object(value);
2593
+ };
2594
+
2595
+ var $gOPD = Object.getOwnPropertyDescriptor;
2596
+ var $getOwnNames = Object.getOwnPropertyNames;
2597
+ var $getSymbols = Object.getOwnPropertySymbols;
2598
+ var $concat$1 = callBound$1('Array.prototype.concat');
2599
+ var $reduce = callBound$1('Array.prototype.reduce');
2600
+ var getAll = $getSymbols ? function (obj) {
2601
+ return $concat$1($getOwnNames(obj), $getSymbols(obj));
2602
+ } : $getOwnNames;
2603
+
2604
+ var isES5$1 = IsCallable($gOPD) && IsCallable($getOwnNames);
2605
+
2606
+ var implementation$1 = function getOwnPropertyDescriptors(value) {
2607
+ RequireObjectCoercible(value);
2608
+ if (!isES5$1) {
2609
+ throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
2610
+ }
2611
+
2612
+ var O = ToObject(value);
2613
+ return $reduce(
2614
+ getAll(O),
2615
+ function (acc, key) {
2616
+ var descriptor = $gOPD(O, key);
2617
+ if (typeof descriptor !== 'undefined') {
2618
+ CreateDataProperty(acc, key, descriptor);
2619
+ }
2620
+ return acc;
2621
+ },
2622
+ {}
2623
+ );
2624
+ };
2625
+
2626
+ var polyfill$2 = function getPolyfill() {
2627
+ return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$1;
2628
+ };
2629
+
2630
+ var shim$1 = function shimGetOwnPropertyDescriptors() {
2631
+ var polyfill = polyfill$2();
2632
+ defineProperties_1(
2633
+ Object,
2634
+ { getOwnPropertyDescriptors: polyfill },
2635
+ { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } }
2636
+ );
2637
+ return polyfill;
2638
+ };
2639
+
2640
+ var bound = callBind(polyfill$2(), Object);
2641
+
2642
+ defineProperties_1(bound, {
2643
+ getPolyfill: polyfill$2,
2644
+ implementation: implementation$1,
2645
+ shim: shim$1
2646
+ });
2647
+
2648
+ var object_getownpropertydescriptors = bound;
2649
+
2650
+ // TODO; semver-major: remove
2651
+
2652
+ var callBound = callBound$1;
2653
+
2654
+ var isES5 = typeof Object.defineProperty === 'function'
2655
+ && typeof Object.defineProperties === 'function';
2656
+
2657
+ var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto
2658
+
2659
+ if (!isES5 || !hasProto) {
2660
+ throw new TypeError('util.promisify requires a true ES5 environment, that also supports `__proto__`');
2661
+ }
2662
+
2663
+
2664
+
2665
+ if (typeof Promise !== 'function') {
2666
+ throw new TypeError('`Promise` must be globally available for util.promisify to work.');
2667
+ }
2668
+
2669
+
2670
+
2671
+ var $slice = callBound('Array.prototype.slice');
2672
+ var $concat = callBound('Array.prototype.concat');
2673
+ var $forEach = callBound('Array.prototype.forEach');
2674
+
2675
+ var hasSymbols = hasSymbols$2();
2676
+
2677
+ var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
2678
+ var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
2679
+
2680
+ var implementation = function promisify(orig) {
2681
+ if (typeof orig !== 'function') {
2682
+ var error = new TypeError('The "original" argument must be of type function');
2683
+ error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
2684
+ error.code = 'ERR_INVALID_ARG_TYPE';
2685
+ throw error;
2686
+ }
2687
+
2688
+ if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
2689
+ var customFunction = orig[kCustomPromisifiedSymbol];
2690
+ if (typeof customFunction !== 'function') {
2691
+ throw new TypeError('The [util.promisify.custom] property must be a function');
2692
+ }
2693
+ Object.defineProperty(customFunction, kCustomPromisifiedSymbol, {
2694
+ configurable: true,
2695
+ enumerable: false,
2696
+ value: customFunction,
2697
+ writable: false
2698
+ });
2699
+ return customFunction;
2700
+ }
2701
+
2702
+ // Names to create an object from in case the callback receives multiple
2703
+ // arguments, e.g. ['stdout', 'stderr'] for child_process.exec.
2704
+ var argumentNames = orig[kCustomPromisifyArgsSymbol];
2705
+
2706
+ var promisified = function fn() {
2707
+ var args = $slice(arguments);
2708
+ var self = this; // eslint-disable-line no-invalid-this
2709
+ return new Promise(function (resolve, reject) {
2710
+ orig.apply(self, $concat(args, function (err) {
2711
+ var values = arguments.length > 1 ? $slice(arguments, 1) : [];
2712
+ if (err) {
2713
+ reject(err);
2714
+ } else if (typeof argumentNames !== 'undefined' && values.length > 1) {
2715
+ var obj = {};
2716
+ $forEach(argumentNames, function (name, index) {
2717
+ obj[name] = values[index];
2718
+ });
2719
+ resolve(obj);
2720
+ } else {
2721
+ resolve(values[0]);
2722
+ }
2723
+ }));
2724
+ });
2725
+ };
2726
+
2727
+ promisified.__proto__ = orig.__proto__; // eslint-disable-line no-proto
2728
+
2729
+ Object.defineProperty(promisified, kCustomPromisifiedSymbol, {
2730
+ configurable: true,
2731
+ enumerable: false,
2732
+ value: promisified,
2733
+ writable: false
2734
+ });
2735
+ return Object.defineProperties(promisified, object_getownpropertydescriptors(orig));
2736
+ };
2737
+
2738
+ var custom = kCustomPromisifiedSymbol;
2739
+ var customPromisifyArgs = kCustomPromisifyArgsSymbol;
2740
+ implementation.custom = custom;
2741
+ implementation.customPromisifyArgs = customPromisifyArgs;
2742
+
2743
+ var polyfill$1 = function getPolyfill() {
2744
+ if (typeof util.util.promisify === 'function') {
2745
+ return util.util.promisify;
2746
+ }
2747
+ return implementation;
2748
+ };
2749
+
2750
+ var shim = function shimUtilPromisify() {
2751
+ var polyfill = polyfill$1();
2752
+ if (polyfill !== util.util.promisify) {
2753
+ Object.defineProperty(util.util, 'promisify', {
2754
+ configurable: true,
2755
+ enumerable: true,
2756
+ value: polyfill,
2757
+ writable: true
2758
+ });
2759
+ }
2760
+ return polyfill;
2761
+ };
2762
+
2763
+ var polyfill = polyfill$1();
2764
+
2765
+
2766
+ /* eslint-disable no-unused-vars */
2767
+ var boundPromisify = function promisify(orig) {
2768
+ /* eslint-enable no-unused-vars */
2769
+ return polyfill.apply(util.util, arguments);
2770
+ };
2771
+ defineProperties_1(boundPromisify, {
2772
+ custom: polyfill.custom,
2773
+ customPromisifyArgs: polyfill.customPromisifyArgs,
2774
+ getPolyfill: polyfill$1,
2775
+ implementation: implementation,
2776
+ shim: shim
2777
+ });
2778
+
2779
+ var util_promisify = boundPromisify;
2780
+
2781
+ util_promisify.shim();
1329
2782
 
1330
2783
  function connect() {
1331
2784
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -1342,19 +2795,19 @@ function connect() {
1342
2795
  var connection = mysql__default["default"].createConnection(config);
1343
2796
  return {
1344
2797
  query: function query(sql, args) {
1345
- return util$1.util.promisify(connection.query).call(connection, sql, args);
2798
+ return util.util.promisify(connection.query).call(connection, sql, args);
1346
2799
  },
1347
2800
  beginTransaction: function beginTransaction() {
1348
- return util$1.util.promisify(connection.beginTransaction).call(connection);
2801
+ return util.util.promisify(connection.beginTransaction).call(connection);
1349
2802
  },
1350
2803
  commit: function commit() {
1351
- return util$1.util.promisify(connection.commit).call(connection);
2804
+ return util.util.promisify(connection.commit).call(connection);
1352
2805
  },
1353
2806
  rollback: function rollback() {
1354
- return util$1.util.promisify(connection.rollback).call(connection);
2807
+ return util.util.promisify(connection.rollback).call(connection);
1355
2808
  },
1356
2809
  close: function close() {
1357
- return util$1.util.promisify(connection.end).call(connection);
2810
+ return util.util.promisify(connection.end).call(connection);
1358
2811
  }
1359
2812
  };
1360
2813
  }