@tryghost/content-api 1.8.0 → 1.9.0

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/es/content-api.js CHANGED
@@ -25,7 +25,7 @@ var check = function (it) {
25
25
 
26
26
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
27
27
  var global_1 =
28
- // eslint-disable-next-line es/no-global-this -- safe
28
+ // eslint-disable-next-line es-x/no-global-this -- safe
29
29
  check(typeof globalThis == 'object' && globalThis) ||
30
30
  check(typeof window == 'object' && window) ||
31
31
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -44,11 +44,12 @@ var fails = function (exec) {
44
44
 
45
45
  // Detect IE8's incomplete defineProperty implementation
46
46
  var descriptors = !fails(function () {
47
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
47
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
48
48
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
49
49
  });
50
50
 
51
51
  var functionBindNative = !fails(function () {
52
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
52
53
  var test = (function () { /* empty */ }).bind();
53
54
  // eslint-disable-next-line no-prototype-builtins -- safe
54
55
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -61,7 +62,7 @@ var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
61
62
  };
62
63
 
63
64
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
64
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
65
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
65
66
  var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor;
66
67
 
67
68
  // Nashorn ~ JDK8 bug
@@ -159,35 +160,35 @@ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
159
160
  var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
160
161
 
161
162
  var process$4 = global_1.process;
162
- var Deno = global_1.Deno;
163
- var versions = process$4 && process$4.versions || Deno && Deno.version;
163
+ var Deno$1 = global_1.Deno;
164
+ var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
164
165
  var v8 = versions && versions.v8;
165
- var match, version;
166
+ var match, version$1;
166
167
 
167
168
  if (v8) {
168
169
  match = v8.split('.');
169
170
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
170
171
  // but their correct versions are not interesting for us
171
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
172
+ version$1 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
172
173
  }
173
174
 
174
175
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
175
176
  // so check `userAgent` even if `.v8` exists, but 0
176
- if (!version && engineUserAgent) {
177
+ if (!version$1 && engineUserAgent) {
177
178
  match = engineUserAgent.match(/Edge\/(\d+)/);
178
179
  if (!match || match[1] >= 74) {
179
180
  match = engineUserAgent.match(/Chrome\/(\d+)/);
180
- if (match) version = +match[1];
181
+ if (match) version$1 = +match[1];
181
182
  }
182
183
  }
183
184
 
184
- var engineV8Version = version;
185
+ var engineV8Version = version$1;
185
186
 
186
- /* eslint-disable es/no-symbol -- required for testing */
187
+ /* eslint-disable es-x/no-symbol -- required for testing */
187
188
 
188
189
 
189
190
 
190
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
191
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
191
192
  var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
192
193
  var symbol = Symbol();
193
194
  // Chrome 38 Symbol has incorrect toString conversion
@@ -197,7 +198,7 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
197
198
  !Symbol.sham && engineV8Version && engineV8Version < 41;
198
199
  });
199
200
 
200
- /* eslint-disable es/no-symbol -- required for testing */
201
+ /* eslint-disable es-x/no-symbol -- required for testing */
201
202
 
202
203
 
203
204
  var useSymbolAsUid = nativeSymbol
@@ -250,7 +251,7 @@ var ordinaryToPrimitive = function (input, pref) {
250
251
  throw TypeError$f("Can't convert object to primitive value");
251
252
  };
252
253
 
253
- // eslint-disable-next-line es/no-object-defineproperty -- safe
254
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
254
255
  var defineProperty$3 = Object.defineProperty;
255
256
 
256
257
  var setGlobal = function (key, value) {
@@ -270,10 +271,10 @@ var shared = createCommonjsModule(function (module) {
270
271
  (module.exports = function (key, value) {
271
272
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
272
273
  })('versions', []).push({
273
- version: '3.21.1',
274
+ version: '3.22.0',
274
275
  mode: 'global',
275
276
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
276
- license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
277
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.0/LICENSE',
277
278
  source: 'https://github.com/zloirock/core-js'
278
279
  });
279
280
  });
@@ -290,6 +291,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
290
291
 
291
292
  // `HasOwnProperty` abstract operation
292
293
  // https://tc39.es/ecma262/#sec-hasownproperty
294
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
293
295
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
294
296
  return hasOwnProperty(toObject(it), key);
295
297
  };
@@ -356,13 +358,13 @@ var documentCreateElement = function (it) {
356
358
 
357
359
  // Thanks to IE8 for its funny defineProperty
358
360
  var ie8DomDefine = !descriptors && !fails(function () {
359
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
361
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
360
362
  return Object.defineProperty(documentCreateElement('div'), 'a', {
361
363
  get: function () { return 7; }
362
364
  }).a != 7;
363
365
  });
364
366
 
365
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
367
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
366
368
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
367
369
 
368
370
  // `Object.getOwnPropertyDescriptor` method
@@ -383,7 +385,7 @@ var objectGetOwnPropertyDescriptor = {
383
385
  // V8 ~ Chrome 36-
384
386
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
385
387
  var v8PrototypeDefineBug = descriptors && fails(function () {
386
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
388
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
387
389
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
388
390
  value: 42,
389
391
  writable: false
@@ -400,9 +402,9 @@ var anObject = function (argument) {
400
402
  };
401
403
 
402
404
  var TypeError$c = global_1.TypeError;
403
- // eslint-disable-next-line es/no-object-defineproperty -- safe
405
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
404
406
  var $defineProperty = Object.defineProperty;
405
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
407
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
406
408
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
407
409
  var ENUMERABLE = 'enumerable';
408
410
  var CONFIGURABLE$1 = 'configurable';
@@ -532,7 +534,7 @@ var internalState = {
532
534
  };
533
535
 
534
536
  var FunctionPrototype$2 = Function.prototype;
535
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
537
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
536
538
  var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
537
539
 
538
540
  var EXISTS = hasOwnProperty_1(FunctionPrototype$2, 'name');
@@ -686,7 +688,7 @@ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
686
688
 
687
689
  // `Object.getOwnPropertyNames` method
688
690
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
689
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
691
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
690
692
  var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
691
693
  return objectKeysInternal(O, hiddenKeys);
692
694
  };
@@ -695,7 +697,7 @@ var objectGetOwnPropertyNames = {
695
697
  f: f$3
696
698
  };
697
699
 
698
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
700
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
699
701
  var f$2 = Object.getOwnPropertySymbols;
700
702
 
701
703
  var objectGetOwnPropertySymbols = {
@@ -865,7 +867,7 @@ if (!toStringTagSupport) {
865
867
 
866
868
  // `Object.keys` method
867
869
  // https://tc39.es/ecma262/#sec-object.keys
868
- // eslint-disable-next-line es/no-object-keys -- safe
870
+ // eslint-disable-next-line es-x/no-object-keys -- safe
869
871
  var objectKeys = Object.keys || function keys(O) {
870
872
  return objectKeysInternal(O, enumBugKeys);
871
873
  };
@@ -882,7 +884,7 @@ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
882
884
 
883
885
  // `IsArray` abstract operation
884
886
  // https://tc39.es/ecma262/#sec-isarray
885
- // eslint-disable-next-line es/no-array-isarray -- safe
887
+ // eslint-disable-next-line es-x/no-array-isarray -- safe
886
888
  var isArray$1 = Array.isArray || function isArray(argument) {
887
889
  return classofRaw(argument) == 'Array';
888
890
  };
@@ -1001,12 +1003,12 @@ var isConcatSpreadable = function (O) {
1001
1003
  return spreadable !== undefined ? !!spreadable : isArray$1(O);
1002
1004
  };
1003
1005
 
1004
- var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1006
+ var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1005
1007
 
1006
1008
  // `Array.prototype.concat` method
1007
1009
  // https://tc39.es/ecma262/#sec-array.prototype.concat
1008
1010
  // with adding support of @@isConcatSpreadable and @@species
1009
- _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
1011
+ _export({ target: 'Array', proto: true, forced: FORCED }, {
1010
1012
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1011
1013
  concat: function concat(arg) {
1012
1014
  var O = toObject(this);
@@ -1031,7 +1033,7 @@ _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
1031
1033
 
1032
1034
  // `Object.defineProperties` method
1033
1035
  // https://tc39.es/ecma262/#sec-object.defineproperties
1034
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1036
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1035
1037
  var f$1 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
1036
1038
  anObject(O);
1037
1039
  var props = toIndexedObject(Properties);
@@ -1120,6 +1122,7 @@ hiddenKeys$1[IE_PROTO] = true;
1120
1122
 
1121
1123
  // `Object.create` method
1122
1124
  // https://tc39.es/ecma262/#sec-object.create
1125
+ // eslint-disable-next-line es-x/no-object-create -- safe
1123
1126
  var objectCreate = Object.create || function create(O, Properties) {
1124
1127
  var result;
1125
1128
  if (O !== null) {
@@ -1238,7 +1241,7 @@ var regexpUnsupportedNcg = fails(function () {
1238
1241
 
1239
1242
 
1240
1243
 
1241
- var getInternalState$1 = internalState.get;
1244
+ var getInternalState = internalState.get;
1242
1245
 
1243
1246
 
1244
1247
 
@@ -1268,7 +1271,7 @@ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || regexp
1268
1271
  if (PATCH) {
1269
1272
  patchedExec = function exec(string) {
1270
1273
  var re = this;
1271
- var state = getInternalState$1(re);
1274
+ var state = getInternalState(re);
1272
1275
  var str = toString_1(string);
1273
1276
  var raw = state.raw;
1274
1277
  var result, reCopy, lastIndex, match, i, object, group;
@@ -1557,7 +1560,7 @@ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
1557
1560
 
1558
1561
 
1559
1562
 
1560
- // eslint-disable-next-line es/no-string-prototype-endswith -- safe
1563
+ // eslint-disable-next-line es-x/no-string-prototype-endswith -- safe
1561
1564
  var un$EndsWith = functionUncurryThis(''.endsWith);
1562
1565
  var slice = functionUncurryThis(''.slice);
1563
1566
  var min$1 = Math.min;
@@ -1593,7 +1596,7 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1593
1596
 
1594
1597
 
1595
1598
 
1596
- // eslint-disable-next-line es/no-string-prototype-startswith -- safe
1599
+ // eslint-disable-next-line es-x/no-string-prototype-startswith -- safe
1597
1600
  var un$StartsWith = functionUncurryThis(''.startsWith);
1598
1601
  var stringSlice = functionUncurryThis(''.slice);
1599
1602
  var min = Math.min;
@@ -1619,7 +1622,7 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_I
1619
1622
  }
1620
1623
  });
1621
1624
 
1622
- var nativePromiseConstructor = global_1.Promise;
1625
+ var engineIsNode = classofRaw(global_1.process) == 'process';
1623
1626
 
1624
1627
  var redefineAll = function (target, src, options) {
1625
1628
  for (var key in src) redefine(target, key, src[key], options);
@@ -1642,13 +1645,13 @@ var aPossiblePrototype = function (argument) {
1642
1645
  // `Object.setPrototypeOf` method
1643
1646
  // https://tc39.es/ecma262/#sec-object.setprototypeof
1644
1647
  // Works with __proto__ only. Old v8 can't work with null proto objects.
1645
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1648
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
1646
1649
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1647
1650
  var CORRECT_SETTER = false;
1648
1651
  var test = {};
1649
1652
  var setter;
1650
1653
  try {
1651
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1654
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1652
1655
  setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1653
1656
  setter(test, []);
1654
1657
  CORRECT_SETTER = test instanceof Array;
@@ -1696,160 +1699,12 @@ var anInstance = function (it, Prototype) {
1696
1699
  throw TypeError$6('Incorrect invocation');
1697
1700
  };
1698
1701
 
1699
- var bind$2 = functionUncurryThis(functionUncurryThis.bind);
1700
-
1701
- // optional / simple context binding
1702
- var functionBindContext = function (fn, that) {
1703
- aCallable(fn);
1704
- return that === undefined ? fn : functionBindNative ? bind$2(fn, that) : function (/* ...args */) {
1705
- return fn.apply(that, arguments);
1706
- };
1707
- };
1708
-
1709
- var iterators = {};
1710
-
1711
- var ITERATOR$2 = wellKnownSymbol('iterator');
1712
- var ArrayPrototype = Array.prototype;
1713
-
1714
- // check on default Array iterator
1715
- var isArrayIteratorMethod = function (it) {
1716
- return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
1717
- };
1718
-
1719
- var ITERATOR$1 = wellKnownSymbol('iterator');
1720
-
1721
- var getIteratorMethod = function (it) {
1722
- if (it != undefined) return getMethod(it, ITERATOR$1)
1723
- || getMethod(it, '@@iterator')
1724
- || iterators[classof(it)];
1725
- };
1726
-
1727
1702
  var TypeError$5 = global_1.TypeError;
1728
1703
 
1729
- var getIterator = function (argument, usingIterator) {
1730
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1731
- if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
1732
- throw TypeError$5(tryToString(argument) + ' is not iterable');
1733
- };
1734
-
1735
- var iteratorClose = function (iterator, kind, value) {
1736
- var innerResult, innerError;
1737
- anObject(iterator);
1738
- try {
1739
- innerResult = getMethod(iterator, 'return');
1740
- if (!innerResult) {
1741
- if (kind === 'throw') throw value;
1742
- return value;
1743
- }
1744
- innerResult = functionCall(innerResult, iterator);
1745
- } catch (error) {
1746
- innerError = true;
1747
- innerResult = error;
1748
- }
1749
- if (kind === 'throw') throw value;
1750
- if (innerError) throw innerResult;
1751
- anObject(innerResult);
1752
- return value;
1753
- };
1754
-
1755
- var TypeError$4 = global_1.TypeError;
1756
-
1757
- var Result = function (stopped, result) {
1758
- this.stopped = stopped;
1759
- this.result = result;
1760
- };
1761
-
1762
- var ResultPrototype = Result.prototype;
1763
-
1764
- var iterate = function (iterable, unboundFunction, options) {
1765
- var that = options && options.that;
1766
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1767
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1768
- var INTERRUPTED = !!(options && options.INTERRUPTED);
1769
- var fn = functionBindContext(unboundFunction, that);
1770
- var iterator, iterFn, index, length, result, next, step;
1771
-
1772
- var stop = function (condition) {
1773
- if (iterator) iteratorClose(iterator, 'normal', condition);
1774
- return new Result(true, condition);
1775
- };
1776
-
1777
- var callFn = function (value) {
1778
- if (AS_ENTRIES) {
1779
- anObject(value);
1780
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1781
- } return INTERRUPTED ? fn(value, stop) : fn(value);
1782
- };
1783
-
1784
- if (IS_ITERATOR) {
1785
- iterator = iterable;
1786
- } else {
1787
- iterFn = getIteratorMethod(iterable);
1788
- if (!iterFn) throw TypeError$4(tryToString(iterable) + ' is not iterable');
1789
- // optimisation for array iterators
1790
- if (isArrayIteratorMethod(iterFn)) {
1791
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1792
- result = callFn(iterable[index]);
1793
- if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1794
- } return new Result(false);
1795
- }
1796
- iterator = getIterator(iterable, iterFn);
1797
- }
1798
-
1799
- next = iterator.next;
1800
- while (!(step = functionCall(next, iterator)).done) {
1801
- try {
1802
- result = callFn(step.value);
1803
- } catch (error) {
1804
- iteratorClose(iterator, 'throw', error);
1805
- }
1806
- if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1807
- } return new Result(false);
1808
- };
1809
-
1810
- var ITERATOR = wellKnownSymbol('iterator');
1811
- var SAFE_CLOSING = false;
1812
-
1813
- try {
1814
- var called = 0;
1815
- var iteratorWithReturn = {
1816
- next: function () {
1817
- return { done: !!called++ };
1818
- },
1819
- 'return': function () {
1820
- SAFE_CLOSING = true;
1821
- }
1822
- };
1823
- iteratorWithReturn[ITERATOR] = function () {
1824
- return this;
1825
- };
1826
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
1827
- Array.from(iteratorWithReturn, function () { throw 2; });
1828
- } catch (error) { /* empty */ }
1829
-
1830
- var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
1831
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
1832
- var ITERATION_SUPPORT = false;
1833
- try {
1834
- var object = {};
1835
- object[ITERATOR] = function () {
1836
- return {
1837
- next: function () {
1838
- return { done: ITERATION_SUPPORT = true };
1839
- }
1840
- };
1841
- };
1842
- exec(object);
1843
- } catch (error) { /* empty */ }
1844
- return ITERATION_SUPPORT;
1845
- };
1846
-
1847
- var TypeError$3 = global_1.TypeError;
1848
-
1849
1704
  // `Assert: IsConstructor(argument) is true`
1850
1705
  var aConstructor = function (argument) {
1851
1706
  if (isConstructor(argument)) return argument;
1852
- throw TypeError$3(tryToString(argument) + ' is not a constructor');
1707
+ throw TypeError$5(tryToString(argument) + ' is not a constructor');
1853
1708
  };
1854
1709
 
1855
1710
  var SPECIES$1 = wellKnownSymbol('species');
@@ -1866,24 +1721,32 @@ var FunctionPrototype$1 = Function.prototype;
1866
1721
  var apply = FunctionPrototype$1.apply;
1867
1722
  var call = FunctionPrototype$1.call;
1868
1723
 
1869
- // eslint-disable-next-line es/no-reflect -- safe
1724
+ // eslint-disable-next-line es-x/no-reflect -- safe
1870
1725
  var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
1871
1726
  return call.apply(apply, arguments);
1872
1727
  });
1873
1728
 
1729
+ var bind$2 = functionUncurryThis(functionUncurryThis.bind);
1730
+
1731
+ // optional / simple context binding
1732
+ var functionBindContext = function (fn, that) {
1733
+ aCallable(fn);
1734
+ return that === undefined ? fn : functionBindNative ? bind$2(fn, that) : function (/* ...args */) {
1735
+ return fn.apply(that, arguments);
1736
+ };
1737
+ };
1738
+
1874
1739
  var arraySlice = functionUncurryThis([].slice);
1875
1740
 
1876
- var TypeError$2 = global_1.TypeError;
1741
+ var TypeError$4 = global_1.TypeError;
1877
1742
 
1878
1743
  var validateArgumentsLength = function (passed, required) {
1879
- if (passed < required) throw TypeError$2('Not enough arguments');
1744
+ if (passed < required) throw TypeError$4('Not enough arguments');
1880
1745
  return passed;
1881
1746
  };
1882
1747
 
1883
1748
  var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
1884
1749
 
1885
- var engineIsNode = classofRaw(global_1.process) == 'process';
1886
-
1887
1750
  var set = global_1.setImmediate;
1888
1751
  var clear = global_1.clearImmediate;
1889
1752
  var process$3 = global_1.process;
@@ -2055,7 +1918,7 @@ if (!queueMicrotask) {
2055
1918
  // for other environments - macrotask based on:
2056
1919
  // - setImmediate
2057
1920
  // - MessageChannel
2058
- // - window.postMessag
1921
+ // - window.postMessage
2059
1922
  // - onreadystatechange
2060
1923
  // - setTimeout
2061
1924
  } else {
@@ -2076,36 +1939,6 @@ var microtask = queueMicrotask || function (fn) {
2076
1939
  } last = task;
2077
1940
  };
2078
1941
 
2079
- var PromiseCapability = function (C) {
2080
- var resolve, reject;
2081
- this.promise = new C(function ($$resolve, $$reject) {
2082
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
2083
- resolve = $$resolve;
2084
- reject = $$reject;
2085
- });
2086
- this.resolve = aCallable(resolve);
2087
- this.reject = aCallable(reject);
2088
- };
2089
-
2090
- // `NewPromiseCapability` abstract operation
2091
- // https://tc39.es/ecma262/#sec-newpromisecapability
2092
- var f = function (C) {
2093
- return new PromiseCapability(C);
2094
- };
2095
-
2096
- var newPromiseCapability$1 = {
2097
- f: f
2098
- };
2099
-
2100
- var promiseResolve = function (C, x) {
2101
- anObject(C);
2102
- if (isObject$1(x) && x.constructor === C) return x;
2103
- var promiseCapability = newPromiseCapability$1.f(C);
2104
- var resolve = promiseCapability.resolve;
2105
- resolve(x);
2106
- return promiseCapability.promise;
2107
- };
2108
-
2109
1942
  var hostReportErrors = function (a, b) {
2110
1943
  var console = global_1.console;
2111
1944
  if (console && console.error) {
@@ -2145,13 +1978,67 @@ Queue.prototype = {
2145
1978
 
2146
1979
  var queue = Queue;
2147
1980
 
2148
- var engineIsBrowser = typeof window == 'object';
1981
+ var promiseNativeConstructor = global_1.Promise;
2149
1982
 
2150
- var task = task$1.set;
1983
+ var engineIsBrowser = typeof window == 'object' && typeof Deno != 'object';
1984
+
1985
+ promiseNativeConstructor && promiseNativeConstructor.prototype;
1986
+ var SPECIES = wellKnownSymbol('species');
1987
+ var SUBCLASSING = false;
1988
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable(global_1.PromiseRejectionEvent);
1989
+
1990
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced_1('Promise', function () {
1991
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(promiseNativeConstructor);
1992
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(promiseNativeConstructor);
1993
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1994
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1995
+ // We can't detect it synchronously, so just check versions
1996
+ if (!GLOBAL_CORE_JS_PROMISE && engineV8Version === 66) return true;
1997
+ // We can't use @@species feature detection in V8 since it causes
1998
+ // deoptimization and performance degradation
1999
+ // https://github.com/zloirock/core-js/issues/679
2000
+ if (engineV8Version >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
2001
+ // Detect correctness of subclassing with @@species support
2002
+ var promise = new promiseNativeConstructor(function (resolve) { resolve(1); });
2003
+ var FakePromise = function (exec) {
2004
+ exec(function () { /* empty */ }, function () { /* empty */ });
2005
+ };
2006
+ var constructor = promise.constructor = {};
2007
+ constructor[SPECIES] = FakePromise;
2008
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2009
+ if (!SUBCLASSING) return true;
2010
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2011
+ return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_PROMISE_REJECTION_EVENT$1;
2012
+ });
2151
2013
 
2014
+ var promiseConstructorDetection = {
2015
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
2016
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
2017
+ SUBCLASSING: SUBCLASSING
2018
+ };
2019
+
2020
+ var PromiseCapability = function (C) {
2021
+ var resolve, reject;
2022
+ this.promise = new C(function ($$resolve, $$reject) {
2023
+ if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
2024
+ resolve = $$resolve;
2025
+ reject = $$reject;
2026
+ });
2027
+ this.resolve = aCallable(resolve);
2028
+ this.reject = aCallable(reject);
2029
+ };
2152
2030
 
2031
+ // `NewPromiseCapability` abstract operation
2032
+ // https://tc39.es/ecma262/#sec-newpromisecapability
2033
+ var f = function (C) {
2034
+ return new PromiseCapability(C);
2035
+ };
2153
2036
 
2037
+ var newPromiseCapability$1 = {
2038
+ f: f
2039
+ };
2154
2040
 
2041
+ var task = task$1.set;
2155
2042
 
2156
2043
 
2157
2044
 
@@ -2161,23 +2048,22 @@ var task = task$1.set;
2161
2048
 
2162
2049
 
2163
2050
 
2164
- var SPECIES = wellKnownSymbol('species');
2165
2051
  var PROMISE = 'Promise';
2166
-
2167
- var getInternalState = internalState.getterFor(PROMISE);
2168
- var setInternalState = internalState.set;
2052
+ var FORCED_PROMISE_CONSTRUCTOR$4 = promiseConstructorDetection.CONSTRUCTOR;
2053
+ var NATIVE_PROMISE_REJECTION_EVENT = promiseConstructorDetection.REJECTION_EVENT;
2054
+ var NATIVE_PROMISE_SUBCLASSING = promiseConstructorDetection.SUBCLASSING;
2169
2055
  var getInternalPromiseState = internalState.getterFor(PROMISE);
2170
- var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
2171
- var PromiseConstructor = nativePromiseConstructor;
2172
- var PromisePrototype = NativePromisePrototype;
2173
- var TypeError$1 = global_1.TypeError;
2056
+ var setInternalState = internalState.set;
2057
+ var NativePromisePrototype$1 = promiseNativeConstructor && promiseNativeConstructor.prototype;
2058
+ var PromiseConstructor = promiseNativeConstructor;
2059
+ var PromisePrototype = NativePromisePrototype$1;
2060
+ var TypeError$3 = global_1.TypeError;
2174
2061
  var document$1 = global_1.document;
2175
2062
  var process$1 = global_1.process;
2176
2063
  var newPromiseCapability = newPromiseCapability$1.f;
2177
2064
  var newGenericPromiseCapability = newPromiseCapability;
2178
2065
 
2179
2066
  var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global_1.dispatchEvent);
2180
- var NATIVE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
2181
2067
  var UNHANDLED_REJECTION = 'unhandledrejection';
2182
2068
  var REJECTION_HANDLED = 'rejectionhandled';
2183
2069
  var PENDING = 0;
@@ -2185,38 +2071,9 @@ var FULFILLED = 1;
2185
2071
  var REJECTED = 2;
2186
2072
  var HANDLED = 1;
2187
2073
  var UNHANDLED = 2;
2188
- var SUBCLASSING = false;
2189
2074
 
2190
2075
  var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2191
2076
 
2192
- var FORCED = isForced_1(PROMISE, function () {
2193
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
2194
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
2195
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2196
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2197
- // We can't detect it synchronously, so just check versions
2198
- if (!GLOBAL_CORE_JS_PROMISE && engineV8Version === 66) return true;
2199
- // We can't use @@species feature detection in V8 since it causes
2200
- // deoptimization and performance degradation
2201
- // https://github.com/zloirock/core-js/issues/679
2202
- if (engineV8Version >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
2203
- // Detect correctness of subclassing with @@species support
2204
- var promise = new PromiseConstructor(function (resolve) { resolve(1); });
2205
- var FakePromise = function (exec) {
2206
- exec(function () { /* empty */ }, function () { /* empty */ });
2207
- };
2208
- var constructor = promise.constructor = {};
2209
- constructor[SPECIES] = FakePromise;
2210
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2211
- if (!SUBCLASSING) return true;
2212
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2213
- return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_REJECTION_EVENT;
2214
- });
2215
-
2216
- var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
2217
- PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
2218
- });
2219
-
2220
2077
  // helpers
2221
2078
  var isThenable = function (it) {
2222
2079
  var then;
@@ -2247,7 +2104,7 @@ var callReaction = function (reaction, state) {
2247
2104
  }
2248
2105
  }
2249
2106
  if (result === reaction.promise) {
2250
- reject(TypeError$1('Promise-chain cycle'));
2107
+ reject(TypeError$3('Promise-chain cycle'));
2251
2108
  } else if (then = isThenable(result)) {
2252
2109
  functionCall(then, result, resolve, reject);
2253
2110
  } else resolve(result);
@@ -2281,7 +2138,7 @@ var dispatchEvent = function (name, promise, reason) {
2281
2138
  event.initEvent(name, false, true);
2282
2139
  global_1.dispatchEvent(event);
2283
2140
  } else event = { promise: promise, reason: reason };
2284
- if (!NATIVE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);
2141
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);
2285
2142
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2286
2143
  };
2287
2144
 
@@ -2337,7 +2194,7 @@ var internalResolve = function (state, value, unwrap) {
2337
2194
  state.done = true;
2338
2195
  if (unwrap) state = unwrap;
2339
2196
  try {
2340
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
2197
+ if (state.facade === value) throw TypeError$3("Promise can't be resolved itself");
2341
2198
  var then = isThenable(value);
2342
2199
  if (then) {
2343
2200
  microtask(function () {
@@ -2362,20 +2219,22 @@ var internalResolve = function (state, value, unwrap) {
2362
2219
  };
2363
2220
 
2364
2221
  // constructor polyfill
2365
- if (FORCED) {
2222
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2366
2223
  // 25.4.3.1 Promise(executor)
2367
2224
  PromiseConstructor = function Promise(executor) {
2368
2225
  anInstance(this, PromisePrototype);
2369
2226
  aCallable(executor);
2370
2227
  functionCall(Internal, this);
2371
- var state = getInternalState(this);
2228
+ var state = getInternalPromiseState(this);
2372
2229
  try {
2373
2230
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
2374
2231
  } catch (error) {
2375
2232
  internalReject(state, error);
2376
2233
  }
2377
2234
  };
2235
+
2378
2236
  PromisePrototype = PromiseConstructor.prototype;
2237
+
2379
2238
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2380
2239
  Internal = function Promise(executor) {
2381
2240
  setInternalState(this, {
@@ -2389,6 +2248,7 @@ if (FORCED) {
2389
2248
  value: undefined
2390
2249
  });
2391
2250
  };
2251
+
2392
2252
  Internal.prototype = redefineAll(PromisePrototype, {
2393
2253
  // `Promise.prototype.then` method
2394
2254
  // https://tc39.es/ecma262/#sec-promise.prototype.then
@@ -2405,89 +2265,206 @@ if (FORCED) {
2405
2265
  callReaction(reaction, state);
2406
2266
  });
2407
2267
  return reaction.promise;
2408
- },
2409
- // `Promise.prototype.catch` method
2410
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
2411
- 'catch': function (onRejected) {
2412
- return this.then(undefined, onRejected);
2413
2268
  }
2414
2269
  });
2270
+
2415
2271
  OwnPromiseCapability = function () {
2416
2272
  var promise = new Internal();
2417
- var state = getInternalState(promise);
2273
+ var state = getInternalPromiseState(promise);
2418
2274
  this.promise = promise;
2419
2275
  this.resolve = bind$1(internalResolve, state);
2420
2276
  this.reject = bind$1(internalReject, state);
2421
2277
  };
2278
+
2422
2279
  newPromiseCapability$1.f = newPromiseCapability = function (C) {
2423
2280
  return C === PromiseConstructor || C === PromiseWrapper
2424
2281
  ? new OwnPromiseCapability(C)
2425
2282
  : newGenericPromiseCapability(C);
2426
2283
  };
2427
2284
 
2428
- if (isCallable(nativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
2429
- nativeThen = NativePromisePrototype.then;
2285
+ if (isCallable(promiseNativeConstructor) && NativePromisePrototype$1 !== Object.prototype) {
2286
+ nativeThen = NativePromisePrototype$1.then;
2430
2287
 
2431
- if (!SUBCLASSING) {
2288
+ if (!NATIVE_PROMISE_SUBCLASSING) {
2432
2289
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
2433
- redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
2290
+ redefine(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
2434
2291
  var that = this;
2435
2292
  return new PromiseConstructor(function (resolve, reject) {
2436
2293
  functionCall(nativeThen, that, resolve, reject);
2437
2294
  }).then(onFulfilled, onRejected);
2438
2295
  // https://github.com/zloirock/core-js/issues/640
2439
2296
  }, { unsafe: true });
2440
-
2441
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2442
- redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
2443
2297
  }
2444
2298
 
2445
2299
  // make `.constructor === Promise` work for native promise-based APIs
2446
2300
  try {
2447
- delete NativePromisePrototype.constructor;
2301
+ delete NativePromisePrototype$1.constructor;
2448
2302
  } catch (error) { /* empty */ }
2449
2303
 
2450
2304
  // make `instanceof Promise` work for native promise-based APIs
2451
2305
  if (objectSetPrototypeOf) {
2452
- objectSetPrototypeOf(NativePromisePrototype, PromisePrototype);
2306
+ objectSetPrototypeOf(NativePromisePrototype$1, PromisePrototype);
2453
2307
  }
2454
2308
  }
2455
2309
  }
2456
2310
 
2457
- _export({ global: true, wrap: true, forced: FORCED }, {
2311
+ _export({ global: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2458
2312
  Promise: PromiseConstructor
2459
2313
  });
2460
2314
 
2461
2315
  setToStringTag(PromiseConstructor, PROMISE, false);
2462
2316
  setSpecies(PROMISE);
2463
2317
 
2464
- PromiseWrapper = getBuiltIn(PROMISE);
2318
+ var iterators = {};
2465
2319
 
2466
- // statics
2467
- _export({ target: PROMISE, stat: true, forced: FORCED }, {
2468
- // `Promise.reject` method
2469
- // https://tc39.es/ecma262/#sec-promise.reject
2470
- reject: function reject(r) {
2471
- var capability = newPromiseCapability(this);
2472
- functionCall(capability.reject, undefined, r);
2473
- return capability.promise;
2320
+ var ITERATOR$2 = wellKnownSymbol('iterator');
2321
+ var ArrayPrototype = Array.prototype;
2322
+
2323
+ // check on default Array iterator
2324
+ var isArrayIteratorMethod = function (it) {
2325
+ return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
2326
+ };
2327
+
2328
+ var ITERATOR$1 = wellKnownSymbol('iterator');
2329
+
2330
+ var getIteratorMethod = function (it) {
2331
+ if (it != undefined) return getMethod(it, ITERATOR$1)
2332
+ || getMethod(it, '@@iterator')
2333
+ || iterators[classof(it)];
2334
+ };
2335
+
2336
+ var TypeError$2 = global_1.TypeError;
2337
+
2338
+ var getIterator = function (argument, usingIterator) {
2339
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
2340
+ if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
2341
+ throw TypeError$2(tryToString(argument) + ' is not iterable');
2342
+ };
2343
+
2344
+ var iteratorClose = function (iterator, kind, value) {
2345
+ var innerResult, innerError;
2346
+ anObject(iterator);
2347
+ try {
2348
+ innerResult = getMethod(iterator, 'return');
2349
+ if (!innerResult) {
2350
+ if (kind === 'throw') throw value;
2351
+ return value;
2352
+ }
2353
+ innerResult = functionCall(innerResult, iterator);
2354
+ } catch (error) {
2355
+ innerError = true;
2356
+ innerResult = error;
2474
2357
  }
2475
- });
2358
+ if (kind === 'throw') throw value;
2359
+ if (innerError) throw innerResult;
2360
+ anObject(innerResult);
2361
+ return value;
2362
+ };
2476
2363
 
2477
- _export({ target: PROMISE, stat: true, forced: FORCED }, {
2478
- // `Promise.resolve` method
2479
- // https://tc39.es/ecma262/#sec-promise.resolve
2480
- resolve: function resolve(x) {
2481
- return promiseResolve(this, x);
2364
+ var TypeError$1 = global_1.TypeError;
2365
+
2366
+ var Result = function (stopped, result) {
2367
+ this.stopped = stopped;
2368
+ this.result = result;
2369
+ };
2370
+
2371
+ var ResultPrototype = Result.prototype;
2372
+
2373
+ var iterate = function (iterable, unboundFunction, options) {
2374
+ var that = options && options.that;
2375
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2376
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2377
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
2378
+ var fn = functionBindContext(unboundFunction, that);
2379
+ var iterator, iterFn, index, length, result, next, step;
2380
+
2381
+ var stop = function (condition) {
2382
+ if (iterator) iteratorClose(iterator, 'normal', condition);
2383
+ return new Result(true, condition);
2384
+ };
2385
+
2386
+ var callFn = function (value) {
2387
+ if (AS_ENTRIES) {
2388
+ anObject(value);
2389
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2390
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2391
+ };
2392
+
2393
+ if (IS_ITERATOR) {
2394
+ iterator = iterable;
2395
+ } else {
2396
+ iterFn = getIteratorMethod(iterable);
2397
+ if (!iterFn) throw TypeError$1(tryToString(iterable) + ' is not iterable');
2398
+ // optimisation for array iterators
2399
+ if (isArrayIteratorMethod(iterFn)) {
2400
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2401
+ result = callFn(iterable[index]);
2402
+ if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
2403
+ } return new Result(false);
2404
+ }
2405
+ iterator = getIterator(iterable, iterFn);
2482
2406
  }
2407
+
2408
+ next = iterator.next;
2409
+ while (!(step = functionCall(next, iterator)).done) {
2410
+ try {
2411
+ result = callFn(step.value);
2412
+ } catch (error) {
2413
+ iteratorClose(iterator, 'throw', error);
2414
+ }
2415
+ if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
2416
+ } return new Result(false);
2417
+ };
2418
+
2419
+ var ITERATOR = wellKnownSymbol('iterator');
2420
+ var SAFE_CLOSING = false;
2421
+
2422
+ try {
2423
+ var called = 0;
2424
+ var iteratorWithReturn = {
2425
+ next: function () {
2426
+ return { done: !!called++ };
2427
+ },
2428
+ 'return': function () {
2429
+ SAFE_CLOSING = true;
2430
+ }
2431
+ };
2432
+ iteratorWithReturn[ITERATOR] = function () {
2433
+ return this;
2434
+ };
2435
+ // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
2436
+ Array.from(iteratorWithReturn, function () { throw 2; });
2437
+ } catch (error) { /* empty */ }
2438
+
2439
+ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
2440
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2441
+ var ITERATION_SUPPORT = false;
2442
+ try {
2443
+ var object = {};
2444
+ object[ITERATOR] = function () {
2445
+ return {
2446
+ next: function () {
2447
+ return { done: ITERATION_SUPPORT = true };
2448
+ }
2449
+ };
2450
+ };
2451
+ exec(object);
2452
+ } catch (error) { /* empty */ }
2453
+ return ITERATION_SUPPORT;
2454
+ };
2455
+
2456
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2457
+
2458
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2459
+ promiseNativeConstructor.all(iterable).then(undefined, function () { /* empty */ });
2483
2460
  });
2484
2461
 
2485
- _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2486
- // `Promise.all` method
2487
- // https://tc39.es/ecma262/#sec-promise.all
2462
+ // `Promise.all` method
2463
+ // https://tc39.es/ecma262/#sec-promise.all
2464
+ _export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteration }, {
2488
2465
  all: function all(iterable) {
2489
2466
  var C = this;
2490
- var capability = newPromiseCapability(C);
2467
+ var capability = newPromiseCapability$1.f(C);
2491
2468
  var resolve = capability.resolve;
2492
2469
  var reject = capability.reject;
2493
2470
  var result = perform(function () {
@@ -2510,12 +2487,39 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2510
2487
  });
2511
2488
  if (result.error) reject(result.value);
2512
2489
  return capability.promise;
2513
- },
2514
- // `Promise.race` method
2515
- // https://tc39.es/ecma262/#sec-promise.race
2490
+ }
2491
+ });
2492
+
2493
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2494
+
2495
+
2496
+
2497
+
2498
+
2499
+ var NativePromisePrototype = promiseNativeConstructor && promiseNativeConstructor.prototype;
2500
+
2501
+ // `Promise.prototype.catch` method
2502
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2503
+ _export({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2504
+ 'catch': function (onRejected) {
2505
+ return this.then(undefined, onRejected);
2506
+ }
2507
+ });
2508
+
2509
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2510
+ if (isCallable(promiseNativeConstructor)) {
2511
+ var method = getBuiltIn('Promise').prototype['catch'];
2512
+ if (NativePromisePrototype['catch'] !== method) {
2513
+ redefine(NativePromisePrototype, 'catch', method, { unsafe: true });
2514
+ }
2515
+ }
2516
+
2517
+ // `Promise.race` method
2518
+ // https://tc39.es/ecma262/#sec-promise.race
2519
+ _export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteration }, {
2516
2520
  race: function race(iterable) {
2517
2521
  var C = this;
2518
- var capability = newPromiseCapability(C);
2522
+ var capability = newPromiseCapability$1.f(C);
2519
2523
  var reject = capability.reject;
2520
2524
  var result = perform(function () {
2521
2525
  var $promiseResolve = aCallable(C.resolve);
@@ -2528,9 +2532,43 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2528
2532
  }
2529
2533
  });
2530
2534
 
2531
- // eslint-disable-next-line es/no-object-assign -- safe
2535
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2536
+
2537
+ // `Promise.reject` method
2538
+ // https://tc39.es/ecma262/#sec-promise.reject
2539
+ _export({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2540
+ reject: function reject(r) {
2541
+ var capability = newPromiseCapability$1.f(this);
2542
+ functionCall(capability.reject, undefined, r);
2543
+ return capability.promise;
2544
+ }
2545
+ });
2546
+
2547
+ var promiseResolve = function (C, x) {
2548
+ anObject(C);
2549
+ if (isObject$1(x) && x.constructor === C) return x;
2550
+ var promiseCapability = newPromiseCapability$1.f(C);
2551
+ var resolve = promiseCapability.resolve;
2552
+ resolve(x);
2553
+ return promiseCapability.promise;
2554
+ };
2555
+
2556
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2557
+
2558
+
2559
+ getBuiltIn('Promise');
2560
+
2561
+ // `Promise.resolve` method
2562
+ // https://tc39.es/ecma262/#sec-promise.resolve
2563
+ _export({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2564
+ resolve: function resolve(x) {
2565
+ return promiseResolve(this, x);
2566
+ }
2567
+ });
2568
+
2569
+ // eslint-disable-next-line es-x/no-object-assign -- safe
2532
2570
  var $assign = Object.assign;
2533
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2571
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
2534
2572
  var defineProperty$1 = Object.defineProperty;
2535
2573
  var concat = functionUncurryThis([].concat);
2536
2574
 
@@ -2550,7 +2588,7 @@ var objectAssign = !$assign || fails(function () {
2550
2588
  // should work with symbols and should have deterministic property order (V8 bug)
2551
2589
  var A = {};
2552
2590
  var B = {};
2553
- // eslint-disable-next-line es/no-symbol -- safe
2591
+ // eslint-disable-next-line es-x/no-symbol -- safe
2554
2592
  var symbol = Symbol();
2555
2593
  var alphabet = 'abcdefghijklmnopqrst';
2556
2594
  A[symbol] = 7;
@@ -2577,7 +2615,7 @@ var objectAssign = !$assign || fails(function () {
2577
2615
 
2578
2616
  // `Object.assign` method
2579
2617
  // https://tc39.es/ecma262/#sec-object.assign
2580
- // eslint-disable-next-line es/no-object-assign -- required for testing
2618
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
2581
2619
  _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
2582
2620
  assign: objectAssign
2583
2621
  });
@@ -2727,7 +2765,7 @@ var STRICT_METHOD = arrayMethodIsStrict('forEach');
2727
2765
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
2728
2766
  var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
2729
2767
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2730
- // eslint-disable-next-line es/no-array-prototype-foreach -- safe
2768
+ // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
2731
2769
  } : [].forEach;
2732
2770
 
2733
2771
  var handlePrototype = function (CollectionPrototype) {
@@ -4204,6 +4242,78 @@ axios_1.default = default_1;
4204
4242
 
4205
4243
  var axios = axios_1;
4206
4244
 
4245
+ var name$1 = "@tryghost/content-api";
4246
+ var version = "1.9.0";
4247
+ var repository = "https://github.com/TryGhost/SDK/tree/master/packages/content-api";
4248
+ var author = "Ghost Foundation";
4249
+ var license = "MIT";
4250
+ var main = "cjs/content-api.js";
4251
+ var unpkg = "umd/content-api.min.js";
4252
+ var module = "es/content-api.js";
4253
+ var source = "lib/index.js";
4254
+ var files = [
4255
+ "LICENSE",
4256
+ "README.md",
4257
+ "cjs/",
4258
+ "lib/",
4259
+ "umd/",
4260
+ "es/"
4261
+ ];
4262
+ var scripts = {
4263
+ dev: "echo \"Implement me!\"",
4264
+ pretest: "yarn build",
4265
+ test: "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
4266
+ build: "rollup -c",
4267
+ lint: "eslint . --ext .js --cache",
4268
+ prepare: "NODE_ENV=production yarn build",
4269
+ posttest: "yarn lint"
4270
+ };
4271
+ var publishConfig = {
4272
+ access: "public"
4273
+ };
4274
+ var devDependencies = {
4275
+ "@babel/core": "7.17.9",
4276
+ "@babel/polyfill": "7.12.1",
4277
+ "@babel/preset-env": "7.16.11",
4278
+ "@rollup/plugin-json": "^4.1.0",
4279
+ c8: "7.11.0",
4280
+ "core-js": "3.22.0",
4281
+ "eslint-plugin-ghost": "1.5.0",
4282
+ mocha: "7.2.0",
4283
+ rollup: "2.70.2",
4284
+ "rollup-plugin-babel": "4.4.0",
4285
+ "rollup-plugin-commonjs": "10.1.0",
4286
+ "rollup-plugin-node-resolve": "5.2.0",
4287
+ "rollup-plugin-replace": "2.2.0",
4288
+ "rollup-plugin-terser": "7.0.2",
4289
+ should: "13.2.3",
4290
+ sinon: "9.2.4"
4291
+ };
4292
+ var dependencies = {
4293
+ axios: "^0.21.1"
4294
+ };
4295
+ var gitHead = "f699f18279c596be384760adccbbf90a659bd4bc";
4296
+ var packageInfo = {
4297
+ name: name$1,
4298
+ version: version,
4299
+ repository: repository,
4300
+ author: author,
4301
+ license: license,
4302
+ main: main,
4303
+ "umd:main": "umd/content-api.min.js",
4304
+ unpkg: unpkg,
4305
+ module: module,
4306
+ source: source,
4307
+ files: files,
4308
+ scripts: scripts,
4309
+ publishConfig: publishConfig,
4310
+ devDependencies: devDependencies,
4311
+ dependencies: dependencies,
4312
+ gitHead: gitHead
4313
+ };
4314
+
4315
+ var packageVersion = packageInfo.version; // NOTE: bump this default when Ghost v5 is released
4316
+
4207
4317
  var defaultAcceptVersionHeader = 'v4.0';
4208
4318
  var supportedVersions = ['v2', 'v3', 'v4', 'v5', 'canary'];
4209
4319
  var name = '@tryghost/content-api';
@@ -4355,6 +4465,7 @@ function GhostContentAPI(_ref2) {
4355
4465
  var headers = membersToken ? {
4356
4466
  Authorization: "GhostMembers ".concat(membersToken)
4357
4467
  } : {};
4468
+ headers['User-Agent'] = "GhostContentSDK/".concat(packageVersion);
4358
4469
 
4359
4470
  if (acceptVersionHeader) {
4360
4471
  headers['Accept-Version'] = acceptVersionHeader;