@rzl-zone/utils-js 2.1.0 → 3.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +26 -0
- package/dist/any-BmdI8UbK.d.ts +67 -0
- package/dist/array-CIZRbqTF.d.ts +223 -0
- package/dist/arrays-normalize-recursive-CnjYJ9xg.d.ts +72 -0
- package/dist/assertions/index.cjs +1 -0
- package/dist/assertions/index.d.ts +428 -0
- package/dist/assertions/index.js +1 -0
- package/dist/chunk-2TRAPBZ7.cjs +1 -0
- package/dist/chunk-4DK3RCC4.js +2 -0
- package/dist/chunk-4JOQ45HL.js +1 -0
- package/dist/chunk-55CZALRS.js +1 -0
- package/dist/chunk-56QBKKRE.js +1 -0
- package/dist/chunk-5SZUSNGZ.js +1 -0
- package/dist/chunk-62HX5Z45.cjs +1 -0
- package/dist/chunk-7NA6DUHR.cjs +2 -0
- package/dist/chunk-7YWAQOA4.cjs +1 -0
- package/dist/chunk-BVPMMWDL.cjs +1 -0
- package/dist/chunk-BYZAD3XN.cjs +1 -0
- package/dist/chunk-CEFYHEM4.cjs +1 -0
- package/dist/chunk-CN53M4QZ.cjs +1 -0
- package/dist/chunk-D47MHBSD.cjs +1 -0
- package/dist/chunk-DGH75GJD.js +1 -0
- package/dist/chunk-E5NUI7PN.js +1 -0
- package/dist/chunk-ELDDNERR.js +1 -0
- package/dist/chunk-EXZ47NOW.js +1 -0
- package/dist/chunk-FDITZ5C6.cjs +1 -0
- package/dist/chunk-FF76ISQ2.js +1 -0
- package/dist/chunk-FIEZKTAZ.cjs +1 -0
- package/dist/chunk-FSSV24W7.cjs +1 -0
- package/dist/chunk-G5LXIEFO.js +0 -0
- package/dist/chunk-GCGU2WB7.js +1 -0
- package/dist/chunk-GECI2YBP.js +1 -0
- package/dist/chunk-GQE4OVHC.cjs +1 -0
- package/dist/chunk-GRVZXQXL.cjs +1 -0
- package/dist/chunk-I4AVNHPA.cjs +1 -0
- package/dist/chunk-JWHM3WZQ.cjs +1 -0
- package/dist/chunk-KBKYG3IY.cjs +1 -0
- package/dist/chunk-KCQDDZJE.cjs +1 -0
- package/dist/chunk-LVKAYEZ4.js +1 -0
- package/dist/chunk-MBDWTK54.cjs +1 -0
- package/dist/chunk-MMSYCIJ2.cjs +1 -0
- package/dist/chunk-MNGGDB2G.js +1 -0
- package/dist/chunk-MY7BA4GI.cjs +1 -0
- package/dist/chunk-N2IJPIND.cjs +1 -0
- package/dist/chunk-NIMNTEGV.js +1 -0
- package/dist/chunk-NNM7QCNB.js +1 -0
- package/dist/chunk-POCPQYZS.js +1 -0
- package/dist/chunk-PUQXRLZH.cjs +1 -0
- package/dist/chunk-PVJF2JHM.js +1 -0
- package/dist/chunk-QCFXEUKL.js +1 -0
- package/dist/chunk-QFCGBBSY.js +1 -0
- package/dist/chunk-QQYAUPSK.cjs +1 -0
- package/dist/chunk-RN3TP3S3.js +1 -0
- package/dist/chunk-RV2VULM7.cjs +1 -0
- package/dist/chunk-SW6HYEW7.cjs +1 -0
- package/dist/chunk-SYJC7UAW.js +1 -0
- package/dist/chunk-TC4VBE4Y.cjs +1 -0
- package/dist/chunk-TUXDINHF.cjs +1 -0
- package/dist/chunk-U5Y2FXMN.cjs +1 -0
- package/dist/chunk-UUPQI6ND.cjs +1 -0
- package/dist/chunk-VYCGZ2S6.js +1 -0
- package/dist/chunk-W5EDKJK3.js +1 -0
- package/dist/chunk-WHAVUFEU.js +1 -0
- package/dist/chunk-X3GTRVVK.cjs +4 -0
- package/dist/chunk-XCFIOTCV.js +1 -0
- package/dist/chunk-XE27XPJR.js +1 -0
- package/dist/chunk-XH6MCRLP.js +1 -0
- package/dist/chunk-XVB3ZZEB.js +1 -0
- package/dist/chunk-YEERJDOF.js +4 -0
- package/dist/chunk-ZBSIGJFO.cjs +1 -0
- package/dist/chunk-ZYAML74V.js +1 -0
- package/dist/conversions/index.cjs +1 -0
- package/dist/conversions/index.d.ts +1633 -0
- package/dist/conversions/index.js +1 -0
- package/dist/env/index.cjs +1 -0
- package/dist/env/index.d.ts +19 -0
- package/dist/env/index.js +1 -0
- package/dist/events/index.cjs +1 -0
- package/dist/events/index.d.ts +119 -0
- package/dist/events/index.js +1 -0
- package/dist/extends-Mp81Hq9-.d.ts +145 -0
- package/dist/formatting/index.cjs +1 -0
- package/dist/formatting/index.d.ts +912 -0
- package/dist/formatting/index.js +1 -0
- package/dist/generator/index.cjs +1 -0
- package/dist/generator/index.d.ts +163 -0
- package/dist/generator/index.js +1 -0
- package/dist/if-CvT4R7Kh.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -4334
- package/dist/index.js +1 -1
- package/dist/is-array-Ckm_47hw.d.ts +1557 -0
- package/dist/isPlainObject-BKYaI6a8.d.ts +182 -0
- package/dist/never-BfayMBF9.d.ts +75 -0
- package/dist/next/index.cjs +8 -1
- package/dist/next/index.d.ts +169 -169
- package/dist/next/index.js +8 -1
- package/dist/next/server/index.cjs +2 -1
- package/dist/next/server/index.d.ts +37 -37
- package/dist/next/server/index.js +2 -1
- package/dist/nils-DMz3kU7M.d.ts +177 -0
- package/dist/omit-VvmIsZmX.d.ts +28 -0
- package/dist/operations/index.cjs +1 -0
- package/dist/operations/index.d.ts +182 -0
- package/dist/operations/index.js +1 -0
- package/dist/parsers/index.cjs +1 -0
- package/dist/parsers/index.d.ts +37 -0
- package/dist/parsers/index.js +1 -0
- package/dist/predicates/index.cjs +1 -0
- package/dist/predicates/index.d.ts +1839 -0
- package/dist/predicates/index.js +1 -0
- package/dist/prettify-C4xLcYOP.d.ts +353 -0
- package/dist/promise/index.cjs +1 -0
- package/dist/promise/index.d.ts +40 -0
- package/dist/promise/index.js +1 -0
- package/dist/rzl-utils.global.js +4 -1
- package/dist/strings/index.cjs +1 -0
- package/dist/strings/index.d.ts +816 -0
- package/dist/strings/index.js +1 -0
- package/dist/stylings/index.cjs +1 -0
- package/dist/stylings/index.d.ts +49 -0
- package/dist/stylings/index.js +1 -0
- package/dist/type-data-DDs-u2kq.d.ts +261 -0
- package/dist/types/index.d.ts +3589 -2090
- package/dist/urls/index.cjs +1 -0
- package/dist/urls/index.d.ts +416 -0
- package/dist/urls/index.js +1 -0
- package/package.json +147 -21
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import{G as GetPreciseTypeOptions,I as IsNumberOptions,a as IsPlainObjectResult}from'../isPlainObject-BKYaI6a8.js';import'../type-data-DDs-u2kq.js';
|
|
2
|
+
/** -------------------------------------------------------
|
|
3
|
+
* * ***Shape of the object passed to custom error message functions.***
|
|
4
|
+
* -------------------------------------------------------
|
|
5
|
+
* This type describes the parameters received when `options.message`
|
|
6
|
+
* is defined as a function in `AssertIsOptions`.
|
|
7
|
+
*
|
|
8
|
+
* - `currentType` ➔ the actual detected runtime type of the value.
|
|
9
|
+
* - `validType` ➔ the required/expected type name that the value must match.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const options: AssertIsOptions = {
|
|
14
|
+
* message: ({ currentType, validType }) =>
|
|
15
|
+
* `Expected ${validType} but got ${currentType}`
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
type AssertIsOptionsMessageFunction={
|
|
20
|
+
/** The actual runtime type of the value being checked.
|
|
21
|
+
*
|
|
22
|
+
* - Example: `"number"`, `"big-int"`, `"plain-object"`, (depends `formatCase` options).
|
|
23
|
+
*/
|
|
24
|
+
currentType:string;
|
|
25
|
+
/** The required/expected type that the value must conform to.
|
|
26
|
+
*
|
|
27
|
+
* - Example: `"boolean"`, `"string"`, `"big-int"`, `"plain-object"`, (will force format to `kebab-case`).
|
|
28
|
+
*/
|
|
29
|
+
validType:string;};type AssertIsOptions={
|
|
30
|
+
/** Custom error message for assertion failures.
|
|
31
|
+
*
|
|
32
|
+
* This option allows overriding the **default error message** when a value
|
|
33
|
+
* does not match the required type.
|
|
34
|
+
*
|
|
35
|
+
* - If a **string** is provided:
|
|
36
|
+
* - Must be non-empty after trimming.
|
|
37
|
+
* - Will be used directly as the error message.
|
|
38
|
+
*
|
|
39
|
+
* - If a **function** is provided:
|
|
40
|
+
* - Receives an object containing:
|
|
41
|
+
* - `currentType` ➔ the detected runtime type of the value (depends `formatCase` options, e.g., `"number"`).
|
|
42
|
+
* - `validType` ➔ the expected type name (with format `kebab-case`, e.g., `"boolean"`, `"big-int"`, `"plain-object"`).
|
|
43
|
+
* - Must return a string. If the returned string is empty or whitespace,
|
|
44
|
+
* the default message will be used instead.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Static message
|
|
49
|
+
* { message: "Must be a boolean!" }
|
|
50
|
+
*
|
|
51
|
+
* // Dynamic message
|
|
52
|
+
* {
|
|
53
|
+
* message: ({ currentType, validType }) =>
|
|
54
|
+
* `Expected ${validType} but got ${currentType}`
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
message?:string|(({currentType,validType}:AssertIsOptionsMessageFunction)=>string);}& GetPreciseTypeOptions;
|
|
59
|
+
/** -------------------------------------------------------
|
|
60
|
+
* * ***Asserts that a value is of type `boolean`.***
|
|
61
|
+
* -------------------------------------------------------
|
|
62
|
+
* Validates that the given `value` is a **boolean**.
|
|
63
|
+
*
|
|
64
|
+
* - ✅ If `value` is a boolean → execution continues normally.
|
|
65
|
+
* - ❌ If `value` is not a boolean → throws a `TypeError` with either:
|
|
66
|
+
* - A custom error message (`options.message`), or
|
|
67
|
+
* - A default message including the actual type.
|
|
68
|
+
*
|
|
69
|
+
* This function is an **assertion function**.
|
|
70
|
+
* After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
|
|
71
|
+
*
|
|
72
|
+
* @param value - The value to validate.
|
|
73
|
+
* @param options - Optional configuration:
|
|
74
|
+
* - `message`: A custom error message (string or function).
|
|
75
|
+
* - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
|
|
76
|
+
*
|
|
77
|
+
* @returns {asserts value is boolean} Narrows `value` to `boolean` if no error is thrown.
|
|
78
|
+
* @throws {TypeError} If the value is not a boolean.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* // ✅ Simple usage
|
|
83
|
+
* assertIsBoolean(true);
|
|
84
|
+
* // No error, value is boolean
|
|
85
|
+
*
|
|
86
|
+
* // ❌ Throws TypeError with default message
|
|
87
|
+
* assertIsBoolean(42);
|
|
88
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `boolean`, but received: `number`."
|
|
89
|
+
*
|
|
90
|
+
* // ❌ Throws with custom string message
|
|
91
|
+
* assertIsBoolean(42, { message: "Must be boolean!" });
|
|
92
|
+
* // ➔ TypeError: "Must be boolean!"
|
|
93
|
+
*
|
|
94
|
+
* // ❌ Throws with custom function message + case formatting
|
|
95
|
+
* assertIsBoolean(123n, {
|
|
96
|
+
* message: ({ currentType, validType }) =>
|
|
97
|
+
* `Expected ${validType} but got (${currentType}).`,
|
|
98
|
+
* formatCase: "toKebabCase"
|
|
99
|
+
* });
|
|
100
|
+
* // ➔ TypeError: "Expected boolean but got (big-int)."
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* -------------------------------------------------------
|
|
104
|
+
* ✅ ***Real-world usage example***:
|
|
105
|
+
* ```ts
|
|
106
|
+
* type User = { name: string; email: string };
|
|
107
|
+
*
|
|
108
|
+
* const mixedValue: string | User | boolean | number | undefined = getUserInput();
|
|
109
|
+
*
|
|
110
|
+
* // ❌ Throws if not boolean
|
|
111
|
+
* // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
|
|
112
|
+
* assertIsBoolean(mixedValue, { message: "Must be boolean!" });
|
|
113
|
+
*
|
|
114
|
+
* // ✅ After this call, TypeScript knows `mixedValue` is boolean
|
|
115
|
+
* const result: boolean = mixedValue; // ➔ Safe to use
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
declare const assertIsBoolean:(value:unknown,options?:AssertIsOptions)=>asserts value is boolean;
|
|
119
|
+
/** -------------------------------------------------------
|
|
120
|
+
* * ***Asserts that a value is of type `bigint`.***
|
|
121
|
+
* -------------------------------------------------------
|
|
122
|
+
* Validates that the given `value` is a **bigint**.
|
|
123
|
+
*
|
|
124
|
+
* - ✅ If `value` is a bigint → execution continues normally.
|
|
125
|
+
* - ❌ If `value` is not a bigint → throws a `TypeError` with either:
|
|
126
|
+
* - A custom error message (`options.message`), or
|
|
127
|
+
* - A default message including the actual type.
|
|
128
|
+
*
|
|
129
|
+
* This function is an **assertion function**.
|
|
130
|
+
* After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
|
|
131
|
+
*
|
|
132
|
+
* ℹ️ Note:
|
|
133
|
+
* - A `bigint` refers strictly to the JavaScript `bigint` primitive type
|
|
134
|
+
* (e.g., `123n`, `0n`, `-999999999999999999999n`).
|
|
135
|
+
* - This excludes `BigInt` objects created with `Object(BigInt(123))`.
|
|
136
|
+
*
|
|
137
|
+
* @param value - The value to validate.
|
|
138
|
+
* @param options - Optional configuration:
|
|
139
|
+
* - `message`: A custom error message (string or function).
|
|
140
|
+
* - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
|
|
141
|
+
*
|
|
142
|
+
* @returns {asserts value is bigint} Narrows `value` to `bigint` if no error is thrown.
|
|
143
|
+
* @throws {TypeError} If the value is not a bigint.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* // ✅ Simple usage
|
|
148
|
+
* assertIsBigInt(123n);
|
|
149
|
+
* // No error, value is bigint
|
|
150
|
+
*
|
|
151
|
+
* // ❌ Throws TypeError with default message
|
|
152
|
+
* assertIsBigInt(42);
|
|
153
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `bigint`, but received: `number`."
|
|
154
|
+
*
|
|
155
|
+
* // ❌ Throws with custom string message
|
|
156
|
+
* assertIsBigInt("123", { message: "Must be a bigint!" });
|
|
157
|
+
* // ➔ TypeError: "Must be a bigint!"
|
|
158
|
+
*
|
|
159
|
+
* // ❌ Throws with custom function message + case formatting
|
|
160
|
+
* assertIsBigInt(42, {
|
|
161
|
+
* message: ({ currentType, validType }) =>
|
|
162
|
+
* `Expected ${validType} but got (${currentType}).`,
|
|
163
|
+
* formatCase: "toKebabCase"
|
|
164
|
+
* });
|
|
165
|
+
* // ➔ TypeError: "Expected bigint but got (number)."
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* -------------------------------------------------------
|
|
169
|
+
* ✅ ***Real-world usage example***:
|
|
170
|
+
* ```ts
|
|
171
|
+
* const mixedValue: string | bigint | undefined = getUserInput();
|
|
172
|
+
*
|
|
173
|
+
* // ❌ Throws if not bigint
|
|
174
|
+
* // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
|
|
175
|
+
* assertIsBigInt(mixedValue, { message: "Must be a bigint!" });
|
|
176
|
+
*
|
|
177
|
+
* // ✅ After this call, TypeScript knows `mixedValue` is bigint
|
|
178
|
+
* const result: bigint = mixedValue; // ➔ Safe to use
|
|
179
|
+
* console.log(result + 100n);
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
declare const assertIsBigInt:(value:unknown,options?:AssertIsOptions)=>asserts value is bigint;type AssertIsNumberOptions=AssertIsOptions & IsNumberOptions;
|
|
183
|
+
/** -------------------------------------------------------
|
|
184
|
+
* * ***Asserts that a value is of type `number`.***
|
|
185
|
+
* -------------------------------------------------------
|
|
186
|
+
* Validates that the given `value` is a **number**.
|
|
187
|
+
*
|
|
188
|
+
* - ✅ If `value` is a number → execution continues normally.
|
|
189
|
+
* - ❌ If `value` is not a number → throws a `TypeError` with either:
|
|
190
|
+
* - A custom error message (`options.message`), or
|
|
191
|
+
* - A default message including the actual type.
|
|
192
|
+
*
|
|
193
|
+
* This function is an **assertion function**.
|
|
194
|
+
* After it returns successfully, TypeScript narrows the type of `value` to `number`.
|
|
195
|
+
*
|
|
196
|
+
* ℹ️ Notes:
|
|
197
|
+
* - A `number` refers strictly to the JavaScript `number` primitive type
|
|
198
|
+
* (e.g., `42`, `3.14`, `-1`, `0`).
|
|
199
|
+
* - This excludes `Number` objects created with `new Number(123)`.
|
|
200
|
+
* - By default, `NaN` is **not considered** valid.
|
|
201
|
+
* You can allow it with `{ includeNaN: true }`.
|
|
202
|
+
*
|
|
203
|
+
* @param value - The value to validate.
|
|
204
|
+
* @param options - Optional configuration:
|
|
205
|
+
* - `message`: A custom error message (string or function).
|
|
206
|
+
* - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
|
|
207
|
+
* - `includeNaN`: Whether to treat `NaN` as valid.
|
|
208
|
+
*
|
|
209
|
+
* @returns {asserts value is number} Narrows `value` to `number` if no error is thrown.
|
|
210
|
+
* @throws {TypeError} If the value is not a number (or is `NaN` when `includeNaN` is `false`).
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* // ✅ Simple usage
|
|
215
|
+
* assertIsNumber(123);
|
|
216
|
+
* // No error, value is number
|
|
217
|
+
*
|
|
218
|
+
* // ❌ Throws TypeError with default message
|
|
219
|
+
* assertIsNumber("42");
|
|
220
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `number`, but received: `string`."
|
|
221
|
+
*
|
|
222
|
+
* // ❌ Throws with custom string message
|
|
223
|
+
* assertIsNumber(true, { message: "Must be a number!" });
|
|
224
|
+
* // ➔ TypeError: "Must be a number!"
|
|
225
|
+
*
|
|
226
|
+
* // ❌ Throws with custom function message + case formatting
|
|
227
|
+
* assertIsNumber("hello", {
|
|
228
|
+
* message: ({ currentType, validType }) =>
|
|
229
|
+
* `Expected ${validType} but got (${currentType}).`,
|
|
230
|
+
* formatCase: "toKebabCase"
|
|
231
|
+
* });
|
|
232
|
+
* // ➔ TypeError: "Expected number but got (string)."
|
|
233
|
+
*
|
|
234
|
+
* // ⚠️ NaN is invalid by default
|
|
235
|
+
* assertIsNumber(NaN);
|
|
236
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `number`, but received: `NaN`."
|
|
237
|
+
*
|
|
238
|
+
* // ✅ Allow NaN explicitly
|
|
239
|
+
* assertIsNumber(NaN, { includeNaN: true });
|
|
240
|
+
* // No error
|
|
241
|
+
* ```
|
|
242
|
+
*
|
|
243
|
+
* -------------------------------------------------------
|
|
244
|
+
* ✅ ***Real-world usage example***:
|
|
245
|
+
* ```ts
|
|
246
|
+
* const mixedValue: string | number | undefined = getUserInput();
|
|
247
|
+
*
|
|
248
|
+
* // ❌ Throws if not number
|
|
249
|
+
* // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
|
|
250
|
+
* assertIsNumber(mixedValue, { message: "Must be a number!" });
|
|
251
|
+
*
|
|
252
|
+
* // ✅ After this call, TypeScript knows `mixedValue` is number
|
|
253
|
+
* const result: number = mixedValue; // ➔ Safe to use
|
|
254
|
+
* console.log(result + 100);
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
declare const assertIsNumber:(value:unknown,options?:AssertIsNumberOptions)=>asserts value is number;
|
|
258
|
+
/** -------------------------------------------------------
|
|
259
|
+
* * ***Asserts that a value is of type `array`.***
|
|
260
|
+
* -------------------------------------------------------
|
|
261
|
+
* Validates that the given `value` is an **array**.
|
|
262
|
+
*
|
|
263
|
+
* - ✅ If `value` is an array → execution continues normally.
|
|
264
|
+
* - ❌ If `value` is not an array → throws a `TypeError` with either:
|
|
265
|
+
* - A custom error message (`options.message`), or
|
|
266
|
+
* - A default message including the actual type.
|
|
267
|
+
*
|
|
268
|
+
* This function is an **assertion function**.
|
|
269
|
+
* After it returns successfully, TypeScript narrows the type of `value`
|
|
270
|
+
* to `AssertIsArrayResult<T>`.
|
|
271
|
+
*
|
|
272
|
+
* @template T - The input type being asserted.
|
|
273
|
+
*
|
|
274
|
+
* @param value - The value to validate.
|
|
275
|
+
* @param options - Optional configuration:
|
|
276
|
+
* - `message`: A custom error message (string or function).
|
|
277
|
+
* - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
|
|
278
|
+
*
|
|
279
|
+
* @returns {asserts value is AssertIsArrayResult<T>} Narrows `value` to an array if no error is thrown.
|
|
280
|
+
* @throws {TypeError} If the value is not an array.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```ts
|
|
284
|
+
* // ✅ Simple usage
|
|
285
|
+
* assertIsArray([1, 2, 3]);
|
|
286
|
+
* // No error, value is array
|
|
287
|
+
*
|
|
288
|
+
* // ❌ Throws TypeError with default message
|
|
289
|
+
* assertIsArray({ a: 1 });
|
|
290
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `array`, but received: `plain-object`."
|
|
291
|
+
*
|
|
292
|
+
* // ❌ Throws with custom string message
|
|
293
|
+
* assertIsArray(42, { message: "Must be an array!" });
|
|
294
|
+
* // ➔ TypeError: "Must be an array!"
|
|
295
|
+
*
|
|
296
|
+
* // ❌ Throws with custom function message + case formatting
|
|
297
|
+
* assertIsArray(42n, {
|
|
298
|
+
* message: ({ currentType, validType }) =>
|
|
299
|
+
* `Expected ${validType} but got (${currentType}).`,
|
|
300
|
+
* formatCase: "toKebabCase"
|
|
301
|
+
* });
|
|
302
|
+
* // ➔ TypeError: "Expected array but got (big-int)."
|
|
303
|
+
* ```
|
|
304
|
+
*
|
|
305
|
+
* -------------------------------------------------------
|
|
306
|
+
* ✅ ***Real-world usage with generic narrowing***:
|
|
307
|
+
* ```ts
|
|
308
|
+
* const mixedValue: string | number[] | undefined = getUserInput();
|
|
309
|
+
*
|
|
310
|
+
* // ❌ Throws if not array
|
|
311
|
+
* // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
|
|
312
|
+
* assertIsArray(mixedValue, { message: "Must be an array!" });
|
|
313
|
+
*
|
|
314
|
+
* // ✅ After this call, TypeScript knows `mixedValue` is narrowed to number[]
|
|
315
|
+
* const result: number[] = mixedValue; // ➔ Safe to use
|
|
316
|
+
* console.log(result.length);
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
declare function assertIsArray<T extends unknown[]>(value:T,options?:AssertIsOptions):value is Extract<T,unknown[]>;declare function assertIsArray<T extends readonly unknown[]>(value:T,options?:AssertIsOptions):value is Extract<T,readonly unknown[]>;declare function assertIsArray(value:unknown,options?:AssertIsOptions):value is unknown[];
|
|
320
|
+
/** -------------------------------------------------------
|
|
321
|
+
* * ***Asserts that a value is a plain object.***
|
|
322
|
+
* -------------------------------------------------------
|
|
323
|
+
* Ensures that the given `value` is a **plain object**.
|
|
324
|
+
* - Throws a `TypeError` if the value is **not a plain object**.
|
|
325
|
+
*
|
|
326
|
+
* @template T - The input type being asserted.
|
|
327
|
+
* After assertion, TypeScript will refine `value` to `IsPlainObjectResult<T>`.
|
|
328
|
+
*
|
|
329
|
+
* @param {T} value - The value to check.
|
|
330
|
+
* @param {AssertIsOptions} [options] - Optional configuration, such as:
|
|
331
|
+
* - Custom error message (`string` or `(info) => string`)
|
|
332
|
+
* - Message formatting (`formatCase`)
|
|
333
|
+
* - Expected `validType` description override
|
|
334
|
+
* @throws {TypeError} If `value` is not a plain object (with either a default or custom message).
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* // ✅ Simple usage
|
|
339
|
+
* assertIsPlainObject({ a: 1, b: 2 });
|
|
340
|
+
* // ➔ ok, value is plain object
|
|
341
|
+
*
|
|
342
|
+
* // ❌ Throws TypeError with default message
|
|
343
|
+
* assertIsPlainObject([1, 2, 3]);
|
|
344
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `plain-object`, but received: `array`."
|
|
345
|
+
*
|
|
346
|
+
* // ❌ Throws with custom string message
|
|
347
|
+
* assertIsPlainObject("hello", { message: "Must be plain object!" });
|
|
348
|
+
* // ➔ TypeError: "Must be plain object!"
|
|
349
|
+
*
|
|
350
|
+
* // ❌ Throws with custom message function and formatCase
|
|
351
|
+
* assertIsPlainObject(42n, {
|
|
352
|
+
* message: ({ currentType, validType }) =>
|
|
353
|
+
* `Expected ${validType} but got (${currentType}).`,
|
|
354
|
+
* formatCase: "toKebabCase"
|
|
355
|
+
* });
|
|
356
|
+
* // ➔ TypeError: "Expected plain-object but got (big-int)."
|
|
357
|
+
* ```
|
|
358
|
+
* -------------------------------------------------------
|
|
359
|
+
* ✅ ***Real-world usage with generic narrowing***:
|
|
360
|
+
* ```ts
|
|
361
|
+
* type User = { name: string; email: string };
|
|
362
|
+
*
|
|
363
|
+
* const mixedValue: string | User | boolean | number | undefined = getUserInput();
|
|
364
|
+
*
|
|
365
|
+
* // Throws TypeError if not plain object
|
|
366
|
+
* assertIsPlainObject(mixedValue, { message: "Must be plain object!" });
|
|
367
|
+
*
|
|
368
|
+
* // After this call, TypeScript knows `mixedValue` is narrowed to User
|
|
369
|
+
* const user: User = mixedValue; // ➔ safe
|
|
370
|
+
* console.log(user.email); // ➔ type-safe
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
declare function assertIsPlainObject<T>(value:T,options?:AssertIsOptions):asserts value is IsPlainObjectResult<T>;
|
|
374
|
+
/** -------------------------------------------------------
|
|
375
|
+
* * ***Asserts that a value is a string.***
|
|
376
|
+
* -------------------------------------------------------
|
|
377
|
+
* Ensures that the given value is a **primitive string**.
|
|
378
|
+
* - Throws a `TypeError` if the value is **not a string**.
|
|
379
|
+
*
|
|
380
|
+
* ℹ️ Note:
|
|
381
|
+
* - A "string" refers strictly to a JavaScript primitive string type
|
|
382
|
+
* (e.g., `"hello"`, `""`, `"123"`).
|
|
383
|
+
* - This function excludes `String` objects created with `new String()`.
|
|
384
|
+
*
|
|
385
|
+
* @param {unknown} value - The value to check.
|
|
386
|
+
* @param {AssertIsOptions} [options] - Optional configuration including custom error message and formatting.
|
|
387
|
+
* @returns {asserts value is string}
|
|
388
|
+
* After this call, `value` is guaranteed to be a **primitive string**.
|
|
389
|
+
* @throws {TypeError} If the value is not a string.
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```ts
|
|
393
|
+
* // ✅ Simple usage
|
|
394
|
+
* assertIsString("hello");
|
|
395
|
+
* // ➔ ✅ ok value is string, no error
|
|
396
|
+
*
|
|
397
|
+
* // ❌ Throws TypeError with default message
|
|
398
|
+
* assertIsString(42);
|
|
399
|
+
* // ➔ TypeError: "Parameter input (`value`) must be of type `string`, but received: `number`."
|
|
400
|
+
*
|
|
401
|
+
* // ❌ Throws with custom string message
|
|
402
|
+
* assertIsString(42, { message: "Must be a string!" });
|
|
403
|
+
* // ➔ TypeError: "Must be a string!"
|
|
404
|
+
*
|
|
405
|
+
* // ❌ Throws with custom message function and formatCase
|
|
406
|
+
* assertIsString(42n, {
|
|
407
|
+
* message: ({ currentType, validType }) => `Expected ${currentType} but got (${currentType}).`,
|
|
408
|
+
* formatCase: "toKebabCase"
|
|
409
|
+
* });
|
|
410
|
+
* // ➔ TypeError: "Expected string but got (big-int)."
|
|
411
|
+
* ```
|
|
412
|
+
* -------------------------------------------------------
|
|
413
|
+
* ✅ ***Real-world usage with generic narrowing***:
|
|
414
|
+
* ```ts
|
|
415
|
+
* type User = { name: string; email: string };
|
|
416
|
+
*
|
|
417
|
+
* const mixedValue: string | User | undefined = getUserInput();
|
|
418
|
+
*
|
|
419
|
+
* // Throws TypeError if the value is not string
|
|
420
|
+
* // ⚠️ Code below after this call, will NOT be executed if TypeError is thrown
|
|
421
|
+
* assertIsString(mixedValue, { message: "Must be a string!" });
|
|
422
|
+
*
|
|
423
|
+
* // After this call, TypeScript knows `mixedValue` is string
|
|
424
|
+
* const result: string = mixedValue; // ➔ ✅ safe to use
|
|
425
|
+
* console.log(result.toUpperCase()); // ➔ ✅ type-safe
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
declare const assertIsString:(value:unknown,options?:AssertIsOptions)=>asserts value is string;export{assertIsArray,assertIsBigInt,assertIsBoolean,assertIsNumber,assertIsPlainObject,assertIsString};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as assertIsBigInt,b as assertIsNumber}from'../chunk-55CZALRS.js';export{a as assertIsArray}from'../chunk-QFCGBBSY.js';export{a as assertIsString}from'../chunk-XVB3ZZEB.js';import'../chunk-5SZUSNGZ.js';export{G as assertIsBoolean,m as assertIsPlainObject}from'../chunk-XCFIOTCV.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var r=(n,o={})=>!chunkCN53M4QZ_cjs.p(n,o);exports.a=r;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-NNM7QCNB.js';import {b as b$2}from'./chunk-DGH75GJD.js';import {d,e,a as a$4,c as c$2}from'./chunk-W5EDKJK3.js';import {a as a$3}from'./chunk-XH6MCRLP.js';import {a as a$1}from'./chunk-NIMNTEGV.js';import {a as a$2}from'./chunk-XVB3ZZEB.js';import {c,b as b$1,a as a$5}from'./chunk-MNGGDB2G.js';import {d as d$1,E,G as G$1,m,p,l,h,i,j,b,q,f,c as c$1,a as a$6,C,n,k,e as e$1,g}from'./chunk-XCFIOTCV.js';var nr=(r,t,e=false)=>{if(!(d$1(r)&&d$1(t)))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${E(r)}\`, 'array2': \`${E(t)}\`].`);if(G$1(e,{message:({currentType:o,validType:n})=>`Third parameter \`ignoreOrder\` must be of type \`${n}\`, but received: \`${o}\`.`}),!d(r.length,t.length))return false;let s=o=>d$1(o)?o.map(m=>d$1(m)?s(m):m).sort((m,u)=>{let z=c(m),U=c(u);return z<U?-1:z>U?1:0}):o,i=e?s(r):r,a=e?s(t):t;return d(i.length,a.length)?i.every((o,n)=>c(o)===c(a[n])):false};var mr=(r,t)=>d(r,t);var ar=(r,t)=>{if(!a(r)||!a(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.].");return r.protocol+"//"+r.host+r.pathname==t.protocol+"//"+t.host+t.pathname};var lr=(r,t)=>{if(!a(r)||!a(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.].");return r.protocol+"//"+r.host+r.pathname+r.search==t.protocol+"//"+t.host+t.pathname+t.search};var Tr=(r,t,e={})=>{if(a$1(r)||!d$1(t))return false;m(e,{message:({currentType:n,validType:m})=>`Third parameter (\`options\`) must be of type \`${m}\`, but received: \`${n}\`.`});let{exactMatch:s=false,flags:i="i"}=e;G$1(s,{message:({currentType:n,validType:m})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${m}\`, but received: \`${n}\`.`}),a$2(i,{message:({currentType:n,validType:m})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${m}\`, but received: \`${n}\`.`});let a=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=t.filter(n=>p(n)).map(a);return o.length===0?false:o.every(n=>{let m=s?`(?<!\\S)${n}(?!\\S)`:n;return new RegExp(m,i.includes("u")?i:i+"u").test(r)})};var Rr=(r,t,e)=>{if(a$1(r)||!d$1(t))return false;m(e,{message:({currentType:m,validType:u})=>`Third parameter (\`options\`) must be of type \`${u}\`, but received: \`${m}\`.`});let{exactMatch:s=false,flags:i="i"}=e||{};G$1(s,{message:({currentType:m,validType:u})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${u}\`, but received: \`${m}\`.`}),a$2(i,{message:({currentType:m,validType:u})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${u}\`, but received: \`${m}\`.`});let a=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=t.filter(m=>p(m)).map(a);if(o.length===0)return false;let n=s?`(?<!\\S)(${o.join("|")})(?!\\S)`:`(${o.join("|")})`;return new RegExp(n,i.includes("u")?i:i+"u").test(r)};var H=(r,t)=>{if(!l(r))return false;if(!(h(t)||i(t)||j(t)))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${E(t)}\`.`);return Object.prototype.hasOwnProperty.call(r,t)?true:d$1(r)?r.some(e=>H(e,t)):Object.values(r).some(e=>l(e)&&H(e,t))};var Br=(r,t)=>{if(!d$1(r)||!d$1(t)||e(r)||e(t))return false;let e$1=new Set(r);return t.some(s=>e$1.has(s))};var Z=r=>Object.prototype.toString.call(r)==="[object Arguments]";function $(r){return typeof r=="number"&&r>-1&&Number.isInteger(r)&&r<=Number.MAX_SAFE_INTEGER}function st(r){return !b(r)&&l(r)&&$(r?.length)}function at(r){return l(r)&&$(r.length)}var xt=r=>h(r)||i(r)?a$3(r.toString())!==0?true:r.toString().trim()==="0":false;var T=(r,t)=>{if(typeof r=="number"&&typeof t=="number"&&Number.isNaN(r)&&Number.isNaN(t)||r===t)return true;if(typeof r!=typeof t)return false;if(b$1(r)&&b$1(t))return r.getTime()===t.getTime();if(a$4(r)&&a$4(t)||j(r)&&j(t))return r.toString()===t.toString();if(q(r)&&q(t)){if(r.size!==t.size)return false;let e=Array.from(t),s=new Set;for(let i of r){let a=false;for(let o=0;o<e.length;o++)if(!s.has(o)&&T(i,e[o])){s.add(o),a=true;break}if(!a)return false}return true}if(a$5(r)&&a$5(t)){if(r.size!==t.size)return false;let e=Array.from(t),s=new Set;for(let[i,a]of r){let o=false;for(let n=0;n<e.length;n++){if(s.has(n))continue;let[m,u]=e[n];if(T(i,m)&&T(a,u)){s.add(n),o=true;break}}if(!o)return false}return true}if(d$1(r)&&d$1(t))return r.length!==t.length?false:r.every((e,s)=>T(e,t[s]));if(l(r)&&l(t)&&r&&t){if(d$1(r)!==d$1(t))return false;let e=Object.keys(r),s=Object.keys(t);return e.length!==s.length?false:e.every(i=>T(r[i],t[i]))}return false};function Tt(r){return !!r&&typeof r=="object"&&r?.nodeType===1&&!f(r)}function Ct(r){return c$1(r)||a$6(r)||i(r,{includeNaN:true})||j(r)?true:b(r)?Object.keys(r).length===0:h(r)||d$1(r)||Z(r)||b$2(r)?r.length===0:a$5(r)||q(r)?r.size===0:C(r)?r.length===0:f(r)?Object.keys(r).length===0:false}var G=r=>{if(h(r))return a$1(r);if(i(r))return n(r);if(d$1(r))return e(r)||r.every(G);if(l(r)){let t=Object.keys(r),e=Object.getOwnPropertySymbols(r);return t.length===0&&e.length===0?true:[...t,...e].every(s=>G(r[s]))}return !r};function Qt(r,t,e){return c$2(r,t,e,new WeakMap)}function X(r,t,e){return I(r,t,e)}function B(r,t){return r===t||r===0&&t===0||Number.isNaN(r)&&Number.isNaN(t)}function I(r,t,e){if(r===t)return true;if(!l(t))return B(r,t);if(!l(r))return false;let s=Reflect.ownKeys(t).filter(i=>!(d$1(t)&&i==="length"));for(let i of s){if(!(i in r))return false;let a=r[i],o=t[i],n=e?.(a,o,i,r,t);if(!k(n)){if(!n)return false;continue}if(l(a)&&l(o)){if(!X(a,o,e))return false}else if(!B(a,o))return false}return true}function fe(r,t){return I(r,t)}var J=Function.prototype.toString,Q=/\{\s*\[native code\]\s*\}/;function ue(r){if(!b(r))return false;try{let t=J.call(r);return Q.test(t)}catch{return false}}function be(r){return !c$1(r)&&(l(r)||b(r))}function he(r){return typeof r=="number"&&Number.isSafeInteger(r)}var we=r=>{if(!p(r))return false;let t;try{t=decodeURIComponent(r);}catch{return false}return !t.startsWith("http://")&&!t.startsWith("https://")?false:new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(t)};function Oe(r){return e$1(r)&&!g(r)&&r instanceof WeakMap}
|
|
2
|
+
export{nr as a,mr as b,ar as c,lr as d,Tr as e,Rr as f,H as g,Br as h,Z as i,$ as j,st as k,at as l,xt as m,T as n,Tt as o,Ct as p,G as q,Qt as r,X as s,fe as t,ue as u,be as v,he as w,we as x,Oe as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {i}from'./chunk-XCFIOTCV.js';function e(i$1){return i(i$1)&&Number.isFinite(i$1)}export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-5SZUSNGZ.js';import {F,o,i}from'./chunk-XCFIOTCV.js';var I=(r,s={})=>{if(a(r))return;let o=F({value:r,options:s,requiredValidType:"big int"});throw new TypeError(o)};var O=(r,s={})=>{let o$1=o(s,"includeNaN")?s.includeNaN:void 0;if(i(r,{includeNaN:o$1}))return;let p=F({value:r,options:s,requiredValidType:"number"});throw new TypeError(p)};export{I as a,O as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=()=>typeof window>"u"||typeof document>"u";export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=n=>typeof n=="bigint";export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');function u(r,e){if(chunkCN53M4QZ_cjs.d(r))return;let t=chunkCN53M4QZ_cjs.F({value:r,options:e,requiredValidType:"array"});throw new TypeError(t)}exports.a=u;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkFIEZKTAZ_cjs=require('./chunk-FIEZKTAZ.cjs'),chunkD47MHBSD_cjs=require('./chunk-D47MHBSD.cjs'),chunkKCQDDZJE_cjs=require('./chunk-KCQDDZJE.cjs'),chunkJWHM3WZQ_cjs=require('./chunk-JWHM3WZQ.cjs'),chunk2TRAPBZ7_cjs=require('./chunk-2TRAPBZ7.cjs'),chunkBVPMMWDL_cjs=require('./chunk-BVPMMWDL.cjs'),chunkU5Y2FXMN_cjs=require('./chunk-U5Y2FXMN.cjs'),chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var nr=(r,t,e=false)=>{if(!(chunkCN53M4QZ_cjs.d(r)&&chunkCN53M4QZ_cjs.d(t)))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${chunkCN53M4QZ_cjs.E(r)}\`, 'array2': \`${chunkCN53M4QZ_cjs.E(t)}\`].`);if(chunkCN53M4QZ_cjs.G(e,{message:({currentType:o,validType:n})=>`Third parameter \`ignoreOrder\` must be of type \`${n}\`, but received: \`${o}\`.`}),!chunkKCQDDZJE_cjs.d(r.length,t.length))return false;let s=o=>chunkCN53M4QZ_cjs.d(o)?o.map(m=>chunkCN53M4QZ_cjs.d(m)?s(m):m).sort((m,u)=>{let z=chunkU5Y2FXMN_cjs.c(m),U=chunkU5Y2FXMN_cjs.c(u);return z<U?-1:z>U?1:0}):o,i=e?s(r):r,a=e?s(t):t;return chunkKCQDDZJE_cjs.d(i.length,a.length)?i.every((o,n)=>chunkU5Y2FXMN_cjs.c(o)===chunkU5Y2FXMN_cjs.c(a[n])):false};var mr=(r,t)=>chunkKCQDDZJE_cjs.d(r,t);var ar=(r,t)=>{if(!chunkFIEZKTAZ_cjs.a(r)||!chunkFIEZKTAZ_cjs.a(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.].");return r.protocol+"//"+r.host+r.pathname==t.protocol+"//"+t.host+t.pathname};var lr=(r,t)=>{if(!chunkFIEZKTAZ_cjs.a(r)||!chunkFIEZKTAZ_cjs.a(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.].");return r.protocol+"//"+r.host+r.pathname+r.search==t.protocol+"//"+t.host+t.pathname+t.search};var Tr=(r,t,e={})=>{if(chunk2TRAPBZ7_cjs.a(r)||!chunkCN53M4QZ_cjs.d(t))return false;chunkCN53M4QZ_cjs.m(e,{message:({currentType:n,validType:m})=>`Third parameter (\`options\`) must be of type \`${m}\`, but received: \`${n}\`.`});let{exactMatch:s=false,flags:i="i"}=e;chunkCN53M4QZ_cjs.G(s,{message:({currentType:n,validType:m})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${m}\`, but received: \`${n}\`.`}),chunkBVPMMWDL_cjs.a(i,{message:({currentType:n,validType:m})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${m}\`, but received: \`${n}\`.`});let a=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=t.filter(n=>chunkCN53M4QZ_cjs.p(n)).map(a);return o.length===0?false:o.every(n=>{let m=s?`(?<!\\S)${n}(?!\\S)`:n;return new RegExp(m,i.includes("u")?i:i+"u").test(r)})};var Rr=(r,t,e)=>{if(chunk2TRAPBZ7_cjs.a(r)||!chunkCN53M4QZ_cjs.d(t))return false;chunkCN53M4QZ_cjs.m(e,{message:({currentType:m,validType:u})=>`Third parameter (\`options\`) must be of type \`${u}\`, but received: \`${m}\`.`});let{exactMatch:s=false,flags:i="i"}=e||{};chunkCN53M4QZ_cjs.G(s,{message:({currentType:m,validType:u})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${u}\`, but received: \`${m}\`.`}),chunkBVPMMWDL_cjs.a(i,{message:({currentType:m,validType:u})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${u}\`, but received: \`${m}\`.`});let a=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=t.filter(m=>chunkCN53M4QZ_cjs.p(m)).map(a);if(o.length===0)return false;let n=s?`(?<!\\S)(${o.join("|")})(?!\\S)`:`(${o.join("|")})`;return new RegExp(n,i.includes("u")?i:i+"u").test(r)};var H=(r,t)=>{if(!chunkCN53M4QZ_cjs.l(r))return false;if(!(chunkCN53M4QZ_cjs.h(t)||chunkCN53M4QZ_cjs.i(t)||chunkCN53M4QZ_cjs.j(t)))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${chunkCN53M4QZ_cjs.E(t)}\`.`);return Object.prototype.hasOwnProperty.call(r,t)?true:chunkCN53M4QZ_cjs.d(r)?r.some(e=>H(e,t)):Object.values(r).some(e=>chunkCN53M4QZ_cjs.l(e)&&H(e,t))};var Br=(r,t)=>{if(!chunkCN53M4QZ_cjs.d(r)||!chunkCN53M4QZ_cjs.d(t)||chunkKCQDDZJE_cjs.e(r)||chunkKCQDDZJE_cjs.e(t))return false;let e=new Set(r);return t.some(s=>e.has(s))};var Z=r=>Object.prototype.toString.call(r)==="[object Arguments]";function $(r){return typeof r=="number"&&r>-1&&Number.isInteger(r)&&r<=Number.MAX_SAFE_INTEGER}function st(r){return !chunkCN53M4QZ_cjs.b(r)&&chunkCN53M4QZ_cjs.l(r)&&$(r?.length)}function at(r){return chunkCN53M4QZ_cjs.l(r)&&$(r.length)}var xt=r=>chunkCN53M4QZ_cjs.h(r)||chunkCN53M4QZ_cjs.i(r)?chunkJWHM3WZQ_cjs.a(r.toString())!==0?true:r.toString().trim()==="0":false;var T=(r,t)=>{if(typeof r=="number"&&typeof t=="number"&&Number.isNaN(r)&&Number.isNaN(t)||r===t)return true;if(typeof r!=typeof t)return false;if(chunkU5Y2FXMN_cjs.b(r)&&chunkU5Y2FXMN_cjs.b(t))return r.getTime()===t.getTime();if(chunkKCQDDZJE_cjs.a(r)&&chunkKCQDDZJE_cjs.a(t)||chunkCN53M4QZ_cjs.j(r)&&chunkCN53M4QZ_cjs.j(t))return r.toString()===t.toString();if(chunkCN53M4QZ_cjs.q(r)&&chunkCN53M4QZ_cjs.q(t)){if(r.size!==t.size)return false;let e=Array.from(t),s=new Set;for(let i of r){let a=false;for(let o=0;o<e.length;o++)if(!s.has(o)&&T(i,e[o])){s.add(o),a=true;break}if(!a)return false}return true}if(chunkU5Y2FXMN_cjs.a(r)&&chunkU5Y2FXMN_cjs.a(t)){if(r.size!==t.size)return false;let e=Array.from(t),s=new Set;for(let[i,a]of r){let o=false;for(let n=0;n<e.length;n++){if(s.has(n))continue;let[m,u]=e[n];if(T(i,m)&&T(a,u)){s.add(n),o=true;break}}if(!o)return false}return true}if(chunkCN53M4QZ_cjs.d(r)&&chunkCN53M4QZ_cjs.d(t))return r.length!==t.length?false:r.every((e,s)=>T(e,t[s]));if(chunkCN53M4QZ_cjs.l(r)&&chunkCN53M4QZ_cjs.l(t)&&r&&t){if(chunkCN53M4QZ_cjs.d(r)!==chunkCN53M4QZ_cjs.d(t))return false;let e=Object.keys(r),s=Object.keys(t);return e.length!==s.length?false:e.every(i=>T(r[i],t[i]))}return false};function Tt(r){return !!r&&typeof r=="object"&&r?.nodeType===1&&!chunkCN53M4QZ_cjs.f(r)}function Ct(r){return chunkCN53M4QZ_cjs.c(r)||chunkCN53M4QZ_cjs.a(r)||chunkCN53M4QZ_cjs.i(r,{includeNaN:true})||chunkCN53M4QZ_cjs.j(r)?true:chunkCN53M4QZ_cjs.b(r)?Object.keys(r).length===0:chunkCN53M4QZ_cjs.h(r)||chunkCN53M4QZ_cjs.d(r)||Z(r)||chunkD47MHBSD_cjs.b(r)?r.length===0:chunkU5Y2FXMN_cjs.a(r)||chunkCN53M4QZ_cjs.q(r)?r.size===0:chunkCN53M4QZ_cjs.C(r)?r.length===0:chunkCN53M4QZ_cjs.f(r)?Object.keys(r).length===0:false}var G=r=>{if(chunkCN53M4QZ_cjs.h(r))return chunk2TRAPBZ7_cjs.a(r);if(chunkCN53M4QZ_cjs.i(r))return chunkCN53M4QZ_cjs.n(r);if(chunkCN53M4QZ_cjs.d(r))return chunkKCQDDZJE_cjs.e(r)||r.every(G);if(chunkCN53M4QZ_cjs.l(r)){let t=Object.keys(r),e=Object.getOwnPropertySymbols(r);return t.length===0&&e.length===0?true:[...t,...e].every(s=>G(r[s]))}return !r};function Qt(r,t,e){return chunkKCQDDZJE_cjs.c(r,t,e,new WeakMap)}function X(r,t,e){return I(r,t,e)}function B(r,t){return r===t||r===0&&t===0||Number.isNaN(r)&&Number.isNaN(t)}function I(r,t,e){if(r===t)return true;if(!chunkCN53M4QZ_cjs.l(t))return B(r,t);if(!chunkCN53M4QZ_cjs.l(r))return false;let s=Reflect.ownKeys(t).filter(i=>!(chunkCN53M4QZ_cjs.d(t)&&i==="length"));for(let i of s){if(!(i in r))return false;let a=r[i],o=t[i],n=e?.(a,o,i,r,t);if(!chunkCN53M4QZ_cjs.k(n)){if(!n)return false;continue}if(chunkCN53M4QZ_cjs.l(a)&&chunkCN53M4QZ_cjs.l(o)){if(!X(a,o,e))return false}else if(!B(a,o))return false}return true}function fe(r,t){return I(r,t)}var J=Function.prototype.toString,Q=/\{\s*\[native code\]\s*\}/;function ue(r){if(!chunkCN53M4QZ_cjs.b(r))return false;try{let t=J.call(r);return Q.test(t)}catch{return false}}function be(r){return !chunkCN53M4QZ_cjs.c(r)&&(chunkCN53M4QZ_cjs.l(r)||chunkCN53M4QZ_cjs.b(r))}function he(r){return typeof r=="number"&&Number.isSafeInteger(r)}var we=r=>{if(!chunkCN53M4QZ_cjs.p(r))return false;let t;try{t=decodeURIComponent(r);}catch{return false}return !t.startsWith("http://")&&!t.startsWith("https://")?false:new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(t)};function Oe(r){return chunkCN53M4QZ_cjs.e(r)&&!chunkCN53M4QZ_cjs.g(r)&&r instanceof WeakMap}
|
|
2
|
+
exports.a=nr;exports.b=mr;exports.c=ar;exports.d=lr;exports.e=Tr;exports.f=Rr;exports.g=H;exports.h=Br;exports.i=Z;exports.j=$;exports.k=st;exports.l=at;exports.m=xt;exports.n=T;exports.o=Tt;exports.p=Ct;exports.q=G;exports.r=Qt;exports.s=X;exports.t=fe;exports.u=ue;exports.v=be;exports.w=he;exports.x=we;exports.y=Oe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var i=n=>typeof n=="bigint";exports.a=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var p=(s,t={})=>{if(chunkCN53M4QZ_cjs.h(s))return;let n=chunkCN53M4QZ_cjs.F({value:s,options:t,requiredValidType:"string"});throw new TypeError(n)};exports.a=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var i=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),p=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]),o=e=>{if(!chunkCN53M4QZ_cjs.p(e))return;let s=e.split("/").pop();if(s==="")return "";if(s){for(let t of p){let a=`.${t}`;if(s.toLowerCase().endsWith(a))return s.slice(0,-a.length)}for(;;){let t=s.lastIndexOf(".");if(t===-1)break;let a=s.slice(t+1).toLowerCase();if(i.has(a))s=s.slice(0,t);else break}return s}};exports.a=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkPUQXRLZH_cjs=require('./chunk-PUQXRLZH.cjs'),chunkU5Y2FXMN_cjs=require('./chunk-U5Y2FXMN.cjs'),chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var v=(r=1e3,e)=>{if(!chunkPUQXRLZH_cjs.a(r)||r<=0)throw new TypeError(`First parameter \`milliSeconds\` must be a number, non-zero, non-NaN, non-negative, and integer-number, but received: \`${chunkCN53M4QZ_cjs.E(r)}\`, with value: \`${chunkU5Y2FXMN_cjs.c(r)}\`.`);if(chunkCN53M4QZ_cjs.g(e)||e&&!(e instanceof AbortSignal))throw new TypeError("Second parameter `signal` must be an instance of AbortSignal if provided.");return new Promise((b,f)=>{let p=setTimeout(()=>{o(),b();},r),o=()=>{clearTimeout(p),e&&e.removeEventListener("abort",t);},t=()=>{o(),f(new DOMException("Delay aborted","AbortError"));};e&&(e.aborted?t():e.addEventListener("abort",t,{once:true}));})};exports.a=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var N=e=>typeof e=="boolean";var d=e=>typeof e=="function";function D(e){return e==null}function T(e){return Array.isArray(e)}function w(e){return typeof e=="object"&&!D(e)&&!T(e)}function u(e){if(!w(e))return false;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}var j=e=>e===null;var x=e=>typeof e=="string";var A=(e,r={})=>{let t=u(r)&&N(r.includeNaN)?r.includeNaN:false,o=typeof e=="number";return t?o:o&&!Number.isNaN(e)};var E=e=>typeof e=="symbol";var K=e=>typeof e>"u";function k(e){return T(e)||w(e)}var v=(e,r={})=>{if(N(e))return;let t=C({value:e,options:r,requiredValidType:"boolean"});throw new TypeError(t)};function I(e){return typeof e=="number"?Number.isNaN(e):Object.prototype.toString.call(e)==="[object Number]"&&Number.isNaN(e.valueOf())}function U(e,r,t={}){if(!x(e)&&!k(e)&&!d(e))return false;L(t,{message:({currentType:i,validType:c})=>`Third parameter (\`options\`) must be of type \`${c}\`, but received: \`${i}\`.`});let o=t.discardUndefined===void 0?true:t.discardUndefined,n=t.discardNull===void 0?false:t.discardNull;v(o,{message:({currentType:i,validType:c})=>`Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${c}\`, but received: \`${i}\`.`}),v(n,{message:({currentType:i,validType:c})=>`Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${c}\`, but received: \`${i}\`.`});let s=[];if(x(r)&&r.trim().length>0||A(r,{includeNaN:true}))(A(r,{includeNaN:true})?String(r):r).split(".").forEach(c=>{let S=c.match(/^\[(\d+)\]$/),P=c.match(/^Symbol\((.+)\)$/);S?s.push(Number(S[1])):P?s.push(Symbol.for(P[1])):I(Number(c))?s.push(c):s.push(Number(c));});else if(E(r))s.push(r);else return false;let a=x(e)&&e.trim().length>0?Object(e):e;for(let i of s)if(x(i)&&i.trim().length>0||A(i,{includeNaN:true})){if(j(a)||!Object.prototype.hasOwnProperty.call(a,i))return false;a=a[i];}else if(E(i)){if(j(a)||typeof a!="object"&&!d(a))return false;let S=Object.getOwnPropertySymbols(a).find(P=>P===i||P.description===i.description);if(!S)return false;a=a[S];}else return false;return !(o&&K(a)||n&&j(a))}var l=(e,r={})=>x(e)?(u(r)||(r={}),((U(r,"trim")?r.trim:true)?e.trim():e).length>0):false;function H(e){return Object.prototype.toString.call(e)==="[object Set]"||e instanceof Set}function m(e){return Array.isArray(e)&&e.length>0}var Be=(e,r={lowerCaseNextRest:true,trim:false})=>{if(!l(e))return "";u(r)||(r={});let t=r.lowerCaseNextRest!==false;return r.trim===true&&(e=e.trim()),e[0].toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))},Ve=(e,r={collapseSpaces:false,trim:false})=>{if(!l(e))return "";let t=e;u(r)||(r={});let o=r.collapseSpaces===true;if(r.trim===true&&(t=t.trim()),o){let s=t.match(/^\s*/)?.[0]??"",a=t.match(/\s*$/)?.[0]??"";t=t.trim().replace(/\s+/g," "),t=`${s}${t}${a}`;}return t.toLowerCase().split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")};var g=e=>{let r="";return T(e)?r=e.map(t=>l(t)?t.trim():"").filter(t=>t.length).join("-"):l(e)&&(r=e.trim()),r.split(/[^\p{L}\p{N}]+/u).filter(Boolean)};var O=e=>{let r=new Set([]),t=o=>o.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean).join("");if(l(e)){let o=t(e);o&&r.add(o);}return m(e)&&e.forEach(o=>{if(l(o)){let n=t(o);n&&r.add(n);}}),H(e)&&e.forEach(o=>{if(l(o)){let n=t(o);n&&r.add(n);}}),r},F=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map((n,s)=>o.has(n)?n:s===0?n.toLowerCase():n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join("")},M=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(n=>o.has(n)?n:n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")},B=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(n=>o.has(n)?n:n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join("")},V=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(n=>o.has(n)?n:n.toLowerCase()).join(" ")},h=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(n=>o.has(n)?n:n.toLowerCase()).join("-")},_=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(n=>o.has(n)?n:n.toLowerCase()).join("_")},W=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(n=>o.has(n)?n:n.toLowerCase()).join(".")},$=(e,r)=>{if(!m(e)&&!l(e))return "";let t=g(e),o=O(r);return t.map(s=>o.has(s)?s:s.toLowerCase()).join("-").replace(/^-+|-+$/g,"")};var G=e=>typeof Buffer<"u"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(e);var z=e=>Object.prototype.toString.call(e)==="[object Error]"||e instanceof Error;var b=Object.freeze(["URI","URL","HTTP","HTTPS","HTML","XML","CSS","JS","JSON","SVG","DOM","UTC","XHR","RTC","ICE","TLS","TCP","UDP","IDB","ID"]),R={string:"String",number:"Number",boolean:"Boolean",bigint:"Big Int",symbol:"Symbol",undefined:"Undefined",null:"Null",regexp:"Reg Exp",reflect:"Reflect",proxy:"Proxy",atomics:"Atomics",object:"Object",array:"Array",arguments:"Arguments",function:"Function",asyncfunction:"Async Function",generatorfunction:"Generator Function",asyncgeneratorfunction:"Async Generator Function",generator:"Generator",promise:"Promise",evalerror:"Eval Error",rangeerror:"Range Error",referenceerror:"Reference Error",syntaxerror:"Syntax Error",typeerror:"Type Error",urierror:"URI Error",aggregateerror:"Aggregate Error",error:"Error",int8array:"Int 8 Array",uint8array:"Uint 8 Array",uint8clampedarray:"Uint 8 Clamped Array",int16array:"Int 16 Array",uint16array:"Uint 16 Array",int32array:"Int 32 Array",uint32array:"Uint 32 Array",float32array:"Float 32 Array",float64array:"Float 64 Array",bigint64array:"Big Int 64 Array",biguint64array:"Big Uint 64 Array",arraybuffer:"Array Buffer",sharedarraybuffer:"Shared Array Buffer",dataview:"Data View",arraybufferview:"Array Buffer View",map:"Map",set:"Set",weakmap:"Weak Map",weakset:"Weak Set",mapiterator:"Map Iterator",setiterator:"Set Iterator",arrayiterator:"Array Iterator",stringiterator:"String Iterator",readablestream:"Readable Stream",writablestream:"Writable Stream",transformstream:"Transform Stream",readablestreamdefaultreader:"Readable Stream Default Reader",writablestreamdefaultwriter:"Writable Stream Default Writer",readablestreamdefaultcontroller:"Readable Stream Default Controller",transformstreamdefaultcontroller:"Transform Stream Default Controller",abortcontroller:"Abort Controller",abortsignal:"Abort Signal",fetch:"fetch",request:"Request",response:"Response",headers:"Headers",formdata:"FormData",blob:"Blob",file:"File",filelist:"FileList",filereader:"FileReader",intl:"Intl",collator:"Intl. Collator",datetimeformat:"Intl. Date Time Format",listformat:"Intl. List Format",numberformat:"Intl. Number Format",pluralrules:"Intl. Plural Rules",relativetimeformat:"Intl. Relative Time Format",segmenter:"Intl. Segmenter",locale:"Intl. Locale",displaynames:"Intl. Display Names",finalizationregistry:"Finalization Registry",weakref:"Weak Ref",structuredclone:"structured Clone",urlpattern:"URL Pattern",performance:"Performance",performanceobserver:"Performance Observer",performanceentry:"Performance Entry",performancemark:"Performance Mark",performancemeasure:"Performance Measure",webassembly:"Web Assembly",wasmmodule:"WebAssembly .Module",wasminstance:"WebAssembly. Instance",wasmmemory:"WebAssembly. Memory",wasmtable:"WebAssembly. Table",buffer:"Buffer",process:"Process",eventemitter:"Event Emitter",stream:"Stream",fs:"fs",path:"path",url:"URL",urlsearchparams:"URL Search Params",node:"Node",element:"Element",htmlelement:"HTML Element",svgelement:"SVG Element",document:"Document",documentfragment:"Document Fragment",shadowroot:"Shadow Root",nodelist:"Node List",htmlcollection:"HTML Collection",mutationobserver:"Mutation Observer",intersectionobserver:"Intersection Observer",resizeobserver:"Resize Observer"};var f=e=>e.replace(/[\s_\-]+/g,"").toLowerCase(),y=Object.entries(R).reduce((e,[r,t])=>(e[f(r)]=t,e),{});function X(e){if(typeof e!="object"||e===null)return false;let r=Object.prototype.toString.call(e);if(["[object Array]","[object Date]","[object RegExp]","[object Map]","[object Set]","[object WeakMap]","[object WeakSet]","[object Function]","[object Error]","[object Promise]","[object Generator]","[object GeneratorFunction]","[object AsyncFunction]"].includes(r))return false;try{return Reflect.defineProperty(e,"__proxy_detect__",{configurable:!0,value:1}),Reflect.deleteProperty(e,"__proxy_detect__"),!1}catch{return true}}var p=(e,r)=>r==="toPascalCaseSpace"?M(e,b):r==="slugify"?$(e,b):r==="toCamelCase"?F(e,b):r==="toDotCase"?W(e,b):r==="toKebabCase"?h(e,b):r==="toPascalCase"?B(e,b):r==="toSnakeCase"?_(e,b):V(e,b),q=(e,r={formatCase:"toLowerCase"})=>{u(r)||(r={});let t=r.formatCase;if(j(e))return p(y[f("null")]??"Null",t);if(I(e))return "NaN";if(e===1/0)return "Infinity";if(e===-1/0)return "-Infinity";if(e instanceof Number)return p("Number Constructor",t);if(e instanceof String)return p("String Constructor",t);if(e instanceof Boolean)return p("Boolean Constructor",t);let o=typeof e;if(!k(e)&&!d(e))return p(y[f(o)]??o,t);if(G(e))return p(y[f("buffer")]??"Buffer",t);if(X(e))return p(y[f("proxy")]??"Proxy",t);if(w(e)&&d(e?.next)&&d(e?.throw))return p(y[f("generator")]??"Generator",t);if(z(e)){let i=e.constructor?.name??"Error";return p(y[f(i)]??y[f(i.replace(/\s+/g,""))]??i,t)}if(j(Object.getPrototypeOf(e)))return p(y[f("object")]??"Object",t);let n=Object.prototype.toString.call(e).slice(8,-1)||"Object",s=y[f(n)];if(s)return p(s,t);let a=e?.constructor?.name;return p(a&&a!=="Object"?y[f(a)]??a:n,t)};function C({value:e,options:r,requiredValidType:t}){let{message:o,formatCase:n}=u(r)?r:{},s=h(t),a=q(e,{formatCase:n}),i={currentType:a,validType:s},c=`Parameter input (\`value\`) must be of type \`${s}\`, but received: \`${a}\`.`;return d(o)?l(o(i))?o(i).trim():c:l(o)?o.trim():c}function L(e,r={}){if(u(e))return;let t=C({value:e,options:r,requiredValidType:"plain object"});throw new TypeError(t)}exports.A=W;exports.B=$;exports.C=G;exports.D=z;exports.E=q;exports.F=C;exports.G=v;exports.a=N;exports.b=d;exports.c=D;exports.d=T;exports.e=w;exports.f=u;exports.g=j;exports.h=x;exports.i=A;exports.j=E;exports.k=K;exports.l=k;exports.m=L;exports.n=I;exports.o=U;exports.p=l;exports.q=H;exports.r=m;exports.s=Be;exports.t=Ve;exports.u=F;exports.v=M;exports.w=B;exports.x=V;exports.y=h;exports.z=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkUUPQI6ND_cjs=require('./chunk-UUPQI6ND.cjs');var y=(t,o={})=>!chunkUUPQI6ND_cjs.a(t,o);function p(t){return t!=null&&typeof t=="object"&&e.has(Object.prototype.toString.call(t))}var e=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);exports.a=y;exports.b=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-ZYAML74V.js';var y=(t,o={})=>!a(t,o);function p(t){return t!=null&&typeof t=="object"&&e.has(Object.prototype.toString.call(t))}var e=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);export{y as a,p as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-ELDDNERR.js';import {c}from'./chunk-MNGGDB2G.js';import {E,g}from'./chunk-XCFIOTCV.js';var v=(r=1e3,e)=>{if(!a(r)||r<=0)throw new TypeError(`First parameter \`milliSeconds\` must be a number, non-zero, non-NaN, non-negative, and integer-number, but received: \`${E(r)}\`, with value: \`${c(r)}\`.`);if(g(e)||e&&!(e instanceof AbortSignal))throw new TypeError("Second parameter `signal` must be an instance of AbortSignal if provided.");return new Promise((b,f)=>{let p=setTimeout(()=>{o(),b();},r),o=()=>{clearTimeout(p),e&&e.removeEventListener("abort",t);},t=()=>{o(),f(new DOMException("Delay aborted","AbortError"));};e&&(e.aborted?t():e.addEventListener("abort",t,{once:true}));})};export{v as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){return typeof e=="number"&&Number.isInteger(e)}export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {p as p$1}from'./chunk-XCFIOTCV.js';var i=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),p=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]),o=e=>{if(!p$1(e))return;let s=e.split("/").pop();if(s==="")return "";if(s){for(let t of p){let a=`.${t}`;if(s.toLowerCase().endsWith(a))return s.slice(0,-a.length)}for(;;){let t=s.lastIndexOf(".");if(t===-1)break;let a=s.slice(t+1).toLowerCase();if(i.has(a))s=s.slice(0,t);else break}return s}};export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');function e(i){return chunkCN53M4QZ_cjs.i(i)&&Number.isFinite(i)}exports.a=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-QFCGBBSY.js';var p=t=>(a(t,{message:({currentType:o,validType:r})=>`First parameter (\`props\`) must be of type \`${r}\`, but received: \`${o}\`.`}),o=>!t.map(r=>r.toString()).includes(o.toString()));export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var e=n=>n instanceof URL;exports.a=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkGRVZXQXL_cjs=require('./chunk-GRVZXQXL.cjs'),chunkKCQDDZJE_cjs=require('./chunk-KCQDDZJE.cjs'),chunk62HX5Z45_cjs=require('./chunk-62HX5Z45.cjs'),chunkU5Y2FXMN_cjs=require('./chunk-U5Y2FXMN.cjs'),chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var c=i=>{chunk62HX5Z45_cjs.a(i,{message:({currentType:t,validType:n})=>`First parameter (\`values\`) must be of type \`${n}\` (array literal or instance), but received: \`${t}\`.`});let r=[];return i.forEach((t,n)=>{for(let s=n+1;s<i.length;s++)if(chunkKCQDDZJE_cjs.d(t,i[s])){r.some(d=>chunkKCQDDZJE_cjs.d(d,t))||r.push(t);break}}),r};var D=(i,r)=>{if(!chunkCN53M4QZ_cjs.f(i))return {};chunk62HX5Z45_cjs.a(r,{message:({currentType:n,validType:s})=>`Second parameter (\`keysToOmit\`) must be of type \`${s}\` (array literal or instance), but received: \`${n}\`.`});let t=c(r);if(t.length>0)throw new Error(`Function "omitKeys" Error: Duplicate keys detected - \`${t}\``);return Object.fromEntries(Object.entries(i).filter(([n])=>!r.includes(n)))};var G=(i,r)=>{if(!chunkCN53M4QZ_cjs.f(i))return {};chunk62HX5Z45_cjs.a(r,{message:({currentType:e,validType:a})=>`Second parameter (\`keysToOmit\`) must be of type \`${a}\` (array literal or instance), but received: \`${e}\`.`});let t=c(r);if(chunkCN53M4QZ_cjs.r(t))throw new Error(`Function "omitKeysDeep" Error: Duplicate keys detected - \`${chunkU5Y2FXMN_cjs.c(t)}\`.`);let n=(e,a)=>{if(!chunkCN53M4QZ_cjs.l(e))return e;let[o,...l]=a;if(chunkKCQDDZJE_cjs.e(l))if(chunkCN53M4QZ_cjs.d(e)){let f=parseInt(o);!chunkCN53M4QZ_cjs.n(f)&&f in e&&e.splice(f,1);}else delete e[o];else {let f=e[o];chunkCN53M4QZ_cjs.l(f)&&(e[o]=n(f,l));}return e},s=e=>chunkCN53M4QZ_cjs.d(e)?e.map(s).filter(a=>!(chunkCN53M4QZ_cjs.l(a)&&Object.keys(a).length===0)):chunkCN53M4QZ_cjs.l(e)?Object.fromEntries(Object.entries(e).map(([o,l])=>[o,s(l)]).filter(([,o])=>!chunkCN53M4QZ_cjs.k(o)&&!(chunkCN53M4QZ_cjs.l(o)&&Object.keys(o).length===0))):e,d=chunkGRVZXQXL_cjs.d(chunkU5Y2FXMN_cjs.c(i));for(let e of r){let a=e.split(".");n(d,a);}return s(d)};var W=(i,r)=>{chunk62HX5Z45_cjs.a(r,{message:({currentType:n,validType:s})=>`Second parameter (\`arrayExcept\`) must be of type \`${s}\` (array literal or instance), but received: \`${n}\`.`});let t=c(r);if(chunkCN53M4QZ_cjs.r(t))throw new Error(`Function omitProps error, cause duplicate of arrayExcept: ${chunkU5Y2FXMN_cjs.c(t)}.`);if(i){let n=Object.entries(i).filter(([s])=>!r.includes(s));return Object.fromEntries(n)}};exports.a=c;exports.b=D;exports.c=G;exports.d=W;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d as d$1}from'./chunk-PVJF2JHM.js';import {d,e}from'./chunk-W5EDKJK3.js';import {a}from'./chunk-QFCGBBSY.js';import {c as c$1}from'./chunk-MNGGDB2G.js';import {f,r,l,d as d$2,n,k}from'./chunk-XCFIOTCV.js';var c=i=>{a(i,{message:({currentType:t,validType:n})=>`First parameter (\`values\`) must be of type \`${n}\` (array literal or instance), but received: \`${t}\`.`});let r=[];return i.forEach((t,n)=>{for(let s=n+1;s<i.length;s++)if(d(t,i[s])){r.some(d$1=>d(d$1,t))||r.push(t);break}}),r};var D=(i,r)=>{if(!f(i))return {};a(r,{message:({currentType:n,validType:s})=>`Second parameter (\`keysToOmit\`) must be of type \`${s}\` (array literal or instance), but received: \`${n}\`.`});let t=c(r);if(t.length>0)throw new Error(`Function "omitKeys" Error: Duplicate keys detected - \`${t}\``);return Object.fromEntries(Object.entries(i).filter(([n])=>!r.includes(n)))};var G=(i,r$1)=>{if(!f(i))return {};a(r$1,{message:({currentType:e,validType:a})=>`Second parameter (\`keysToOmit\`) must be of type \`${a}\` (array literal or instance), but received: \`${e}\`.`});let t=c(r$1);if(r(t))throw new Error(`Function "omitKeysDeep" Error: Duplicate keys detected - \`${c$1(t)}\`.`);let n$1=(e$1,a)=>{if(!l(e$1))return e$1;let[o,...l$1]=a;if(e(l$1))if(d$2(e$1)){let f=parseInt(o);!n(f)&&f in e$1&&e$1.splice(f,1);}else delete e$1[o];else {let f=e$1[o];l(f)&&(e$1[o]=n$1(f,l$1));}return e$1},s=e=>d$2(e)?e.map(s).filter(a=>!(l(a)&&Object.keys(a).length===0)):l(e)?Object.fromEntries(Object.entries(e).map(([o,l])=>[o,s(l)]).filter(([,o])=>!k(o)&&!(l(o)&&Object.keys(o).length===0))):e,d=d$1(c$1(i));for(let e of r$1){let a=e.split(".");n$1(d,a);}return s(d)};var W=(i,r$1)=>{a(r$1,{message:({currentType:n,validType:s})=>`Second parameter (\`arrayExcept\`) must be of type \`${s}\` (array literal or instance), but received: \`${n}\`.`});let t=c(r$1);if(r(t))throw new Error(`Function omitProps error, cause duplicate of arrayExcept: ${c$1(t)}.`);if(i){let n=Object.entries(i).filter(([s])=>!r$1.includes(s));return Object.fromEntries(n)}};export{c as a,D as b,G as c,W as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-NIMNTEGV.js';import {p as p$1,f,h}from'./chunk-XCFIOTCV.js';var a=(r,n={withTrim:true,trimOnly:false})=>{if(!p$1(r))return "";f(n)||(n={});let{trimOnly:t=false,withTrim:l=true}=n;return t?r.trim():(l&&(r=r.trim()),r.replace(/\s+/g," "))},c=r=>p$1(r)?r.trim():"",p=(r,n={trimOnly:false})=>{if(!p$1(r))return "";f(n)||(n={});let{trimOnly:t=false}=n;return t?r.trim():r.replace(/\s+/g,"")},u=r=>h(r)?a$1(r)?"":r.replace(/<\/?[a-zA-Z][^<>]*\/?>/g," ").trim().replace(/\s+/g," ").trim():void 0;export{a,c as b,p as c,u as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkSW6HYEW7_cjs=require('./chunk-SW6HYEW7.cjs'),chunkBVPMMWDL_cjs=require('./chunk-BVPMMWDL.cjs'),chunkCN53M4QZ_cjs=require('./chunk-CN53M4QZ.cjs');var b=(e="on_processing")=>{if(chunkSW6HYEW7_cjs.a())return;chunkBVPMMWDL_cjs.a(e,{message({validType:r,currentType:i}){return `First parameter \`className\` must be of type \`${r}\`, but received: \`${i}\`.`}});let{documentElement:t}=document;t&&!t.classList.contains(e)&&t.classList.add(e);},h=(e="on_processing")=>{if(chunkSW6HYEW7_cjs.a())return;chunkBVPMMWDL_cjs.a(e,{message({validType:r,currentType:i}){return `First parameter \`className\` must be of type \`${r}\`, but received: \`${i}\`.`}});let{documentElement:t}=document;t&&t.classList.contains(e)&&t.classList.remove(e);},T=()=>{if(chunkSW6HYEW7_cjs.a())return;let e=document.activeElement;e instanceof HTMLElement&&e.blur();},g=e=>{if(chunkSW6HYEW7_cjs.a())return;chunkCN53M4QZ_cjs.f(e)||(e={});let t=chunkCN53M4QZ_cjs.o(e,"behavior")&&chunkCN53M4QZ_cjs.p(e.behavior)&&["auto","instant","smooth"].includes(e.behavior.trim())?e.behavior:"smooth",r=chunkCN53M4QZ_cjs.o(e,"timeout")&&chunkCN53M4QZ_cjs.i(e.timeout)&&e.timeout>=1?e.timeout:1;setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:t});},r);};exports.a=b;exports.b=h;exports.c=T;exports.d=g;
|