@rzl-zone/utils-js 3.1.3-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 +48 -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 +1 @@
1
- 'use strict';var chunk7TC6DE3J_cjs=require('../chunk-7TC6DE3J.cjs');require('../chunk-FIEZKTAZ.cjs'),require('../chunk-XGZ6K753.cjs'),require('../chunk-ZQOLZE6Z.cjs'),require('../chunk-G7R5XZRM.cjs'),require('../chunk-UQDJF5RR.cjs'),require('../chunk-Q3NTKN5I.cjs');var chunkOZCQZO2V_cjs=require('../chunk-OZCQZO2V.cjs');require('../chunk-MROH35V3.cjs'),require('../chunk-UTQUYABU.cjs'),require('../chunk-PUQXRLZH.cjs'),require('../chunk-26W3VZIK.cjs'),require('../chunk-7YWAQOA4.cjs'),require('../chunk-CII6WWLO.cjs');Object.defineProperty(exports,"constructURL",{enumerable:true,get:function(){return chunk7TC6DE3J_cjs.a}});Object.defineProperty(exports,"extractURLs",{enumerable:true,get:function(){return chunk7TC6DE3J_cjs.b}});Object.defineProperty(exports,"formatEnvPort",{enumerable:true,get:function(){return chunkOZCQZO2V_cjs.d}});Object.defineProperty(exports,"getFirstPrefixPathname",{enumerable:true,get:function(){return chunkOZCQZO2V_cjs.b}});Object.defineProperty(exports,"getPrefixPathname",{enumerable:true,get:function(){return chunkOZCQZO2V_cjs.a}});Object.defineProperty(exports,"normalizePathname",{enumerable:true,get:function(){return chunkOZCQZO2V_cjs.c}});
1
+ "use strict";var e=require("../chunk-DWF2R5GD.cjs");require("../chunk-KHO2SBNA.cjs"),require("../chunk-E74U6CYP.cjs"),require("../chunk-NRF6LWBC.cjs"),require("../chunk-HQWOFR56.cjs"),require("../chunk-V45XJKHW.cjs"),require("../chunk-DVMHRLKP.cjs");var r=require("../chunk-H66AC7GK.cjs");require("../chunk-KVAL5PAG.cjs"),require("../chunk-E55EQK2U.cjs"),require("../chunk-ZETAZZLD.cjs"),require("../chunk-6JFZL7YE.cjs"),require("../chunk-T7PU2V7X.cjs"),require("../chunk-UDA26MCU.cjs"),require("../chunk-PZQ6I4JJ.cjs"),Object.defineProperty(exports,"constructURL",{enumerable:!0,get:function(){return e.constructURL}}),Object.defineProperty(exports,"extractURLs",{enumerable:!0,get:function(){return e.extractURLs}}),Object.defineProperty(exports,"getFirstPrefixPathname",{enumerable:!0,get:function(){return e.getFirstPrefixPathname}}),Object.defineProperty(exports,"getPrefixPathname",{enumerable:!0,get:function(){return e.getPrefixPathname}}),Object.defineProperty(exports,"formatEnvPort",{enumerable:!0,get:function(){return r.formatEnvPort}}),Object.defineProperty(exports,"normalizePathname",{enumerable:!0,get:function(){return r.normalizePathname}});
@@ -3,7 +3,7 @@
3
3
  * ----------------------------------------------------------
4
4
  * **Represents a non-empty array of key–value pairs.**
5
5
  * @description
6
- * Type for `queryParams` parameter, the second parameter of **{@link constructURL}**.
6
+ * Type for `queryParams` parameter, the second parameter of **{@link constructURL | `constructURL`}**.
7
7
  * - **Behavior:**
8
8
  * - Each inner tuple strictly follows the `[string, string | number]` shape.
9
9
  * - Ensures the outer array contains **at least one pair** (non-empty).
@@ -99,8 +99,107 @@ declare const constructURL:(baseUrl:string|URL,queryParams?:URLSearchParamsItera
99
99
  * extractURLs("ftp://example.com http://example.com");
100
100
  * // ➔ ["http://example.com"]
101
101
  */
102
- declare const extractURLs:(url:string|null|undefined)=>string[]|null;type GetPrefixPathnameOptions={
103
- /** The number of levels to include in the prefix (default is `1`). For example, with `levels = 2`, the function will return the first two parts of the URL.
102
+ declare const extractURLs:(url:string|null|undefined)=>string[]|null;
103
+ /** --------------------------------------------------------
104
+ * * ***Utility: `getFirstPrefixPathname`.***
105
+ * --------------------------------------------------------
106
+ * **Extract First Valid Prefix from Path Array or String.**
107
+ * - **Main Purpose:**
108
+ * - This function helps extract the first valid URL prefix from various possible inputs.
109
+ * - It is especially useful in routing systems, middleware, or frontend apps that need to
110
+ * decide layout, active navigation, or permissions based on the first segment (or prefix) of a pathname.
111
+ * - **Typical uses include:**
112
+ * - Determining which layout to render (e.g., `/admin` vs `/dashboard` vs `/`).
113
+ * - Highlighting the active menu item in a sidebar based on the current URL.
114
+ * - Enforcing route guards or access controls depending on the URL prefix.
115
+ * - Parsing multi-level route prefixes and selecting the most relevant one.
116
+ * - **Behavior:**
117
+ * - It works as follows:
118
+ * - If `result` is an array of strings, it normalizes each element and returns
119
+ * the first non-root path (i.e., not just `"/"`).
120
+ * - If all items normalize to `"/"`,
121
+ * it returns the `defaultValue` (normalized).
122
+ * - If `result` is a single string, it normalizes it and returns it if valid,
123
+ * otherwise falls back to the normalized `defaultValue`.
124
+ * - If `result` is `null` or `undefined`, it returns the normalized `defaultValue`.
125
+ * - **Validation & Errors:**
126
+ * - Throws a `TypeError` if:
127
+ * - `defaultValue` is not a string or empty-string.
128
+ * - `result` is an array that contains non-string elements.
129
+ * - `result` is a value that is neither `string`, `string[]`, nor `null`.
130
+ * @example
131
+ * 1. #### For React (*Determining layout*):
132
+ * ```ts
133
+ * const prefix = getFirstPrefixPathname(
134
+ * getPrefixPathname(
135
+ * "/admin/settings",
136
+ * ["/admin", "/dashboard"]
137
+ * )
138
+ * );
139
+ *
140
+ * if (prefix === "/admin") {
141
+ * renderAdminLayout();
142
+ * }
143
+ * ```
144
+ *
145
+ * 2. #### Setting active menu state:
146
+ * ```ts
147
+ * const activeSection = getFirstPrefixPathname(["", "/dashboard", "/profile"]);
148
+ * // ➔ "/dashboard"
149
+ * ```
150
+ *
151
+ * 3. #### Providing graceful fallback:
152
+ * ```ts
153
+ * const section = getFirstPrefixPathname([], "/home");
154
+ * // ➔ "/home"
155
+ * ```
156
+ * 4. #### ✅ Using with an Array of Pathnames:
157
+ * ```ts
158
+ * const result = getPrefixPathname([" ", "/dashboard", "/settings"]);
159
+ * console.log(getFirstPrefixPathname(result));
160
+ * // ➔ "/dashboard"
161
+ * ```
162
+ *
163
+ * 5. #### ✅ Using with Single String:
164
+ * ```ts
165
+ * console.log(getFirstPrefixPathname("/profile/settings"));
166
+ * // ➔ "/profile/settings"
167
+ * console.log(getFirstPrefixPathname(" "));
168
+ * // ➔ "/"
169
+ * ```
170
+ *
171
+ * 6. #### ✅ Fallback to Custom Default:
172
+ * ```ts
173
+ * console.log(getFirstPrefixPathname([" ", ""], "/home"));
174
+ * // ➔ "/home"
175
+ * console.log(getFirstPrefixPathname(null, "/dashboard"));
176
+ * // ➔ "/dashboard"
177
+ * ```
178
+ *
179
+ * 7. #### ✅ Throws on Invalid Input:
180
+ * ```ts
181
+ * getFirstPrefixPathname([1, 2] as any); // ➔ ❌ throws TypeError
182
+ * getFirstPrefixPathname({} as any); // ➔ ❌ throws TypeError
183
+ * getFirstPrefixPathname(null, " "); // ➔ ❌ throws TypeError
184
+ * ```
185
+ * @param {string | string[] | null | undefined} result
186
+ * ***The pathname(s) to process, can be:***
187
+ * - A string path (e.g. `"/profile"`),
188
+ * - An array of string paths (e.g. `[" ", "/dashboard"]`),
189
+ * - Or `null`.
190
+ * @param {string} [defaultValue="/"]
191
+ * ***A custom default path to use if `result` is null or no valid prefix is found, behavior:***
192
+ * - Must be a string and non-empty string.
193
+ * - Defaults to `"/"`.
194
+ * @returns {string}
195
+ * ***The first valid normalized pathname, or the normalized default.***
196
+ * @throws {TypeError}
197
+ * ***If `result` is not a valid type, or `defaultValue` is not a string or empty-string.***
198
+ */
199
+ declare const getFirstPrefixPathname:(result:string|string[]|null|undefined,defaultValue?:string)=>string;type GetPrefixPathnameOptions={
200
+ /** The number of levels to include in the prefix (default is `1`).
201
+ *
202
+ * - For example, with `levels = 2`, the function will return the first two parts of the URL.
104
203
  *
105
204
  * @default 1
106
205
  */
@@ -128,20 +227,24 @@ removeDuplicates?:boolean;};
128
227
  * - The `url` parameter can be either a string or an array of strings.
129
228
  * - Supports deduplication of results (enabled by default).
130
229
  * - Automatically returns a single string if only one unique result exists after processing.
131
- * @param {string|string[]} url The full URL(s) from which the prefix should be extracted.
132
- * - Can be a `string` or an `array of strings`.
133
- * @param {string|string[]|null} [base=null] The base URL(s) (e.g., `"/settings"`).
230
+ * @param {string|string[]} url
231
+ * ***The full URL(s) from which the prefix should be extracted, can be a `string` or an `array of strings`.***
232
+ * @param {string|string[]|null} [base=null]
233
+ * ***The base URL(s) (e.g., `"/settings"`), behavior:***
134
234
  * - It can be a `string`, an `array of strings`, or `null`.
135
235
  * - If `provided`, it will be used to check the URL(s).
136
236
  * - If `not provided`, the prefix will be auto-detected.
137
- * @param {GetPrefixPathnameOptions} [options] Additional options object:
237
+ * @param {GetPrefixPathnameOptions} [options]
238
+ * ***Additional options object:***
138
239
  * - `levels` (default `1`): The number of segments to include when auto-detecting the prefix (e.g. `/foo/bar` for `levels: 2`).
139
240
  * - `removeDuplicates` (default `true`): Whether to remove duplicate prefixes from the final array result.
140
- * @returns {string|string[]|null} Returns one of:
241
+ * @returns {string|string[]|null}
242
+ * ***Returns one of:***
141
243
  * - A single string if only one unique prefix/base is found.
142
244
  * - An array of strings if multiple different prefixes/bases are found.
143
245
  * - `null` if no matching base is found when using `base`.
144
- * @throws {TypeError} Throws if:
246
+ * @throws {TypeError}
247
+ * ***Throws if:***
145
248
  * - `url` is `not a string` or `not an array of strings`.
146
249
  * - `base` is `not a string`, `array of strings`, or `null`.
147
250
  * - `options` is `not an object`.
@@ -235,103 +338,6 @@ removeDuplicates?:boolean;};
235
338
  * ```
236
339
  */
237
340
  declare const getPrefixPathname:(url:string|string[],base?:string|string[]|null,options?:GetPrefixPathnameOptions)=>string|string[]|null;
238
- /** --------------------------------------------------------
239
- * * ***Utility: `getFirstPrefixPathname`.***
240
- * --------------------------------------------------------
241
- * **Extract First Valid Prefix from Path Array or String.**
242
- * - **Main Purpose:**
243
- * - This function helps extract the first valid URL prefix from various possible inputs.
244
- * - It is especially useful in routing systems, middleware, or frontend apps that need to
245
- * decide layout, active navigation, or permissions based on the first segment (or prefix) of a pathname.
246
- * - **Typical uses include:**
247
- * - Determining which layout to render (e.g., `/admin` vs `/dashboard` vs `/`).
248
- * - Highlighting the active menu item in a sidebar based on the current URL.
249
- * - Enforcing route guards or access controls depending on the URL prefix.
250
- * - Parsing multi-level route prefixes and selecting the most relevant one.
251
- * - **Behavior:**
252
- * - It works as follows:
253
- * - If `result` is an array of strings, it normalizes each element and returns
254
- * the first non-root path (i.e., not just `"/"`).
255
- * - If all items normalize to `"/"`,
256
- * it returns the `defaultValue` (normalized).
257
- * - If `result` is a single string, it normalizes it and returns it if valid,
258
- * otherwise falls back to the normalized `defaultValue`.
259
- * - If `result` is `null` or `undefined`, it returns the normalized `defaultValue`.
260
- * - **Validation & Errors:**
261
- * - Throws a `TypeError` if:
262
- * - `defaultValue` is not a string or empty-string.
263
- * - `result` is an array that contains non-string elements.
264
- * - `result` is a value that is neither `string`, `string[]`, nor `null`.
265
- * @example
266
- * 1. #### For React (*Determining layout*):
267
- * ```ts
268
- * const prefix = getFirstPrefixPathname(
269
- * getPrefixPathname(
270
- * "/admin/settings",
271
- * ["/admin", "/dashboard"]
272
- * )
273
- * );
274
- *
275
- * if (prefix === "/admin") {
276
- * renderAdminLayout();
277
- * }
278
- * ```
279
- *
280
- * 2. #### Setting active menu state:
281
- * ```ts
282
- * const activeSection = getFirstPrefixPathname(["", "/dashboard", "/profile"]);
283
- * // ➔ "/dashboard"
284
- * ```
285
- *
286
- * 3. #### Providing graceful fallback:
287
- * ```ts
288
- * const section = getFirstPrefixPathname([], "/home");
289
- * // ➔ "/home"
290
- * ```
291
- * 4. #### ✅ Using with an Array of Pathnames:
292
- * ```ts
293
- * const result = getPrefixPathname([" ", "/dashboard", "/settings"]);
294
- * console.log(getFirstPrefixPathname(result));
295
- * // ➔ "/dashboard"
296
- * ```
297
- *
298
- * 5. #### ✅ Using with Single String:
299
- * ```ts
300
- * console.log(getFirstPrefixPathname("/profile/settings"));
301
- * // ➔ "/profile/settings"
302
- * console.log(getFirstPrefixPathname(" "));
303
- * // ➔ "/"
304
- * ```
305
- *
306
- * 6. #### ✅ Fallback to Custom Default:
307
- * ```ts
308
- * console.log(getFirstPrefixPathname([" ", ""], "/home"));
309
- * // ➔ "/home"
310
- * console.log(getFirstPrefixPathname(null, "/dashboard"));
311
- * // ➔ "/dashboard"
312
- * ```
313
- *
314
- * 7. #### ✅ Throws on Invalid Input:
315
- * ```ts
316
- * getFirstPrefixPathname([1, 2] as any); // ➔ ❌ throws TypeError
317
- * getFirstPrefixPathname({} as any); // ➔ ❌ throws TypeError
318
- * getFirstPrefixPathname(null, " "); // ➔ ❌ throws TypeError
319
- * ```
320
- * @param {string | string[] | null | undefined} result
321
- * The pathname(s) to process, can be:
322
- * - A string path (e.g. `"/profile"`),
323
- * - An array of string paths (e.g. `[" ", "/dashboard"]`),
324
- * - Or `null`.
325
- * @param {string} [defaultValue="/"]
326
- * A custom default path to use if `result` is null or no valid prefix is found.
327
- * - Must be a string and non-empty string.
328
- * - Defaults to `"/"`.
329
- * @returns {string}
330
- * The first valid normalized pathname, or the normalized default.
331
- * @throws {TypeError}
332
- * If `result` is not a valid type, or `defaultValue` is not a string or empty-string.
333
- */
334
- declare const getFirstPrefixPathname:(result:string|string[]|null|undefined,defaultValue?:string)=>string;
335
341
  /** --------------------------------------------------------
336
342
  * * ***Utility: `normalizePathname`.***
337
343
  * --------------------------------------------------------
@@ -345,8 +351,7 @@ declare const getFirstPrefixPathname:(result:string|string[]|null|undefined,defa
345
351
  * - Multiple consecutive slashes (like `"//"` or `"///"`) are collapsed into a single slash `"/"`.
346
352
  * - Ensures the returned string always starts with exactly one `/`.
347
353
  * @param {string | null | undefined} pathname - The pathname to normalize.
348
- * @param {string} [defaultPath="/"] - A fallback value returned if `pathname` is empty or invalid.
349
- * - Must be a string and non-empty string, default `"/"`.
354
+ * @param {string} [defaultPath="/"] - A fallback value returned if `pathname` is empty or invalid, must be a string and non-empty string, default `"/"`.
350
355
  * @returns {string} A properly normalized pathname starting with a single `/`,
351
356
  * or the `defaultPath` if the input is invalid or empty.
352
357
  * @throws {TypeError} If `defaultPath` is not a string or empty-string.
@@ -1 +1 @@
1
- export{a as constructURL,b as extractURLs}from'../chunk-SGTHOQQ2.js';import'../chunk-NNM7QCNB.js';import'../chunk-W32WALNU.js';import'../chunk-7MMJZ6HS.js';import'../chunk-LQ76EDZG.js';import'../chunk-SL3RQOWA.js';import'../chunk-ESJYBIYH.js';export{d as formatEnvPort,b as getFirstPrefixPathname,a as getPrefixPathname,c as normalizePathname}from'../chunk-QDNSC57Z.js';import'../chunk-NR44SNYE.js';import'../chunk-7CHFAMS2.js';import'../chunk-ELDDNERR.js';import'../chunk-J4NCYYGS.js';import'../chunk-5SZUSNGZ.js';import'../chunk-EWYPSKKM.js';
1
+ export{constructURL,extractURLs,getFirstPrefixPathname,getPrefixPathname}from"../chunk-SBFNXGTJ.js";import"../chunk-ONZFBJVW.js";import"../chunk-IZPBKKPO.js";import"../chunk-OI5XKNZO.js";import"../chunk-GQR4R5WY.js";import"../chunk-3IBQ5MOM.js";import"../chunk-WVSPXFTY.js";export{formatEnvPort,normalizePathname}from"../chunk-GGEADHZO.js";import"../chunk-XEDXFSGI.js";import"../chunk-W2WNBUDE.js";import"../chunk-6JFCSH7J.js";import"../chunk-CKTLUNWX.js";import"../chunk-PET42Z7W.js";import"../chunk-QNKGP5DY.js";import"../chunk-CMW2TBOQ.js";
package/package.json CHANGED
@@ -1,18 +1,15 @@
1
1
  {
2
2
  "name": "@rzl-zone/utils-js",
3
- "version": "3.1.3-beta.0",
3
+ "version": "3.2.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "engineStrict": true,
7
7
  "license": "MIT",
8
- "types": "./dist/index.d.ts",
9
- "main": "./dist/index.cjs",
10
- "module": "./dist/index.js",
11
8
  "unpkg": "./dist/rzl-utils.global.js",
12
9
  "jsdelivr": "./dist/rzl-utils.global.js",
13
10
  "author": "Rizalvin Dwiky <rizalvindwiky1998@gmail.com>",
14
11
  "homepage": "https://github.com/rzl-zone/utils-js#readme",
15
- "description": "A modern, lightweight set of JavaScript utility functions for everyday development, crafted to enhance code readability and maintainability.",
12
+ "description": "A modern, lightweight set of JavaScript utility functions with TypeScript support for everyday development, crafted to enhance code readability and maintainability.",
16
13
  "contributors": [
17
14
  "Rizalvin Dwiky <rizalvindwiky1998@gmail.com>"
18
15
  ],
@@ -21,7 +18,10 @@
21
18
  },
22
19
  "dependencies": {
23
20
  "date-fns": "^4.1.0",
24
- "server-only": "^0.0.1"
21
+ "libphonenumber-js": "^1.12.17",
22
+ "server-only": "^0.0.1",
23
+ "tailwind-merge-v3": "npm:tailwind-merge@2.6.0",
24
+ "tailwind-merge-v4": "npm:tailwind-merge@3.3.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@eslint/js": "^9.31.0",
@@ -29,6 +29,7 @@
29
29
  "@types/rollup": "^0.51.4",
30
30
  "@vitest/coverage-v8": "^3.2.4",
31
31
  "barrelsby": "^2.8.1",
32
+ "clsx": "latest",
32
33
  "del-cli": "^6.0.0",
33
34
  "dts-bundle-generator": "^9.5.1",
34
35
  "eslint": "^9.31.0",
@@ -36,6 +37,8 @@
36
37
  "jsdom": "^26.1.0",
37
38
  "next": "^15.5.2",
38
39
  "release-please": "^17.1.1",
40
+ "tailwindcss": "^4.1.13",
41
+ "terser": "^5.44.0",
39
42
  "tsc-alias": "^1.8.16",
40
43
  "tsup": "^8.5.0",
41
44
  "tsx": "^4.20.3",
@@ -43,6 +46,14 @@
43
46
  "typescript-eslint": "^8.41.0",
44
47
  "vitest": "^3.2.4"
45
48
  },
49
+ "peerDependencies": {
50
+ "tailwindcss": "^3.0.0 || ^4.0.0"
51
+ },
52
+ "peerDependenciesMeta": {
53
+ "tailwindcss": {
54
+ "optional": true
55
+ }
56
+ },
46
57
  "engines": {
47
58
  "node": ">=16"
48
59
  },
@@ -67,16 +78,6 @@
67
78
  "default": "./dist/conversions/index.cjs"
68
79
  }
69
80
  },
70
- "./env": {
71
- "import": {
72
- "types": "./dist/env/index.d.ts",
73
- "default": "./dist/env/index.js"
74
- },
75
- "require": {
76
- "types": "./dist/env/index.d.ts",
77
- "default": "./dist/env/index.cjs"
78
- }
79
- },
80
81
  "./events": {
81
82
  "import": {
82
83
  "types": "./dist/events/index.d.ts",
@@ -87,24 +88,24 @@
87
88
  "default": "./dist/events/index.cjs"
88
89
  }
89
90
  },
90
- "./formatting": {
91
+ "./formatters": {
91
92
  "import": {
92
- "types": "./dist/formatting/index.d.ts",
93
- "default": "./dist/formatting/index.js"
93
+ "types": "./dist/formatters/index.d.ts",
94
+ "default": "./dist/formatters/index.js"
94
95
  },
95
96
  "require": {
96
- "types": "./dist/formatting/index.d.ts",
97
- "default": "./dist/formatting/index.cjs"
97
+ "types": "./dist/formatters/index.d.ts",
98
+ "default": "./dist/formatters/index.cjs"
98
99
  }
99
100
  },
100
- "./generator": {
101
+ "./generators": {
101
102
  "import": {
102
- "types": "./dist/generator/index.d.ts",
103
- "default": "./dist/generator/index.js"
103
+ "types": "./dist/generators/index.d.ts",
104
+ "default": "./dist/generators/index.js"
104
105
  },
105
106
  "require": {
106
- "types": "./dist/generator/index.d.ts",
107
- "default": "./dist/generator/index.cjs"
107
+ "types": "./dist/generators/index.d.ts",
108
+ "default": "./dist/generators/index.cjs"
108
109
  }
109
110
  },
110
111
  "./next": {
@@ -157,14 +158,14 @@
157
158
  "default": "./dist/predicates/index.cjs"
158
159
  }
159
160
  },
160
- "./promise": {
161
+ "./promises": {
161
162
  "import": {
162
- "types": "./dist/promise/index.d.ts",
163
- "default": "./dist/promise/index.js"
163
+ "types": "./dist/promises/index.d.ts",
164
+ "default": "./dist/promises/index.js"
164
165
  },
165
166
  "require": {
166
- "types": "./dist/promise/index.d.ts",
167
- "default": "./dist/promise/index.cjs"
167
+ "types": "./dist/promises/index.d.ts",
168
+ "default": "./dist/promises/index.cjs"
168
169
  }
169
170
  },
170
171
  "./strings": {
@@ -177,14 +178,14 @@
177
178
  "default": "./dist/strings/index.cjs"
178
179
  }
179
180
  },
180
- "./stylings": {
181
+ "./tailwind": {
181
182
  "import": {
182
- "types": "./dist/stylings/index.d.ts",
183
- "default": "./dist/stylings/index.js"
183
+ "types": "./dist/tailwind/index.d.ts",
184
+ "default": "./dist/tailwind/index.js"
184
185
  },
185
186
  "require": {
186
- "types": "./dist/stylings/index.d.ts",
187
- "default": "./dist/stylings/index.cjs"
187
+ "types": "./dist/tailwind/index.d.ts",
188
+ "default": "./dist/tailwind/index.cjs"
188
189
  }
189
190
  },
190
191
  "./urls": {
@@ -209,17 +210,14 @@
209
210
  "conversions": [
210
211
  "dist/conversions/index.d.ts"
211
212
  ],
212
- "env": [
213
- "dist/env/index.d.ts"
214
- ],
215
213
  "events": [
216
214
  "dist/events/index.d.ts"
217
215
  ],
218
- "formatting": [
219
- "dist/formatting/index.d.ts"
216
+ "formatters": [
217
+ "dist/formatters/index.d.ts"
220
218
  ],
221
- "generator": [
222
- "dist/generator/index.d.ts"
219
+ "generators": [
220
+ "dist/generators/index.d.ts"
223
221
  ],
224
222
  "next": [
225
223
  "dist/next/index.d.ts"
@@ -236,14 +234,14 @@
236
234
  "predicates": [
237
235
  "dist/predicates/index.d.ts"
238
236
  ],
239
- "promise": [
240
- "dist/promise/index.d.ts"
237
+ "promises": [
238
+ "dist/promises/index.d.ts"
241
239
  ],
242
240
  "strings": [
243
241
  "dist/strings/index.d.ts"
244
242
  ],
245
- "stylings": [
246
- "dist/stylings/index.d.ts"
243
+ "tailwind": [
244
+ "dist/tailwind/index.d.ts"
247
245
  ],
248
246
  "urls": [
249
247
  "dist/urls/index.d.ts"
@@ -1,26 +0,0 @@
1
- type Enumerate<N extends number,Acc extends number[]=[]>=Acc["length"] extends N?Acc[number]:Enumerate<N,[...Acc,Acc["length"]]>;
2
- /** --------------------------------------------------
3
- * * ***Generate a union type of numbers from `From` to `To` using enumeration.***
4
- * --------------------------------------------------
5
- *
6
- * @template From - Starting number of the range (inclusive).
7
- * @template To - Ending number of the range (inclusive).
8
- *
9
- * @description
10
- * Produces a **numeric union type** from `From` to `To` (inclusive),
11
- * using a simpler approach based on `Enumerate<N>` helper type.
12
- *
13
- * - ✅ Straightforward & easy to reason about.
14
- * - ⚠️ Still limited by TypeScript recursion depth (safe up to `999`).
15
- * - ⚙️ Best used for **smaller ranges** or when readability matters.
16
- *
17
- * @example
18
- * ```ts
19
- * type RangeX = NumberRangeUnion<3, 6>;
20
- * // ^? 3 | 4 | 5 | 6
21
- *
22
- * type RangeY = NumberRangeUnion<0, 2>;
23
- * // ^? 0 | 1 | 2
24
- * ```
25
- */
26
- type NumberRangeUnion<From extends number,To extends number>=From extends To?From:Exclude<Enumerate<To>,Enumerate<From>>extends never?never:Exclude<Enumerate<To>,Enumerate<From>>|To;export type{NumberRangeUnion as N};
@@ -1 +0,0 @@
1
- 'use strict';var chunk7YWAQOA4_cjs=require('./chunk-7YWAQOA4.cjs'),chunkCII6WWLO_cjs=require('./chunk-CII6WWLO.cjs');function I(o){return Object.prototype.toString.call(o)==="[object Map]"||o instanceof Map}var $=o=>o instanceof Date&&!chunkCII6WWLO_cjs.h(o.getTime());var v=(o,i={})=>{chunkCII6WWLO_cjs.j(i,{message:({currentType:r,validType:m})=>`Second parameter (\`options\`) must be of type \`${m}\`, but received: \`${r}\`.`});let y=chunkCII6WWLO_cjs.o(i,"pretty")?i.pretty:false,b=chunkCII6WWLO_cjs.o(i,"sortKeys")?i.sortKeys:true,S=chunkCII6WWLO_cjs.o(i,"sortArray")?i.sortArray:false;if(!chunkCII6WWLO_cjs.a(b)||!chunkCII6WWLO_cjs.a(S)||!chunkCII6WWLO_cjs.a(y))throw new TypeError(`Parameters \`sortKeys\`, \`sortArray\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${chunkCII6WWLO_cjs.E(b)}\`, 'sortArray': \`${chunkCII6WWLO_cjs.E(S)}\`, 'pretty': \`${chunkCII6WWLO_cjs.E(y)}\`]".`);let N=new WeakSet,B=r=>chunkCII6WWLO_cjs.i(r)||!chunkCII6WWLO_cjs.n(r)&&!chunkCII6WWLO_cjs.b(r),f=r=>{if(r instanceof Number)return Number(r);if(r instanceof String)return String(r);if(r instanceof Boolean)return !!r;if(!(chunkCII6WWLO_cjs.b(r)||chunkCII6WWLO_cjs.l(r))){if(chunk7YWAQOA4_cjs.a(r))return r.toString();if(chunkCII6WWLO_cjs.m(r)||chunkCII6WWLO_cjs.h(r)||r===1/0||r===-1/0)return null;if(chunkCII6WWLO_cjs.n(r)){if(N.has(r))return "[Circular]";if(N.add(r),$(r))return r.toISOString();if(I(r))return {map:Array.from(r.entries()).map(([e,t])=>[e,f(t)])};if(chunkCII6WWLO_cjs.q(r))return {set:Array.from(r.values()).map(f)};if(chunkCII6WWLO_cjs.d(r)){let e=r.map(f);if(S){let t=[],u=[];for(let n of e)B(n)?t.push(n):u.push(n);return t.sort((n,w)=>chunkCII6WWLO_cjs.k(n)&&chunkCII6WWLO_cjs.k(w)?n-w:String(n).localeCompare(String(w))),[...t,...u]}return e}let m=Object.keys(r);b&&m.sort((e,t)=>{let u=Number(e),n=Number(t);return !chunkCII6WWLO_cjs.h(u)&&!chunkCII6WWLO_cjs.h(n)?u-n:e.localeCompare(t)});let O={};if(chunkCII6WWLO_cjs.e(r))for(let e of m){let t=f(r[e]);chunkCII6WWLO_cjs.m(t)||(O[e]=t);}return O}return r}};try{return JSON.stringify(f(o),null,y?2:0)}catch(r){return console.warn("Error in safeStableStringify:",r),"{}"}};exports.a=I;exports.b=$;exports.c=v;
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkFIEZKTAZ_cjs=require('./chunk-FIEZKTAZ.cjs'),chunkUA4B7JBO_cjs=require('./chunk-UA4B7JBO.cjs'),chunkG7R5XZRM_cjs=require('./chunk-G7R5XZRM.cjs'),chunkQSQDP7L2_cjs=require('./chunk-QSQDP7L2.cjs'),chunkUTQUYABU_cjs=require('./chunk-UTQUYABU.cjs'),chunkBEZPD44N_cjs=require('./chunk-BEZPD44N.cjs'),chunk26W3VZIK_cjs=require('./chunk-26W3VZIK.cjs'),chunkCII6WWLO_cjs=require('./chunk-CII6WWLO.cjs');var ir=(r,t,e=false)=>{if(!(chunkCII6WWLO_cjs.d(r)&&chunkCII6WWLO_cjs.d(t)))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${chunkCII6WWLO_cjs.E(r)}\`, 'array2': \`${chunkCII6WWLO_cjs.E(t)}\`].`);if(chunkCII6WWLO_cjs.G(e,{message:({currentType:o,validType:n})=>`Third parameter \`ignoreOrder\` must be of type \`${n}\`, but received: \`${o}\`.`}),!chunkG7R5XZRM_cjs.d(r.length,t.length))return false;let s=o=>chunkCII6WWLO_cjs.d(o)?o.map(m=>chunkCII6WWLO_cjs.d(m)?s(m):m).sort((m,u)=>{let R=chunk26W3VZIK_cjs.c(m),C=chunk26W3VZIK_cjs.c(u);return R<C?-1:R>C?1:0}):o,i=e?s(r):r,a=e?s(t):t;return chunkG7R5XZRM_cjs.d(i.length,a.length)?i.every((o,n)=>chunk26W3VZIK_cjs.c(o)===chunk26W3VZIK_cjs.c(a[n])):false};var fr=(r,t)=>chunkG7R5XZRM_cjs.d(r,t);var ur=(r,t)=>{if(!chunkFIEZKTAZ_cjs.a(r)||!chunkFIEZKTAZ_cjs.a(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname==t.protocol+"//"+t.host+t.pathname};var yr=(r,t)=>{if(!chunkFIEZKTAZ_cjs.a(r)||!chunkFIEZKTAZ_cjs.a(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname+r.search==t.protocol+"//"+t.host+t.pathname+t.search};var Tr=(r,t,e={})=>{if(!chunkCII6WWLO_cjs.p(r)||!chunkCII6WWLO_cjs.d(t))return false;chunkCII6WWLO_cjs.j(e,{message:({currentType:n,validType:m})=>`Third parameter (\`options\`) must be of type \`${m}\`, but received: \`${n}\`.`});let{exactMatch:s=false,flags:i="i"}=e;chunkCII6WWLO_cjs.G(s,{message:({currentType:n,validType:m})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${m}\`, but received: \`${n}\`.`}),chunkBEZPD44N_cjs.a(i,{message:({currentType:n,validType:m})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${m}\`, but received: \`${n}\`.`});let a=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=t.filter(n=>chunkCII6WWLO_cjs.p(n)).map(a);return o.length===0?false:o.every(n=>{let m=s?`(?<!\\S)${n}(?!\\S)`:n;return new RegExp(m,i.includes("u")?i:i+"u").test(r)})};var Pr=(r,t,e={})=>{if(!chunkCII6WWLO_cjs.p(r)||!chunkCII6WWLO_cjs.d(t))return false;chunkCII6WWLO_cjs.j(e,{message:({currentType:m,validType:u})=>`Third parameter (\`options\`) must be of type \`${u}\`, but received: \`${m}\`.`});let{exactMatch:s=false,flags:i="i"}=e;chunkCII6WWLO_cjs.G(s,{message:({currentType:m,validType:u})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${u}\`, but received: \`${m}\`.`}),chunkBEZPD44N_cjs.a(i,{message:({currentType:m,validType:u})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${u}\`, but received: \`${m}\`.`});let a=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=t.filter(m=>chunkCII6WWLO_cjs.p(m)).map(a);if(o.length===0)return false;let n=s?`(?<!\\S)(${o.join("|")})(?!\\S)`:`(${o.join("|")})`;return new RegExp(n,i.includes("u")?i:i+"u").test(r)};function H(r){let t=typeof r;return t==="string"||t==="number"||t==="symbol"}var Z=(r,t)=>{if(!chunkCII6WWLO_cjs.n(r))return false;if(!H(t))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${chunkCII6WWLO_cjs.E(t)}\`.`);return Object.prototype.hasOwnProperty.call(r,t)?true:chunkCII6WWLO_cjs.d(r)?r.some(e=>Z(e,t)):Object.values(r).some(e=>chunkCII6WWLO_cjs.n(e)&&Z(e,t))};var Gr=(r,t)=>{if(!chunkCII6WWLO_cjs.d(r)||!chunkCII6WWLO_cjs.d(t)||chunkG7R5XZRM_cjs.e(r)||chunkG7R5XZRM_cjs.e(t))return false;let e=new Set(r);return t.some(s=>e.has(s))};var G=r=>Object.prototype.toString.call(r)==="[object Arguments]";function I(r){return typeof r=="number"&&r>-1&&Number.isInteger(r)&&r<=Number.MAX_SAFE_INTEGER}function nt(r){return !chunkCII6WWLO_cjs.b(r)&&chunkCII6WWLO_cjs.n(r)&&I(r?.length)}function ft(r){return chunkCII6WWLO_cjs.n(r)&&I(r.length)}var lt=r=>chunkCII6WWLO_cjs.g(r)||chunkCII6WWLO_cjs.k(r)?chunkQSQDP7L2_cjs.a(r.toString())!==0?true:r.toString().trim()==="0":false;var S=(r,t)=>{if(typeof r=="number"&&typeof t=="number"&&Number.isNaN(r)&&Number.isNaN(t)||r===t)return true;if(typeof r!=typeof t)return false;if(chunk26W3VZIK_cjs.b(r)&&chunk26W3VZIK_cjs.b(t))return r.getTime()===t.getTime();if(chunkG7R5XZRM_cjs.a(r)&&chunkG7R5XZRM_cjs.a(t)||chunkCII6WWLO_cjs.l(r)&&chunkCII6WWLO_cjs.l(t))return r.toString()===t.toString();if(chunkCII6WWLO_cjs.q(r)&&chunkCII6WWLO_cjs.q(t)){if(r.size!==t.size)return false;let e=Array.from(t),s=new Set;for(let i of r){let a=false;for(let o=0;o<e.length;o++)if(!s.has(o)&&S(i,e[o])){s.add(o),a=true;break}if(!a)return false}return true}if(chunk26W3VZIK_cjs.a(r)&&chunk26W3VZIK_cjs.a(t)){if(r.size!==t.size)return false;let e=Array.from(t),s=new Set;for(let[i,a]of r){let o=false;for(let n=0;n<e.length;n++){if(s.has(n))continue;let[m,u]=e[n];if(S(i,m)&&S(a,u)){s.add(n),o=true;break}}if(!o)return false}return true}if(chunkCII6WWLO_cjs.d(r)&&chunkCII6WWLO_cjs.d(t))return r.length!==t.length?false:r.every((e,s)=>S(e,t[s]));if(chunkCII6WWLO_cjs.n(r)&&chunkCII6WWLO_cjs.n(t)&&r&&t){if(chunkCII6WWLO_cjs.d(r)!==chunkCII6WWLO_cjs.d(t))return false;let e=Object.keys(r),s=Object.keys(t);return e.length!==s.length?false:e.every(i=>S(r[i],t[i]))}return false};function Ot(r){return !!r&&typeof r=="object"&&r?.nodeType===1&&!chunkCII6WWLO_cjs.f(r)}function vt(r){return chunkCII6WWLO_cjs.c(r)||chunkCII6WWLO_cjs.a(r)||chunkCII6WWLO_cjs.k(r,{includeNaN:true})||chunkCII6WWLO_cjs.l(r)?true:chunkCII6WWLO_cjs.b(r)?Object.keys(r).length===0:chunkCII6WWLO_cjs.g(r)||chunkCII6WWLO_cjs.d(r)||G(r)||chunkUA4B7JBO_cjs.b(r)?r.length===0:chunk26W3VZIK_cjs.a(r)||chunkCII6WWLO_cjs.q(r)?r.size===0:chunkCII6WWLO_cjs.D(r)?r.length===0:chunkCII6WWLO_cjs.f(r)?Object.keys(r).length===0:false}var X=r=>{if(chunkCII6WWLO_cjs.g(r))return chunkUTQUYABU_cjs.a(r);if(chunkCII6WWLO_cjs.k(r))return chunkCII6WWLO_cjs.h(r);if(chunkCII6WWLO_cjs.d(r))return chunkG7R5XZRM_cjs.e(r)||r.every(X);if(chunkCII6WWLO_cjs.n(r)){let t=Object.keys(r),e=Object.getOwnPropertySymbols(r);return t.length===0&&e.length===0?true:[...t,...e].every(s=>X(r[s]))}return !r};function Bt(r,t,e){return chunkG7R5XZRM_cjs.c(r,t,e,new WeakMap)}function B(r,t,e){return M(r,t,e)}function J(r,t){return r===t||r===0&&t===0||Number.isNaN(r)&&Number.isNaN(t)}function M(r,t,e){if(r===t)return true;if(!chunkCII6WWLO_cjs.n(t))return J(r,t);if(!chunkCII6WWLO_cjs.n(r))return false;let s=Reflect.ownKeys(t).filter(i=>!(chunkCII6WWLO_cjs.d(t)&&i==="length"));for(let i of s){if(!(i in r))return false;let a=r[i],o=t[i],n=e?.(a,o,i,r,t);if(!chunkCII6WWLO_cjs.m(n)){if(!n)return false;continue}if(chunkCII6WWLO_cjs.n(a)&&chunkCII6WWLO_cjs.n(o)){if(!B(a,o,e))return false}else if(!J(a,o))return false}return true}function se(r,t){return M(r,t)}var Q=Function.prototype.toString,Y=/\{\s*\[native code\]\s*\}/;function pe(r){if(!chunkCII6WWLO_cjs.b(r))return false;try{let t=Q.call(r);return Y.test(t)}catch{return false}}function ye(r){return !chunkCII6WWLO_cjs.c(r)&&(chunkCII6WWLO_cjs.n(r)||chunkCII6WWLO_cjs.b(r))}function be(r){return typeof r=="number"&&Number.isSafeInteger(r)}var de=r=>{if(!chunkCII6WWLO_cjs.p(r))return false;let t;try{t=decodeURIComponent(r);}catch{return false}return !t.startsWith("http://")&&!t.startsWith("https://")?false:new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(t)};function Ae(r){return chunkCII6WWLO_cjs.e(r)&&!chunkCII6WWLO_cjs.i(r)&&r instanceof WeakMap}
2
- exports.a=ir;exports.b=fr;exports.c=ur;exports.d=yr;exports.e=Tr;exports.f=Pr;exports.g=H;exports.h=Z;exports.i=Gr;exports.j=G;exports.k=I;exports.l=nt;exports.m=ft;exports.n=lt;exports.o=S;exports.p=Ot;exports.q=vt;exports.r=X;exports.s=Bt;exports.t=B;exports.u=se;exports.v=pe;exports.w=ye;exports.x=be;exports.y=de;exports.z=Ae;
@@ -1 +0,0 @@
1
- import {k,g as g$1,E,p}from'./chunk-EWYPSKKM.js';var g=(r,t,o)=>{if(!k(r)||!g$1(o)||!g$1(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': \`${E(r)}\`, 'originalString': \`${E(t)}\`, 'replaceTo': \`${E(o)}\`]".`);if(r<0||r>=t.length)throw new RangeError("First parameter (`index`) is out of range from second parameter (`originalString`).");return t.slice(0,r)+o+t.slice(r+1)},u=r=>{if(!p(r))return "";r=r.replace(/\s+/g," ").trim();let t=r.split(" ");return t.length>1?t[0][0]+t[1][0].toUpperCase():r.length>1?r.substring(0,2).toUpperCase():r[0].toUpperCase()};export{g as a,u as b};
@@ -1 +0,0 @@
1
- import {p as p$1}from'./chunk-EWYPSKKM.js';var i=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),p=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]),o=e=>{if(!p$1(e))return;let s=e.split("/").pop();if(s==="")return "";if(s){for(let t of p){let a=`.${t}`;if(s.toLowerCase().endsWith(a))return s.slice(0,-a.length)}for(;;){let t=s.lastIndexOf(".");if(t===-1)break;let a=s.slice(t+1).toLowerCase();if(i.has(a))s=s.slice(0,t);else break}return s}};export{o as a};
@@ -1 +0,0 @@
1
- var e=()=>typeof window>"u"||typeof document>"u";export{e as a};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-ELDDNERR.js';import {c}from'./chunk-J4NCYYGS.js';import {r,E as E$1,k,f,G,h}from'./chunk-EWYPSKKM.js';function E(e){if(!r(e))return;let n=Math.floor(Math.random()*(e.length||0));return e[n]}var d=(e,n)=>{if(!a(e)||!a(n))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${N(e,n)}value, but received: ['min': \`${E$1(e)}\` - (with value: \`${c(e)})\`, 'max': \`${E$1(n)}\` - (with value: \`${c(n)}\`)].`);if(e>n)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${I(e)}, 'max': ${I(n)}].`);return e=Math.max(1,e),n=Math.min(Number.MAX_SAFE_INTEGER,n),Math.floor(Math.random()*(n-e+1))+e},I=e=>k(e,{includeNaN:true})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${E$1(e)}\``,N=(...e)=>e.some(n=>k(n,{includeNaN:true})&&n===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ";var _=e=>{f(e)||(e={});let{minLength:n=1,maxLength:r=16,avoidZero:o=false}=e;if(G(o,{message({currentType:y,validType:c}){return `Parameters \`avoidZero\` must be of type \`${c}\`, but received: \`${y}\`.`}}),!a(n)||!a(r))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${E$1(n)}\` - (with value: ${c(n)}), 'maxLength': \`${E$1(r)}\` - (with value: ${c(r)})].`);if(n<1||r>16||n>r)throw new RangeError(`Invalid range at parameters \`minLength\` must be \u2265 1, \`maxLength\` must be \u2264 16, and \`minLength\` \u2264 \`maxLength\`, but received: ['minLength': \`${n}\`, 'maxLength': \`${r}\`].`);let u=n===r?n:d(n,r),s=10**(u-1),l=10**u-1,f$1=d(s,l);return o&&f$1===0&&(f$1=s),f$1};var Y=e=>{f(e)||(e={});let{minLength:n=40,maxLength:r=40,type:o="string",avoidWhiteSpace:u=true}=e;if(G(u,{message({currentType:m,validType:L}){return `Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${L}\`, but received: \`${m}\`.`}}),!a(n)||!a(r))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${E$1(n)}\` - (with value: ${c(n)}), 'maxLength': \`${E$1(r)}\` - (with value: ${c(r)})].`);if(n<1||r>5e3||n>r)throw new RangeError(`Invalid range at parameters \`minLength\` must be \u2265 1, \`maxLength\` must be \u2264 5000, and \`minLength\` \u2264 \`maxLength\`, but received: ['minLength': \`${n}\`, 'maxLength': \`${r}\`].`);if(o!=="string"&&o!=="number")throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${E$1(o)}\`, with value: ${c(o)}.`);let s=d(n,r),l=m=>u?m.replace(/\s|\n|\t/g,""):m,c$1=o==="number"?(h(Number(e.replaceGenInt))?void 0:e.replaceGenInt)??"0123456789":(e.replaceGenStr?e.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",g=l(c$1)+(e.addChar||"");if(!g.length){let m=()=>o==="number"?u?"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.";throw new Error(`Character set is empty. ${m()}`)}let x="";for(let m=0;m<s;m++)x+=g.charAt(Math.floor(Math.random()*g.length));return x};export{E as a,d as b,_ as c,Y as d};
@@ -1 +0,0 @@
1
- var i=n=>typeof n=="bigint";export{i as a};
@@ -1 +0,0 @@
1
- import {p}from'./chunk-EWYPSKKM.js';var r=(n,o={})=>!p(n,o);export{r as a};
@@ -1 +0,0 @@
1
- import {e,f}from'./chunk-LQ76EDZG.js';import {a}from'./chunk-7CHFAMS2.js';import {j,o,G,c,h,g,d,e as e$1}from'./chunk-EWYPSKKM.js';var P=(r,t={})=>{j(t,{message:({currentType:o,validType:e})=>`Second parameter (\`options\`) must be of type \`${e}\`, but received: \`${o}\`.`});let m=o(t,"checkSymbols")?t.checkSymbols:false;return G(m,{message:({currentType:o,validType:e})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${e}\`, but received: \`${o}\`.`}),c(r)||r===false||h(r)?true:g(r)?a(r):d(r)?e(r):e$1(r)?f(r,{checkSymbols:m}):false};export{P as a};
@@ -1 +0,0 @@
1
- 'use strict';var chunkFIEZKTAZ_cjs=require('./chunk-FIEZKTAZ.cjs'),chunkXGZ6K753_cjs=require('./chunk-XGZ6K753.cjs'),chunkZQOLZE6Z_cjs=require('./chunk-ZQOLZE6Z.cjs'),chunkUQDJF5RR_cjs=require('./chunk-UQDJF5RR.cjs'),chunkMROH35V3_cjs=require('./chunk-MROH35V3.cjs'),chunkUTQUYABU_cjs=require('./chunk-UTQUYABU.cjs'),chunk26W3VZIK_cjs=require('./chunk-26W3VZIK.cjs'),chunkCII6WWLO_cjs=require('./chunk-CII6WWLO.cjs');var A=(t,e,o)=>{if(chunkCII6WWLO_cjs.g(t)){if(chunkUTQUYABU_cjs.a(t))throw new TypeError("First parameter (`baseUrl`) cannot be an empty-string.");t=chunkMROH35V3_cjs.b(t);}else if(!chunkFIEZKTAZ_cjs.a(t))throw new TypeError(`First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${chunkCII6WWLO_cjs.E(t)}\`, with current value: \`${chunk26W3VZIK_cjs.c(t)}\`.`);if(!chunkCII6WWLO_cjs.m(o)&&(chunkUQDJF5RR_cjs.a(o,{message:({currentType:r,validType:n})=>`Third parameter (\`removeParams\`) must be of type \`${n} of strings\`, but received: \`${r}\`.`}),!o.every(r=>chunkCII6WWLO_cjs.p(r))))throw new TypeError("Third parameter (`removeParams`) must be of type `array` and contains `string` only and non empty-string.");try{if(!chunkCII6WWLO_cjs.m(e)&&!chunkCII6WWLO_cjs.b(e[Symbol.iterator]))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${chunkCII6WWLO_cjs.E(e)}\`, with value: \`${chunk26W3VZIK_cjs.c(e)}\`.`);let r=new URL(t);if(!chunkCII6WWLO_cjs.m(e)){let n=Object.fromEntries(e);if(!chunkZQOLZE6Z_cjs.a(n)){let i=new URLSearchParams(r.search);for(let[s,f]of Object.entries(n)){if(!chunkCII6WWLO_cjs.p(f)&&!chunkCII6WWLO_cjs.k(f,{includeNaN:!0}))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${chunkCII6WWLO_cjs.E(e)}\`, with value: \`${chunk26W3VZIK_cjs.c(e)}\`.`);i.set(s,String(f));}o?.length&&chunkXGZ6K753_cjs.d(o).map(s=>{i.delete(s);}),r.search=i.toString();}}return o?.forEach(n=>r.searchParams.delete(n)),r}catch(r){throw chunkCII6WWLO_cjs.C(r)?r:new Error("Failed to construct a valid URL in `constructURL()`, Error:"+r)}};var C=t=>{if(!chunkCII6WWLO_cjs.p(t))return null;let e;try{e=decodeURIComponent(t);}catch{return null}let o=/https?:\/\/.*?(?=https?:\/\/|\s|$)/g,r=e.match(o);if(!r)return null;let n=r.map(i=>i.replace(/[.,;:!?)]*$/,"")).filter(i=>{try{let s=new URL(i);return s.protocol==="http:"||s.protocol==="https:"}catch{return false}});return n.length?n:null};exports.a=A;exports.b=C;
@@ -1 +0,0 @@
1
- import {p}from'./chunk-EWYPSKKM.js';var h=i=>{if(!p(i))return 0;let l=i.trim().replace(/\u00A0/g,"").replace(/\u202F/g,""),s=false;/^\(.*\)$/.test(l)&&(s=true,l=l.slice(1,-1).trim()),l=l.replace(/^[-\s]+/,a=>a.includes("-")?"-":"").replace(/[\s.,-]+$/,""),s=s||/^-/.test(l)||/^[^\d]*-/.test(l);let e=l.replace(/[^0-9.,'\s]/g,"").replace(/[\s']/g,""),o=e.match(/,\d{2}/g);if(o&&o.length>1)e=e.replace(/,/g,"");else {let a=(e.match(/\./g)||[]).length,p=(e.match(/,/g)||[]).length;if(a>1&&p===0)e=e.replace(/\./g,"");else if(p>1&&a===0)e=e.replace(/,/g,"");else {let t=e.lastIndexOf(","),c=e.lastIndexOf(".");if(t>c)e=e.replace(/\./g,"").replace(",",".");else if(c>t)e=e.replace(/,/g,"");else if(t>c){let n=e.slice(0,t).replace(/,/g,"").replace(/\./g,""),r=e.slice(t+1);e=n+"."+r;}else if(c>t){let n=e.slice(0,c).replace(/\./g,"").replace(/,/g,""),r=e.slice(c+1);e=n+"."+r;}else t!==-1?e=e.replace(/,/g,""):c!==-1&&(e=e.replace(/\./g,""));}}let g=parseFloat(e)||0;return s?-g:g};export{h as a};
@@ -1 +0,0 @@
1
- 'use strict';var i=n=>typeof n=="bigint";exports.a=i;
@@ -1 +0,0 @@
1
- 'use strict';var chunkCII6WWLO_cjs=require('./chunk-CII6WWLO.cjs');var p=(s,t={})=>{if(chunkCII6WWLO_cjs.g(s))return;let n=chunkCII6WWLO_cjs.F({value:s,options:t,requiredValidType:"string"});throw new TypeError(n)};exports.a=p;
@@ -1 +0,0 @@
1
- import {a}from'./chunk-5SZUSNGZ.js';import {F,o,k}from'./chunk-EWYPSKKM.js';var I=(r,s={})=>{if(a(r))return;let o=F({value:r,options:s,requiredValidType:"big int"});throw new TypeError(o)};var O=(r,s={})=>{let o$1=o(s,"includeNaN")?s.includeNaN:void 0;if(k(r,{includeNaN:o$1}))return;let p=F({value:r,options:s,requiredValidType:"number"});throw new TypeError(p)};export{I as a,O as b};