@nhtio/lucid-resourceful 1.20250718.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 (68) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +5 -0
  3. package/decorator_utils-1yWqd_Gg.cjs +6792 -0
  4. package/decorator_utils-1yWqd_Gg.cjs.map +1 -0
  5. package/decorator_utils-BUuBwQYK.js +6793 -0
  6. package/decorator_utils-BUuBwQYK.js.map +1 -0
  7. package/definitions-B66EPk0H.js +381 -0
  8. package/definitions-B66EPk0H.js.map +1 -0
  9. package/definitions-BrN-oCRI.cjs +380 -0
  10. package/definitions-BrN-oCRI.cjs.map +1 -0
  11. package/definitions.cjs +15 -0
  12. package/definitions.cjs.map +1 -0
  13. package/definitions.d.ts +5 -0
  14. package/definitions.mjs +15 -0
  15. package/definitions.mjs.map +1 -0
  16. package/errors-B1rr67uM.js +3004 -0
  17. package/errors-B1rr67uM.js.map +1 -0
  18. package/errors-D8jb9VxY.cjs +3000 -0
  19. package/errors-D8jb9VxY.cjs.map +1 -0
  20. package/errors.cjs +22 -0
  21. package/errors.cjs.map +1 -0
  22. package/errors.d.ts +94 -0
  23. package/errors.mjs +22 -0
  24. package/errors.mjs.map +1 -0
  25. package/index-Cv6KC1rC.cjs +670 -0
  26. package/index-Cv6KC1rC.cjs.map +1 -0
  27. package/index-DDaZ2qr2.js +671 -0
  28. package/index-DDaZ2qr2.js.map +1 -0
  29. package/index.cjs +12706 -0
  30. package/index.cjs.map +1 -0
  31. package/index.d.ts +14 -0
  32. package/index.mjs +12708 -0
  33. package/index.mjs.map +1 -0
  34. package/joi.cjs +5 -0
  35. package/joi.cjs.map +1 -0
  36. package/joi.d.ts +5 -0
  37. package/joi.mjs +5 -0
  38. package/joi.mjs.map +1 -0
  39. package/package.json +65 -0
  40. package/private/constants.d.ts +11 -0
  41. package/private/controller_factory.d.ts +1 -0
  42. package/private/data_type_schemas.d.ts +12 -0
  43. package/private/data_types.d.ts +437 -0
  44. package/private/decorator_schemas.d.ts +34 -0
  45. package/private/decorator_utils.d.ts +305 -0
  46. package/private/decorators.d.ts +209 -0
  47. package/private/helpers.d.ts +34 -0
  48. package/private/joi/bigint.d.ts +85 -0
  49. package/private/joi/index.d.ts +65 -0
  50. package/private/lucene_to_lucid_translator.d.ts +201 -0
  51. package/private/mixin.d.ts +563 -0
  52. package/private/schema_types.d.ts +157 -0
  53. package/private/type_guards.d.ts +42 -0
  54. package/private/types.d.ts +102 -0
  55. package/private/utils.d.ts +10 -0
  56. package/types.cjs +2 -0
  57. package/types.cjs.map +1 -0
  58. package/types.d.ts +28 -0
  59. package/types.mjs +2 -0
  60. package/types.mjs.map +1 -0
  61. package/utils/casters.d.ts +1 -0
  62. package/utils/consumers.d.ts +1 -0
  63. package/utils/preparers.d.ts +1 -0
  64. package/utils.cjs +50 -0
  65. package/utils.cjs.map +1 -0
  66. package/utils.d.ts +20 -0
  67. package/utils.mjs +51 -0
  68. package/utils.mjs.map +1 -0
@@ -0,0 +1,3004 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
4
+ };
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
8
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
9
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
+ var _ignoreNull, _a;
12
+ import { format as format$2 } from "node:util";
13
+ import "url";
14
+ import "path";
15
+ import "fs/promises";
16
+ import { randomUUID, randomBytes } from "crypto";
17
+ import "buffer";
18
+ var Exception = class extends Error {
19
+ constructor(message, options) {
20
+ super(message, options);
21
+ /**
22
+ * Name of the class that raised the exception.
23
+ */
24
+ __publicField(this, "name");
25
+ /**
26
+ * A status code for the error. Usually helpful when converting errors
27
+ * to HTTP responses.
28
+ */
29
+ __publicField(this, "status");
30
+ const ErrorConstructor = this.constructor;
31
+ this.name = ErrorConstructor.name;
32
+ this.message = message || ErrorConstructor.message || "";
33
+ this.status = (options == null ? void 0 : options.status) || ErrorConstructor.status || 500;
34
+ const code = (options == null ? void 0 : options.code) || ErrorConstructor.code;
35
+ if (code !== void 0) {
36
+ this.code = code;
37
+ }
38
+ const help = ErrorConstructor.help;
39
+ if (help !== void 0) {
40
+ this.help = help;
41
+ }
42
+ Error.captureStackTrace(this, ErrorConstructor);
43
+ }
44
+ get [Symbol.toStringTag]() {
45
+ return this.constructor.name;
46
+ }
47
+ toString() {
48
+ if (this.code) {
49
+ return `${this.name} [${this.code}]: ${this.message}`;
50
+ }
51
+ return `${this.name}: ${this.message}`;
52
+ }
53
+ };
54
+ function createError(message, code, status) {
55
+ var _a2;
56
+ return _a2 = class extends Exception {
57
+ constructor(args, options) {
58
+ super(format$2(message, ...args || []), options);
59
+ this.name = "Exception";
60
+ }
61
+ }, __publicField(_a2, "message", message), __publicField(_a2, "code", code), __publicField(_a2, "status", status), _a2;
62
+ }
63
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
64
+ function getDefaultExportFromCjs(x) {
65
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
66
+ }
67
+ var secureJsonParse = { exports: {} };
68
+ secureJsonParse.exports;
69
+ const hasBuffer = typeof Buffer !== "undefined";
70
+ const suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
71
+ const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
72
+ function _parse(text, reviver, options) {
73
+ if (options == null) {
74
+ if (reviver !== null && typeof reviver === "object") {
75
+ options = reviver;
76
+ reviver = void 0;
77
+ }
78
+ }
79
+ if (hasBuffer && Buffer.isBuffer(text)) {
80
+ text = text.toString();
81
+ }
82
+ if (text && text.charCodeAt(0) === 65279) {
83
+ text = text.slice(1);
84
+ }
85
+ const obj = JSON.parse(text, reviver);
86
+ if (obj === null || typeof obj !== "object") {
87
+ return obj;
88
+ }
89
+ const protoAction = options && options.protoAction || "error";
90
+ const constructorAction = options && options.constructorAction || "error";
91
+ if (protoAction === "ignore" && constructorAction === "ignore") {
92
+ return obj;
93
+ }
94
+ if (protoAction !== "ignore" && constructorAction !== "ignore") {
95
+ if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {
96
+ return obj;
97
+ }
98
+ } else if (protoAction !== "ignore" && constructorAction === "ignore") {
99
+ if (suspectProtoRx.test(text) === false) {
100
+ return obj;
101
+ }
102
+ } else {
103
+ if (suspectConstructorRx.test(text) === false) {
104
+ return obj;
105
+ }
106
+ }
107
+ return filter(obj, { protoAction, constructorAction, safe: options && options.safe });
108
+ }
109
+ function filter(obj, { protoAction = "error", constructorAction = "error", safe } = {}) {
110
+ let next = [obj];
111
+ while (next.length) {
112
+ const nodes = next;
113
+ next = [];
114
+ for (const node of nodes) {
115
+ if (protoAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "__proto__")) {
116
+ if (safe === true) {
117
+ return null;
118
+ } else if (protoAction === "error") {
119
+ throw new SyntaxError("Object contains forbidden prototype property");
120
+ }
121
+ delete node.__proto__;
122
+ }
123
+ if (constructorAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "constructor") && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
124
+ if (safe === true) {
125
+ return null;
126
+ } else if (constructorAction === "error") {
127
+ throw new SyntaxError("Object contains forbidden prototype property");
128
+ }
129
+ delete node.constructor;
130
+ }
131
+ for (const key in node) {
132
+ const value = node[key];
133
+ if (value && typeof value === "object") {
134
+ next.push(value);
135
+ }
136
+ }
137
+ }
138
+ }
139
+ return obj;
140
+ }
141
+ function parse$2(text, reviver, options) {
142
+ const { stackTraceLimit } = Error;
143
+ Error.stackTraceLimit = 0;
144
+ try {
145
+ return _parse(text, reviver, options);
146
+ } finally {
147
+ Error.stackTraceLimit = stackTraceLimit;
148
+ }
149
+ }
150
+ function safeParse(text, reviver) {
151
+ const { stackTraceLimit } = Error;
152
+ Error.stackTraceLimit = 0;
153
+ try {
154
+ return _parse(text, reviver, { safe: true });
155
+ } catch {
156
+ return void 0;
157
+ } finally {
158
+ Error.stackTraceLimit = stackTraceLimit;
159
+ }
160
+ }
161
+ secureJsonParse.exports = parse$2;
162
+ secureJsonParse.exports.default = parse$2;
163
+ secureJsonParse.exports.parse = parse$2;
164
+ secureJsonParse.exports.safeParse = safeParse;
165
+ secureJsonParse.exports.scan = filter;
166
+ secureJsonParse.exports;
167
+ var safeStableStringify = { exports: {} };
168
+ safeStableStringify.exports;
169
+ (function(module, exports) {
170
+ const { hasOwnProperty } = Object.prototype;
171
+ const stringify = configure2();
172
+ stringify.configure = configure2;
173
+ stringify.stringify = stringify;
174
+ stringify.default = stringify;
175
+ exports.stringify = stringify;
176
+ exports.configure = configure2;
177
+ module.exports = stringify;
178
+ const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
179
+ function strEscape(str) {
180
+ if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) {
181
+ return `"${str}"`;
182
+ }
183
+ return JSON.stringify(str);
184
+ }
185
+ function sort(array, comparator) {
186
+ if (array.length > 200 || comparator) {
187
+ return array.sort(comparator);
188
+ }
189
+ for (let i = 1; i < array.length; i++) {
190
+ const currentValue = array[i];
191
+ let position = i;
192
+ while (position !== 0 && array[position - 1] > currentValue) {
193
+ array[position] = array[position - 1];
194
+ position--;
195
+ }
196
+ array[position] = currentValue;
197
+ }
198
+ return array;
199
+ }
200
+ const typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(
201
+ Object.getPrototypeOf(
202
+ Object.getPrototypeOf(
203
+ new Int8Array()
204
+ )
205
+ ),
206
+ Symbol.toStringTag
207
+ ).get;
208
+ function isTypedArrayWithEntries(value) {
209
+ return typedArrayPrototypeGetSymbolToStringTag.call(value) !== void 0 && value.length !== 0;
210
+ }
211
+ function stringifyTypedArray(array, separator, maximumBreadth) {
212
+ if (array.length < maximumBreadth) {
213
+ maximumBreadth = array.length;
214
+ }
215
+ const whitespace = separator === "," ? "" : " ";
216
+ let res = `"0":${whitespace}${array[0]}`;
217
+ for (let i = 1; i < maximumBreadth; i++) {
218
+ res += `${separator}"${i}":${whitespace}${array[i]}`;
219
+ }
220
+ return res;
221
+ }
222
+ function getCircularValueOption(options) {
223
+ if (hasOwnProperty.call(options, "circularValue")) {
224
+ const circularValue = options.circularValue;
225
+ if (typeof circularValue === "string") {
226
+ return `"${circularValue}"`;
227
+ }
228
+ if (circularValue == null) {
229
+ return circularValue;
230
+ }
231
+ if (circularValue === Error || circularValue === TypeError) {
232
+ return {
233
+ toString() {
234
+ throw new TypeError("Converting circular structure to JSON");
235
+ }
236
+ };
237
+ }
238
+ throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined');
239
+ }
240
+ return '"[Circular]"';
241
+ }
242
+ function getDeterministicOption(options) {
243
+ let value;
244
+ if (hasOwnProperty.call(options, "deterministic")) {
245
+ value = options.deterministic;
246
+ if (typeof value !== "boolean" && typeof value !== "function") {
247
+ throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');
248
+ }
249
+ }
250
+ return value === void 0 ? true : value;
251
+ }
252
+ function getBooleanOption(options, key) {
253
+ let value;
254
+ if (hasOwnProperty.call(options, key)) {
255
+ value = options[key];
256
+ if (typeof value !== "boolean") {
257
+ throw new TypeError(`The "${key}" argument must be of type boolean`);
258
+ }
259
+ }
260
+ return value === void 0 ? true : value;
261
+ }
262
+ function getPositiveIntegerOption(options, key) {
263
+ let value;
264
+ if (hasOwnProperty.call(options, key)) {
265
+ value = options[key];
266
+ if (typeof value !== "number") {
267
+ throw new TypeError(`The "${key}" argument must be of type number`);
268
+ }
269
+ if (!Number.isInteger(value)) {
270
+ throw new TypeError(`The "${key}" argument must be an integer`);
271
+ }
272
+ if (value < 1) {
273
+ throw new RangeError(`The "${key}" argument must be >= 1`);
274
+ }
275
+ }
276
+ return value === void 0 ? Infinity : value;
277
+ }
278
+ function getItemCount(number) {
279
+ if (number === 1) {
280
+ return "1 item";
281
+ }
282
+ return `${number} items`;
283
+ }
284
+ function getUniqueReplacerSet(replacerArray) {
285
+ const replacerSet = /* @__PURE__ */ new Set();
286
+ for (const value of replacerArray) {
287
+ if (typeof value === "string" || typeof value === "number") {
288
+ replacerSet.add(String(value));
289
+ }
290
+ }
291
+ return replacerSet;
292
+ }
293
+ function getStrictOption(options) {
294
+ if (hasOwnProperty.call(options, "strict")) {
295
+ const value = options.strict;
296
+ if (typeof value !== "boolean") {
297
+ throw new TypeError('The "strict" argument must be of type boolean');
298
+ }
299
+ if (value) {
300
+ return (value2) => {
301
+ let message = `Object can not safely be stringified. Received type ${typeof value2}`;
302
+ if (typeof value2 !== "function") message += ` (${value2.toString()})`;
303
+ throw new Error(message);
304
+ };
305
+ }
306
+ }
307
+ }
308
+ function configure2(options) {
309
+ options = { ...options };
310
+ const fail = getStrictOption(options);
311
+ if (fail) {
312
+ if (options.bigint === void 0) {
313
+ options.bigint = false;
314
+ }
315
+ if (!("circularValue" in options)) {
316
+ options.circularValue = Error;
317
+ }
318
+ }
319
+ const circularValue = getCircularValueOption(options);
320
+ const bigint = getBooleanOption(options, "bigint");
321
+ const deterministic = getDeterministicOption(options);
322
+ const comparator = typeof deterministic === "function" ? deterministic : void 0;
323
+ const maximumDepth = getPositiveIntegerOption(options, "maximumDepth");
324
+ const maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth");
325
+ function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) {
326
+ let value = parent[key];
327
+ if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
328
+ value = value.toJSON(key);
329
+ }
330
+ value = replacer.call(parent, key, value);
331
+ switch (typeof value) {
332
+ case "string":
333
+ return strEscape(value);
334
+ case "object": {
335
+ if (value === null) {
336
+ return "null";
337
+ }
338
+ if (stack.indexOf(value) !== -1) {
339
+ return circularValue;
340
+ }
341
+ let res = "";
342
+ let join = ",";
343
+ const originalIndentation = indentation;
344
+ if (Array.isArray(value)) {
345
+ if (value.length === 0) {
346
+ return "[]";
347
+ }
348
+ if (maximumDepth < stack.length + 1) {
349
+ return '"[Array]"';
350
+ }
351
+ stack.push(value);
352
+ if (spacer !== "") {
353
+ indentation += spacer;
354
+ res += `
355
+ ${indentation}`;
356
+ join = `,
357
+ ${indentation}`;
358
+ }
359
+ const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
360
+ let i = 0;
361
+ for (; i < maximumValuesToStringify - 1; i++) {
362
+ const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
363
+ res += tmp2 !== void 0 ? tmp2 : "null";
364
+ res += join;
365
+ }
366
+ const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
367
+ res += tmp !== void 0 ? tmp : "null";
368
+ if (value.length - 1 > maximumBreadth) {
369
+ const removedKeys = value.length - maximumBreadth - 1;
370
+ res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
371
+ }
372
+ if (spacer !== "") {
373
+ res += `
374
+ ${originalIndentation}`;
375
+ }
376
+ stack.pop();
377
+ return `[${res}]`;
378
+ }
379
+ let keys = Object.keys(value);
380
+ const keyLength = keys.length;
381
+ if (keyLength === 0) {
382
+ return "{}";
383
+ }
384
+ if (maximumDepth < stack.length + 1) {
385
+ return '"[Object]"';
386
+ }
387
+ let whitespace = "";
388
+ let separator = "";
389
+ if (spacer !== "") {
390
+ indentation += spacer;
391
+ join = `,
392
+ ${indentation}`;
393
+ whitespace = " ";
394
+ }
395
+ const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
396
+ if (deterministic && !isTypedArrayWithEntries(value)) {
397
+ keys = sort(keys, comparator);
398
+ }
399
+ stack.push(value);
400
+ for (let i = 0; i < maximumPropertiesToStringify; i++) {
401
+ const key2 = keys[i];
402
+ const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
403
+ if (tmp !== void 0) {
404
+ res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
405
+ separator = join;
406
+ }
407
+ }
408
+ if (keyLength > maximumBreadth) {
409
+ const removedKeys = keyLength - maximumBreadth;
410
+ res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
411
+ separator = join;
412
+ }
413
+ if (spacer !== "" && separator.length > 1) {
414
+ res = `
415
+ ${indentation}${res}
416
+ ${originalIndentation}`;
417
+ }
418
+ stack.pop();
419
+ return `{${res}}`;
420
+ }
421
+ case "number":
422
+ return isFinite(value) ? String(value) : fail ? fail(value) : "null";
423
+ case "boolean":
424
+ return value === true ? "true" : "false";
425
+ case "undefined":
426
+ return void 0;
427
+ case "bigint":
428
+ if (bigint) {
429
+ return String(value);
430
+ }
431
+ default:
432
+ return fail ? fail(value) : void 0;
433
+ }
434
+ }
435
+ function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) {
436
+ if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
437
+ value = value.toJSON(key);
438
+ }
439
+ switch (typeof value) {
440
+ case "string":
441
+ return strEscape(value);
442
+ case "object": {
443
+ if (value === null) {
444
+ return "null";
445
+ }
446
+ if (stack.indexOf(value) !== -1) {
447
+ return circularValue;
448
+ }
449
+ const originalIndentation = indentation;
450
+ let res = "";
451
+ let join = ",";
452
+ if (Array.isArray(value)) {
453
+ if (value.length === 0) {
454
+ return "[]";
455
+ }
456
+ if (maximumDepth < stack.length + 1) {
457
+ return '"[Array]"';
458
+ }
459
+ stack.push(value);
460
+ if (spacer !== "") {
461
+ indentation += spacer;
462
+ res += `
463
+ ${indentation}`;
464
+ join = `,
465
+ ${indentation}`;
466
+ }
467
+ const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
468
+ let i = 0;
469
+ for (; i < maximumValuesToStringify - 1; i++) {
470
+ const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
471
+ res += tmp2 !== void 0 ? tmp2 : "null";
472
+ res += join;
473
+ }
474
+ const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
475
+ res += tmp !== void 0 ? tmp : "null";
476
+ if (value.length - 1 > maximumBreadth) {
477
+ const removedKeys = value.length - maximumBreadth - 1;
478
+ res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
479
+ }
480
+ if (spacer !== "") {
481
+ res += `
482
+ ${originalIndentation}`;
483
+ }
484
+ stack.pop();
485
+ return `[${res}]`;
486
+ }
487
+ stack.push(value);
488
+ let whitespace = "";
489
+ if (spacer !== "") {
490
+ indentation += spacer;
491
+ join = `,
492
+ ${indentation}`;
493
+ whitespace = " ";
494
+ }
495
+ let separator = "";
496
+ for (const key2 of replacer) {
497
+ const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
498
+ if (tmp !== void 0) {
499
+ res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
500
+ separator = join;
501
+ }
502
+ }
503
+ if (spacer !== "" && separator.length > 1) {
504
+ res = `
505
+ ${indentation}${res}
506
+ ${originalIndentation}`;
507
+ }
508
+ stack.pop();
509
+ return `{${res}}`;
510
+ }
511
+ case "number":
512
+ return isFinite(value) ? String(value) : fail ? fail(value) : "null";
513
+ case "boolean":
514
+ return value === true ? "true" : "false";
515
+ case "undefined":
516
+ return void 0;
517
+ case "bigint":
518
+ if (bigint) {
519
+ return String(value);
520
+ }
521
+ default:
522
+ return fail ? fail(value) : void 0;
523
+ }
524
+ }
525
+ function stringifyIndent(key, value, stack, spacer, indentation) {
526
+ switch (typeof value) {
527
+ case "string":
528
+ return strEscape(value);
529
+ case "object": {
530
+ if (value === null) {
531
+ return "null";
532
+ }
533
+ if (typeof value.toJSON === "function") {
534
+ value = value.toJSON(key);
535
+ if (typeof value !== "object") {
536
+ return stringifyIndent(key, value, stack, spacer, indentation);
537
+ }
538
+ if (value === null) {
539
+ return "null";
540
+ }
541
+ }
542
+ if (stack.indexOf(value) !== -1) {
543
+ return circularValue;
544
+ }
545
+ const originalIndentation = indentation;
546
+ if (Array.isArray(value)) {
547
+ if (value.length === 0) {
548
+ return "[]";
549
+ }
550
+ if (maximumDepth < stack.length + 1) {
551
+ return '"[Array]"';
552
+ }
553
+ stack.push(value);
554
+ indentation += spacer;
555
+ let res2 = `
556
+ ${indentation}`;
557
+ const join2 = `,
558
+ ${indentation}`;
559
+ const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
560
+ let i = 0;
561
+ for (; i < maximumValuesToStringify - 1; i++) {
562
+ const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
563
+ res2 += tmp2 !== void 0 ? tmp2 : "null";
564
+ res2 += join2;
565
+ }
566
+ const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
567
+ res2 += tmp !== void 0 ? tmp : "null";
568
+ if (value.length - 1 > maximumBreadth) {
569
+ const removedKeys = value.length - maximumBreadth - 1;
570
+ res2 += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
571
+ }
572
+ res2 += `
573
+ ${originalIndentation}`;
574
+ stack.pop();
575
+ return `[${res2}]`;
576
+ }
577
+ let keys = Object.keys(value);
578
+ const keyLength = keys.length;
579
+ if (keyLength === 0) {
580
+ return "{}";
581
+ }
582
+ if (maximumDepth < stack.length + 1) {
583
+ return '"[Object]"';
584
+ }
585
+ indentation += spacer;
586
+ const join = `,
587
+ ${indentation}`;
588
+ let res = "";
589
+ let separator = "";
590
+ let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
591
+ if (isTypedArrayWithEntries(value)) {
592
+ res += stringifyTypedArray(value, join, maximumBreadth);
593
+ keys = keys.slice(value.length);
594
+ maximumPropertiesToStringify -= value.length;
595
+ separator = join;
596
+ }
597
+ if (deterministic) {
598
+ keys = sort(keys, comparator);
599
+ }
600
+ stack.push(value);
601
+ for (let i = 0; i < maximumPropertiesToStringify; i++) {
602
+ const key2 = keys[i];
603
+ const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
604
+ if (tmp !== void 0) {
605
+ res += `${separator}${strEscape(key2)}: ${tmp}`;
606
+ separator = join;
607
+ }
608
+ }
609
+ if (keyLength > maximumBreadth) {
610
+ const removedKeys = keyLength - maximumBreadth;
611
+ res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
612
+ separator = join;
613
+ }
614
+ if (separator !== "") {
615
+ res = `
616
+ ${indentation}${res}
617
+ ${originalIndentation}`;
618
+ }
619
+ stack.pop();
620
+ return `{${res}}`;
621
+ }
622
+ case "number":
623
+ return isFinite(value) ? String(value) : fail ? fail(value) : "null";
624
+ case "boolean":
625
+ return value === true ? "true" : "false";
626
+ case "undefined":
627
+ return void 0;
628
+ case "bigint":
629
+ if (bigint) {
630
+ return String(value);
631
+ }
632
+ default:
633
+ return fail ? fail(value) : void 0;
634
+ }
635
+ }
636
+ function stringifySimple(key, value, stack) {
637
+ switch (typeof value) {
638
+ case "string":
639
+ return strEscape(value);
640
+ case "object": {
641
+ if (value === null) {
642
+ return "null";
643
+ }
644
+ if (typeof value.toJSON === "function") {
645
+ value = value.toJSON(key);
646
+ if (typeof value !== "object") {
647
+ return stringifySimple(key, value, stack);
648
+ }
649
+ if (value === null) {
650
+ return "null";
651
+ }
652
+ }
653
+ if (stack.indexOf(value) !== -1) {
654
+ return circularValue;
655
+ }
656
+ let res = "";
657
+ const hasLength = value.length !== void 0;
658
+ if (hasLength && Array.isArray(value)) {
659
+ if (value.length === 0) {
660
+ return "[]";
661
+ }
662
+ if (maximumDepth < stack.length + 1) {
663
+ return '"[Array]"';
664
+ }
665
+ stack.push(value);
666
+ const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
667
+ let i = 0;
668
+ for (; i < maximumValuesToStringify - 1; i++) {
669
+ const tmp2 = stringifySimple(String(i), value[i], stack);
670
+ res += tmp2 !== void 0 ? tmp2 : "null";
671
+ res += ",";
672
+ }
673
+ const tmp = stringifySimple(String(i), value[i], stack);
674
+ res += tmp !== void 0 ? tmp : "null";
675
+ if (value.length - 1 > maximumBreadth) {
676
+ const removedKeys = value.length - maximumBreadth - 1;
677
+ res += `,"... ${getItemCount(removedKeys)} not stringified"`;
678
+ }
679
+ stack.pop();
680
+ return `[${res}]`;
681
+ }
682
+ let keys = Object.keys(value);
683
+ const keyLength = keys.length;
684
+ if (keyLength === 0) {
685
+ return "{}";
686
+ }
687
+ if (maximumDepth < stack.length + 1) {
688
+ return '"[Object]"';
689
+ }
690
+ let separator = "";
691
+ let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
692
+ if (hasLength && isTypedArrayWithEntries(value)) {
693
+ res += stringifyTypedArray(value, ",", maximumBreadth);
694
+ keys = keys.slice(value.length);
695
+ maximumPropertiesToStringify -= value.length;
696
+ separator = ",";
697
+ }
698
+ if (deterministic) {
699
+ keys = sort(keys, comparator);
700
+ }
701
+ stack.push(value);
702
+ for (let i = 0; i < maximumPropertiesToStringify; i++) {
703
+ const key2 = keys[i];
704
+ const tmp = stringifySimple(key2, value[key2], stack);
705
+ if (tmp !== void 0) {
706
+ res += `${separator}${strEscape(key2)}:${tmp}`;
707
+ separator = ",";
708
+ }
709
+ }
710
+ if (keyLength > maximumBreadth) {
711
+ const removedKeys = keyLength - maximumBreadth;
712
+ res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`;
713
+ }
714
+ stack.pop();
715
+ return `{${res}}`;
716
+ }
717
+ case "number":
718
+ return isFinite(value) ? String(value) : fail ? fail(value) : "null";
719
+ case "boolean":
720
+ return value === true ? "true" : "false";
721
+ case "undefined":
722
+ return void 0;
723
+ case "bigint":
724
+ if (bigint) {
725
+ return String(value);
726
+ }
727
+ default:
728
+ return fail ? fail(value) : void 0;
729
+ }
730
+ }
731
+ function stringify2(value, replacer, space) {
732
+ if (arguments.length > 1) {
733
+ let spacer = "";
734
+ if (typeof space === "number") {
735
+ spacer = " ".repeat(Math.min(space, 10));
736
+ } else if (typeof space === "string") {
737
+ spacer = space.slice(0, 10);
738
+ }
739
+ if (replacer != null) {
740
+ if (typeof replacer === "function") {
741
+ return stringifyFnReplacer("", { "": value }, [], replacer, spacer, "");
742
+ }
743
+ if (Array.isArray(replacer)) {
744
+ return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, "");
745
+ }
746
+ }
747
+ if (spacer.length !== 0) {
748
+ return stringifyIndent("", value, [], spacer, "");
749
+ }
750
+ }
751
+ return stringifySimple("", value, []);
752
+ }
753
+ return stringify2;
754
+ }
755
+ })(safeStableStringify, safeStableStringify.exports);
756
+ var safeStableStringifyExports = safeStableStringify.exports;
757
+ const cjsModule = /* @__PURE__ */ getDefaultExportFromCjs(safeStableStringifyExports);
758
+ const configure = cjsModule.configure;
759
+ configure({
760
+ bigint: false,
761
+ circularValue: void 0,
762
+ deterministic: false
763
+ });
764
+ var __defProp2 = Object.defineProperty;
765
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
766
+ var __getOwnPropNames = Object.getOwnPropertyNames;
767
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
768
+ var __copyProps = (to, from, except, desc) => {
769
+ if (from && typeof from === "object" || typeof from === "function") {
770
+ for (let key of __getOwnPropNames(from))
771
+ if (!__hasOwnProp.call(to, key) && key !== except)
772
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
773
+ }
774
+ return to;
775
+ };
776
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
777
+ var main = { exports: {} };
778
+ /**
779
+ * @license
780
+ * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
781
+ * Build: `lodash include="pick,omit,has,get,set,unset,mergeWith,merge,size,clone,cloneWith,cloneDeep,cloneDeepWith,toPath" --production`
782
+ */
783
+ main.exports;
784
+ (function(module, exports) {
785
+ (function() {
786
+ function t(t2, e2, n2) {
787
+ switch (n2.length) {
788
+ case 0:
789
+ return t2.call(e2);
790
+ case 1:
791
+ return t2.call(e2, n2[0]);
792
+ case 2:
793
+ return t2.call(e2, n2[0], n2[1]);
794
+ case 3:
795
+ return t2.call(e2, n2[0], n2[1], n2[2]);
796
+ }
797
+ return t2.apply(e2, n2);
798
+ }
799
+ function e(t2, e2) {
800
+ for (var n2 = -1, r2 = null == t2 ? 0 : t2.length; ++n2 < r2 && false !== e2(t2[n2], n2, t2); ) ;
801
+ }
802
+ function n(t2, e2) {
803
+ for (var n2 = -1, r2 = null == t2 ? 0 : t2.length, u2 = 0, o2 = []; ++n2 < r2; ) {
804
+ var c2 = t2[n2];
805
+ e2(c2, n2, t2) && (o2[u2++] = c2);
806
+ }
807
+ return o2;
808
+ }
809
+ function r(t2, e2) {
810
+ for (var n2 = -1, r2 = null == t2 ? 0 : t2.length, u2 = Array(r2); ++n2 < r2; ) u2[n2] = e2(t2[n2], n2, t2);
811
+ return u2;
812
+ }
813
+ function u(t2, e2) {
814
+ for (var n2 = -1, r2 = e2.length, u2 = t2.length; ++n2 < r2; ) t2[u2 + n2] = e2[n2];
815
+ return t2;
816
+ }
817
+ function o(t2) {
818
+ return function(e2) {
819
+ return t2(e2);
820
+ };
821
+ }
822
+ function c(t2) {
823
+ var e2 = Object;
824
+ return function(n2) {
825
+ return t2(e2(n2));
826
+ };
827
+ }
828
+ function i() {
829
+ }
830
+ function f(t2) {
831
+ var e2 = -1, n2 = null == t2 ? 0 : t2.length;
832
+ for (this.clear(); ++e2 < n2; ) {
833
+ var r2 = t2[e2];
834
+ this.set(r2[0], r2[1]);
835
+ }
836
+ }
837
+ function a(t2) {
838
+ var e2 = -1, n2 = null == t2 ? 0 : t2.length;
839
+ for (this.clear(); ++e2 < n2; ) {
840
+ var r2 = t2[e2];
841
+ this.set(r2[0], r2[1]);
842
+ }
843
+ }
844
+ function l(t2) {
845
+ var e2 = -1, n2 = null == t2 ? 0 : t2.length;
846
+ for (this.clear(); ++e2 < n2; ) {
847
+ var r2 = t2[e2];
848
+ this.set(r2[0], r2[1]);
849
+ }
850
+ }
851
+ function s(t2) {
852
+ this.size = (this.__data__ = new a(t2)).size;
853
+ }
854
+ function b(t2, e2) {
855
+ var n2 = Ye(t2), r2 = !n2 && Xe(t2), u2 = !n2 && !r2 && Ze(t2), o2 = !n2 && !r2 && !u2 && nn(t2);
856
+ if (n2 = n2 || r2 || u2 || o2) {
857
+ for (var r2 = t2.length, c2 = String, i2 = -1, f2 = Array(r2); ++i2 < r2; ) f2[i2] = c2(i2);
858
+ r2 = f2;
859
+ } else r2 = [];
860
+ var a2, c2 = r2.length;
861
+ for (a2 in t2) !e2 && !fe.call(t2, a2) || n2 && ("length" == a2 || u2 && ("offset" == a2 || "parent" == a2) || o2 && ("buffer" == a2 || "byteLength" == a2 || "byteOffset" == a2) || ut(a2, c2)) || r2.push(a2);
862
+ return r2;
863
+ }
864
+ function p(t2, e2, n2) {
865
+ (n2 === Mt || bt(t2[e2], n2)) && (n2 !== Mt || e2 in t2) || d(t2, e2, n2);
866
+ }
867
+ function h(t2, e2, n2) {
868
+ var r2 = t2[e2];
869
+ fe.call(t2, e2) && bt(r2, n2) && (n2 !== Mt || e2 in t2) || d(t2, e2, n2);
870
+ }
871
+ function y(t2, e2) {
872
+ for (var n2 = t2.length; n2--; ) if (bt(t2[n2][0], e2)) return n2;
873
+ return -1;
874
+ }
875
+ function j(t2, e2) {
876
+ return t2 && V(e2, St(e2), t2);
877
+ }
878
+ function _(t2, e2) {
879
+ return t2 && V(e2, zt(e2), t2);
880
+ }
881
+ function d(t2, e2, n2) {
882
+ "__proto__" == e2 && we ? we(t2, e2, { configurable: true, enumerable: true, value: n2, writable: true }) : t2[e2] = n2;
883
+ }
884
+ function g(t2, n2, r2, u2, o2, c2) {
885
+ var i2, f2 = 1 & n2, a2 = 2 & n2, l2 = 4 & n2;
886
+ if (r2 && (i2 = o2 ? r2(t2, u2, o2, c2) : r2(t2)), i2 !== Mt) return i2;
887
+ if (!_t(t2)) return t2;
888
+ if (u2 = Ye(t2)) {
889
+ if (i2 = tt(t2), !f2) return T(t2, i2);
890
+ } else {
891
+ var b2 = Je(t2), p2 = "[object Function]" == b2 || "[object GeneratorFunction]" == b2;
892
+ if (Ze(t2)) return R(t2, f2);
893
+ if ("[object Object]" == b2 || "[object Arguments]" == b2 || p2 && !o2) {
894
+ if (i2 = a2 || p2 ? {} : et(t2), !f2) return a2 ? G(t2, _(i2, t2)) : N(t2, j(i2, t2));
895
+ } else {
896
+ if (!Gt[b2]) return o2 ? t2 : {};
897
+ i2 = nt(t2, b2, f2);
898
+ }
899
+ }
900
+ if (c2 || (c2 = new s()), o2 = c2.get(t2)) return o2;
901
+ if (c2.set(t2, i2), en(t2)) return t2.forEach(function(e2) {
902
+ i2.add(g(e2, n2, r2, e2, t2, c2));
903
+ }), i2;
904
+ if (tn(t2)) return t2.forEach(function(e2, u3) {
905
+ i2.set(u3, g(e2, n2, r2, u3, t2, c2));
906
+ }), i2;
907
+ var a2 = l2 ? a2 ? Q : K : a2 ? zt : St, y2 = u2 ? Mt : a2(t2);
908
+ return e(y2 || t2, function(e2, u3) {
909
+ y2 && (u3 = e2, e2 = t2[u3]), h(i2, u3, g(e2, n2, r2, u3, t2, c2));
910
+ }), i2;
911
+ }
912
+ function v(t2, e2, n2, r2, o2) {
913
+ var c2 = -1, i2 = t2.length;
914
+ for (n2 || (n2 = rt), o2 || (o2 = []); ++c2 < i2; ) {
915
+ var f2 = t2[c2];
916
+ n2(f2) ? u(o2, f2) : o2[o2.length] = f2;
917
+ }
918
+ return o2;
919
+ }
920
+ function A(t2, e2) {
921
+ e2 = C(e2, t2);
922
+ for (var n2 = 0, r2 = e2.length; null != t2 && n2 < r2; ) t2 = t2[it(e2[n2++])];
923
+ return n2 && n2 == r2 ? t2 : Mt;
924
+ }
925
+ function m(t2, e2, n2) {
926
+ return e2 = e2(t2), Ye(t2) ? e2 : u(e2, n2(t2));
927
+ }
928
+ function w(t2) {
929
+ if (null == t2) t2 = t2 === Mt ? "[object Undefined]" : "[object Null]";
930
+ else if (me && me in Object(t2)) {
931
+ var e2 = fe.call(t2, me), n2 = t2[me];
932
+ try {
933
+ t2[me] = Mt;
934
+ var r2 = true;
935
+ } catch (t3) {
936
+ }
937
+ var u2 = le.call(t2);
938
+ r2 && (e2 ? t2[me] = n2 : delete t2[me]), t2 = u2;
939
+ } else t2 = le.call(t2);
940
+ return t2;
941
+ }
942
+ function O(t2, e2) {
943
+ return null != t2 && fe.call(t2, e2);
944
+ }
945
+ function S(t2, e2) {
946
+ return null != t2 && e2 in Object(t2);
947
+ }
948
+ function z(t2) {
949
+ return dt(t2) && "[object Arguments]" == w(t2);
950
+ }
951
+ function x(t2) {
952
+ return dt(t2) && "[object Map]" == Je(t2);
953
+ }
954
+ function k(t2) {
955
+ return dt(t2) && "[object Set]" == Je(t2);
956
+ }
957
+ function F(t2) {
958
+ return dt(t2) && jt(t2.length) && !!Nt[w(t2)];
959
+ }
960
+ function I(t2) {
961
+ if (!ot(t2)) return ze(t2);
962
+ var e2, n2 = [];
963
+ for (e2 in Object(t2)) fe.call(t2, e2) && "constructor" != e2 && n2.push(e2);
964
+ return n2;
965
+ }
966
+ function M(t2, e2, n2, r2, u2) {
967
+ t2 !== e2 && Ne(e2, function(o2, c2) {
968
+ if (_t(o2)) {
969
+ u2 || (u2 = new s());
970
+ var i2 = u2, f2 = "__proto__" == c2 ? Mt : t2[c2], a2 = "__proto__" == c2 ? Mt : e2[c2], l2 = i2.get(a2);
971
+ if (l2) p(t2, c2, l2);
972
+ else {
973
+ var l2 = r2 ? r2(f2, a2, c2 + "", t2, e2, i2) : Mt, b2 = l2 === Mt;
974
+ if (b2) {
975
+ var h2 = Ye(a2), y2 = !h2 && Ze(a2), j2 = !h2 && !y2 && nn(a2), l2 = a2;
976
+ h2 || y2 || j2 ? Ye(f2) ? l2 = f2 : ht(f2) ? l2 = T(f2) : y2 ? (b2 = false, l2 = R(a2, true)) : j2 ? (b2 = false, l2 = L(a2, true)) : l2 = [] : gt(a2) || Xe(a2) ? (l2 = f2, Xe(f2) ? l2 = mt(f2) : (!_t(f2) || n2 && yt(f2)) && (l2 = et(a2))) : b2 = false;
977
+ }
978
+ b2 && (i2.set(a2, l2), M(l2, a2, n2, r2, i2), i2.delete(a2)), p(t2, c2, l2);
979
+ }
980
+ } else i2 = r2 ? r2("__proto__" == c2 ? Mt : t2[c2], o2, c2 + "", t2, e2, u2) : Mt, i2 === Mt && (i2 = o2), p(t2, c2, i2);
981
+ }, zt);
982
+ }
983
+ function E(t2, e2) {
984
+ return U(t2, e2, function(e3, n2) {
985
+ return Ot(t2, n2);
986
+ });
987
+ }
988
+ function U(t2, e2, n2) {
989
+ for (var r2 = -1, u2 = e2.length, o2 = {}; ++r2 < u2; ) {
990
+ var c2 = e2[r2], i2 = A(t2, c2);
991
+ n2(i2, c2) && D(o2, C(c2, t2), i2);
992
+ }
993
+ return o2;
994
+ }
995
+ function P(t2) {
996
+ return Ke(ct(t2, void 0, kt), t2 + "");
997
+ }
998
+ function D(t2, e2, n2) {
999
+ if (!_t(t2)) return t2;
1000
+ e2 = C(e2, t2);
1001
+ for (var r2 = -1, u2 = e2.length, o2 = u2 - 1, c2 = t2; null != c2 && ++r2 < u2; ) {
1002
+ var i2 = it(e2[r2]), f2 = n2;
1003
+ if (r2 != o2) {
1004
+ var a2 = c2[i2], f2 = Mt;
1005
+ f2 === Mt && (f2 = _t(a2) ? a2 : ut(e2[r2 + 1]) ? [] : {});
1006
+ }
1007
+ h(c2, i2, f2), c2 = c2[i2];
1008
+ }
1009
+ return t2;
1010
+ }
1011
+ function $(t2) {
1012
+ if (typeof t2 == "string") return t2;
1013
+ if (Ye(t2)) return r(t2, $) + "";
1014
+ if (At(t2)) return Te ? Te.call(t2) : "";
1015
+ var e2 = t2 + "";
1016
+ return "0" == e2 && 1 / t2 == -Et ? "-0" : e2;
1017
+ }
1018
+ function B(t2, e2) {
1019
+ e2 = C(e2, t2);
1020
+ var n2;
1021
+ if (2 > e2.length) n2 = t2;
1022
+ else {
1023
+ n2 = e2;
1024
+ var r2 = 0, u2 = -1, o2 = -1, c2 = n2.length;
1025
+ for (0 > r2 && (r2 = -r2 > c2 ? 0 : c2 + r2), u2 = u2 > c2 ? c2 : u2, 0 > u2 && (u2 += c2), c2 = r2 > u2 ? 0 : u2 - r2 >>> 0, r2 >>>= 0, u2 = Array(c2); ++o2 < c2; ) u2[o2] = n2[o2 + r2];
1026
+ n2 = A(t2, u2);
1027
+ }
1028
+ return t2 = n2, null == t2 || delete t2[it(lt(e2))];
1029
+ }
1030
+ function C(t2, e2) {
1031
+ var n2;
1032
+ return Ye(t2) ? n2 = t2 : (Ye(t2) ? n2 = false : (n2 = typeof t2, n2 = !("number" != n2 && "symbol" != n2 && "boolean" != n2 && null != t2 && !At(t2)) || (Pt.test(t2) || !Ut.test(t2) || null != e2 && t2 in Object(e2))), n2 = n2 ? [t2] : Qe(wt(t2))), n2;
1033
+ }
1034
+ function R(t2, e2) {
1035
+ if (e2) return t2.slice();
1036
+ var n2 = t2.length, n2 = je ? je(n2) : new t2.constructor(n2);
1037
+ return t2.copy(n2), n2;
1038
+ }
1039
+ function W(t2) {
1040
+ var e2 = new t2.constructor(t2.byteLength);
1041
+ return new ye(e2).set(new ye(t2)), e2;
1042
+ }
1043
+ function L(t2, e2) {
1044
+ return new t2.constructor(e2 ? W(t2.buffer) : t2.buffer, t2.byteOffset, t2.length);
1045
+ }
1046
+ function T(t2, e2) {
1047
+ var n2 = -1, r2 = t2.length;
1048
+ for (e2 || (e2 = Array(r2)); ++n2 < r2; ) e2[n2] = t2[n2];
1049
+ return e2;
1050
+ }
1051
+ function V(t2, e2, n2) {
1052
+ var r2 = !n2;
1053
+ n2 || (n2 = {});
1054
+ for (var u2 = -1, o2 = e2.length; ++u2 < o2; ) {
1055
+ var c2 = e2[u2], i2 = Mt;
1056
+ i2 === Mt && (i2 = t2[c2]), r2 ? d(n2, c2, i2) : h(n2, c2, i2);
1057
+ }
1058
+ return n2;
1059
+ }
1060
+ function N(t2, e2) {
1061
+ return V(t2, qe(t2), e2);
1062
+ }
1063
+ function G(t2, e2) {
1064
+ return V(t2, He(t2), e2);
1065
+ }
1066
+ function q(t2) {
1067
+ return P(function(e2, n2) {
1068
+ var r2, u2 = -1, o2 = n2.length, c2 = 1 < o2 ? n2[o2 - 1] : Mt, i2 = 2 < o2 ? n2[2] : Mt, c2 = 3 < t2.length && typeof c2 == "function" ? (o2--, c2) : Mt;
1069
+ if (r2 = i2) {
1070
+ r2 = n2[0];
1071
+ var f2 = n2[1];
1072
+ if (_t(i2)) {
1073
+ var a2 = typeof f2;
1074
+ r2 = !!("number" == a2 ? pt(i2) && ut(f2, i2.length) : "string" == a2 && f2 in i2) && bt(i2[f2], r2);
1075
+ } else r2 = false;
1076
+ }
1077
+ for (r2 && (c2 = 3 > o2 ? Mt : c2, o2 = 1), e2 = Object(e2); ++u2 < o2; ) (i2 = n2[u2]) && t2(e2, i2, u2, c2);
1078
+ return e2;
1079
+ });
1080
+ }
1081
+ function H(t2) {
1082
+ return gt(t2) ? Mt : t2;
1083
+ }
1084
+ function J(t2) {
1085
+ return Ke(ct(t2, Mt, at), t2 + "");
1086
+ }
1087
+ function K(t2) {
1088
+ return m(t2, St, qe);
1089
+ }
1090
+ function Q(t2) {
1091
+ return m(t2, zt, He);
1092
+ }
1093
+ function X(t2, e2) {
1094
+ var n2 = t2.__data__, r2 = typeof e2;
1095
+ return ("string" == r2 || "number" == r2 || "symbol" == r2 || "boolean" == r2 ? "__proto__" !== e2 : null === e2) ? n2[typeof e2 == "string" ? "string" : "hash"] : n2.map;
1096
+ }
1097
+ function Y(t2, e2) {
1098
+ var n2 = null == t2 ? Mt : t2[e2];
1099
+ return (!_t(n2) || ae && ae in n2 ? 0 : (yt(n2) ? be : Ct).test(ft(n2))) ? n2 : Mt;
1100
+ }
1101
+ function Z(t2, e2, n2) {
1102
+ e2 = C(e2, t2);
1103
+ for (var r2 = -1, u2 = e2.length, o2 = false; ++r2 < u2; ) {
1104
+ var c2 = it(e2[r2]);
1105
+ if (!(o2 = null != t2 && n2(t2, c2))) break;
1106
+ t2 = t2[c2];
1107
+ }
1108
+ return o2 || ++r2 != u2 ? o2 : (u2 = null == t2 ? 0 : t2.length, !!u2 && jt(u2) && ut(c2, u2) && (Ye(t2) || Xe(t2)));
1109
+ }
1110
+ function tt(t2) {
1111
+ var e2 = t2.length, n2 = new t2.constructor(e2);
1112
+ return e2 && "string" == typeof t2[0] && fe.call(t2, "index") && (n2.index = t2.index, n2.input = t2.input), n2;
1113
+ }
1114
+ function et(t2) {
1115
+ return typeof t2.constructor != "function" || ot(t2) ? {} : Ve(_e(t2));
1116
+ }
1117
+ function nt(t2, e2, n2) {
1118
+ var r2 = t2.constructor;
1119
+ switch (e2) {
1120
+ case "[object ArrayBuffer]":
1121
+ return W(t2);
1122
+ case "[object Boolean]":
1123
+ case "[object Date]":
1124
+ return new r2(+t2);
1125
+ case "[object DataView]":
1126
+ return e2 = n2 ? W(t2.buffer) : t2.buffer, new t2.constructor(e2, t2.byteOffset, t2.byteLength);
1127
+ case "[object Float32Array]":
1128
+ case "[object Float64Array]":
1129
+ case "[object Int8Array]":
1130
+ case "[object Int16Array]":
1131
+ case "[object Int32Array]":
1132
+ case "[object Uint8Array]":
1133
+ case "[object Uint8ClampedArray]":
1134
+ case "[object Uint16Array]":
1135
+ case "[object Uint32Array]":
1136
+ return L(t2, n2);
1137
+ case "[object Map]":
1138
+ return new r2();
1139
+ case "[object Number]":
1140
+ case "[object String]":
1141
+ return new r2(t2);
1142
+ case "[object RegExp]":
1143
+ return e2 = new t2.constructor(t2.source, Bt.exec(t2)), e2.lastIndex = t2.lastIndex, e2;
1144
+ case "[object Set]":
1145
+ return new r2();
1146
+ case "[object Symbol]":
1147
+ return Le ? Object(Le.call(t2)) : {};
1148
+ }
1149
+ }
1150
+ function rt(t2) {
1151
+ return Ye(t2) || Xe(t2) || !!(Ae && t2 && t2[Ae]);
1152
+ }
1153
+ function ut(t2, e2) {
1154
+ var n2 = typeof t2;
1155
+ return e2 = null == e2 ? 9007199254740991 : e2, !!e2 && ("number" == n2 || "symbol" != n2 && Rt.test(t2)) && -1 < t2 && 0 == t2 % 1 && t2 < e2;
1156
+ }
1157
+ function ot(t2) {
1158
+ var e2 = t2 && t2.constructor;
1159
+ return t2 === (typeof e2 == "function" && e2.prototype || oe);
1160
+ }
1161
+ function ct(e2, n2, r2) {
1162
+ return n2 = xe(n2 === Mt ? e2.length - 1 : n2, 0), function() {
1163
+ for (var u2 = arguments, o2 = -1, c2 = xe(u2.length - n2, 0), i2 = Array(c2); ++o2 < c2; ) i2[o2] = u2[n2 + o2];
1164
+ for (o2 = -1, c2 = Array(n2 + 1); ++o2 < n2; ) c2[o2] = u2[o2];
1165
+ return c2[n2] = r2(i2), t(e2, this, c2);
1166
+ };
1167
+ }
1168
+ function it(t2) {
1169
+ if (typeof t2 == "string" || At(t2)) return t2;
1170
+ var e2 = t2 + "";
1171
+ return "0" == e2 && 1 / t2 == -Et ? "-0" : e2;
1172
+ }
1173
+ function ft(t2) {
1174
+ if (null != t2) {
1175
+ try {
1176
+ return ie.call(t2);
1177
+ } catch (t3) {
1178
+ }
1179
+ return t2 + "";
1180
+ }
1181
+ return "";
1182
+ }
1183
+ function at(t2) {
1184
+ return (null == t2 ? 0 : t2.length) ? v(t2) : [];
1185
+ }
1186
+ function lt(t2) {
1187
+ var e2 = null == t2 ? 0 : t2.length;
1188
+ return e2 ? t2[e2 - 1] : Mt;
1189
+ }
1190
+ function st(t2, e2) {
1191
+ function n2() {
1192
+ var r2 = arguments, u2 = e2 ? e2.apply(this, r2) : r2[0], o2 = n2.cache;
1193
+ return o2.has(u2) ? o2.get(u2) : (r2 = t2.apply(this, r2), n2.cache = o2.set(u2, r2) || o2, r2);
1194
+ }
1195
+ if (typeof t2 != "function" || null != e2 && typeof e2 != "function") throw new TypeError("Expected a function");
1196
+ return n2.cache = new (st.Cache || l)(), n2;
1197
+ }
1198
+ function bt(t2, e2) {
1199
+ return t2 === e2 || t2 !== t2 && e2 !== e2;
1200
+ }
1201
+ function pt(t2) {
1202
+ return null != t2 && jt(t2.length) && !yt(t2);
1203
+ }
1204
+ function ht(t2) {
1205
+ return dt(t2) && pt(t2);
1206
+ }
1207
+ function yt(t2) {
1208
+ return !!_t(t2) && (t2 = w(t2), "[object Function]" == t2 || "[object GeneratorFunction]" == t2 || "[object AsyncFunction]" == t2 || "[object Proxy]" == t2);
1209
+ }
1210
+ function jt(t2) {
1211
+ return typeof t2 == "number" && -1 < t2 && 0 == t2 % 1 && 9007199254740991 >= t2;
1212
+ }
1213
+ function _t(t2) {
1214
+ var e2 = typeof t2;
1215
+ return null != t2 && ("object" == e2 || "function" == e2);
1216
+ }
1217
+ function dt(t2) {
1218
+ return null != t2 && typeof t2 == "object";
1219
+ }
1220
+ function gt(t2) {
1221
+ return !(!dt(t2) || "[object Object]" != w(t2)) && (t2 = _e(t2), null === t2 || (t2 = fe.call(t2, "constructor") && t2.constructor, typeof t2 == "function" && t2 instanceof t2 && ie.call(t2) == se));
1222
+ }
1223
+ function vt(t2) {
1224
+ return typeof t2 == "string" || !Ye(t2) && dt(t2) && "[object String]" == w(t2);
1225
+ }
1226
+ function At(t2) {
1227
+ return typeof t2 == "symbol" || dt(t2) && "[object Symbol]" == w(t2);
1228
+ }
1229
+ function mt(t2) {
1230
+ return V(t2, zt(t2));
1231
+ }
1232
+ function wt(t2) {
1233
+ return null == t2 ? "" : $(t2);
1234
+ }
1235
+ function Ot(t2, e2) {
1236
+ return null != t2 && Z(t2, e2, S);
1237
+ }
1238
+ function St(t2) {
1239
+ return pt(t2) ? b(t2) : I(t2);
1240
+ }
1241
+ function zt(t2) {
1242
+ if (pt(t2)) t2 = b(t2, true);
1243
+ else if (_t(t2)) {
1244
+ var e2, n2 = ot(t2), r2 = [];
1245
+ for (e2 in t2) ("constructor" != e2 || !n2 && fe.call(t2, e2)) && r2.push(e2);
1246
+ t2 = r2;
1247
+ } else {
1248
+ if (e2 = [], null != t2) for (n2 in Object(t2)) e2.push(n2);
1249
+ t2 = e2;
1250
+ }
1251
+ return t2;
1252
+ }
1253
+ function xt(t2) {
1254
+ return function() {
1255
+ return t2;
1256
+ };
1257
+ }
1258
+ function kt(t2) {
1259
+ return t2;
1260
+ }
1261
+ function Ft() {
1262
+ return [];
1263
+ }
1264
+ function It() {
1265
+ return false;
1266
+ }
1267
+ var Mt, Et = 1 / 0, Ut = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Pt = /^\w*$/, Dt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, $t = /\\(\\)?/g, Bt = /\w*$/, Ct = /^\[object .+?Constructor\]$/, Rt = /^(?:0|[1-9]\d*)$/, Wt = "[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*", Lt = "(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])", Tt = RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + Lt + Wt, "g"), Vt = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"), Nt = {};
1268
+ Nt["[object Float32Array]"] = Nt["[object Float64Array]"] = Nt["[object Int8Array]"] = Nt["[object Int16Array]"] = Nt["[object Int32Array]"] = Nt["[object Uint8Array]"] = Nt["[object Uint8ClampedArray]"] = Nt["[object Uint16Array]"] = Nt["[object Uint32Array]"] = true, Nt["[object Arguments]"] = Nt["[object Array]"] = Nt["[object ArrayBuffer]"] = Nt["[object Boolean]"] = Nt["[object DataView]"] = Nt["[object Date]"] = Nt["[object Error]"] = Nt["[object Function]"] = Nt["[object Map]"] = Nt["[object Number]"] = Nt["[object Object]"] = Nt["[object RegExp]"] = Nt["[object Set]"] = Nt["[object String]"] = Nt["[object WeakMap]"] = false;
1269
+ var Gt = {};
1270
+ Gt["[object Arguments]"] = Gt["[object Array]"] = Gt["[object ArrayBuffer]"] = Gt["[object DataView]"] = Gt["[object Boolean]"] = Gt["[object Date]"] = Gt["[object Float32Array]"] = Gt["[object Float64Array]"] = Gt["[object Int8Array]"] = Gt["[object Int16Array]"] = Gt["[object Int32Array]"] = Gt["[object Map]"] = Gt["[object Number]"] = Gt["[object Object]"] = Gt["[object RegExp]"] = Gt["[object Set]"] = Gt["[object String]"] = Gt["[object Symbol]"] = Gt["[object Uint8Array]"] = Gt["[object Uint8ClampedArray]"] = Gt["[object Uint16Array]"] = Gt["[object Uint32Array]"] = true, Gt["[object Error]"] = Gt["[object Function]"] = Gt["[object WeakMap]"] = false;
1271
+ var qt, Ht = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal, Jt = typeof self == "object" && self && self.Object === Object && self, Kt = Ht || Jt || Function("return this")(), Qt = exports && !exports.nodeType && exports, Xt = Qt && true && module && !module.nodeType && module, Yt = Xt && Xt.exports === Qt, Zt = Yt && Ht.process;
1272
+ t: {
1273
+ try {
1274
+ qt = Zt && Zt.binding && Zt.binding("util");
1275
+ break t;
1276
+ } catch (t2) {
1277
+ }
1278
+ qt = void 0;
1279
+ }
1280
+ var te = qt && qt.isMap, ee = qt && qt.isSet, ne = qt && qt.isTypedArray, re = /* @__PURE__ */ function(t2) {
1281
+ return function(e2) {
1282
+ return null == e2 ? Mt : e2[t2];
1283
+ };
1284
+ }("length"), ue = Array.prototype, oe = Object.prototype, ce = Kt["__core-js_shared__"], ie = Function.prototype.toString, fe = oe.hasOwnProperty, ae = function() {
1285
+ var t2 = /[^.]+$/.exec(ce && ce.keys && ce.keys.IE_PROTO || "");
1286
+ return t2 ? "Symbol(src)_1." + t2 : "";
1287
+ }(), le = oe.toString, se = ie.call(Object), be = RegExp("^" + ie.call(fe).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), pe = Yt ? Kt.Buffer : Mt, he = Kt.Symbol, ye = Kt.Uint8Array, je = pe ? pe.a : Mt, _e = c(Object.getPrototypeOf), de = Object.create, ge = oe.propertyIsEnumerable, ve = ue.splice, Ae = he ? he.isConcatSpreadable : Mt, me = he ? he.toStringTag : Mt, we = function() {
1288
+ try {
1289
+ var t2 = Y(Object, "defineProperty");
1290
+ return t2({}, "", {}), t2;
1291
+ } catch (t3) {
1292
+ }
1293
+ }(), Oe = Object.getOwnPropertySymbols, Se = pe ? pe.isBuffer : Mt, ze = c(Object.keys), xe = Math.max, ke = Date.now, Fe = Y(Kt, "DataView"), Ie = Y(Kt, "Map"), Me = Y(Kt, "Promise"), Ee = Y(Kt, "Set"), Ue = Y(Kt, "WeakMap"), Pe = Y(Object, "create"), De = ft(Fe), $e = ft(Ie), Be = ft(Me), Ce = ft(Ee), Re = ft(Ue), We = he ? he.prototype : Mt, Le = We ? We.valueOf : Mt, Te = We ? We.toString : Mt, Ve = /* @__PURE__ */ function() {
1294
+ function t2() {
1295
+ }
1296
+ return function(e2) {
1297
+ return _t(e2) ? de ? de(e2) : (t2.prototype = e2, e2 = new t2(), t2.prototype = Mt, e2) : {};
1298
+ };
1299
+ }();
1300
+ f.prototype.clear = function() {
1301
+ this.__data__ = Pe ? Pe(null) : {}, this.size = 0;
1302
+ }, f.prototype.delete = function(t2) {
1303
+ return t2 = this.has(t2) && delete this.__data__[t2], this.size -= t2 ? 1 : 0, t2;
1304
+ }, f.prototype.get = function(t2) {
1305
+ var e2 = this.__data__;
1306
+ return Pe ? (t2 = e2[t2], "__lodash_hash_undefined__" === t2 ? Mt : t2) : fe.call(e2, t2) ? e2[t2] : Mt;
1307
+ }, f.prototype.has = function(t2) {
1308
+ var e2 = this.__data__;
1309
+ return Pe ? e2[t2] !== Mt : fe.call(e2, t2);
1310
+ }, f.prototype.set = function(t2, e2) {
1311
+ var n2 = this.__data__;
1312
+ return this.size += this.has(t2) ? 0 : 1, n2[t2] = Pe && e2 === Mt ? "__lodash_hash_undefined__" : e2, this;
1313
+ }, a.prototype.clear = function() {
1314
+ this.__data__ = [], this.size = 0;
1315
+ }, a.prototype.delete = function(t2) {
1316
+ var e2 = this.__data__;
1317
+ return t2 = y(e2, t2), !(0 > t2) && (t2 == e2.length - 1 ? e2.pop() : ve.call(e2, t2, 1), --this.size, true);
1318
+ }, a.prototype.get = function(t2) {
1319
+ var e2 = this.__data__;
1320
+ return t2 = y(e2, t2), 0 > t2 ? Mt : e2[t2][1];
1321
+ }, a.prototype.has = function(t2) {
1322
+ return -1 < y(this.__data__, t2);
1323
+ }, a.prototype.set = function(t2, e2) {
1324
+ var n2 = this.__data__, r2 = y(n2, t2);
1325
+ return 0 > r2 ? (++this.size, n2.push([t2, e2])) : n2[r2][1] = e2, this;
1326
+ }, l.prototype.clear = function() {
1327
+ this.size = 0, this.__data__ = {
1328
+ hash: new f(),
1329
+ map: new (Ie || a)(),
1330
+ string: new f()
1331
+ };
1332
+ }, l.prototype.delete = function(t2) {
1333
+ return t2 = X(this, t2).delete(t2), this.size -= t2 ? 1 : 0, t2;
1334
+ }, l.prototype.get = function(t2) {
1335
+ return X(this, t2).get(t2);
1336
+ }, l.prototype.has = function(t2) {
1337
+ return X(this, t2).has(t2);
1338
+ }, l.prototype.set = function(t2, e2) {
1339
+ var n2 = X(this, t2), r2 = n2.size;
1340
+ return n2.set(t2, e2), this.size += n2.size == r2 ? 0 : 1, this;
1341
+ }, s.prototype.clear = function() {
1342
+ this.__data__ = new a(), this.size = 0;
1343
+ }, s.prototype.delete = function(t2) {
1344
+ var e2 = this.__data__;
1345
+ return t2 = e2.delete(t2), this.size = e2.size, t2;
1346
+ }, s.prototype.get = function(t2) {
1347
+ return this.__data__.get(t2);
1348
+ }, s.prototype.has = function(t2) {
1349
+ return this.__data__.has(t2);
1350
+ }, s.prototype.set = function(t2, e2) {
1351
+ var n2 = this.__data__;
1352
+ if (n2 instanceof a) {
1353
+ var r2 = n2.__data__;
1354
+ if (!Ie || 199 > r2.length) return r2.push([t2, e2]), this.size = ++n2.size, this;
1355
+ n2 = this.__data__ = new l(r2);
1356
+ }
1357
+ return n2.set(t2, e2), this.size = n2.size, this;
1358
+ };
1359
+ var Ne = /* @__PURE__ */ function(t2) {
1360
+ return function(e2, n2, r2) {
1361
+ var u2 = -1, o2 = Object(e2);
1362
+ r2 = r2(e2);
1363
+ for (var c2 = r2.length; c2--; ) {
1364
+ var i2 = r2[++u2];
1365
+ if (false === n2(o2[i2], i2, o2)) break;
1366
+ }
1367
+ return e2;
1368
+ };
1369
+ }(), Ge = we ? function(t2, e2) {
1370
+ return we(t2, "toString", {
1371
+ configurable: true,
1372
+ enumerable: false,
1373
+ value: xt(e2),
1374
+ writable: true
1375
+ });
1376
+ } : kt, qe = Oe ? function(t2) {
1377
+ return null == t2 ? [] : (t2 = Object(t2), n(Oe(t2), function(e2) {
1378
+ return ge.call(t2, e2);
1379
+ }));
1380
+ } : Ft, He = Oe ? function(t2) {
1381
+ for (var e2 = []; t2; ) u(e2, qe(t2)), t2 = _e(t2);
1382
+ return e2;
1383
+ } : Ft, Je = w;
1384
+ (Fe && "[object DataView]" != Je(new Fe(new ArrayBuffer(1))) || Ie && "[object Map]" != Je(new Ie()) || Me && "[object Promise]" != Je(Me.resolve()) || Ee && "[object Set]" != Je(new Ee()) || Ue && "[object WeakMap]" != Je(new Ue())) && (Je = function(t2) {
1385
+ var e2 = w(t2);
1386
+ if (t2 = (t2 = "[object Object]" == e2 ? t2.constructor : Mt) ? ft(t2) : "") switch (t2) {
1387
+ case De:
1388
+ return "[object DataView]";
1389
+ case $e:
1390
+ return "[object Map]";
1391
+ case Be:
1392
+ return "[object Promise]";
1393
+ case Ce:
1394
+ return "[object Set]";
1395
+ case Re:
1396
+ return "[object WeakMap]";
1397
+ }
1398
+ return e2;
1399
+ });
1400
+ var Ke = /* @__PURE__ */ function(t2) {
1401
+ var e2 = 0, n2 = 0;
1402
+ return function() {
1403
+ var r2 = ke(), u2 = 16 - (r2 - n2);
1404
+ if (n2 = r2, 0 < u2) {
1405
+ if (800 <= ++e2) return arguments[0];
1406
+ } else e2 = 0;
1407
+ return t2.apply(Mt, arguments);
1408
+ };
1409
+ }(Ge), Qe = function(t2) {
1410
+ t2 = st(t2, function(t3) {
1411
+ return 500 === e2.size && e2.clear(), t3;
1412
+ });
1413
+ var e2 = t2.cache;
1414
+ return t2;
1415
+ }(function(t2) {
1416
+ var e2 = [];
1417
+ return 46 === t2.charCodeAt(0) && e2.push(""), t2.replace(Dt, function(t3, n2, r2, u2) {
1418
+ e2.push(r2 ? u2.replace($t, "$1") : n2 || t3);
1419
+ }), e2;
1420
+ });
1421
+ st.Cache = l;
1422
+ var Xe = z(/* @__PURE__ */ function() {
1423
+ return arguments;
1424
+ }()) ? z : function(t2) {
1425
+ return dt(t2) && fe.call(t2, "callee") && !ge.call(t2, "callee");
1426
+ }, Ye = Array.isArray, Ze = Se || It, tn = te ? o(te) : x, en = ee ? o(ee) : k, nn = ne ? o(ne) : F, rn = q(function(t2, e2, n2) {
1427
+ M(t2, e2, n2);
1428
+ }), un = q(function(t2, e2, n2, r2) {
1429
+ M(t2, e2, n2, r2);
1430
+ }), on = J(function(t2, e2) {
1431
+ var n2 = {};
1432
+ if (null == t2) return n2;
1433
+ var u2 = false;
1434
+ e2 = r(e2, function(e3) {
1435
+ return e3 = C(e3, t2), u2 || (u2 = 1 < e3.length), e3;
1436
+ }), V(t2, Q(t2), n2), u2 && (n2 = g(n2, 7, H));
1437
+ for (var o2 = e2.length; o2--; ) B(n2, e2[o2]);
1438
+ return n2;
1439
+ }), cn = J(function(t2, e2) {
1440
+ return null == t2 ? {} : E(t2, e2);
1441
+ });
1442
+ i.constant = xt, i.flatten = at, i.keys = St, i.keysIn = zt, i.memoize = st, i.merge = rn, i.mergeWith = un, i.omit = on, i.pick = cn, i.set = function(t2, e2, n2) {
1443
+ return null == t2 ? t2 : D(t2, e2, n2);
1444
+ }, i.toPath = function(t2) {
1445
+ return Ye(t2) ? r(t2, it) : At(t2) ? [t2] : T(Qe(wt(t2)));
1446
+ }, i.toPlainObject = mt, i.unset = function(t2, e2) {
1447
+ return null == t2 || B(t2, e2);
1448
+ }, i.clone = function(t2) {
1449
+ return g(t2, 4);
1450
+ }, i.cloneDeep = function(t2) {
1451
+ return g(t2, 5);
1452
+ }, i.cloneDeepWith = function(t2, e2) {
1453
+ return e2 = typeof e2 == "function" ? e2 : Mt, g(t2, 5, e2);
1454
+ }, i.cloneWith = function(t2, e2) {
1455
+ return e2 = typeof e2 == "function" ? e2 : Mt, g(t2, 4, e2);
1456
+ }, i.eq = bt, i.get = function(t2, e2, n2) {
1457
+ return t2 = null == t2 ? Mt : A(t2, e2), t2 === Mt ? n2 : t2;
1458
+ }, i.has = function(t2, e2) {
1459
+ return null != t2 && Z(t2, e2, O);
1460
+ }, i.hasIn = Ot, i.identity = kt, i.isArguments = Xe, i.isArray = Ye, i.isArrayLike = pt, i.isArrayLikeObject = ht, i.isBuffer = Ze, i.isFunction = yt, i.isLength = jt, i.isMap = tn, i.isObject = _t, i.isObjectLike = dt, i.isPlainObject = gt, i.isSet = en, i.isString = vt, i.isSymbol = At, i.isTypedArray = nn, i.last = lt, i.stubArray = Ft, i.stubFalse = It, i.size = function(t2) {
1461
+ if (null == t2) return 0;
1462
+ if (pt(t2)) {
1463
+ if (vt(t2)) if (Vt.test(t2)) {
1464
+ for (var e2 = Tt.lastIndex = 0; Tt.test(t2); ) ++e2;
1465
+ t2 = e2;
1466
+ } else t2 = re(t2);
1467
+ else t2 = t2.length;
1468
+ return t2;
1469
+ }
1470
+ return e2 = Je(t2), "[object Map]" == e2 || "[object Set]" == e2 ? t2.size : I(t2).length;
1471
+ }, i.toString = wt, i.VERSION = "4.17.5", Xt ? ((Xt.exports = i)._ = i, Qt._ = i) : Kt._ = i;
1472
+ }).call(commonjsGlobal);
1473
+ })(main, main.exports);
1474
+ var mainExports = main.exports;
1475
+ const lodash = /* @__PURE__ */ getDefaultExportFromCjs(mainExports);
1476
+ var bytes$2 = { exports: {} };
1477
+ /*!
1478
+ * bytes
1479
+ * Copyright(c) 2012-2014 TJ Holowaychuk
1480
+ * Copyright(c) 2015 Jed Watson
1481
+ * MIT Licensed
1482
+ */
1483
+ bytes$2.exports;
1484
+ bytes$2.exports = bytes;
1485
+ bytes$2.exports.format = format$1;
1486
+ bytes$2.exports.parse = parse$1;
1487
+ var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
1488
+ var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
1489
+ var map = {
1490
+ b: 1,
1491
+ kb: 1 << 10,
1492
+ mb: 1 << 20,
1493
+ gb: 1 << 30,
1494
+ tb: Math.pow(1024, 4),
1495
+ pb: Math.pow(1024, 5)
1496
+ };
1497
+ var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
1498
+ function bytes(value, options) {
1499
+ if (typeof value === "string") {
1500
+ return parse$1(value);
1501
+ }
1502
+ if (typeof value === "number") {
1503
+ return format$1(value, options);
1504
+ }
1505
+ return null;
1506
+ }
1507
+ function format$1(value, options) {
1508
+ if (!Number.isFinite(value)) {
1509
+ return null;
1510
+ }
1511
+ var mag = Math.abs(value);
1512
+ var thousandsSeparator = options && options.thousandsSeparator || "";
1513
+ var unitSeparator = options && options.unitSeparator || "";
1514
+ var decimalPlaces = options && options.decimalPlaces !== void 0 ? options.decimalPlaces : 2;
1515
+ var fixedDecimals = Boolean(options && options.fixedDecimals);
1516
+ var unit = options && options.unit || "";
1517
+ if (!unit || !map[unit.toLowerCase()]) {
1518
+ if (mag >= map.pb) {
1519
+ unit = "PB";
1520
+ } else if (mag >= map.tb) {
1521
+ unit = "TB";
1522
+ } else if (mag >= map.gb) {
1523
+ unit = "GB";
1524
+ } else if (mag >= map.mb) {
1525
+ unit = "MB";
1526
+ } else if (mag >= map.kb) {
1527
+ unit = "KB";
1528
+ } else {
1529
+ unit = "B";
1530
+ }
1531
+ }
1532
+ var val = value / map[unit.toLowerCase()];
1533
+ var str = val.toFixed(decimalPlaces);
1534
+ if (!fixedDecimals) {
1535
+ str = str.replace(formatDecimalsRegExp, "$1");
1536
+ }
1537
+ if (thousandsSeparator) {
1538
+ str = str.split(".").map(function(s, i) {
1539
+ return i === 0 ? s.replace(formatThousandsRegExp, thousandsSeparator) : s;
1540
+ }).join(".");
1541
+ }
1542
+ return str + unitSeparator + unit;
1543
+ }
1544
+ function parse$1(val) {
1545
+ if (typeof val === "number" && !isNaN(val)) {
1546
+ return val;
1547
+ }
1548
+ if (typeof val !== "string") {
1549
+ return null;
1550
+ }
1551
+ var results = parseRegExp.exec(val);
1552
+ var floatValue;
1553
+ var unit = "b";
1554
+ if (!results) {
1555
+ floatValue = parseInt(val, 10);
1556
+ unit = "b";
1557
+ } else {
1558
+ floatValue = parseFloat(results[1]);
1559
+ unit = results[4].toLowerCase();
1560
+ }
1561
+ if (isNaN(floatValue)) {
1562
+ return null;
1563
+ }
1564
+ return Math.floor(map[unit] * floatValue);
1565
+ }
1566
+ var bytesExports = bytes$2.exports;
1567
+ const bytes$1 = /* @__PURE__ */ getDefaultExportFromCjs(bytesExports);
1568
+ var RGX = /^(-?(?:\d+)?\.?\d+) *(m(?:illiseconds?|s(?:ecs?)?))?(s(?:ec(?:onds?|s)?)?)?(m(?:in(?:utes?|s)?)?)?(h(?:ours?|rs?)?)?(d(?:ays?)?)?(w(?:eeks?|ks?)?)?(y(?:ears?|rs?)?)?$/, SEC = 1e3, MIN = SEC * 60, HOUR = MIN * 60, DAY = HOUR * 24, YEAR = DAY * 365.25;
1569
+ function parse(val) {
1570
+ var num, arr = val.toLowerCase().match(RGX);
1571
+ if (arr != null && (num = parseFloat(arr[1]))) {
1572
+ if (arr[3] != null) return num * SEC;
1573
+ if (arr[4] != null) return num * MIN;
1574
+ if (arr[5] != null) return num * HOUR;
1575
+ if (arr[6] != null) return num * DAY;
1576
+ if (arr[7] != null) return num * DAY * 7;
1577
+ if (arr[8] != null) return num * YEAR;
1578
+ return num;
1579
+ }
1580
+ }
1581
+ function fmt(val, pfx, str, long) {
1582
+ var num = (val | 0) === val ? val : ~~(val + 0.5);
1583
+ return pfx + num + (long ? " " + str + (num != 1 ? "s" : "") : str[0]);
1584
+ }
1585
+ function format(num, long) {
1586
+ var pfx = num < 0 ? "-" : "", abs = num < 0 ? -num : num;
1587
+ if (abs < SEC) return num + (long ? " ms" : "ms");
1588
+ if (abs < MIN) return fmt(abs / SEC, pfx, "second", long);
1589
+ if (abs < HOUR) return fmt(abs / MIN, pfx, "minute", long);
1590
+ if (abs < DAY) return fmt(abs / HOUR, pfx, "hour", long);
1591
+ if (abs < YEAR) return fmt(abs / DAY, pfx, "day", long);
1592
+ return fmt(abs / YEAR, pfx, "year", long);
1593
+ }
1594
+ var slugify = { exports: {} };
1595
+ slugify.exports;
1596
+ (function(module, exports) {
1597
+ (function(name, root, factory) {
1598
+ {
1599
+ module.exports = factory();
1600
+ module.exports["default"] = factory();
1601
+ }
1602
+ })("slugify", commonjsGlobal, function() {
1603
+ var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`);
1604
+ var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
1605
+ function replace(string2, options) {
1606
+ if (typeof string2 !== "string") {
1607
+ throw new Error("slugify: string argument expected");
1608
+ }
1609
+ options = typeof options === "string" ? { replacement: options } : options || {};
1610
+ var locale = locales[options.locale] || {};
1611
+ var replacement = options.replacement === void 0 ? "-" : options.replacement;
1612
+ var trim = options.trim === void 0 ? true : options.trim;
1613
+ var slug2 = string2.normalize().split("").reduce(function(result, ch) {
1614
+ var appendChar = locale[ch];
1615
+ if (appendChar === void 0) appendChar = charMap[ch];
1616
+ if (appendChar === void 0) appendChar = ch;
1617
+ if (appendChar === replacement) appendChar = " ";
1618
+ return result + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
1619
+ }, "");
1620
+ if (options.strict) {
1621
+ slug2 = slug2.replace(/[^A-Za-z0-9\s]/g, "");
1622
+ }
1623
+ if (trim) {
1624
+ slug2 = slug2.trim();
1625
+ }
1626
+ slug2 = slug2.replace(/\s+/g, replacement);
1627
+ if (options.lower) {
1628
+ slug2 = slug2.toLowerCase();
1629
+ }
1630
+ return slug2;
1631
+ }
1632
+ replace.extend = function(customMap) {
1633
+ Object.assign(charMap, customMap);
1634
+ };
1635
+ return replace;
1636
+ });
1637
+ })(slugify, slugify.exports);
1638
+ var slugifyExports = slugify.exports;
1639
+ const slugifyPkg = /* @__PURE__ */ getDefaultExportFromCjs(slugifyExports);
1640
+ var truncatise = { exports: {} };
1641
+ truncatise.exports;
1642
+ (function(module) {
1643
+ (function(exportTo) {
1644
+ var selfClosingTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"];
1645
+ var truncatise3 = function(text, options) {
1646
+ var options = options || {}, text = (text || "").trim(), truncatedText = "", currentState = 0, isEndOfWord = false, currentTag = "", tagStack = [], nextChar = "";
1647
+ var charCounter = 0, wordCounter = 0, paragraphCounter = 0;
1648
+ var NOT_TAG = 0, TAG_START = 1, TAG_ATTRIBUTES = 2;
1649
+ options.TruncateBy = options.TruncateBy === void 0 || typeof options.TruncateBy !== "string" || !options.TruncateBy.match(/(word(s)?|character(s)?|paragraph(s)?)/) ? "words" : options.TruncateBy.toLowerCase();
1650
+ options.TruncateLength = options.TruncateLength === void 0 || typeof options.TruncateLength !== "number" ? 50 : options.TruncateLength;
1651
+ options.StripHTML = options.StripHTML === void 0 || typeof options.StripHTML !== "boolean" ? false : options.StripHTML;
1652
+ options.Strict = options.Strict === void 0 || typeof options.Strict !== "boolean" ? true : options.Strict;
1653
+ options.Suffix = options.Suffix === void 0 || typeof options.Suffix !== "string" ? "..." : options.Suffix;
1654
+ if (text === "" || text.length <= options.TruncateLength && options.StripHTML === false) {
1655
+ return text;
1656
+ }
1657
+ if (options.StripHTML) {
1658
+ text = String(text).replace(/<br( \/)?>/gi, " ");
1659
+ }
1660
+ if (options.StripHTML && !options.TruncateBy.match(/(paragraph(s)?)/)) {
1661
+ text = String(text).replace(/<!--(.*?)-->/gm, "").replace(/<\/?[^>]+>/gi, "");
1662
+ }
1663
+ text = String(text).replace(/<\/p>(\r?\n)+<p>/gm, "</p><p>");
1664
+ if (options.StripHTML && String(text).match(/\r?\n\r?\n/)) {
1665
+ text = String(text).replace(/((.+)(\r?\n\r?\n|$))/gi, "<p>$2</p>");
1666
+ }
1667
+ for (var pointer = 0; pointer < text.length; pointer++) {
1668
+ var currentChar = text[pointer];
1669
+ switch (currentChar) {
1670
+ case "<":
1671
+ if (currentState === NOT_TAG) {
1672
+ currentState = TAG_START;
1673
+ currentTag = "";
1674
+ }
1675
+ if (!options.StripHTML) {
1676
+ truncatedText += currentChar;
1677
+ }
1678
+ break;
1679
+ case ">":
1680
+ if (currentState === TAG_START || currentState === TAG_ATTRIBUTES) {
1681
+ currentState = NOT_TAG;
1682
+ currentTag = currentTag.toLowerCase();
1683
+ if (currentTag === "/p") {
1684
+ paragraphCounter++;
1685
+ if (options.StripHTML) {
1686
+ truncatedText += " ";
1687
+ }
1688
+ }
1689
+ if (selfClosingTags.indexOf(currentTag) === -1 && selfClosingTags.indexOf(currentTag + "/") === -1) {
1690
+ if (currentTag.indexOf("/") >= 0) {
1691
+ tagStack.pop();
1692
+ } else {
1693
+ tagStack.push(currentTag);
1694
+ }
1695
+ }
1696
+ }
1697
+ if (!options.StripHTML) {
1698
+ truncatedText += currentChar;
1699
+ }
1700
+ break;
1701
+ case " ":
1702
+ if (currentState === TAG_START) {
1703
+ currentState = TAG_ATTRIBUTES;
1704
+ }
1705
+ if (currentState === NOT_TAG) {
1706
+ wordCounter++;
1707
+ charCounter++;
1708
+ }
1709
+ if (currentState === NOT_TAG || !options.StripHTML) {
1710
+ truncatedText += currentChar;
1711
+ }
1712
+ break;
1713
+ default:
1714
+ if (currentState === NOT_TAG) {
1715
+ charCounter++;
1716
+ }
1717
+ if (currentState === TAG_START) {
1718
+ currentTag += currentChar;
1719
+ }
1720
+ if (currentState === NOT_TAG || !options.StripHTML) {
1721
+ truncatedText += currentChar;
1722
+ }
1723
+ break;
1724
+ }
1725
+ nextChar = text[pointer + 1] || "";
1726
+ isEndOfWord = options.Strict ? true : !currentChar.match(/[a-zA-ZÇ-Ü']/i) || !nextChar.match(/[a-zA-ZÇ-Ü']/i);
1727
+ if (options.TruncateBy.match(/word(s)?/i) && options.TruncateLength <= wordCounter) {
1728
+ truncatedText = truncatedText.replace(/\s+$/, "");
1729
+ break;
1730
+ }
1731
+ if (options.TruncateBy.match(/character(s)?/i) && options.TruncateLength <= charCounter && isEndOfWord) {
1732
+ break;
1733
+ }
1734
+ if (options.TruncateBy.match(/paragraph(s)?/i) && options.TruncateLength === paragraphCounter) {
1735
+ break;
1736
+ }
1737
+ }
1738
+ if (!options.StripHTML && tagStack.length > 0) {
1739
+ while (tagStack.length > 0) {
1740
+ var tag = tagStack.pop();
1741
+ if (tag !== "!--") {
1742
+ truncatedText += "</" + tag + ">";
1743
+ }
1744
+ }
1745
+ }
1746
+ if (pointer < text.length - 1) {
1747
+ if (truncatedText.match(/<\/p>$/gi)) {
1748
+ truncatedText = truncatedText.replace(/(<\/p>)$/gi, options.Suffix + "$1");
1749
+ } else {
1750
+ truncatedText = truncatedText + options.Suffix;
1751
+ }
1752
+ }
1753
+ return truncatedText.trim();
1754
+ };
1755
+ if (module.exports) {
1756
+ return module.exports = truncatise3;
1757
+ }
1758
+ exportTo.truncatise = truncatise3;
1759
+ })(commonjsGlobal);
1760
+ })(truncatise);
1761
+ var truncatiseExports = truncatise.exports;
1762
+ const truncatise2 = /* @__PURE__ */ getDefaultExportFromCjs(truncatiseExports);
1763
+ function commonjsRequire(path) {
1764
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1765
+ }
1766
+ var pluralize$1 = { exports: {} };
1767
+ pluralize$1.exports;
1768
+ (function(module, exports) {
1769
+ (function(root, pluralize2) {
1770
+ if (typeof commonjsRequire === "function" && true && true) {
1771
+ module.exports = pluralize2();
1772
+ } else {
1773
+ root.pluralize = pluralize2();
1774
+ }
1775
+ })(commonjsGlobal, function() {
1776
+ var pluralRules = [];
1777
+ var singularRules = [];
1778
+ var uncountables = {};
1779
+ var irregularPlurals = {};
1780
+ var irregularSingles = {};
1781
+ function sanitizeRule(rule) {
1782
+ if (typeof rule === "string") {
1783
+ return new RegExp("^" + rule + "$", "i");
1784
+ }
1785
+ return rule;
1786
+ }
1787
+ function restoreCase(word, token) {
1788
+ if (word === token) return token;
1789
+ if (word === word.toLowerCase()) return token.toLowerCase();
1790
+ if (word === word.toUpperCase()) return token.toUpperCase();
1791
+ if (word[0] === word[0].toUpperCase()) {
1792
+ return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
1793
+ }
1794
+ return token.toLowerCase();
1795
+ }
1796
+ function interpolate2(str, args) {
1797
+ return str.replace(/\$(\d{1,2})/g, function(match, index) {
1798
+ return args[index] || "";
1799
+ });
1800
+ }
1801
+ function replace(word, rule) {
1802
+ return word.replace(rule[0], function(match, index) {
1803
+ var result = interpolate2(rule[1], arguments);
1804
+ if (match === "") {
1805
+ return restoreCase(word[index - 1], result);
1806
+ }
1807
+ return restoreCase(match, result);
1808
+ });
1809
+ }
1810
+ function sanitizeWord(token, word, rules) {
1811
+ if (!token.length || uncountables.hasOwnProperty(token)) {
1812
+ return word;
1813
+ }
1814
+ var len = rules.length;
1815
+ while (len--) {
1816
+ var rule = rules[len];
1817
+ if (rule[0].test(word)) return replace(word, rule);
1818
+ }
1819
+ return word;
1820
+ }
1821
+ function replaceWord(replaceMap, keepMap, rules) {
1822
+ return function(word) {
1823
+ var token = word.toLowerCase();
1824
+ if (keepMap.hasOwnProperty(token)) {
1825
+ return restoreCase(word, token);
1826
+ }
1827
+ if (replaceMap.hasOwnProperty(token)) {
1828
+ return restoreCase(word, replaceMap[token]);
1829
+ }
1830
+ return sanitizeWord(token, word, rules);
1831
+ };
1832
+ }
1833
+ function checkWord(replaceMap, keepMap, rules, bool) {
1834
+ return function(word) {
1835
+ var token = word.toLowerCase();
1836
+ if (keepMap.hasOwnProperty(token)) return true;
1837
+ if (replaceMap.hasOwnProperty(token)) return false;
1838
+ return sanitizeWord(token, token, rules) === token;
1839
+ };
1840
+ }
1841
+ function pluralize2(word, count, inclusive) {
1842
+ var pluralized = count === 1 ? pluralize2.singular(word) : pluralize2.plural(word);
1843
+ return (inclusive ? count + " " : "") + pluralized;
1844
+ }
1845
+ pluralize2.plural = replaceWord(
1846
+ irregularSingles,
1847
+ irregularPlurals,
1848
+ pluralRules
1849
+ );
1850
+ pluralize2.isPlural = checkWord(
1851
+ irregularSingles,
1852
+ irregularPlurals,
1853
+ pluralRules
1854
+ );
1855
+ pluralize2.singular = replaceWord(
1856
+ irregularPlurals,
1857
+ irregularSingles,
1858
+ singularRules
1859
+ );
1860
+ pluralize2.isSingular = checkWord(
1861
+ irregularPlurals,
1862
+ irregularSingles,
1863
+ singularRules
1864
+ );
1865
+ pluralize2.addPluralRule = function(rule, replacement) {
1866
+ pluralRules.push([sanitizeRule(rule), replacement]);
1867
+ };
1868
+ pluralize2.addSingularRule = function(rule, replacement) {
1869
+ singularRules.push([sanitizeRule(rule), replacement]);
1870
+ };
1871
+ pluralize2.addUncountableRule = function(word) {
1872
+ if (typeof word === "string") {
1873
+ uncountables[word.toLowerCase()] = true;
1874
+ return;
1875
+ }
1876
+ pluralize2.addPluralRule(word, "$0");
1877
+ pluralize2.addSingularRule(word, "$0");
1878
+ };
1879
+ pluralize2.addIrregularRule = function(single, plural2) {
1880
+ plural2 = plural2.toLowerCase();
1881
+ single = single.toLowerCase();
1882
+ irregularSingles[single] = plural2;
1883
+ irregularPlurals[plural2] = single;
1884
+ };
1885
+ [
1886
+ // Pronouns.
1887
+ ["I", "we"],
1888
+ ["me", "us"],
1889
+ ["he", "they"],
1890
+ ["she", "they"],
1891
+ ["them", "them"],
1892
+ ["myself", "ourselves"],
1893
+ ["yourself", "yourselves"],
1894
+ ["itself", "themselves"],
1895
+ ["herself", "themselves"],
1896
+ ["himself", "themselves"],
1897
+ ["themself", "themselves"],
1898
+ ["is", "are"],
1899
+ ["was", "were"],
1900
+ ["has", "have"],
1901
+ ["this", "these"],
1902
+ ["that", "those"],
1903
+ // Words ending in with a consonant and `o`.
1904
+ ["echo", "echoes"],
1905
+ ["dingo", "dingoes"],
1906
+ ["volcano", "volcanoes"],
1907
+ ["tornado", "tornadoes"],
1908
+ ["torpedo", "torpedoes"],
1909
+ // Ends with `us`.
1910
+ ["genus", "genera"],
1911
+ ["viscus", "viscera"],
1912
+ // Ends with `ma`.
1913
+ ["stigma", "stigmata"],
1914
+ ["stoma", "stomata"],
1915
+ ["dogma", "dogmata"],
1916
+ ["lemma", "lemmata"],
1917
+ ["schema", "schemata"],
1918
+ ["anathema", "anathemata"],
1919
+ // Other irregular rules.
1920
+ ["ox", "oxen"],
1921
+ ["axe", "axes"],
1922
+ ["die", "dice"],
1923
+ ["yes", "yeses"],
1924
+ ["foot", "feet"],
1925
+ ["eave", "eaves"],
1926
+ ["goose", "geese"],
1927
+ ["tooth", "teeth"],
1928
+ ["quiz", "quizzes"],
1929
+ ["human", "humans"],
1930
+ ["proof", "proofs"],
1931
+ ["carve", "carves"],
1932
+ ["valve", "valves"],
1933
+ ["looey", "looies"],
1934
+ ["thief", "thieves"],
1935
+ ["groove", "grooves"],
1936
+ ["pickaxe", "pickaxes"],
1937
+ ["passerby", "passersby"]
1938
+ ].forEach(function(rule) {
1939
+ return pluralize2.addIrregularRule(rule[0], rule[1]);
1940
+ });
1941
+ [
1942
+ [/s?$/i, "s"],
1943
+ [/[^\u0000-\u007F]$/i, "$0"],
1944
+ [/([^aeiou]ese)$/i, "$1"],
1945
+ [/(ax|test)is$/i, "$1es"],
1946
+ [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
1947
+ [/(e[mn]u)s?$/i, "$1s"],
1948
+ [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
1949
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
1950
+ [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
1951
+ [/(seraph|cherub)(?:im)?$/i, "$1im"],
1952
+ [/(her|at|gr)o$/i, "$1oes"],
1953
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
1954
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
1955
+ [/sis$/i, "ses"],
1956
+ [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
1957
+ [/([^aeiouy]|qu)y$/i, "$1ies"],
1958
+ [/([^ch][ieo][ln])ey$/i, "$1ies"],
1959
+ [/(x|ch|ss|sh|zz)$/i, "$1es"],
1960
+ [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
1961
+ [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
1962
+ [/(pe)(?:rson|ople)$/i, "$1ople"],
1963
+ [/(child)(?:ren)?$/i, "$1ren"],
1964
+ [/eaux$/i, "$0"],
1965
+ [/m[ae]n$/i, "men"],
1966
+ ["thou", "you"]
1967
+ ].forEach(function(rule) {
1968
+ return pluralize2.addPluralRule(rule[0], rule[1]);
1969
+ });
1970
+ [
1971
+ [/s$/i, ""],
1972
+ [/(ss)$/i, "$1"],
1973
+ [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
1974
+ [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
1975
+ [/ies$/i, "y"],
1976
+ [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
1977
+ [/\b(mon|smil)ies$/i, "$1ey"],
1978
+ [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
1979
+ [/(seraph|cherub)im$/i, "$1"],
1980
+ [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
1981
+ [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
1982
+ [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
1983
+ [/(test)(?:is|es)$/i, "$1is"],
1984
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
1985
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
1986
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
1987
+ [/(alumn|alg|vertebr)ae$/i, "$1a"],
1988
+ [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
1989
+ [/(matr|append)ices$/i, "$1ix"],
1990
+ [/(pe)(rson|ople)$/i, "$1rson"],
1991
+ [/(child)ren$/i, "$1"],
1992
+ [/(eau)x?$/i, "$1"],
1993
+ [/men$/i, "man"]
1994
+ ].forEach(function(rule) {
1995
+ return pluralize2.addSingularRule(rule[0], rule[1]);
1996
+ });
1997
+ [
1998
+ // Singular words with no plurals.
1999
+ "adulthood",
2000
+ "advice",
2001
+ "agenda",
2002
+ "aid",
2003
+ "aircraft",
2004
+ "alcohol",
2005
+ "ammo",
2006
+ "analytics",
2007
+ "anime",
2008
+ "athletics",
2009
+ "audio",
2010
+ "bison",
2011
+ "blood",
2012
+ "bream",
2013
+ "buffalo",
2014
+ "butter",
2015
+ "carp",
2016
+ "cash",
2017
+ "chassis",
2018
+ "chess",
2019
+ "clothing",
2020
+ "cod",
2021
+ "commerce",
2022
+ "cooperation",
2023
+ "corps",
2024
+ "debris",
2025
+ "diabetes",
2026
+ "digestion",
2027
+ "elk",
2028
+ "energy",
2029
+ "equipment",
2030
+ "excretion",
2031
+ "expertise",
2032
+ "firmware",
2033
+ "flounder",
2034
+ "fun",
2035
+ "gallows",
2036
+ "garbage",
2037
+ "graffiti",
2038
+ "hardware",
2039
+ "headquarters",
2040
+ "health",
2041
+ "herpes",
2042
+ "highjinks",
2043
+ "homework",
2044
+ "housework",
2045
+ "information",
2046
+ "jeans",
2047
+ "justice",
2048
+ "kudos",
2049
+ "labour",
2050
+ "literature",
2051
+ "machinery",
2052
+ "mackerel",
2053
+ "mail",
2054
+ "media",
2055
+ "mews",
2056
+ "moose",
2057
+ "music",
2058
+ "mud",
2059
+ "manga",
2060
+ "news",
2061
+ "only",
2062
+ "personnel",
2063
+ "pike",
2064
+ "plankton",
2065
+ "pliers",
2066
+ "police",
2067
+ "pollution",
2068
+ "premises",
2069
+ "rain",
2070
+ "research",
2071
+ "rice",
2072
+ "salmon",
2073
+ "scissors",
2074
+ "series",
2075
+ "sewage",
2076
+ "shambles",
2077
+ "shrimp",
2078
+ "software",
2079
+ "species",
2080
+ "staff",
2081
+ "swine",
2082
+ "tennis",
2083
+ "traffic",
2084
+ "transportation",
2085
+ "trout",
2086
+ "tuna",
2087
+ "wealth",
2088
+ "welfare",
2089
+ "whiting",
2090
+ "wildebeest",
2091
+ "wildlife",
2092
+ "you",
2093
+ /pok[eé]mon$/i,
2094
+ // Regexes.
2095
+ /[^aeiou]ese$/i,
2096
+ // "chinese", "japanese"
2097
+ /deer$/i,
2098
+ // "deer", "reindeer"
2099
+ /fish$/i,
2100
+ // "fish", "blowfish", "angelfish"
2101
+ /measles$/i,
2102
+ /o[iu]s$/i,
2103
+ // "carnivorous"
2104
+ /pox$/i,
2105
+ // "chickpox", "smallpox"
2106
+ /sheep$/i
2107
+ ].forEach(pluralize2.addUncountableRule);
2108
+ return pluralize2;
2109
+ });
2110
+ })(pluralize$1, pluralize$1.exports);
2111
+ var pluralizeExports = pluralize$1.exports;
2112
+ const pluralizePkg = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
2113
+ const magicSplit = /^[a-zà-öø-ÿа-я]+|[A-ZÀ-ÖØ-ßА-Я][a-zà-öø-ÿа-я]+|[a-zà-öø-ÿа-я]+|[0-9]+|[A-ZÀ-ÖØ-ßА-Я]+(?![a-zà-öø-ÿа-я])/g;
2114
+ const spaceSplit = /\S+/g;
2115
+ function getPartsAndIndexes(string2, splitRegex) {
2116
+ const result = { parts: [], prefixes: [] };
2117
+ const matches = string2.matchAll(splitRegex);
2118
+ let lastWordEndIndex = 0;
2119
+ for (const match of matches) {
2120
+ if (typeof match.index !== "number")
2121
+ continue;
2122
+ const word = match[0];
2123
+ result.parts.push(word);
2124
+ const prefix = string2.slice(lastWordEndIndex, match.index).trim();
2125
+ result.prefixes.push(prefix);
2126
+ lastWordEndIndex = match.index + word.length;
2127
+ }
2128
+ const tail = string2.slice(lastWordEndIndex).trim();
2129
+ if (tail) {
2130
+ result.parts.push("");
2131
+ result.prefixes.push(tail);
2132
+ }
2133
+ return result;
2134
+ }
2135
+ function splitAndPrefix(string2, options) {
2136
+ const { keepSpecialCharacters = false, keep, prefix = "" } = options || {};
2137
+ const normalString = string2.trim().normalize("NFC");
2138
+ const hasSpaces = normalString.includes(" ");
2139
+ const split = hasSpaces ? spaceSplit : magicSplit;
2140
+ const partsAndIndexes = getPartsAndIndexes(normalString, split);
2141
+ return partsAndIndexes.parts.map((_part, i) => {
2142
+ let foundPrefix = partsAndIndexes.prefixes[i] || "";
2143
+ let part = _part;
2144
+ if (keepSpecialCharacters === false) {
2145
+ if (keep) {
2146
+ part = part.normalize("NFD").replace(new RegExp(`[^a-zA-ZØßø0-9${keep.join("")}]`, "g"), "");
2147
+ }
2148
+ if (!keep) {
2149
+ part = part.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g, "");
2150
+ foundPrefix = "";
2151
+ }
2152
+ }
2153
+ if (keep && foundPrefix) {
2154
+ foundPrefix = foundPrefix.replace(new RegExp(`[^${keep.join("")}]`, "g"), "");
2155
+ }
2156
+ if (i === 0) {
2157
+ return foundPrefix + part;
2158
+ }
2159
+ if (!foundPrefix && !part)
2160
+ return "";
2161
+ if (!hasSpaces) {
2162
+ return (foundPrefix || prefix) + part;
2163
+ }
2164
+ if (!foundPrefix && prefix.match(/\s/)) {
2165
+ return " " + part;
2166
+ }
2167
+ return (foundPrefix || prefix) + part;
2168
+ }).filter(Boolean);
2169
+ }
2170
+ function capitaliseWord(string2) {
2171
+ const match = string2.matchAll(magicSplit).next().value;
2172
+ const firstLetterIndex = match ? match.index : 0;
2173
+ return string2.slice(0, firstLetterIndex + 1).toUpperCase() + string2.slice(firstLetterIndex + 1).toLowerCase();
2174
+ }
2175
+ function camelCase(string2, options) {
2176
+ return splitAndPrefix(string2, options).reduce((result, word, index) => {
2177
+ return index === 0 || !(word[0] || "").match(magicSplit) ? result + word.toLowerCase() : result + capitaliseWord(word);
2178
+ }, "");
2179
+ }
2180
+ function pascalCase(string2, options) {
2181
+ return splitAndPrefix(string2, options).reduce((result, word) => {
2182
+ return result + capitaliseWord(word);
2183
+ }, "");
2184
+ }
2185
+ function kebabCase(string2, options) {
2186
+ return splitAndPrefix(string2, { ...options, prefix: "-" }).join("").toLowerCase();
2187
+ }
2188
+ function snakeCase(string2, options) {
2189
+ return splitAndPrefix(string2, { ...options, prefix: "_" }).join("").toLowerCase();
2190
+ }
2191
+ function trainCase(string2, options) {
2192
+ return splitAndPrefix(string2, { ...options, prefix: "-" }).map((word) => capitaliseWord(word)).join("");
2193
+ }
2194
+ function dotNotation(string2, options) {
2195
+ return splitAndPrefix(string2, { ...options, prefix: "." }).join("");
2196
+ }
2197
+ function capitalCase(string2, options = { keepSpecialCharacters: true }) {
2198
+ return splitAndPrefix(string2, { ...options, prefix: " " }).reduce((result, word) => {
2199
+ return result + capitaliseWord(word);
2200
+ }, "");
2201
+ }
2202
+ var bytes_default = {
2203
+ /**
2204
+ * Formats bytes to a human-readable string value. When input cannot be formatted, the `null` value is returned. The accepted options are as follows.
2205
+ *
2206
+ - `decimalPlaces`: Maximum number of decimal places to include in output. `default=2`.
2207
+ - `fixedDecimals`: Whether to always display the maximum number of decimal places. `default=false`.
2208
+ - `thousandsSeparator`: Specify the separator for thousands. `default=''`.
2209
+ - `unit`: The unit in which the result will be returned. It could be `B/KB/MB/GB/TB`. The default behavior is to auto-detect based on the input.
2210
+ - `unitSeparator`: The separator between the value and the `unit`. `default=''`.
2211
+ */
2212
+ format(valueInBytes, options) {
2213
+ return bytes$1.format(valueInBytes, options);
2214
+ },
2215
+ /**
2216
+ * Parse a human-readable string expression to bytes. If the unit value is a number, it will be
2217
+ * returned as it is. Otherwise, the string expression will be converted to a number representing
2218
+ * bytes.
2219
+ *
2220
+ * The `null` value is returned when the input cannot be parsed.
2221
+ *
2222
+ * Supported units and abbreviations are as follows and are case-insensitive:
2223
+ - `b` for bytes
2224
+ - `kb` for kilobytes
2225
+ - `mb` for megabytes
2226
+ - `gb` for gigabytes
2227
+ - `tb` for terabytes
2228
+ - `pb` for petabytes
2229
+ */
2230
+ parse(unit) {
2231
+ if (typeof unit === "number") {
2232
+ return unit;
2233
+ }
2234
+ return bytes$1.parse(unit);
2235
+ }
2236
+ };
2237
+ var uuidGenerator = randomUUID;
2238
+ function uuid(options) {
2239
+ return uuidGenerator(options);
2240
+ }
2241
+ uuid.use = function uuidUse(generator) {
2242
+ uuidGenerator = generator;
2243
+ };
2244
+ uuid.restore = function uuidRestore() {
2245
+ uuidGenerator = randomUUID;
2246
+ };
2247
+ var seconds_default = {
2248
+ /**
2249
+ * Formats seconds to pretty string output
2250
+ */
2251
+ format(seconds, long) {
2252
+ return format(seconds * 1e3, long);
2253
+ },
2254
+ /**
2255
+ * Parse the time expression to seconds. If the unit value is a number, then
2256
+ * it will be returned as it is. Otherwise the string expression will be
2257
+ * converted to a number representing seconds.
2258
+ */
2259
+ parse(duration) {
2260
+ if (typeof duration === "number") {
2261
+ return duration;
2262
+ }
2263
+ const milliseconds = parse(duration);
2264
+ if (milliseconds === void 0) {
2265
+ throw new Error(`Invalid duration expression "${duration}"`);
2266
+ }
2267
+ return Math.floor(milliseconds / 1e3);
2268
+ }
2269
+ };
2270
+ var slug = slugifyPkg;
2271
+ var defaultGenerator = (size) => {
2272
+ const bits = (size + 1) * 6;
2273
+ const buffer = randomBytes(Math.ceil(bits / 8));
2274
+ return Buffer.from(buffer).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "").slice(0, size);
2275
+ };
2276
+ var randomGenerator = defaultGenerator;
2277
+ function random(size) {
2278
+ return randomGenerator(size);
2279
+ }
2280
+ random.use = function randomUse(generator) {
2281
+ randomGenerator = generator;
2282
+ };
2283
+ random.restore = function randomRestore() {
2284
+ randomGenerator = defaultGenerator;
2285
+ };
2286
+ function excerpt(sentence2, charactersLimit, options) {
2287
+ return truncatise2(sentence2, {
2288
+ TruncateLength: charactersLimit,
2289
+ /**
2290
+ * Do not complete words when "completeWords" is not explicitly set
2291
+ * to true
2292
+ */
2293
+ Strict: options && options.completeWords === true ? false : true,
2294
+ StripHTML: true,
2295
+ TruncateBy: "characters",
2296
+ Suffix: options && options.suffix
2297
+ });
2298
+ }
2299
+ function applyPadding(value, options) {
2300
+ if (options.paddingLeft) {
2301
+ value = `${options.paddingChar.repeat(options.paddingLeft)}${value}`;
2302
+ }
2303
+ if (options.paddingRight) {
2304
+ value = `${value}${options.paddingChar.repeat(options.paddingRight)}`;
2305
+ }
2306
+ return value;
2307
+ }
2308
+ function justify(columns, options) {
2309
+ const normalizedOptions = {
2310
+ align: "left",
2311
+ indent: " ",
2312
+ ...options
2313
+ };
2314
+ return columns.map((column) => {
2315
+ var _a2;
2316
+ const columnWidth = ((_a2 = options.getLength) == null ? void 0 : _a2.call(options, column)) ?? column.length;
2317
+ if (columnWidth >= normalizedOptions.width) {
2318
+ return column;
2319
+ }
2320
+ if (normalizedOptions.align === "left") {
2321
+ return applyPadding(column, {
2322
+ paddingChar: normalizedOptions.indent,
2323
+ paddingRight: normalizedOptions.width - columnWidth
2324
+ });
2325
+ }
2326
+ return applyPadding(column, {
2327
+ paddingChar: normalizedOptions.indent,
2328
+ paddingLeft: normalizedOptions.width - columnWidth
2329
+ });
2330
+ });
2331
+ }
2332
+ function ordinal(value) {
2333
+ const transformedValue = Math.abs(typeof value === "string" ? Number.parseInt(value) : value);
2334
+ if (!Number.isFinite(transformedValue) || Number.isNaN(transformedValue)) {
2335
+ throw new Error("Cannot ordinalize invalid or infinite numbers");
2336
+ }
2337
+ const percent = transformedValue % 100;
2338
+ if (percent >= 10 && percent <= 20) {
2339
+ return `${value}th`;
2340
+ }
2341
+ const decimal = transformedValue % 10;
2342
+ switch (decimal) {
2343
+ case 1:
2344
+ return `${value}st`;
2345
+ case 2:
2346
+ return `${value}nd`;
2347
+ case 3:
2348
+ return `${value}rd`;
2349
+ default:
2350
+ return `${value}th`;
2351
+ }
2352
+ }
2353
+ function truncate(sentence2, charactersLimit, options) {
2354
+ return truncatise2(sentence2, {
2355
+ TruncateLength: charactersLimit,
2356
+ /**
2357
+ * Do not complete words when "completeWords" is not explicitly set
2358
+ * to true
2359
+ */
2360
+ Strict: options && options.completeWords === true ? false : true,
2361
+ StripHTML: false,
2362
+ TruncateBy: "characters",
2363
+ Suffix: options && options.suffix
2364
+ });
2365
+ }
2366
+ function sentence(values, options) {
2367
+ if (values.length === 0) {
2368
+ return "";
2369
+ }
2370
+ if (values.length === 1) {
2371
+ return values[0];
2372
+ }
2373
+ if (values.length === 2) {
2374
+ return `${values[0]}${(options == null ? void 0 : options.pairSeparator) || " and "}${values[1]}`;
2375
+ }
2376
+ const normalized = Object.assign({ separator: ", ", lastSeparator: ", and " }, options);
2377
+ return `${values.slice(0, -1).join(normalized.separator)}${normalized.lastSeparator}${values[values.length - 1]}`;
2378
+ }
2379
+ function wordWrap(value, options) {
2380
+ const width = options.width;
2381
+ const indent = options.indent ?? "";
2382
+ const newLine = `${options.newLine ?? "\n"}${indent}`;
2383
+ let regexString = ".{1," + width + "}";
2384
+ regexString += "([\\s​]+|$)|[^\\s​]+?([\\s​]+|$)";
2385
+ const re = new RegExp(regexString, "g");
2386
+ const lines = value.match(re) || [];
2387
+ const result = lines.map(function(line) {
2388
+ if (line.slice(-1) === "\n") {
2389
+ line = line.slice(0, line.length - 1);
2390
+ }
2391
+ return options.escape ? options.escape(line) : line;
2392
+ }).join(newLine);
2393
+ return result;
2394
+ }
2395
+ var milliseconds_default = {
2396
+ /**
2397
+ * Formats milliseconds to pretty string output
2398
+ */
2399
+ format(milliseconds, long) {
2400
+ return format(milliseconds, long);
2401
+ },
2402
+ /**
2403
+ * Parse the time expression to milliseconds. If the unit value is a number,
2404
+ * then it will be returned as it is. Otherwise the string expression will
2405
+ * be converted to a number representing seconds.
2406
+ */
2407
+ parse(duration) {
2408
+ if (typeof duration === "number") {
2409
+ return duration;
2410
+ }
2411
+ const milliseconds = parse(duration);
2412
+ if (milliseconds === void 0) {
2413
+ throw new Error(`Invalid duration expression "${duration}"`);
2414
+ }
2415
+ return milliseconds;
2416
+ }
2417
+ };
2418
+ function htmlEscape(value) {
2419
+ return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2420
+ }
2421
+ function parseProp(data, key) {
2422
+ const tokens = key.split(".");
2423
+ while (tokens.length) {
2424
+ if (data === null || typeof data !== "object") {
2425
+ return;
2426
+ }
2427
+ const token = tokens.shift();
2428
+ data = Object.hasOwn(data, token) ? data[token] : void 0;
2429
+ }
2430
+ return data;
2431
+ }
2432
+ function interpolate(input, data) {
2433
+ return input.replace(/(\\)?{{(.*?)}}/g, (_, escapeChar, key) => {
2434
+ if (escapeChar) {
2435
+ return `{{${key}}}`;
2436
+ }
2437
+ return parseProp(data, key.trim());
2438
+ });
2439
+ }
2440
+ function toUnixSlash(path) {
2441
+ const isExtendedLengthPath = path.startsWith("\\\\?\\");
2442
+ if (isExtendedLengthPath) {
2443
+ return path;
2444
+ }
2445
+ return path.replace(/\\/g, "/");
2446
+ }
2447
+ function pluralize(word, count, inclusive) {
2448
+ return pluralizePkg(word, count, inclusive);
2449
+ }
2450
+ pluralize.addPluralRule = pluralizePkg.addPluralRule;
2451
+ pluralize.addSingularRule = pluralizePkg.addSingularRule;
2452
+ pluralize.addIrregularRule = pluralizePkg.addIrregularRule;
2453
+ pluralize.addUncountableRule = pluralizePkg.addUncountableRule;
2454
+ var plural = pluralizePkg.plural;
2455
+ var singular = pluralizePkg.singular;
2456
+ var isPlural = pluralizePkg.isPlural;
2457
+ var isSingular = pluralizePkg.isSingular;
2458
+ var NO_CASE_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
2459
+ var NO_CASE_STRIP_REGEXP = /[^A-Z0-9]+/gi;
2460
+ var SMALL_WORDS = /\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i;
2461
+ var TOKENS = /[^\s:–—-]+|./g;
2462
+ var WHITESPACE = /\s/;
2463
+ var IS_MANUAL_CASE = /.(?=[A-Z]|\..)/;
2464
+ var ALPHANUMERIC_PATTERN = /[A-Za-z0-9\u00C0-\u00FF]/;
2465
+ function titleCase(input) {
2466
+ let output = "";
2467
+ let result;
2468
+ while ((result = TOKENS.exec(input)) !== null) {
2469
+ const { 0: token, index } = result;
2470
+ if (!IS_MANUAL_CASE.test(token) && (!SMALL_WORDS.test(token) || index === 0 || index + token.length === input.length) && (input.charAt(index + token.length) !== ":" || WHITESPACE.test(input.charAt(index + token.length + 1)))) {
2471
+ output += token.replace(ALPHANUMERIC_PATTERN, (char) => char.toUpperCase());
2472
+ continue;
2473
+ }
2474
+ output += token;
2475
+ }
2476
+ return output;
2477
+ }
2478
+ function camelCase2(value) {
2479
+ return camelCase(value);
2480
+ }
2481
+ function snakeCase2(value) {
2482
+ return snakeCase(value);
2483
+ }
2484
+ function dashCase(value, options) {
2485
+ if (options && options.capitalize) {
2486
+ return trainCase(value);
2487
+ }
2488
+ return kebabCase(value);
2489
+ }
2490
+ function pascalCase2(value) {
2491
+ return pascalCase(value);
2492
+ }
2493
+ function capitalCase2(value) {
2494
+ return capitalCase(value);
2495
+ }
2496
+ function sentenceCase(value) {
2497
+ return noCase(value, (input, index) => {
2498
+ const result = input.toLowerCase();
2499
+ if (index === 0) {
2500
+ return input.charAt(0).toUpperCase() + input.substring(1);
2501
+ }
2502
+ return result;
2503
+ });
2504
+ }
2505
+ function dotCase(value, options) {
2506
+ const transformedValue = dotNotation(value);
2507
+ if (options && options.lowerCase) {
2508
+ return transformedValue.toLowerCase();
2509
+ }
2510
+ return transformedValue;
2511
+ }
2512
+ function noCase(value, transform) {
2513
+ let result = NO_CASE_SPLIT_REGEXP.reduce((input, regex) => input.replace(regex, "$1\0$2"), value);
2514
+ result = result.replace(NO_CASE_STRIP_REGEXP, "\0");
2515
+ let start = 0;
2516
+ let end = result.length;
2517
+ while (result.charAt(start) === "\0") {
2518
+ start++;
2519
+ }
2520
+ while (result.charAt(end - 1) === "\0") {
2521
+ end--;
2522
+ }
2523
+ return result.slice(start, end).split("\0").map(transform || ((input) => input.toLowerCase())).join(" ");
2524
+ }
2525
+ function condenseWhitespace(value) {
2526
+ return value.trim().replace(/\s{2,}/g, " ");
2527
+ }
2528
+ var string = {
2529
+ excerpt,
2530
+ truncate,
2531
+ slug,
2532
+ interpolate,
2533
+ plural,
2534
+ pluralize,
2535
+ singular,
2536
+ isPlural,
2537
+ isSingular,
2538
+ camelCase: camelCase2,
2539
+ capitalCase: capitalCase2,
2540
+ dashCase,
2541
+ dotCase,
2542
+ noCase,
2543
+ pascalCase: pascalCase2,
2544
+ sentenceCase,
2545
+ snakeCase: snakeCase2,
2546
+ titleCase,
2547
+ random,
2548
+ sentence,
2549
+ condenseWhitespace,
2550
+ wordWrap,
2551
+ seconds: seconds_default,
2552
+ milliseconds: milliseconds_default,
2553
+ bytes: bytes_default,
2554
+ ordinal,
2555
+ htmlEscape,
2556
+ justify,
2557
+ uuid,
2558
+ toUnixSlash
2559
+ };
2560
+ var index_default = string;
2561
+ var ObjectBuilder = (_a = class {
2562
+ constructor(initialValue, ignoreNull) {
2563
+ __privateAdd(this, _ignoreNull);
2564
+ __publicField(this, "values");
2565
+ this.values = initialValue;
2566
+ __privateSet(this, _ignoreNull, ignoreNull === true ? true : false);
2567
+ }
2568
+ add(key, value) {
2569
+ if (value === void 0) {
2570
+ return this;
2571
+ }
2572
+ if (__privateGet(this, _ignoreNull) === true && value === null) {
2573
+ return this;
2574
+ }
2575
+ this.values[key] = value;
2576
+ return this;
2577
+ }
2578
+ /**
2579
+ * Remove key from the object
2580
+ */
2581
+ remove(key) {
2582
+ delete this.values[key];
2583
+ return this;
2584
+ }
2585
+ /**
2586
+ * Find if a value exists
2587
+ */
2588
+ has(key) {
2589
+ return this.get(key) !== void 0;
2590
+ }
2591
+ /**
2592
+ * Get the existing value for a given key
2593
+ */
2594
+ get(key) {
2595
+ return this.values[key];
2596
+ }
2597
+ /**
2598
+ * Get the underlying constructed object
2599
+ */
2600
+ toObject() {
2601
+ return this.values;
2602
+ }
2603
+ }, _ignoreNull = new WeakMap(), _a);
2604
+ const object_builder_star = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2605
+ __proto__: null,
2606
+ get ObjectBuilder() {
2607
+ return ObjectBuilder;
2608
+ }
2609
+ }, Symbol.toStringTag, { value: "Module" }));
2610
+ var Base64 = class {
2611
+ encode(data, encoding) {
2612
+ if (typeof data === "string") {
2613
+ return Buffer.from(data, encoding).toString("base64");
2614
+ }
2615
+ if (Buffer.isBuffer(data)) {
2616
+ return data.toString("base64");
2617
+ }
2618
+ return Buffer.from(data).toString("base64");
2619
+ }
2620
+ decode(encoded, encoding = "utf-8", strict = false) {
2621
+ if (Buffer.isBuffer(encoded)) {
2622
+ return encoded.toString(encoding);
2623
+ }
2624
+ const decoded = Buffer.from(encoded, "base64").toString(encoding);
2625
+ const isInvalid = this.encode(decoded, encoding) !== encoded;
2626
+ if (strict && isInvalid) {
2627
+ throw new Error("Cannot decode malformed value");
2628
+ }
2629
+ return isInvalid ? null : decoded;
2630
+ }
2631
+ urlEncode(data, encoding) {
2632
+ const encoded = typeof data === "string" ? this.encode(data, encoding) : this.encode(data);
2633
+ return encoded.replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
2634
+ }
2635
+ urlDecode(encoded, encoding = "utf-8", strict = false) {
2636
+ if (Buffer.isBuffer(encoded)) {
2637
+ return encoded.toString(encoding);
2638
+ }
2639
+ const decoded = Buffer.from(encoded, "base64").toString(encoding);
2640
+ const isInvalid = this.urlEncode(decoded, encoding) !== encoded;
2641
+ if (strict && isInvalid) {
2642
+ throw new Error("Cannot urlDecode malformed value");
2643
+ }
2644
+ return isInvalid ? null : decoded;
2645
+ }
2646
+ };
2647
+ new Base64();
2648
+ function defineStaticProperty(self2, propertyName, {
2649
+ initialValue,
2650
+ strategy
2651
+ }) {
2652
+ if (!self2.hasOwnProperty(propertyName)) {
2653
+ const value = self2[propertyName];
2654
+ if (strategy === "define" || value === void 0) {
2655
+ Object.defineProperty(self2, propertyName, {
2656
+ value: initialValue,
2657
+ configurable: true,
2658
+ enumerable: true,
2659
+ writable: true
2660
+ });
2661
+ return;
2662
+ }
2663
+ Object.defineProperty(self2, propertyName, {
2664
+ value: typeof strategy === "function" ? strategy(value) : lodash.cloneDeep(value),
2665
+ configurable: true,
2666
+ enumerable: true,
2667
+ writable: true
2668
+ });
2669
+ }
2670
+ }
2671
+ var object_builder_exports = {};
2672
+ __reExport(object_builder_exports, object_builder_star);
2673
+ object_builder_exports.ObjectBuilder;
2674
+ const messageFromJoiValidationError = (reason, fallback) => {
2675
+ return reason ? reason.details.map((d) => d.message).join(" and ") : fallback;
2676
+ };
2677
+ class E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS extends Exception {
2678
+ constructor(name, reason) {
2679
+ const msg = `Invalid Options for "${name}": ` + messageFromJoiValidationError(
2680
+ reason,
2681
+ "The options provided are not compatible with the data type"
2682
+ );
2683
+ super(msg, {
2684
+ code: "E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS",
2685
+ status: 500,
2686
+ cause: reason
2687
+ });
2688
+ Object.defineProperty(this, "details", {
2689
+ value: reason == null ? void 0 : reason.details,
2690
+ enumerable: true,
2691
+ writable: false,
2692
+ configurable: false
2693
+ });
2694
+ }
2695
+ }
2696
+ __publicField(E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS, "status", 500);
2697
+ __publicField(E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS, "code", "E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS");
2698
+ class E_INVALID_RESOURCEFUL_MIXIN_OPTIONS extends Exception {
2699
+ constructor(name, reason) {
2700
+ const msg = `Invalid 'withResourceful' options for "${name}": ` + messageFromJoiValidationError(
2701
+ reason,
2702
+ "The options provided are not compatible with the withResourceful mixin"
2703
+ );
2704
+ super(msg, {
2705
+ code: "E_INVALID_RESOURCEFUL_MIXIN_OPTIONS",
2706
+ status: 500,
2707
+ cause: reason
2708
+ });
2709
+ Object.defineProperty(this, "details", {
2710
+ value: reason == null ? void 0 : reason.details,
2711
+ enumerable: true,
2712
+ writable: false,
2713
+ configurable: false
2714
+ });
2715
+ }
2716
+ }
2717
+ __publicField(E_INVALID_RESOURCEFUL_MIXIN_OPTIONS, "status", 500);
2718
+ __publicField(E_INVALID_RESOURCEFUL_MIXIN_OPTIONS, "code", "E_INVALID_RESOURCEFUL_MIXIN_OPTIONS");
2719
+ const E_INVALID_PREPARED_VALUE = createError(
2720
+ "E_INVALID_PREPARED_VALUE",
2721
+ 'The value for "%s" is not a valid %s',
2722
+ 422
2723
+ );
2724
+ const E_INVALID_CONSUMED_VALUE = createError(
2725
+ "E_INVALID_CONSUMED_VALUE",
2726
+ 'The value for "%s" could not be consumed as a valid %s',
2727
+ 500
2728
+ );
2729
+ const E_UNCASTABLE = createError(
2730
+ "E_UNCASTABLE",
2731
+ "The value could not be cast to a valid %s",
2732
+ 500
2733
+ );
2734
+ class E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS extends Exception {
2735
+ constructor(decoratorName, fieldName, reason) {
2736
+ const msg = `Invalid "@${decoratorName}" Options for "${fieldName}": ` + messageFromJoiValidationError(
2737
+ reason,
2738
+ "The options provided are not compatible with the decorator's requirements"
2739
+ );
2740
+ super(msg, {
2741
+ code: "E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS",
2742
+ status: 500,
2743
+ cause: reason
2744
+ });
2745
+ Object.defineProperty(this, "details", {
2746
+ value: reason == null ? void 0 : reason.details,
2747
+ enumerable: true,
2748
+ writable: false,
2749
+ configurable: false
2750
+ });
2751
+ }
2752
+ }
2753
+ __publicField(E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS, "status", 500);
2754
+ __publicField(E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS, "code", "E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS");
2755
+ class E_FORBIDDEN extends Exception {
2756
+ constructor(message) {
2757
+ const msg = message;
2758
+ super(msg, {
2759
+ code: "E_FORBIDDEN",
2760
+ status: 403
2761
+ });
2762
+ Object.defineProperty(this, "details", {
2763
+ value: msg,
2764
+ enumerable: true,
2765
+ writable: false,
2766
+ configurable: false
2767
+ });
2768
+ }
2769
+ }
2770
+ __publicField(E_FORBIDDEN, "status", 403);
2771
+ __publicField(E_FORBIDDEN, "code", "E_FORBIDDEN");
2772
+ class E_INVALID_LUCENE_QUERY extends Exception {
2773
+ constructor(message) {
2774
+ const msg = `Invalid Lucene query: ${message}`;
2775
+ super(msg, {
2776
+ code: "E_INVALID_LUCENE_QUERY",
2777
+ status: 400
2778
+ });
2779
+ Object.defineProperty(this, "details", {
2780
+ value: msg,
2781
+ enumerable: true,
2782
+ writable: false,
2783
+ configurable: false
2784
+ });
2785
+ }
2786
+ }
2787
+ __publicField(E_INVALID_LUCENE_QUERY, "status", 400);
2788
+ __publicField(E_INVALID_LUCENE_QUERY, "code", "E_INVALID_LUCENE_QUERY");
2789
+ class E_INVALID_COLUMN_ACCESS extends Exception {
2790
+ constructor(columnName) {
2791
+ const msg = `You don't have access to column "${columnName}" or the column does not exist.`;
2792
+ super(msg, {
2793
+ code: "E_INVALID_COLUMN_ACCESS",
2794
+ status: 403
2795
+ });
2796
+ Object.defineProperty(this, "details", {
2797
+ value: msg,
2798
+ enumerable: true,
2799
+ writable: false,
2800
+ configurable: false
2801
+ });
2802
+ }
2803
+ }
2804
+ __publicField(E_INVALID_COLUMN_ACCESS, "status", 403);
2805
+ __publicField(E_INVALID_COLUMN_ACCESS, "code", "E_INVALID_COLUMN_ACCESS");
2806
+ class E_UNEXPECTED_COLUMN_IN_QUERY extends Exception {
2807
+ constructor(columnName) {
2808
+ const msg = `Unexpected column in query: "${columnName}"`;
2809
+ super(msg, {
2810
+ code: "E_UNEXPECTED_COLUMN_IN_QUERY",
2811
+ status: 400
2812
+ });
2813
+ Object.defineProperty(this, "details", {
2814
+ value: msg,
2815
+ enumerable: true,
2816
+ writable: false,
2817
+ configurable: false
2818
+ });
2819
+ }
2820
+ }
2821
+ __publicField(E_UNEXPECTED_COLUMN_IN_QUERY, "status", 400);
2822
+ __publicField(E_UNEXPECTED_COLUMN_IN_QUERY, "code", "E_UNEXPECTED_COLUMN_IN_QUERY");
2823
+ class E_LUCENE_SYNTAX_EXCEPTION extends Exception {
2824
+ constructor(original) {
2825
+ const msg = `${original.message} at line ${original.line}, column ${original.column}, offset ${original.offset}`;
2826
+ super(msg, {
2827
+ code: "E_LUCENE_SYNTAX_EXCEPTION",
2828
+ status: 422,
2829
+ cause: original
2830
+ });
2831
+ Object.defineProperty(this, "offset", {
2832
+ value: original.offset,
2833
+ enumerable: true,
2834
+ writable: false,
2835
+ configurable: false
2836
+ });
2837
+ Object.defineProperty(this, "line", {
2838
+ value: original.line,
2839
+ enumerable: true,
2840
+ writable: false,
2841
+ configurable: false
2842
+ });
2843
+ Object.defineProperty(this, "column", {
2844
+ value: original.column,
2845
+ enumerable: true,
2846
+ writable: false,
2847
+ configurable: false
2848
+ });
2849
+ }
2850
+ }
2851
+ __publicField(E_LUCENE_SYNTAX_EXCEPTION, "status", 422);
2852
+ __publicField(E_LUCENE_SYNTAX_EXCEPTION, "code", "E_LUCENE_SYNTAX_EXCEPTION");
2853
+ class E_LUCENE_UNEXPECTED_EXCEPTION extends Exception {
2854
+ constructor(original) {
2855
+ const msg = `Unexpected error while processing Lucene query: ${original instanceof Error ? original.message : String(original)}`;
2856
+ super(msg, {
2857
+ code: "E_LUCENE_UNEXPECTED_EXCEPTION",
2858
+ status: 503,
2859
+ cause: original
2860
+ });
2861
+ }
2862
+ }
2863
+ __publicField(E_LUCENE_UNEXPECTED_EXCEPTION, "status", 503);
2864
+ __publicField(E_LUCENE_UNEXPECTED_EXCEPTION, "code", "E_LUCENE_UNEXPECTED_EXCEPTION");
2865
+ class E_LUCENE_INVALID_TYPE extends Exception {
2866
+ constructor(type) {
2867
+ const msg = `"${type}" is not a valid Lucene AST type.`;
2868
+ super(msg, {
2869
+ code: "E_LUCENE_INVALID_TYPE",
2870
+ status: 503
2871
+ });
2872
+ }
2873
+ }
2874
+ __publicField(E_LUCENE_INVALID_TYPE, "status", 503);
2875
+ __publicField(E_LUCENE_INVALID_TYPE, "code", "E_LUCENE_INVALID_TYPE");
2876
+ class E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION extends Exception {
2877
+ constructor(reason) {
2878
+ super(messageFromJoiValidationError(reason, "Your request could not be fulfilled"), {
2879
+ code: "E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION",
2880
+ status: 422,
2881
+ cause: reason
2882
+ });
2883
+ Object.defineProperty(this, "details", {
2884
+ value: reason == null ? void 0 : reason.details,
2885
+ enumerable: true,
2886
+ writable: false,
2887
+ configurable: false
2888
+ });
2889
+ }
2890
+ }
2891
+ __publicField(E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION, "status", 422);
2892
+ __publicField(E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION, "code", "E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION");
2893
+ class E_MISSING_PRIMARY_KEY_EXCEPTION extends Exception {
2894
+ constructor(type) {
2895
+ const msg = `"${type}" does not have a primary key defined`;
2896
+ super(msg, {
2897
+ code: "E_MISSING_PRIMARY_KEY_EXCEPTION",
2898
+ status: 503
2899
+ });
2900
+ }
2901
+ }
2902
+ __publicField(E_MISSING_PRIMARY_KEY_EXCEPTION, "status", 503);
2903
+ __publicField(E_MISSING_PRIMARY_KEY_EXCEPTION, "code", "E_MISSING_PRIMARY_KEY_EXCEPTION");
2904
+ class E_RECORD_NOT_FOUND_EXCEPTION extends Exception {
2905
+ constructor() {
2906
+ const msg = `The record is not present or User doesn't have access to it.`;
2907
+ super(msg, {
2908
+ code: "E_RECORD_NOT_FOUND_EXCEPTION",
2909
+ status: 404
2910
+ });
2911
+ }
2912
+ }
2913
+ __publicField(E_RECORD_NOT_FOUND_EXCEPTION, "status", 404);
2914
+ __publicField(E_RECORD_NOT_FOUND_EXCEPTION, "code", "E_RECORD_NOT_FOUND_EXCEPTION");
2915
+ class E_INVALID_PAYLOAD_EXCEPTION extends Exception {
2916
+ constructor(reason) {
2917
+ super(
2918
+ messageFromJoiValidationError(reason, "Your submission does not pass validation criteria"),
2919
+ {
2920
+ code: "E_INVALID_PAYLOAD_EXCEPTION",
2921
+ status: 422,
2922
+ cause: reason
2923
+ }
2924
+ );
2925
+ Object.defineProperty(this, "details", {
2926
+ value: reason == null ? void 0 : reason.details,
2927
+ enumerable: true,
2928
+ writable: false,
2929
+ configurable: false
2930
+ });
2931
+ }
2932
+ }
2933
+ __publicField(E_INVALID_PAYLOAD_EXCEPTION, "status", 422);
2934
+ __publicField(E_INVALID_PAYLOAD_EXCEPTION, "code", "E_INVALID_PAYLOAD_EXCEPTION");
2935
+ class E_FORBIDDEN_PAYLOAD_EXCEPTION extends Exception {
2936
+ constructor(reason) {
2937
+ super(
2938
+ messageFromJoiValidationError(reason, "Your submission does not pass authorization criteria"),
2939
+ {
2940
+ code: "E_FORBIDDEN_PAYLOAD_EXCEPTION",
2941
+ status: 403,
2942
+ cause: reason
2943
+ }
2944
+ );
2945
+ Object.defineProperty(this, "details", {
2946
+ value: reason == null ? void 0 : reason.details,
2947
+ enumerable: true,
2948
+ writable: false,
2949
+ configurable: false
2950
+ });
2951
+ }
2952
+ }
2953
+ __publicField(E_FORBIDDEN_PAYLOAD_EXCEPTION, "status", 403);
2954
+ __publicField(E_FORBIDDEN_PAYLOAD_EXCEPTION, "code", "E_FORBIDDEN_PAYLOAD_EXCEPTION");
2955
+ const errors = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2956
+ __proto__: null,
2957
+ E_FORBIDDEN,
2958
+ E_FORBIDDEN_PAYLOAD_EXCEPTION,
2959
+ E_INVALID_COLUMN_ACCESS,
2960
+ E_INVALID_CONSUMED_VALUE,
2961
+ E_INVALID_LUCENE_QUERY,
2962
+ E_INVALID_PAYLOAD_EXCEPTION,
2963
+ E_INVALID_PREPARED_VALUE,
2964
+ E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS,
2965
+ E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS,
2966
+ E_INVALID_RESOURCEFUL_MIXIN_OPTIONS,
2967
+ E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION,
2968
+ E_LUCENE_INVALID_TYPE,
2969
+ E_LUCENE_SYNTAX_EXCEPTION,
2970
+ E_LUCENE_UNEXPECTED_EXCEPTION,
2971
+ E_MISSING_PRIMARY_KEY_EXCEPTION,
2972
+ E_RECORD_NOT_FOUND_EXCEPTION,
2973
+ E_UNCASTABLE,
2974
+ E_UNEXPECTED_COLUMN_IN_QUERY
2975
+ }, Symbol.toStringTag, { value: "Module" }));
2976
+ export {
2977
+ E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS as E,
2978
+ E_UNCASTABLE as a,
2979
+ E_INVALID_PREPARED_VALUE as b,
2980
+ E_INVALID_CONSUMED_VALUE as c,
2981
+ E_LUCENE_SYNTAX_EXCEPTION as d,
2982
+ E_LUCENE_UNEXPECTED_EXCEPTION as e,
2983
+ E_LUCENE_INVALID_TYPE as f,
2984
+ E_INVALID_RESOURCEFUL_MIXIN_OPTIONS as g,
2985
+ E_MISSING_PRIMARY_KEY_EXCEPTION as h,
2986
+ E_FORBIDDEN as i,
2987
+ E_INVALID_COLUMN_ACCESS as j,
2988
+ E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION as k,
2989
+ E_RECORD_NOT_FOUND_EXCEPTION as l,
2990
+ E_INVALID_PAYLOAD_EXCEPTION as m,
2991
+ E_FORBIDDEN_PAYLOAD_EXCEPTION as n,
2992
+ createError as o,
2993
+ Exception as p,
2994
+ getDefaultExportFromCjs as q,
2995
+ commonjsGlobal as r,
2996
+ index_default as s,
2997
+ defineStaticProperty as t,
2998
+ lodash as u,
2999
+ E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS as v,
3000
+ errors as w,
3001
+ E_INVALID_LUCENE_QUERY as x,
3002
+ E_UNEXPECTED_COLUMN_IN_QUERY as y
3003
+ };
3004
+ //# sourceMappingURL=errors-B1rr67uM.js.map