@uidev1116/acms-js-sdk 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +256 -7
  2. package/dist/cjs/acms-js-sdk.cjs +3 -3
  3. package/dist/cjs/acms-path.cjs +4 -1
  4. package/dist/cjs/type-guard.cjs +1 -1
  5. package/dist/es/acms-js-sdk.js +56 -63
  6. package/dist/es/acms-path.js +2124 -4
  7. package/dist/es/type-guard.js +2 -3
  8. package/dist/index-BeSRDPIk.js +15 -0
  9. package/dist/index-Bm4C_vR2.cjs +1 -0
  10. package/dist/types/core/AcmsClient.d.ts +4 -4
  11. package/dist/types/core/AcmsFetchError.d.ts +1 -1
  12. package/dist/types/index.d.ts +1 -0
  13. package/dist/types/lib/acmsPath/acmsField.d.ts +13 -0
  14. package/dist/types/lib/acmsPath/acmsField.test.d.ts +1 -0
  15. package/dist/types/lib/acmsPath/acmsPath.d.ts +2 -2
  16. package/dist/types/lib/acmsPath/{defaultOptions.d.ts → defaults.d.ts} +1 -0
  17. package/dist/types/lib/acmsPath/index.d.ts +1 -0
  18. package/dist/types/lib/acmsPath/parseAcmsPath.d.ts +1 -1
  19. package/dist/types/lib/acmsPath/types.d.ts +32 -7
  20. package/dist/types/lib/acmsPath/utils.d.ts +1 -0
  21. package/dist/types/lib/acmsPath/utils.test.d.ts +1 -0
  22. package/dist/types/lib/typeGuard/isAcmsFetchError.d.ts +1 -1
  23. package/dist/types/types/index.d.ts +3 -3
  24. package/dist/types/utils/index.d.ts +3 -0
  25. package/dist/types/utils/mergeConfig.d.ts +10 -0
  26. package/dist/types/utils/mergeConfig.test.d.ts +1 -0
  27. package/dist/types/utils/parseFormData.d.ts +7 -0
  28. package/dist/types/utils/unique.d.ts +1 -0
  29. package/package.json +28 -27
  30. package/dist/browser-ponyfill-EPWIFhDK.js +0 -339
  31. package/dist/browser-ponyfill-r3mBr4hd.cjs +0 -2
  32. package/dist/index-H2fSgwjT.js +0 -328
  33. package/dist/index-WFlkDf6U.cjs +0 -1
  34. package/dist/index-ZZQxXurp.js +0 -19
  35. package/dist/index-x-5Zn68j.cjs +0 -1
  36. /package/dist/{typeGuard-eqTQ9U-x.cjs → typeGuard-B-hez9oi.cjs} +0 -0
  37. /package/dist/{typeGuard-Jsany_41.js → typeGuard-CkfEvQcm.js} +0 -0
@@ -1,6 +1,2126 @@
1
- import { a as p, p as r } from "../index-H2fSgwjT.js";
2
- import "../typeGuard-Jsany_41.js";
1
+ import { a as _e, i as Yr } from "../typeGuard-CkfEvQcm.js";
2
+ var Xr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
+ function pn(e) {
4
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
5
+ var a = e.default;
6
+ if (typeof a == "function") {
7
+ var o = function i() {
8
+ var d = !1;
9
+ try {
10
+ d = this instanceof i;
11
+ } catch {
12
+ }
13
+ return d ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
14
+ };
15
+ o.prototype = a.prototype;
16
+ } else o = {};
17
+ return Object.defineProperty(o, "__esModule", { value: !0 }), Object.keys(e).forEach(function(i) {
18
+ var d = Object.getOwnPropertyDescriptor(e, i);
19
+ Object.defineProperty(o, i, d.get ? d : {
20
+ enumerable: !0,
21
+ get: function() {
22
+ return e[i];
23
+ }
24
+ });
25
+ }), o;
26
+ }
27
+ var je, Zr;
28
+ function Oe() {
29
+ return Zr || (Zr = 1, je = TypeError), je;
30
+ }
31
+ const yn = {}, dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32
+ __proto__: null,
33
+ default: yn
34
+ }, Symbol.toStringTag, { value: "Module" })), vn = /* @__PURE__ */ pn(dn);
35
+ var He, et;
36
+ function Ne() {
37
+ if (et) return He;
38
+ et = 1;
39
+ var e = typeof Map == "function" && Map.prototype, a = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, o = e && a && typeof a.get == "function" ? a.get : null, i = e && Map.prototype.forEach, d = typeof Set == "function" && Set.prototype, v = Object.getOwnPropertyDescriptor && d ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, b = d && v && typeof v.get == "function" ? v.get : null, c = d && Set.prototype.forEach, p = typeof WeakMap == "function" && WeakMap.prototype, m = p ? WeakMap.prototype.has : null, t = typeof WeakSet == "function" && WeakSet.prototype, f = t ? WeakSet.prototype.has : null, h = typeof WeakRef == "function" && WeakRef.prototype, u = h ? WeakRef.prototype.deref : null, g = Boolean.prototype.valueOf, w = Object.prototype.toString, l = Function.prototype.toString, s = String.prototype.match, y = String.prototype.slice, A = String.prototype.replace, S = String.prototype.toUpperCase, O = String.prototype.toLowerCase, E = RegExp.prototype.test, P = Array.prototype.concat, R = Array.prototype.join, N = Array.prototype.slice, q = Math.floor, M = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, $ = Object.getOwnPropertySymbols, G = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, U = typeof Symbol == "function" && typeof Symbol.iterator == "object", K = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === U || !0) ? Symbol.toStringTag : null, re = Object.prototype.propertyIsEnumerable, te = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
40
+ return r.__proto__;
41
+ } : null);
42
+ function _(r, n) {
43
+ if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || E.call(/e/, n))
44
+ return n;
45
+ var F = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
46
+ if (typeof r == "number") {
47
+ var T = r < 0 ? -q(-r) : q(r);
48
+ if (T !== r) {
49
+ var C = String(T), I = y.call(n, C.length + 1);
50
+ return A.call(C, F, "$&_") + "." + A.call(A.call(I, /([0-9]{3})/g, "$&_"), /_$/, "");
51
+ }
52
+ }
53
+ return A.call(n, F, "$&_");
54
+ }
55
+ var z = vn, ne = z.custom, ye = k(ne) ? ne : null, oe = {
56
+ __proto__: null,
57
+ double: '"',
58
+ single: "'"
59
+ }, ie = {
60
+ __proto__: null,
61
+ double: /(["\\])/g,
62
+ single: /(['\\])/g
63
+ };
64
+ He = function r(n, F, T, C) {
65
+ var I = F || {};
66
+ if (H(I, "quoteStyle") && !H(oe, I.quoteStyle))
67
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
68
+ if (H(I, "maxStringLength") && (typeof I.maxStringLength == "number" ? I.maxStringLength < 0 && I.maxStringLength !== 1 / 0 : I.maxStringLength !== null))
69
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
70
+ var se = H(I, "customInspect") ? I.customInspect : !0;
71
+ if (typeof se != "boolean" && se !== "symbol")
72
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
73
+ if (H(I, "indent") && I.indent !== null && I.indent !== " " && !(parseInt(I.indent, 10) === I.indent && I.indent > 0))
74
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
75
+ if (H(I, "numericSeparator") && typeof I.numericSeparator != "boolean")
76
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
77
+ var de = I.numericSeparator;
78
+ if (typeof n > "u")
79
+ return "undefined";
80
+ if (n === null)
81
+ return "null";
82
+ if (typeof n == "boolean")
83
+ return n ? "true" : "false";
84
+ if (typeof n == "string")
85
+ return Wr(n, I);
86
+ if (typeof n == "number") {
87
+ if (n === 0)
88
+ return 1 / 0 / n > 0 ? "0" : "-0";
89
+ var V = String(n);
90
+ return de ? _(n, V) : V;
91
+ }
92
+ if (typeof n == "bigint") {
93
+ var pe = String(n) + "n";
94
+ return de ? _(n, pe) : pe;
95
+ }
96
+ var Ce = typeof I.depth > "u" ? 5 : I.depth;
97
+ if (typeof T > "u" && (T = 0), T >= Ce && Ce > 0 && typeof n == "object")
98
+ return fe(n) ? "[Array]" : "[Object]";
99
+ var Se = ln(I, T);
100
+ if (typeof C > "u")
101
+ C = [];
102
+ else if (ce(C, n) >= 0)
103
+ return "[Circular]";
104
+ function Z(be, Ie, sn) {
105
+ if (Ie && (C = N.call(C), C.push(Ie)), sn) {
106
+ var Jr = {
107
+ depth: I.depth
108
+ };
109
+ return H(I, "quoteStyle") && (Jr.quoteStyle = I.quoteStyle), r(be, Jr, T + 1, C);
110
+ }
111
+ return r(be, I, T + 1, C);
112
+ }
113
+ if (typeof n == "function" && !W(n)) {
114
+ var kr = ve(n), jr = Re(n, Z);
115
+ return "[Function" + (kr ? ": " + kr : " (anonymous)") + "]" + (jr.length > 0 ? " { " + R.call(jr, ", ") + " }" : "");
116
+ }
117
+ if (k(n)) {
118
+ var Hr = U ? A.call(String(n), /^(Symbol\(.*\))_[^)]*$/, "$1") : G.call(n);
119
+ return typeof n == "object" && !U ? Ee(Hr) : Hr;
120
+ }
121
+ if (on(n)) {
122
+ for (var Pe = "<" + O.call(String(n.nodeName)), Be = n.attributes || [], qe = 0; qe < Be.length; qe++)
123
+ Pe += " " + Be[qe].name + "=" + ue(ae(Be[qe].value), "double", I);
124
+ return Pe += ">", n.childNodes && n.childNodes.length && (Pe += "..."), Pe += "</" + O.call(String(n.nodeName)) + ">", Pe;
125
+ }
126
+ if (fe(n)) {
127
+ if (n.length === 0)
128
+ return "[]";
129
+ var Ue = Re(n, Z);
130
+ return Se && !fn(Ue) ? "[" + Te(Ue, Se) + "]" : "[ " + R.call(Ue, ", ") + " ]";
131
+ }
132
+ if (D(n)) {
133
+ var Le = Re(n, Z);
134
+ return !("cause" in Error.prototype) && "cause" in n && !re.call(n, "cause") ? "{ [" + String(n) + "] " + R.call(P.call("[cause]: " + Z(n.cause), Le), ", ") + " }" : Le.length === 0 ? "[" + String(n) + "]" : "{ [" + String(n) + "] " + R.call(Le, ", ") + " }";
135
+ }
136
+ if (typeof n == "object" && se) {
137
+ if (ye && typeof n[ye] == "function" && z)
138
+ return z(n, { depth: Ce - T });
139
+ if (se !== "symbol" && typeof n.inspect == "function")
140
+ return n.inspect();
141
+ }
142
+ if (X(n)) {
143
+ var Kr = [];
144
+ return i && i.call(n, function(be, Ie) {
145
+ Kr.push(Z(Ie, n, !0) + " => " + Z(be, n));
146
+ }), Gr("Map", o.call(n), Kr, Se);
147
+ }
148
+ if (me(n)) {
149
+ var zr = [];
150
+ return c && c.call(n, function(be) {
151
+ zr.push(Z(be, n));
152
+ }), Gr("Set", b.call(n), zr, Se);
153
+ }
154
+ if (he(n))
155
+ return xe("WeakMap");
156
+ if (an(n))
157
+ return xe("WeakSet");
158
+ if (ge(n))
159
+ return xe("WeakRef");
160
+ if (x(n))
161
+ return Ee(Z(Number(n)));
162
+ if (J(n))
163
+ return Ee(Z(M.call(n)));
164
+ if (L(n))
165
+ return Ee(g.call(n));
166
+ if (B(n))
167
+ return Ee(Z(String(n)));
168
+ if (typeof window < "u" && n === window)
169
+ return "{ [object Window] }";
170
+ if (typeof globalThis < "u" && n === globalThis || typeof Xr < "u" && n === Xr)
171
+ return "{ [object globalThis] }";
172
+ if (!le(n) && !W(n)) {
173
+ var We = Re(n, Z), Vr = te ? te(n) === Object.prototype : n instanceof Object || n.constructor === Object, Ge = n instanceof Object ? "" : "null prototype", Qr = !Vr && K && Object(n) === n && K in n ? y.call(Y(n), 8, -1) : Ge ? "Object" : "", cn = Vr || typeof n.constructor != "function" ? "" : n.constructor.name ? n.constructor.name + " " : "", ke = cn + (Qr || Ge ? "[" + R.call(P.call([], Qr || [], Ge || []), ": ") + "] " : "");
174
+ return We.length === 0 ? ke + "{}" : Se ? ke + "{" + Te(We, Se) + "}" : ke + "{ " + R.call(We, ", ") + " }";
175
+ }
176
+ return String(n);
177
+ };
178
+ function ue(r, n, F) {
179
+ var T = F.quoteStyle || n, C = oe[T];
180
+ return C + r + C;
181
+ }
182
+ function ae(r) {
183
+ return A.call(String(r), /"/g, "&quot;");
184
+ }
185
+ function Q(r) {
186
+ return !K || !(typeof r == "object" && (K in r || typeof r[K] < "u"));
187
+ }
188
+ function fe(r) {
189
+ return Y(r) === "[object Array]" && Q(r);
190
+ }
191
+ function le(r) {
192
+ return Y(r) === "[object Date]" && Q(r);
193
+ }
194
+ function W(r) {
195
+ return Y(r) === "[object RegExp]" && Q(r);
196
+ }
197
+ function D(r) {
198
+ return Y(r) === "[object Error]" && Q(r);
199
+ }
200
+ function B(r) {
201
+ return Y(r) === "[object String]" && Q(r);
202
+ }
203
+ function x(r) {
204
+ return Y(r) === "[object Number]" && Q(r);
205
+ }
206
+ function L(r) {
207
+ return Y(r) === "[object Boolean]" && Q(r);
208
+ }
209
+ function k(r) {
210
+ if (U)
211
+ return r && typeof r == "object" && r instanceof Symbol;
212
+ if (typeof r == "symbol")
213
+ return !0;
214
+ if (!r || typeof r != "object" || !G)
215
+ return !1;
216
+ try {
217
+ return G.call(r), !0;
218
+ } catch {
219
+ }
220
+ return !1;
221
+ }
222
+ function J(r) {
223
+ if (!r || typeof r != "object" || !M)
224
+ return !1;
225
+ try {
226
+ return M.call(r), !0;
227
+ } catch {
228
+ }
229
+ return !1;
230
+ }
231
+ var j = Object.prototype.hasOwnProperty || function(r) {
232
+ return r in this;
233
+ };
234
+ function H(r, n) {
235
+ return j.call(r, n);
236
+ }
237
+ function Y(r) {
238
+ return w.call(r);
239
+ }
240
+ function ve(r) {
241
+ if (r.name)
242
+ return r.name;
243
+ var n = s.call(l.call(r), /^function\s*([\w$]+)/);
244
+ return n ? n[1] : null;
245
+ }
246
+ function ce(r, n) {
247
+ if (r.indexOf)
248
+ return r.indexOf(n);
249
+ for (var F = 0, T = r.length; F < T; F++)
250
+ if (r[F] === n)
251
+ return F;
252
+ return -1;
253
+ }
254
+ function X(r) {
255
+ if (!o || !r || typeof r != "object")
256
+ return !1;
257
+ try {
258
+ o.call(r);
259
+ try {
260
+ b.call(r);
261
+ } catch {
262
+ return !0;
263
+ }
264
+ return r instanceof Map;
265
+ } catch {
266
+ }
267
+ return !1;
268
+ }
269
+ function he(r) {
270
+ if (!m || !r || typeof r != "object")
271
+ return !1;
272
+ try {
273
+ m.call(r, m);
274
+ try {
275
+ f.call(r, f);
276
+ } catch {
277
+ return !0;
278
+ }
279
+ return r instanceof WeakMap;
280
+ } catch {
281
+ }
282
+ return !1;
283
+ }
284
+ function ge(r) {
285
+ if (!u || !r || typeof r != "object")
286
+ return !1;
287
+ try {
288
+ return u.call(r), !0;
289
+ } catch {
290
+ }
291
+ return !1;
292
+ }
293
+ function me(r) {
294
+ if (!b || !r || typeof r != "object")
295
+ return !1;
296
+ try {
297
+ b.call(r);
298
+ try {
299
+ o.call(r);
300
+ } catch {
301
+ return !0;
302
+ }
303
+ return r instanceof Set;
304
+ } catch {
305
+ }
306
+ return !1;
307
+ }
308
+ function an(r) {
309
+ if (!f || !r || typeof r != "object")
310
+ return !1;
311
+ try {
312
+ f.call(r, f);
313
+ try {
314
+ m.call(r, m);
315
+ } catch {
316
+ return !0;
317
+ }
318
+ return r instanceof WeakSet;
319
+ } catch {
320
+ }
321
+ return !1;
322
+ }
323
+ function on(r) {
324
+ return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function";
325
+ }
326
+ function Wr(r, n) {
327
+ if (r.length > n.maxStringLength) {
328
+ var F = r.length - n.maxStringLength, T = "... " + F + " more character" + (F > 1 ? "s" : "");
329
+ return Wr(y.call(r, 0, n.maxStringLength), n) + T;
330
+ }
331
+ var C = ie[n.quoteStyle || "single"];
332
+ C.lastIndex = 0;
333
+ var I = A.call(A.call(r, C, "\\$1"), /[\x00-\x1f]/g, un);
334
+ return ue(I, "single", n);
335
+ }
336
+ function un(r) {
337
+ var n = r.charCodeAt(0), F = {
338
+ 8: "b",
339
+ 9: "t",
340
+ 10: "n",
341
+ 12: "f",
342
+ 13: "r"
343
+ }[n];
344
+ return F ? "\\" + F : "\\x" + (n < 16 ? "0" : "") + S.call(n.toString(16));
345
+ }
346
+ function Ee(r) {
347
+ return "Object(" + r + ")";
348
+ }
349
+ function xe(r) {
350
+ return r + " { ? }";
351
+ }
352
+ function Gr(r, n, F, T) {
353
+ var C = T ? Te(F, T) : R.call(F, ", ");
354
+ return r + " (" + n + ") {" + C + "}";
355
+ }
356
+ function fn(r) {
357
+ for (var n = 0; n < r.length; n++)
358
+ if (ce(r[n], `
359
+ `) >= 0)
360
+ return !1;
361
+ return !0;
362
+ }
363
+ function ln(r, n) {
364
+ var F;
365
+ if (r.indent === " ")
366
+ F = " ";
367
+ else if (typeof r.indent == "number" && r.indent > 0)
368
+ F = R.call(Array(r.indent + 1), " ");
369
+ else
370
+ return null;
371
+ return {
372
+ base: F,
373
+ prev: R.call(Array(n + 1), F)
374
+ };
375
+ }
376
+ function Te(r, n) {
377
+ if (r.length === 0)
378
+ return "";
379
+ var F = `
380
+ ` + n.prev + n.base;
381
+ return F + R.call(r, "," + F) + `
382
+ ` + n.prev;
383
+ }
384
+ function Re(r, n) {
385
+ var F = fe(r), T = [];
386
+ if (F) {
387
+ T.length = r.length;
388
+ for (var C = 0; C < r.length; C++)
389
+ T[C] = H(r, C) ? n(r[C], r) : "";
390
+ }
391
+ var I = typeof $ == "function" ? $(r) : [], se;
392
+ if (U) {
393
+ se = {};
394
+ for (var de = 0; de < I.length; de++)
395
+ se["$" + I[de]] = I[de];
396
+ }
397
+ for (var V in r)
398
+ H(r, V) && (F && String(Number(V)) === V && V < r.length || U && se["$" + V] instanceof Symbol || (E.call(/[^\w$]/, V) ? T.push(n(V, r) + ": " + n(r[V], r)) : T.push(V + ": " + n(r[V], r))));
399
+ if (typeof $ == "function")
400
+ for (var pe = 0; pe < I.length; pe++)
401
+ re.call(r, I[pe]) && T.push("[" + n(I[pe]) + "]: " + n(r[I[pe]], r));
402
+ return T;
403
+ }
404
+ return He;
405
+ }
406
+ var Ke, rt;
407
+ function hn() {
408
+ if (rt) return Ke;
409
+ rt = 1;
410
+ var e = /* @__PURE__ */ Ne(), a = /* @__PURE__ */ Oe(), o = function(c, p, m) {
411
+ for (var t = c, f; (f = t.next) != null; t = f)
412
+ if (f.key === p)
413
+ return t.next = f.next, m || (f.next = /** @type {NonNullable<typeof list.next>} */
414
+ c.next, c.next = f), f;
415
+ }, i = function(c, p) {
416
+ if (c) {
417
+ var m = o(c, p);
418
+ return m && m.value;
419
+ }
420
+ }, d = function(c, p, m) {
421
+ var t = o(c, p);
422
+ t ? t.value = m : c.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
423
+ {
424
+ // eslint-disable-line no-param-reassign, no-extra-parens
425
+ key: p,
426
+ next: c.next,
427
+ value: m
428
+ };
429
+ }, v = function(c, p) {
430
+ return c ? !!o(c, p) : !1;
431
+ }, b = function(c, p) {
432
+ if (c)
433
+ return o(c, p, !0);
434
+ };
435
+ return Ke = function() {
436
+ var p, m = {
437
+ assert: function(t) {
438
+ if (!m.has(t))
439
+ throw new a("Side channel does not contain " + e(t));
440
+ },
441
+ delete: function(t) {
442
+ var f = p && p.next, h = b(p, t);
443
+ return h && f && f === h && (p = void 0), !!h;
444
+ },
445
+ get: function(t) {
446
+ return i(p, t);
447
+ },
448
+ has: function(t) {
449
+ return v(p, t);
450
+ },
451
+ set: function(t, f) {
452
+ p || (p = {
453
+ next: void 0
454
+ }), d(
455
+ /** @type {NonNullable<typeof $o>} */
456
+ p,
457
+ t,
458
+ f
459
+ );
460
+ }
461
+ };
462
+ return m;
463
+ }, Ke;
464
+ }
465
+ var ze, tt;
466
+ function Ht() {
467
+ return tt || (tt = 1, ze = Object), ze;
468
+ }
469
+ var Ve, nt;
470
+ function gn() {
471
+ return nt || (nt = 1, Ve = Error), Ve;
472
+ }
473
+ var Qe, at;
474
+ function mn() {
475
+ return at || (at = 1, Qe = EvalError), Qe;
476
+ }
477
+ var Je, ot;
478
+ function Sn() {
479
+ return ot || (ot = 1, Je = RangeError), Je;
480
+ }
481
+ var Ye, it;
482
+ function bn() {
483
+ return it || (it = 1, Ye = ReferenceError), Ye;
484
+ }
485
+ var Xe, ut;
486
+ function wn() {
487
+ return ut || (ut = 1, Xe = SyntaxError), Xe;
488
+ }
489
+ var Ze, ft;
490
+ function An() {
491
+ return ft || (ft = 1, Ze = URIError), Ze;
492
+ }
493
+ var er, lt;
494
+ function On() {
495
+ return lt || (lt = 1, er = Math.abs), er;
496
+ }
497
+ var rr, ct;
498
+ function En() {
499
+ return ct || (ct = 1, rr = Math.floor), rr;
500
+ }
501
+ var tr, st;
502
+ function Pn() {
503
+ return st || (st = 1, tr = Math.max), tr;
504
+ }
505
+ var nr, pt;
506
+ function $n() {
507
+ return pt || (pt = 1, nr = Math.min), nr;
508
+ }
509
+ var ar, yt;
510
+ function Rn() {
511
+ return yt || (yt = 1, ar = Math.pow), ar;
512
+ }
513
+ var or, dt;
514
+ function qn() {
515
+ return dt || (dt = 1, or = Math.round), or;
516
+ }
517
+ var ir, vt;
518
+ function In() {
519
+ return vt || (vt = 1, ir = Number.isNaN || function(a) {
520
+ return a !== a;
521
+ }), ir;
522
+ }
523
+ var ur, ht;
524
+ function _n() {
525
+ if (ht) return ur;
526
+ ht = 1;
527
+ var e = /* @__PURE__ */ In();
528
+ return ur = function(o) {
529
+ return e(o) || o === 0 ? o : o < 0 ? -1 : 1;
530
+ }, ur;
531
+ }
532
+ var fr, gt;
533
+ function Dn() {
534
+ return gt || (gt = 1, fr = Object.getOwnPropertyDescriptor), fr;
535
+ }
536
+ var lr, mt;
537
+ function Kt() {
538
+ if (mt) return lr;
539
+ mt = 1;
540
+ var e = /* @__PURE__ */ Dn();
541
+ if (e)
542
+ try {
543
+ e([], "length");
544
+ } catch {
545
+ e = null;
546
+ }
547
+ return lr = e, lr;
548
+ }
549
+ var cr, St;
550
+ function Fn() {
551
+ if (St) return cr;
552
+ St = 1;
553
+ var e = Object.defineProperty || !1;
554
+ if (e)
555
+ try {
556
+ e({}, "a", { value: 1 });
557
+ } catch {
558
+ e = !1;
559
+ }
560
+ return cr = e, cr;
561
+ }
562
+ var sr, bt;
563
+ function Nn() {
564
+ return bt || (bt = 1, sr = function() {
565
+ if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
566
+ return !1;
567
+ if (typeof Symbol.iterator == "symbol")
568
+ return !0;
569
+ var a = {}, o = Symbol("test"), i = Object(o);
570
+ if (typeof o == "string" || Object.prototype.toString.call(o) !== "[object Symbol]" || Object.prototype.toString.call(i) !== "[object Symbol]")
571
+ return !1;
572
+ var d = 42;
573
+ a[o] = d;
574
+ for (var v in a)
575
+ return !1;
576
+ if (typeof Object.keys == "function" && Object.keys(a).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(a).length !== 0)
577
+ return !1;
578
+ var b = Object.getOwnPropertySymbols(a);
579
+ if (b.length !== 1 || b[0] !== o || !Object.prototype.propertyIsEnumerable.call(a, o))
580
+ return !1;
581
+ if (typeof Object.getOwnPropertyDescriptor == "function") {
582
+ var c = (
583
+ /** @type {PropertyDescriptor} */
584
+ Object.getOwnPropertyDescriptor(a, o)
585
+ );
586
+ if (c.value !== d || c.enumerable !== !0)
587
+ return !1;
588
+ }
589
+ return !0;
590
+ }), sr;
591
+ }
592
+ var pr, wt;
593
+ function Mn() {
594
+ if (wt) return pr;
595
+ wt = 1;
596
+ var e = typeof Symbol < "u" && Symbol, a = Nn();
597
+ return pr = function() {
598
+ return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : a();
599
+ }, pr;
600
+ }
601
+ var yr, At;
602
+ function zt() {
603
+ return At || (At = 1, yr = typeof Reflect < "u" && Reflect.getPrototypeOf || null), yr;
604
+ }
605
+ var dr, Ot;
606
+ function Vt() {
607
+ if (Ot) return dr;
608
+ Ot = 1;
609
+ var e = /* @__PURE__ */ Ht();
610
+ return dr = e.getPrototypeOf || null, dr;
611
+ }
612
+ var vr, Et;
613
+ function xn() {
614
+ if (Et) return vr;
615
+ Et = 1;
616
+ var e = "Function.prototype.bind called on incompatible ", a = Object.prototype.toString, o = Math.max, i = "[object Function]", d = function(p, m) {
617
+ for (var t = [], f = 0; f < p.length; f += 1)
618
+ t[f] = p[f];
619
+ for (var h = 0; h < m.length; h += 1)
620
+ t[h + p.length] = m[h];
621
+ return t;
622
+ }, v = function(p, m) {
623
+ for (var t = [], f = m, h = 0; f < p.length; f += 1, h += 1)
624
+ t[h] = p[f];
625
+ return t;
626
+ }, b = function(c, p) {
627
+ for (var m = "", t = 0; t < c.length; t += 1)
628
+ m += c[t], t + 1 < c.length && (m += p);
629
+ return m;
630
+ };
631
+ return vr = function(p) {
632
+ var m = this;
633
+ if (typeof m != "function" || a.apply(m) !== i)
634
+ throw new TypeError(e + m);
635
+ for (var t = v(arguments, 1), f, h = function() {
636
+ if (this instanceof f) {
637
+ var s = m.apply(
638
+ this,
639
+ d(t, arguments)
640
+ );
641
+ return Object(s) === s ? s : this;
642
+ }
643
+ return m.apply(
644
+ p,
645
+ d(t, arguments)
646
+ );
647
+ }, u = o(0, m.length - t.length), g = [], w = 0; w < u; w++)
648
+ g[w] = "$" + w;
649
+ if (f = Function("binder", "return function (" + b(g, ",") + "){ return binder.apply(this,arguments); }")(h), m.prototype) {
650
+ var l = function() {
651
+ };
652
+ l.prototype = m.prototype, f.prototype = new l(), l.prototype = null;
653
+ }
654
+ return f;
655
+ }, vr;
656
+ }
657
+ var hr, Pt;
658
+ function Me() {
659
+ if (Pt) return hr;
660
+ Pt = 1;
661
+ var e = xn();
662
+ return hr = Function.prototype.bind || e, hr;
663
+ }
664
+ var gr, $t;
665
+ function Cr() {
666
+ return $t || ($t = 1, gr = Function.prototype.call), gr;
667
+ }
668
+ var mr, Rt;
669
+ function Qt() {
670
+ return Rt || (Rt = 1, mr = Function.prototype.apply), mr;
671
+ }
672
+ var Sr, qt;
673
+ function Tn() {
674
+ return qt || (qt = 1, Sr = typeof Reflect < "u" && Reflect && Reflect.apply), Sr;
675
+ }
676
+ var br, It;
677
+ function Cn() {
678
+ if (It) return br;
679
+ It = 1;
680
+ var e = Me(), a = Qt(), o = Cr(), i = Tn();
681
+ return br = i || e.call(o, a), br;
682
+ }
683
+ var wr, _t;
684
+ function Jt() {
685
+ if (_t) return wr;
686
+ _t = 1;
687
+ var e = Me(), a = /* @__PURE__ */ Oe(), o = Cr(), i = Cn();
688
+ return wr = function(v) {
689
+ if (v.length < 1 || typeof v[0] != "function")
690
+ throw new a("a function is required");
691
+ return i(e, o, v);
692
+ }, wr;
693
+ }
694
+ var Ar, Dt;
695
+ function Bn() {
696
+ if (Dt) return Ar;
697
+ Dt = 1;
698
+ var e = Jt(), a = /* @__PURE__ */ Kt(), o;
699
+ try {
700
+ o = /** @type {{ __proto__?: typeof Array.prototype }} */
701
+ [].__proto__ === Array.prototype;
702
+ } catch (b) {
703
+ if (!b || typeof b != "object" || !("code" in b) || b.code !== "ERR_PROTO_ACCESS")
704
+ throw b;
705
+ }
706
+ var i = !!o && a && a(
707
+ Object.prototype,
708
+ /** @type {keyof typeof Object.prototype} */
709
+ "__proto__"
710
+ ), d = Object, v = d.getPrototypeOf;
711
+ return Ar = i && typeof i.get == "function" ? e([i.get]) : typeof v == "function" ? (
712
+ /** @type {import('./get')} */
713
+ function(c) {
714
+ return v(c == null ? c : d(c));
715
+ }
716
+ ) : !1, Ar;
717
+ }
718
+ var Or, Ft;
719
+ function Un() {
720
+ if (Ft) return Or;
721
+ Ft = 1;
722
+ var e = zt(), a = Vt(), o = /* @__PURE__ */ Bn();
723
+ return Or = e ? function(d) {
724
+ return e(d);
725
+ } : a ? function(d) {
726
+ if (!d || typeof d != "object" && typeof d != "function")
727
+ throw new TypeError("getProto: not an object");
728
+ return a(d);
729
+ } : o ? function(d) {
730
+ return o(d);
731
+ } : null, Or;
732
+ }
733
+ var Er, Nt;
734
+ function Ln() {
735
+ if (Nt) return Er;
736
+ Nt = 1;
737
+ var e = Function.prototype.call, a = Object.prototype.hasOwnProperty, o = Me();
738
+ return Er = o.call(e, a), Er;
739
+ }
740
+ var Pr, Mt;
741
+ function Br() {
742
+ if (Mt) return Pr;
743
+ Mt = 1;
744
+ var e, a = /* @__PURE__ */ Ht(), o = /* @__PURE__ */ gn(), i = /* @__PURE__ */ mn(), d = /* @__PURE__ */ Sn(), v = /* @__PURE__ */ bn(), b = /* @__PURE__ */ wn(), c = /* @__PURE__ */ Oe(), p = /* @__PURE__ */ An(), m = /* @__PURE__ */ On(), t = /* @__PURE__ */ En(), f = /* @__PURE__ */ Pn(), h = /* @__PURE__ */ $n(), u = /* @__PURE__ */ Rn(), g = /* @__PURE__ */ qn(), w = /* @__PURE__ */ _n(), l = Function, s = function(W) {
745
+ try {
746
+ return l('"use strict"; return (' + W + ").constructor;")();
747
+ } catch {
748
+ }
749
+ }, y = /* @__PURE__ */ Kt(), A = /* @__PURE__ */ Fn(), S = function() {
750
+ throw new c();
751
+ }, O = y ? (function() {
752
+ try {
753
+ return arguments.callee, S;
754
+ } catch {
755
+ try {
756
+ return y(arguments, "callee").get;
757
+ } catch {
758
+ return S;
759
+ }
760
+ }
761
+ })() : S, E = Mn()(), P = Un(), R = Vt(), N = zt(), q = Qt(), M = Cr(), $ = {}, G = typeof Uint8Array > "u" || !P ? e : P(Uint8Array), U = {
762
+ __proto__: null,
763
+ "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
764
+ "%Array%": Array,
765
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
766
+ "%ArrayIteratorPrototype%": E && P ? P([][Symbol.iterator]()) : e,
767
+ "%AsyncFromSyncIteratorPrototype%": e,
768
+ "%AsyncFunction%": $,
769
+ "%AsyncGenerator%": $,
770
+ "%AsyncGeneratorFunction%": $,
771
+ "%AsyncIteratorPrototype%": $,
772
+ "%Atomics%": typeof Atomics > "u" ? e : Atomics,
773
+ "%BigInt%": typeof BigInt > "u" ? e : BigInt,
774
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? e : BigInt64Array,
775
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? e : BigUint64Array,
776
+ "%Boolean%": Boolean,
777
+ "%DataView%": typeof DataView > "u" ? e : DataView,
778
+ "%Date%": Date,
779
+ "%decodeURI%": decodeURI,
780
+ "%decodeURIComponent%": decodeURIComponent,
781
+ "%encodeURI%": encodeURI,
782
+ "%encodeURIComponent%": encodeURIComponent,
783
+ "%Error%": o,
784
+ "%eval%": eval,
785
+ // eslint-disable-line no-eval
786
+ "%EvalError%": i,
787
+ "%Float16Array%": typeof Float16Array > "u" ? e : Float16Array,
788
+ "%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
789
+ "%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
790
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
791
+ "%Function%": l,
792
+ "%GeneratorFunction%": $,
793
+ "%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
794
+ "%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
795
+ "%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
796
+ "%isFinite%": isFinite,
797
+ "%isNaN%": isNaN,
798
+ "%IteratorPrototype%": E && P ? P(P([][Symbol.iterator]())) : e,
799
+ "%JSON%": typeof JSON == "object" ? JSON : e,
800
+ "%Map%": typeof Map > "u" ? e : Map,
801
+ "%MapIteratorPrototype%": typeof Map > "u" || !E || !P ? e : P((/* @__PURE__ */ new Map())[Symbol.iterator]()),
802
+ "%Math%": Math,
803
+ "%Number%": Number,
804
+ "%Object%": a,
805
+ "%Object.getOwnPropertyDescriptor%": y,
806
+ "%parseFloat%": parseFloat,
807
+ "%parseInt%": parseInt,
808
+ "%Promise%": typeof Promise > "u" ? e : Promise,
809
+ "%Proxy%": typeof Proxy > "u" ? e : Proxy,
810
+ "%RangeError%": d,
811
+ "%ReferenceError%": v,
812
+ "%Reflect%": typeof Reflect > "u" ? e : Reflect,
813
+ "%RegExp%": RegExp,
814
+ "%Set%": typeof Set > "u" ? e : Set,
815
+ "%SetIteratorPrototype%": typeof Set > "u" || !E || !P ? e : P((/* @__PURE__ */ new Set())[Symbol.iterator]()),
816
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
817
+ "%String%": String,
818
+ "%StringIteratorPrototype%": E && P ? P(""[Symbol.iterator]()) : e,
819
+ "%Symbol%": E ? Symbol : e,
820
+ "%SyntaxError%": b,
821
+ "%ThrowTypeError%": O,
822
+ "%TypedArray%": G,
823
+ "%TypeError%": c,
824
+ "%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
825
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
826
+ "%Uint16Array%": typeof Uint16Array > "u" ? e : Uint16Array,
827
+ "%Uint32Array%": typeof Uint32Array > "u" ? e : Uint32Array,
828
+ "%URIError%": p,
829
+ "%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
830
+ "%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
831
+ "%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
832
+ "%Function.prototype.call%": M,
833
+ "%Function.prototype.apply%": q,
834
+ "%Object.defineProperty%": A,
835
+ "%Object.getPrototypeOf%": R,
836
+ "%Math.abs%": m,
837
+ "%Math.floor%": t,
838
+ "%Math.max%": f,
839
+ "%Math.min%": h,
840
+ "%Math.pow%": u,
841
+ "%Math.round%": g,
842
+ "%Math.sign%": w,
843
+ "%Reflect.getPrototypeOf%": N
844
+ };
845
+ if (P)
846
+ try {
847
+ null.error;
848
+ } catch (W) {
849
+ var K = P(P(W));
850
+ U["%Error.prototype%"] = K;
851
+ }
852
+ var re = function W(D) {
853
+ var B;
854
+ if (D === "%AsyncFunction%")
855
+ B = s("async function () {}");
856
+ else if (D === "%GeneratorFunction%")
857
+ B = s("function* () {}");
858
+ else if (D === "%AsyncGeneratorFunction%")
859
+ B = s("async function* () {}");
860
+ else if (D === "%AsyncGenerator%") {
861
+ var x = W("%AsyncGeneratorFunction%");
862
+ x && (B = x.prototype);
863
+ } else if (D === "%AsyncIteratorPrototype%") {
864
+ var L = W("%AsyncGenerator%");
865
+ L && P && (B = P(L.prototype));
866
+ }
867
+ return U[D] = B, B;
868
+ }, te = {
869
+ __proto__: null,
870
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
871
+ "%ArrayPrototype%": ["Array", "prototype"],
872
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
873
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
874
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
875
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
876
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
877
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
878
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
879
+ "%BooleanPrototype%": ["Boolean", "prototype"],
880
+ "%DataViewPrototype%": ["DataView", "prototype"],
881
+ "%DatePrototype%": ["Date", "prototype"],
882
+ "%ErrorPrototype%": ["Error", "prototype"],
883
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
884
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
885
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
886
+ "%FunctionPrototype%": ["Function", "prototype"],
887
+ "%Generator%": ["GeneratorFunction", "prototype"],
888
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
889
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
890
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
891
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
892
+ "%JSONParse%": ["JSON", "parse"],
893
+ "%JSONStringify%": ["JSON", "stringify"],
894
+ "%MapPrototype%": ["Map", "prototype"],
895
+ "%NumberPrototype%": ["Number", "prototype"],
896
+ "%ObjectPrototype%": ["Object", "prototype"],
897
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
898
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
899
+ "%PromisePrototype%": ["Promise", "prototype"],
900
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
901
+ "%Promise_all%": ["Promise", "all"],
902
+ "%Promise_reject%": ["Promise", "reject"],
903
+ "%Promise_resolve%": ["Promise", "resolve"],
904
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
905
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
906
+ "%RegExpPrototype%": ["RegExp", "prototype"],
907
+ "%SetPrototype%": ["Set", "prototype"],
908
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
909
+ "%StringPrototype%": ["String", "prototype"],
910
+ "%SymbolPrototype%": ["Symbol", "prototype"],
911
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
912
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
913
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
914
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
915
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
916
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
917
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
918
+ "%URIErrorPrototype%": ["URIError", "prototype"],
919
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
920
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
921
+ }, _ = Me(), z = /* @__PURE__ */ Ln(), ne = _.call(M, Array.prototype.concat), ye = _.call(q, Array.prototype.splice), oe = _.call(M, String.prototype.replace), ie = _.call(M, String.prototype.slice), ue = _.call(M, RegExp.prototype.exec), ae = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Q = /\\(\\)?/g, fe = function(D) {
922
+ var B = ie(D, 0, 1), x = ie(D, -1);
923
+ if (B === "%" && x !== "%")
924
+ throw new b("invalid intrinsic syntax, expected closing `%`");
925
+ if (x === "%" && B !== "%")
926
+ throw new b("invalid intrinsic syntax, expected opening `%`");
927
+ var L = [];
928
+ return oe(D, ae, function(k, J, j, H) {
929
+ L[L.length] = j ? oe(H, Q, "$1") : J || k;
930
+ }), L;
931
+ }, le = function(D, B) {
932
+ var x = D, L;
933
+ if (z(te, x) && (L = te[x], x = "%" + L[0] + "%"), z(U, x)) {
934
+ var k = U[x];
935
+ if (k === $ && (k = re(x)), typeof k > "u" && !B)
936
+ throw new c("intrinsic " + D + " exists, but is not available. Please file an issue!");
937
+ return {
938
+ alias: L,
939
+ name: x,
940
+ value: k
941
+ };
942
+ }
943
+ throw new b("intrinsic " + D + " does not exist!");
944
+ };
945
+ return Pr = function(D, B) {
946
+ if (typeof D != "string" || D.length === 0)
947
+ throw new c("intrinsic name must be a non-empty string");
948
+ if (arguments.length > 1 && typeof B != "boolean")
949
+ throw new c('"allowMissing" argument must be a boolean');
950
+ if (ue(/^%?[^%]*%?$/, D) === null)
951
+ throw new b("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
952
+ var x = fe(D), L = x.length > 0 ? x[0] : "", k = le("%" + L + "%", B), J = k.name, j = k.value, H = !1, Y = k.alias;
953
+ Y && (L = Y[0], ye(x, ne([0, 1], Y)));
954
+ for (var ve = 1, ce = !0; ve < x.length; ve += 1) {
955
+ var X = x[ve], he = ie(X, 0, 1), ge = ie(X, -1);
956
+ if ((he === '"' || he === "'" || he === "`" || ge === '"' || ge === "'" || ge === "`") && he !== ge)
957
+ throw new b("property names with quotes must have matching quotes");
958
+ if ((X === "constructor" || !ce) && (H = !0), L += "." + X, J = "%" + L + "%", z(U, J))
959
+ j = U[J];
960
+ else if (j != null) {
961
+ if (!(X in j)) {
962
+ if (!B)
963
+ throw new c("base intrinsic for " + D + " exists, but the property is not available.");
964
+ return;
965
+ }
966
+ if (y && ve + 1 >= x.length) {
967
+ var me = y(j, X);
968
+ ce = !!me, ce && "get" in me && !("originalValue" in me.get) ? j = me.get : j = j[X];
969
+ } else
970
+ ce = z(j, X), j = j[X];
971
+ ce && !H && (U[J] = j);
972
+ }
973
+ }
974
+ return j;
975
+ }, Pr;
976
+ }
977
+ var $r, xt;
978
+ function Yt() {
979
+ if (xt) return $r;
980
+ xt = 1;
981
+ var e = /* @__PURE__ */ Br(), a = Jt(), o = a([e("%String.prototype.indexOf%")]);
982
+ return $r = function(d, v) {
983
+ var b = (
984
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
985
+ e(d, !!v)
986
+ );
987
+ return typeof b == "function" && o(d, ".prototype.") > -1 ? a(
988
+ /** @type {const} */
989
+ [b]
990
+ ) : b;
991
+ }, $r;
992
+ }
993
+ var Rr, Tt;
994
+ function Xt() {
995
+ if (Tt) return Rr;
996
+ Tt = 1;
997
+ var e = /* @__PURE__ */ Br(), a = /* @__PURE__ */ Yt(), o = /* @__PURE__ */ Ne(), i = /* @__PURE__ */ Oe(), d = e("%Map%", !0), v = a("Map.prototype.get", !0), b = a("Map.prototype.set", !0), c = a("Map.prototype.has", !0), p = a("Map.prototype.delete", !0), m = a("Map.prototype.size", !0);
998
+ return Rr = !!d && /** @type {Exclude<import('.'), false>} */
999
+ function() {
1000
+ var f, h = {
1001
+ assert: function(u) {
1002
+ if (!h.has(u))
1003
+ throw new i("Side channel does not contain " + o(u));
1004
+ },
1005
+ delete: function(u) {
1006
+ if (f) {
1007
+ var g = p(f, u);
1008
+ return m(f) === 0 && (f = void 0), g;
1009
+ }
1010
+ return !1;
1011
+ },
1012
+ get: function(u) {
1013
+ if (f)
1014
+ return v(f, u);
1015
+ },
1016
+ has: function(u) {
1017
+ return f ? c(f, u) : !1;
1018
+ },
1019
+ set: function(u, g) {
1020
+ f || (f = new d()), b(f, u, g);
1021
+ }
1022
+ };
1023
+ return h;
1024
+ }, Rr;
1025
+ }
1026
+ var qr, Ct;
1027
+ function Wn() {
1028
+ if (Ct) return qr;
1029
+ Ct = 1;
1030
+ var e = /* @__PURE__ */ Br(), a = /* @__PURE__ */ Yt(), o = /* @__PURE__ */ Ne(), i = Xt(), d = /* @__PURE__ */ Oe(), v = e("%WeakMap%", !0), b = a("WeakMap.prototype.get", !0), c = a("WeakMap.prototype.set", !0), p = a("WeakMap.prototype.has", !0), m = a("WeakMap.prototype.delete", !0);
1031
+ return qr = v ? (
1032
+ /** @type {Exclude<import('.'), false>} */
1033
+ function() {
1034
+ var f, h, u = {
1035
+ assert: function(g) {
1036
+ if (!u.has(g))
1037
+ throw new d("Side channel does not contain " + o(g));
1038
+ },
1039
+ delete: function(g) {
1040
+ if (v && g && (typeof g == "object" || typeof g == "function")) {
1041
+ if (f)
1042
+ return m(f, g);
1043
+ } else if (i && h)
1044
+ return h.delete(g);
1045
+ return !1;
1046
+ },
1047
+ get: function(g) {
1048
+ return v && g && (typeof g == "object" || typeof g == "function") && f ? b(f, g) : h && h.get(g);
1049
+ },
1050
+ has: function(g) {
1051
+ return v && g && (typeof g == "object" || typeof g == "function") && f ? p(f, g) : !!h && h.has(g);
1052
+ },
1053
+ set: function(g, w) {
1054
+ v && g && (typeof g == "object" || typeof g == "function") ? (f || (f = new v()), c(f, g, w)) : i && (h || (h = i()), h.set(g, w));
1055
+ }
1056
+ };
1057
+ return u;
1058
+ }
1059
+ ) : i, qr;
1060
+ }
1061
+ var Ir, Bt;
1062
+ function Gn() {
1063
+ if (Bt) return Ir;
1064
+ Bt = 1;
1065
+ var e = /* @__PURE__ */ Oe(), a = /* @__PURE__ */ Ne(), o = hn(), i = Xt(), d = Wn(), v = d || i || o;
1066
+ return Ir = function() {
1067
+ var c, p = {
1068
+ assert: function(m) {
1069
+ if (!p.has(m))
1070
+ throw new e("Side channel does not contain " + a(m));
1071
+ },
1072
+ delete: function(m) {
1073
+ return !!c && c.delete(m);
1074
+ },
1075
+ get: function(m) {
1076
+ return c && c.get(m);
1077
+ },
1078
+ has: function(m) {
1079
+ return !!c && c.has(m);
1080
+ },
1081
+ set: function(m, t) {
1082
+ c || (c = v()), c.set(m, t);
1083
+ }
1084
+ };
1085
+ return p;
1086
+ }, Ir;
1087
+ }
1088
+ var _r, Ut;
1089
+ function Ur() {
1090
+ if (Ut) return _r;
1091
+ Ut = 1;
1092
+ var e = String.prototype.replace, a = /%20/g, o = {
1093
+ RFC1738: "RFC1738",
1094
+ RFC3986: "RFC3986"
1095
+ };
1096
+ return _r = {
1097
+ default: o.RFC3986,
1098
+ formatters: {
1099
+ RFC1738: function(i) {
1100
+ return e.call(i, a, "+");
1101
+ },
1102
+ RFC3986: function(i) {
1103
+ return String(i);
1104
+ }
1105
+ },
1106
+ RFC1738: o.RFC1738,
1107
+ RFC3986: o.RFC3986
1108
+ }, _r;
1109
+ }
1110
+ var Dr, Lt;
1111
+ function Zt() {
1112
+ if (Lt) return Dr;
1113
+ Lt = 1;
1114
+ var e = /* @__PURE__ */ Ur(), a = Object.prototype.hasOwnProperty, o = Array.isArray, i = (function() {
1115
+ for (var l = [], s = 0; s < 256; ++s)
1116
+ l.push("%" + ((s < 16 ? "0" : "") + s.toString(16)).toUpperCase());
1117
+ return l;
1118
+ })(), d = function(s) {
1119
+ for (; s.length > 1; ) {
1120
+ var y = s.pop(), A = y.obj[y.prop];
1121
+ if (o(A)) {
1122
+ for (var S = [], O = 0; O < A.length; ++O)
1123
+ typeof A[O] < "u" && S.push(A[O]);
1124
+ y.obj[y.prop] = S;
1125
+ }
1126
+ }
1127
+ }, v = function(s, y) {
1128
+ for (var A = y && y.plainObjects ? { __proto__: null } : {}, S = 0; S < s.length; ++S)
1129
+ typeof s[S] < "u" && (A[S] = s[S]);
1130
+ return A;
1131
+ }, b = function l(s, y, A) {
1132
+ if (!y)
1133
+ return s;
1134
+ if (typeof y != "object" && typeof y != "function") {
1135
+ if (o(s))
1136
+ s.push(y);
1137
+ else if (s && typeof s == "object")
1138
+ (A && (A.plainObjects || A.allowPrototypes) || !a.call(Object.prototype, y)) && (s[y] = !0);
1139
+ else
1140
+ return [s, y];
1141
+ return s;
1142
+ }
1143
+ if (!s || typeof s != "object")
1144
+ return [s].concat(y);
1145
+ var S = s;
1146
+ return o(s) && !o(y) && (S = v(s, A)), o(s) && o(y) ? (y.forEach(function(O, E) {
1147
+ if (a.call(s, E)) {
1148
+ var P = s[E];
1149
+ P && typeof P == "object" && O && typeof O == "object" ? s[E] = l(P, O, A) : s.push(O);
1150
+ } else
1151
+ s[E] = O;
1152
+ }), s) : Object.keys(y).reduce(function(O, E) {
1153
+ var P = y[E];
1154
+ return a.call(O, E) ? O[E] = l(O[E], P, A) : O[E] = P, O;
1155
+ }, S);
1156
+ }, c = function(s, y) {
1157
+ return Object.keys(y).reduce(function(A, S) {
1158
+ return A[S] = y[S], A;
1159
+ }, s);
1160
+ }, p = function(l, s, y) {
1161
+ var A = l.replace(/\+/g, " ");
1162
+ if (y === "iso-8859-1")
1163
+ return A.replace(/%[0-9a-f]{2}/gi, unescape);
1164
+ try {
1165
+ return decodeURIComponent(A);
1166
+ } catch {
1167
+ return A;
1168
+ }
1169
+ }, m = 1024, t = function(s, y, A, S, O) {
1170
+ if (s.length === 0)
1171
+ return s;
1172
+ var E = s;
1173
+ if (typeof s == "symbol" ? E = Symbol.prototype.toString.call(s) : typeof s != "string" && (E = String(s)), A === "iso-8859-1")
1174
+ return escape(E).replace(/%u[0-9a-f]{4}/gi, function(G) {
1175
+ return "%26%23" + parseInt(G.slice(2), 16) + "%3B";
1176
+ });
1177
+ for (var P = "", R = 0; R < E.length; R += m) {
1178
+ for (var N = E.length >= m ? E.slice(R, R + m) : E, q = [], M = 0; M < N.length; ++M) {
1179
+ var $ = N.charCodeAt(M);
1180
+ if ($ === 45 || $ === 46 || $ === 95 || $ === 126 || $ >= 48 && $ <= 57 || $ >= 65 && $ <= 90 || $ >= 97 && $ <= 122 || O === e.RFC1738 && ($ === 40 || $ === 41)) {
1181
+ q[q.length] = N.charAt(M);
1182
+ continue;
1183
+ }
1184
+ if ($ < 128) {
1185
+ q[q.length] = i[$];
1186
+ continue;
1187
+ }
1188
+ if ($ < 2048) {
1189
+ q[q.length] = i[192 | $ >> 6] + i[128 | $ & 63];
1190
+ continue;
1191
+ }
1192
+ if ($ < 55296 || $ >= 57344) {
1193
+ q[q.length] = i[224 | $ >> 12] + i[128 | $ >> 6 & 63] + i[128 | $ & 63];
1194
+ continue;
1195
+ }
1196
+ M += 1, $ = 65536 + (($ & 1023) << 10 | N.charCodeAt(M) & 1023), q[q.length] = i[240 | $ >> 18] + i[128 | $ >> 12 & 63] + i[128 | $ >> 6 & 63] + i[128 | $ & 63];
1197
+ }
1198
+ P += q.join("");
1199
+ }
1200
+ return P;
1201
+ }, f = function(s) {
1202
+ for (var y = [{ obj: { o: s }, prop: "o" }], A = [], S = 0; S < y.length; ++S)
1203
+ for (var O = y[S], E = O.obj[O.prop], P = Object.keys(E), R = 0; R < P.length; ++R) {
1204
+ var N = P[R], q = E[N];
1205
+ typeof q == "object" && q !== null && A.indexOf(q) === -1 && (y.push({ obj: E, prop: N }), A.push(q));
1206
+ }
1207
+ return d(y), s;
1208
+ }, h = function(s) {
1209
+ return Object.prototype.toString.call(s) === "[object RegExp]";
1210
+ }, u = function(s) {
1211
+ return !s || typeof s != "object" ? !1 : !!(s.constructor && s.constructor.isBuffer && s.constructor.isBuffer(s));
1212
+ }, g = function(s, y) {
1213
+ return [].concat(s, y);
1214
+ }, w = function(s, y) {
1215
+ if (o(s)) {
1216
+ for (var A = [], S = 0; S < s.length; S += 1)
1217
+ A.push(y(s[S]));
1218
+ return A;
1219
+ }
1220
+ return y(s);
1221
+ };
1222
+ return Dr = {
1223
+ arrayToObject: v,
1224
+ assign: c,
1225
+ combine: g,
1226
+ compact: f,
1227
+ decode: p,
1228
+ encode: t,
1229
+ isBuffer: u,
1230
+ isRegExp: h,
1231
+ maybeMap: w,
1232
+ merge: b
1233
+ }, Dr;
1234
+ }
1235
+ var Fr, Wt;
1236
+ function kn() {
1237
+ if (Wt) return Fr;
1238
+ Wt = 1;
1239
+ var e = Gn(), a = /* @__PURE__ */ Zt(), o = /* @__PURE__ */ Ur(), i = Object.prototype.hasOwnProperty, d = {
1240
+ brackets: function(l) {
1241
+ return l + "[]";
1242
+ },
1243
+ comma: "comma",
1244
+ indices: function(l, s) {
1245
+ return l + "[" + s + "]";
1246
+ },
1247
+ repeat: function(l) {
1248
+ return l;
1249
+ }
1250
+ }, v = Array.isArray, b = Array.prototype.push, c = function(w, l) {
1251
+ b.apply(w, v(l) ? l : [l]);
1252
+ }, p = Date.prototype.toISOString, m = o.default, t = {
1253
+ addQueryPrefix: !1,
1254
+ allowDots: !1,
1255
+ allowEmptyArrays: !1,
1256
+ arrayFormat: "indices",
1257
+ charset: "utf-8",
1258
+ charsetSentinel: !1,
1259
+ commaRoundTrip: !1,
1260
+ delimiter: "&",
1261
+ encode: !0,
1262
+ encodeDotInKeys: !1,
1263
+ encoder: a.encode,
1264
+ encodeValuesOnly: !1,
1265
+ filter: void 0,
1266
+ format: m,
1267
+ formatter: o.formatters[m],
1268
+ // deprecated
1269
+ indices: !1,
1270
+ serializeDate: function(l) {
1271
+ return p.call(l);
1272
+ },
1273
+ skipNulls: !1,
1274
+ strictNullHandling: !1
1275
+ }, f = function(l) {
1276
+ return typeof l == "string" || typeof l == "number" || typeof l == "boolean" || typeof l == "symbol" || typeof l == "bigint";
1277
+ }, h = {}, u = function w(l, s, y, A, S, O, E, P, R, N, q, M, $, G, U, K, re, te) {
1278
+ for (var _ = l, z = te, ne = 0, ye = !1; (z = z.get(h)) !== void 0 && !ye; ) {
1279
+ var oe = z.get(l);
1280
+ if (ne += 1, typeof oe < "u") {
1281
+ if (oe === ne)
1282
+ throw new RangeError("Cyclic object value");
1283
+ ye = !0;
1284
+ }
1285
+ typeof z.get(h) > "u" && (ne = 0);
1286
+ }
1287
+ if (typeof N == "function" ? _ = N(s, _) : _ instanceof Date ? _ = $(_) : y === "comma" && v(_) && (_ = a.maybeMap(_, function(J) {
1288
+ return J instanceof Date ? $(J) : J;
1289
+ })), _ === null) {
1290
+ if (O)
1291
+ return R && !K ? R(s, t.encoder, re, "key", G) : s;
1292
+ _ = "";
1293
+ }
1294
+ if (f(_) || a.isBuffer(_)) {
1295
+ if (R) {
1296
+ var ie = K ? s : R(s, t.encoder, re, "key", G);
1297
+ return [U(ie) + "=" + U(R(_, t.encoder, re, "value", G))];
1298
+ }
1299
+ return [U(s) + "=" + U(String(_))];
1300
+ }
1301
+ var ue = [];
1302
+ if (typeof _ > "u")
1303
+ return ue;
1304
+ var ae;
1305
+ if (y === "comma" && v(_))
1306
+ K && R && (_ = a.maybeMap(_, R)), ae = [{ value: _.length > 0 ? _.join(",") || null : void 0 }];
1307
+ else if (v(N))
1308
+ ae = N;
1309
+ else {
1310
+ var Q = Object.keys(_);
1311
+ ae = q ? Q.sort(q) : Q;
1312
+ }
1313
+ var fe = P ? String(s).replace(/\./g, "%2E") : String(s), le = A && v(_) && _.length === 1 ? fe + "[]" : fe;
1314
+ if (S && v(_) && _.length === 0)
1315
+ return le + "[]";
1316
+ for (var W = 0; W < ae.length; ++W) {
1317
+ var D = ae[W], B = typeof D == "object" && D && typeof D.value < "u" ? D.value : _[D];
1318
+ if (!(E && B === null)) {
1319
+ var x = M && P ? String(D).replace(/\./g, "%2E") : String(D), L = v(_) ? typeof y == "function" ? y(le, x) : le : le + (M ? "." + x : "[" + x + "]");
1320
+ te.set(l, ne);
1321
+ var k = e();
1322
+ k.set(h, te), c(ue, w(
1323
+ B,
1324
+ L,
1325
+ y,
1326
+ A,
1327
+ S,
1328
+ O,
1329
+ E,
1330
+ P,
1331
+ y === "comma" && K && v(_) ? null : R,
1332
+ N,
1333
+ q,
1334
+ M,
1335
+ $,
1336
+ G,
1337
+ U,
1338
+ K,
1339
+ re,
1340
+ k
1341
+ ));
1342
+ }
1343
+ }
1344
+ return ue;
1345
+ }, g = function(l) {
1346
+ if (!l)
1347
+ return t;
1348
+ if (typeof l.allowEmptyArrays < "u" && typeof l.allowEmptyArrays != "boolean")
1349
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1350
+ if (typeof l.encodeDotInKeys < "u" && typeof l.encodeDotInKeys != "boolean")
1351
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
1352
+ if (l.encoder !== null && typeof l.encoder < "u" && typeof l.encoder != "function")
1353
+ throw new TypeError("Encoder has to be a function.");
1354
+ var s = l.charset || t.charset;
1355
+ if (typeof l.charset < "u" && l.charset !== "utf-8" && l.charset !== "iso-8859-1")
1356
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1357
+ var y = o.default;
1358
+ if (typeof l.format < "u") {
1359
+ if (!i.call(o.formatters, l.format))
1360
+ throw new TypeError("Unknown format option provided.");
1361
+ y = l.format;
1362
+ }
1363
+ var A = o.formatters[y], S = t.filter;
1364
+ (typeof l.filter == "function" || v(l.filter)) && (S = l.filter);
1365
+ var O;
1366
+ if (l.arrayFormat in d ? O = l.arrayFormat : "indices" in l ? O = l.indices ? "indices" : "repeat" : O = t.arrayFormat, "commaRoundTrip" in l && typeof l.commaRoundTrip != "boolean")
1367
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
1368
+ var E = typeof l.allowDots > "u" ? l.encodeDotInKeys === !0 ? !0 : t.allowDots : !!l.allowDots;
1369
+ return {
1370
+ addQueryPrefix: typeof l.addQueryPrefix == "boolean" ? l.addQueryPrefix : t.addQueryPrefix,
1371
+ allowDots: E,
1372
+ allowEmptyArrays: typeof l.allowEmptyArrays == "boolean" ? !!l.allowEmptyArrays : t.allowEmptyArrays,
1373
+ arrayFormat: O,
1374
+ charset: s,
1375
+ charsetSentinel: typeof l.charsetSentinel == "boolean" ? l.charsetSentinel : t.charsetSentinel,
1376
+ commaRoundTrip: !!l.commaRoundTrip,
1377
+ delimiter: typeof l.delimiter > "u" ? t.delimiter : l.delimiter,
1378
+ encode: typeof l.encode == "boolean" ? l.encode : t.encode,
1379
+ encodeDotInKeys: typeof l.encodeDotInKeys == "boolean" ? l.encodeDotInKeys : t.encodeDotInKeys,
1380
+ encoder: typeof l.encoder == "function" ? l.encoder : t.encoder,
1381
+ encodeValuesOnly: typeof l.encodeValuesOnly == "boolean" ? l.encodeValuesOnly : t.encodeValuesOnly,
1382
+ filter: S,
1383
+ format: y,
1384
+ formatter: A,
1385
+ serializeDate: typeof l.serializeDate == "function" ? l.serializeDate : t.serializeDate,
1386
+ skipNulls: typeof l.skipNulls == "boolean" ? l.skipNulls : t.skipNulls,
1387
+ sort: typeof l.sort == "function" ? l.sort : null,
1388
+ strictNullHandling: typeof l.strictNullHandling == "boolean" ? l.strictNullHandling : t.strictNullHandling
1389
+ };
1390
+ };
1391
+ return Fr = function(w, l) {
1392
+ var s = w, y = g(l), A, S;
1393
+ typeof y.filter == "function" ? (S = y.filter, s = S("", s)) : v(y.filter) && (S = y.filter, A = S);
1394
+ var O = [];
1395
+ if (typeof s != "object" || s === null)
1396
+ return "";
1397
+ var E = d[y.arrayFormat], P = E === "comma" && y.commaRoundTrip;
1398
+ A || (A = Object.keys(s)), y.sort && A.sort(y.sort);
1399
+ for (var R = e(), N = 0; N < A.length; ++N) {
1400
+ var q = A[N], M = s[q];
1401
+ y.skipNulls && M === null || c(O, u(
1402
+ M,
1403
+ q,
1404
+ E,
1405
+ P,
1406
+ y.allowEmptyArrays,
1407
+ y.strictNullHandling,
1408
+ y.skipNulls,
1409
+ y.encodeDotInKeys,
1410
+ y.encode ? y.encoder : null,
1411
+ y.filter,
1412
+ y.sort,
1413
+ y.allowDots,
1414
+ y.serializeDate,
1415
+ y.format,
1416
+ y.formatter,
1417
+ y.encodeValuesOnly,
1418
+ y.charset,
1419
+ R
1420
+ ));
1421
+ }
1422
+ var $ = O.join(y.delimiter), G = y.addQueryPrefix === !0 ? "?" : "";
1423
+ return y.charsetSentinel && (y.charset === "iso-8859-1" ? G += "utf8=%26%2310003%3B&" : G += "utf8=%E2%9C%93&"), $.length > 0 ? G + $ : "";
1424
+ }, Fr;
1425
+ }
1426
+ var Nr, Gt;
1427
+ function jn() {
1428
+ if (Gt) return Nr;
1429
+ Gt = 1;
1430
+ var e = /* @__PURE__ */ Zt(), a = Object.prototype.hasOwnProperty, o = Array.isArray, i = {
1431
+ allowDots: !1,
1432
+ allowEmptyArrays: !1,
1433
+ allowPrototypes: !1,
1434
+ allowSparse: !1,
1435
+ arrayLimit: 20,
1436
+ charset: "utf-8",
1437
+ charsetSentinel: !1,
1438
+ comma: !1,
1439
+ decodeDotInKeys: !1,
1440
+ decoder: e.decode,
1441
+ delimiter: "&",
1442
+ depth: 5,
1443
+ duplicates: "combine",
1444
+ ignoreQueryPrefix: !1,
1445
+ interpretNumericEntities: !1,
1446
+ parameterLimit: 1e3,
1447
+ parseArrays: !0,
1448
+ plainObjects: !1,
1449
+ strictDepth: !1,
1450
+ strictNullHandling: !1,
1451
+ throwOnLimitExceeded: !1
1452
+ }, d = function(h) {
1453
+ return h.replace(/&#(\d+);/g, function(u, g) {
1454
+ return String.fromCharCode(parseInt(g, 10));
1455
+ });
1456
+ }, v = function(h, u, g) {
1457
+ if (h && typeof h == "string" && u.comma && h.indexOf(",") > -1)
1458
+ return h.split(",");
1459
+ if (u.throwOnLimitExceeded && g >= u.arrayLimit)
1460
+ throw new RangeError("Array limit exceeded. Only " + u.arrayLimit + " element" + (u.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1461
+ return h;
1462
+ }, b = "utf8=%26%2310003%3B", c = "utf8=%E2%9C%93", p = function(u, g) {
1463
+ var w = { __proto__: null }, l = g.ignoreQueryPrefix ? u.replace(/^\?/, "") : u;
1464
+ l = l.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1465
+ var s = g.parameterLimit === 1 / 0 ? void 0 : g.parameterLimit, y = l.split(
1466
+ g.delimiter,
1467
+ g.throwOnLimitExceeded ? s + 1 : s
1468
+ );
1469
+ if (g.throwOnLimitExceeded && y.length > s)
1470
+ throw new RangeError("Parameter limit exceeded. Only " + s + " parameter" + (s === 1 ? "" : "s") + " allowed.");
1471
+ var A = -1, S, O = g.charset;
1472
+ if (g.charsetSentinel)
1473
+ for (S = 0; S < y.length; ++S)
1474
+ y[S].indexOf("utf8=") === 0 && (y[S] === c ? O = "utf-8" : y[S] === b && (O = "iso-8859-1"), A = S, S = y.length);
1475
+ for (S = 0; S < y.length; ++S)
1476
+ if (S !== A) {
1477
+ var E = y[S], P = E.indexOf("]="), R = P === -1 ? E.indexOf("=") : P + 1, N, q;
1478
+ R === -1 ? (N = g.decoder(E, i.decoder, O, "key"), q = g.strictNullHandling ? null : "") : (N = g.decoder(E.slice(0, R), i.decoder, O, "key"), q = e.maybeMap(
1479
+ v(
1480
+ E.slice(R + 1),
1481
+ g,
1482
+ o(w[N]) ? w[N].length : 0
1483
+ ),
1484
+ function($) {
1485
+ return g.decoder($, i.decoder, O, "value");
1486
+ }
1487
+ )), q && g.interpretNumericEntities && O === "iso-8859-1" && (q = d(String(q))), E.indexOf("[]=") > -1 && (q = o(q) ? [q] : q);
1488
+ var M = a.call(w, N);
1489
+ M && g.duplicates === "combine" ? w[N] = e.combine(w[N], q) : (!M || g.duplicates === "last") && (w[N] = q);
1490
+ }
1491
+ return w;
1492
+ }, m = function(h, u, g, w) {
1493
+ var l = 0;
1494
+ if (h.length > 0 && h[h.length - 1] === "[]") {
1495
+ var s = h.slice(0, -1).join("");
1496
+ l = Array.isArray(u) && u[s] ? u[s].length : 0;
1497
+ }
1498
+ for (var y = w ? u : v(u, g, l), A = h.length - 1; A >= 0; --A) {
1499
+ var S, O = h[A];
1500
+ if (O === "[]" && g.parseArrays)
1501
+ S = g.allowEmptyArrays && (y === "" || g.strictNullHandling && y === null) ? [] : e.combine([], y);
1502
+ else {
1503
+ S = g.plainObjects ? { __proto__: null } : {};
1504
+ var E = O.charAt(0) === "[" && O.charAt(O.length - 1) === "]" ? O.slice(1, -1) : O, P = g.decodeDotInKeys ? E.replace(/%2E/g, ".") : E, R = parseInt(P, 10);
1505
+ !g.parseArrays && P === "" ? S = { 0: y } : !isNaN(R) && O !== P && String(R) === P && R >= 0 && g.parseArrays && R <= g.arrayLimit ? (S = [], S[R] = y) : P !== "__proto__" && (S[P] = y);
1506
+ }
1507
+ y = S;
1508
+ }
1509
+ return y;
1510
+ }, t = function(u, g, w, l) {
1511
+ if (u) {
1512
+ var s = w.allowDots ? u.replace(/\.([^.[]+)/g, "[$1]") : u, y = /(\[[^[\]]*])/, A = /(\[[^[\]]*])/g, S = w.depth > 0 && y.exec(s), O = S ? s.slice(0, S.index) : s, E = [];
1513
+ if (O) {
1514
+ if (!w.plainObjects && a.call(Object.prototype, O) && !w.allowPrototypes)
1515
+ return;
1516
+ E.push(O);
1517
+ }
1518
+ for (var P = 0; w.depth > 0 && (S = A.exec(s)) !== null && P < w.depth; ) {
1519
+ if (P += 1, !w.plainObjects && a.call(Object.prototype, S[1].slice(1, -1)) && !w.allowPrototypes)
1520
+ return;
1521
+ E.push(S[1]);
1522
+ }
1523
+ if (S) {
1524
+ if (w.strictDepth === !0)
1525
+ throw new RangeError("Input depth exceeded depth option of " + w.depth + " and strictDepth is true");
1526
+ E.push("[" + s.slice(S.index) + "]");
1527
+ }
1528
+ return m(E, g, w, l);
1529
+ }
1530
+ }, f = function(u) {
1531
+ if (!u)
1532
+ return i;
1533
+ if (typeof u.allowEmptyArrays < "u" && typeof u.allowEmptyArrays != "boolean")
1534
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1535
+ if (typeof u.decodeDotInKeys < "u" && typeof u.decodeDotInKeys != "boolean")
1536
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
1537
+ if (u.decoder !== null && typeof u.decoder < "u" && typeof u.decoder != "function")
1538
+ throw new TypeError("Decoder has to be a function.");
1539
+ if (typeof u.charset < "u" && u.charset !== "utf-8" && u.charset !== "iso-8859-1")
1540
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1541
+ if (typeof u.throwOnLimitExceeded < "u" && typeof u.throwOnLimitExceeded != "boolean")
1542
+ throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
1543
+ var g = typeof u.charset > "u" ? i.charset : u.charset, w = typeof u.duplicates > "u" ? i.duplicates : u.duplicates;
1544
+ if (w !== "combine" && w !== "first" && w !== "last")
1545
+ throw new TypeError("The duplicates option must be either combine, first, or last");
1546
+ var l = typeof u.allowDots > "u" ? u.decodeDotInKeys === !0 ? !0 : i.allowDots : !!u.allowDots;
1547
+ return {
1548
+ allowDots: l,
1549
+ allowEmptyArrays: typeof u.allowEmptyArrays == "boolean" ? !!u.allowEmptyArrays : i.allowEmptyArrays,
1550
+ allowPrototypes: typeof u.allowPrototypes == "boolean" ? u.allowPrototypes : i.allowPrototypes,
1551
+ allowSparse: typeof u.allowSparse == "boolean" ? u.allowSparse : i.allowSparse,
1552
+ arrayLimit: typeof u.arrayLimit == "number" ? u.arrayLimit : i.arrayLimit,
1553
+ charset: g,
1554
+ charsetSentinel: typeof u.charsetSentinel == "boolean" ? u.charsetSentinel : i.charsetSentinel,
1555
+ comma: typeof u.comma == "boolean" ? u.comma : i.comma,
1556
+ decodeDotInKeys: typeof u.decodeDotInKeys == "boolean" ? u.decodeDotInKeys : i.decodeDotInKeys,
1557
+ decoder: typeof u.decoder == "function" ? u.decoder : i.decoder,
1558
+ delimiter: typeof u.delimiter == "string" || e.isRegExp(u.delimiter) ? u.delimiter : i.delimiter,
1559
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
1560
+ depth: typeof u.depth == "number" || u.depth === !1 ? +u.depth : i.depth,
1561
+ duplicates: w,
1562
+ ignoreQueryPrefix: u.ignoreQueryPrefix === !0,
1563
+ interpretNumericEntities: typeof u.interpretNumericEntities == "boolean" ? u.interpretNumericEntities : i.interpretNumericEntities,
1564
+ parameterLimit: typeof u.parameterLimit == "number" ? u.parameterLimit : i.parameterLimit,
1565
+ parseArrays: u.parseArrays !== !1,
1566
+ plainObjects: typeof u.plainObjects == "boolean" ? u.plainObjects : i.plainObjects,
1567
+ strictDepth: typeof u.strictDepth == "boolean" ? !!u.strictDepth : i.strictDepth,
1568
+ strictNullHandling: typeof u.strictNullHandling == "boolean" ? u.strictNullHandling : i.strictNullHandling,
1569
+ throwOnLimitExceeded: typeof u.throwOnLimitExceeded == "boolean" ? u.throwOnLimitExceeded : !1
1570
+ };
1571
+ };
1572
+ return Nr = function(h, u) {
1573
+ var g = f(u);
1574
+ if (h === "" || h === null || typeof h > "u")
1575
+ return g.plainObjects ? { __proto__: null } : {};
1576
+ for (var w = typeof h == "string" ? p(h, g) : h, l = g.plainObjects ? { __proto__: null } : {}, s = Object.keys(w), y = 0; y < s.length; ++y) {
1577
+ var A = s[y], S = t(A, w[A], g, typeof h == "string");
1578
+ l = e.merge(l, S, g);
1579
+ }
1580
+ return g.allowSparse === !0 ? l : e.compact(l);
1581
+ }, Nr;
1582
+ }
1583
+ var Mr, kt;
1584
+ function Hn() {
1585
+ if (kt) return Mr;
1586
+ kt = 1;
1587
+ var e = /* @__PURE__ */ kn(), a = /* @__PURE__ */ jn(), o = /* @__PURE__ */ Ur();
1588
+ return Mr = {
1589
+ formats: o,
1590
+ parse: a,
1591
+ stringify: e
1592
+ }, Mr;
1593
+ }
1594
+ var en = /* @__PURE__ */ Hn();
1595
+ function ee(e) {
1596
+ return encodeURIComponent(e).replace(
1597
+ /[!'()*]/g,
1598
+ (a) => `%${a.charCodeAt(0).toString(16)}`
1599
+ );
1600
+ }
1601
+ function Fe(e) {
1602
+ return !isNaN(Date.parse(e));
1603
+ }
1604
+ function Kn(e) {
1605
+ const a = new URLSearchParams();
1606
+ for (const [o, i] of e)
1607
+ a.append(o, i);
1608
+ return a.toString();
1609
+ }
1610
+ function zn(e) {
1611
+ const a = Kn(e);
1612
+ return en.parse(a);
1613
+ }
1614
+ function Vn(e) {
1615
+ return Array.from(new Set(e));
1616
+ }
1617
+ function Lr(e, a) {
1618
+ const o = { ...e };
1619
+ for (const i in a)
1620
+ if (Object.prototype.hasOwnProperty.call(a, i)) {
1621
+ const d = a[i], v = e[i];
1622
+ if (d === void 0)
1623
+ continue;
1624
+ jt(d) && jt(v) ? o[i] = Lr(v, d) : o[i] = d;
1625
+ }
1626
+ return o;
1627
+ }
1628
+ function jt(e) {
1629
+ if (typeof e != "object" || e === null || Array.isArray(e) || e instanceof Date || e instanceof RegExp)
1630
+ return !1;
1631
+ const a = Object.getPrototypeOf(e);
1632
+ return a === null || a === Object.prototype;
1633
+ }
1634
+ const rn = {
1635
+ bid: "bid",
1636
+ cid: "cid",
1637
+ eid: "eid",
1638
+ uid: "uid",
1639
+ utid: "utid",
1640
+ tag: "tag",
1641
+ field: "field",
1642
+ span: "-",
1643
+ page: "page",
1644
+ order: "order",
1645
+ limit: "limit",
1646
+ keyword: "keyword",
1647
+ admin: "admin",
1648
+ tpl: "tpl",
1649
+ api: "api"
1650
+ };
1651
+ function Ae(e) {
1652
+ function a(p) {
1653
+ return p < 10 ? `0${p}` : p;
1654
+ }
1655
+ const o = e.getFullYear(), i = a(e.getMonth() + 1), d = a(e.getDate()), v = a(e.getHours()), b = a(e.getMinutes()), c = a(e.getSeconds());
1656
+ return `${o}-${i}-${d} ${v}:${b}:${c}`;
1657
+ }
1658
+ function tn(e) {
1659
+ e.startsWith("/") && (e = e.substring(1));
1660
+ const a = [];
1661
+ let o = "", i = !1;
1662
+ for (let d = 0; d < e.length; d++) {
1663
+ const v = e[d];
1664
+ v === "\\" && !i ? (i = !0, o += v) : v === "/" && !i ? (a.push(o), o = "") : (o += v, i = !1);
1665
+ }
1666
+ return o.length > 0 && a.push(o), a;
1667
+ }
1668
+ function Qn(e) {
1669
+ return "blog" in e || "category" in e || "entry" in e || "user" in e || "unit" in e;
1670
+ }
1671
+ function Jn(e) {
1672
+ return {
1673
+ blog: e.bid,
1674
+ category: e.cid,
1675
+ entry: e.eid,
1676
+ user: e.uid,
1677
+ unit: e.utid,
1678
+ tag: e.tag,
1679
+ field: e.field,
1680
+ span: e.span,
1681
+ date: e.date,
1682
+ page: e.page,
1683
+ order: e.order,
1684
+ limit: e.limit,
1685
+ keyword: e.keyword,
1686
+ admin: e.admin,
1687
+ tpl: e.tpl,
1688
+ api: e.api,
1689
+ searchParams: e.searchParams
1690
+ };
1691
+ }
1692
+ function Yn(e) {
1693
+ return e < 10 ? `0${e}` : e;
1694
+ }
1695
+ const Xn = {
1696
+ segments: rn,
1697
+ apiVersion: "v2"
1698
+ };
1699
+ function ia(e, a = {}) {
1700
+ const o = Qn(e) ? e : Jn(e), { segments: i, apiVersion: d } = Lr(
1701
+ Xn,
1702
+ a
1703
+ );
1704
+ let v = [
1705
+ "blog",
1706
+ "admin",
1707
+ "category",
1708
+ "entry",
1709
+ "user",
1710
+ "unit",
1711
+ "span",
1712
+ "date",
1713
+ "keyword",
1714
+ "tag",
1715
+ "field",
1716
+ "page",
1717
+ "order",
1718
+ "limit",
1719
+ "tpl",
1720
+ "api"
1721
+ ].reduce((c, p) => {
1722
+ const m = o[p];
1723
+ if (m == null)
1724
+ return c;
1725
+ if (p === "blog") {
1726
+ const t = o[p];
1727
+ return _e(t) ? isNaN(t) || t === 0 ? c : `${c}/${i.bid}/${t}` : t === "" ? c : `${c}/${t.split("/").map(ee).join("/")}`;
1728
+ }
1729
+ if (p === "category") {
1730
+ const t = o[p];
1731
+ return _e(t) ? isNaN(t) || t === 0 ? c : `${c}/${i.cid}/${t}` : Array.isArray(t) ? `${c}/${t.map(ee).join("/")}` : t === "" ? c : `${c}/${ee(t)}`;
1732
+ }
1733
+ if (p === "entry") {
1734
+ const t = o[p];
1735
+ return _e(t) ? isNaN(t) || t === 0 ? c : `${c}/${i.eid}/${t}` : t === "" ? c : `${c}/${ee(t)}`;
1736
+ }
1737
+ if (p === "user") {
1738
+ const t = o[p];
1739
+ return isNaN(t) || t === 0 ? c : `${c}/${i.uid}/${t}`;
1740
+ }
1741
+ if (p === "unit") {
1742
+ const t = o[p];
1743
+ return t === "" ? c : `${c}/${i.utid}/${t}`;
1744
+ }
1745
+ if (p === "field") {
1746
+ const t = o[p], f = typeof t != "string" ? t.toString() : t;
1747
+ return f === "" ? c : `${c}/${i.field}/${f.split("/").map(ee).join("/")}`;
1748
+ }
1749
+ if (p === "span") {
1750
+ const t = o[p], { start: f, end: h } = {
1751
+ start: "1000-01-01 00:00:00",
1752
+ end: "9999-12-31 23:59:59",
1753
+ ...t
1754
+ };
1755
+ if (Yr(f) && !Fe(f))
1756
+ throw new Error(`Invalid start date: ${f}`);
1757
+ if (Yr(h) && !Fe(h))
1758
+ throw new Error(`Invalid end date: ${h}`);
1759
+ return `${c}/${ee(Ae(new Date(f)))}/${i.span}/${ee(Ae(new Date(h)))}`;
1760
+ }
1761
+ if (p === "date") {
1762
+ if (o.span != null)
1763
+ return c;
1764
+ const t = o[p], { year: f, month: h, day: u } = t;
1765
+ return [f, h, u].reduce((g, w) => w == null || isNaN(w) ? g : `${g}/${Yn(w)}`, c);
1766
+ }
1767
+ if (p === "page") {
1768
+ const t = o[p];
1769
+ return isNaN(t) || t === 0 || t === 1 ? c : `${c}/${i.page}/${t}`;
1770
+ }
1771
+ if (p === "tpl") {
1772
+ const t = o[p];
1773
+ return t === "" ? c : `${c}/${i.tpl}/${t.split("/").map(ee).join("/")}`;
1774
+ }
1775
+ if (p === "api") {
1776
+ const t = o[p];
1777
+ if (t === "")
1778
+ return c;
1779
+ const f = d === "v1" ? "" : `/${d}`;
1780
+ return `${c}/${i.api}${f}/${ee(t)}`;
1781
+ }
1782
+ return Array.isArray(m) ? m.length > 0 ? `${c}/${i[p]}/${m.map(ee).join("/")}` : c : m !== "" ? _e(m) && isNaN(m) ? c : `${c}/${i[p]}/${ee(
1783
+ m
1784
+ )}` : c;
1785
+ }, "");
1786
+ /\.[^/.]+$/.test(v) || (v += "/");
1787
+ const b = en.stringify(o.searchParams, { format: "RFC1738" });
1788
+ return b.length > 0 && (v += `?${b}`), v.startsWith("/") ? v.slice(1) : v;
1789
+ }
1790
+ function $e(e) {
1791
+ return typeof e == "string" && ["and", "or"].includes(e);
1792
+ }
1793
+ function De(e) {
1794
+ return typeof e == "string" && [
1795
+ "eq",
1796
+ "neq",
1797
+ "gt",
1798
+ "lt",
1799
+ "gte",
1800
+ "lte",
1801
+ "lk",
1802
+ "nlk",
1803
+ "re",
1804
+ "nre",
1805
+ "em",
1806
+ "nem"
1807
+ ].includes(e);
1808
+ }
1809
+ function Tr(e) {
1810
+ return typeof e == "string" && ["_and_", "_or_"].includes(e);
1811
+ }
1812
+ function nn(e) {
1813
+ return typeof e == "object" && e !== null && De(e.operator) && (typeof e.value == "string" || typeof e.value == "number") && $e(e.connector);
1814
+ }
1815
+ function ua(e) {
1816
+ return !(typeof e != "object" || e == null || typeof e.key != "string" || !Array.isArray(e.filters) || !e.filters.every(nn) || e.separator !== void 0 && !Tr(e.separator));
1817
+ }
1818
+ class we {
1819
+ fields = [];
1820
+ constructor(a = []) {
1821
+ this.fields = a;
1822
+ }
1823
+ push(a) {
1824
+ this.fields.push(a);
1825
+ }
1826
+ pop() {
1827
+ return this.fields.pop();
1828
+ }
1829
+ shift() {
1830
+ return this.fields.shift();
1831
+ }
1832
+ unshift(a) {
1833
+ this.fields.unshift(a);
1834
+ }
1835
+ getFields() {
1836
+ return this.fields;
1837
+ }
1838
+ toString() {
1839
+ const a = [];
1840
+ return this.fields.forEach((o) => {
1841
+ const { key: i, filters: d, separator: v } = o, b = d.map((u) => u.value), c = d.map((u) => u.operator), p = d.map((u) => u.connector), m = Math.max(
1842
+ b.length,
1843
+ c.length,
1844
+ p.length
1845
+ );
1846
+ if (m === 0)
1847
+ return;
1848
+ let t = 0;
1849
+ const f = [];
1850
+ for (let u = 0; u < m; u++) {
1851
+ const g = b[u] ?? "", w = c[u] ?? "", l = p[u] ?? "";
1852
+ switch (w) {
1853
+ case "eq":
1854
+ case "neq":
1855
+ case "lt":
1856
+ case "lte":
1857
+ case "gt":
1858
+ case "gte":
1859
+ case "lk":
1860
+ case "nlk":
1861
+ case "re":
1862
+ case "nre":
1863
+ if (g !== "") {
1864
+ for (let s = 0; s < t; s++)
1865
+ f.push("");
1866
+ t = 0, l === "or" ? (w !== "eq" && (f.push("or"), f.push(w)), f.push(String(g))) : (f.push(w), f.push(String(g)));
1867
+ } else
1868
+ t++;
1869
+ break;
1870
+ case "em":
1871
+ case "nem":
1872
+ for (let s = 0; s < t; s++)
1873
+ f.push("");
1874
+ t = 0, l === "or" && f.push("or"), f.push(w);
1875
+ break;
1876
+ default:
1877
+ f.push("");
1878
+ }
1879
+ }
1880
+ const h = [];
1881
+ f.length > 0 && (h.push(v ?? "_and_"), h.push(i), f.forEach((u) => {
1882
+ h.push(u);
1883
+ }), a.push(...h));
1884
+ }), a.length > 0 && ["_or_", "_and_", "and"].includes(a[0]) && a.shift(), a.join("/");
1885
+ }
1886
+ static fromString(a) {
1887
+ const o = tn(a);
1888
+ let i = {}, d = null, v = null, b = null, c = null, p = null, m = null;
1889
+ const t = [];
1890
+ for (; o.length > 0; ) {
1891
+ const f = o.shift();
1892
+ if (f !== void 0) {
1893
+ if (d === null) {
1894
+ d = f, m != null && Tr(m) ? p = m : p = "_and_", t.push({
1895
+ key: d,
1896
+ filters: [],
1897
+ separator: p
1898
+ }), m = null, p = null;
1899
+ continue;
1900
+ }
1901
+ if (f === "" && (v === null ? (v = null, b = null) : b === null && (b = "eq")), b === null) {
1902
+ switch (f) {
1903
+ case "eq":
1904
+ b = f, v = "or";
1905
+ break;
1906
+ case "neq":
1907
+ case "lt":
1908
+ case "lte":
1909
+ case "gt":
1910
+ case "gte":
1911
+ case "lk":
1912
+ case "nlk":
1913
+ case "re":
1914
+ case "nre":
1915
+ b = f;
1916
+ break;
1917
+ case "em":
1918
+ case "nem":
1919
+ b = f, c = "";
1920
+ break;
1921
+ }
1922
+ if (b !== null && (v === null && (v = "and"), c === null))
1923
+ continue;
1924
+ }
1925
+ if (v === null)
1926
+ if ($e(f)) {
1927
+ v = f;
1928
+ continue;
1929
+ } else
1930
+ v = "or", b === null && (b = "eq"), c = f;
1931
+ if (c === null)
1932
+ b === null && (b = "eq"), c = f;
1933
+ else if (["and", "_and_", "_or_"].includes(f)) {
1934
+ m = f === "and" ? "_and_" : f, d = null, v = null, b = null, c = null;
1935
+ continue;
1936
+ }
1937
+ if (d !== "") {
1938
+ De(b) && (i = {
1939
+ ...i,
1940
+ operator: b
1941
+ }), c !== null && (i = {
1942
+ ...i,
1943
+ value: c
1944
+ }), $e(v) && (i = {
1945
+ ...i,
1946
+ connector: v
1947
+ });
1948
+ const h = t.find((u) => u.key === d);
1949
+ h !== void 0 && nn(i) && (h.filters = [...h.filters, i]);
1950
+ }
1951
+ v = null, b = null, c = null;
1952
+ }
1953
+ }
1954
+ return new we(t);
1955
+ }
1956
+ static fromFormData(a) {
1957
+ const o = zn(a);
1958
+ if (!Array.isArray(o.field))
1959
+ return new we();
1960
+ if (!o.field.every((v) => typeof v == "string"))
1961
+ return new we();
1962
+ const d = Vn(
1963
+ o.field.filter((v) => v !== "")
1964
+ ).map((v) => {
1965
+ const b = `${v}@operator`, c = `${v}@connector`, p = `${v}@separator`, m = v, t = Array.isArray(o[b]) ? o[b] : [], f = Array.isArray(o[c]) ? o[c] : [], h = Array.isArray(o[m]) ? o[m] : [], u = Tr(o[p]) ? o[p] : "_and_", g = Math.max(
1966
+ t.length,
1967
+ f.length,
1968
+ h.length
1969
+ );
1970
+ if (g === 0)
1971
+ return { key: v, filters: [] };
1972
+ let w = "and", l = "eq";
1973
+ f.length === 0 && t.length === 0 && (w = "or"), f.length > 0 && $e(f[0]) && (w = f[0]), t.length > 0 && De(t[0]) && (l = t[0]);
1974
+ const s = [];
1975
+ for (let y = 0; y < g; y++) {
1976
+ const A = h[y], S = De(t[y]) ? t[y] : l, O = $e(f[y]) ? f[y] : w;
1977
+ s.push({
1978
+ value: A,
1979
+ operator: S,
1980
+ connector: O
1981
+ });
1982
+ }
1983
+ return {
1984
+ key: v,
1985
+ filters: s,
1986
+ separator: u
1987
+ };
1988
+ });
1989
+ return new we(d);
1990
+ }
1991
+ }
1992
+ function xr(e, a, o) {
1993
+ const i = [];
1994
+ for (let d = a; d < e.length && !o.includes(e[d]); d++)
1995
+ i.push(e[d]);
1996
+ return i.join("/");
1997
+ }
1998
+ function Zn(e, a) {
1999
+ const o = Fe(e) ? Ae(new Date(e)) : void 0, i = Fe(a) ? Ae(new Date(a)) : void 0;
2000
+ return [o, i];
2001
+ }
2002
+ function ea(e) {
2003
+ const a = parseInt(e, 10);
2004
+ return a >= 1e3 && a <= 9999;
2005
+ }
2006
+ function ra(e) {
2007
+ const a = parseInt(e, 10);
2008
+ return a >= 1 && a <= 12;
2009
+ }
2010
+ function ta(e) {
2011
+ const a = parseInt(e, 10);
2012
+ return a >= 1 && a <= 31;
2013
+ }
2014
+ function na(e) {
2015
+ let a = new Date(1e3, 0, 1, 0, 0, 0), o = new Date(9999, 11, 31, 23, 59, 59);
2016
+ return e.date !== void 0 && (a = new Date(
2017
+ e.date.year,
2018
+ (e.date.month ?? 1) - 1,
2019
+ e.date.day ?? 1
2020
+ ), o = new Date(
2021
+ e.date.year,
2022
+ (e.date.month ?? 12) - 1,
2023
+ e.date.day ?? 31,
2024
+ 23,
2025
+ 59,
2026
+ 59
2027
+ )), { start: Ae(a), end: Ae(o) };
2028
+ }
2029
+ const aa = {
2030
+ segments: rn
2031
+ };
2032
+ function fa(e, a = {}) {
2033
+ const { segments: o } = Lr(
2034
+ aa,
2035
+ a
2036
+ ), i = tn(e).filter((p) => p), d = {}, v = [], b = Object.keys(o), c = Object.values(o);
2037
+ for (let p = 0; p < i.length; p++) {
2038
+ const m = i[p];
2039
+ if (c.includes(m)) {
2040
+ const t = b.find(
2041
+ (f) => o[f] === m
2042
+ );
2043
+ if (t !== void 0) {
2044
+ const f = i[p + 1];
2045
+ if (f !== void 0)
2046
+ switch (t) {
2047
+ case "bid":
2048
+ case "uid":
2049
+ case "cid":
2050
+ case "eid":
2051
+ case "page":
2052
+ case "limit":
2053
+ d[t] = parseInt(f, 10), p++;
2054
+ break;
2055
+ case "utid":
2056
+ case "admin":
2057
+ case "keyword":
2058
+ case "order":
2059
+ d[t] = f, p++;
2060
+ break;
2061
+ case "api": {
2062
+ if (/^v\d+$/.test(f)) {
2063
+ d.apiVersion = f;
2064
+ const h = i[p + 2];
2065
+ h !== void 0 && (d.api = h, p += 2);
2066
+ } else
2067
+ d.apiVersion = "v1", d.api = f, p++;
2068
+ break;
2069
+ }
2070
+ case "tpl":
2071
+ d.tpl = xr(i, p + 1, c), p += d.tpl.split("/").length;
2072
+ break;
2073
+ case "field": {
2074
+ const h = xr(i, p + 1, c);
2075
+ d.field = we.fromString(h), p += h.split("/").length;
2076
+ break;
2077
+ }
2078
+ case "tag":
2079
+ d.tag = xr(i, p + 1, c).split("/").map((h) => h.trim()), p += d.tag.length;
2080
+ break;
2081
+ case "span": {
2082
+ const [h, u] = Zn(i[p - 1], f);
2083
+ h !== void 0 && u !== void 0 && (d.span = { start: h, end: u }, v.pop(), p++);
2084
+ break;
2085
+ }
2086
+ }
2087
+ }
2088
+ } else
2089
+ v.push(m);
2090
+ }
2091
+ for (let p = 0; p < v.length; p++) {
2092
+ const m = v[p];
2093
+ if (ea(m)) {
2094
+ const t = m, f = v[p + 1];
2095
+ if (f !== void 0 && ra(f)) {
2096
+ const h = v[p + 2];
2097
+ if (h !== void 0 && ta(h)) {
2098
+ d.date = {
2099
+ year: parseInt(t, 10),
2100
+ month: parseInt(f, 10),
2101
+ day: parseInt(h, 10)
2102
+ }, v.splice(p, 3);
2103
+ continue;
2104
+ }
2105
+ d.date = {
2106
+ year: parseInt(t, 10),
2107
+ month: parseInt(f, 10)
2108
+ }, v.splice(p, 2);
2109
+ continue;
2110
+ }
2111
+ d.date = { year: parseInt(t, 10) }, v.splice(p, 1);
2112
+ continue;
2113
+ }
2114
+ }
2115
+ return d.page === void 0 && (d.page = 1), d.span === void 0 && (d.span = na(d)), d.unresolvedPath = v.join("/"), d;
2116
+ }
3
2117
  export {
4
- p as acmsPath,
5
- r as parseAcmsPath
2118
+ we as AcmsFieldList,
2119
+ ia as acmsPath,
2120
+ ua as isAcmsField,
2121
+ nn as isAcmsFilter,
2122
+ $e as isConnector,
2123
+ De as isOperator,
2124
+ Tr as isSeparator,
2125
+ fa as parseAcmsPath
6
2126
  };