@bigbinary/neeto-team-members-frontend 4.4.2 → 4.4.3

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 (133) hide show
  1. package/dist/Groups.js +24 -25
  2. package/dist/Groups.js.map +1 -1
  3. package/dist/ManageMember.js +12 -14
  4. package/dist/ManageMember.js.map +1 -1
  5. package/dist/MembersDropdown.js +6 -7
  6. package/dist/MembersDropdown.js.map +1 -1
  7. package/dist/{Permissions-952ec2fa.js → Permissions-B2pWJYB4.js} +25 -31
  8. package/dist/{Permissions-952ec2fa.js.map → Permissions-B2pWJYB4.js.map} +1 -1
  9. package/dist/{Permissions-1b52172b.js → Permissions-r2Kb80Y_.js} +14 -14
  10. package/dist/{Permissions-1b52172b.js.map → Permissions-r2Kb80Y_.js.map} +1 -1
  11. package/dist/Permissions.js +4 -5
  12. package/dist/Permissions.js.map +1 -1
  13. package/dist/Profile.js +9 -389
  14. package/dist/Profile.js.map +1 -1
  15. package/dist/Roles.js +27 -29
  16. package/dist/Roles.js.map +1 -1
  17. package/dist/{RolesRadioGroup-94aca05f.js → RolesRadioGroup-DFPWhs-4.js} +24 -32
  18. package/dist/{RolesRadioGroup-94aca05f.js.map → RolesRadioGroup-DFPWhs-4.js.map} +1 -1
  19. package/dist/{RolesRadioGroup-c8486be1.js → RolesRadioGroup-DJ4pOHcX.js} +8 -8
  20. package/dist/{RolesRadioGroup-c8486be1.js.map → RolesRadioGroup-DJ4pOHcX.js.map} +1 -1
  21. package/dist/RolesRadioGroup.js +6 -7
  22. package/dist/RolesRadioGroup.js.map +1 -1
  23. package/dist/TeamMembers.js +27 -29
  24. package/dist/TeamMembers.js.map +1 -1
  25. package/dist/TeamsAndMembersDropdown.js +2 -3
  26. package/dist/TeamsAndMembersDropdown.js.map +1 -1
  27. package/dist/TeamsDropdown.js +7 -8
  28. package/dist/TeamsDropdown.js.map +1 -1
  29. package/dist/{_commonjsHelpers-1789f0cf.js → _commonjsHelpers-BFTU3MAI.js} +1 -1
  30. package/dist/_commonjsHelpers-BFTU3MAI.js.map +1 -0
  31. package/dist/{_commonjsHelpers-b3309d7b.js → _commonjsHelpers-BJu3ubxk.js} +1 -1
  32. package/dist/_commonjsHelpers-BJu3ubxk.js.map +1 -0
  33. package/dist/cjs/Groups.js +76 -100
  34. package/dist/cjs/Groups.js.map +1 -1
  35. package/dist/cjs/ManageMember.js +12 -14
  36. package/dist/cjs/ManageMember.js.map +1 -1
  37. package/dist/cjs/MembersDropdown.js +16 -26
  38. package/dist/cjs/MembersDropdown.js.map +1 -1
  39. package/dist/cjs/Permissions.js +4 -5
  40. package/dist/cjs/Permissions.js.map +1 -1
  41. package/dist/cjs/Profile.js +50 -450
  42. package/dist/cjs/Profile.js.map +1 -1
  43. package/dist/cjs/Roles.js +72 -100
  44. package/dist/cjs/Roles.js.map +1 -1
  45. package/dist/cjs/RolesRadioGroup.js +6 -7
  46. package/dist/cjs/RolesRadioGroup.js.map +1 -1
  47. package/dist/cjs/TeamMembers.js +73 -93
  48. package/dist/cjs/TeamMembers.js.map +1 -1
  49. package/dist/cjs/TeamsAndMembersDropdown.js +19 -31
  50. package/dist/cjs/TeamsAndMembersDropdown.js.map +1 -1
  51. package/dist/cjs/TeamsDropdown.js +13 -21
  52. package/dist/cjs/TeamsDropdown.js.map +1 -1
  53. package/dist/cjs/constants.js +1 -3
  54. package/dist/cjs/constants.js.map +1 -1
  55. package/dist/cjs/hooks.js +7 -10
  56. package/dist/cjs/hooks.js.map +1 -1
  57. package/dist/cjs/index.js +23 -22
  58. package/dist/cjs/index.js.map +1 -1
  59. package/dist/cjs/utils.js +8 -11
  60. package/dist/cjs/utils.js.map +1 -1
  61. package/dist/{constants-2685e5d6.js → constants-DK60kZoX.js} +1 -1
  62. package/dist/{constants-2685e5d6.js.map → constants-DK60kZoX.js.map} +1 -1
  63. package/dist/{constants-576b89ac.js → constants-Dq8t7rmL.js} +2 -2
  64. package/dist/{constants-576b89ac.js.map → constants-Dq8t7rmL.js.map} +1 -1
  65. package/dist/constants.js +1 -1
  66. package/dist/hooks.js +7 -8
  67. package/dist/hooks.js.map +1 -1
  68. package/dist/{index-dc7f5532.js → index-B6-BCFEc.js} +4 -4
  69. package/dist/{index-dc7f5532.js.map → index-B6-BCFEc.js.map} +1 -1
  70. package/dist/{index-753ce55b.js → index-D0ixFK_p.js} +76 -102
  71. package/dist/index-D0ixFK_p.js.map +1 -0
  72. package/dist/{index-971becfe.js → index-D9EElQrM.js} +22 -32
  73. package/dist/{index-971becfe.js.map → index-D9EElQrM.js.map} +1 -1
  74. package/dist/{index-5f1a8667.js → index-DGXXNU_W.js} +25 -29
  75. package/dist/index-DGXXNU_W.js.map +1 -0
  76. package/dist/{index-7d531bf6.js → index-DcjmIrWp.js} +14 -14
  77. package/dist/{index-7d531bf6.js.map → index-DcjmIrWp.js.map} +1 -1
  78. package/dist/{index-fc3b88e2.js → index-DduR7qdk.js} +17 -17
  79. package/dist/index-DduR7qdk.js.map +1 -0
  80. package/dist/index.js +23 -20
  81. package/dist/index.js.map +1 -1
  82. package/dist/{inject-css-c86de496.js → inject-css-DmrvuTKK.js} +1 -1
  83. package/dist/{inject-css-c86de496.js.map → inject-css-DmrvuTKK.js.map} +1 -1
  84. package/dist/{inject-css-80a5faa3.js → inject-css-vQvjPR2x.js} +1 -1
  85. package/dist/{inject-css-80a5faa3.js.map → inject-css-vQvjPR2x.js.map} +1 -1
  86. package/dist/{queryClient-febad37e.js → queryClient-4vAFE3bx.js} +1 -1
  87. package/dist/{queryClient-febad37e.js.map → queryClient-4vAFE3bx.js.map} +1 -1
  88. package/dist/{queryClient-71ecdd08.js → queryClient-Dsu-gu4Y.js} +1 -1
  89. package/dist/{queryClient-71ecdd08.js.map → queryClient-Dsu-gu4Y.js.map} +1 -1
  90. package/dist/{useMembersSidenav-68b9f94e.js → useMembersSidenav-C1ZO3xIl.js} +2 -2
  91. package/dist/{useMembersSidenav-68b9f94e.js.map → useMembersSidenav-C1ZO3xIl.js.map} +1 -1
  92. package/dist/{useMembersSidenav-7aaa6f93.js → useMembersSidenav-uuIPy4H_.js} +3 -7
  93. package/dist/{useMembersSidenav-7aaa6f93.js.map → useMembersSidenav-uuIPy4H_.js.map} +1 -1
  94. package/dist/useTeamsApi-BTrW3Vtj.js +143 -0
  95. package/dist/useTeamsApi-BTrW3Vtj.js.map +1 -0
  96. package/dist/useTeamsApi-CasIc4Xx.js +152 -0
  97. package/dist/useTeamsApi-CasIc4Xx.js.map +1 -0
  98. package/dist/utils.js +8 -9
  99. package/dist/utils.js.map +1 -1
  100. package/dist/{withReactQuery-efba53ba.js → withReactQuery-C7a_pGxf.js} +4 -4
  101. package/dist/{withReactQuery-efba53ba.js.map → withReactQuery-C7a_pGxf.js.map} +1 -1
  102. package/dist/{withReactQuery-e3d0bd1f.js → withReactQuery-CHybbL5V.js} +3 -3
  103. package/dist/{withReactQuery-e3d0bd1f.js.map → withReactQuery-CHybbL5V.js.map} +1 -1
  104. package/package.json +101 -84
  105. package/dist/_commonjsHelpers-1789f0cf.js.map +0 -1
  106. package/dist/_commonjsHelpers-b3309d7b.js.map +0 -1
  107. package/dist/defineProperty-9b13c73c.js +0 -46
  108. package/dist/defineProperty-9b13c73c.js.map +0 -1
  109. package/dist/defineProperty-b85f2e0f.js +0 -43
  110. package/dist/defineProperty-b85f2e0f.js.map +0 -1
  111. package/dist/index-5f1a8667.js.map +0 -1
  112. package/dist/index-753ce55b.js.map +0 -1
  113. package/dist/index-fc3b88e2.js.map +0 -1
  114. package/dist/objectWithoutProperties-2fed2d7d.js +0 -33
  115. package/dist/objectWithoutProperties-2fed2d7d.js.map +0 -1
  116. package/dist/objectWithoutProperties-a0edb288.js +0 -31
  117. package/dist/objectWithoutProperties-a0edb288.js.map +0 -1
  118. package/dist/slicedToArray-6674c4b8.js +0 -44
  119. package/dist/slicedToArray-6674c4b8.js.map +0 -1
  120. package/dist/slicedToArray-8e69d42b.js +0 -46
  121. package/dist/slicedToArray-8e69d42b.js.map +0 -1
  122. package/dist/toConsumableArray-0e395868.js +0 -20
  123. package/dist/toConsumableArray-0e395868.js.map +0 -1
  124. package/dist/toConsumableArray-e41a15ba.js +0 -22
  125. package/dist/toConsumableArray-e41a15ba.js.map +0 -1
  126. package/dist/unsupportedIterableToArray-7c7192e5.js +0 -17
  127. package/dist/unsupportedIterableToArray-7c7192e5.js.map +0 -1
  128. package/dist/unsupportedIterableToArray-fa2816fd.js +0 -20
  129. package/dist/unsupportedIterableToArray-fa2816fd.js.map +0 -1
  130. package/dist/useTeamsApi-6277d3a1.js +0 -3860
  131. package/dist/useTeamsApi-6277d3a1.js.map +0 -1
  132. package/dist/useTeamsApi-bc52172a.js +0 -3874
  133. package/dist/useTeamsApi-bc52172a.js.map +0 -1
@@ -1,3874 +0,0 @@
1
- 'use strict';
2
-
3
- var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
4
- var defineProperty = require('./defineProperty-9b13c73c.js');
5
- var reactQuery = require('@tanstack/react-query');
6
- var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
7
- var ramda = require('ramda');
8
- var axios = require('axios');
9
- var neetoCist = require('@bigbinary/neeto-cist');
10
- var _commonjsHelpers = require('./_commonjsHelpers-b3309d7b.js');
11
- var require$$0 = require('util');
12
- var constants = require('./constants-2685e5d6.js');
13
- var queryClient = require('./queryClient-febad37e.js');
14
-
15
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
-
17
- var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
18
- var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
19
-
20
- /** @type {import('.')} */
21
- var esErrors = Error;
22
-
23
- /** @type {import('./eval')} */
24
- var _eval = EvalError;
25
-
26
- /** @type {import('./range')} */
27
- var range = RangeError;
28
-
29
- /** @type {import('./ref')} */
30
- var ref = ReferenceError;
31
-
32
- /** @type {import('./syntax')} */
33
- var syntax = SyntaxError;
34
-
35
- /** @type {import('./type')} */
36
- var type = TypeError;
37
-
38
- /** @type {import('./uri')} */
39
- var uri = URIError;
40
-
41
- /* eslint complexity: [2, 18], max-statements: [2, 33] */
42
- var shams = function hasSymbols() {
43
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
44
- if (typeof Symbol.iterator === 'symbol') { return true; }
45
-
46
- var obj = {};
47
- var sym = Symbol('test');
48
- var symObj = Object(sym);
49
- if (typeof sym === 'string') { return false; }
50
-
51
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
52
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
53
-
54
- // temp disabled per https://github.com/ljharb/object.assign/issues/17
55
- // if (sym instanceof Symbol) { return false; }
56
- // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
57
- // if (!(symObj instanceof Symbol)) { return false; }
58
-
59
- // if (typeof Symbol.prototype.toString !== 'function') { return false; }
60
- // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
61
-
62
- var symVal = 42;
63
- obj[sym] = symVal;
64
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
65
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
66
-
67
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
68
-
69
- var syms = Object.getOwnPropertySymbols(obj);
70
- if (syms.length !== 1 || syms[0] !== sym) { return false; }
71
-
72
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
73
-
74
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
75
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
76
- if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
77
- }
78
-
79
- return true;
80
- };
81
-
82
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
83
- var hasSymbolSham = shams;
84
-
85
- var hasSymbols$4 = function hasNativeSymbols() {
86
- if (typeof origSymbol !== 'function') { return false; }
87
- if (typeof Symbol !== 'function') { return false; }
88
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
89
- if (typeof Symbol('bar') !== 'symbol') { return false; }
90
-
91
- return hasSymbolSham();
92
- };
93
-
94
- var test = {
95
- __proto__: null,
96
- foo: {}
97
- };
98
-
99
- var $Object = Object;
100
-
101
- /** @type {import('.')} */
102
- var hasProto$4 = function hasProto() {
103
- // @ts-expect-error: TS errors on an inherited property for some reason
104
- return { __proto__: test }.foo === test.foo
105
- && !(test instanceof $Object);
106
- };
107
-
108
- /* eslint no-invalid-this: 1 */
109
-
110
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
111
- var toStr$1 = Object.prototype.toString;
112
- var max = Math.max;
113
- var funcType = '[object Function]';
114
-
115
- var concatty = function concatty(a, b) {
116
- var arr = [];
117
-
118
- for (var i = 0; i < a.length; i += 1) {
119
- arr[i] = a[i];
120
- }
121
- for (var j = 0; j < b.length; j += 1) {
122
- arr[j + a.length] = b[j];
123
- }
124
-
125
- return arr;
126
- };
127
-
128
- var slicy = function slicy(arrLike, offset) {
129
- var arr = [];
130
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
131
- arr[j] = arrLike[i];
132
- }
133
- return arr;
134
- };
135
-
136
- var joiny = function (arr, joiner) {
137
- var str = '';
138
- for (var i = 0; i < arr.length; i += 1) {
139
- str += arr[i];
140
- if (i + 1 < arr.length) {
141
- str += joiner;
142
- }
143
- }
144
- return str;
145
- };
146
-
147
- var implementation$1 = function bind(that) {
148
- var target = this;
149
- if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
150
- throw new TypeError(ERROR_MESSAGE + target);
151
- }
152
- var args = slicy(arguments, 1);
153
-
154
- var bound;
155
- var binder = function () {
156
- if (this instanceof bound) {
157
- var result = target.apply(
158
- this,
159
- concatty(args, arguments)
160
- );
161
- if (Object(result) === result) {
162
- return result;
163
- }
164
- return this;
165
- }
166
- return target.apply(
167
- that,
168
- concatty(args, arguments)
169
- );
170
-
171
- };
172
-
173
- var boundLength = max(0, target.length - args.length);
174
- var boundArgs = [];
175
- for (var i = 0; i < boundLength; i++) {
176
- boundArgs[i] = '$' + i;
177
- }
178
-
179
- bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
180
-
181
- if (target.prototype) {
182
- var Empty = function Empty() {};
183
- Empty.prototype = target.prototype;
184
- bound.prototype = new Empty();
185
- Empty.prototype = null;
186
- }
187
-
188
- return bound;
189
- };
190
-
191
- var implementation = implementation$1;
192
-
193
- var functionBind = Function.prototype.bind || implementation;
194
-
195
- var call = Function.prototype.call;
196
- var $hasOwn = Object.prototype.hasOwnProperty;
197
- var bind$4 = functionBind;
198
-
199
- /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
200
- var hasown = bind$4.call(call, $hasOwn);
201
-
202
- var undefined$4;
203
-
204
- var $Error$3 = esErrors;
205
- var $EvalError$3 = _eval;
206
- var $RangeError$3 = range;
207
- var $ReferenceError$3 = ref;
208
- var $SyntaxError$4 = syntax;
209
- var $TypeError$6 = type;
210
- var $URIError$3 = uri;
211
-
212
- var $Function$3 = Function;
213
-
214
- // eslint-disable-next-line consistent-return
215
- var getEvalledConstructor$3 = function (expressionSyntax) {
216
- try {
217
- return $Function$3('"use strict"; return (' + expressionSyntax + ').constructor;')();
218
- } catch (e) {}
219
- };
220
-
221
- var $gOPD$4 = Object.getOwnPropertyDescriptor;
222
- if ($gOPD$4) {
223
- try {
224
- $gOPD$4({}, '');
225
- } catch (e) {
226
- $gOPD$4 = null; // this is IE 8, which has a broken gOPD
227
- }
228
- }
229
-
230
- var throwTypeError$3 = function () {
231
- throw new $TypeError$6();
232
- };
233
- var ThrowTypeError$3 = $gOPD$4
234
- ? (function () {
235
- try {
236
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
237
- arguments.callee; // IE 8 does not throw here
238
- return throwTypeError$3;
239
- } catch (calleeThrows) {
240
- try {
241
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
242
- return $gOPD$4(arguments, 'callee').get;
243
- } catch (gOPDthrows) {
244
- return throwTypeError$3;
245
- }
246
- }
247
- }())
248
- : throwTypeError$3;
249
-
250
- var hasSymbols$3 = hasSymbols$4();
251
- var hasProto$3 = hasProto$4();
252
-
253
- var getProto$3 = Object.getPrototypeOf || (
254
- hasProto$3
255
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
256
- : null
257
- );
258
-
259
- var needsEval$3 = {};
260
-
261
- var TypedArray$3 = typeof Uint8Array === 'undefined' || !getProto$3 ? undefined$4 : getProto$3(Uint8Array);
262
-
263
- var INTRINSICS$3 = {
264
- __proto__: null,
265
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$4 : AggregateError,
266
- '%Array%': Array,
267
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$4 : ArrayBuffer,
268
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$3 ? getProto$3([][Symbol.iterator]()) : undefined$4,
269
- '%AsyncFromSyncIteratorPrototype%': undefined$4,
270
- '%AsyncFunction%': needsEval$3,
271
- '%AsyncGenerator%': needsEval$3,
272
- '%AsyncGeneratorFunction%': needsEval$3,
273
- '%AsyncIteratorPrototype%': needsEval$3,
274
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$4 : Atomics,
275
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$4 : BigInt,
276
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$4 : BigInt64Array,
277
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$4 : BigUint64Array,
278
- '%Boolean%': Boolean,
279
- '%DataView%': typeof DataView === 'undefined' ? undefined$4 : DataView,
280
- '%Date%': Date,
281
- '%decodeURI%': decodeURI,
282
- '%decodeURIComponent%': decodeURIComponent,
283
- '%encodeURI%': encodeURI,
284
- '%encodeURIComponent%': encodeURIComponent,
285
- '%Error%': $Error$3,
286
- '%eval%': eval, // eslint-disable-line no-eval
287
- '%EvalError%': $EvalError$3,
288
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$4 : Float32Array,
289
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$4 : Float64Array,
290
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$4 : FinalizationRegistry,
291
- '%Function%': $Function$3,
292
- '%GeneratorFunction%': needsEval$3,
293
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$4 : Int8Array,
294
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$4 : Int16Array,
295
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$4 : Int32Array,
296
- '%isFinite%': isFinite,
297
- '%isNaN%': isNaN,
298
- '%IteratorPrototype%': hasSymbols$3 && getProto$3 ? getProto$3(getProto$3([][Symbol.iterator]())) : undefined$4,
299
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$4,
300
- '%Map%': typeof Map === 'undefined' ? undefined$4 : Map,
301
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$3 ? undefined$4 : getProto$3(new Map()[Symbol.iterator]()),
302
- '%Math%': Math,
303
- '%Number%': Number,
304
- '%Object%': Object,
305
- '%parseFloat%': parseFloat,
306
- '%parseInt%': parseInt,
307
- '%Promise%': typeof Promise === 'undefined' ? undefined$4 : Promise,
308
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$4 : Proxy,
309
- '%RangeError%': $RangeError$3,
310
- '%ReferenceError%': $ReferenceError$3,
311
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$4 : Reflect,
312
- '%RegExp%': RegExp,
313
- '%Set%': typeof Set === 'undefined' ? undefined$4 : Set,
314
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$3 ? undefined$4 : getProto$3(new Set()[Symbol.iterator]()),
315
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$4 : SharedArrayBuffer,
316
- '%String%': String,
317
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$3 ? getProto$3(''[Symbol.iterator]()) : undefined$4,
318
- '%Symbol%': hasSymbols$3 ? Symbol : undefined$4,
319
- '%SyntaxError%': $SyntaxError$4,
320
- '%ThrowTypeError%': ThrowTypeError$3,
321
- '%TypedArray%': TypedArray$3,
322
- '%TypeError%': $TypeError$6,
323
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$4 : Uint8Array,
324
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$4 : Uint8ClampedArray,
325
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$4 : Uint16Array,
326
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$4 : Uint32Array,
327
- '%URIError%': $URIError$3,
328
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$4 : WeakMap,
329
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$4 : WeakRef,
330
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$4 : WeakSet
331
- };
332
-
333
- if (getProto$3) {
334
- try {
335
- null.error; // eslint-disable-line no-unused-expressions
336
- } catch (e) {
337
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
338
- var errorProto$3 = getProto$3(getProto$3(e));
339
- INTRINSICS$3['%Error.prototype%'] = errorProto$3;
340
- }
341
- }
342
-
343
- var doEval$3 = function doEval(name) {
344
- var value;
345
- if (name === '%AsyncFunction%') {
346
- value = getEvalledConstructor$3('async function () {}');
347
- } else if (name === '%GeneratorFunction%') {
348
- value = getEvalledConstructor$3('function* () {}');
349
- } else if (name === '%AsyncGeneratorFunction%') {
350
- value = getEvalledConstructor$3('async function* () {}');
351
- } else if (name === '%AsyncGenerator%') {
352
- var fn = doEval('%AsyncGeneratorFunction%');
353
- if (fn) {
354
- value = fn.prototype;
355
- }
356
- } else if (name === '%AsyncIteratorPrototype%') {
357
- var gen = doEval('%AsyncGenerator%');
358
- if (gen && getProto$3) {
359
- value = getProto$3(gen.prototype);
360
- }
361
- }
362
-
363
- INTRINSICS$3[name] = value;
364
-
365
- return value;
366
- };
367
-
368
- var LEGACY_ALIASES$3 = {
369
- __proto__: null,
370
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
371
- '%ArrayPrototype%': ['Array', 'prototype'],
372
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
373
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
374
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
375
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
376
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
377
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
378
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
379
- '%BooleanPrototype%': ['Boolean', 'prototype'],
380
- '%DataViewPrototype%': ['DataView', 'prototype'],
381
- '%DatePrototype%': ['Date', 'prototype'],
382
- '%ErrorPrototype%': ['Error', 'prototype'],
383
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
384
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
385
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
386
- '%FunctionPrototype%': ['Function', 'prototype'],
387
- '%Generator%': ['GeneratorFunction', 'prototype'],
388
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
389
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
390
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
391
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
392
- '%JSONParse%': ['JSON', 'parse'],
393
- '%JSONStringify%': ['JSON', 'stringify'],
394
- '%MapPrototype%': ['Map', 'prototype'],
395
- '%NumberPrototype%': ['Number', 'prototype'],
396
- '%ObjectPrototype%': ['Object', 'prototype'],
397
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
398
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
399
- '%PromisePrototype%': ['Promise', 'prototype'],
400
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
401
- '%Promise_all%': ['Promise', 'all'],
402
- '%Promise_reject%': ['Promise', 'reject'],
403
- '%Promise_resolve%': ['Promise', 'resolve'],
404
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
405
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
406
- '%RegExpPrototype%': ['RegExp', 'prototype'],
407
- '%SetPrototype%': ['Set', 'prototype'],
408
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
409
- '%StringPrototype%': ['String', 'prototype'],
410
- '%SymbolPrototype%': ['Symbol', 'prototype'],
411
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
412
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
413
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
414
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
415
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
416
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
417
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
418
- '%URIErrorPrototype%': ['URIError', 'prototype'],
419
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
420
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
421
- };
422
-
423
- var bind$3 = functionBind;
424
- var hasOwn$4 = hasown;
425
- var $concat$4 = bind$3.call(Function.call, Array.prototype.concat);
426
- var $spliceApply$3 = bind$3.call(Function.apply, Array.prototype.splice);
427
- var $replace$4 = bind$3.call(Function.call, String.prototype.replace);
428
- var $strSlice$3 = bind$3.call(Function.call, String.prototype.slice);
429
- var $exec$3 = bind$3.call(Function.call, RegExp.prototype.exec);
430
-
431
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
432
- var rePropName$3 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
433
- var reEscapeChar$3 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
434
- var stringToPath$3 = function stringToPath(string) {
435
- var first = $strSlice$3(string, 0, 1);
436
- var last = $strSlice$3(string, -1);
437
- if (first === '%' && last !== '%') {
438
- throw new $SyntaxError$4('invalid intrinsic syntax, expected closing `%`');
439
- } else if (last === '%' && first !== '%') {
440
- throw new $SyntaxError$4('invalid intrinsic syntax, expected opening `%`');
441
- }
442
- var result = [];
443
- $replace$4(string, rePropName$3, function (match, number, quote, subString) {
444
- result[result.length] = quote ? $replace$4(subString, reEscapeChar$3, '$1') : number || match;
445
- });
446
- return result;
447
- };
448
- /* end adaptation */
449
-
450
- var getBaseIntrinsic$3 = function getBaseIntrinsic(name, allowMissing) {
451
- var intrinsicName = name;
452
- var alias;
453
- if (hasOwn$4(LEGACY_ALIASES$3, intrinsicName)) {
454
- alias = LEGACY_ALIASES$3[intrinsicName];
455
- intrinsicName = '%' + alias[0] + '%';
456
- }
457
-
458
- if (hasOwn$4(INTRINSICS$3, intrinsicName)) {
459
- var value = INTRINSICS$3[intrinsicName];
460
- if (value === needsEval$3) {
461
- value = doEval$3(intrinsicName);
462
- }
463
- if (typeof value === 'undefined' && !allowMissing) {
464
- throw new $TypeError$6('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
465
- }
466
-
467
- return {
468
- alias: alias,
469
- name: intrinsicName,
470
- value: value
471
- };
472
- }
473
-
474
- throw new $SyntaxError$4('intrinsic ' + name + ' does not exist!');
475
- };
476
-
477
- var getIntrinsic$4 = function GetIntrinsic(name, allowMissing) {
478
- if (typeof name !== 'string' || name.length === 0) {
479
- throw new $TypeError$6('intrinsic name must be a non-empty string');
480
- }
481
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
482
- throw new $TypeError$6('"allowMissing" argument must be a boolean');
483
- }
484
-
485
- if ($exec$3(/^%?[^%]*%?$/, name) === null) {
486
- throw new $SyntaxError$4('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
487
- }
488
- var parts = stringToPath$3(name);
489
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
490
-
491
- var intrinsic = getBaseIntrinsic$3('%' + intrinsicBaseName + '%', allowMissing);
492
- var intrinsicRealName = intrinsic.name;
493
- var value = intrinsic.value;
494
- var skipFurtherCaching = false;
495
-
496
- var alias = intrinsic.alias;
497
- if (alias) {
498
- intrinsicBaseName = alias[0];
499
- $spliceApply$3(parts, $concat$4([0, 1], alias));
500
- }
501
-
502
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
503
- var part = parts[i];
504
- var first = $strSlice$3(part, 0, 1);
505
- var last = $strSlice$3(part, -1);
506
- if (
507
- (
508
- (first === '"' || first === "'" || first === '`')
509
- || (last === '"' || last === "'" || last === '`')
510
- )
511
- && first !== last
512
- ) {
513
- throw new $SyntaxError$4('property names with quotes must have matching quotes');
514
- }
515
- if (part === 'constructor' || !isOwn) {
516
- skipFurtherCaching = true;
517
- }
518
-
519
- intrinsicBaseName += '.' + part;
520
- intrinsicRealName = '%' + intrinsicBaseName + '%';
521
-
522
- if (hasOwn$4(INTRINSICS$3, intrinsicRealName)) {
523
- value = INTRINSICS$3[intrinsicRealName];
524
- } else if (value != null) {
525
- if (!(part in value)) {
526
- if (!allowMissing) {
527
- throw new $TypeError$6('base intrinsic for ' + name + ' exists, but the property is not available.');
528
- }
529
- return void undefined$4;
530
- }
531
- if ($gOPD$4 && (i + 1) >= parts.length) {
532
- var desc = $gOPD$4(value, part);
533
- isOwn = !!desc;
534
-
535
- // By convention, when a data property is converted to an accessor
536
- // property to emulate a data property that does not suffer from
537
- // the override mistake, that accessor's getter is marked with
538
- // an `originalValue` property. Here, when we detect this, we
539
- // uphold the illusion by pretending to see that original data
540
- // property, i.e., returning the value rather than the getter
541
- // itself.
542
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
543
- value = desc.get;
544
- } else {
545
- value = value[part];
546
- }
547
- } else {
548
- isOwn = hasOwn$4(value, part);
549
- value = value[part];
550
- }
551
-
552
- if (isOwn && !skipFurtherCaching) {
553
- INTRINSICS$3[intrinsicRealName] = value;
554
- }
555
- }
556
- }
557
- return value;
558
- };
559
-
560
- var undefined$3;
561
-
562
- var $Error$2 = esErrors;
563
- var $EvalError$2 = _eval;
564
- var $RangeError$2 = range;
565
- var $ReferenceError$2 = ref;
566
- var $SyntaxError$3 = syntax;
567
- var $TypeError$5 = type;
568
- var $URIError$2 = uri;
569
-
570
- var $Function$2 = Function;
571
-
572
- // eslint-disable-next-line consistent-return
573
- var getEvalledConstructor$2 = function (expressionSyntax) {
574
- try {
575
- return $Function$2('"use strict"; return (' + expressionSyntax + ').constructor;')();
576
- } catch (e) {}
577
- };
578
-
579
- var $gOPD$3 = Object.getOwnPropertyDescriptor;
580
- if ($gOPD$3) {
581
- try {
582
- $gOPD$3({}, '');
583
- } catch (e) {
584
- $gOPD$3 = null; // this is IE 8, which has a broken gOPD
585
- }
586
- }
587
-
588
- var throwTypeError$2 = function () {
589
- throw new $TypeError$5();
590
- };
591
- var ThrowTypeError$2 = $gOPD$3
592
- ? (function () {
593
- try {
594
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
595
- arguments.callee; // IE 8 does not throw here
596
- return throwTypeError$2;
597
- } catch (calleeThrows) {
598
- try {
599
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
600
- return $gOPD$3(arguments, 'callee').get;
601
- } catch (gOPDthrows) {
602
- return throwTypeError$2;
603
- }
604
- }
605
- }())
606
- : throwTypeError$2;
607
-
608
- var hasSymbols$2 = hasSymbols$4();
609
- var hasProto$2 = hasProto$4();
610
-
611
- var getProto$2 = Object.getPrototypeOf || (
612
- hasProto$2
613
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
614
- : null
615
- );
616
-
617
- var needsEval$2 = {};
618
-
619
- var TypedArray$2 = typeof Uint8Array === 'undefined' || !getProto$2 ? undefined$3 : getProto$2(Uint8Array);
620
-
621
- var INTRINSICS$2 = {
622
- __proto__: null,
623
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$3 : AggregateError,
624
- '%Array%': Array,
625
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$3 : ArrayBuffer,
626
- '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$3,
627
- '%AsyncFromSyncIteratorPrototype%': undefined$3,
628
- '%AsyncFunction%': needsEval$2,
629
- '%AsyncGenerator%': needsEval$2,
630
- '%AsyncGeneratorFunction%': needsEval$2,
631
- '%AsyncIteratorPrototype%': needsEval$2,
632
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$3 : Atomics,
633
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$3 : BigInt,
634
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$3 : BigInt64Array,
635
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$3 : BigUint64Array,
636
- '%Boolean%': Boolean,
637
- '%DataView%': typeof DataView === 'undefined' ? undefined$3 : DataView,
638
- '%Date%': Date,
639
- '%decodeURI%': decodeURI,
640
- '%decodeURIComponent%': decodeURIComponent,
641
- '%encodeURI%': encodeURI,
642
- '%encodeURIComponent%': encodeURIComponent,
643
- '%Error%': $Error$2,
644
- '%eval%': eval, // eslint-disable-line no-eval
645
- '%EvalError%': $EvalError$2,
646
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$3 : Float32Array,
647
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$3 : Float64Array,
648
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$3 : FinalizationRegistry,
649
- '%Function%': $Function$2,
650
- '%GeneratorFunction%': needsEval$2,
651
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$3 : Int8Array,
652
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$3 : Int16Array,
653
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$3 : Int32Array,
654
- '%isFinite%': isFinite,
655
- '%isNaN%': isNaN,
656
- '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$3,
657
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$3,
658
- '%Map%': typeof Map === 'undefined' ? undefined$3 : Map,
659
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$3 : getProto$2(new Map()[Symbol.iterator]()),
660
- '%Math%': Math,
661
- '%Number%': Number,
662
- '%Object%': Object,
663
- '%parseFloat%': parseFloat,
664
- '%parseInt%': parseInt,
665
- '%Promise%': typeof Promise === 'undefined' ? undefined$3 : Promise,
666
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$3 : Proxy,
667
- '%RangeError%': $RangeError$2,
668
- '%ReferenceError%': $ReferenceError$2,
669
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$3 : Reflect,
670
- '%RegExp%': RegExp,
671
- '%Set%': typeof Set === 'undefined' ? undefined$3 : Set,
672
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$3 : getProto$2(new Set()[Symbol.iterator]()),
673
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$3 : SharedArrayBuffer,
674
- '%String%': String,
675
- '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$3,
676
- '%Symbol%': hasSymbols$2 ? Symbol : undefined$3,
677
- '%SyntaxError%': $SyntaxError$3,
678
- '%ThrowTypeError%': ThrowTypeError$2,
679
- '%TypedArray%': TypedArray$2,
680
- '%TypeError%': $TypeError$5,
681
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$3 : Uint8Array,
682
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$3 : Uint8ClampedArray,
683
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$3 : Uint16Array,
684
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$3 : Uint32Array,
685
- '%URIError%': $URIError$2,
686
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$3 : WeakMap,
687
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$3 : WeakRef,
688
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$3 : WeakSet
689
- };
690
-
691
- if (getProto$2) {
692
- try {
693
- null.error; // eslint-disable-line no-unused-expressions
694
- } catch (e) {
695
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
696
- var errorProto$2 = getProto$2(getProto$2(e));
697
- INTRINSICS$2['%Error.prototype%'] = errorProto$2;
698
- }
699
- }
700
-
701
- var doEval$2 = function doEval(name) {
702
- var value;
703
- if (name === '%AsyncFunction%') {
704
- value = getEvalledConstructor$2('async function () {}');
705
- } else if (name === '%GeneratorFunction%') {
706
- value = getEvalledConstructor$2('function* () {}');
707
- } else if (name === '%AsyncGeneratorFunction%') {
708
- value = getEvalledConstructor$2('async function* () {}');
709
- } else if (name === '%AsyncGenerator%') {
710
- var fn = doEval('%AsyncGeneratorFunction%');
711
- if (fn) {
712
- value = fn.prototype;
713
- }
714
- } else if (name === '%AsyncIteratorPrototype%') {
715
- var gen = doEval('%AsyncGenerator%');
716
- if (gen && getProto$2) {
717
- value = getProto$2(gen.prototype);
718
- }
719
- }
720
-
721
- INTRINSICS$2[name] = value;
722
-
723
- return value;
724
- };
725
-
726
- var LEGACY_ALIASES$2 = {
727
- __proto__: null,
728
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
729
- '%ArrayPrototype%': ['Array', 'prototype'],
730
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
731
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
732
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
733
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
734
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
735
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
736
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
737
- '%BooleanPrototype%': ['Boolean', 'prototype'],
738
- '%DataViewPrototype%': ['DataView', 'prototype'],
739
- '%DatePrototype%': ['Date', 'prototype'],
740
- '%ErrorPrototype%': ['Error', 'prototype'],
741
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
742
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
743
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
744
- '%FunctionPrototype%': ['Function', 'prototype'],
745
- '%Generator%': ['GeneratorFunction', 'prototype'],
746
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
747
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
748
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
749
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
750
- '%JSONParse%': ['JSON', 'parse'],
751
- '%JSONStringify%': ['JSON', 'stringify'],
752
- '%MapPrototype%': ['Map', 'prototype'],
753
- '%NumberPrototype%': ['Number', 'prototype'],
754
- '%ObjectPrototype%': ['Object', 'prototype'],
755
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
756
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
757
- '%PromisePrototype%': ['Promise', 'prototype'],
758
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
759
- '%Promise_all%': ['Promise', 'all'],
760
- '%Promise_reject%': ['Promise', 'reject'],
761
- '%Promise_resolve%': ['Promise', 'resolve'],
762
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
763
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
764
- '%RegExpPrototype%': ['RegExp', 'prototype'],
765
- '%SetPrototype%': ['Set', 'prototype'],
766
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
767
- '%StringPrototype%': ['String', 'prototype'],
768
- '%SymbolPrototype%': ['Symbol', 'prototype'],
769
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
770
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
771
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
772
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
773
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
774
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
775
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
776
- '%URIErrorPrototype%': ['URIError', 'prototype'],
777
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
778
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
779
- };
780
-
781
- var bind$2 = functionBind;
782
- var hasOwn$3 = hasown;
783
- var $concat$3 = bind$2.call(Function.call, Array.prototype.concat);
784
- var $spliceApply$2 = bind$2.call(Function.apply, Array.prototype.splice);
785
- var $replace$3 = bind$2.call(Function.call, String.prototype.replace);
786
- var $strSlice$2 = bind$2.call(Function.call, String.prototype.slice);
787
- var $exec$2 = bind$2.call(Function.call, RegExp.prototype.exec);
788
-
789
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
790
- var rePropName$2 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
791
- var reEscapeChar$2 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
792
- var stringToPath$2 = function stringToPath(string) {
793
- var first = $strSlice$2(string, 0, 1);
794
- var last = $strSlice$2(string, -1);
795
- if (first === '%' && last !== '%') {
796
- throw new $SyntaxError$3('invalid intrinsic syntax, expected closing `%`');
797
- } else if (last === '%' && first !== '%') {
798
- throw new $SyntaxError$3('invalid intrinsic syntax, expected opening `%`');
799
- }
800
- var result = [];
801
- $replace$3(string, rePropName$2, function (match, number, quote, subString) {
802
- result[result.length] = quote ? $replace$3(subString, reEscapeChar$2, '$1') : number || match;
803
- });
804
- return result;
805
- };
806
- /* end adaptation */
807
-
808
- var getBaseIntrinsic$2 = function getBaseIntrinsic(name, allowMissing) {
809
- var intrinsicName = name;
810
- var alias;
811
- if (hasOwn$3(LEGACY_ALIASES$2, intrinsicName)) {
812
- alias = LEGACY_ALIASES$2[intrinsicName];
813
- intrinsicName = '%' + alias[0] + '%';
814
- }
815
-
816
- if (hasOwn$3(INTRINSICS$2, intrinsicName)) {
817
- var value = INTRINSICS$2[intrinsicName];
818
- if (value === needsEval$2) {
819
- value = doEval$2(intrinsicName);
820
- }
821
- if (typeof value === 'undefined' && !allowMissing) {
822
- throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
823
- }
824
-
825
- return {
826
- alias: alias,
827
- name: intrinsicName,
828
- value: value
829
- };
830
- }
831
-
832
- throw new $SyntaxError$3('intrinsic ' + name + ' does not exist!');
833
- };
834
-
835
- var getIntrinsic$3 = function GetIntrinsic(name, allowMissing) {
836
- if (typeof name !== 'string' || name.length === 0) {
837
- throw new $TypeError$5('intrinsic name must be a non-empty string');
838
- }
839
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
840
- throw new $TypeError$5('"allowMissing" argument must be a boolean');
841
- }
842
-
843
- if ($exec$2(/^%?[^%]*%?$/, name) === null) {
844
- throw new $SyntaxError$3('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
845
- }
846
- var parts = stringToPath$2(name);
847
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
848
-
849
- var intrinsic = getBaseIntrinsic$2('%' + intrinsicBaseName + '%', allowMissing);
850
- var intrinsicRealName = intrinsic.name;
851
- var value = intrinsic.value;
852
- var skipFurtherCaching = false;
853
-
854
- var alias = intrinsic.alias;
855
- if (alias) {
856
- intrinsicBaseName = alias[0];
857
- $spliceApply$2(parts, $concat$3([0, 1], alias));
858
- }
859
-
860
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
861
- var part = parts[i];
862
- var first = $strSlice$2(part, 0, 1);
863
- var last = $strSlice$2(part, -1);
864
- if (
865
- (
866
- (first === '"' || first === "'" || first === '`')
867
- || (last === '"' || last === "'" || last === '`')
868
- )
869
- && first !== last
870
- ) {
871
- throw new $SyntaxError$3('property names with quotes must have matching quotes');
872
- }
873
- if (part === 'constructor' || !isOwn) {
874
- skipFurtherCaching = true;
875
- }
876
-
877
- intrinsicBaseName += '.' + part;
878
- intrinsicRealName = '%' + intrinsicBaseName + '%';
879
-
880
- if (hasOwn$3(INTRINSICS$2, intrinsicRealName)) {
881
- value = INTRINSICS$2[intrinsicRealName];
882
- } else if (value != null) {
883
- if (!(part in value)) {
884
- if (!allowMissing) {
885
- throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
886
- }
887
- return void undefined$3;
888
- }
889
- if ($gOPD$3 && (i + 1) >= parts.length) {
890
- var desc = $gOPD$3(value, part);
891
- isOwn = !!desc;
892
-
893
- // By convention, when a data property is converted to an accessor
894
- // property to emulate a data property that does not suffer from
895
- // the override mistake, that accessor's getter is marked with
896
- // an `originalValue` property. Here, when we detect this, we
897
- // uphold the illusion by pretending to see that original data
898
- // property, i.e., returning the value rather than the getter
899
- // itself.
900
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
901
- value = desc.get;
902
- } else {
903
- value = value[part];
904
- }
905
- } else {
906
- isOwn = hasOwn$3(value, part);
907
- value = value[part];
908
- }
909
-
910
- if (isOwn && !skipFurtherCaching) {
911
- INTRINSICS$2[intrinsicRealName] = value;
912
- }
913
- }
914
- }
915
- return value;
916
- };
917
-
918
- var callBind$1 = {exports: {}};
919
-
920
- var undefined$2;
921
-
922
- var $Error$1 = esErrors;
923
- var $EvalError$1 = _eval;
924
- var $RangeError$1 = range;
925
- var $ReferenceError$1 = ref;
926
- var $SyntaxError$2 = syntax;
927
- var $TypeError$4 = type;
928
- var $URIError$1 = uri;
929
-
930
- var $Function$1 = Function;
931
-
932
- // eslint-disable-next-line consistent-return
933
- var getEvalledConstructor$1 = function (expressionSyntax) {
934
- try {
935
- return $Function$1('"use strict"; return (' + expressionSyntax + ').constructor;')();
936
- } catch (e) {}
937
- };
938
-
939
- var $gOPD$2 = Object.getOwnPropertyDescriptor;
940
- if ($gOPD$2) {
941
- try {
942
- $gOPD$2({}, '');
943
- } catch (e) {
944
- $gOPD$2 = null; // this is IE 8, which has a broken gOPD
945
- }
946
- }
947
-
948
- var throwTypeError$1 = function () {
949
- throw new $TypeError$4();
950
- };
951
- var ThrowTypeError$1 = $gOPD$2
952
- ? (function () {
953
- try {
954
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
955
- arguments.callee; // IE 8 does not throw here
956
- return throwTypeError$1;
957
- } catch (calleeThrows) {
958
- try {
959
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
960
- return $gOPD$2(arguments, 'callee').get;
961
- } catch (gOPDthrows) {
962
- return throwTypeError$1;
963
- }
964
- }
965
- }())
966
- : throwTypeError$1;
967
-
968
- var hasSymbols$1 = hasSymbols$4();
969
- var hasProto$1 = hasProto$4();
970
-
971
- var getProto$1 = Object.getPrototypeOf || (
972
- hasProto$1
973
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
974
- : null
975
- );
976
-
977
- var needsEval$1 = {};
978
-
979
- var TypedArray$1 = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$2 : getProto$1(Uint8Array);
980
-
981
- var INTRINSICS$1 = {
982
- __proto__: null,
983
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$2 : AggregateError,
984
- '%Array%': Array,
985
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$2 : ArrayBuffer,
986
- '%ArrayIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$2,
987
- '%AsyncFromSyncIteratorPrototype%': undefined$2,
988
- '%AsyncFunction%': needsEval$1,
989
- '%AsyncGenerator%': needsEval$1,
990
- '%AsyncGeneratorFunction%': needsEval$1,
991
- '%AsyncIteratorPrototype%': needsEval$1,
992
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$2 : Atomics,
993
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$2 : BigInt,
994
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$2 : BigInt64Array,
995
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$2 : BigUint64Array,
996
- '%Boolean%': Boolean,
997
- '%DataView%': typeof DataView === 'undefined' ? undefined$2 : DataView,
998
- '%Date%': Date,
999
- '%decodeURI%': decodeURI,
1000
- '%decodeURIComponent%': decodeURIComponent,
1001
- '%encodeURI%': encodeURI,
1002
- '%encodeURIComponent%': encodeURIComponent,
1003
- '%Error%': $Error$1,
1004
- '%eval%': eval, // eslint-disable-line no-eval
1005
- '%EvalError%': $EvalError$1,
1006
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$2 : Float32Array,
1007
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$2 : Float64Array,
1008
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$2 : FinalizationRegistry,
1009
- '%Function%': $Function$1,
1010
- '%GeneratorFunction%': needsEval$1,
1011
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$2 : Int8Array,
1012
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$2 : Int16Array,
1013
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$2 : Int32Array,
1014
- '%isFinite%': isFinite,
1015
- '%isNaN%': isNaN,
1016
- '%IteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$2,
1017
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$2,
1018
- '%Map%': typeof Map === 'undefined' ? undefined$2 : Map,
1019
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Map()[Symbol.iterator]()),
1020
- '%Math%': Math,
1021
- '%Number%': Number,
1022
- '%Object%': Object,
1023
- '%parseFloat%': parseFloat,
1024
- '%parseInt%': parseInt,
1025
- '%Promise%': typeof Promise === 'undefined' ? undefined$2 : Promise,
1026
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$2 : Proxy,
1027
- '%RangeError%': $RangeError$1,
1028
- '%ReferenceError%': $ReferenceError$1,
1029
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$2 : Reflect,
1030
- '%RegExp%': RegExp,
1031
- '%Set%': typeof Set === 'undefined' ? undefined$2 : Set,
1032
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Set()[Symbol.iterator]()),
1033
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$2 : SharedArrayBuffer,
1034
- '%String%': String,
1035
- '%StringIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$2,
1036
- '%Symbol%': hasSymbols$1 ? Symbol : undefined$2,
1037
- '%SyntaxError%': $SyntaxError$2,
1038
- '%ThrowTypeError%': ThrowTypeError$1,
1039
- '%TypedArray%': TypedArray$1,
1040
- '%TypeError%': $TypeError$4,
1041
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$2 : Uint8Array,
1042
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$2 : Uint8ClampedArray,
1043
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$2 : Uint16Array,
1044
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$2 : Uint32Array,
1045
- '%URIError%': $URIError$1,
1046
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$2 : WeakMap,
1047
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$2 : WeakRef,
1048
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$2 : WeakSet
1049
- };
1050
-
1051
- if (getProto$1) {
1052
- try {
1053
- null.error; // eslint-disable-line no-unused-expressions
1054
- } catch (e) {
1055
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1056
- var errorProto$1 = getProto$1(getProto$1(e));
1057
- INTRINSICS$1['%Error.prototype%'] = errorProto$1;
1058
- }
1059
- }
1060
-
1061
- var doEval$1 = function doEval(name) {
1062
- var value;
1063
- if (name === '%AsyncFunction%') {
1064
- value = getEvalledConstructor$1('async function () {}');
1065
- } else if (name === '%GeneratorFunction%') {
1066
- value = getEvalledConstructor$1('function* () {}');
1067
- } else if (name === '%AsyncGeneratorFunction%') {
1068
- value = getEvalledConstructor$1('async function* () {}');
1069
- } else if (name === '%AsyncGenerator%') {
1070
- var fn = doEval('%AsyncGeneratorFunction%');
1071
- if (fn) {
1072
- value = fn.prototype;
1073
- }
1074
- } else if (name === '%AsyncIteratorPrototype%') {
1075
- var gen = doEval('%AsyncGenerator%');
1076
- if (gen && getProto$1) {
1077
- value = getProto$1(gen.prototype);
1078
- }
1079
- }
1080
-
1081
- INTRINSICS$1[name] = value;
1082
-
1083
- return value;
1084
- };
1085
-
1086
- var LEGACY_ALIASES$1 = {
1087
- __proto__: null,
1088
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1089
- '%ArrayPrototype%': ['Array', 'prototype'],
1090
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1091
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1092
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1093
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1094
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1095
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1096
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1097
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1098
- '%DataViewPrototype%': ['DataView', 'prototype'],
1099
- '%DatePrototype%': ['Date', 'prototype'],
1100
- '%ErrorPrototype%': ['Error', 'prototype'],
1101
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1102
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1103
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1104
- '%FunctionPrototype%': ['Function', 'prototype'],
1105
- '%Generator%': ['GeneratorFunction', 'prototype'],
1106
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1107
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1108
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1109
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1110
- '%JSONParse%': ['JSON', 'parse'],
1111
- '%JSONStringify%': ['JSON', 'stringify'],
1112
- '%MapPrototype%': ['Map', 'prototype'],
1113
- '%NumberPrototype%': ['Number', 'prototype'],
1114
- '%ObjectPrototype%': ['Object', 'prototype'],
1115
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1116
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1117
- '%PromisePrototype%': ['Promise', 'prototype'],
1118
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1119
- '%Promise_all%': ['Promise', 'all'],
1120
- '%Promise_reject%': ['Promise', 'reject'],
1121
- '%Promise_resolve%': ['Promise', 'resolve'],
1122
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1123
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1124
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1125
- '%SetPrototype%': ['Set', 'prototype'],
1126
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1127
- '%StringPrototype%': ['String', 'prototype'],
1128
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1129
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1130
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1131
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1132
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1133
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1134
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1135
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1136
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1137
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1138
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1139
- };
1140
-
1141
- var bind$1 = functionBind;
1142
- var hasOwn$2 = hasown;
1143
- var $concat$2 = bind$1.call(Function.call, Array.prototype.concat);
1144
- var $spliceApply$1 = bind$1.call(Function.apply, Array.prototype.splice);
1145
- var $replace$2 = bind$1.call(Function.call, String.prototype.replace);
1146
- var $strSlice$1 = bind$1.call(Function.call, String.prototype.slice);
1147
- var $exec$1 = bind$1.call(Function.call, RegExp.prototype.exec);
1148
-
1149
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1150
- var rePropName$1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1151
- var reEscapeChar$1 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1152
- var stringToPath$1 = function stringToPath(string) {
1153
- var first = $strSlice$1(string, 0, 1);
1154
- var last = $strSlice$1(string, -1);
1155
- if (first === '%' && last !== '%') {
1156
- throw new $SyntaxError$2('invalid intrinsic syntax, expected closing `%`');
1157
- } else if (last === '%' && first !== '%') {
1158
- throw new $SyntaxError$2('invalid intrinsic syntax, expected opening `%`');
1159
- }
1160
- var result = [];
1161
- $replace$2(string, rePropName$1, function (match, number, quote, subString) {
1162
- result[result.length] = quote ? $replace$2(subString, reEscapeChar$1, '$1') : number || match;
1163
- });
1164
- return result;
1165
- };
1166
- /* end adaptation */
1167
-
1168
- var getBaseIntrinsic$1 = function getBaseIntrinsic(name, allowMissing) {
1169
- var intrinsicName = name;
1170
- var alias;
1171
- if (hasOwn$2(LEGACY_ALIASES$1, intrinsicName)) {
1172
- alias = LEGACY_ALIASES$1[intrinsicName];
1173
- intrinsicName = '%' + alias[0] + '%';
1174
- }
1175
-
1176
- if (hasOwn$2(INTRINSICS$1, intrinsicName)) {
1177
- var value = INTRINSICS$1[intrinsicName];
1178
- if (value === needsEval$1) {
1179
- value = doEval$1(intrinsicName);
1180
- }
1181
- if (typeof value === 'undefined' && !allowMissing) {
1182
- throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1183
- }
1184
-
1185
- return {
1186
- alias: alias,
1187
- name: intrinsicName,
1188
- value: value
1189
- };
1190
- }
1191
-
1192
- throw new $SyntaxError$2('intrinsic ' + name + ' does not exist!');
1193
- };
1194
-
1195
- var getIntrinsic$2 = function GetIntrinsic(name, allowMissing) {
1196
- if (typeof name !== 'string' || name.length === 0) {
1197
- throw new $TypeError$4('intrinsic name must be a non-empty string');
1198
- }
1199
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1200
- throw new $TypeError$4('"allowMissing" argument must be a boolean');
1201
- }
1202
-
1203
- if ($exec$1(/^%?[^%]*%?$/, name) === null) {
1204
- throw new $SyntaxError$2('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1205
- }
1206
- var parts = stringToPath$1(name);
1207
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1208
-
1209
- var intrinsic = getBaseIntrinsic$1('%' + intrinsicBaseName + '%', allowMissing);
1210
- var intrinsicRealName = intrinsic.name;
1211
- var value = intrinsic.value;
1212
- var skipFurtherCaching = false;
1213
-
1214
- var alias = intrinsic.alias;
1215
- if (alias) {
1216
- intrinsicBaseName = alias[0];
1217
- $spliceApply$1(parts, $concat$2([0, 1], alias));
1218
- }
1219
-
1220
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1221
- var part = parts[i];
1222
- var first = $strSlice$1(part, 0, 1);
1223
- var last = $strSlice$1(part, -1);
1224
- if (
1225
- (
1226
- (first === '"' || first === "'" || first === '`')
1227
- || (last === '"' || last === "'" || last === '`')
1228
- )
1229
- && first !== last
1230
- ) {
1231
- throw new $SyntaxError$2('property names with quotes must have matching quotes');
1232
- }
1233
- if (part === 'constructor' || !isOwn) {
1234
- skipFurtherCaching = true;
1235
- }
1236
-
1237
- intrinsicBaseName += '.' + part;
1238
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1239
-
1240
- if (hasOwn$2(INTRINSICS$1, intrinsicRealName)) {
1241
- value = INTRINSICS$1[intrinsicRealName];
1242
- } else if (value != null) {
1243
- if (!(part in value)) {
1244
- if (!allowMissing) {
1245
- throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
1246
- }
1247
- return void undefined$2;
1248
- }
1249
- if ($gOPD$2 && (i + 1) >= parts.length) {
1250
- var desc = $gOPD$2(value, part);
1251
- isOwn = !!desc;
1252
-
1253
- // By convention, when a data property is converted to an accessor
1254
- // property to emulate a data property that does not suffer from
1255
- // the override mistake, that accessor's getter is marked with
1256
- // an `originalValue` property. Here, when we detect this, we
1257
- // uphold the illusion by pretending to see that original data
1258
- // property, i.e., returning the value rather than the getter
1259
- // itself.
1260
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1261
- value = desc.get;
1262
- } else {
1263
- value = value[part];
1264
- }
1265
- } else {
1266
- isOwn = hasOwn$2(value, part);
1267
- value = value[part];
1268
- }
1269
-
1270
- if (isOwn && !skipFurtherCaching) {
1271
- INTRINSICS$1[intrinsicRealName] = value;
1272
- }
1273
- }
1274
- }
1275
- return value;
1276
- };
1277
-
1278
- var getIntrinsic$1;
1279
- var hasRequiredGetIntrinsic;
1280
-
1281
- function requireGetIntrinsic () {
1282
- if (hasRequiredGetIntrinsic) return getIntrinsic$1;
1283
- hasRequiredGetIntrinsic = 1;
1284
-
1285
- var undefined$1;
1286
-
1287
- var $Error = esErrors;
1288
- var $EvalError = _eval;
1289
- var $RangeError = range;
1290
- var $ReferenceError = ref;
1291
- var $SyntaxError = syntax;
1292
- var $TypeError = type;
1293
- var $URIError = uri;
1294
-
1295
- var $Function = Function;
1296
-
1297
- // eslint-disable-next-line consistent-return
1298
- var getEvalledConstructor = function (expressionSyntax) {
1299
- try {
1300
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1301
- } catch (e) {}
1302
- };
1303
-
1304
- var $gOPD = Object.getOwnPropertyDescriptor;
1305
- if ($gOPD) {
1306
- try {
1307
- $gOPD({}, '');
1308
- } catch (e) {
1309
- $gOPD = null; // this is IE 8, which has a broken gOPD
1310
- }
1311
- }
1312
-
1313
- var throwTypeError = function () {
1314
- throw new $TypeError();
1315
- };
1316
- var ThrowTypeError = $gOPD
1317
- ? (function () {
1318
- try {
1319
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1320
- arguments.callee; // IE 8 does not throw here
1321
- return throwTypeError;
1322
- } catch (calleeThrows) {
1323
- try {
1324
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1325
- return $gOPD(arguments, 'callee').get;
1326
- } catch (gOPDthrows) {
1327
- return throwTypeError;
1328
- }
1329
- }
1330
- }())
1331
- : throwTypeError;
1332
-
1333
- var hasSymbols = hasSymbols$4();
1334
- var hasProto = hasProto$4();
1335
-
1336
- var getProto = Object.getPrototypeOf || (
1337
- hasProto
1338
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
1339
- : null
1340
- );
1341
-
1342
- var needsEval = {};
1343
-
1344
- var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
1345
-
1346
- var INTRINSICS = {
1347
- __proto__: null,
1348
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1349
- '%Array%': Array,
1350
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1351
- '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
1352
- '%AsyncFromSyncIteratorPrototype%': undefined$1,
1353
- '%AsyncFunction%': needsEval,
1354
- '%AsyncGenerator%': needsEval,
1355
- '%AsyncGeneratorFunction%': needsEval,
1356
- '%AsyncIteratorPrototype%': needsEval,
1357
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1358
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1359
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
1360
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
1361
- '%Boolean%': Boolean,
1362
- '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1363
- '%Date%': Date,
1364
- '%decodeURI%': decodeURI,
1365
- '%decodeURIComponent%': decodeURIComponent,
1366
- '%encodeURI%': encodeURI,
1367
- '%encodeURIComponent%': encodeURIComponent,
1368
- '%Error%': $Error,
1369
- '%eval%': eval, // eslint-disable-line no-eval
1370
- '%EvalError%': $EvalError,
1371
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1372
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1373
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1374
- '%Function%': $Function,
1375
- '%GeneratorFunction%': needsEval,
1376
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1377
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1378
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1379
- '%isFinite%': isFinite,
1380
- '%isNaN%': isNaN,
1381
- '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1382
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1383
- '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1384
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1385
- '%Math%': Math,
1386
- '%Number%': Number,
1387
- '%Object%': Object,
1388
- '%parseFloat%': parseFloat,
1389
- '%parseInt%': parseInt,
1390
- '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1391
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1392
- '%RangeError%': $RangeError,
1393
- '%ReferenceError%': $ReferenceError,
1394
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1395
- '%RegExp%': RegExp,
1396
- '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1397
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1398
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1399
- '%String%': String,
1400
- '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
1401
- '%Symbol%': hasSymbols ? Symbol : undefined$1,
1402
- '%SyntaxError%': $SyntaxError,
1403
- '%ThrowTypeError%': ThrowTypeError,
1404
- '%TypedArray%': TypedArray,
1405
- '%TypeError%': $TypeError,
1406
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1407
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1408
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1409
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1410
- '%URIError%': $URIError,
1411
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1412
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1413
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1414
- };
1415
-
1416
- if (getProto) {
1417
- try {
1418
- null.error; // eslint-disable-line no-unused-expressions
1419
- } catch (e) {
1420
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1421
- var errorProto = getProto(getProto(e));
1422
- INTRINSICS['%Error.prototype%'] = errorProto;
1423
- }
1424
- }
1425
-
1426
- var doEval = function doEval(name) {
1427
- var value;
1428
- if (name === '%AsyncFunction%') {
1429
- value = getEvalledConstructor('async function () {}');
1430
- } else if (name === '%GeneratorFunction%') {
1431
- value = getEvalledConstructor('function* () {}');
1432
- } else if (name === '%AsyncGeneratorFunction%') {
1433
- value = getEvalledConstructor('async function* () {}');
1434
- } else if (name === '%AsyncGenerator%') {
1435
- var fn = doEval('%AsyncGeneratorFunction%');
1436
- if (fn) {
1437
- value = fn.prototype;
1438
- }
1439
- } else if (name === '%AsyncIteratorPrototype%') {
1440
- var gen = doEval('%AsyncGenerator%');
1441
- if (gen && getProto) {
1442
- value = getProto(gen.prototype);
1443
- }
1444
- }
1445
-
1446
- INTRINSICS[name] = value;
1447
-
1448
- return value;
1449
- };
1450
-
1451
- var LEGACY_ALIASES = {
1452
- __proto__: null,
1453
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1454
- '%ArrayPrototype%': ['Array', 'prototype'],
1455
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1456
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1457
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1458
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1459
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1460
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1461
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1462
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1463
- '%DataViewPrototype%': ['DataView', 'prototype'],
1464
- '%DatePrototype%': ['Date', 'prototype'],
1465
- '%ErrorPrototype%': ['Error', 'prototype'],
1466
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1467
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1468
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1469
- '%FunctionPrototype%': ['Function', 'prototype'],
1470
- '%Generator%': ['GeneratorFunction', 'prototype'],
1471
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1472
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1473
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1474
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1475
- '%JSONParse%': ['JSON', 'parse'],
1476
- '%JSONStringify%': ['JSON', 'stringify'],
1477
- '%MapPrototype%': ['Map', 'prototype'],
1478
- '%NumberPrototype%': ['Number', 'prototype'],
1479
- '%ObjectPrototype%': ['Object', 'prototype'],
1480
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1481
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1482
- '%PromisePrototype%': ['Promise', 'prototype'],
1483
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1484
- '%Promise_all%': ['Promise', 'all'],
1485
- '%Promise_reject%': ['Promise', 'reject'],
1486
- '%Promise_resolve%': ['Promise', 'resolve'],
1487
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1488
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1489
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1490
- '%SetPrototype%': ['Set', 'prototype'],
1491
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1492
- '%StringPrototype%': ['String', 'prototype'],
1493
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1494
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1495
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1496
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1497
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1498
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1499
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1500
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1501
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1502
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1503
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1504
- };
1505
-
1506
- var bind = functionBind;
1507
- var hasOwn = hasown;
1508
- var $concat = bind.call(Function.call, Array.prototype.concat);
1509
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
1510
- var $replace = bind.call(Function.call, String.prototype.replace);
1511
- var $strSlice = bind.call(Function.call, String.prototype.slice);
1512
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
1513
-
1514
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1515
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1516
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1517
- var stringToPath = function stringToPath(string) {
1518
- var first = $strSlice(string, 0, 1);
1519
- var last = $strSlice(string, -1);
1520
- if (first === '%' && last !== '%') {
1521
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
1522
- } else if (last === '%' && first !== '%') {
1523
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
1524
- }
1525
- var result = [];
1526
- $replace(string, rePropName, function (match, number, quote, subString) {
1527
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1528
- });
1529
- return result;
1530
- };
1531
- /* end adaptation */
1532
-
1533
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1534
- var intrinsicName = name;
1535
- var alias;
1536
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
1537
- alias = LEGACY_ALIASES[intrinsicName];
1538
- intrinsicName = '%' + alias[0] + '%';
1539
- }
1540
-
1541
- if (hasOwn(INTRINSICS, intrinsicName)) {
1542
- var value = INTRINSICS[intrinsicName];
1543
- if (value === needsEval) {
1544
- value = doEval(intrinsicName);
1545
- }
1546
- if (typeof value === 'undefined' && !allowMissing) {
1547
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1548
- }
1549
-
1550
- return {
1551
- alias: alias,
1552
- name: intrinsicName,
1553
- value: value
1554
- };
1555
- }
1556
-
1557
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
1558
- };
1559
-
1560
- getIntrinsic$1 = function GetIntrinsic(name, allowMissing) {
1561
- if (typeof name !== 'string' || name.length === 0) {
1562
- throw new $TypeError('intrinsic name must be a non-empty string');
1563
- }
1564
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1565
- throw new $TypeError('"allowMissing" argument must be a boolean');
1566
- }
1567
-
1568
- if ($exec(/^%?[^%]*%?$/, name) === null) {
1569
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1570
- }
1571
- var parts = stringToPath(name);
1572
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1573
-
1574
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1575
- var intrinsicRealName = intrinsic.name;
1576
- var value = intrinsic.value;
1577
- var skipFurtherCaching = false;
1578
-
1579
- var alias = intrinsic.alias;
1580
- if (alias) {
1581
- intrinsicBaseName = alias[0];
1582
- $spliceApply(parts, $concat([0, 1], alias));
1583
- }
1584
-
1585
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1586
- var part = parts[i];
1587
- var first = $strSlice(part, 0, 1);
1588
- var last = $strSlice(part, -1);
1589
- if (
1590
- (
1591
- (first === '"' || first === "'" || first === '`')
1592
- || (last === '"' || last === "'" || last === '`')
1593
- )
1594
- && first !== last
1595
- ) {
1596
- throw new $SyntaxError('property names with quotes must have matching quotes');
1597
- }
1598
- if (part === 'constructor' || !isOwn) {
1599
- skipFurtherCaching = true;
1600
- }
1601
-
1602
- intrinsicBaseName += '.' + part;
1603
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1604
-
1605
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
1606
- value = INTRINSICS[intrinsicRealName];
1607
- } else if (value != null) {
1608
- if (!(part in value)) {
1609
- if (!allowMissing) {
1610
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
1611
- }
1612
- return void undefined$1;
1613
- }
1614
- if ($gOPD && (i + 1) >= parts.length) {
1615
- var desc = $gOPD(value, part);
1616
- isOwn = !!desc;
1617
-
1618
- // By convention, when a data property is converted to an accessor
1619
- // property to emulate a data property that does not suffer from
1620
- // the override mistake, that accessor's getter is marked with
1621
- // an `originalValue` property. Here, when we detect this, we
1622
- // uphold the illusion by pretending to see that original data
1623
- // property, i.e., returning the value rather than the getter
1624
- // itself.
1625
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1626
- value = desc.get;
1627
- } else {
1628
- value = value[part];
1629
- }
1630
- } else {
1631
- isOwn = hasOwn(value, part);
1632
- value = value[part];
1633
- }
1634
-
1635
- if (isOwn && !skipFurtherCaching) {
1636
- INTRINSICS[intrinsicRealName] = value;
1637
- }
1638
- }
1639
- }
1640
- return value;
1641
- };
1642
- return getIntrinsic$1;
1643
- }
1644
-
1645
- var esDefineProperty;
1646
- var hasRequiredEsDefineProperty;
1647
-
1648
- function requireEsDefineProperty () {
1649
- if (hasRequiredEsDefineProperty) return esDefineProperty;
1650
- hasRequiredEsDefineProperty = 1;
1651
-
1652
- var GetIntrinsic = requireGetIntrinsic();
1653
-
1654
- /** @type {import('.')} */
1655
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
1656
- if ($defineProperty) {
1657
- try {
1658
- $defineProperty({}, 'a', { value: 1 });
1659
- } catch (e) {
1660
- // IE 8 has a broken defineProperty
1661
- $defineProperty = false;
1662
- }
1663
- }
1664
-
1665
- esDefineProperty = $defineProperty;
1666
- return esDefineProperty;
1667
- }
1668
-
1669
- var undefined$1;
1670
-
1671
- var $Error = esErrors;
1672
- var $EvalError = _eval;
1673
- var $RangeError = range;
1674
- var $ReferenceError = ref;
1675
- var $SyntaxError$1 = syntax;
1676
- var $TypeError$3 = type;
1677
- var $URIError = uri;
1678
-
1679
- var $Function = Function;
1680
-
1681
- // eslint-disable-next-line consistent-return
1682
- var getEvalledConstructor = function (expressionSyntax) {
1683
- try {
1684
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1685
- } catch (e) {}
1686
- };
1687
-
1688
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
1689
- if ($gOPD$1) {
1690
- try {
1691
- $gOPD$1({}, '');
1692
- } catch (e) {
1693
- $gOPD$1 = null; // this is IE 8, which has a broken gOPD
1694
- }
1695
- }
1696
-
1697
- var throwTypeError = function () {
1698
- throw new $TypeError$3();
1699
- };
1700
- var ThrowTypeError = $gOPD$1
1701
- ? (function () {
1702
- try {
1703
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1704
- arguments.callee; // IE 8 does not throw here
1705
- return throwTypeError;
1706
- } catch (calleeThrows) {
1707
- try {
1708
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1709
- return $gOPD$1(arguments, 'callee').get;
1710
- } catch (gOPDthrows) {
1711
- return throwTypeError;
1712
- }
1713
- }
1714
- }())
1715
- : throwTypeError;
1716
-
1717
- var hasSymbols = hasSymbols$4();
1718
- var hasProto = hasProto$4();
1719
-
1720
- var getProto = Object.getPrototypeOf || (
1721
- hasProto
1722
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
1723
- : null
1724
- );
1725
-
1726
- var needsEval = {};
1727
-
1728
- var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
1729
-
1730
- var INTRINSICS = {
1731
- __proto__: null,
1732
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1733
- '%Array%': Array,
1734
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1735
- '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
1736
- '%AsyncFromSyncIteratorPrototype%': undefined$1,
1737
- '%AsyncFunction%': needsEval,
1738
- '%AsyncGenerator%': needsEval,
1739
- '%AsyncGeneratorFunction%': needsEval,
1740
- '%AsyncIteratorPrototype%': needsEval,
1741
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1742
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1743
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
1744
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
1745
- '%Boolean%': Boolean,
1746
- '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1747
- '%Date%': Date,
1748
- '%decodeURI%': decodeURI,
1749
- '%decodeURIComponent%': decodeURIComponent,
1750
- '%encodeURI%': encodeURI,
1751
- '%encodeURIComponent%': encodeURIComponent,
1752
- '%Error%': $Error,
1753
- '%eval%': eval, // eslint-disable-line no-eval
1754
- '%EvalError%': $EvalError,
1755
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1756
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1757
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1758
- '%Function%': $Function,
1759
- '%GeneratorFunction%': needsEval,
1760
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1761
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1762
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1763
- '%isFinite%': isFinite,
1764
- '%isNaN%': isNaN,
1765
- '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1766
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1767
- '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1768
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1769
- '%Math%': Math,
1770
- '%Number%': Number,
1771
- '%Object%': Object,
1772
- '%parseFloat%': parseFloat,
1773
- '%parseInt%': parseInt,
1774
- '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1775
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1776
- '%RangeError%': $RangeError,
1777
- '%ReferenceError%': $ReferenceError,
1778
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1779
- '%RegExp%': RegExp,
1780
- '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1781
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1782
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1783
- '%String%': String,
1784
- '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
1785
- '%Symbol%': hasSymbols ? Symbol : undefined$1,
1786
- '%SyntaxError%': $SyntaxError$1,
1787
- '%ThrowTypeError%': ThrowTypeError,
1788
- '%TypedArray%': TypedArray,
1789
- '%TypeError%': $TypeError$3,
1790
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1791
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1792
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1793
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1794
- '%URIError%': $URIError,
1795
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1796
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1797
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1798
- };
1799
-
1800
- if (getProto) {
1801
- try {
1802
- null.error; // eslint-disable-line no-unused-expressions
1803
- } catch (e) {
1804
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1805
- var errorProto = getProto(getProto(e));
1806
- INTRINSICS['%Error.prototype%'] = errorProto;
1807
- }
1808
- }
1809
-
1810
- var doEval = function doEval(name) {
1811
- var value;
1812
- if (name === '%AsyncFunction%') {
1813
- value = getEvalledConstructor('async function () {}');
1814
- } else if (name === '%GeneratorFunction%') {
1815
- value = getEvalledConstructor('function* () {}');
1816
- } else if (name === '%AsyncGeneratorFunction%') {
1817
- value = getEvalledConstructor('async function* () {}');
1818
- } else if (name === '%AsyncGenerator%') {
1819
- var fn = doEval('%AsyncGeneratorFunction%');
1820
- if (fn) {
1821
- value = fn.prototype;
1822
- }
1823
- } else if (name === '%AsyncIteratorPrototype%') {
1824
- var gen = doEval('%AsyncGenerator%');
1825
- if (gen && getProto) {
1826
- value = getProto(gen.prototype);
1827
- }
1828
- }
1829
-
1830
- INTRINSICS[name] = value;
1831
-
1832
- return value;
1833
- };
1834
-
1835
- var LEGACY_ALIASES = {
1836
- __proto__: null,
1837
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1838
- '%ArrayPrototype%': ['Array', 'prototype'],
1839
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1840
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1841
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1842
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1843
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1844
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1845
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1846
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1847
- '%DataViewPrototype%': ['DataView', 'prototype'],
1848
- '%DatePrototype%': ['Date', 'prototype'],
1849
- '%ErrorPrototype%': ['Error', 'prototype'],
1850
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1851
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1852
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1853
- '%FunctionPrototype%': ['Function', 'prototype'],
1854
- '%Generator%': ['GeneratorFunction', 'prototype'],
1855
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1856
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1857
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1858
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1859
- '%JSONParse%': ['JSON', 'parse'],
1860
- '%JSONStringify%': ['JSON', 'stringify'],
1861
- '%MapPrototype%': ['Map', 'prototype'],
1862
- '%NumberPrototype%': ['Number', 'prototype'],
1863
- '%ObjectPrototype%': ['Object', 'prototype'],
1864
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1865
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1866
- '%PromisePrototype%': ['Promise', 'prototype'],
1867
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1868
- '%Promise_all%': ['Promise', 'all'],
1869
- '%Promise_reject%': ['Promise', 'reject'],
1870
- '%Promise_resolve%': ['Promise', 'resolve'],
1871
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1872
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1873
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1874
- '%SetPrototype%': ['Set', 'prototype'],
1875
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1876
- '%StringPrototype%': ['String', 'prototype'],
1877
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1878
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1879
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1880
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1881
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1882
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1883
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1884
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1885
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1886
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1887
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1888
- };
1889
-
1890
- var bind = functionBind;
1891
- var hasOwn$1 = hasown;
1892
- var $concat$1 = bind.call(Function.call, Array.prototype.concat);
1893
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
1894
- var $replace$1 = bind.call(Function.call, String.prototype.replace);
1895
- var $strSlice = bind.call(Function.call, String.prototype.slice);
1896
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
1897
-
1898
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1899
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1900
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1901
- var stringToPath = function stringToPath(string) {
1902
- var first = $strSlice(string, 0, 1);
1903
- var last = $strSlice(string, -1);
1904
- if (first === '%' && last !== '%') {
1905
- throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1906
- } else if (last === '%' && first !== '%') {
1907
- throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1908
- }
1909
- var result = [];
1910
- $replace$1(string, rePropName, function (match, number, quote, subString) {
1911
- result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
1912
- });
1913
- return result;
1914
- };
1915
- /* end adaptation */
1916
-
1917
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1918
- var intrinsicName = name;
1919
- var alias;
1920
- if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
1921
- alias = LEGACY_ALIASES[intrinsicName];
1922
- intrinsicName = '%' + alias[0] + '%';
1923
- }
1924
-
1925
- if (hasOwn$1(INTRINSICS, intrinsicName)) {
1926
- var value = INTRINSICS[intrinsicName];
1927
- if (value === needsEval) {
1928
- value = doEval(intrinsicName);
1929
- }
1930
- if (typeof value === 'undefined' && !allowMissing) {
1931
- throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1932
- }
1933
-
1934
- return {
1935
- alias: alias,
1936
- name: intrinsicName,
1937
- value: value
1938
- };
1939
- }
1940
-
1941
- throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
1942
- };
1943
-
1944
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1945
- if (typeof name !== 'string' || name.length === 0) {
1946
- throw new $TypeError$3('intrinsic name must be a non-empty string');
1947
- }
1948
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1949
- throw new $TypeError$3('"allowMissing" argument must be a boolean');
1950
- }
1951
-
1952
- if ($exec(/^%?[^%]*%?$/, name) === null) {
1953
- throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1954
- }
1955
- var parts = stringToPath(name);
1956
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1957
-
1958
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1959
- var intrinsicRealName = intrinsic.name;
1960
- var value = intrinsic.value;
1961
- var skipFurtherCaching = false;
1962
-
1963
- var alias = intrinsic.alias;
1964
- if (alias) {
1965
- intrinsicBaseName = alias[0];
1966
- $spliceApply(parts, $concat$1([0, 1], alias));
1967
- }
1968
-
1969
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1970
- var part = parts[i];
1971
- var first = $strSlice(part, 0, 1);
1972
- var last = $strSlice(part, -1);
1973
- if (
1974
- (
1975
- (first === '"' || first === "'" || first === '`')
1976
- || (last === '"' || last === "'" || last === '`')
1977
- )
1978
- && first !== last
1979
- ) {
1980
- throw new $SyntaxError$1('property names with quotes must have matching quotes');
1981
- }
1982
- if (part === 'constructor' || !isOwn) {
1983
- skipFurtherCaching = true;
1984
- }
1985
-
1986
- intrinsicBaseName += '.' + part;
1987
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1988
-
1989
- if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
1990
- value = INTRINSICS[intrinsicRealName];
1991
- } else if (value != null) {
1992
- if (!(part in value)) {
1993
- if (!allowMissing) {
1994
- throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
1995
- }
1996
- return void undefined$1;
1997
- }
1998
- if ($gOPD$1 && (i + 1) >= parts.length) {
1999
- var desc = $gOPD$1(value, part);
2000
- isOwn = !!desc;
2001
-
2002
- // By convention, when a data property is converted to an accessor
2003
- // property to emulate a data property that does not suffer from
2004
- // the override mistake, that accessor's getter is marked with
2005
- // an `originalValue` property. Here, when we detect this, we
2006
- // uphold the illusion by pretending to see that original data
2007
- // property, i.e., returning the value rather than the getter
2008
- // itself.
2009
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
2010
- value = desc.get;
2011
- } else {
2012
- value = value[part];
2013
- }
2014
- } else {
2015
- isOwn = hasOwn$1(value, part);
2016
- value = value[part];
2017
- }
2018
-
2019
- if (isOwn && !skipFurtherCaching) {
2020
- INTRINSICS[intrinsicRealName] = value;
2021
- }
2022
- }
2023
- }
2024
- return value;
2025
- };
2026
-
2027
- var GetIntrinsic$3 = getIntrinsic;
2028
-
2029
- var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
2030
-
2031
- if ($gOPD) {
2032
- try {
2033
- $gOPD([], 'length');
2034
- } catch (e) {
2035
- // IE 8 has a broken gOPD
2036
- $gOPD = null;
2037
- }
2038
- }
2039
-
2040
- var gopd$1 = $gOPD;
2041
-
2042
- var $defineProperty$1 = requireEsDefineProperty();
2043
-
2044
- var $SyntaxError = syntax;
2045
- var $TypeError$2 = type;
2046
-
2047
- var gopd = gopd$1;
2048
-
2049
- /** @type {import('.')} */
2050
- var defineDataProperty = function defineDataProperty(
2051
- obj,
2052
- property,
2053
- value
2054
- ) {
2055
- if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
2056
- throw new $TypeError$2('`obj` must be an object or a function`');
2057
- }
2058
- if (typeof property !== 'string' && typeof property !== 'symbol') {
2059
- throw new $TypeError$2('`property` must be a string or a symbol`');
2060
- }
2061
- if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
2062
- throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
2063
- }
2064
- if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
2065
- throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
2066
- }
2067
- if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
2068
- throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
2069
- }
2070
- if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
2071
- throw new $TypeError$2('`loose`, if provided, must be a boolean');
2072
- }
2073
-
2074
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
2075
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
2076
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
2077
- var loose = arguments.length > 6 ? arguments[6] : false;
2078
-
2079
- /* @type {false | TypedPropertyDescriptor<unknown>} */
2080
- var desc = !!gopd && gopd(obj, property);
2081
-
2082
- if ($defineProperty$1) {
2083
- $defineProperty$1(obj, property, {
2084
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
2085
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
2086
- value: value,
2087
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
2088
- });
2089
- } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
2090
- // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
2091
- obj[property] = value; // eslint-disable-line no-param-reassign
2092
- } else {
2093
- throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
2094
- }
2095
- };
2096
-
2097
- var $defineProperty = requireEsDefineProperty();
2098
-
2099
- var hasPropertyDescriptors = function hasPropertyDescriptors() {
2100
- return !!$defineProperty;
2101
- };
2102
-
2103
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
2104
- // node v0.6 has a bug where array lengths can be Set but not Defined
2105
- if (!$defineProperty) {
2106
- return null;
2107
- }
2108
- try {
2109
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
2110
- } catch (e) {
2111
- // In Firefox 4-22, defining length on an array throws an exception.
2112
- return true;
2113
- }
2114
- };
2115
-
2116
- var hasPropertyDescriptors_1 = hasPropertyDescriptors;
2117
-
2118
- var GetIntrinsic$2 = getIntrinsic$2;
2119
- var define = defineDataProperty;
2120
- var hasDescriptors = hasPropertyDescriptors_1();
2121
- var gOPD = gopd$1;
2122
-
2123
- var $TypeError$1 = type;
2124
- var $floor$1 = GetIntrinsic$2('%Math.floor%');
2125
-
2126
- /** @type {import('.')} */
2127
- var setFunctionLength = function setFunctionLength(fn, length) {
2128
- if (typeof fn !== 'function') {
2129
- throw new $TypeError$1('`fn` is not a function');
2130
- }
2131
- if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
2132
- throw new $TypeError$1('`length` must be a positive 32-bit integer');
2133
- }
2134
-
2135
- var loose = arguments.length > 2 && !!arguments[2];
2136
-
2137
- var functionLengthIsConfigurable = true;
2138
- var functionLengthIsWritable = true;
2139
- if ('length' in fn && gOPD) {
2140
- var desc = gOPD(fn, 'length');
2141
- if (desc && !desc.configurable) {
2142
- functionLengthIsConfigurable = false;
2143
- }
2144
- if (desc && !desc.writable) {
2145
- functionLengthIsWritable = false;
2146
- }
2147
- }
2148
-
2149
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
2150
- if (hasDescriptors) {
2151
- define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
2152
- } else {
2153
- define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
2154
- }
2155
- }
2156
- return fn;
2157
- };
2158
-
2159
- callBind$1.exports;
2160
-
2161
- (function (module) {
2162
-
2163
- var bind = functionBind;
2164
- var GetIntrinsic = getIntrinsic$3;
2165
- var setFunctionLength$1 = setFunctionLength;
2166
-
2167
- var $TypeError = type;
2168
- var $apply = GetIntrinsic('%Function.prototype.apply%');
2169
- var $call = GetIntrinsic('%Function.prototype.call%');
2170
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
2171
-
2172
- var $defineProperty = requireEsDefineProperty();
2173
- var $max = GetIntrinsic('%Math.max%');
2174
-
2175
- module.exports = function callBind(originalFunction) {
2176
- if (typeof originalFunction !== 'function') {
2177
- throw new $TypeError('a function is required');
2178
- }
2179
- var func = $reflectApply(bind, $call, arguments);
2180
- return setFunctionLength$1(
2181
- func,
2182
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
2183
- true
2184
- );
2185
- };
2186
-
2187
- var applyBind = function applyBind() {
2188
- return $reflectApply(bind, $apply, arguments);
2189
- };
2190
-
2191
- if ($defineProperty) {
2192
- $defineProperty(module.exports, 'apply', { value: applyBind });
2193
- } else {
2194
- module.exports.apply = applyBind;
2195
- }
2196
- } (callBind$1));
2197
-
2198
- var callBindExports = callBind$1.exports;
2199
-
2200
- var GetIntrinsic$1 = getIntrinsic$3;
2201
-
2202
- var callBind = callBindExports;
2203
-
2204
- var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
2205
-
2206
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2207
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
2208
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2209
- return callBind(intrinsic);
2210
- }
2211
- return intrinsic;
2212
- };
2213
-
2214
- var util_inspect = require$$0__default["default"].inspect;
2215
-
2216
- var hasMap = typeof Map === 'function' && Map.prototype;
2217
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
2218
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
2219
- var mapForEach = hasMap && Map.prototype.forEach;
2220
- var hasSet = typeof Set === 'function' && Set.prototype;
2221
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
2222
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
2223
- var setForEach = hasSet && Set.prototype.forEach;
2224
- var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
2225
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
2226
- var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
2227
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
2228
- var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
2229
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
2230
- var booleanValueOf = Boolean.prototype.valueOf;
2231
- var objectToString = Object.prototype.toString;
2232
- var functionToString = Function.prototype.toString;
2233
- var $match = String.prototype.match;
2234
- var $slice = String.prototype.slice;
2235
- var $replace = String.prototype.replace;
2236
- var $toUpperCase = String.prototype.toUpperCase;
2237
- var $toLowerCase = String.prototype.toLowerCase;
2238
- var $test = RegExp.prototype.test;
2239
- var $concat = Array.prototype.concat;
2240
- var $join = Array.prototype.join;
2241
- var $arrSlice = Array.prototype.slice;
2242
- var $floor = Math.floor;
2243
- var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
2244
- var gOPS = Object.getOwnPropertySymbols;
2245
- var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
2246
- var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
2247
- // ie, `has-tostringtag/shams
2248
- var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
2249
- ? Symbol.toStringTag
2250
- : null;
2251
- var isEnumerable = Object.prototype.propertyIsEnumerable;
2252
-
2253
- var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
2254
- [].__proto__ === Array.prototype // eslint-disable-line no-proto
2255
- ? function (O) {
2256
- return O.__proto__; // eslint-disable-line no-proto
2257
- }
2258
- : null
2259
- );
2260
-
2261
- function addNumericSeparator(num, str) {
2262
- if (
2263
- num === Infinity
2264
- || num === -Infinity
2265
- || num !== num
2266
- || (num && num > -1000 && num < 1000)
2267
- || $test.call(/e/, str)
2268
- ) {
2269
- return str;
2270
- }
2271
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
2272
- if (typeof num === 'number') {
2273
- var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
2274
- if (int !== num) {
2275
- var intStr = String(int);
2276
- var dec = $slice.call(str, intStr.length + 1);
2277
- return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
2278
- }
2279
- }
2280
- return $replace.call(str, sepRegex, '$&_');
2281
- }
2282
-
2283
- var utilInspect = util_inspect;
2284
- var inspectCustom = utilInspect.custom;
2285
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
2286
-
2287
- var objectInspect = function inspect_(obj, options, depth, seen) {
2288
- var opts = options || {};
2289
-
2290
- if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
2291
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
2292
- }
2293
- if (
2294
- has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
2295
- ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
2296
- : opts.maxStringLength !== null
2297
- )
2298
- ) {
2299
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
2300
- }
2301
- var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
2302
- if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
2303
- throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
2304
- }
2305
-
2306
- if (
2307
- has$3(opts, 'indent')
2308
- && opts.indent !== null
2309
- && opts.indent !== '\t'
2310
- && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
2311
- ) {
2312
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
2313
- }
2314
- if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
2315
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
2316
- }
2317
- var numericSeparator = opts.numericSeparator;
2318
-
2319
- if (typeof obj === 'undefined') {
2320
- return 'undefined';
2321
- }
2322
- if (obj === null) {
2323
- return 'null';
2324
- }
2325
- if (typeof obj === 'boolean') {
2326
- return obj ? 'true' : 'false';
2327
- }
2328
-
2329
- if (typeof obj === 'string') {
2330
- return inspectString(obj, opts);
2331
- }
2332
- if (typeof obj === 'number') {
2333
- if (obj === 0) {
2334
- return Infinity / obj > 0 ? '0' : '-0';
2335
- }
2336
- var str = String(obj);
2337
- return numericSeparator ? addNumericSeparator(obj, str) : str;
2338
- }
2339
- if (typeof obj === 'bigint') {
2340
- var bigIntStr = String(obj) + 'n';
2341
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
2342
- }
2343
-
2344
- var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
2345
- if (typeof depth === 'undefined') { depth = 0; }
2346
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
2347
- return isArray$3(obj) ? '[Array]' : '[Object]';
2348
- }
2349
-
2350
- var indent = getIndent(opts, depth);
2351
-
2352
- if (typeof seen === 'undefined') {
2353
- seen = [];
2354
- } else if (indexOf(seen, obj) >= 0) {
2355
- return '[Circular]';
2356
- }
2357
-
2358
- function inspect(value, from, noIndent) {
2359
- if (from) {
2360
- seen = $arrSlice.call(seen);
2361
- seen.push(from);
2362
- }
2363
- if (noIndent) {
2364
- var newOpts = {
2365
- depth: opts.depth
2366
- };
2367
- if (has$3(opts, 'quoteStyle')) {
2368
- newOpts.quoteStyle = opts.quoteStyle;
2369
- }
2370
- return inspect_(value, newOpts, depth + 1, seen);
2371
- }
2372
- return inspect_(value, opts, depth + 1, seen);
2373
- }
2374
-
2375
- if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
2376
- var name = nameOf(obj);
2377
- var keys = arrObjKeys(obj, inspect);
2378
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
2379
- }
2380
- if (isSymbol(obj)) {
2381
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
2382
- return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
2383
- }
2384
- if (isElement(obj)) {
2385
- var s = '<' + $toLowerCase.call(String(obj.nodeName));
2386
- var attrs = obj.attributes || [];
2387
- for (var i = 0; i < attrs.length; i++) {
2388
- s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
2389
- }
2390
- s += '>';
2391
- if (obj.childNodes && obj.childNodes.length) { s += '...'; }
2392
- s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
2393
- return s;
2394
- }
2395
- if (isArray$3(obj)) {
2396
- if (obj.length === 0) { return '[]'; }
2397
- var xs = arrObjKeys(obj, inspect);
2398
- if (indent && !singleLineValues(xs)) {
2399
- return '[' + indentedJoin(xs, indent) + ']';
2400
- }
2401
- return '[ ' + $join.call(xs, ', ') + ' ]';
2402
- }
2403
- if (isError(obj)) {
2404
- var parts = arrObjKeys(obj, inspect);
2405
- if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
2406
- return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
2407
- }
2408
- if (parts.length === 0) { return '[' + String(obj) + ']'; }
2409
- return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
2410
- }
2411
- if (typeof obj === 'object' && customInspect) {
2412
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
2413
- return utilInspect(obj, { depth: maxDepth - depth });
2414
- } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
2415
- return obj.inspect();
2416
- }
2417
- }
2418
- if (isMap(obj)) {
2419
- var mapParts = [];
2420
- if (mapForEach) {
2421
- mapForEach.call(obj, function (value, key) {
2422
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
2423
- });
2424
- }
2425
- return collectionOf('Map', mapSize.call(obj), mapParts, indent);
2426
- }
2427
- if (isSet(obj)) {
2428
- var setParts = [];
2429
- if (setForEach) {
2430
- setForEach.call(obj, function (value) {
2431
- setParts.push(inspect(value, obj));
2432
- });
2433
- }
2434
- return collectionOf('Set', setSize.call(obj), setParts, indent);
2435
- }
2436
- if (isWeakMap(obj)) {
2437
- return weakCollectionOf('WeakMap');
2438
- }
2439
- if (isWeakSet(obj)) {
2440
- return weakCollectionOf('WeakSet');
2441
- }
2442
- if (isWeakRef(obj)) {
2443
- return weakCollectionOf('WeakRef');
2444
- }
2445
- if (isNumber(obj)) {
2446
- return markBoxed(inspect(Number(obj)));
2447
- }
2448
- if (isBigInt(obj)) {
2449
- return markBoxed(inspect(bigIntValueOf.call(obj)));
2450
- }
2451
- if (isBoolean(obj)) {
2452
- return markBoxed(booleanValueOf.call(obj));
2453
- }
2454
- if (isString(obj)) {
2455
- return markBoxed(inspect(String(obj)));
2456
- }
2457
- // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
2458
- /* eslint-env browser */
2459
- if (typeof window !== 'undefined' && obj === window) {
2460
- return '{ [object Window] }';
2461
- }
2462
- if (obj === _commonjsHelpers.commonjsGlobal) {
2463
- return '{ [object globalThis] }';
2464
- }
2465
- if (!isDate(obj) && !isRegExp$1(obj)) {
2466
- var ys = arrObjKeys(obj, inspect);
2467
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
2468
- var protoTag = obj instanceof Object ? '' : 'null prototype';
2469
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
2470
- var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
2471
- var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
2472
- if (ys.length === 0) { return tag + '{}'; }
2473
- if (indent) {
2474
- return tag + '{' + indentedJoin(ys, indent) + '}';
2475
- }
2476
- return tag + '{ ' + $join.call(ys, ', ') + ' }';
2477
- }
2478
- return String(obj);
2479
- };
2480
-
2481
- function wrapQuotes(s, defaultStyle, opts) {
2482
- var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
2483
- return quoteChar + s + quoteChar;
2484
- }
2485
-
2486
- function quote(s) {
2487
- return $replace.call(String(s), /"/g, '&quot;');
2488
- }
2489
-
2490
- function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2491
- function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2492
- function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2493
- function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2494
- function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2495
- function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2496
- function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2497
-
2498
- // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
2499
- function isSymbol(obj) {
2500
- if (hasShammedSymbols) {
2501
- return obj && typeof obj === 'object' && obj instanceof Symbol;
2502
- }
2503
- if (typeof obj === 'symbol') {
2504
- return true;
2505
- }
2506
- if (!obj || typeof obj !== 'object' || !symToString) {
2507
- return false;
2508
- }
2509
- try {
2510
- symToString.call(obj);
2511
- return true;
2512
- } catch (e) {}
2513
- return false;
2514
- }
2515
-
2516
- function isBigInt(obj) {
2517
- if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
2518
- return false;
2519
- }
2520
- try {
2521
- bigIntValueOf.call(obj);
2522
- return true;
2523
- } catch (e) {}
2524
- return false;
2525
- }
2526
-
2527
- var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
2528
- function has$3(obj, key) {
2529
- return hasOwn.call(obj, key);
2530
- }
2531
-
2532
- function toStr(obj) {
2533
- return objectToString.call(obj);
2534
- }
2535
-
2536
- function nameOf(f) {
2537
- if (f.name) { return f.name; }
2538
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
2539
- if (m) { return m[1]; }
2540
- return null;
2541
- }
2542
-
2543
- function indexOf(xs, x) {
2544
- if (xs.indexOf) { return xs.indexOf(x); }
2545
- for (var i = 0, l = xs.length; i < l; i++) {
2546
- if (xs[i] === x) { return i; }
2547
- }
2548
- return -1;
2549
- }
2550
-
2551
- function isMap(x) {
2552
- if (!mapSize || !x || typeof x !== 'object') {
2553
- return false;
2554
- }
2555
- try {
2556
- mapSize.call(x);
2557
- try {
2558
- setSize.call(x);
2559
- } catch (s) {
2560
- return true;
2561
- }
2562
- return x instanceof Map; // core-js workaround, pre-v2.5.0
2563
- } catch (e) {}
2564
- return false;
2565
- }
2566
-
2567
- function isWeakMap(x) {
2568
- if (!weakMapHas || !x || typeof x !== 'object') {
2569
- return false;
2570
- }
2571
- try {
2572
- weakMapHas.call(x, weakMapHas);
2573
- try {
2574
- weakSetHas.call(x, weakSetHas);
2575
- } catch (s) {
2576
- return true;
2577
- }
2578
- return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
2579
- } catch (e) {}
2580
- return false;
2581
- }
2582
-
2583
- function isWeakRef(x) {
2584
- if (!weakRefDeref || !x || typeof x !== 'object') {
2585
- return false;
2586
- }
2587
- try {
2588
- weakRefDeref.call(x);
2589
- return true;
2590
- } catch (e) {}
2591
- return false;
2592
- }
2593
-
2594
- function isSet(x) {
2595
- if (!setSize || !x || typeof x !== 'object') {
2596
- return false;
2597
- }
2598
- try {
2599
- setSize.call(x);
2600
- try {
2601
- mapSize.call(x);
2602
- } catch (m) {
2603
- return true;
2604
- }
2605
- return x instanceof Set; // core-js workaround, pre-v2.5.0
2606
- } catch (e) {}
2607
- return false;
2608
- }
2609
-
2610
- function isWeakSet(x) {
2611
- if (!weakSetHas || !x || typeof x !== 'object') {
2612
- return false;
2613
- }
2614
- try {
2615
- weakSetHas.call(x, weakSetHas);
2616
- try {
2617
- weakMapHas.call(x, weakMapHas);
2618
- } catch (s) {
2619
- return true;
2620
- }
2621
- return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
2622
- } catch (e) {}
2623
- return false;
2624
- }
2625
-
2626
- function isElement(x) {
2627
- if (!x || typeof x !== 'object') { return false; }
2628
- if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
2629
- return true;
2630
- }
2631
- return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
2632
- }
2633
-
2634
- function inspectString(str, opts) {
2635
- if (str.length > opts.maxStringLength) {
2636
- var remaining = str.length - opts.maxStringLength;
2637
- var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
2638
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
2639
- }
2640
- // eslint-disable-next-line no-control-regex
2641
- var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
2642
- return wrapQuotes(s, 'single', opts);
2643
- }
2644
-
2645
- function lowbyte(c) {
2646
- var n = c.charCodeAt(0);
2647
- var x = {
2648
- 8: 'b',
2649
- 9: 't',
2650
- 10: 'n',
2651
- 12: 'f',
2652
- 13: 'r'
2653
- }[n];
2654
- if (x) { return '\\' + x; }
2655
- return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
2656
- }
2657
-
2658
- function markBoxed(str) {
2659
- return 'Object(' + str + ')';
2660
- }
2661
-
2662
- function weakCollectionOf(type) {
2663
- return type + ' { ? }';
2664
- }
2665
-
2666
- function collectionOf(type, size, entries, indent) {
2667
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
2668
- return type + ' (' + size + ') {' + joinedEntries + '}';
2669
- }
2670
-
2671
- function singleLineValues(xs) {
2672
- for (var i = 0; i < xs.length; i++) {
2673
- if (indexOf(xs[i], '\n') >= 0) {
2674
- return false;
2675
- }
2676
- }
2677
- return true;
2678
- }
2679
-
2680
- function getIndent(opts, depth) {
2681
- var baseIndent;
2682
- if (opts.indent === '\t') {
2683
- baseIndent = '\t';
2684
- } else if (typeof opts.indent === 'number' && opts.indent > 0) {
2685
- baseIndent = $join.call(Array(opts.indent + 1), ' ');
2686
- } else {
2687
- return null;
2688
- }
2689
- return {
2690
- base: baseIndent,
2691
- prev: $join.call(Array(depth + 1), baseIndent)
2692
- };
2693
- }
2694
-
2695
- function indentedJoin(xs, indent) {
2696
- if (xs.length === 0) { return ''; }
2697
- var lineJoiner = '\n' + indent.prev + indent.base;
2698
- return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
2699
- }
2700
-
2701
- function arrObjKeys(obj, inspect) {
2702
- var isArr = isArray$3(obj);
2703
- var xs = [];
2704
- if (isArr) {
2705
- xs.length = obj.length;
2706
- for (var i = 0; i < obj.length; i++) {
2707
- xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
2708
- }
2709
- }
2710
- var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
2711
- var symMap;
2712
- if (hasShammedSymbols) {
2713
- symMap = {};
2714
- for (var k = 0; k < syms.length; k++) {
2715
- symMap['$' + syms[k]] = syms[k];
2716
- }
2717
- }
2718
-
2719
- for (var key in obj) { // eslint-disable-line no-restricted-syntax
2720
- if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
2721
- if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
2722
- if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
2723
- // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
2724
- continue; // eslint-disable-line no-restricted-syntax, no-continue
2725
- } else if ($test.call(/[^\w$]/, key)) {
2726
- xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
2727
- } else {
2728
- xs.push(key + ': ' + inspect(obj[key], obj));
2729
- }
2730
- }
2731
- if (typeof gOPS === 'function') {
2732
- for (var j = 0; j < syms.length; j++) {
2733
- if (isEnumerable.call(obj, syms[j])) {
2734
- xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
2735
- }
2736
- }
2737
- }
2738
- return xs;
2739
- }
2740
-
2741
- var GetIntrinsic = getIntrinsic$4;
2742
- var callBound = callBound$1;
2743
- var inspect = objectInspect;
2744
-
2745
- var $TypeError = type;
2746
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
2747
- var $Map = GetIntrinsic('%Map%', true);
2748
-
2749
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
2750
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
2751
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
2752
- var $mapGet = callBound('Map.prototype.get', true);
2753
- var $mapSet = callBound('Map.prototype.set', true);
2754
- var $mapHas = callBound('Map.prototype.has', true);
2755
-
2756
- /*
2757
- * This function traverses the list returning the node corresponding to the given key.
2758
- *
2759
- * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
2760
- */
2761
- /** @type {import('.').listGetNode} */
2762
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
2763
- /** @type {typeof list | NonNullable<(typeof list)['next']>} */
2764
- var prev = list;
2765
- /** @type {(typeof list)['next']} */
2766
- var curr;
2767
- for (; (curr = prev.next) !== null; prev = curr) {
2768
- if (curr.key === key) {
2769
- prev.next = curr.next;
2770
- // eslint-disable-next-line no-extra-parens
2771
- curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
2772
- list.next = curr; // eslint-disable-line no-param-reassign
2773
- return curr;
2774
- }
2775
- }
2776
- };
2777
-
2778
- /** @type {import('.').listGet} */
2779
- var listGet = function (objects, key) {
2780
- var node = listGetNode(objects, key);
2781
- return node && node.value;
2782
- };
2783
- /** @type {import('.').listSet} */
2784
- var listSet = function (objects, key, value) {
2785
- var node = listGetNode(objects, key);
2786
- if (node) {
2787
- node.value = value;
2788
- } else {
2789
- // Prepend the new node to the beginning of the list
2790
- objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
2791
- key: key,
2792
- next: objects.next,
2793
- value: value
2794
- });
2795
- }
2796
- };
2797
- /** @type {import('.').listHas} */
2798
- var listHas = function (objects, key) {
2799
- return !!listGetNode(objects, key);
2800
- };
2801
-
2802
- /** @type {import('.')} */
2803
- var sideChannel = function getSideChannel() {
2804
- /** @type {WeakMap<object, unknown>} */ var $wm;
2805
- /** @type {Map<object, unknown>} */ var $m;
2806
- /** @type {import('.').RootNode<unknown>} */ var $o;
2807
-
2808
- /** @type {import('.').Channel} */
2809
- var channel = {
2810
- assert: function (key) {
2811
- if (!channel.has(key)) {
2812
- throw new $TypeError('Side channel does not contain ' + inspect(key));
2813
- }
2814
- },
2815
- get: function (key) { // eslint-disable-line consistent-return
2816
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
2817
- if ($wm) {
2818
- return $weakMapGet($wm, key);
2819
- }
2820
- } else if ($Map) {
2821
- if ($m) {
2822
- return $mapGet($m, key);
2823
- }
2824
- } else {
2825
- if ($o) { // eslint-disable-line no-lonely-if
2826
- return listGet($o, key);
2827
- }
2828
- }
2829
- },
2830
- has: function (key) {
2831
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
2832
- if ($wm) {
2833
- return $weakMapHas($wm, key);
2834
- }
2835
- } else if ($Map) {
2836
- if ($m) {
2837
- return $mapHas($m, key);
2838
- }
2839
- } else {
2840
- if ($o) { // eslint-disable-line no-lonely-if
2841
- return listHas($o, key);
2842
- }
2843
- }
2844
- return false;
2845
- },
2846
- set: function (key, value) {
2847
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
2848
- if (!$wm) {
2849
- $wm = new $WeakMap();
2850
- }
2851
- $weakMapSet($wm, key, value);
2852
- } else if ($Map) {
2853
- if (!$m) {
2854
- $m = new $Map();
2855
- }
2856
- $mapSet($m, key, value);
2857
- } else {
2858
- if (!$o) {
2859
- // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
2860
- $o = { key: {}, next: null };
2861
- }
2862
- listSet($o, key, value);
2863
- }
2864
- }
2865
- };
2866
- return channel;
2867
- };
2868
-
2869
- var replace = String.prototype.replace;
2870
- var percentTwenties = /%20/g;
2871
-
2872
- var Format = {
2873
- RFC1738: 'RFC1738',
2874
- RFC3986: 'RFC3986'
2875
- };
2876
-
2877
- var formats$3 = {
2878
- 'default': Format.RFC3986,
2879
- formatters: {
2880
- RFC1738: function (value) {
2881
- return replace.call(value, percentTwenties, '+');
2882
- },
2883
- RFC3986: function (value) {
2884
- return String(value);
2885
- }
2886
- },
2887
- RFC1738: Format.RFC1738,
2888
- RFC3986: Format.RFC3986
2889
- };
2890
-
2891
- var formats$2 = formats$3;
2892
-
2893
- var has$2 = Object.prototype.hasOwnProperty;
2894
- var isArray$2 = Array.isArray;
2895
-
2896
- var hexTable = (function () {
2897
- var array = [];
2898
- for (var i = 0; i < 256; ++i) {
2899
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
2900
- }
2901
-
2902
- return array;
2903
- }());
2904
-
2905
- var compactQueue = function compactQueue(queue) {
2906
- while (queue.length > 1) {
2907
- var item = queue.pop();
2908
- var obj = item.obj[item.prop];
2909
-
2910
- if (isArray$2(obj)) {
2911
- var compacted = [];
2912
-
2913
- for (var j = 0; j < obj.length; ++j) {
2914
- if (typeof obj[j] !== 'undefined') {
2915
- compacted.push(obj[j]);
2916
- }
2917
- }
2918
-
2919
- item.obj[item.prop] = compacted;
2920
- }
2921
- }
2922
- };
2923
-
2924
- var arrayToObject = function arrayToObject(source, options) {
2925
- var obj = options && options.plainObjects ? Object.create(null) : {};
2926
- for (var i = 0; i < source.length; ++i) {
2927
- if (typeof source[i] !== 'undefined') {
2928
- obj[i] = source[i];
2929
- }
2930
- }
2931
-
2932
- return obj;
2933
- };
2934
-
2935
- var merge = function merge(target, source, options) {
2936
- /* eslint no-param-reassign: 0 */
2937
- if (!source) {
2938
- return target;
2939
- }
2940
-
2941
- if (typeof source !== 'object') {
2942
- if (isArray$2(target)) {
2943
- target.push(source);
2944
- } else if (target && typeof target === 'object') {
2945
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
2946
- target[source] = true;
2947
- }
2948
- } else {
2949
- return [target, source];
2950
- }
2951
-
2952
- return target;
2953
- }
2954
-
2955
- if (!target || typeof target !== 'object') {
2956
- return [target].concat(source);
2957
- }
2958
-
2959
- var mergeTarget = target;
2960
- if (isArray$2(target) && !isArray$2(source)) {
2961
- mergeTarget = arrayToObject(target, options);
2962
- }
2963
-
2964
- if (isArray$2(target) && isArray$2(source)) {
2965
- source.forEach(function (item, i) {
2966
- if (has$2.call(target, i)) {
2967
- var targetItem = target[i];
2968
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
2969
- target[i] = merge(targetItem, item, options);
2970
- } else {
2971
- target.push(item);
2972
- }
2973
- } else {
2974
- target[i] = item;
2975
- }
2976
- });
2977
- return target;
2978
- }
2979
-
2980
- return Object.keys(source).reduce(function (acc, key) {
2981
- var value = source[key];
2982
-
2983
- if (has$2.call(acc, key)) {
2984
- acc[key] = merge(acc[key], value, options);
2985
- } else {
2986
- acc[key] = value;
2987
- }
2988
- return acc;
2989
- }, mergeTarget);
2990
- };
2991
-
2992
- var assign = function assignSingleSource(target, source) {
2993
- return Object.keys(source).reduce(function (acc, key) {
2994
- acc[key] = source[key];
2995
- return acc;
2996
- }, target);
2997
- };
2998
-
2999
- var decode = function (str, decoder, charset) {
3000
- var strWithoutPlus = str.replace(/\+/g, ' ');
3001
- if (charset === 'iso-8859-1') {
3002
- // unescape never throws, no try...catch needed:
3003
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
3004
- }
3005
- // utf-8
3006
- try {
3007
- return decodeURIComponent(strWithoutPlus);
3008
- } catch (e) {
3009
- return strWithoutPlus;
3010
- }
3011
- };
3012
-
3013
- var encode = function encode(str, defaultEncoder, charset, kind, format) {
3014
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
3015
- // It has been adapted here for stricter adherence to RFC 3986
3016
- if (str.length === 0) {
3017
- return str;
3018
- }
3019
-
3020
- var string = str;
3021
- if (typeof str === 'symbol') {
3022
- string = Symbol.prototype.toString.call(str);
3023
- } else if (typeof str !== 'string') {
3024
- string = String(str);
3025
- }
3026
-
3027
- if (charset === 'iso-8859-1') {
3028
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
3029
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
3030
- });
3031
- }
3032
-
3033
- var out = '';
3034
- for (var i = 0; i < string.length; ++i) {
3035
- var c = string.charCodeAt(i);
3036
-
3037
- if (
3038
- c === 0x2D // -
3039
- || c === 0x2E // .
3040
- || c === 0x5F // _
3041
- || c === 0x7E // ~
3042
- || (c >= 0x30 && c <= 0x39) // 0-9
3043
- || (c >= 0x41 && c <= 0x5A) // a-z
3044
- || (c >= 0x61 && c <= 0x7A) // A-Z
3045
- || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
3046
- ) {
3047
- out += string.charAt(i);
3048
- continue;
3049
- }
3050
-
3051
- if (c < 0x80) {
3052
- out = out + hexTable[c];
3053
- continue;
3054
- }
3055
-
3056
- if (c < 0x800) {
3057
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
3058
- continue;
3059
- }
3060
-
3061
- if (c < 0xD800 || c >= 0xE000) {
3062
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
3063
- continue;
3064
- }
3065
-
3066
- i += 1;
3067
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
3068
- /* eslint operator-linebreak: [2, "before"] */
3069
- out += hexTable[0xF0 | (c >> 18)]
3070
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
3071
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
3072
- + hexTable[0x80 | (c & 0x3F)];
3073
- }
3074
-
3075
- return out;
3076
- };
3077
-
3078
- var compact = function compact(value) {
3079
- var queue = [{ obj: { o: value }, prop: 'o' }];
3080
- var refs = [];
3081
-
3082
- for (var i = 0; i < queue.length; ++i) {
3083
- var item = queue[i];
3084
- var obj = item.obj[item.prop];
3085
-
3086
- var keys = Object.keys(obj);
3087
- for (var j = 0; j < keys.length; ++j) {
3088
- var key = keys[j];
3089
- var val = obj[key];
3090
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
3091
- queue.push({ obj: obj, prop: key });
3092
- refs.push(val);
3093
- }
3094
- }
3095
- }
3096
-
3097
- compactQueue(queue);
3098
-
3099
- return value;
3100
- };
3101
-
3102
- var isRegExp = function isRegExp(obj) {
3103
- return Object.prototype.toString.call(obj) === '[object RegExp]';
3104
- };
3105
-
3106
- var isBuffer = function isBuffer(obj) {
3107
- if (!obj || typeof obj !== 'object') {
3108
- return false;
3109
- }
3110
-
3111
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
3112
- };
3113
-
3114
- var combine = function combine(a, b) {
3115
- return [].concat(a, b);
3116
- };
3117
-
3118
- var maybeMap = function maybeMap(val, fn) {
3119
- if (isArray$2(val)) {
3120
- var mapped = [];
3121
- for (var i = 0; i < val.length; i += 1) {
3122
- mapped.push(fn(val[i]));
3123
- }
3124
- return mapped;
3125
- }
3126
- return fn(val);
3127
- };
3128
-
3129
- var utils$2 = {
3130
- arrayToObject: arrayToObject,
3131
- assign: assign,
3132
- combine: combine,
3133
- compact: compact,
3134
- decode: decode,
3135
- encode: encode,
3136
- isBuffer: isBuffer,
3137
- isRegExp: isRegExp,
3138
- maybeMap: maybeMap,
3139
- merge: merge
3140
- };
3141
-
3142
- var getSideChannel = sideChannel;
3143
- var utils$1 = utils$2;
3144
- var formats$1 = formats$3;
3145
- var has$1 = Object.prototype.hasOwnProperty;
3146
-
3147
- var arrayPrefixGenerators = {
3148
- brackets: function brackets(prefix) {
3149
- return prefix + '[]';
3150
- },
3151
- comma: 'comma',
3152
- indices: function indices(prefix, key) {
3153
- return prefix + '[' + key + ']';
3154
- },
3155
- repeat: function repeat(prefix) {
3156
- return prefix;
3157
- }
3158
- };
3159
-
3160
- var isArray$1 = Array.isArray;
3161
- var push = Array.prototype.push;
3162
- var pushToArray = function (arr, valueOrArray) {
3163
- push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
3164
- };
3165
-
3166
- var toISO = Date.prototype.toISOString;
3167
-
3168
- var defaultFormat = formats$1['default'];
3169
- var defaults$1 = {
3170
- addQueryPrefix: false,
3171
- allowDots: false,
3172
- charset: 'utf-8',
3173
- charsetSentinel: false,
3174
- delimiter: '&',
3175
- encode: true,
3176
- encoder: utils$1.encode,
3177
- encodeValuesOnly: false,
3178
- format: defaultFormat,
3179
- formatter: formats$1.formatters[defaultFormat],
3180
- // deprecated
3181
- indices: false,
3182
- serializeDate: function serializeDate(date) {
3183
- return toISO.call(date);
3184
- },
3185
- skipNulls: false,
3186
- strictNullHandling: false
3187
- };
3188
-
3189
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
3190
- return typeof v === 'string'
3191
- || typeof v === 'number'
3192
- || typeof v === 'boolean'
3193
- || typeof v === 'symbol'
3194
- || typeof v === 'bigint';
3195
- };
3196
-
3197
- var sentinel = {};
3198
-
3199
- var stringify$1 = function stringify(
3200
- object,
3201
- prefix,
3202
- generateArrayPrefix,
3203
- commaRoundTrip,
3204
- strictNullHandling,
3205
- skipNulls,
3206
- encoder,
3207
- filter,
3208
- sort,
3209
- allowDots,
3210
- serializeDate,
3211
- format,
3212
- formatter,
3213
- encodeValuesOnly,
3214
- charset,
3215
- sideChannel
3216
- ) {
3217
- var obj = object;
3218
-
3219
- var tmpSc = sideChannel;
3220
- var step = 0;
3221
- var findFlag = false;
3222
- while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
3223
- // Where object last appeared in the ref tree
3224
- var pos = tmpSc.get(object);
3225
- step += 1;
3226
- if (typeof pos !== 'undefined') {
3227
- if (pos === step) {
3228
- throw new RangeError('Cyclic object value');
3229
- } else {
3230
- findFlag = true; // Break while
3231
- }
3232
- }
3233
- if (typeof tmpSc.get(sentinel) === 'undefined') {
3234
- step = 0;
3235
- }
3236
- }
3237
-
3238
- if (typeof filter === 'function') {
3239
- obj = filter(prefix, obj);
3240
- } else if (obj instanceof Date) {
3241
- obj = serializeDate(obj);
3242
- } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
3243
- obj = utils$1.maybeMap(obj, function (value) {
3244
- if (value instanceof Date) {
3245
- return serializeDate(value);
3246
- }
3247
- return value;
3248
- });
3249
- }
3250
-
3251
- if (obj === null) {
3252
- if (strictNullHandling) {
3253
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
3254
- }
3255
-
3256
- obj = '';
3257
- }
3258
-
3259
- if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
3260
- if (encoder) {
3261
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
3262
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
3263
- }
3264
- return [formatter(prefix) + '=' + formatter(String(obj))];
3265
- }
3266
-
3267
- var values = [];
3268
-
3269
- if (typeof obj === 'undefined') {
3270
- return values;
3271
- }
3272
-
3273
- var objKeys;
3274
- if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
3275
- // we need to join elements in
3276
- if (encodeValuesOnly && encoder) {
3277
- obj = utils$1.maybeMap(obj, encoder);
3278
- }
3279
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
3280
- } else if (isArray$1(filter)) {
3281
- objKeys = filter;
3282
- } else {
3283
- var keys = Object.keys(obj);
3284
- objKeys = sort ? keys.sort(sort) : keys;
3285
- }
3286
-
3287
- var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
3288
-
3289
- for (var j = 0; j < objKeys.length; ++j) {
3290
- var key = objKeys[j];
3291
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
3292
-
3293
- if (skipNulls && value === null) {
3294
- continue;
3295
- }
3296
-
3297
- var keyPrefix = isArray$1(obj)
3298
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
3299
- : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
3300
-
3301
- sideChannel.set(object, step);
3302
- var valueSideChannel = getSideChannel();
3303
- valueSideChannel.set(sentinel, sideChannel);
3304
- pushToArray(values, stringify(
3305
- value,
3306
- keyPrefix,
3307
- generateArrayPrefix,
3308
- commaRoundTrip,
3309
- strictNullHandling,
3310
- skipNulls,
3311
- generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
3312
- filter,
3313
- sort,
3314
- allowDots,
3315
- serializeDate,
3316
- format,
3317
- formatter,
3318
- encodeValuesOnly,
3319
- charset,
3320
- valueSideChannel
3321
- ));
3322
- }
3323
-
3324
- return values;
3325
- };
3326
-
3327
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
3328
- if (!opts) {
3329
- return defaults$1;
3330
- }
3331
-
3332
- if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
3333
- throw new TypeError('Encoder has to be a function.');
3334
- }
3335
-
3336
- var charset = opts.charset || defaults$1.charset;
3337
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
3338
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
3339
- }
3340
-
3341
- var format = formats$1['default'];
3342
- if (typeof opts.format !== 'undefined') {
3343
- if (!has$1.call(formats$1.formatters, opts.format)) {
3344
- throw new TypeError('Unknown format option provided.');
3345
- }
3346
- format = opts.format;
3347
- }
3348
- var formatter = formats$1.formatters[format];
3349
-
3350
- var filter = defaults$1.filter;
3351
- if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
3352
- filter = opts.filter;
3353
- }
3354
-
3355
- return {
3356
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
3357
- allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
3358
- charset: charset,
3359
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
3360
- delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
3361
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
3362
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
3363
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
3364
- filter: filter,
3365
- format: format,
3366
- formatter: formatter,
3367
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
3368
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
3369
- sort: typeof opts.sort === 'function' ? opts.sort : null,
3370
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
3371
- };
3372
- };
3373
-
3374
- var stringify_1 = function (object, opts) {
3375
- var obj = object;
3376
- var options = normalizeStringifyOptions(opts);
3377
-
3378
- var objKeys;
3379
- var filter;
3380
-
3381
- if (typeof options.filter === 'function') {
3382
- filter = options.filter;
3383
- obj = filter('', obj);
3384
- } else if (isArray$1(options.filter)) {
3385
- filter = options.filter;
3386
- objKeys = filter;
3387
- }
3388
-
3389
- var keys = [];
3390
-
3391
- if (typeof obj !== 'object' || obj === null) {
3392
- return '';
3393
- }
3394
-
3395
- var arrayFormat;
3396
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
3397
- arrayFormat = opts.arrayFormat;
3398
- } else if (opts && 'indices' in opts) {
3399
- arrayFormat = opts.indices ? 'indices' : 'repeat';
3400
- } else {
3401
- arrayFormat = 'indices';
3402
- }
3403
-
3404
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
3405
- if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
3406
- throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
3407
- }
3408
- var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
3409
-
3410
- if (!objKeys) {
3411
- objKeys = Object.keys(obj);
3412
- }
3413
-
3414
- if (options.sort) {
3415
- objKeys.sort(options.sort);
3416
- }
3417
-
3418
- var sideChannel = getSideChannel();
3419
- for (var i = 0; i < objKeys.length; ++i) {
3420
- var key = objKeys[i];
3421
-
3422
- if (options.skipNulls && obj[key] === null) {
3423
- continue;
3424
- }
3425
- pushToArray(keys, stringify$1(
3426
- obj[key],
3427
- key,
3428
- generateArrayPrefix,
3429
- commaRoundTrip,
3430
- options.strictNullHandling,
3431
- options.skipNulls,
3432
- options.encode ? options.encoder : null,
3433
- options.filter,
3434
- options.sort,
3435
- options.allowDots,
3436
- options.serializeDate,
3437
- options.format,
3438
- options.formatter,
3439
- options.encodeValuesOnly,
3440
- options.charset,
3441
- sideChannel
3442
- ));
3443
- }
3444
-
3445
- var joined = keys.join(options.delimiter);
3446
- var prefix = options.addQueryPrefix === true ? '?' : '';
3447
-
3448
- if (options.charsetSentinel) {
3449
- if (options.charset === 'iso-8859-1') {
3450
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
3451
- prefix += 'utf8=%26%2310003%3B&';
3452
- } else {
3453
- // encodeURIComponent('✓')
3454
- prefix += 'utf8=%E2%9C%93&';
3455
- }
3456
- }
3457
-
3458
- return joined.length > 0 ? prefix + joined : '';
3459
- };
3460
-
3461
- var utils = utils$2;
3462
-
3463
- var has = Object.prototype.hasOwnProperty;
3464
- var isArray = Array.isArray;
3465
-
3466
- var defaults = {
3467
- allowDots: false,
3468
- allowPrototypes: false,
3469
- allowSparse: false,
3470
- arrayLimit: 20,
3471
- charset: 'utf-8',
3472
- charsetSentinel: false,
3473
- comma: false,
3474
- decoder: utils.decode,
3475
- delimiter: '&',
3476
- depth: 5,
3477
- ignoreQueryPrefix: false,
3478
- interpretNumericEntities: false,
3479
- parameterLimit: 1000,
3480
- parseArrays: true,
3481
- plainObjects: false,
3482
- strictNullHandling: false
3483
- };
3484
-
3485
- var interpretNumericEntities = function (str) {
3486
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
3487
- return String.fromCharCode(parseInt(numberStr, 10));
3488
- });
3489
- };
3490
-
3491
- var parseArrayValue = function (val, options) {
3492
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
3493
- return val.split(',');
3494
- }
3495
-
3496
- return val;
3497
- };
3498
-
3499
- // This is what browsers will submit when the ✓ character occurs in an
3500
- // application/x-www-form-urlencoded body and the encoding of the page containing
3501
- // the form is iso-8859-1, or when the submitted form has an accept-charset
3502
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
3503
- // the ✓ character, such as us-ascii.
3504
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
3505
-
3506
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
3507
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
3508
-
3509
- var parseValues = function parseQueryStringValues(str, options) {
3510
- var obj = { __proto__: null };
3511
-
3512
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
3513
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
3514
- var parts = cleanStr.split(options.delimiter, limit);
3515
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
3516
- var i;
3517
-
3518
- var charset = options.charset;
3519
- if (options.charsetSentinel) {
3520
- for (i = 0; i < parts.length; ++i) {
3521
- if (parts[i].indexOf('utf8=') === 0) {
3522
- if (parts[i] === charsetSentinel) {
3523
- charset = 'utf-8';
3524
- } else if (parts[i] === isoSentinel) {
3525
- charset = 'iso-8859-1';
3526
- }
3527
- skipIndex = i;
3528
- i = parts.length; // The eslint settings do not allow break;
3529
- }
3530
- }
3531
- }
3532
-
3533
- for (i = 0; i < parts.length; ++i) {
3534
- if (i === skipIndex) {
3535
- continue;
3536
- }
3537
- var part = parts[i];
3538
-
3539
- var bracketEqualsPos = part.indexOf(']=');
3540
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
3541
-
3542
- var key, val;
3543
- if (pos === -1) {
3544
- key = options.decoder(part, defaults.decoder, charset, 'key');
3545
- val = options.strictNullHandling ? null : '';
3546
- } else {
3547
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
3548
- val = utils.maybeMap(
3549
- parseArrayValue(part.slice(pos + 1), options),
3550
- function (encodedVal) {
3551
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
3552
- }
3553
- );
3554
- }
3555
-
3556
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
3557
- val = interpretNumericEntities(val);
3558
- }
3559
-
3560
- if (part.indexOf('[]=') > -1) {
3561
- val = isArray(val) ? [val] : val;
3562
- }
3563
-
3564
- if (has.call(obj, key)) {
3565
- obj[key] = utils.combine(obj[key], val);
3566
- } else {
3567
- obj[key] = val;
3568
- }
3569
- }
3570
-
3571
- return obj;
3572
- };
3573
-
3574
- var parseObject = function (chain, val, options, valuesParsed) {
3575
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
3576
-
3577
- for (var i = chain.length - 1; i >= 0; --i) {
3578
- var obj;
3579
- var root = chain[i];
3580
-
3581
- if (root === '[]' && options.parseArrays) {
3582
- obj = [].concat(leaf);
3583
- } else {
3584
- obj = options.plainObjects ? Object.create(null) : {};
3585
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
3586
- var index = parseInt(cleanRoot, 10);
3587
- if (!options.parseArrays && cleanRoot === '') {
3588
- obj = { 0: leaf };
3589
- } else if (
3590
- !isNaN(index)
3591
- && root !== cleanRoot
3592
- && String(index) === cleanRoot
3593
- && index >= 0
3594
- && (options.parseArrays && index <= options.arrayLimit)
3595
- ) {
3596
- obj = [];
3597
- obj[index] = leaf;
3598
- } else if (cleanRoot !== '__proto__') {
3599
- obj[cleanRoot] = leaf;
3600
- }
3601
- }
3602
-
3603
- leaf = obj;
3604
- }
3605
-
3606
- return leaf;
3607
- };
3608
-
3609
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
3610
- if (!givenKey) {
3611
- return;
3612
- }
3613
-
3614
- // Transform dot notation to bracket notation
3615
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
3616
-
3617
- // The regex chunks
3618
-
3619
- var brackets = /(\[[^[\]]*])/;
3620
- var child = /(\[[^[\]]*])/g;
3621
-
3622
- // Get the parent
3623
-
3624
- var segment = options.depth > 0 && brackets.exec(key);
3625
- var parent = segment ? key.slice(0, segment.index) : key;
3626
-
3627
- // Stash the parent if it exists
3628
-
3629
- var keys = [];
3630
- if (parent) {
3631
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
3632
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
3633
- if (!options.allowPrototypes) {
3634
- return;
3635
- }
3636
- }
3637
-
3638
- keys.push(parent);
3639
- }
3640
-
3641
- // Loop through children appending to the array until we hit depth
3642
-
3643
- var i = 0;
3644
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
3645
- i += 1;
3646
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
3647
- if (!options.allowPrototypes) {
3648
- return;
3649
- }
3650
- }
3651
- keys.push(segment[1]);
3652
- }
3653
-
3654
- // If there's a remainder, just add whatever is left
3655
-
3656
- if (segment) {
3657
- keys.push('[' + key.slice(segment.index) + ']');
3658
- }
3659
-
3660
- return parseObject(keys, val, options, valuesParsed);
3661
- };
3662
-
3663
- var normalizeParseOptions = function normalizeParseOptions(opts) {
3664
- if (!opts) {
3665
- return defaults;
3666
- }
3667
-
3668
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
3669
- throw new TypeError('Decoder has to be a function.');
3670
- }
3671
-
3672
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
3673
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
3674
- }
3675
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
3676
-
3677
- return {
3678
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
3679
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
3680
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
3681
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
3682
- charset: charset,
3683
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
3684
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
3685
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
3686
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
3687
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
3688
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
3689
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
3690
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
3691
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
3692
- parseArrays: opts.parseArrays !== false,
3693
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
3694
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
3695
- };
3696
- };
3697
-
3698
- var parse$1 = function (str, opts) {
3699
- var options = normalizeParseOptions(opts);
3700
-
3701
- if (str === '' || str === null || typeof str === 'undefined') {
3702
- return options.plainObjects ? Object.create(null) : {};
3703
- }
3704
-
3705
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
3706
- var obj = options.plainObjects ? Object.create(null) : {};
3707
-
3708
- // Iterate over the keys and setup the new object
3709
-
3710
- var keys = Object.keys(tempObj);
3711
- for (var i = 0; i < keys.length; ++i) {
3712
- var key = keys[i];
3713
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
3714
- obj = utils.merge(obj, newObj, options);
3715
- }
3716
-
3717
- if (options.allowSparse === true) {
3718
- return obj;
3719
- }
3720
-
3721
- return utils.compact(obj);
3722
- };
3723
-
3724
- var stringify = stringify_1;
3725
- var parse = parse$1;
3726
- var formats = formats$3;
3727
-
3728
- var lib = {
3729
- formats: formats,
3730
- parse: parse,
3731
- stringify: stringify
3732
- };
3733
-
3734
- var qs = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(lib);
3735
-
3736
- var fetch = function fetch(params) {
3737
- var serializedParams = qs.stringify(neetoCist.keysToSnakeCase(params), {
3738
- arrayFormat: "brackets",
3739
- encode: false
3740
- });
3741
- return axios__default["default"].get("".concat(constants.BASE_URL, "/teams?").concat(serializedParams));
3742
- };
3743
- var fetchCountsPerCategory = function fetchCountsPerCategory() {
3744
- return axios__default["default"].get("".concat(constants.BASE_URL, "/teams/counts_per_category"));
3745
- };
3746
- var create = function create(payload) {
3747
- return axios__default["default"].post("".concat(constants.BASE_URL, "/teams"), payload);
3748
- };
3749
- var update = function update(id, payload) {
3750
- return axios__default["default"].put("".concat(constants.BASE_URL, "/teams/").concat(id), {
3751
- team: payload
3752
- });
3753
- };
3754
- var bulkUpdate = function bulkUpdate(payload) {
3755
- return axios__default["default"].patch("".concat(constants.BASE_URL, "/teams/bulk_update"), payload);
3756
- };
3757
- var fetchFilterOptions = function fetchFilterOptions(params) {
3758
- return axios__default["default"].get("".concat(constants.BASE_URL, "/teams/filter_options"), {
3759
- params: neetoCist.keysToSnakeCase(params)
3760
- });
3761
- };
3762
- var creationStatus = function creationStatus(jobId) {
3763
- return axios__default["default"].get("".concat(constants.BASE_URL, "/teams/creation_status/").concat(jobId));
3764
- };
3765
- var teamsApi = {
3766
- bulkUpdate: bulkUpdate,
3767
- create: create,
3768
- fetch: fetch,
3769
- update: update,
3770
- fetchFilterOptions: fetchFilterOptions,
3771
- fetchCountsPerCategory: fetchCountsPerCategory,
3772
- creationStatus: creationStatus
3773
- };
3774
-
3775
- var _excluded = ["onSuccess"],
3776
- _excluded2 = ["onSuccess"];
3777
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3778
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3779
- var useFetchMembers = function useFetchMembers() {
3780
- var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3781
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3782
- return reactQuery.useQuery(_objectSpread(_objectSpread({
3783
- queryKey: [constants.QUERY_KEYS.TEAMS, params],
3784
- queryFn: function queryFn() {
3785
- return teamsApi.fetch(params);
3786
- },
3787
- select: ramda.identity,
3788
- placeholderData: reactQuery.keepPreviousData
3789
- }, options), {}, {
3790
- refetchOnWindowFocus: false
3791
- }));
3792
- };
3793
- var useFetchMembersCountsPerCategory = function useFetchMembersCountsPerCategory() {
3794
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3795
- return reactQuery.useQuery(_objectSpread(_objectSpread({
3796
- queryKey: [constants.QUERY_KEYS.TEAMS],
3797
- queryFn: teamsApi.fetchCountsPerCategory,
3798
- select: ramda.identity,
3799
- placeholderData: reactQuery.keepPreviousData
3800
- }, options), {}, {
3801
- refetchOnWindowFocus: false
3802
- }));
3803
- };
3804
- var useCreateMember = function useCreateMember() {
3805
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3806
- return reactQuery.useMutation(_objectSpread({
3807
- mutationFn: teamsApi.create
3808
- }, options));
3809
- };
3810
- var useUpdateMember = function useUpdateMember(_ref) {
3811
- var _onSuccess = _ref.onSuccess,
3812
- options = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
3813
- return reactUtils.useMutationWithInvalidation(function (_ref2) {
3814
- var id = _ref2.id,
3815
- payload = _ref2.payload;
3816
- return teamsApi.update(id, payload);
3817
- }, _objectSpread({
3818
- keysToInvalidate: [[constants.QUERY_KEYS.TEAMS], [constants.QUERY_KEYS.TEAMS_DEPENDENCIES]],
3819
- onSuccess: function onSuccess() {
3820
- _onSuccess === null || _onSuccess === void 0 || _onSuccess();
3821
- }
3822
- }, options));
3823
- };
3824
- var useBulkUpdateMembers = function useBulkUpdateMembers(_ref3) {
3825
- var _onSuccess2 = _ref3.onSuccess,
3826
- options = objectWithoutProperties._objectWithoutProperties(_ref3, _excluded2);
3827
- return reactUtils.useMutationWithInvalidation(teamsApi.bulkUpdate, _objectSpread({
3828
- keysToInvalidate: [[constants.QUERY_KEYS.TEAMS], [constants.QUERY_KEYS.TEAMS_DEPENDENCIES]],
3829
- onSuccess: function onSuccess() {
3830
- _onSuccess2 === null || _onSuccess2 === void 0 || _onSuccess2();
3831
- }
3832
- }, options));
3833
- };
3834
- var refetchMembers = function refetchMembers() {
3835
- queryClient.queryClient.invalidateQueries({
3836
- queryKey: [constants.QUERY_KEYS.TEAMS]
3837
- });
3838
- queryClient.queryClient.invalidateQueries({
3839
- queryKey: [constants.QUERY_KEYS.TEAMS_DEPENDENCIES]
3840
- });
3841
- };
3842
- var useFetchFilterOptions = function useFetchFilterOptions(_ref4) {
3843
- var _ref4$params = _ref4.params,
3844
- params = _ref4$params === void 0 ? {} : _ref4$params,
3845
- _ref4$options = _ref4.options,
3846
- options = _ref4$options === void 0 ? {} : _ref4$options;
3847
- return reactQuery.useQuery(_objectSpread(_objectSpread({
3848
- queryKey: [constants.QUERY_KEYS.TEAMS_DEPENDENCIES, params],
3849
- queryFn: function queryFn() {
3850
- return teamsApi.fetchFilterOptions(params);
3851
- },
3852
- select: ramda.identity
3853
- }, options), {}, {
3854
- refetchOnWindowFocus: false
3855
- }));
3856
- };
3857
- var useMembersCreationStatus = function useMembersCreationStatus(jobId, options) {
3858
- return reactQuery.useQuery(_objectSpread({
3859
- queryKey: [constants.QUERY_KEYS.CREATION_STATUS, jobId],
3860
- queryFn: function queryFn() {
3861
- return teamsApi.creationStatus(jobId);
3862
- }
3863
- }, options));
3864
- };
3865
-
3866
- exports.refetchMembers = refetchMembers;
3867
- exports.useBulkUpdateMembers = useBulkUpdateMembers;
3868
- exports.useCreateMember = useCreateMember;
3869
- exports.useFetchFilterOptions = useFetchFilterOptions;
3870
- exports.useFetchMembers = useFetchMembers;
3871
- exports.useFetchMembersCountsPerCategory = useFetchMembersCountsPerCategory;
3872
- exports.useMembersCreationStatus = useMembersCreationStatus;
3873
- exports.useUpdateMember = useUpdateMember;
3874
- //# sourceMappingURL=useTeamsApi-bc52172a.js.map