@rzl-zone/utils-js 3.1.2-beta.0 → 3.2.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 (210) hide show
  1. package/README.md +59 -32
  2. package/dist/NumberRangeUnion-B6bhM2s7.d.ts +33 -0
  3. package/dist/{any-BmdI8UbK.d.ts → any-v4TsK9ES.d.ts} +25 -26
  4. package/dist/{arrays-normalize-recursive-CnjYJ9xg.d.ts → arrays-normalize-recursive-BqmVuFlD.d.ts} +20 -20
  5. package/dist/assertions/index.cjs +1 -1
  6. package/dist/assertions/index.d.ts +96 -70
  7. package/dist/assertions/index.js +1 -1
  8. package/dist/chunk-2CQX5CBG.js +1 -0
  9. package/dist/chunk-2IOOEY45.cjs +1 -0
  10. package/dist/chunk-3IBQ5MOM.js +1 -0
  11. package/dist/chunk-3VA554KW.js +1 -0
  12. package/dist/chunk-5757UBXJ.cjs +1 -0
  13. package/dist/chunk-5IGC6PBH.js +1 -0
  14. package/dist/chunk-5KJFVIQT.cjs +1 -0
  15. package/dist/chunk-6JFCSH7J.js +1 -0
  16. package/dist/chunk-6JFZL7YE.cjs +1 -0
  17. package/dist/chunk-7ODAAXX5.cjs +1 -0
  18. package/dist/chunk-BAV5T2E3.cjs +1 -0
  19. package/dist/chunk-CAH33WOQ.cjs +1 -0
  20. package/dist/chunk-CKTLUNWX.js +1 -0
  21. package/dist/chunk-CMW2TBOQ.js +1 -0
  22. package/dist/chunk-D3ENH7H6.cjs +1 -0
  23. package/dist/chunk-DEZZUYE2.js +1 -0
  24. package/dist/chunk-DVMHRLKP.cjs +1 -0
  25. package/dist/chunk-DWF2R5GD.cjs +1 -0
  26. package/dist/chunk-E55EQK2U.cjs +1 -0
  27. package/dist/chunk-E74U6CYP.cjs +1 -0
  28. package/dist/chunk-EL6A35UR.cjs +1 -0
  29. package/dist/chunk-F6IPNNSJ.cjs +1 -0
  30. package/dist/chunk-FJZGG54N.cjs +1 -0
  31. package/dist/chunk-FWCKOJZM.js +1 -0
  32. package/dist/chunk-FWHNWL2P.cjs +1 -0
  33. package/dist/chunk-GGEADHZO.js +1 -0
  34. package/dist/chunk-GQR4R5WY.js +1 -0
  35. package/dist/chunk-H66AC7GK.cjs +1 -0
  36. package/dist/chunk-HQWOFR56.cjs +1 -0
  37. package/dist/chunk-HYRQMTRH.cjs +1 -0
  38. package/dist/chunk-IRFL4MAX.js +1 -0
  39. package/dist/chunk-IVL7CKVH.cjs +1 -0
  40. package/dist/chunk-IZPBKKPO.js +1 -0
  41. package/dist/chunk-JBQMXC5I.cjs +1 -0
  42. package/dist/chunk-JEQEF5WD.js +1 -0
  43. package/dist/chunk-JMJQCN74.js +1 -0
  44. package/dist/chunk-JYQTCICM.js +1 -0
  45. package/dist/chunk-KHO2SBNA.cjs +1 -0
  46. package/dist/chunk-KVAL5PAG.cjs +1 -0
  47. package/dist/chunk-L5RDAVVH.js +1 -0
  48. package/dist/chunk-LS6U7FAY.cjs +1 -0
  49. package/dist/chunk-NBZWMBO6.js +1 -0
  50. package/dist/chunk-NRF6LWBC.cjs +1 -0
  51. package/dist/chunk-OI5XKNZO.js +1 -0
  52. package/dist/chunk-ONZFBJVW.js +1 -0
  53. package/dist/chunk-OYTYSY7G.js +1 -0
  54. package/dist/chunk-PET42Z7W.js +1 -0
  55. package/dist/chunk-PZQ6I4JJ.cjs +1 -0
  56. package/dist/chunk-QBKAEVYG.js +1 -0
  57. package/dist/chunk-QNKGP5DY.js +1 -0
  58. package/dist/chunk-RIPKY4RU.js +1 -0
  59. package/dist/chunk-RZW35UN5.cjs +1 -0
  60. package/dist/chunk-SBFNXGTJ.js +1 -0
  61. package/dist/chunk-SBKGWRS5.js +1 -0
  62. package/dist/chunk-SIM77PU4.js +1 -0
  63. package/dist/chunk-T2T7K3KR.js +1 -0
  64. package/dist/chunk-T7PU2V7X.cjs +1 -0
  65. package/dist/chunk-UDA26MCU.cjs +1 -0
  66. package/dist/chunk-V45XJKHW.cjs +1 -0
  67. package/dist/chunk-VJDDGRIK.cjs +1 -0
  68. package/dist/chunk-W2WNBUDE.js +1 -0
  69. package/dist/chunk-WVSPXFTY.js +1 -0
  70. package/dist/chunk-XABCB3Y7.cjs +1 -0
  71. package/dist/chunk-XEDXFSGI.js +1 -0
  72. package/dist/chunk-YKPSRP5G.js +1 -0
  73. package/dist/chunk-YLA3DURS.cjs +1 -0
  74. package/dist/chunk-YWHHVDT4.js +1 -0
  75. package/dist/chunk-ZETAZZLD.cjs +1 -0
  76. package/dist/conversions/index.cjs +1 -1
  77. package/dist/conversions/index.d.ts +515 -321
  78. package/dist/conversions/index.js +1 -1
  79. package/dist/events/index.cjs +1 -1
  80. package/dist/events/index.d.ts +25 -20
  81. package/dist/events/index.js +1 -1
  82. package/dist/{extends-Bk_SBGdT.d.ts → extends-DtdRjDyU.d.ts} +63 -87
  83. package/dist/formatters/index.cjs +1 -0
  84. package/dist/formatters/index.d.ts +2106 -0
  85. package/dist/formatters/index.js +1 -0
  86. package/dist/generators/index.cjs +1 -0
  87. package/dist/{generator → generators}/index.d.ts +57 -59
  88. package/dist/generators/index.js +1 -0
  89. package/dist/{if-CvT4R7Kh.d.ts → if-ChM35c_q.d.ts} +6 -5
  90. package/dist/{is-array--YjXV-Wx.d.ts → is-array-BJeHxPM3.d.ts} +287 -542
  91. package/dist/{isPlainObject-BVhBAPHX.d.ts → isPlainObject-DGJkcFYw.d.ts} +6 -6
  92. package/dist/{never-BfayMBF9.d.ts → never-D89PbPh5.d.ts} +10 -19
  93. package/dist/next/index.cjs +1 -8
  94. package/dist/next/index.d.ts +15 -12
  95. package/dist/next/index.js +1 -8
  96. package/dist/next/server/index.cjs +1 -2
  97. package/dist/next/server/index.d.ts +1 -1
  98. package/dist/next/server/index.js +1 -2
  99. package/dist/{nils-DMz3kU7M.d.ts → nils-CO8zLHSB.d.ts} +39 -65
  100. package/dist/operations/index.cjs +1 -1
  101. package/dist/operations/index.d.ts +4 -4
  102. package/dist/operations/index.js +1 -1
  103. package/dist/or-C6qzKt2I.d.ts +82 -0
  104. package/dist/override-CL2olHE5.d.ts +59 -0
  105. package/dist/parsers/index.cjs +1 -1
  106. package/dist/parsers/index.js +1 -1
  107. package/dist/pick-BSMX6Xe2.d.ts +15 -0
  108. package/dist/predicates/index.cjs +1 -1
  109. package/dist/predicates/index.d.ts +425 -106
  110. package/dist/predicates/index.js +1 -1
  111. package/dist/prettify-3o8_Kw6b.d.ts +564 -0
  112. package/dist/promises/index.cjs +1 -0
  113. package/dist/promises/index.d.ts +107 -0
  114. package/dist/promises/index.js +1 -0
  115. package/dist/promises-LU7K00H0.d.ts +72 -0
  116. package/dist/rzl-utils.global.js +1 -4
  117. package/dist/{string-XA-til3C.d.ts → string-B1jlOnws.d.ts} +82 -121
  118. package/dist/strings/index.cjs +1 -1
  119. package/dist/strings/index.d.ts +209 -210
  120. package/dist/strings/index.js +1 -1
  121. package/dist/tailwind/index.cjs +1 -0
  122. package/dist/tailwind/index.d.ts +571 -0
  123. package/dist/tailwind/index.js +1 -0
  124. package/dist/types/index.d.ts +899 -1181
  125. package/dist/urls/index.cjs +1 -1
  126. package/dist/urls/index.d.ts +113 -108
  127. package/dist/urls/index.js +1 -1
  128. package/package.json +45 -47
  129. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +0 -26
  130. package/dist/chunk-26W3VZIK.cjs +0 -1
  131. package/dist/chunk-2KRCHXFG.cjs +0 -2
  132. package/dist/chunk-33ZLH266.js +0 -1
  133. package/dist/chunk-4L4EJTNZ.js +0 -1
  134. package/dist/chunk-56QBKKRE.js +0 -1
  135. package/dist/chunk-5Q37AP7P.js +0 -1
  136. package/dist/chunk-5SZUSNGZ.js +0 -1
  137. package/dist/chunk-7CHFAMS2.js +0 -1
  138. package/dist/chunk-7MMJZ6HS.js +0 -1
  139. package/dist/chunk-7TC6DE3J.cjs +0 -1
  140. package/dist/chunk-7VX33E3V.js +0 -1
  141. package/dist/chunk-7YWAQOA4.cjs +0 -1
  142. package/dist/chunk-BEZPD44N.cjs +0 -1
  143. package/dist/chunk-BI263OHW.js +0 -1
  144. package/dist/chunk-CII6WWLO.cjs +0 -1
  145. package/dist/chunk-D5TYPCWU.cjs +0 -1
  146. package/dist/chunk-EEQY5QUG.js +0 -1
  147. package/dist/chunk-ELDDNERR.js +0 -1
  148. package/dist/chunk-ESJYBIYH.js +0 -1
  149. package/dist/chunk-EWYPSKKM.js +0 -1
  150. package/dist/chunk-EXCOQLWX.cjs +0 -1
  151. package/dist/chunk-FIEZKTAZ.cjs +0 -1
  152. package/dist/chunk-FWQVTMYA.cjs +0 -1
  153. package/dist/chunk-G4EWCRKS.js +0 -1
  154. package/dist/chunk-G5LXIEFO.js +0 -0
  155. package/dist/chunk-G7R5XZRM.cjs +0 -1
  156. package/dist/chunk-GGEV7LXX.cjs +0 -1
  157. package/dist/chunk-HJOZOENU.cjs +0 -1
  158. package/dist/chunk-IRDZVLNZ.cjs +0 -1
  159. package/dist/chunk-IW73G523.cjs +0 -1
  160. package/dist/chunk-IY5OZAB3.cjs +0 -1
  161. package/dist/chunk-J4NCYYGS.js +0 -1
  162. package/dist/chunk-J7JAZAJD.js +0 -1
  163. package/dist/chunk-JYNSO7ZY.js +0 -1
  164. package/dist/chunk-K3UVKYEU.js +0 -1
  165. package/dist/chunk-LQ76EDZG.js +0 -1
  166. package/dist/chunk-MMSYCIJ2.cjs +0 -1
  167. package/dist/chunk-MROH35V3.cjs +0 -1
  168. package/dist/chunk-NJSAV73S.js +0 -1
  169. package/dist/chunk-NNM7QCNB.js +0 -1
  170. package/dist/chunk-NR44SNYE.js +0 -1
  171. package/dist/chunk-NXMTWY77.js +0 -1
  172. package/dist/chunk-OZCQZO2V.cjs +0 -4
  173. package/dist/chunk-PUQXRLZH.cjs +0 -1
  174. package/dist/chunk-Q3NTKN5I.cjs +0 -1
  175. package/dist/chunk-QDNSC57Z.js +0 -4
  176. package/dist/chunk-QGXTL5ZH.js +0 -2
  177. package/dist/chunk-QSQDP7L2.cjs +0 -1
  178. package/dist/chunk-RV2VULM7.cjs +0 -1
  179. package/dist/chunk-S5M33A4O.js +0 -1
  180. package/dist/chunk-SGTHOQQ2.js +0 -1
  181. package/dist/chunk-SL3RQOWA.js +0 -1
  182. package/dist/chunk-SW6HYEW7.cjs +0 -1
  183. package/dist/chunk-SYJC7UAW.js +0 -1
  184. package/dist/chunk-SZPWZZYG.cjs +0 -1
  185. package/dist/chunk-UA4B7JBO.cjs +0 -1
  186. package/dist/chunk-UQDJF5RR.cjs +0 -1
  187. package/dist/chunk-UTQUYABU.cjs +0 -1
  188. package/dist/chunk-VPW3DRV5.js +0 -1
  189. package/dist/chunk-W32WALNU.js +0 -1
  190. package/dist/chunk-XGZ6K753.cjs +0 -1
  191. package/dist/chunk-YFTR64N5.cjs +0 -1
  192. package/dist/chunk-ZFDS7W6B.cjs +0 -1
  193. package/dist/chunk-ZQOLZE6Z.cjs +0 -1
  194. package/dist/env/index.cjs +0 -1
  195. package/dist/env/index.d.ts +0 -16
  196. package/dist/env/index.js +0 -1
  197. package/dist/formatting/index.cjs +0 -1
  198. package/dist/formatting/index.d.ts +0 -950
  199. package/dist/formatting/index.js +0 -1
  200. package/dist/generator/index.cjs +0 -1
  201. package/dist/generator/index.js +0 -1
  202. package/dist/omit-VvmIsZmX.d.ts +0 -28
  203. package/dist/prettify-C4xLcYOP.d.ts +0 -353
  204. package/dist/promise/index.cjs +0 -1
  205. package/dist/promise/index.d.ts +0 -31
  206. package/dist/promise/index.js +0 -1
  207. package/dist/stylings/index.cjs +0 -1
  208. package/dist/stylings/index.d.ts +0 -41
  209. package/dist/stylings/index.js +0 -1
  210. package/dist/type-data-DDs-u2kq.d.ts +0 -261
@@ -1,51 +1,64 @@
1
- import{G as GetPreciseTypeOptions,I as IsNumberOptions,a as IsPlainObjectResult}from'../isPlainObject-BVhBAPHX.js';import'../type-data-DDs-u2kq.js';
1
+ import{P as Prettify}from'../prettify-3o8_Kw6b.js';import{P as PickStrict}from'../pick-BSMX6Xe2.js';import{G as GetPreciseTypeOptions,I as IsNumberOptions,a as IsPlainObjectResult}from'../isPlainObject-DGJkcFYw.js';import'../if-ChM35c_q.js';import'../never-D89PbPh5.js';
2
2
  /** -------------------------------------------------------
3
3
  * * ***Shape of the object passed to custom error message functions.***
4
4
  * -------------------------------------------------------
5
- * This type describes the parameters received when `options.message`
6
- * is defined as a function in `OptionsAssertIs`.
7
- *
8
- * - `currentType` ➔ the actual detected runtime type of the value.
9
- * - `validType` ➔ the required/expected type name that the value must match.
10
- *
5
+ * **This type describes the parameters received when `options.message`
6
+ * is defined as a function in {@link OptionsAssertIs | `OptionsAssertIs`}.**
7
+ * - **Parameter:**
8
+ * - `currentType` ➔ the actual detected runtime type of the value.
9
+ * - `validType` ➔ the required/expected type name that the value must match.
11
10
  * @example
12
11
  * ```ts
13
12
  * const options: OptionsAssertIs = {
14
- * message: ({ currentType, validType }) =>
15
- * `Expected ${validType} but got ${currentType}`
13
+ * message: ({ currentType, validType }) => {
14
+ * return `Expected ${validType} but got ${currentType}`;
15
+ * };
16
16
  * };
17
17
  * ```
18
18
  */
19
19
  type OptionsMessageFunctionAssertIs={
20
- /** The actual runtime type of the value being checked.
21
- *
22
- * - Example: `"number"`, `"big-int"`, `"plain-object"`, (depends `formatCase` options).
20
+ /** ---------------------------------------------------------------------------
21
+ * * ***The actual runtime type of the value being checked.***
22
+ * ---------------------------------------------------------------------------
23
+ * - ***Example:***
24
+ * - `"number"`, `"big-int"`, `"plain-object"`, (depends `formatCase` options).
23
25
  */
24
26
  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`).
27
+ /** ---------------------------------------------------------------------------
28
+ * * ***The required/expected type that the value must conform to.***
29
+ * ---------------------------------------------------------------------------
30
+ * - ***Example:***
31
+ * - `"boolean"`, `"string"`, `"big-int"`, `"plain-object"`, (will force format to `kebab-case`).
32
+ */
33
+ validType:string;};
34
+ /** -------------------------------------------------------
35
+ * * ***Custom error-message type for assertions option {@link OptionsAssertIs | `OptionsAssertIs`}.***
36
+ * -------------------------------------------------------
37
+ * - ***Accepts:***
38
+ * - A static string message.
39
+ * - A function receiving `{ currentType, validType }` and returning a string.
40
+ */
41
+ type OptionsMessageAssertIs=string|(({currentType,validType}:OptionsMessageFunctionAssertIs)=>string);
42
+ /** ---------------------------------------------------------------------------
43
+ * * ***Base options for `assertIs*` functions.***
44
+ * ---------------------------------------------------------------------------
28
45
  */
29
- validType:string;};type OptionsAssertIs={
46
+ type OptionsAssertIs=Prettify<{
30
47
  /** -------------------------------------------------------
31
48
  * * ***Custom error message for assertion failures.***
32
49
  * -------------------------------------------------------
33
- *
34
- * @description
35
- * This option allows overriding the **default error message** when a value
36
- * does not match the required type.
37
- *
50
+ * **This option allows overriding the **default error message** when a value
51
+ * does not match the required type.**
38
52
  * - If a **string** is provided:
39
- * - Must be non-empty after trimming.
40
- * - Will be used directly as the error message.
41
- *
53
+ * - Must be non-empty after trimming.
54
+ * - Will be used directly as the error message.
42
55
  * - If a **function** is provided:
43
56
  * - Receives an object containing:
44
57
  * - `currentType` ➔ the detected runtime type of the value (depends `formatCase` options, e.g., `"number"`).
45
58
  * - `validType` ➔ the expected type name (with format `kebab-case`, e.g., `"boolean"`, `"big-int"`, `"plain-object"`).
46
- * - Must return a string. If the returned string is empty or whitespace,
47
- * the default message will be used instead.
48
- *
59
+ * - **Must** return a **string**:
60
+ * - **If** the **returned string is** `empty` or `whitespace`,
61
+ * the **default message** will be used instead.
49
62
  * @example
50
63
  * ```ts
51
64
  * // Static message
@@ -53,25 +66,27 @@ validType:string;};type OptionsAssertIs={
53
66
  *
54
67
  * // Dynamic message
55
68
  * {
56
- * message: ({ currentType, validType }) =>
57
- * `Expected ${validType} but got ${currentType}`
69
+ * message: ({ currentType, validType }) => {
70
+ * return `Expected ${validType} but got ${currentType}`;
71
+ * };
58
72
  * }
59
73
  * ```
60
74
  */
61
- message?:string|(({currentType,validType}:OptionsMessageFunctionAssertIs)=>string);}& GetPreciseTypeOptions;
75
+ message?:OptionsMessageAssertIs;}& PickStrict<GetPreciseTypeOptions,"formatCase">,{recursive:true;}>;
62
76
  /** -------------------------------------------------------
63
77
  * * ***Type guard assertion: `assertIsBoolean`.***
64
78
  * -------------------------------------------------------
65
79
  * **This function is an **assertion function**.**
66
- * - Validates that the given `value` is a **boolean**.
67
- * - After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
68
80
  * - **Behavior:**
69
- * - If `value` is a `boolean` ➔ execution continues normally.
70
- * - If `value` is not a `boolean` throws a `TypeError` with either:
71
- * - A custom error message (`options.message`), or
72
- * - A default message including the actual type.
73
- * @param {*} value - The value to validate.
74
- * @param {OptionsAssertIs} [options] - Optional configuration:
81
+ * - Validates that the given `value` is a **boolean**.
82
+ * - After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
83
+ * - If `value` is a `boolean` ➔ execution continues normally.
84
+ * - If `value` is not a `boolean` ➔ throws a `TypeError` with either:
85
+ * - A custom error message (`options.message`), or
86
+ * - A default message including the actual type.
87
+ * @param {*} value - ***The value to validate.***
88
+ * @param {OptionsAssertIs} [options]
89
+ * ***Optional configuration:***
75
90
  * - `message`: A custom error message (`string` or `function`).
76
91
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
77
92
  * @returns {boolean} Narrows `value` to `boolean` if no error is thrown.
@@ -92,8 +107,9 @@ message?:string|(({currentType,validType}:OptionsMessageFunctionAssertIs)=>strin
92
107
  *
93
108
  * // ❌ Throws with custom function message + case formatting
94
109
  * assertIsBoolean(123n, {
95
- * message: ({ currentType, validType }) =>
96
- * `Expected ${validType} but got (${currentType}).`,
110
+ * message: ({ currentType, validType }) => {
111
+ * return `Expected ${validType} but got (${currentType}).`;
112
+ * },
97
113
  * formatCase: "toKebabCase"
98
114
  * });
99
115
  * // ➔ TypeError: "Expected boolean but got (big-int)."
@@ -117,9 +133,9 @@ declare const assertIsBoolean:(value:unknown,options?:OptionsAssertIs)=>asserts
117
133
  * * ***Type guard assertion: `assertIsBigInt`.***
118
134
  * -------------------------------------------------------
119
135
  * **This function is an **assertion function**.**
120
- * - Validates that the given `value` is a **bigint**.
121
- * - After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
122
136
  * - **Behavior:**
137
+ * - Validates that the given `value` is a **bigint**.
138
+ * - After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
123
139
  * - ✅ If `value` is a `bigint` ➔ execution continues normally.
124
140
  * - ❌ If `value` is not a `bigint` ➔ throws a `TypeError` with either:
125
141
  * - A custom error message (`options.message`), or
@@ -127,8 +143,9 @@ declare const assertIsBoolean:(value:unknown,options?:OptionsAssertIs)=>asserts
127
143
  * - **ℹ️ Note:**
128
144
  * - A `bigint` refers strictly to the JavaScript `bigint` primitive type (e.g., `123n`, `0n`, `-999999999999999999999n`).
129
145
  * - This excludes `BigInt` objects created with `Object(BigInt(123))`.
130
- * @param {*} value - The value to validate.
131
- * @param {OptionsAssertIs} [options] - Optional configuration:
146
+ * @param {*} value - ***The value to validate.***
147
+ * @param {OptionsAssertIs} [options]
148
+ * ***Optional configuration:***
132
149
  * - `message`: A custom error message (`string` or `function`).
133
150
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
134
151
  * @returns {boolean} Narrows `value` to `bigint` if no error is thrown.
@@ -149,8 +166,9 @@ declare const assertIsBoolean:(value:unknown,options?:OptionsAssertIs)=>asserts
149
166
  *
150
167
  * // ❌ Throws with custom function message + case formatting
151
168
  * assertIsBigInt(42, {
152
- * message: ({ currentType, validType }) =>
153
- * `Expected ${validType} but got (${currentType}).`,
169
+ * message: ({ currentType, validType }) => {
170
+ * return `Expected ${validType} but got (${currentType}).`;
171
+ * },
154
172
  * formatCase: "toKebabCase"
155
173
  * });
156
174
  * // ➔ TypeError: "Expected bigint but got (number)."
@@ -174,9 +192,9 @@ declare const assertIsBigInt:(value:unknown,options?:OptionsAssertIs)=>asserts v
174
192
  * * ***Type guard assertion: `assertIsNumber`.***
175
193
  * -------------------------------------------------------
176
194
  * **This function is an **assertion function**.**
177
- * - Validates that the given `value` is a **number**.
178
- * - After it returns successfully, TypeScript narrows the type of `value` to `number`.
179
195
  * - **Behavior:**
196
+ * - Validates that the given `value` is a **number**.
197
+ * - After it returns successfully, TypeScript narrows the type of `value` to `number`.
180
198
  * - ✅ If `value` is a `number` ➔ execution continues normally.
181
199
  * - ❌ If `value` is not a `number` ➔ throws a `TypeError` with either:
182
200
  * - A custom error message (`options.message`), or
@@ -185,8 +203,9 @@ declare const assertIsBigInt:(value:unknown,options?:OptionsAssertIs)=>asserts v
185
203
  * - A `number` refers strictly to the JavaScript `number` primitive type (e.g., `42`, `3.14`, `-1`, `0`).
186
204
  * - This excludes `Number` objects created with `new Number(123)`.
187
205
  * - By default, `NaN` is **not considered** valid, you can allow it with `{ includeNaN: true }`.
188
- * @param {*} value - The value to validate.
189
- * @param {OptionsAssertIsNumber} [options] - Optional configuration:
206
+ * @param {*} value - ***The value to validate.***
207
+ * @param {OptionsAssertIsNumber} [options]
208
+ * ***Optional configuration:***
190
209
  * - `message`: A custom error message (`string` or `function`).
191
210
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
192
211
  * - `includeNaN`: Whether to treat `NaN` as valid.
@@ -208,8 +227,9 @@ declare const assertIsBigInt:(value:unknown,options?:OptionsAssertIs)=>asserts v
208
227
  *
209
228
  * // ❌ Throws with custom function message + case formatting
210
229
  * assertIsNumber("hello", {
211
- * message: ({ currentType, validType }) =>
212
- * `Expected ${validType} but got (${currentType}).`,
230
+ * message: ({ currentType, validType }) => {
231
+ * return `Expected ${validType} but got (${currentType}).`;
232
+ * },
213
233
  * formatCase: "toKebabCase"
214
234
  * });
215
235
  * // ➔ TypeError: "Expected number but got (string)."
@@ -242,16 +262,17 @@ declare const assertIsNumber:(value:unknown,options?:OptionsAssertIsNumber)=>ass
242
262
  * * ***Type guard assertion: `assertIsArray`.***
243
263
  * -------------------------------------------------------
244
264
  * **This function is an **assertion function**.**
245
- * - Validates that the given `value` is a **array**.
246
- * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.
247
265
  * - **Behavior:**
266
+ * - Validates that the given `value` is a **array**.
267
+ * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.
248
268
  * - ✅ If `value` is an `array` ➔ execution continues normally.
249
269
  * - ❌ If `value` is not an `array` ➔ throws a `TypeError` with either:
250
270
  * - A custom error message (`options.message`), or
251
271
  * - A default message including the actual type.
252
272
  * @template T - The input type being asserted.
253
- * @param {*} value - The value to validate.
254
- * @param {OptionsAssertIs} [options] - Optional configuration:
273
+ * @param {*} value - ***The value to validate.***
274
+ * @param {OptionsAssertIs} [options]
275
+ * ***Optional configuration:***
255
276
  * - `message`: A custom error message (`string` or `function`).
256
277
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
257
278
  * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.
@@ -272,13 +293,13 @@ declare const assertIsNumber:(value:unknown,options?:OptionsAssertIsNumber)=>ass
272
293
  *
273
294
  * // ❌ Throws with custom function message + case formatting
274
295
  * assertIsArray(42n, {
275
- * message: ({ currentType, validType }) =>
276
- * `Expected ${validType} but got (${currentType}).`,
296
+ * message: ({ currentType, validType }) => {
297
+ * return `Expected ${validType} but got (${currentType}).`;
298
+ * },
277
299
  * formatCase: "toKebabCase"
278
300
  * });
279
301
  * // ➔ TypeError: "Expected array but got (big-int)."
280
302
  * ```
281
- *
282
303
  * -------------------------------------------------------
283
304
  * ✅ ***Real-world usage with generic narrowing***:
284
305
  * ```ts
@@ -298,16 +319,17 @@ declare function assertIsArray<T extends unknown[]>(value:T,options?:OptionsAsse
298
319
  * * ***Type guard assertion: `assertIsPlainObject`.***
299
320
  * -------------------------------------------------------
300
321
  * **This function is an **assertion function**.**
301
- * - Validates that the given `value` is a **plain-object**.
302
- * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.
303
322
  * - **Behavior:**
323
+ * - Validates that the given `value` is a **plain-object**.
324
+ * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.
304
325
  * - ✅ If `value` is a `plain-object` ➔ execution continues normally.
305
326
  * - ❌ If `value` is not a `plain-object` ➔ throws a `TypeError` with either:
306
327
  * - A custom error message (`options.message`), or
307
328
  * - A default message including the actual type.
308
329
  * @template T - The input type being asserted.
309
- * @param {*} value - The value to validate.
310
- * @param {OptionsAssertIs} [options] - Optional configuration:
330
+ * @param {*} value - ***The value to validate.***
331
+ * @param {OptionsAssertIs} [options]
332
+ * ***Optional configuration:***
311
333
  * - `message`: A custom error message (`string` or `function`).
312
334
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
313
335
  * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.
@@ -328,8 +350,9 @@ declare function assertIsArray<T extends unknown[]>(value:T,options?:OptionsAsse
328
350
  *
329
351
  * // ❌ Throws with custom message function and formatCase
330
352
  * assertIsPlainObject(42n, {
331
- * message: ({ currentType, validType }) =>
332
- * `Expected ${validType} but got (${currentType}).`,
353
+ * message: ({ currentType, validType }) => {
354
+ * return `Expected ${validType} but got (${currentType}).`;
355
+ * },
333
356
  * formatCase: "toKebabCase"
334
357
  * });
335
358
  * // ➔ TypeError: "Expected plain-object but got (big-int)."
@@ -353,9 +376,9 @@ declare function assertIsPlainObject<T>(value:T,options?:OptionsAssertIs):assert
353
376
  * * ***Type guard assertion: `assertIsString`.***
354
377
  * -------------------------------------------------------
355
378
  * **This function is an **assertion function**.**
356
- * - Validates that the given `value` is a **primitive-string**.
357
- * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.
358
379
  * - **Behavior:**
380
+ * - Validates that the given `value` is a **primitive-string**.
381
+ * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.
359
382
  * - ✅ If `value` is a `primitive-string` ➔ execution continues normally.
360
383
  * - ❌ If `value` is not a `primitive-string` ➔ throws a `TypeError` with either:
361
384
  * - A custom error message (`options.message`), or
@@ -363,8 +386,9 @@ declare function assertIsPlainObject<T>(value:T,options?:OptionsAssertIs):assert
363
386
  * - **ℹ️ Note:**
364
387
  * - A "string" refers strictly to a JavaScript `primitive-string` type (e.g., `"hello"`, `""`, `"123"`).
365
388
  * - This function excludes `String` objects created with `new String()`.
366
- * @param {*} value - The value to validate.
367
- * @param {OptionsAssertIs} [options] - Optional configuration:
389
+ * @param {*} value - ***The value to validate.***
390
+ * @param {OptionsAssertIs} [options]
391
+ * ***Optional configuration:***
368
392
  * - `message`: A custom error message (`string` or `function`).
369
393
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
370
394
  * @returns {boolean} Narrows `value` to `string` if no error is thrown.
@@ -385,7 +409,9 @@ declare function assertIsPlainObject<T>(value:T,options?:OptionsAssertIs):assert
385
409
  *
386
410
  * // ❌ Throws with custom message function and formatCase
387
411
  * assertIsString(42n, {
388
- * message: ({ currentType, validType }) => `Expected ${currentType} but got (${currentType}).`,
412
+ * message: ({ currentType, validType }) => {
413
+ * return `Expected ${validType} but got (${currentType}).`;
414
+ * },
389
415
  * formatCase: "toKebabCase"
390
416
  * });
391
417
  * // ➔ TypeError: "Expected string but got (big-int)."
@@ -1 +1 @@
1
- export{a as assertIsBigInt,b as assertIsNumber}from'../chunk-BI263OHW.js';export{a as assertIsArray}from'../chunk-SL3RQOWA.js';export{a as assertIsString}from'../chunk-NJSAV73S.js';import'../chunk-5SZUSNGZ.js';export{G as assertIsBoolean,j as assertIsPlainObject}from'../chunk-EWYPSKKM.js';
1
+ export{assertIsBigInt,assertIsNumber}from"../chunk-3VA554KW.js";export{assertIsString}from"../chunk-SBKGWRS5.js";export{assertIsArray}from"../chunk-CKTLUNWX.js";import"../chunk-QNKGP5DY.js";export{assertIsBoolean,assertIsPlainObject}from"../chunk-CMW2TBOQ.js";
@@ -0,0 +1 @@
1
+ import{isEmptyArray as e,isEmptyObject as r}from"./chunk-6JFCSH7J.js";import{noop as t}from"./chunk-YWHHVDT4.js";import{safeStableStringify as o}from"./chunk-PET42Z7W.js";import{isNonEmptyString as n,getPreciseType as s,isNull as a,isUndefined as c,isString as i,isArray as m,isObject as l,isNumber as u,isNaN as v,isError as f,assertIsPlainObject as N,hasOwnProp as d,isBoolean as p,isFunction as g}from"./chunk-CMW2TBOQ.js";var y=(e,r)=>{if(!n(e)||!n(r))throw new TypeError(`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${s(e)}\` - (current value: \`${o(e)}\`), 'format': \`${s(r)}\` - (current value: \`${o(r)}\`)]".`);const t=e.split(/[-/]/).map(Number);if(3!==t.length||t.some(isNaN))return null;let a,c,i;if("DD/MM/YYYY"===r)[a,c,i]=t;else{if("MM/DD/YYYY"!==r)return null;[c,a,i]=t}c-=1;const m=new Date(i,c,a);return m.getFullYear()!==i||m.getMonth()!==c||m.getDate()!==a?null:m},b=(e={})=>{N(e,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const r=!!d(e,"convertBooleans")&&e.convertBooleans,o=!!d(e,"convertDates")&&e.convertDates,n=!!d(e,"convertNumbers")&&e.convertNumbers,a=!!d(e,"loggingOnFail")&&e.loggingOnFail,c=!!d(e,"removeEmptyArrays")&&e.removeEmptyArrays,i=!!d(e,"removeEmptyObjects")&&e.removeEmptyObjects,l=!!d(e,"removeNulls")&&e.removeNulls,u=!!d(e,"removeUndefined")&&e.removeUndefined,v=!!d(e,"strictMode")&&e.strictMode,f=!!d(e,"checkSymbols")&&e.checkSymbols,y=!!d(e,"convertNaN")&&e.convertNaN,b=d(e,"customDateFormats")?e.customDateFormats:[],E=d(e,"onError")?e.onError:t;if(!(p(r)&&p(o)&&p(n)&&p(y)&&p(f)&&p(a)&&p(c)&&p(i)&&p(l)&&p(u)&&p(v)&&m(b)&&g(E)))throw new TypeError(`Invalid \`options\` parameter (second argument): \`convertBooleans\`, \`convertDates\`, \`convertNumbers\`, \`loggingOnFail\`, \`removeEmptyArrays\`, \`removeEmptyObjects\`, \`removeNulls\`, \`removeUndefined\`, \`strictMode\` expected to be a \`boolean\` type, \`customDateFormats\` expected to be a \`array\` type and \`onError\` expected to be a \`void function\` type. But received: ['convertBooleans': \`${s(r)}\`, 'convertDates': \`${s(o)}\`, 'convertNumbers': \`${s(n)}\`, 'loggingOnFail': \`${s(a)}\`, 'removeEmptyArrays': \`${s(c)}\`, 'removeEmptyObjects': \`${s(i)}\`, 'removeNulls': \`${s(l)}\`, 'removeUndefined': \`${s(u)}\`, 'strictMode': \`${s(v)}\`, 'customDateFormats': \`${s(b)}\`, 'onError': \`${s(E)}\`].`);return{convertBooleans:r,convertDates:o,convertNumbers:n,convertNaN:y,loggingOnFail:a,removeEmptyArrays:c,removeEmptyObjects:i,removeNulls:l,removeUndefined:u,strictMode:v,customDateFormats:b,onError:E,checkSymbols:f}},E=(t,o={})=>{const n=b(o);if(a(t))return n.removeNulls?void 0:null;if(!c(t)){if(i(t)){const e=t.trim();if(n.convertNaN&&"NaN"===e)return NaN;if(n.convertNumbers&&!isNaN(Number(e)))return Number(e);if(n.convertBooleans){if("true"===e)return!0;if("false"===e)return!1}if(n.convertDates){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e))return new Date(e);if(n.customDateFormats?.length)for(const r of n.customDateFormats){const t=y(e,r);if(t)return t}}return n.strictMode?void 0:e}if(m(t)){const r=t.map(e=>E(e,n)).filter(e=>!c(e));return n.removeEmptyArrays&&e(r)?void 0:r}if(l(t)){const e={};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=E(t[r],n);c(o)||(e[r]=o)}return n.removeEmptyObjects&&r(e,{checkSymbols:n.checkSymbols})?void 0:e}return n.strictMode?void 0:t}n.removeUndefined},D=e=>{if(!i(e)&&!u(e))return 0;const r=String(e).trim().replace(/[^0-9]/g,"");return Number(r)||0};function h(e,r={}){if(a(e))return null;const t=b(r);if(t.convertNaN&&(v(e)||n(e)&&"NaN"===e))return NaN;if(t.convertNumbers&&!v(Number(e))&&u(D(e)))return Number(e);if(i(e))try{let r=function(e){const r=new Set(["\\",'"',"/","b","f","n","r","t","u"]);let t="",o=!1,n=!1,s=!1;for(let a=0;a<e.length;a++){const c=e[a];if(s)o?"'"===c?t+="'":r.has(c)?t+="\\"===c?"\\\\":'"'===c?'\\"':"\\"+c:t+="\\\\"+c:n?'"'===c?t+='\\"':r.has(c)?t+="\\"+c:t+="\\\\"+c:t+="\\"+c,s=!1;else if("\\"!==c){if(o||n){if(o){if("'"===c){t+='"',o=!1;continue}}else if(n&&'"'===c){t+='"',n=!1;continue}}else{if("'"===c){t+='"',o=!0;continue}if('"'===c){t+='"',n=!0;continue}}t+=c}else s=!0}return t}(e);r=t.removeUndefined?r.replace(/,\s*"[^"]*"\s*:\s*undefined(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*undefined\s*(,)?/g,""):r.replace(/:\s*undefined(?=\s*[,}])/g,":null"),r=t.convertNaN?r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"'):r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"').replace(/,\s*"[^"]*"\s*:\s*NaN(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*NaN\s*(,)?/g,""),r=r.replace(/,(\s*[}\]])/g,"$1");const o=JSON.parse(r);return E(o,t)}catch(e){return t.loggingOnFail&&console.error("Failed to parsing at `safeJsonParse`:",e),void t.onError(f(e)?new Error(e.message.replace(/^JSON\.parse:/,"Failed to parsing")):new Error(String(e)))}}export{E as cleanParsedData,D as extractDigits,y as parseCustomDate,h as safeJsonParse};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-PZQ6I4JJ.cjs");exports.normalizeSpaces=(i,t={withTrim:!0,trimOnly:!1})=>{if(!r.isNonEmptyString(i))return"";r.isPlainObject(t)||(t={});const{trimOnly:e=!1,withTrim:n=!0}=t;return e?i.trim():(n&&(i=i.trim()),i.replace(/\s+/g," "))};
@@ -0,0 +1 @@
1
+ import{isNumber as r}from"./chunk-CMW2TBOQ.js";function i(i){return r(i)&&Number.isFinite(i)}export{i as isFinite};
@@ -0,0 +1 @@
1
+ import{isBigInt as r}from"./chunk-QNKGP5DY.js";import{resolveErrorMessageAssertions as e,hasOwnProp as o,isNumber as i}from"./chunk-CMW2TBOQ.js";var n=(o,i={})=>{if(r(o))return;const n=e({value:o,options:i,requiredValidType:"big int"});throw new TypeError(n)},t=(r,n={})=>{const t=o(n,"includeNaN")?n.includeNaN:void 0;if(i(r,{includeNaN:t}))return;const u=e({value:r,options:n,requiredValidType:"number"});throw new TypeError(u)};export{n as assertIsBigInt,t as assertIsNumber};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-DVMHRLKP.cjs"),t=require("./chunk-T7PU2V7X.cjs"),r=require("./chunk-PZQ6I4JJ.cjs");var n=(n,s)=>{if(!e.isInteger(n)||!e.isInteger(s))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${i(n,s)}value, but received: ['min': \`${r.getPreciseType(n)}\` - (with value: \`${t.safeStableStringify(n)})\`, 'max': \`${r.getPreciseType(s)}\` - (with value: \`${t.safeStableStringify(s)}\`)].`);if(n>s)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${a(n)}, 'max': ${a(s)}].`);return n=Math.max(1,n),s=Math.min(Number.MAX_SAFE_INTEGER,s),Math.floor(Math.random()*(s-n+1))+n},a=e=>r.isNumber(e,{includeNaN:!0})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${r.getPreciseType(e)}\``,i=(...e)=>e.some(e=>r.isNumber(e,{includeNaN:!0})&&e===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ";exports.getRandomItem=function(e){if(!r.isNonEmptyArray(e))return;return e[Math.floor(Math.random()*(e.length||0))]},exports.randomInt=n,exports.randomIntByLength=a=>{r.isPlainObject(a)||(a={});const{minLength:i=1,maxLength:s=16,avoidZero:m=!1}=a;if(r.assertIsBoolean(m,{message:({currentType:e,validType:t})=>`Parameters \`avoidZero\` must be of type \`${t}\`, but received: \`${e}\`.`}),!e.isInteger(i)||!e.isInteger(s))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${r.getPreciseType(i)}\` - (with value: ${t.safeStableStringify(i)}), 'maxLength': \`${r.getPreciseType(s)}\` - (with value: ${t.safeStableStringify(s)})].`);if(i<1||s>16||i>s)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 16, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${i}\`, 'maxLength': \`${s}\`].`);const o=i===s?i:n(i,s),h=10**(o-1);let u=n(h,10**o-1);return m&&0===u&&(u=h),u},exports.randomStr=a=>{r.isPlainObject(a)||(a={});const{minLength:i=40,maxLength:s=40,type:m="string",avoidWhiteSpace:o=!0}=a;if(r.assertIsBoolean(o,{message:({currentType:e,validType:t})=>`Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),!e.isInteger(i)||!e.isInteger(s))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${r.getPreciseType(i)}\` - (with value: ${t.safeStableStringify(i)}), 'maxLength': \`${r.getPreciseType(s)}\` - (with value: ${t.safeStableStringify(s)})].`);if(i<1||s>5e3||i>s)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 5000, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${i}\`, 'maxLength': \`${s}\`].`);if("string"!==m&&"number"!==m)throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${r.getPreciseType(m)}\`, with value: ${t.safeStableStringify(m)}.`);const h=n(i,s),u="number"===m?(r.isNaN(Number(a.replaceGenInt))?void 0:a.replaceGenInt)??"0123456789":(a.replaceGenStr?a.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",g=(c=u,(o?c.replace(/\s|\n|\t/g,""):c)+(a.addChar||""));var c;if(!g.length){throw new Error(`Character set is empty. ${(()=>"number"===m?o?"If `avoidWhiteSpace` is true, and `replaceGenInt` cant be empty-string value, ensure `replaceGenInt` has valid characters and non-nan string number.":"Ensure `replaceGenInt` has valid characters and not a NaN number string while convert to number.":"Ensure `replaceGenStr` has valid characters and non empty string.")()}`)}let p="";for(let e=0;e<h;e++)p+=g.charAt(Math.floor(Math.random()*g.length));return p};
@@ -0,0 +1 @@
1
+ import{isEmptyValue as t}from"./chunk-GQR4R5WY.js";var r=(r,o={})=>!t(r,o),o=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);function e(t){return null!=t&&"object"==typeof t&&o.has(Object.prototype.toString.call(t))}export{r as isNonEmptyValue,e as isTypedArray};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-PZQ6I4JJ.cjs");exports.parseCurrencyString=l=>{if(!e.isNonEmptyString(l))return 0;let c=l.trim().replace(/\u00A0/g,"").replace(/\u202F/g,""),r=!1;/^\(.*\)$/.test(c)&&(r=!0,c=c.slice(1,-1).trim()),c=c.replace(/^[-\s]+/,e=>e.includes("-")?"-":"").replace(/[\s.,-]+$/,""),r=r||/^-/.test(c)||/^[^\d]*-/.test(c);let s=c.replace(/[^0-9.,'\s]/g,"").replace(/[\s']/g,"");const t=s.match(/,\d{2}/g);if(t&&t.length>1)s=s.replace(/,/g,"");else{const e=(s.match(/\./g)||[]).length,l=(s.match(/,/g)||[]).length;if(e>1&&0===l)s=s.replace(/\./g,"");else if(l>1&&0===e)s=s.replace(/,/g,"");else{const e=s.lastIndexOf(","),l=s.lastIndexOf(".");if(e>l)s=s.replace(/\./g,"").replace(",",".");else if(l>e)s=s.replace(/,/g,"");else if(e>l){const l=s.slice(0,e).replace(/,/g,"").replace(/\./g,""),c=s.slice(e+1);s=l+"."+c}else if(l>e){const e=s.slice(0,l).replace(/\./g,"").replace(/,/g,""),c=s.slice(l+1);s=e+"."+c}else-1!==e?s=s.replace(/,/g,""):-1!==l&&(s=s.replace(/\./g,""))}}const a=parseFloat(s)||0;return r?-a:a};
@@ -0,0 +1 @@
1
+ import{isArray as e,isObject as t,assertIsPlainObject as r,hasOwnProp as o,assertIsBoolean as c}from"./chunk-CMW2TBOQ.js";var n=t=>!e(t)||0===t.length;function s(e,n={}){if(!t(e))return!0;r(n,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const s=!!o(n,"checkSymbols")&&n.checkSymbols;c(s,{message:({currentType:e,validType:t})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`});const p=0===Object.keys(e).length;return s?p&&0===Object.getOwnPropertySymbols(e).length:p}export{n as isEmptyArray,s as isEmptyObject};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-PZQ6I4JJ.cjs");exports.assertIsArray=function(e,s){if(r.isArray(e))return;const o=r.resolveErrorMessageAssertions({value:e,options:s,requiredValidType:"array"});throw new TypeError(o)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-KHO2SBNA.cjs"),r=require("./chunk-CAH33WOQ.cjs"),t=require("./chunk-5KJFVIQT.cjs"),s=require("./chunk-E55EQK2U.cjs"),i=require("./chunk-HYRQMTRH.cjs"),n=require("./chunk-JBQMXC5I.cjs"),a=require("./chunk-ZETAZZLD.cjs"),o=require("./chunk-T7PU2V7X.cjs"),u=require("./chunk-PZQ6I4JJ.cjs");function c(e){const r=typeof e;return"string"===r||"number"===r||"symbol"===r}var p=(e,r)=>{if(!u.isObjectOrArray(e))return!1;if(!c(r))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${u.getPreciseType(r)}\`.`);return!!Object.prototype.hasOwnProperty.call(e,r)||(u.isArray(e)?e.some(e=>p(e,r)):Object.values(e).some(e=>u.isObjectOrArray(e)&&p(e,r)))},y=e=>"[object Arguments]"===Object.prototype.toString.call(e);function f(e){return"number"==typeof e&&e>-1&&Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER}var l=(e,r)=>{if("number"==typeof e&&"number"==typeof r&&Number.isNaN(e)&&Number.isNaN(r))return!0;if(e===r)return!0;if(typeof e!=typeof r)return!1;if(o.isDate(e)&&o.isDate(r))return e.getTime()===r.getTime();if(n.isRegExp(e)&&n.isRegExp(r))return e.toString()===r.toString();if(u.isSymbol(e)&&u.isSymbol(r))return e.toString()===r.toString();if(u.isSet(e)&&u.isSet(r)){if(e.size!==r.size)return!1;const t=Array.from(r),s=new Set;for(const r of e){let e=!1;for(let i=0;i<t.length;i++)if(!s.has(i)&&l(r,t[i])){s.add(i),e=!0;break}if(!e)return!1}return!0}if(o.isMap(e)&&o.isMap(r)){if(e.size!==r.size)return!1;const t=Array.from(r),s=new Set;for(const[r,i]of e){let e=!1;for(let n=0;n<t.length;n++){if(s.has(n))continue;const[a,o]=t[n];if(l(r,a)&&l(i,o)){s.add(n),e=!0;break}}if(!e)return!1}return!0}if(u.isArray(e)&&u.isArray(r))return e.length===r.length&&e.every((e,t)=>l(e,r[t]));if(u.isObjectOrArray(e)&&u.isObjectOrArray(r)&&e&&r){if(u.isArray(e)!==u.isArray(r))return!1;const t=Object.keys(e),s=Object.keys(r);return t.length===s.length&&t.every(t=>l(e[t],r[t]))}return!1};var m=e=>{if(u.isString(e))return s.isEmptyString(e);if(u.isNumber(e))return u.isNaN(e);if(u.isArray(e))return a.isEmptyArray(e)||e.every(m);if(u.isObjectOrArray(e)){const r=Object.keys(e),t=Object.getOwnPropertySymbols(e);return 0===r.length&&0===t.length||[...r,...t].every(r=>m(e[r]))}return!e};function b(e,r,t){return g(e,r,t)}function h(e,r){return e===r||0===e&&0===r||Number.isNaN(e)&&Number.isNaN(r)}function g(e,r,t){if(e===r)return!0;if(!u.isObjectOrArray(r))return h(e,r);if(!u.isObjectOrArray(e))return!1;const s=Reflect.ownKeys(r).filter(e=>!(u.isArray(r)&&"length"===e));for(const i of s){if(!(i in e))return!1;const s=e[i],n=r[i],a=t?.(s,n,i,e,r);if(u.isUndefined(a)){if(u.isObjectOrArray(s)&&u.isObjectOrArray(n)){if(!b(s,n,t))return!1}else if(!h(s,n))return!1}else if(!a)return!1}return!0}var d=Function.prototype.toString,A=/\{\s*\[native code\]\s*\}/;exports.areArraysEqual=(e,r,t=!1)=>{if(!u.isArray(e)||!u.isArray(r))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${u.getPreciseType(e)}\`, 'array2': \`${u.getPreciseType(r)}\`].`);if(u.assertIsBoolean(t,{message:({currentType:e,validType:r})=>`Third parameter \`ignoreOrder\` must be of type \`${r}\`, but received: \`${e}\`.`}),!n.isEqual(e.length,r.length))return!1;const s=e=>{if(!u.isArray(e))return e;return e.map(e=>u.isArray(e)?s(e):e).sort((e,r)=>{const t=o.safeStableStringify(e),s=o.safeStableStringify(r);return t<s?-1:t>s?1:0})},i=t?s(e):e,a=t?s(r):r;return!!n.isEqual(i.length,a.length)&&i.every((e,r)=>o.safeStableStringify(e)===o.safeStableStringify(a[r]))},exports.areObjectsEqual=(e,r)=>n.isEqual(e,r),exports.areURLsEqualPath=(r,t)=>{if(!e.isURL(r)||!e.isURL(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},exports.areURLsIdentical=(r,t)=>{if(!e.isURL(r)||!e.isURL(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},exports.arrayHasAnyMatch=(e,r)=>{if(!u.isArray(e)||!u.isArray(r)||a.isEmptyArray(e)||a.isEmptyArray(r))return!1;const t=new Set(e);return r.some(e=>t.has(e))},exports.doesKeyExist=p,exports.isArguments=y,exports.isArrayLike=function(e){return!u.isFunction(e)&&u.isObjectOrArray(e)&&f(e?.length)},exports.isArrayLikeObject=function(e){return u.isObjectOrArray(e)&&f(e.length)},exports.isCurrencyLike=e=>{if(!u.isString(e)&&!u.isNumber(e))return!1;return 0!==t.parseCurrencyString(e.toString())||"0"===e.toString().trim()},exports.isDeepEqual=l,exports.isElement=function(e){return!!e&&"object"==typeof e&&1===e?.nodeType&&!u.isPlainObject(e)},exports.isEmpty=function(e){return!!u.isNil(e)||(!!(u.isBoolean(e)||u.isNumber(e,{includeNaN:!0})||u.isSymbol(e))||(u.isFunction(e)?0===Object.keys(e).length:u.isString(e)||u.isArray(e)||y(e)||r.isTypedArray(e)?0===e.length:o.isMap(e)||u.isSet(e)?0===e.size:u.isBuffer(e)?0===e.length:!!u.isPlainObject(e)&&0===Object.keys(e).length))},exports.isEmptyDeep=m,exports.isEqualWith=function(e,r,t){return n.baseDeepEqual(e,r,t,new WeakMap)},exports.isLength=f,exports.isMatch=function(e,r){return g(e,r)},exports.isMatchWith=b,exports.isNative=function(e){if(!u.isFunction(e))return!1;try{const r=d.call(e);return A.test(r)}catch{return!1}},exports.isObjectLoose=function(e){return!u.isNil(e)&&(u.isObjectOrArray(e)||u.isFunction(e))},exports.isPropertyKey=c,exports.isSafeInteger=function(e){return"number"==typeof e&&Number.isSafeInteger(e)},exports.isValidURL=e=>{if(!u.isNonEmptyString(e))return!1;let r;try{r=decodeURIComponent(e)}catch{return!1}if(!r.startsWith("http://")&&!r.startsWith("https://"))return!1;return new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(r)},exports.isWeakMap=function(e){return u.isObject(e)&&!u.isNull(e)&&e instanceof WeakMap},exports.textContainsAll=(e,r,t={})=>{if(!u.isNonEmptyString(e)||!u.isArray(r))return!1;u.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:s=!1,flags:n="i"}=t;u.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),i.assertIsString(n,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a=r.filter(e=>u.isNonEmptyString(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return 0!==a.length&&a.every(r=>new RegExp(s?`(?<!\\S)${r}(?!\\S)`:r,n.includes("u")?n:n+"u").test(e))},exports.textContainsAny=(e,r,t={})=>{if(!u.isNonEmptyString(e)||!u.isArray(r))return!1;u.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:s=!1,flags:n="i"}=t;u.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),i.assertIsString(n,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a=r.filter(e=>u.isNonEmptyString(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));if(0===a.length)return!1;const o=s?`(?<!\\S)(${a.join("|")})(?!\\S)`:`(${a.join("|")})`;return new RegExp(o,n.includes("u")?n:n+"u").test(e)};
@@ -0,0 +1 @@
1
+ "use strict";exports.noop=()=>{};
@@ -0,0 +1 @@
1
+ "use strict";var t=require("./chunk-HQWOFR56.cjs"),r=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.isNonEmptyValue=(r,e={})=>!t.isEmptyValue(r,e),exports.isTypedArray=function(t){return null!=t&&"object"==typeof t&&r.has(Object.prototype.toString.call(t))};
@@ -0,0 +1 @@
1
+ import{isArray as r,resolveErrorMessageAssertions as o}from"./chunk-CMW2TBOQ.js";function e(e,n){if(r(e))return;const t=o({value:e,options:n,requiredValidType:"array"});throw new TypeError(t)}export{e as assertIsArray};
@@ -0,0 +1 @@
1
+ var e=e=>"boolean"==typeof e,r=e=>"function"==typeof e;function t(e){return null==e}function o(e){return Array.isArray(e)}function a(e){return"object"==typeof e&&!t(e)&&!o(e)}function n(e){if(!a(e))return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||null===r}var i=e=>"string"==typeof e;function s(e){return a(e)&&"[object Number]"===Object.prototype.toString.call(e)}function c(e){return"number"==typeof e?Number.isNaN(e):s(e)&&Number.isNaN(e.valueOf())}var u=e=>null===e,l=(r,t={})=>{if(e(r))return;const o=W({value:r,options:t,requiredValidType:"boolean"});throw new TypeError(o)},f=(r,t={})=>{_(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!(!n(t)||!e(t.includeNaN))&&t.includeNaN;l(o,{message:({currentType:e,validType:r})=>`Parameter \`includeNaN\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a="number"==typeof r;return o?a:a&&!Number.isNaN(r)},m=e=>"symbol"==typeof e,p=e=>void 0===e;function b(e){return o(e)||a(e)}function y(e,t,o={}){if(!i(e)&&!b(e)&&!r(e))return!1;_(o,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const a=void 0===o.discardUndefined||o.discardUndefined,n=void 0!==o.discardNull&&o.discardNull;l(a,{message:({currentType:e,validType:r})=>`Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),l(n,{message:({currentType:e,validType:r})=>`Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const s=[];if(i(t)&&t.trim().length>0||f(t,{includeNaN:!0})){(f(t,{includeNaN:!0})?String(t):t).split(".").forEach(e=>{const r=e.match(/^\[(\d+)\]$/),t=e.match(/^Symbol\((.+)\)$/);r?s.push(Number(r[1])):t?s.push(Symbol.for(t[1])):c(Number(e))?s.push(e):s.push(Number(e))})}else{if(!m(t))return!1;s.push(t)}let y=i(e)&&e.trim().length>0?Object(e):e;for(const e of s)if(i(e)&&e.trim().length>0||f(e,{includeNaN:!0})){if(u(y)||!Object.prototype.hasOwnProperty.call(y,e))return!1;y=y[e]}else{if(!m(e))return!1;{if(u(y)||"object"!=typeof y&&!r(y))return!1;const t=Object.getOwnPropertySymbols(y).find(r=>r===e||r.description===e.description);if(!t)return!1;y=y[t]}}return(!a||!p(y))&&(!n||!u(y))}var d=(e,r={})=>{if(!i(e))return!1;_(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!y(r,"trim")||r.trim;l(t,{message:({currentType:e,validType:r})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});return(t?e.trim():e).length>0},g=e=>"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error,j=e=>"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e);function h(e){return a(e)&&"[object String]"===Object.prototype.toString.call(e)}function S(e){return a(e)&&"[object Boolean]"===Object.prototype.toString.call(e)}function v(e){if("number"==typeof e||s(e)){const r=Number(e);return r===1/0||r===-1/0}return!1}var N=Object.freeze(["URI","URL","HTTP","HTTPS","HTML","XML","CSS","JS","JSON","SVG","DOM","UTC","XHR","RTC","ICE","TLS","TCP","UDP","IDB","ID"]),C={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"};function T(e){return Array.isArray(e)&&e.length>0}function A(e){return"[object Set]"===Object.prototype.toString.call(e)||e instanceof Set}var w=e=>{let r="";return o(e)?r=e.map(e=>d(e)?e.trim():"").filter(e=>e.length).join("-"):d(e)&&(r=e.trim()),r.split(/[^\p{L}\p{N}]+/u).filter(Boolean)},O=e=>{const r=new Set([]),t=e=>e.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean).join("");if(d(e)){const o=t(e);o&&r.add(o)}return T(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),A(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),r},P=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-").replace(/^-+|-+$/g,"")},R=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(".")},E=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map((e,r)=>o.has(e)?e:0===r?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},I=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-")},L=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("_")},B=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(" ")},U=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},F=(e,r)=>{if(!T(e)&&!d(e))return"";const t=w(e),o=O(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")},$=e=>e.replace(/[\s_\-]+/g,"").toLowerCase(),D=Object.entries(C).reduce((e,[r,t])=>(e[$(r)]=t,e),{});var M=(e,r)=>"toPascalCaseSpace"===r?F(e,N):"slugify"===r?P(e,N):"toCamelCase"===r?E(e,N):"toDotCase"===r?R(e,N):"toKebabCase"===r?I(e,N):"toPascalCase"===r?U(e,N):"toSnakeCase"===r?L(e,N):B(e,N),x=(e,t={formatCase:"toLowerCase"})=>{n(t)||(t={});const o=t.formatCase;if(u(e))return M(D[$("null")]??"Null",o);if(c(e))return"NaN";if(v(e))return String(e);if(s(e))return M("Number Constructor",o);if(h(e))return M("String Constructor",o);if(S(e))return M("Boolean Constructor",o);const i=typeof e;if(!b(e)&&!r(e))return M(D[$(i)]??i,o);if(j(e))return M(D[$("buffer")]??"Buffer",o);if(function(e){if("object"!=typeof e||null===e)return!1;const 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!1;try{return Reflect.defineProperty(e,"__proxy_detect__",{configurable:!0,value:1}),Reflect.deleteProperty(e,"__proxy_detect__"),!1}catch{return!0}}(e))return M(D[$("proxy")]??"Proxy",o);if(a(e)&&r(e?.next)&&r(e?.throw))return M(D[$("generator")]??"Generator",o);if(g(e)){const r=e.constructor?.name??"Error";return M(D[$(r)]??D[$(r.replace(/\s+/g,""))]??r,o)}if(u(Object.getPrototypeOf(e)))return M(D[$("object")]??"Object",o);const l=Object.prototype.toString.call(e).slice(8,-1)||"Object",f=D[$(l)];if(f)return M(f,o);const m=e?.constructor?.name;return M(m&&"Object"!==m?D[$(m)]??m:l,o)};function W(e){const{requiredValidType:t,value:o,options:a}=e||{},{message:i,formatCase:s}=n(a)?a:{},c=I(t),u=x(o,{formatCase:s}),l={currentType:u,validType:c},f=`Parameter input (\`value\`) must be of type \`${c}\`, but received: \`${u}\`.`;return r(i)?d(i(l))?i(l).trim():f:d(i)?i.trim():f}function _(e,r={}){if(n(e))return;const t=W({value:e,options:r,requiredValidType:"plain object"});throw new TypeError(t)}Object.values({...C,plainobject:"Plain Object"});export{C as FIXES_RAW,N as __internalAcronyms__,l as assertIsBoolean,_ as assertIsPlainObject,x as getPreciseType,y as hasOwnProp,o as isArray,e as isBoolean,S as isBooleanObject,j as isBuffer,g as isError,r as isFunction,v as isInfinityNumber,c as isNaN,t as isNil,T as isNonEmptyArray,d as isNonEmptyString,u as isNull,f as isNumber,s as isNumberObject,a as isObject,b as isObjectOrArray,n as isPlainObject,A as isSet,i as isString,h as isStringObject,m as isSymbol,p as isUndefined,W as resolveErrorMessageAssertions,P as slugify,E as toCamelCase,R as toDotCase,I as toKebabCase,B as toLowerCase,U as toPascalCase,F as toPascalCaseSpace,L as toSnakeCase};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-E55EQK2U.cjs"),r=require("./chunk-PZQ6I4JJ.cjs");exports.capitalizeFirst=(e,t={lowerCaseNextRest:!0,trim:!1})=>{if(!r.isNonEmptyString(e))return"";r.isPlainObject(t)||(t={});const i=!1!==t.lowerCaseNextRest;return!0===t.trim&&(e=e.trim()),e[0].toUpperCase()+(i?e.slice(1).toLowerCase():e.slice(1))},exports.capitalizeWords=(e,t={collapseSpaces:!1,trim:!1})=>{if(!r.isNonEmptyString(e))return"";let i=e;r.isPlainObject(t)||(t={});const s=!0===t.collapseSpaces;if(!0===t.trim&&(i=i.trim()),s){const e=i.match(/^\s*/)?.[0]??"",r=i.match(/\s*$/)?.[0]??"";i=i.trim().replace(/\s+/g," "),i=`${e}${i}${r}`}return i.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},exports.getInitialsName=e=>{if(!r.isNonEmptyString(e))return"";const t=(e=e.replace(/\s+/g," ").trim()).split(" ");return t.length>1?t[0][0]+t[1][0].toUpperCase():e.length>1?e.substring(0,2).toUpperCase():e[0].toUpperCase()},exports.replaceAt=(e,t,i)=>{if(!r.isNumber(e)||!r.isString(i)||!r.isString(t))throw new TypeError(`First parameter (\`index\`) must be of type \`number\`, second parameter (\`originalString\`) and third parameter (\`replaceTo\`) must be of type \`string\`, but received: "['index': \`${r.getPreciseType(e)}\`, 'originalString': \`${r.getPreciseType(t)}\`, 'replaceTo': \`${r.getPreciseType(i)}\`]".`);if(e<0||e>=t.length)throw new RangeError("First parameter (`index`) is out of range from second parameter (`originalString`).");return t.slice(0,e)+i+t.slice(e+1)},exports.stripHtmlTags=function(t){if(!r.isString(t))return;return e.isEmptyString(t)?"":t.replace(/<\/?[a-zA-Z][^<>]*\/?>/g," ").trim().replace(/\s+/g," ").trim()};
@@ -0,0 +1 @@
1
+ import{isInteger as e}from"./chunk-WVSPXFTY.js";import{safeStableStringify as r}from"./chunk-PET42Z7W.js";import{isNonEmptyArray as t,getPreciseType as n,isNumber as a,isPlainObject as m,assertIsBoolean as i,isNaN as h}from"./chunk-CMW2TBOQ.js";function o(e){if(!t(e))return;return e[Math.floor(Math.random()*(e.length||0))]}var u=(t,a)=>{if(!e(t)||!e(a))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${c(t,a)}value, but received: ['min': \`${n(t)}\` - (with value: \`${r(t)})\`, 'max': \`${n(a)}\` - (with value: \`${r(a)}\`)].`);if(t>a)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${s(t)}, 'max': ${s(a)}].`);return t=Math.max(1,t),a=Math.min(Number.MAX_SAFE_INTEGER,a),Math.floor(Math.random()*(a-t+1))+t},s=e=>a(e,{includeNaN:!0})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${n(e)}\``,c=(...e)=>e.some(e=>a(e,{includeNaN:!0})&&e===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ",g=t=>{m(t)||(t={});const{minLength:a=1,maxLength:h=16,avoidZero:o=!1}=t;if(i(o,{message:({currentType:e,validType:r})=>`Parameters \`avoidZero\` must be of type \`${r}\`, but received: \`${e}\`.`}),!e(a)||!e(h))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${n(a)}\` - (with value: ${r(a)}), 'maxLength': \`${n(h)}\` - (with value: ${r(h)})].`);if(a<1||h>16||a>h)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 16, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${a}\`, 'maxLength': \`${h}\`].`);const s=a===h?a:u(a,h),c=10**(s-1);let g=u(c,10**s-1);return o&&0===g&&(g=c),g},p=t=>{m(t)||(t={});const{minLength:a=40,maxLength:o=40,type:s="string",avoidWhiteSpace:c=!0}=t;if(i(c,{message:({currentType:e,validType:r})=>`Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),!e(a)||!e(o))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${n(a)}\` - (with value: ${r(a)}), 'maxLength': \`${n(o)}\` - (with value: ${r(o)})].`);if(a<1||o>5e3||a>o)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 5000, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${a}\`, 'maxLength': \`${o}\`].`);if("string"!==s&&"number"!==s)throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${n(s)}\`, with value: ${r(s)}.`);const g=u(a,o),p="number"===s?(h(Number(t.replaceGenInt))?void 0:t.replaceGenInt)??"0123456789":(t.replaceGenStr?t.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",d=(l=p,(c?l.replace(/\s|\n|\t/g,""):l)+(t.addChar||""));var l;if(!d.length){throw new Error(`Character set is empty. ${(()=>"number"===s?c?"If `avoidWhiteSpace` is true, and `replaceGenInt` cant be empty-string value, ensure `replaceGenInt` has valid characters and non-nan string number.":"Ensure `replaceGenInt` has valid characters and not a NaN number string while convert to number.":"Ensure `replaceGenStr` has valid characters and non empty string.")()}`)}let b="";for(let e=0;e<g;e++)b+=d.charAt(Math.floor(Math.random()*d.length));return b};export{o as getRandomItem,u as randomInt,g as randomIntByLength,p as randomStr};
@@ -0,0 +1 @@
1
+ "use strict";exports.isInteger=function(e){return"number"==typeof e&&Number.isInteger(e)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-KHO2SBNA.cjs"),r=require("./chunk-E74U6CYP.cjs"),t=require("./chunk-NRF6LWBC.cjs"),n=require("./chunk-HQWOFR56.cjs"),i=require("./chunk-DVMHRLKP.cjs"),a=require("./chunk-H66AC7GK.cjs"),s=require("./chunk-E55EQK2U.cjs"),o=require("./chunk-6JFZL7YE.cjs"),u=require("./chunk-T7PU2V7X.cjs"),c=require("./chunk-PZQ6I4JJ.cjs");exports.constructURL=(i,a,m)=>{if(c.isString(i)){if(s.isEmptyString(i))throw new TypeError("First parameter (`baseUrl`) cannot be an empty-string.");i=r.normalizeString(i)}else if(!e.isURL(i))throw new TypeError(`First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${c.getPreciseType(i)}\`, with current value: \`${u.safeStableStringify(i)}\`.`);if(!c.isUndefined(m)&&(o.assertIsArray(m,{message:({currentType:e,validType:r})=>`Third parameter (\`removeParams\`) must be of type \`${r} of strings\`, but received: \`${e}\`.`}),!m.every(e=>c.isNonEmptyString(e))))throw new TypeError("Third parameter (`removeParams`) must be of type `array` and contains `string` only and non empty-string.");try{if(!c.isUndefined(a)&&!c.isFunction(a[Symbol.iterator]))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${c.getPreciseType(a)}\`, with value: \`${u.safeStableStringify(a)}\`.`);const e=new URL(i);if(!c.isUndefined(a)){const r=Object.fromEntries(a);if(!n.isEmptyValue(r)){const n=new URLSearchParams(e.search);for(const[e,t]of Object.entries(r)){if(!c.isNonEmptyString(t)&&!c.isNumber(t,{includeNaN:!0}))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${c.getPreciseType(a)}\`, with value: \`${u.safeStableStringify(a)}\`.`);n.set(e,String(t))}m?.length&&t.toStringArrayUnRecursive(m).map(e=>{n.delete(e)}),e.search=n.toString()}}return m?.forEach(r=>e.searchParams.delete(r)),e}catch(e){if(c.isError(e))throw e;throw new Error("Failed to construct a valid URL in `constructURL()`, Error:"+e)}},exports.extractURLs=e=>{if(!c.isNonEmptyString(e))return null;let r;try{r=decodeURIComponent(e)}catch{return null}const t=r.match(/https?:\/\/.*?(?=https?:\/\/|\s|$)/g);if(!t)return null;const n=t.map(e=>e.replace(/[.,;:!?)]*$/,"")).filter(e=>{try{const r=new URL(e);return"http:"===r.protocol||"https:"===r.protocol}catch{return!1}});return n.length?n:null},exports.getFirstPrefixPathname=(e,r="/")=>{if(!c.isNonEmptyString(r))throw new TypeError(`Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${c.getPreciseType(r)}\`, with value: \`${u.safeStableStringify(r)}\`.`);if(c.isArray(e)){if(!e.every(e=>c.isString(e)))throw new TypeError(`First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${c.getPreciseType(e)}\`, with value: \`${u.safeStableStringify(e)}\`.`);for(const r of e){const e=a.normalizePathname(r);if("/"!==e)return e}return a.normalizePathname(r)}if(c.isString(e)){const t=a.normalizePathname(e);return"/"!==t?t:a.normalizePathname(r)}if(!c.isNil(e))throw new TypeError(`First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${c.getPreciseType(e)}\`.`);return a.normalizePathname(r)},exports.getPrefixPathname=(e,r=null,t={})=>{const n=[];c.isString(e)||c.isArray(e)||n.push(`First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${c.getPreciseType(e)}\`.`),c.isString(r)||c.isArray(r)||c.isNull(r)||n.push(`Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${c.getPreciseType(r)}\`.`),c.isPlainObject(t)||n.push(`Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${c.getPreciseType(t)}\`.`);const{levels:s=1,removeDuplicates:o=!0}=t;if((!i.isInteger(s)||i.isInteger(s)&&s<0)&&n.push(`Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${c.getPreciseType(s)}\`, with value: \`${u.safeStableStringify(s)}\`.`),c.isBoolean(o)||n.push(`Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${c.getPreciseType(o)}\`.`),c.isNonEmptyArray(n))throw new TypeError(`Invalid parameter(s) in \`getPrefixPathname\` function:\n- ${n.join("\n- ")}`);function m(e){return`/${a.normalizePathname(e).split("/").filter(Boolean).slice(0,s).join("/")}`}function p(e){if(r){if(e=a.normalizePathname(e),c.isArray(r)){for(const t of r)if(e.startsWith(a.normalizePathname(t)))return m(e)}else if(c.isNonEmptyString(r)&&e.startsWith(a.normalizePathname(r)))return m(e);return null}return m(e)}if(c.isArray(e)){const r=e.map(p).filter(e=>!c.isNull(e)),t=o?[...new Set(r)]:r;return 1===t.length?t[0]:t}return p(e)};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-PZQ6I4JJ.cjs");exports.isEmptyString=(t,i={})=>!r.isNonEmptyString(t,i);
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-PZQ6I4JJ.cjs");exports.normalizeString=i=>r.isNonEmptyString(i)?i.trim():"";
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-VJDDGRIK.cjs"),t=require("./chunk-HYRQMTRH.cjs"),s=require("./chunk-PZQ6I4JJ.cjs");exports.disableUserInteraction=(s="on_processing")=>{if(e.isServer())return;t.assertIsString(s,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:r}=document;r&&!r.classList.contains(s)&&r.classList.add(s)},exports.enableUserInteraction=(s="on_processing")=>{if(e.isServer())return;t.assertIsString(s,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:r}=document;r&&r.classList.contains(s)&&r.classList.remove(s)},exports.removeElementFocus=()=>{if(e.isServer())return;const t=document.activeElement;t instanceof HTMLElement&&t.blur()},exports.scrollToTop=t=>{if(e.isServer())return;s.isPlainObject(t)||(t={});const r=s.hasOwnProp(t,"behavior")&&s.isNonEmptyString(t.behavior)&&["auto","instant","smooth"].includes(t.behavior)?t.behavior:"smooth";let o=s.hasOwnProp(t,"timeout")&&s.isNumber(t.timeout)&&t.timeout>=1?t.timeout:1;o=o>2147483647?2147483647:o,setTimeout(()=>window.scrollTo({top:0,left:0,behavior:r}),o)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-CAH33WOQ.cjs"),r=require("./chunk-NRF6LWBC.cjs"),t=require("./chunk-E55EQK2U.cjs"),i=require("./chunk-HYRQMTRH.cjs"),s=require("./chunk-JBQMXC5I.cjs"),n=require("./chunk-ZETAZZLD.cjs"),o=require("./chunk-6JFZL7YE.cjs"),a=require("./chunk-T7PU2V7X.cjs"),m=require("./chunk-UDA26MCU.cjs"),p=require("./chunk-PZQ6I4JJ.cjs");function y(e,r){if(!1!==r&&"stringOrNumber"!==r&&"primitives"!==r&&"all"!==r)throw new TypeError(`Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${p.getPreciseType(r)}\`, with value: \`${a.safeStableStringify(r)}\`.`);if(p.isNaN(e))return"primitives"===r||"all"===r?"NaN":NaN;if(p.isString(e)||p.isNumber(e))return"stringOrNumber"===r||"primitives"===r||"all"===r?String(e):e;if(p.isBoolean(e)||m.isBigInt(e)||p.isNil(e))return"primitives"===r||"all"===r?String(e):e;if(p.isNumberObject(e)||p.isBooleanObject(e)||p.isStringObject(e))return"all"===r?e.valueOf().toString():e;if(p.isSymbol(e))return"all"===r?e.toString():e;if(p.isFunction(e))return"all"===r?e.toString():e;if(p.isArray(e))return e.map(e=>y(e,r));if(p.isObjectOrArray(e)){if(a.isDate(e))return"all"===r?e.toISOString():e;if(s.isRegExp(e))return"all"===r?e.toString():e;if(p.isError(e)||e instanceof Promise)return"all"===r?e.toString():e;if(p.isSet(e))return"all"===r?[...e].map(e=>y(e,r)):e;if(a.isMap(e))return"all"===r?[...e.entries()].map(([e,t])=>[y(e,r),y(t,r)]):e;const t={};if(p.isObject(e))for(const i of Object.keys(e))t[i]=y(e[i],r);return t}return e}var c=e=>!p.isNil(e)&&(p.isString(e)?p.isNonEmptyString(e):p.isBoolean(e)?e:p.isNumber(e,{includeNaN:!0})?0!==e:p.isArray(e)?e.some(c):!!p.isObject(e)&&Object.values(e).some(c)),u=(e,r)=>{if(!p.isObjectOrArray(e))return e;const[t,...i]=r;if(p.isArray(e))for(const t of e)p.isObjectOrArray(t)&&u(t,r);else n.isEmptyArray(i)?p.isPlainObject(e)&&delete e[t]:p.isPlainObject(e)&&p.isObjectOrArray(e[t])&&u(e[t],i);return e},f=(e,r)=>{if(!p.isPlainObject(e))return e;const[t,...i]=r;return 0===i.length?p.isPlainObject(e)&&delete e[t]:p.isPlainObject(e[t])&&f(e[t],i),e};exports.convertType=e=>{const r={undefined:void 0,null:null,nan:NaN,true:!0,false:!1,yes:!0,no:!1};if(p.isString(e)){const t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const i=t.replace(/,/g,""),s=Number(i);return!p.isNaN(s)&&p.isNonEmptyString(i)?s:e.trim()}return e},exports.dedupeArray=(e,r={})=>{o.assertIsArray(e,{message:({currentType:e,validType:r})=>`First parameter (\`inputArray\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`}),p.assertIsPlainObject(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!!p.hasOwnProp(r,"flatten")&&r.flatten,i=!!p.hasOwnProp(r,"forceToString")&&r.forceToString;if(!1!==i&&"stringOrNumber"!==i&&"primitives"!==i&&"all"!==i)throw new TypeError(`Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${p.getPreciseType(i)}\`, with value: \`${a.safeStableStringify(i)}\`.`);p.assertIsBoolean(t,{message:({currentType:e,validType:r})=>`Parameter \`flatten\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const n=e=>{const r=[];return e.reduce((e,t)=>{const o=p.isArray(t)?n(t):y(t,i);return r.some(e=>s.isEqual(e,o))||(r.push(o),e.push(o)),e},[])},m=e=>p.isArray(e)?e.flatMap(m):p.isSet(e)?[...e].flatMap(m):a.isMap(e)?[...e.values()].flatMap(m):[e];return n(t?m(e):e)},exports.removeObjectPaths=function(e,r,t=!0){if(n.isEmptyObject(e,{checkSymbols:!0}))return{};if(o.assertIsArray(r,{message:({currentType:e,validType:t})=>`Second parameter (\`keysToDelete\`) must be of type \`${t}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${e}\`, with value: \`${a.safeStableStringify(r)}\`.`}),!r.every(e=>p.isPlainObject(e)&&"key"in e))throw new TypeError(`Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${a.safeStableStringify(r)}\`.`);let s=t?(e=>{try{if(p.isFunction(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))})(e):e;for(const{key:e,deep:t}of r){if(i.assertIsString(e,{message:({currentType:e,validType:r})=>`Parameter \`key\` at Second Parameter (\`keysToDelete\`) must be of type \`${r}\`, but received: \`${e}\`.`}),!p.isUndefined(t)&&!p.isBoolean(t))throw new TypeError(`Parameter \`deep\` at Second Parameter (\`keysToDelete\`) ➔ (key: "${e}", deep: ${t}) must be of type \`boolean\` or \`undefined\`, but received: \`${p.getPreciseType(t)}\`.`);const r=e.split(".");s=t?u(s,r):f(s,r)}return s},exports.toBooleanContent=r=>!p.isNil(r)&&(p.isString(r)?p.isNonEmptyString(r):p.isBoolean(r)?r:p.isNumber(r,{includeNaN:!0})?0!==r:p.isArray(r)||p.isObject(r)?e.isNonEmptyValue(r):Boolean(r)),exports.toBooleanContentDeep=c,exports.toBooleanExplicit=(e,r={})=>{if(p.isNil(e))return!1;p.isPlainObject(r)||(r={});const t=!!p.hasOwnProp(r,"caseInsensitive")&&r.caseInsensitive,i=!p.hasOwnProp(r,"trimString")||r.trimString,s=!!p.hasOwnProp(r,"includeIndeterminate")&&r.includeIndeterminate;if(!p.isBoolean(t)||!p.isBoolean(i)||!p.isBoolean(s))throw new TypeError(`Parameters \`caseInsensitive\`, \`trimString\` and \`includeIndeterminate\` property of the \`options\` (second parameter) expected to be a \`boolean\` type, but received: ['caseInsensitive': \`${p.getPreciseType(t)}\`, 'trimString': \`${p.getPreciseType(i)}\`, 'includeIndeterminate': \`${p.getPreciseType(s)}\`].`);if(p.isString(e)){let r=e;i&&(r=r.trim()),t&&(r=r.toLowerCase());const n=["true","on","yes","1"];return s&&n.push("indeterminate"),n.includes(r)}return p.isNumber(e)?1===e:!!p.isBoolean(e)&&e},exports.toBooleanLoose=e=>!p.isNil(e)&&(p.isString(e)?!t.isEmptyString(e):p.isBoolean(e)?e:p.isNumber(e,{includeNaN:!0})?0!==e:p.isArray(e)?e.length>0:Boolean(e)),exports.toNumberArrayUnRecursive=function(e,t={}){p.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!p.hasOwnProp(t,"removeInvalidValueNumber")||t.removeInvalidValueNumber;if(p.assertIsBoolean(i,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValueNumber\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),p.isArray(e)){const t=Array.from(e,e=>{if(m.isBigInt(e))return Number(e);const r=String(e).trim().match(/-?\d+(\.\d+)?/);return r?Number(r[0]):p.isNull(e)?null:void 0});return i?r.filterNilArray(t):t}},exports.toNumberDeep=function(r,t={}){return p.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`}),function r(t,i){if(p.isNil(t)||s.isRegExp(t))return;const{removeEmptyArrays:o,removeEmptyObjects:m,isRoot:y}=i;if(!p.isBoolean(m)||!p.isBoolean(o))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${p.getPreciseType(m)}\`, 'removeEmptyArrays': \`${p.getPreciseType(o)}\`].`);if(p.isNumber(t)||p.isBoolean(t)||p.isNonEmptyString(t)){const e=Number(t);return p.isInfinityNumber(e)||p.isNaN(e)?void 0:e}if(p.isNumberObject(t)||p.isStringObject(t)||p.isBooleanObject(t)){const e=Number(t.valueOf());return p.isInfinityNumber(e)||p.isNaN(e)?void 0:e}if(a.isDate(t,{skipInvalidDate:!0}))try{return p.isNaN(t.getTime())?0:t.getTime()}catch{return 0}if(p.isBuffer(t)){const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}if(e.isTypedArray(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}{const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}}if(p.isSet(t)){const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}if(a.isMap(t)){let e=Array.from(t.entries()).map(([e,t])=>{const i=r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1}),s=r(t,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1});return p.isUndefined(i)||p.isUndefined(s)?void 0:[i,s]}).filter(e=>!p.isUndefined(e));if(o&&(e=e.filter(e=>!n.isEmptyArray(e))),o&&n.isEmptyArray(e))return;return e}if(p.isArray(t)){const e=t.map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}if(p.isObject(t)){const e={};for(const[i,s]of Object.entries(t)){const t=r(s,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1});p.isUndefined(t)||(e[i]=t)}return m&&n.isEmptyObject(e)?y?{}:void 0:e}}(r,{removeEmptyObjects:!!p.hasOwnProp(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!p.hasOwnProp(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})},exports.toStringDeep=function(r,t={}){return p.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`}),function r(t,i){if(p.isNil(t)||p.isInfinityNumber(t))return;const{removeEmptyArrays:o,removeEmptyObjects:m,isRoot:y}=i;if(!p.isBoolean(m)||!p.isBoolean(o))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${p.getPreciseType(m)}\`, 'removeEmptyArrays': \`${p.getPreciseType(o)}\`].`);if(p.isNumber(t)||p.isString(t)||p.isBoolean(t))return String(t);if(p.isNumberObject(t)){const e=t.valueOf();return p.isInfinityNumber(e)||p.isNaN(e)?void 0:e.toString()}if(p.isStringObject(t))return t.valueOf();if(p.isBooleanObject(t))return t.valueOf().toString();if(a.isDate(t,{skipInvalidDate:!0}))try{return t.toISOString()}catch{return t.toString()}if(s.isRegExp(t))return t.toString();if(p.isBuffer(t))return Array.from(t).map(e=>String(e)).filter(e=>!p.isUndefined(e));if(e.isTypedArray(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).map(e=>String(e)).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}{const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).map(e=>String(e)).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}}if(p.isSet(t)){const e=Array.from(t).map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&n.isEmptyArray(e))return;return e}if(a.isMap(t)){const e=Array.from(t.entries()).map(([e,t])=>[r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1}),r(t,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})]).filter(([e,r])=>!p.isUndefined(e)&&!p.isUndefined(r));if(o&&n.isEmptyArray(e))return;return e}if(p.isArray(t)){let e=t.map(e=>r(e,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1})).filter(e=>!p.isUndefined(e));if(o&&(e=e.filter(e=>!(p.isArray(e)&&0===e.length))),o&&n.isEmptyArray(e))return;return e}if(p.isObject(t)){const e={};for(const[i,s]of Object.entries(t)){const t=r(s,{removeEmptyObjects:m,removeEmptyArrays:o,isRoot:!1});p.isUndefined(t)?p.isArray(s)&&!o&&(e[i]=[]):e[i]=t}return m&&0===Object.keys(e).length?y?{}:void 0:e}}(r,{removeEmptyObjects:!!p.hasOwnProp(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!p.hasOwnProp(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})},exports.toStringDeepForce=y;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-ZETAZZLD.cjs"),r=require("./chunk-BAV5T2E3.cjs"),t=require("./chunk-T7PU2V7X.cjs"),o=require("./chunk-PZQ6I4JJ.cjs"),n=(e,r)=>{if(!o.isNonEmptyString(e)||!o.isNonEmptyString(r))throw new TypeError(`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${o.getPreciseType(e)}\` - (current value: \`${t.safeStableStringify(e)}\`), 'format': \`${o.getPreciseType(r)}\` - (current value: \`${t.safeStableStringify(r)}\`)]".`);const n=e.split(/[-/]/).map(Number);if(3!==n.length||n.some(isNaN))return null;let s,i,a;if("DD/MM/YYYY"===r)[s,i,a]=n;else{if("MM/DD/YYYY"!==r)return null;[i,s,a]=n}i-=1;const c=new Date(a,i,s);return c.getFullYear()!==a||c.getMonth()!==i||c.getDate()!==s?null:c},s=(e={})=>{o.assertIsPlainObject(e,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!!o.hasOwnProp(e,"convertBooleans")&&e.convertBooleans,n=!!o.hasOwnProp(e,"convertDates")&&e.convertDates,s=!!o.hasOwnProp(e,"convertNumbers")&&e.convertNumbers,i=!!o.hasOwnProp(e,"loggingOnFail")&&e.loggingOnFail,a=!!o.hasOwnProp(e,"removeEmptyArrays")&&e.removeEmptyArrays,c=!!o.hasOwnProp(e,"removeEmptyObjects")&&e.removeEmptyObjects,l=!!o.hasOwnProp(e,"removeNulls")&&e.removeNulls,u=!!o.hasOwnProp(e,"removeUndefined")&&e.removeUndefined,m=!!o.hasOwnProp(e,"strictMode")&&e.strictMode,p=!!o.hasOwnProp(e,"checkSymbols")&&e.checkSymbols,N=!!o.hasOwnProp(e,"convertNaN")&&e.convertNaN,f=o.hasOwnProp(e,"customDateFormats")?e.customDateFormats:[],g=o.hasOwnProp(e,"onError")?e.onError:r.noop;if(!(o.isBoolean(t)&&o.isBoolean(n)&&o.isBoolean(s)&&o.isBoolean(N)&&o.isBoolean(p)&&o.isBoolean(i)&&o.isBoolean(a)&&o.isBoolean(c)&&o.isBoolean(l)&&o.isBoolean(u)&&o.isBoolean(m)&&o.isArray(f)&&o.isFunction(g)))throw new TypeError(`Invalid \`options\` parameter (second argument): \`convertBooleans\`, \`convertDates\`, \`convertNumbers\`, \`loggingOnFail\`, \`removeEmptyArrays\`, \`removeEmptyObjects\`, \`removeNulls\`, \`removeUndefined\`, \`strictMode\` expected to be a \`boolean\` type, \`customDateFormats\` expected to be a \`array\` type and \`onError\` expected to be a \`void function\` type. But received: ['convertBooleans': \`${o.getPreciseType(t)}\`, 'convertDates': \`${o.getPreciseType(n)}\`, 'convertNumbers': \`${o.getPreciseType(s)}\`, 'loggingOnFail': \`${o.getPreciseType(i)}\`, 'removeEmptyArrays': \`${o.getPreciseType(a)}\`, 'removeEmptyObjects': \`${o.getPreciseType(c)}\`, 'removeNulls': \`${o.getPreciseType(l)}\`, 'removeUndefined': \`${o.getPreciseType(u)}\`, 'strictMode': \`${o.getPreciseType(m)}\`, 'customDateFormats': \`${o.getPreciseType(f)}\`, 'onError': \`${o.getPreciseType(g)}\`].`);return{convertBooleans:t,convertDates:n,convertNumbers:s,convertNaN:N,loggingOnFail:i,removeEmptyArrays:a,removeEmptyObjects:c,removeNulls:l,removeUndefined:u,strictMode:m,customDateFormats:f,onError:g,checkSymbols:p}},i=(r,t={})=>{const a=s(t);if(o.isNull(r))return a.removeNulls?void 0:null;if(!o.isUndefined(r)){if(o.isString(r)){const e=r.trim();if(a.convertNaN&&"NaN"===e)return NaN;if(a.convertNumbers&&!isNaN(Number(e)))return Number(e);if(a.convertBooleans){if("true"===e)return!0;if("false"===e)return!1}if(a.convertDates){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e))return new Date(e);if(a.customDateFormats?.length)for(const r of a.customDateFormats){const t=n(e,r);if(t)return t}}return a.strictMode?void 0:e}if(o.isArray(r)){const t=r.map(e=>i(e,a)).filter(e=>!o.isUndefined(e));return a.removeEmptyArrays&&e.isEmptyArray(t)?void 0:t}if(o.isObject(r)){const t={};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const n=i(r[e],a);o.isUndefined(n)||(t[e]=n)}return a.removeEmptyObjects&&e.isEmptyObject(t,{checkSymbols:a.checkSymbols})?void 0:t}return a.strictMode?void 0:r}a.removeUndefined},a=e=>{if(!o.isString(e)&&!o.isNumber(e))return 0;const r=String(e).trim().replace(/[^0-9]/g,"");return Number(r)||0};exports.cleanParsedData=i,exports.extractDigits=a,exports.parseCustomDate=n,exports.safeJsonParse=function(e,r={}){if(o.isNull(e))return null;const t=s(r);if(t.convertNaN&&(o.isNaN(e)||o.isNonEmptyString(e)&&"NaN"===e))return NaN;if(t.convertNumbers&&!o.isNaN(Number(e))&&o.isNumber(a(e)))return Number(e);if(o.isString(e))try{let r=function(e){const r=new Set(["\\",'"',"/","b","f","n","r","t","u"]);let t="",o=!1,n=!1,s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(s)o?"'"===a?t+="'":r.has(a)?t+="\\"===a?"\\\\":'"'===a?'\\"':"\\"+a:t+="\\\\"+a:n?'"'===a?t+='\\"':r.has(a)?t+="\\"+a:t+="\\\\"+a:t+="\\"+a,s=!1;else if("\\"!==a){if(o||n){if(o){if("'"===a){t+='"',o=!1;continue}}else if(n&&'"'===a){t+='"',n=!1;continue}}else{if("'"===a){t+='"',o=!0;continue}if('"'===a){t+='"',n=!0;continue}}t+=a}else s=!0}return t}(e);r=t.removeUndefined?r.replace(/,\s*"[^"]*"\s*:\s*undefined(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*undefined\s*(,)?/g,""):r.replace(/:\s*undefined(?=\s*[,}])/g,":null"),r=t.convertNaN?r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"'):r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"').replace(/,\s*"[^"]*"\s*:\s*NaN(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*NaN\s*(,)?/g,""),r=r.replace(/,(\s*[}\]])/g,"$1");const o=JSON.parse(r);return i(o,t)}catch(e){return t.loggingOnFail&&console.error("Failed to parsing at `safeJsonParse`:",e),void t.onError(o.isError(e)?new Error(e.message.replace(/^JSON\.parse:/,"Failed to parsing")):new Error(String(e)))}};
@@ -0,0 +1 @@
1
+ import{isNonEmptyValue as e,isTypedArray as r}from"./chunk-5IGC6PBH.js";import{filterNilArray as t}from"./chunk-OI5XKNZO.js";import{isEmptyString as o}from"./chunk-W2WNBUDE.js";import{assertIsString as n}from"./chunk-SBKGWRS5.js";import{isRegExp as i,isEqual as m}from"./chunk-NBZWMBO6.js";import{isEmptyObject as s,isEmptyArray as a}from"./chunk-6JFCSH7J.js";import{assertIsArray as p}from"./chunk-CKTLUNWX.js";import{safeStableStringify as u,isDate as c,isMap as f}from"./chunk-PET42Z7W.js";import{isBigInt as y}from"./chunk-QNKGP5DY.js";import{assertIsPlainObject as l,hasOwnProp as v,assertIsBoolean as b,isArray as d,isNull as E,getPreciseType as g,isNaN as O,isString as j,isNumber as h,isBoolean as A,isNil as S,isNumberObject as T,isBooleanObject as $,isStringObject as N,isSymbol as k,isFunction as w,isObjectOrArray as R,isError as I,isSet as P,isObject as B,isNonEmptyString as C,isPlainObject as D,isUndefined as W,isInfinityNumber as M,isBuffer as J}from"./chunk-CMW2TBOQ.js";function K(e,r={}){l(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!v(r,"removeInvalidValueNumber")||r.removeInvalidValueNumber;if(b(o,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValueNumber\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),d(e)){const r=Array.from(e,e=>{if(y(e))return Number(e);const r=String(e).trim().match(/-?\d+(\.\d+)?/);return r?Number(r[0]):E(e)?null:void 0});return o?t(r):r}}function U(e,r){if(!1!==r&&"stringOrNumber"!==r&&"primitives"!==r&&"all"!==r)throw new TypeError(`Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${g(r)}\`, with value: \`${u(r)}\`.`);if(O(e))return"primitives"===r||"all"===r?"NaN":NaN;if(j(e)||h(e))return"stringOrNumber"===r||"primitives"===r||"all"===r?String(e):e;if(A(e)||y(e)||S(e))return"primitives"===r||"all"===r?String(e):e;if(T(e)||$(e)||N(e))return"all"===r?e.valueOf().toString():e;if(k(e))return"all"===r?e.toString():e;if(w(e))return"all"===r?e.toString():e;if(d(e))return e.map(e=>U(e,r));if(R(e)){if(c(e))return"all"===r?e.toISOString():e;if(i(e))return"all"===r?e.toString():e;if(I(e)||e instanceof Promise)return"all"===r?e.toString():e;if(P(e))return"all"===r?[...e].map(e=>U(e,r)):e;if(f(e))return"all"===r?[...e.entries()].map(([e,t])=>[U(e,r),U(t,r)]):e;const t={};if(B(e))for(const o of Object.keys(e))t[o]=U(e[o],r);return t}return e}var G=(e,r={})=>{p(e,{message:({currentType:e,validType:r})=>`First parameter (\`inputArray\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`}),l(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!!v(r,"flatten")&&r.flatten,o=!!v(r,"forceToString")&&r.forceToString;if(!1!==o&&"stringOrNumber"!==o&&"primitives"!==o&&"all"!==o)throw new TypeError(`Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${g(o)}\`, with value: \`${u(o)}\`.`);b(t,{message:({currentType:e,validType:r})=>`Parameter \`flatten\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const n=e=>{const r=[];return e.reduce((e,t)=>{const i=d(t)?n(t):U(t,o);return r.some(e=>m(e,i))||(r.push(i),e.push(i)),e},[])},i=e=>d(e)?e.flatMap(i):P(e)?[...e].flatMap(i):f(e)?[...e.values()].flatMap(i):[e];return n(t?i(e):e)},L=r=>!S(r)&&(j(r)?C(r):A(r)?r:h(r,{includeNaN:!0})?0!==r:d(r)||B(r)?e(r):Boolean(r)),V=e=>!S(e)&&(j(e)?C(e):A(e)?e:h(e,{includeNaN:!0})?0!==e:d(e)?e.some(V):!!B(e)&&Object.values(e).some(V)),Z=(e,r={})=>{if(S(e))return!1;D(r)||(r={});const t=!!v(r,"caseInsensitive")&&r.caseInsensitive,o=!v(r,"trimString")||r.trimString,n=!!v(r,"includeIndeterminate")&&r.includeIndeterminate;if(!A(t)||!A(o)||!A(n))throw new TypeError(`Parameters \`caseInsensitive\`, \`trimString\` and \`includeIndeterminate\` property of the \`options\` (second parameter) expected to be a \`boolean\` type, but received: ['caseInsensitive': \`${g(t)}\`, 'trimString': \`${g(o)}\`, 'includeIndeterminate': \`${g(n)}\`].`);if(j(e)){let r=e;o&&(r=r.trim()),t&&(r=r.toLowerCase());const i=["true","on","yes","1"];return n&&i.push("indeterminate"),i.includes(r)}return h(e)?1===e:!!A(e)&&e},x=e=>!S(e)&&(j(e)?!o(e):A(e)?e:h(e,{includeNaN:!0})?0!==e:d(e)?e.length>0:Boolean(e)),F=e=>{const r={undefined:void 0,null:null,nan:NaN,true:!0,false:!1,yes:!0,no:!1};if(j(e)){const t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const o=t.replace(/,/g,""),n=Number(o);return!O(n)&&C(o)?n:e.trim()}return e},H=(e,r)=>{if(!R(e))return e;const[t,...o]=r;if(d(e))for(const t of e)R(t)&&H(t,r);else a(o)?D(e)&&delete e[t]:D(e)&&R(e[t])&&H(e[t],o);return e},Q=(e,r)=>{if(!D(e))return e;const[t,...o]=r;return 0===o.length?D(e)&&delete e[t]:D(e[t])&&Q(e[t],o),e};function X(e,r,t=!0){if(s(e,{checkSymbols:!0}))return{};if(p(r,{message:({currentType:e,validType:t})=>`Second parameter (\`keysToDelete\`) must be of type \`${t}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${e}\`, with value: \`${u(r)}\`.`}),!r.every(e=>D(e)&&"key"in e))throw new TypeError(`Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${u(r)}\`.`);let o=t?(e=>{try{if(w(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))})(e):e;for(const{key:e,deep:t}of r){if(n(e,{message:({currentType:e,validType:r})=>`Parameter \`key\` at Second Parameter (\`keysToDelete\`) must be of type \`${r}\`, but received: \`${e}\`.`}),!W(t)&&!A(t))throw new TypeError(`Parameter \`deep\` at Second Parameter (\`keysToDelete\`) ➔ (key: "${e}", deep: ${t}) must be of type \`boolean\` or \`undefined\`, but received: \`${g(t)}\`.`);const r=e.split(".");o=t?H(o,r):Q(o,r)}return o}function Y(e,t={}){l(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});return function e(t,o){if(S(t)||i(t))return;const{removeEmptyArrays:n,removeEmptyObjects:m,isRoot:p}=o;if(!A(m)||!A(n))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${g(m)}\`, 'removeEmptyArrays': \`${g(n)}\`].`);if(h(t)||A(t)||C(t)){const e=Number(t);return M(e)||O(e)?void 0:e}if(T(t)||N(t)||$(t)){const e=Number(t.valueOf());return M(e)||O(e)?void 0:e}if(c(t,{skipInvalidDate:!0}))try{return O(t.getTime())?0:t.getTime()}catch{return 0}if(J(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&a(r))return;return r}if(r(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&a(r))return;return r}{const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&a(r))return;return r}}if(P(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&a(r))return;return r}if(f(t)){let r=Array.from(t.entries()).map(([r,t])=>{const o=e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1}),i=e(t,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1});return W(o)||W(i)?void 0:[o,i]}).filter(e=>!W(e));if(n&&(r=r.filter(e=>!a(e))),n&&a(r))return;return r}if(d(t)){const r=t.map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&a(r))return;return r}if(B(t)){const r={};for(const[o,i]of Object.entries(t)){const t=e(i,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1});W(t)||(r[o]=t)}return m&&s(r)?p?{}:void 0:r}}(e,{removeEmptyObjects:!!v(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!v(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})}function q(e,t={}){l(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});return function e(t,o){if(S(t)||M(t))return;const{removeEmptyArrays:n,removeEmptyObjects:m,isRoot:s}=o;if(!A(m)||!A(n))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${g(m)}\`, 'removeEmptyArrays': \`${g(n)}\`].`);if(h(t)||j(t)||A(t))return String(t);if(T(t)){const e=t.valueOf();return M(e)||O(e)?void 0:e.toString()}if(N(t))return t.valueOf();if($(t))return t.valueOf().toString();if(c(t,{skipInvalidDate:!0}))try{return t.toISOString()}catch{return t.toString()}if(i(t))return t.toString();if(J(t))return Array.from(t).map(e=>String(e)).filter(e=>!W(e));if(r(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).map(e=>String(e)).filter(e=>!W(e));if(n&&a(r))return;return r}{const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).map(e=>String(e)).filter(e=>!W(e));if(n&&a(r))return;return r}}if(P(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&a(r))return;return r}if(f(t)){const r=Array.from(t.entries()).map(([r,t])=>[e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1}),e(t,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})]).filter(([e,r])=>!W(e)&&!W(r));if(n&&a(r))return;return r}if(d(t)){let r=t.map(r=>e(r,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1})).filter(e=>!W(e));if(n&&(r=r.filter(e=>!(d(e)&&0===e.length))),n&&a(r))return;return r}if(B(t)){const r={};for(const[o,i]of Object.entries(t)){const t=e(i,{removeEmptyObjects:m,removeEmptyArrays:n,isRoot:!1});W(t)?d(i)&&!n&&(r[o]=[]):r[o]=t}return m&&0===Object.keys(r).length?s?{}:void 0:r}}(e,{removeEmptyObjects:!!v(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!v(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})}export{F as convertType,G as dedupeArray,X as removeObjectPaths,L as toBooleanContent,V as toBooleanContentDeep,Z as toBooleanExplicit,x as toBooleanLoose,K as toNumberArrayUnRecursive,Y as toNumberDeep,q as toStringDeep,U as toStringDeepForce};
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./chunk-PZQ6I4JJ.cjs"),a=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"]),t=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]);exports.extractFileName=r=>{if(!s.isNonEmptyString(r))return;let e=r.split("/").pop();if(""===e)return"";if(e){for(const s of t){const a=`.${s}`;if(e.toLowerCase().endsWith(a))return e.slice(0,-a.length)}for(;;){const s=e.lastIndexOf(".");if(-1===s)break;const t=e.slice(s+1).toLowerCase();if(!a.has(t))break;e=e.slice(0,s)}return e}};
@@ -0,0 +1 @@
1
+ import{removeSpaces as r}from"./chunk-XEDXFSGI.js";import{isEmptyString as e}from"./chunk-W2WNBUDE.js";import{safeStableStringify as t}from"./chunk-PET42Z7W.js";import{isNonEmptyString as o,getPreciseType as a,isError as n,assertIsPlainObject as s,hasOwnProp as i,isBoolean as c,isFunction as m}from"./chunk-CMW2TBOQ.js";var p=class r extends Error{originalError;constructor(e,t){super(e,m(Error)?{cause:t}:void 0),this.name="NormalizePathnameError",this.originalError=t,m(Error.captureStackTrace)?Error.captureStackTrace(this,r):this.stack=new Error(e).stack}toJSON(){return{name:this.name,message:this.message,stack:this.stack,originalError:{name:this.originalError.name,message:this.originalError.message,stack:this.originalError.stack}}}},h=(e,s="/")=>{if(!o(s))throw new TypeError(`Second parameter (\`defaultPath\`) must be of type \`string\` and not empty-string, but received: \`${a(s)}\`, with value: \`${t(s)}\`.`);if(!o(e))return s;try{if((e=(e=r(e,{trimOnly:!0})).replace(/\s+/g,"")).startsWith("http://")||e.startsWith("https://")){const r=new URL(e);return`${r.pathname}${r.search}${r.hash}`.replace(/^\/+/,"/")}return"/"+e.replace(/^\/+/,"").replace(/\/{2,}/g,"/")}catch(r){const e=n(r)?r:new Error("Unknown error from function `normalizePathname()`.");throw new p(`Failed to normalize pathname in function \`normalizePathname()\`: ${e.message}`,e)}},u=(r,t={})=>{if(!o(r))return"";s(t,{message:({currentType:r,validType:e})=>`Second parameter (\`options\`) must be of type \`${e}\`, but received: \`${r}\`.`});const n=!!i(t,"prefixColon")&&t.prefixColon;if(!c(n))throw new TypeError(`Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${a(n)}\`.`);const m=r.replace(/\D+/g,"");return e(m)?"":n?`:${m}`:m};export{u as formatEnvPort,h as normalizePathname};