@rzl-zone/utils-js 3.13.1 → 3.14.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 (281) hide show
  1. package/README.md +7 -6
  2. package/dist/.references/index.d.cts +2 -1
  3. package/dist/.references/index.d.ts +2 -1
  4. package/dist/AbortError-CgE6QNOR.js +20 -0
  5. package/dist/AbortError-CgE6QNOR.js.map +1 -0
  6. package/dist/AbortError-D54txsmn.cjs +26 -0
  7. package/dist/AbortError-D54txsmn.cjs.map +1 -0
  8. package/dist/{assertIsArray-HgzPQIAM.js → assertIsArray-DmlqnTiq.js} +3 -3
  9. package/dist/assertIsArray-DmlqnTiq.js.map +1 -0
  10. package/dist/{assertIsArray-CeXL4xv5.cjs → assertIsArray-Xx-zlo6O.cjs} +5 -5
  11. package/dist/assertIsArray-Xx-zlo6O.cjs.map +1 -0
  12. package/dist/assertIsPlainObject-CIzDchLs.js +20 -0
  13. package/dist/assertIsPlainObject-CIzDchLs.js.map +1 -0
  14. package/dist/assertIsPlainObject-DYoxHcW5.cjs +26 -0
  15. package/dist/assertIsPlainObject-DYoxHcW5.cjs.map +1 -0
  16. package/dist/{assertIsString-DUrVt82d.cjs → assertIsString-CuPbh3FB.cjs} +6 -6
  17. package/dist/assertIsString-CuPbh3FB.cjs.map +1 -0
  18. package/dist/{assertIsString-CY_WkCLr.js → assertIsString-sgY3ml5f.js} +4 -4
  19. package/dist/assertIsString-sgY3ml5f.js.map +1 -0
  20. package/dist/assertions/index.cjs +14 -12
  21. package/dist/assertions/index.cjs.map +1 -1
  22. package/dist/assertions/index.d.cts +2 -2
  23. package/dist/assertions/index.d.ts +2 -2
  24. package/dist/assertions/index.js +10 -8
  25. package/dist/assertions/index.js.map +1 -1
  26. package/dist/conversions/index.cjs +6 -6
  27. package/dist/conversions/index.d.cts +2 -2
  28. package/dist/conversions/index.d.ts +2 -2
  29. package/dist/conversions/index.js +6 -6
  30. package/dist/{conversions-1s7xMBe_.js → conversions-BkxqYXxy.js} +43 -40
  31. package/dist/conversions-BkxqYXxy.js.map +1 -0
  32. package/dist/conversions-UdMB90xR.cjs +449 -0
  33. package/dist/conversions-UdMB90xR.cjs.map +1 -0
  34. package/dist/errors/index.cjs +13 -0
  35. package/dist/errors/index.d.cts +180 -0
  36. package/dist/errors/index.d.ts +180 -0
  37. package/dist/errors/index.js +11 -0
  38. package/dist/events/index.cjs +10 -9
  39. package/dist/events/index.cjs.map +1 -1
  40. package/dist/events/index.d.cts +185 -100
  41. package/dist/events/index.d.ts +185 -100
  42. package/dist/events/index.js +9 -8
  43. package/dist/events/index.js.map +1 -1
  44. package/dist/formatter-BFgV1HhV-BtIJs2H2.js +55 -0
  45. package/dist/formatter-BFgV1HhV-BtIJs2H2.js.map +1 -0
  46. package/dist/formatter-BFgV1HhV-DyybWSuj.cjs +67 -0
  47. package/dist/formatter-BFgV1HhV-DyybWSuj.cjs.map +1 -0
  48. package/dist/formatters/index.cjs +2 -2
  49. package/dist/formatters/index.d.cts +2 -2
  50. package/dist/formatters/index.d.ts +2 -2
  51. package/dist/formatters/index.js +2 -2
  52. package/dist/formatters-Cjng28nY.cjs +436 -0
  53. package/dist/formatters-Cjng28nY.cjs.map +1 -0
  54. package/dist/{formatters-C6cVZBbG.js → formatters-Dqccnt-p.js} +78 -71
  55. package/dist/formatters-Dqccnt-p.js.map +1 -0
  56. package/dist/generators/index.cjs +37 -31
  57. package/dist/generators/index.cjs.map +1 -1
  58. package/dist/generators/index.d.cts +2 -2
  59. package/dist/generators/index.d.ts +2 -2
  60. package/dist/generators/index.js +29 -23
  61. package/dist/generators/index.js.map +1 -1
  62. package/dist/hasOwnProp-DTWYqy7S.cjs +53 -0
  63. package/dist/hasOwnProp-DTWYqy7S.cjs.map +1 -0
  64. package/dist/hasOwnProp-yVVsxPin.js +47 -0
  65. package/dist/hasOwnProp-yVVsxPin.js.map +1 -0
  66. package/dist/{index-BG8wdusZ.d.cts → index-9Ql1W3gt.d.cts} +229 -200
  67. package/dist/{index-RNQBTK8A.d.cts → index-BD0J8wkE.d.cts} +1374 -936
  68. package/dist/index-BcoUy2oV.d.ts +2424 -0
  69. package/dist/{index-B5EBAgmC.d.cts → index-Bpk3YwGW.d.ts} +1592 -790
  70. package/dist/index-CTMG8cZV.d.ts +1041 -0
  71. package/dist/index-DUBCXPy4.d.cts +1041 -0
  72. package/dist/{index-CRz9rSZL.d.ts → index-DhUTzQ_o.d.ts} +1374 -936
  73. package/dist/{index-B1VQ6USF.d.ts → index-DqYMKSmd.d.ts} +229 -200
  74. package/dist/index-JfwSupYB.d.ts +1103 -0
  75. package/dist/{index-ORbo-7zA.d.cts → index-O2q2f-pu.d.cts} +242 -133
  76. package/dist/{index-DPJ-e2JZ.d.ts → index-VgNZ6ndx.d.cts} +1592 -790
  77. package/dist/{index-ORbo-7zA.d.ts → index-k_rjVRjU.d.ts} +242 -133
  78. package/dist/index-or0oP9i2.d.cts +2179 -0
  79. package/dist/index-or0oP9i2.d.ts +2179 -0
  80. package/dist/index-u4-Euidh.d.cts +1103 -0
  81. package/dist/index-zAqCZxGr.d.cts +2424 -0
  82. package/dist/{isBigInt-y7s3rsKc.js → isBigInt-DdFRCpeE.js} +2 -2
  83. package/dist/isBigInt-DdFRCpeE.js.map +1 -0
  84. package/dist/{isBigInt-BVj0M5pq.cjs → isBigInt-LkCpVJ3E.cjs} +2 -2
  85. package/dist/isBigInt-LkCpVJ3E.cjs.map +1 -0
  86. package/dist/{isEmptyString-BYMz_wt9.js → isEmptyString-B6ubItgT.js} +4 -4
  87. package/dist/isEmptyString-B6ubItgT.js.map +1 -0
  88. package/dist/{isEmptyString-C8PYNPgw.cjs → isEmptyString-Csc5Sf_W.cjs} +5 -5
  89. package/dist/isEmptyString-Csc5Sf_W.cjs.map +1 -0
  90. package/dist/isEmptyValue-h97JT4pD.js +36 -0
  91. package/dist/isEmptyValue-h97JT4pD.js.map +1 -0
  92. package/dist/isEmptyValue-qNOhUBFE.cjs +54 -0
  93. package/dist/isEmptyValue-qNOhUBFE.cjs.map +1 -0
  94. package/dist/{isFinite-DeDaBDr2.cjs → isFinite-CKeuVXbD.cjs} +6 -6
  95. package/dist/isFinite-CKeuVXbD.cjs.map +1 -0
  96. package/dist/{isFinite-BEJFOv6B.js → isFinite-CzYYv-mQ.js} +5 -5
  97. package/dist/isFinite-CzYYv-mQ.js.map +1 -0
  98. package/dist/{isInteger-DEDbBGez.js → isInteger-BtA3flbk.js} +4 -4
  99. package/dist/isInteger-BtA3flbk.js.map +1 -0
  100. package/dist/{isInteger-CQLThJOR.cjs → isInteger-iTok9NaH.cjs} +4 -4
  101. package/dist/isInteger-iTok9NaH.cjs.map +1 -0
  102. package/dist/isNumber-C1mOuBuA.js +20 -0
  103. package/dist/isNumber-C1mOuBuA.js.map +1 -0
  104. package/dist/isNumber-CM1vdNcW.cjs +26 -0
  105. package/dist/isNumber-CM1vdNcW.cjs.map +1 -0
  106. package/dist/isPlainObject-DQoM4DGQ.d.ts +331 -0
  107. package/dist/isPlainObject-Y__iykWN.d.cts +331 -0
  108. package/dist/{isServer-DmycqWsF.cjs → isServer-CWlp2R2N.cjs} +2 -2
  109. package/dist/isServer-CWlp2R2N.cjs.map +1 -0
  110. package/dist/{isServer-q3o6cSwD.js → isServer-Drgyboev.js} +2 -2
  111. package/dist/isServer-Drgyboev.js.map +1 -0
  112. package/dist/{isEqual-DM4S_kWh.js → isTypedArray-BY8CIj3k.js} +29 -9
  113. package/dist/isTypedArray-BY8CIj3k.js.map +1 -0
  114. package/dist/{isEqual-DaPDxMyw.cjs → isTypedArray-DspIjxdk.cjs} +45 -13
  115. package/dist/isTypedArray-DspIjxdk.cjs.map +1 -0
  116. package/dist/{isValidDomain-B8Nukgw0.js → isValidDomain-BPfJEkFk.js} +13 -54
  117. package/dist/isValidDomain-BPfJEkFk.js.map +1 -0
  118. package/dist/{isValidDomain-ZbyeGOO9.cjs → isValidDomain-DUUCoKtD.cjs} +16 -69
  119. package/dist/isValidDomain-DUUCoKtD.cjs.map +1 -0
  120. package/dist/{assertIsBoolean-D41HrTB_.cjs → logger-BXg2xufj.cjs} +658 -612
  121. package/dist/logger-BXg2xufj.cjs.map +1 -0
  122. package/dist/{assertIsBoolean-CWUs-I5l.js → logger-Wxl_Krg6.js} +657 -587
  123. package/dist/logger-Wxl_Krg6.js.map +1 -0
  124. package/dist/{noop-BY43WaoU.cjs → noop-ByxeOveJ.cjs} +2 -2
  125. package/dist/noop-ByxeOveJ.cjs.map +1 -0
  126. package/dist/{noop-CjY8xVHv.js → noop-D8aGbjbP.js} +2 -2
  127. package/dist/noop-D8aGbjbP.js.map +1 -0
  128. package/dist/{normalizeSpaces-BhZp0U_6.cjs → normalizeSpaces-CQ7tZLNG.cjs} +6 -9
  129. package/dist/normalizeSpaces-CQ7tZLNG.cjs.map +1 -0
  130. package/dist/{normalizeSpaces-BoUDtq5P.js → normalizeSpaces-DNUOxp_8.js} +4 -7
  131. package/dist/normalizeSpaces-DNUOxp_8.js.map +1 -0
  132. package/dist/operations/index.cjs +152 -22
  133. package/dist/operations/index.cjs.map +1 -1
  134. package/dist/operations/index.d.cts +257 -35
  135. package/dist/operations/index.d.ts +257 -35
  136. package/dist/operations/index.js +142 -13
  137. package/dist/operations/index.js.map +1 -1
  138. package/dist/parsers/index.cjs +2 -2
  139. package/dist/parsers/index.d.cts +238 -180
  140. package/dist/parsers/index.d.ts +238 -180
  141. package/dist/parsers/index.js +2 -2
  142. package/dist/{parsers-B_FPX35n.cjs → parsers-CJ5tHtqF.cjs} +10 -9
  143. package/dist/parsers-CJ5tHtqF.cjs.map +1 -0
  144. package/dist/{parsers-B8KYXIjE.js → parsers-DMlqliPw.js} +9 -8
  145. package/dist/parsers-DMlqliPw.js.map +1 -0
  146. package/dist/{parsing-BCZGco7n.cjs → parsing-DB_S0WFz.cjs} +4 -4
  147. package/dist/parsing-DB_S0WFz.cjs.map +1 -0
  148. package/dist/{parsing-Bfaw85Hd.js → parsing-DhIQhWpX.js} +3 -3
  149. package/dist/parsing-DhIQhWpX.js.map +1 -0
  150. package/dist/predicates/index.cjs +43 -43
  151. package/dist/predicates/index.d.cts +3 -3
  152. package/dist/predicates/index.d.ts +3 -3
  153. package/dist/predicates/index.js +14 -14
  154. package/dist/{predicates-KlyOvBSC.js → predicates-BzYMbNrZ.js} +45 -40
  155. package/dist/predicates-BzYMbNrZ.js.map +1 -0
  156. package/dist/{predicates-8y28VrbT.cjs → predicates-DDW3etqF.cjs} +89 -84
  157. package/dist/predicates-DDW3etqF.cjs.map +1 -0
  158. package/dist/promises/index.cjs +27 -26
  159. package/dist/promises/index.cjs.map +1 -1
  160. package/dist/promises/index.d.cts +227 -75
  161. package/dist/promises/index.d.ts +227 -75
  162. package/dist/promises/index.js +27 -26
  163. package/dist/promises/index.js.map +1 -1
  164. package/dist/{punyCode-DnKi0qjS.cjs → punyCode-B_VPjG0d.cjs} +12 -12
  165. package/dist/punyCode-B_VPjG0d.cjs.map +1 -0
  166. package/dist/{punyCode-Dwto1RpA.js → punyCode-DsuJbWCl.js} +12 -12
  167. package/dist/punyCode-DsuJbWCl.js.map +1 -0
  168. package/dist/{removeSpaces--8NW-HSx.js → removeSpaces-BF-T_1Yt.js} +4 -4
  169. package/dist/removeSpaces-BF-T_1Yt.js.map +1 -0
  170. package/dist/{removeSpaces-CmrrkeXz.cjs → removeSpaces-BJu-gKps.cjs} +7 -7
  171. package/dist/removeSpaces-BJu-gKps.cjs.map +1 -0
  172. package/dist/rzl-utils.global.js +13 -13
  173. package/dist/safeJsonParse-B5F8XtrZ.cjs +209 -0
  174. package/dist/safeJsonParse-B5F8XtrZ.cjs.map +1 -0
  175. package/dist/{safeJsonParse-OnUwG2El.js → safeJsonParse-DYSkUnhM.js} +29 -28
  176. package/dist/safeJsonParse-DYSkUnhM.js.map +1 -0
  177. package/dist/{safeStableStringify-B2KTTS3r.js → safeStableStringify-CDSYnLUz.js} +20 -13
  178. package/dist/safeStableStringify-CDSYnLUz.js.map +1 -0
  179. package/dist/safeStableStringify-MuBiT-4B.cjs +125 -0
  180. package/dist/safeStableStringify-MuBiT-4B.cjs.map +1 -0
  181. package/dist/strings/index.cjs +26 -30
  182. package/dist/strings/index.cjs.map +1 -1
  183. package/dist/strings/index.d.cts +2 -2
  184. package/dist/strings/index.d.ts +2 -2
  185. package/dist/strings/index.js +13 -17
  186. package/dist/strings/index.js.map +1 -1
  187. package/dist/tailwind/index.cjs +3 -3
  188. package/dist/tailwind/index.d.cts +3 -3
  189. package/dist/tailwind/index.d.ts +3 -3
  190. package/dist/tailwind/index.js +3 -3
  191. package/dist/{tailwind-CUdmv-oO.js → tailwind-BhHULklj.js} +38 -32
  192. package/dist/tailwind-BhHULklj.js.map +1 -0
  193. package/dist/{tailwind-DUuboq52.cjs → tailwind-hx6TIFIL.cjs} +59 -53
  194. package/dist/tailwind-hx6TIFIL.cjs.map +1 -0
  195. package/dist/{toStringArrayUnRecursive-OOHGazks.js → toStringArrayUnRecursive-U-nkEIDs.js} +9 -9
  196. package/dist/toStringArrayUnRecursive-U-nkEIDs.js.map +1 -0
  197. package/dist/toStringArrayUnRecursive-_lJEmBlf.cjs +51 -0
  198. package/dist/toStringArrayUnRecursive-_lJEmBlf.cjs.map +1 -0
  199. package/dist/urls/index.cjs +3 -3
  200. package/dist/urls/index.d.cts +635 -443
  201. package/dist/urls/index.d.ts +635 -443
  202. package/dist/urls/index.js +3 -3
  203. package/dist/{urls-BXT4Krsq.js → urls-BcGIFgfR.js} +50 -41
  204. package/dist/urls-BcGIFgfR.js.map +1 -0
  205. package/dist/urls-DGvZsMSN.cjs +308 -0
  206. package/dist/urls-DGvZsMSN.cjs.map +1 -0
  207. package/package.json +6 -6
  208. package/dist/assertIsArray-CeXL4xv5.cjs.map +0 -1
  209. package/dist/assertIsArray-HgzPQIAM.js.map +0 -1
  210. package/dist/assertIsBoolean-CWUs-I5l.js.map +0 -1
  211. package/dist/assertIsBoolean-D41HrTB_.cjs.map +0 -1
  212. package/dist/assertIsString-CY_WkCLr.js.map +0 -1
  213. package/dist/assertIsString-DUrVt82d.cjs.map +0 -1
  214. package/dist/conversions-1s7xMBe_.js.map +0 -1
  215. package/dist/conversions-B3Rf8uId.cjs +0 -446
  216. package/dist/conversions-B3Rf8uId.cjs.map +0 -1
  217. package/dist/formatters-C6cVZBbG.js.map +0 -1
  218. package/dist/formatters-aEAAuzjx.cjs +0 -429
  219. package/dist/formatters-aEAAuzjx.cjs.map +0 -1
  220. package/dist/index-CPCt6_Wq.d.cts +0 -765
  221. package/dist/index-CPCt6_Wq.d.ts +0 -765
  222. package/dist/index-DBwNa1iO.d.ts +0 -947
  223. package/dist/index-DPTYOQkn.d.cts +0 -947
  224. package/dist/index-Dig1fIhZ.d.cts +0 -1716
  225. package/dist/index-Dig1fIhZ.d.ts +0 -1716
  226. package/dist/isBigInt-BVj0M5pq.cjs.map +0 -1
  227. package/dist/isBigInt-y7s3rsKc.js.map +0 -1
  228. package/dist/isEmptyObject-BsHngDz4.cjs +0 -37
  229. package/dist/isEmptyObject-BsHngDz4.cjs.map +0 -1
  230. package/dist/isEmptyObject-DPGR9iPj.js +0 -25
  231. package/dist/isEmptyObject-DPGR9iPj.js.map +0 -1
  232. package/dist/isEmptyString-BYMz_wt9.js.map +0 -1
  233. package/dist/isEmptyString-C8PYNPgw.cjs.map +0 -1
  234. package/dist/isEmptyValue-BXf7f1jz.cjs +0 -30
  235. package/dist/isEmptyValue-BXf7f1jz.cjs.map +0 -1
  236. package/dist/isEmptyValue-D4OHTB3u.js +0 -24
  237. package/dist/isEmptyValue-D4OHTB3u.js.map +0 -1
  238. package/dist/isEqual-DM4S_kWh.js.map +0 -1
  239. package/dist/isEqual-DaPDxMyw.cjs.map +0 -1
  240. package/dist/isFinite-BEJFOv6B.js.map +0 -1
  241. package/dist/isFinite-DeDaBDr2.cjs.map +0 -1
  242. package/dist/isInteger-CQLThJOR.cjs.map +0 -1
  243. package/dist/isInteger-DEDbBGez.js.map +0 -1
  244. package/dist/isPlainObject-BwTkj3G0.d.cts +0 -339
  245. package/dist/isPlainObject-BwTkj3G0.d.ts +0 -339
  246. package/dist/isServer-DmycqWsF.cjs.map +0 -1
  247. package/dist/isServer-q3o6cSwD.js.map +0 -1
  248. package/dist/isTypedArray-BQLbLXsU.cjs +0 -43
  249. package/dist/isTypedArray-BQLbLXsU.cjs.map +0 -1
  250. package/dist/isTypedArray-XiBnifLN.js +0 -31
  251. package/dist/isTypedArray-XiBnifLN.js.map +0 -1
  252. package/dist/isValidDomain-B8Nukgw0.js.map +0 -1
  253. package/dist/isValidDomain-ZbyeGOO9.cjs.map +0 -1
  254. package/dist/noop-BY43WaoU.cjs.map +0 -1
  255. package/dist/noop-CjY8xVHv.js.map +0 -1
  256. package/dist/normalizeSpaces-BhZp0U_6.cjs.map +0 -1
  257. package/dist/normalizeSpaces-BoUDtq5P.js.map +0 -1
  258. package/dist/parsers-B8KYXIjE.js.map +0 -1
  259. package/dist/parsers-B_FPX35n.cjs.map +0 -1
  260. package/dist/parsing-BCZGco7n.cjs.map +0 -1
  261. package/dist/parsing-Bfaw85Hd.js.map +0 -1
  262. package/dist/predicates-8y28VrbT.cjs.map +0 -1
  263. package/dist/predicates-KlyOvBSC.js.map +0 -1
  264. package/dist/punyCode-DnKi0qjS.cjs.map +0 -1
  265. package/dist/punyCode-Dwto1RpA.js.map +0 -1
  266. package/dist/removeSpaces--8NW-HSx.js.map +0 -1
  267. package/dist/removeSpaces-CmrrkeXz.cjs.map +0 -1
  268. package/dist/safeJsonParse-OnUwG2El.js.map +0 -1
  269. package/dist/safeJsonParse-sFqVXf-e.cjs +0 -208
  270. package/dist/safeJsonParse-sFqVXf-e.cjs.map +0 -1
  271. package/dist/safeStableStringify-B2KTTS3r.js.map +0 -1
  272. package/dist/safeStableStringify-Cmi6GyWj.cjs +0 -106
  273. package/dist/safeStableStringify-Cmi6GyWj.cjs.map +0 -1
  274. package/dist/tailwind-CUdmv-oO.js.map +0 -1
  275. package/dist/tailwind-DUuboq52.cjs.map +0 -1
  276. package/dist/toStringArrayUnRecursive-OOHGazks.js.map +0 -1
  277. package/dist/toStringArrayUnRecursive-pfk2oP8C.cjs +0 -51
  278. package/dist/toStringArrayUnRecursive-pfk2oP8C.cjs.map +0 -1
  279. package/dist/urls-BL9C_yU3.cjs +0 -299
  280. package/dist/urls-BL9C_yU3.cjs.map +0 -1
  281. package/dist/urls-BXT4Krsq.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatter-BFgV1HhV-DyybWSuj.cjs","names":[],"sources":["../../build-tools/dist/formatter-BFgV1HhV.js"],"sourcesContent":["/*!\n* ========================================================================\n* @rzl-zone/build-tools\n* ------------------------------------------------------------------------\n* Version: `0.0.13`\n* Author: `Rizalvin Dwiky <rizalvindwiky1998@gmail.com>`\n* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/build-tools`\n* ========================================================================\n*/\n\nimport pcr from \"picocolors\";\nfunction deepFreeze(value) {\n\tif (typeof value !== \"object\" || value === null) return value;\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst stack = [value];\n\twhile (stack.length) {\n\t\tconst obj = stack.pop();\n\t\tif (seen.has(obj) || Object.isFrozen(obj)) continue;\n\t\tseen.add(obj);\n\t\tif (isMap(obj)) for (const [k, v] of obj) {\n\t\t\tif (typeof k === \"object\" && k !== null) stack.push(k);\n\t\t\tif (typeof v === \"object\" && v !== null) stack.push(v);\n\t\t}\n\t\telse if (isSet(obj)) {\n\t\t\tfor (const v of obj) if (typeof v === \"object\" && v !== null) stack.push(v);\n\t\t} else if (isArray(obj)) {\n\t\t\tfor (const v of obj) if (typeof v === \"object\" && v !== null) stack.push(v);\n\t\t} else {\n\t\t\tconst record = obj;\n\t\t\tfor (const key of Reflect.ownKeys(record)) {\n\t\t\t\tconst v = record[key];\n\t\t\t\tif (typeof v === \"object\" && v !== null) stack.push(v);\n\t\t\t}\n\t\t}\n\t\tObject.freeze(obj);\n\t}\n\treturn value;\n}\nconst isRegExp = (value) => {\n\treturn value instanceof RegExp;\n};\nconst isString = (value) => {\n\treturn typeof value === \"string\";\n};\nfunction isSet(value) {\n\treturn Object.prototype.toString.call(value) === \"[object Set]\" || value instanceof Set;\n}\nfunction isMap(value) {\n\treturn Object.prototype.toString.call(value) === \"[object Map]\" || value instanceof Map;\n}\nfunction isArray(value) {\n\treturn Array.isArray(value);\n}\nconst isNull = (val) => val === null;\nfunction isPlainObject(value) {\n\tif (!isObject(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\nfunction isObject(value) {\n\treturn typeof value === \"object\" && !isNil(value) && !isArray(value);\n}\nfunction isObjectOrArray(value) {\n\treturn isArray(value) || isObject(value);\n}\nconst isNil = (value) => {\n\treturn value == null;\n};\nconst isBoolean = (value) => {\n\treturn typeof value === \"boolean\";\n};\nconst isUndefined = (value) => {\n\treturn typeof value === \"undefined\";\n};\nconst isFunction = (value) => {\n\treturn typeof value === \"function\";\n};\nconst isNumberObject = (value) => {\n\treturn isObject(value) && Object.prototype.toString.call(value) === \"[object Number]\";\n};\nconst isStringObject = (value) => {\n\treturn isObject(value) && Object.prototype.toString.call(value) === \"[object String]\";\n};\nconst isBooleanObject = (value) => {\n\treturn isObject(value) && Object.prototype.toString.call(value) === \"[object Boolean]\";\n};\nconst isInfinityNumber = (value) => {\n\tif (typeof value === \"number\" || isNumberObject(value)) {\n\t\tconst num = Number(value);\n\t\treturn num === Infinity || num === -Infinity;\n\t}\n\treturn false;\n};\nconst isSymbol = (value) => {\n\treturn typeof value === \"symbol\";\n};\nconst isBigInt = (value) => {\n\treturn typeof value === \"bigint\";\n};\nconst isNaN = (value) => {\n\treturn typeof value === \"number\" ? Number.isNaN(value) : isNumberObject(value) && Number.isNaN(value.valueOf());\n};\nconst isNonEmptyString = (value, options = {}) => {\n\tif (!isString(value)) return false;\n\treturn (options.trim ?? true ? value.trim() : value).length > 0;\n};\nconst isNumber = (value, options = {}) => {\n\tconst includeNaN = isPlainObject(options) && isBoolean(options.includeNaN) ? options.includeNaN : false;\n\tconst aNumber = typeof value === \"number\";\n\treturn includeNaN ? aNumber : aNumber && !Number.isNaN(value);\n};\nconst isError = (error) => {\n\treturn Object.prototype.toString.call(error) === \"[object Error]\" || error instanceof Error;\n};\nconst isDate = (value, options = {}) => {\n\tconst skipInvalidDate = isPlainObject(options) && isBoolean(options.skipInvalidDate) ? options.skipInvalidDate : false;\n\tconst instanceDate = value instanceof Date;\n\tif (skipInvalidDate) return instanceDate;\n\treturn instanceDate && !isNaN(value.getTime());\n};\nconst safeStableStringify = (value, options = {}) => {\n\tconst pretty = options.pretty ?? false;\n\tconst sortKeys = options.sortKeys ?? true;\n\tconst sortArray = options.sortArray ?? false;\n\tconst keepUndefined = options.keepUndefined ?? false;\n\tif (isUndefined(value)) return keepUndefined ? \"undefined\" : \"null\";\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst isPrimitive = (val) => isNull(val) || !isObjectOrArray(val) && !isFunction(val);\n\tconst deepProcess = (val) => {\n\t\tif (isNumberObject(val)) {\n\t\t\tconst valOf = val.valueOf();\n\t\t\treturn isNaN(valOf) || isInfinityNumber(valOf) ? null : valOf;\n\t\t}\n\t\tif (isStringObject(val)) return val.valueOf();\n\t\tif (isBooleanObject(val)) return val.valueOf();\n\t\tif (isFunction(val) || isSymbol(val)) return void 0;\n\t\tif (isBigInt(val)) return val.toString();\n\t\tif (isNaN(val) || isInfinityNumber(val)) return null;\n\t\tif (isUndefined(val)) return keepUndefined ? void 0 : null;\n\t\tif (isObjectOrArray(val)) {\n\t\t\tif (seen.has(val)) return \"[Circular]\";\n\t\t\tseen.add(val);\n\t\t\tif (isDate(val)) return val.toISOString();\n\t\t\tif (isMap(val)) return { map: Array.from(val.entries()).map(([k, v]) => [k, deepProcess(v)]) };\n\t\t\tif (isSet(val)) return { set: Array.from(val.values()).map(deepProcess) };\n\t\t\tif (isArray(val)) {\n\t\t\t\tconst processedArr = val.map(deepProcess);\n\t\t\t\tif (sortArray) {\n\t\t\t\t\tconst primitives = [];\n\t\t\t\t\tconst nonPrimitives = [];\n\t\t\t\t\tfor (const item of processedArr) if (isPrimitive(item)) primitives.push(item);\n\t\t\t\t\telse nonPrimitives.push(item);\n\t\t\t\t\tprimitives.sort((a, b) => {\n\t\t\t\t\t\tif (isNumber(a) && isNumber(b)) return a - b;\n\t\t\t\t\t\treturn String(a).localeCompare(String(b));\n\t\t\t\t\t});\n\t\t\t\t\treturn [...primitives, ...nonPrimitives];\n\t\t\t\t}\n\t\t\t\treturn processedArr;\n\t\t\t}\n\t\t\tconst keys = Object.keys(val);\n\t\t\tif (sortKeys) keys.sort((a, b) => {\n\t\t\t\tconst na = Number(a);\n\t\t\t\tconst nb = Number(b);\n\t\t\t\tif (!isNaN(na) && !isNaN(nb)) return na - nb;\n\t\t\t\treturn a.localeCompare(b);\n\t\t\t});\n\t\t\tconst result = {};\n\t\t\tif (isObject(val)) for (const k of keys) {\n\t\t\t\tconst v = deepProcess(val[k]);\n\t\t\t\tif (!isUndefined(v)) result[k] = v;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\treturn val;\n\t};\n\ttry {\n\t\treturn JSON.stringify(deepProcess(value), null, pretty ? 2 : 0);\n\t} catch (err) {\n\t\tconsole.warn(\"Error in safeStableStringify:\", err);\n\t\treturn \"{}\";\n\t}\n};\nconst normalizeSpaces = (value, options = {\n\twithTrim: true,\n\ttrimOnly: false\n}) => {\n\tif (!isNonEmptyString(value)) return \"\";\n\tif (!isPlainObject(options)) options = {};\n\tconst { trimOnly = false, withTrim = true } = options;\n\tif (trimOnly) return value.trim();\n\tif (withTrim) value = value.trim();\n\treturn value.replace(/\\s+/g, \" \");\n};\nconst isStringArray = (v) => isArray(v) && v.every((i) => isString(i));\nconst isStringSet = (v) => isSet(v) && [...v].every((i) => isString(i));\nconst assertValidatePatternArgs = (v, parameterKey = \"pattern\") => {\n\tif (!isString(v) && !isStringArray(v) && !isStringSet(v)) throw new TypeError(`The \\`${parameterKey}\\` argument must be a string, string[] or Set<string>.`);\n};\nconst flattenStrings = (input) => {\n\treturn input.flat(Infinity).filter((v) => typeof v === \"string\");\n};\nconst toStringSet = (pattern, options = {}) => {\n\tconst { withValidationType = true, parameterKey = \"pattern\" } = options;\n\tif (withValidationType) assertValidatePatternArgs(pattern, parameterKey);\n\treturn toObjectSet(pattern);\n};\nconst toObjectSet = (value) => {\n\tif (isSet(value)) return value;\n\treturn new Set(isArray(value) ? value : [value]);\n};\nconst toArray = (value) => {\n\treturn isArray(value) ? value : [value];\n};\nconst hasGlobalRequire = (value) => isObject(value) && isFunction(value.require);\nconst getRuntimeRequire = () => {\n\tif (!hasGlobalRequire(globalThis)) return void 0;\n\treturn globalThis.require;\n};\nconst __runtimeRequire = ((x) => {\n\tconst r = getRuntimeRequire();\n\tif (r) return r;\n\tif (typeof Proxy !== \"undefined\") return new Proxy(x, { get(target, prop) {\n\t\tconst r2 = getRuntimeRequire();\n\t\treturn r2 ? r2[prop] : target[prop];\n\t} });\n\treturn x;\n})(function(id) {\n\tconst r = getRuntimeRequire();\n\tif (r) return r.call(this, id);\n\tthrow new Error(`Calling \\`require\\` for \"${id}\" in an environment that doesn't expose the \\`require\\` function.`);\n});\nconst picocolors = pcr;\nconst NEWLINE = atob(\"Cg==\");\nconst EOL = hasGlobalRequire(globalThis) ? __runtimeRequire(\"node:os\").EOL : NEWLINE;\nfunction plural(count, word, pluralWord) {\n\tif (count === 1) return word;\n\treturn pluralWord ?? `${word}s`;\n}\nfunction padText(value, options = {}) {\n\tconst { start = true, end = true, padOnInvalid = true } = options;\n\tif (!isNonEmptyString(value)) return padOnInvalid ? \" \" : \"\";\n\treturn `${start ? \" \" : \"\"}${value}${end ? \" \" : \"\"}`;\n}\nfunction joinInline(...text) {\n\treturn text.filter(Boolean).join(\" \");\n}\nfunction joinLines(...text) {\n\treturn text.filter(Boolean).join(EOL);\n}\nfunction joinLinesLoose(...text) {\n\treturn text.filter((v) => v !== false && v !== null && v !== void 0).join(EOL);\n}\nfunction formatOptionValue(value, options) {\n\tconst { pretty = false, indent = 2, sortKeys = false, sortArray = false } = options ?? {};\n\tconst indentUnit = \" \".repeat(indent);\n\tfunction formatRecursive(input, depth = 0) {\n\t\tconst currentIndent = indentUnit.repeat(depth);\n\t\tconst nextIndent = indentUnit.repeat(depth + 1);\n\t\tconst joinInline = picocolors.dim(\", \");\n\t\tconst joinPretty = `,${EOL}`;\n\t\tif (isSet(input)) return formatRecursive([...input], depth);\n\t\tif (isMap(input)) return formatRecursive(Object.fromEntries(input), depth);\n\t\tif (isArray(input)) {\n\t\t\tconst arr = sortArray ? [...input].sort() : input;\n\t\t\tif (arr.length === 0) return picocolors.gray(\"[]\");\n\t\t\tif (!pretty) {\n\t\t\t\tconst items = arr.map((v) => formatRecursive(v, depth)).join(joinInline);\n\t\t\t\treturn picocolors.gray(\"[\") + items + picocolors.gray(\"]\");\n\t\t\t}\n\t\t\tconst items = arr.map((v) => nextIndent + formatRecursive(v, depth + 1)).join(joinPretty);\n\t\t\treturn picocolors.gray(`[${EOL}`) + items + EOL + currentIndent + picocolors.gray(\"]\");\n\t\t}\n\t\tif (isPlainObject(input)) {\n\t\t\tlet entries = Object.entries(input);\n\t\t\tif (sortKeys) entries = entries.sort(([a], [b]) => a.localeCompare(b));\n\t\t\tif (entries.length === 0) return picocolors.gray(\"{}\");\n\t\t\tif (!pretty) {\n\t\t\t\tconst props = entries.map(([key, val]) => {\n\t\t\t\t\treturn picocolors.dim(key) + picocolors.gray(\": \") + formatRecursive(val, depth);\n\t\t\t\t}).join(joinInline);\n\t\t\t\treturn picocolors.gray(\"{ \") + props + picocolors.gray(\" }\");\n\t\t\t}\n\t\t\tconst props = entries.map(([key, val]) => {\n\t\t\t\treturn nextIndent + picocolors.dim(key) + picocolors.gray(\": \") + formatRecursive(val, depth + 1);\n\t\t\t}).join(joinPretty);\n\t\t\treturn picocolors.gray(`{${EOL}`) + props + EOL + currentIndent + picocolors.gray(\"}\");\n\t\t}\n\t\tif (isRegExp(input)) return picocolors.greenBright(\"/\") + picocolors.redBright(input.source) + picocolors.greenBright(\"/\") + picocolors.magentaBright(input.flags);\n\t\tif (isString(input)) return picocolors.gray(`\"${input}\"`);\n\t\tif (isNumber(input, { includeNaN: true })) return picocolors.redBright(String(input));\n\t\tif (isBoolean(input)) return picocolors.redBright(String(input));\n\t\tif (isNil(input)) return picocolors.redBright(String(input));\n\t\tif (isObject(input)) return picocolors.cyanBright(Object.prototype.toString.call(input));\n\t\treturn picocolors.cyanBright(String(input));\n\t}\n\treturn formatRecursive(value);\n}\nexport { isString as C, toArray as D, safeStableStringify as E, toObjectSet as O, isSet as S, normalizeSpaces as T, isNonEmptyString as _, joinLines as a, isPlainObject as b, picocolors as c, flattenStrings as d, isArray as f, isNil as g, isFunction as h, joinInline as i, toStringSet as k, plural as l, isError as m, NEWLINE as n, joinLinesLoose as o, isBoolean as p, formatOptionValue as r, padText as s, EOL as t, deepFreeze as u, isNull as v, isUndefined as w, isRegExp as x, isNumber as y };\n//# sourceMappingURL=formatter-BFgV1HhV.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,QAAQ,OAAO;CACvB,OAAO,MAAM,QAAQ,KAAK;AAC3B;AAOA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,CAAC,MAAM,KAAK,KAAK,CAAC,QAAQ,KAAK;AACpE;AAIA,MAAM,SAAS,UAAU;CACxB,OAAO,SAAS;AACjB;AAOA,MAAM,cAAc,UAAU;CAC7B,OAAO,OAAO,UAAU;AACzB;AA0IA,MAAM,oBAAoB,UAAU,SAAS,KAAK,KAAK,WAAW,MAAM,OAAO;AAC/E,MAAM,0BAA0B;CAC/B,IAAI,CAAC,iBAAiB,UAAU,GAAG,OAAO,KAAK;CAC/C,OAAO,WAAW;AACnB;AACA,MAAM,qBAAqB,MAAM;CAChC,MAAM,IAAI,kBAAkB;CAC5B,IAAI,GAAG,OAAO;CACd,IAAI,OAAO,UAAU,aAAa,OAAO,IAAI,MAAM,GAAG,EAAE,IAAI,QAAQ,MAAM;EACzE,MAAM,KAAK,kBAAkB;EAC7B,OAAO,KAAK,GAAG,QAAQ,OAAO;CAC/B,EAAE,CAAC;CACH,OAAO;AACR,GAAG,SAAS,IAAI;CACf,MAAM,IAAI,kBAAkB;CAC5B,IAAI,GAAG,OAAO,EAAE,KAAK,MAAM,EAAE;CAC7B,MAAM,IAAI,MAAM,4BAA4B,GAAG,kEAAkE;AAClH,CAAC;AAED,MAAM,UAAU,KAAK,MAAM;AAC3B,MAAM,MAAM,iBAAiB,UAAU,IAAI,iBAAiB,SAAS,EAAE,MAAM;AAa7E,SAAS,UAAU,GAAG,MAAM;CAC3B,OAAO,KAAK,OAAO,OAAO,EAAE,KAAK,GAAG;AACrC"}
@@ -2,14 +2,14 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1`
5
+ * Version: `3.14.0`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
8
  * ========================================================================
9
9
  */
10
10
  "use strict";
11
11
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
12
- const require_formatters = require('../formatters-aEAAuzjx.cjs');
12
+ const require_formatters = require('../formatters-Cjng28nY.cjs');
13
13
  exports.censorEmail = require_formatters.censorEmail;
14
14
  exports.chunkString = require_formatters.chunkString;
15
15
  exports.formatCurrency = require_formatters.formatCurrency;
@@ -2,11 +2,11 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1`
5
+ * Version: `3.14.0`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
- import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-RNQBTK8A.cjs";
11
+ import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-BD0J8wkE.cjs";
12
12
  export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString };
@@ -2,11 +2,11 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1`
5
+ * Version: `3.14.0`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
8
  * ========================================================================
9
9
  */
10
10
 
11
- import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-CRz9rSZL.js";
11
+ import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-DhUTzQ_o.js";
12
12
  export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString };
@@ -2,10 +2,10 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1`
5
+ * Version: `3.14.0`
6
6
  * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
7
  * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
8
  * ========================================================================
9
9
  */
10
- import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../formatters-C6cVZBbG.js";
10
+ import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../formatters-Dqccnt-p.js";
11
11
  export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString };
@@ -0,0 +1,436 @@
1
+ /*!
2
+ * ========================================================================
3
+ * @rzl-zone/utils-js
4
+ * ------------------------------------------------------------------------
5
+ * Version: `3.14.0`
6
+ * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
+ * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
+ * ========================================================================
9
+ */
10
+ "use strict";
11
+ const require_logger = require('./logger-BXg2xufj.cjs');
12
+ const require_isNumber = require('./isNumber-CM1vdNcW.cjs');
13
+ const require_assertIsString = require('./assertIsString-CuPbh3FB.cjs');
14
+ const require_isFinite = require('./isFinite-CKeuVXbD.cjs');
15
+ const require_safeStableStringify = require('./safeStableStringify-MuBiT-4B.cjs');
16
+ const require_isEmptyString = require('./isEmptyString-Csc5Sf_W.cjs');
17
+ const require_parsing = require('./parsing-DB_S0WFz.cjs');
18
+ const require_hasOwnProp = require('./hasOwnProp-DTWYqy7S.cjs');
19
+ const require_isInteger = require('./isInteger-iTok9NaH.cjs');
20
+ const require_normalizeSpaces = require('./normalizeSpaces-CQ7tZLNG.cjs');
21
+ let libphonenumber_js_max = require("libphonenumber-js/max");
22
+ let date_fns_locale = require("date-fns/locale");
23
+ let date_fns = require("date-fns");
24
+ const formatIndianNumber = ({ numStr, separator }) => {
25
+ const lastThree = numStr?.slice(-3);
26
+ const rest = numStr?.slice(0, -3);
27
+ if (!rest) return lastThree;
28
+ return rest.replace(/\B(?=(\d{2})+(?!\d))/g, separator) + separator + lastThree;
29
+ };
30
+ const formatCurrency = (value, options) => {
31
+ if (!require_logger.isString(value) && !require_isFinite.isFinite(value)) throw new TypeError(errorMsg$4(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${require_logger.getPreciseType(value)}\`, with value: \`${require_safeStableStringify.safeStableStringify(value, { keepUndefined: true })}\`.`));
32
+ if (!require_logger.isPlainObject(options)) options = {};
33
+ const decimal = options.decimal ?? false;
34
+ const totalDecimal = options.totalDecimal ?? 2;
35
+ const endDecimal = options.endDecimal ?? true;
36
+ const indianFormat = options.indianFormat ?? false;
37
+ const suffixCurrency = options.suffixCurrency ?? "";
38
+ const suffixDecimal = options.suffixDecimal ?? "";
39
+ const roundedDecimal = options.roundedDecimal ?? "round";
40
+ const negativeFormat = options.negativeFormat ?? "dash";
41
+ let separatorDecimals = options.separatorDecimals ?? ",";
42
+ let separator = options.separator ?? ".";
43
+ if (!require_logger.isString(separator) || !require_logger.isString(separatorDecimals) || !require_logger.isString(suffixCurrency) || !require_logger.isString(suffixDecimal)) throw new TypeError(errorMsg$4(`Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${require_logger.getPreciseType(separator)}\`, 'separatorDecimals': \`${require_logger.getPreciseType(separatorDecimals)}\`, 'suffixCurrency': \`${require_logger.getPreciseType(suffixCurrency)}\`, 'suffixDecimal': \`${require_logger.getPreciseType(suffixDecimal)}\`].`));
44
+ if (!require_logger.isBoolean(decimal) || !require_logger.isBoolean(endDecimal) || !require_logger.isBoolean(indianFormat)) throw new TypeError(errorMsg$4(`Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${require_logger.getPreciseType(decimal)}\`, 'endDecimal': \`${require_logger.getPreciseType(endDecimal)}\`, 'indianFormat': \`${require_logger.getPreciseType(indianFormat)}\`].`));
45
+ if (!require_isInteger.isInteger(totalDecimal)) throw new TypeError(errorMsg$4(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${require_logger.getPreciseType(totalDecimal)}\`, with value: \`${require_safeStableStringify.safeStableStringify(length, { keepUndefined: true })}\`.`));
46
+ if (!(roundedDecimal === false || roundedDecimal === "round" || roundedDecimal === "ceil" || roundedDecimal === "floor")) throw new TypeError(errorMsg$4(`Parameter \`roundedDecimal\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` must be one of "round" | "ceil" | "floor", but received: \`${require_logger.getPreciseType(roundedDecimal)}\`, with value: \`${require_safeStableStringify.safeStableStringify(roundedDecimal, { keepUndefined: true })}\`.`));
47
+ if (!(negativeFormat === "abs" || negativeFormat === "brackets" || negativeFormat === "dash" || require_logger.isPlainObject(negativeFormat))) throw new TypeError(errorMsg$4(`Parameter \`negativeFormat\` property of the \`options\` (second parameter) must be of type \`string\` must be one of "abs" | "brackets" | "dash" or \`plain-object\` type, but received: \`${require_logger.getPreciseType(negativeFormat)}\`, with value: \`${require_safeStableStringify.safeStableStringify(negativeFormat, { keepUndefined: true })}\`.`));
48
+ const rawNum = require_logger.isString(value) ? require_parsing.parseCurrencyString(value) : value;
49
+ if (require_logger.isNaN(rawNum)) throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");
50
+ let integerPart;
51
+ let decimalPartRaw;
52
+ let num = Math.abs(rawNum);
53
+ const factor = Math.pow(10, totalDecimal);
54
+ if (roundedDecimal) {
55
+ const scaled = num * factor;
56
+ switch (roundedDecimal) {
57
+ case "round":
58
+ num = Math.round(scaled) / factor;
59
+ break;
60
+ case "ceil":
61
+ num = Math.ceil(scaled) / factor;
62
+ break;
63
+ case "floor":
64
+ num = Math.floor(scaled) / factor;
65
+ break;
66
+ }
67
+ }
68
+ if (roundedDecimal) {
69
+ [integerPart, decimalPartRaw] = num.toFixed(totalDecimal).split(".");
70
+ decimalPartRaw = decimalPartRaw ?? "".padEnd(totalDecimal, "0");
71
+ } else {
72
+ const split = String(num).split(".");
73
+ integerPart = split[0];
74
+ decimalPartRaw = (split[1] || "").slice(0, totalDecimal).padEnd(totalDecimal, "0");
75
+ }
76
+ let formattedInteger;
77
+ if (indianFormat) {
78
+ separator = ",";
79
+ separatorDecimals = ".";
80
+ formattedInteger = (suffixCurrency.trim().length ? suffixCurrency : "") + formatIndianNumber({
81
+ numStr: integerPart,
82
+ separator
83
+ });
84
+ } else formattedInteger = (suffixCurrency.trim().length ? suffixCurrency : "") + integerPart?.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
85
+ if (decimal && !require_safeStableStringify.isUndefined(decimalPartRaw) && totalDecimal > 0) {
86
+ let formattedDecimal = separatorDecimals + decimalPartRaw;
87
+ if (endDecimal) formattedDecimal += suffixDecimal;
88
+ formattedInteger += formattedDecimal;
89
+ }
90
+ if (rawNum < 0) {
91
+ if (negativeFormat === "dash") formattedInteger = "-" + formattedInteger;
92
+ else if (negativeFormat === "brackets") formattedInteger = "(" + formattedInteger + ")";
93
+ else if (negativeFormat === "abs") {} else if (require_logger.isPlainObject(negativeFormat)) if (require_hasOwnProp.hasOwnProp(negativeFormat, "custom")) {
94
+ const formatCustomNegative = negativeFormat.custom;
95
+ if (!require_logger.isFunction(formatCustomNegative)) throw new TypeError(errorMsg$4(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${require_logger.getPreciseType(formatCustomNegative)}\`.`));
96
+ const result = formatCustomNegative(formattedInteger);
97
+ require_assertIsString.assertIsString(result, { message: ({ currentType, validType }) => errorMsg$4(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${validType}\` type value, but received: \`${currentType}\`.`) });
98
+ formattedInteger = result;
99
+ } else {
100
+ const formatStyleNegative = negativeFormat.style || "dash";
101
+ const formatSpaceNegative = !require_safeStableStringify.isUndefined(negativeFormat.space) ? negativeFormat.space : false;
102
+ require_logger.assertIsBoolean(formatSpaceNegative, { message: ({ currentType, validType }) => errorMsg$4(`Parameter \`negativeFormat.space\` property of the \`options\` (second parameter) must be of type \`${validType} or undefined\`, but received: \`${currentType}\`.`) });
103
+ if (!(formatStyleNegative === "abs" || formatStyleNegative === "brackets" || formatStyleNegative === "dash")) throw new TypeError(errorMsg$4(`Parameter \`negativeFormat.style\` property of the \`options\` (second parameter) must be of type \`string\` must be of type "abs" | "brackets" | "dash", but received: \`${require_logger.getPreciseType(formatStyleNegative)}\`, with value: \`${require_safeStableStringify.safeStableStringify(formatStyleNegative, { keepUndefined: true })}\`.`));
104
+ switch (formatStyleNegative) {
105
+ case "dash":
106
+ formattedInteger = "-" + (formatSpaceNegative ? " " : "") + formattedInteger;
107
+ break;
108
+ case "brackets":
109
+ formattedInteger = formatSpaceNegative ? `( ${formattedInteger} )` : `(${formattedInteger})`;
110
+ break;
111
+ case "abs": break;
112
+ }
113
+ }
114
+ }
115
+ return formattedInteger;
116
+ };
117
+ const errorMsg$4 = (msg) => require_logger.createMessage("formatCurrency", msg);
118
+ const formatNumber = (value, separator = ",") => {
119
+ if (!require_logger.isString(value) && !require_isFinite.isFinite(value)) throw new TypeError(errorMsg$3(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${require_logger.getPreciseType(value)}\`.`));
120
+ if (!require_logger.isString(separator)) throw new TypeError(errorMsg$3(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${require_logger.getPreciseType(separator)}\`.`));
121
+ separator = require_logger.isString(separator) ? separator : ",";
122
+ const decimalSeparator = separator === "." ? "," : separator === "," ? "." : ".";
123
+ const stringValue = value.toString().trim();
124
+ const lastDot = stringValue.lastIndexOf(".");
125
+ const lastComma = stringValue.lastIndexOf(",");
126
+ let actualDecimal = "";
127
+ if (lastDot > lastComma) actualDecimal = ".";
128
+ else if (lastComma > lastDot) actualDecimal = ",";
129
+ let integerPart = stringValue;
130
+ let decimalPart;
131
+ if (actualDecimal) {
132
+ const parts = stringValue.split(actualDecimal);
133
+ integerPart = parts.slice(0, -1).join(actualDecimal);
134
+ decimalPart = parts.slice(-1)[0];
135
+ }
136
+ integerPart = integerPart.replace(/[^\d]/g, "");
137
+ const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
138
+ return decimalPart ? `${formattedInteger}${decimalSeparator}${decimalPart}` : formattedInteger;
139
+ };
140
+ const errorMsg$3 = (msg) => require_logger.createMessage("formatNumber", msg);
141
+ const parsingAsYouType = (value, defaultCountry) => {
142
+ let parsed;
143
+ try {
144
+ parsed = new libphonenumber_js_max.AsYouType(defaultCountry);
145
+ parsed.input(value);
146
+ return parsed;
147
+ } catch {
148
+ parsed?.reset();
149
+ return;
150
+ }
151
+ };
152
+ const isValidParseAsYouType = (parsedAsYouType) => {
153
+ return !!parsedAsYouType?.isValid() && !!parsedAsYouType.getNumber();
154
+ };
155
+ function formatPhoneNumber(value, options) {
156
+ if (require_logger.isNil(value)) return "";
157
+ if (!require_logger.isString(value) && !require_isNumber.isNumber(value)) throw new TypeError(errorMsg$2(`First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${require_logger.getPreciseType(value)}\`.`));
158
+ if (!require_logger.isPlainObject(options)) options = {};
159
+ const takeNumberOnly = options.takeNumberOnly ?? false;
160
+ const checkValidOnly = options.checkValidOnly ?? false;
161
+ const defaultCountry = options.defaultCountry ?? void 0;
162
+ const separator = options.separator ?? " ";
163
+ const prependPlusCountryCode = options.prependPlusCountryCode ?? true;
164
+ const outputFormat = options.outputFormat ?? "INTERNATIONAL";
165
+ const openingNumberCountry = options.openingNumberCountry ?? "";
166
+ const closingNumberCountry = options.closingNumberCountry ?? "";
167
+ if (!require_logger.isBoolean(takeNumberOnly) || !require_logger.isBoolean(checkValidOnly) || !require_logger.isBoolean(prependPlusCountryCode)) throw new TypeError(errorMsg$2(`Parameter \`takeNumberOnly\`, \`checkValidOnly\` and \`prependPlusCountryCode\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${require_logger.getPreciseType(takeNumberOnly)}\`, 'checkValidOnly': \`${require_logger.getPreciseType(checkValidOnly)}\`, 'prependPlusCountryCode': \`${require_logger.getPreciseType(prependPlusCountryCode)}\`].`));
168
+ if (!require_safeStableStringify.isUndefined(defaultCountry) && !(0, libphonenumber_js_max.isSupportedCountry)(defaultCountry)) throw new TypeError(errorMsg$2(`Parameter \`defaultCountry\` property of the \`options\` (second parameter) must be of type \`string\` as \`CountryCode\` (ISO-3166-1 alpha-2) or unset as \`undefined\` value, but received: \`${require_logger.getPreciseType(defaultCountry)}\`, with value: \`${require_safeStableStringify.safeStableStringify(defaultCountry, { keepUndefined: true })}\`.\n\nSee: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements, for all ISO 3166-1 alpha-2 code.`));
169
+ if (![
170
+ "INTERNATIONAL",
171
+ "NATIONAL",
172
+ "RFC3966",
173
+ "E.164"
174
+ ].includes(outputFormat)) throw new TypeError(errorMsg$2(`Parameter \`outputFormat\` property of the \`options\` (second parameter) must be of type \`string\` as \`OutputFormat\` ("NATIONAL" | "INTERNATIONAL" | "E.164" | "RFC3966") or unset as \`undefined\` (default value to: \`INTERNATIONAL\`) value, but received: \`${require_logger.getPreciseType(outputFormat)}\`, with value: ${require_safeStableStringify.safeStableStringify(outputFormat, { keepUndefined: true })}.`));
175
+ if (!require_logger.isString(separator) || !require_logger.isString(openingNumberCountry) || !require_logger.isString(closingNumberCountry)) throw new TypeError(errorMsg$2(`Parameter \`separator\`, \`plusNumberCountry\`, \`openingNumberCountry\` and \`closingNumberCountry\` property of the \`options\` (second parameter) must be of type \`string\` or unset as \`undefined\` value, but received: ['separator': \`${require_logger.getPreciseType(separator)}\`,'openingNumberCountry': \`${require_logger.getPreciseType(openingNumberCountry)}\`, 'closingNumberCountry': \`${require_logger.getPreciseType(closingNumberCountry)}\`].`));
176
+ if (!require_logger.isString(value)) value = String(value);
177
+ const parsedPhoneNumber = parsingAsYouType(value, defaultCountry);
178
+ const validPhoneNumber = isValidParseAsYouType(parsedPhoneNumber);
179
+ if (checkValidOnly) return validPhoneNumber;
180
+ if (!validPhoneNumber) return "";
181
+ if (takeNumberOnly) return parsedPhoneNumber.getNumber().formatNational().replace(/\D/g, "");
182
+ const intlNumb = parsedPhoneNumber.getNumber().format(outputFormat);
183
+ if (outputFormat === "INTERNATIONAL") {
184
+ const [cc, ...rest] = intlNumb.split(" ");
185
+ const countryCode = prependPlusCountryCode ? cc : cc?.replace(/^\++/, "");
186
+ const restWithSeparator = rest.join(separator);
187
+ if (!countryCode) return restWithSeparator;
188
+ if (require_logger.isNonEmptyString(openingNumberCountry) && require_logger.isNonEmptyString(closingNumberCountry)) return `${openingNumberCountry}${countryCode}${closingNumberCountry} ${restWithSeparator}`;
189
+ return `${countryCode} ${restWithSeparator}`;
190
+ }
191
+ if (outputFormat === "NATIONAL") return `${intlNumb.split(" ").join(separator)}`;
192
+ return intlNumb;
193
+ }
194
+ const errorMsg$2 = (msg) => require_logger.createMessage("formatPhoneNumber", msg);
195
+ const hashSeedGenerate = (mode, email) => {
196
+ const generateSeed = () => {
197
+ let hash = 0;
198
+ for (let i = 0; i < email.length; i++) {
199
+ hash = (hash << 5) - hash + email.charCodeAt(i);
200
+ hash |= 0;
201
+ }
202
+ return Math.abs(hash);
203
+ };
204
+ return mode === "fixed" ? generateSeed() : void 0;
205
+ };
206
+ const _censor = (str, minCensor, maxPercentage, hashSeed) => {
207
+ if (str.length <= minCensor) return "*".repeat(str.length);
208
+ const strArr = str.split("");
209
+ const totalCensor = Math.max(minCensor, Math.ceil(str.length * maxPercentage));
210
+ const indexes = /* @__PURE__ */ new Set();
211
+ let i = 0;
212
+ while (indexes.size < totalCensor) {
213
+ const idx = !require_safeStableStringify.isUndefined(hashSeed) ? (hashSeed + str.length + i * 31) % str.length : Math.floor(Math.random() * str.length);
214
+ indexes.add(idx);
215
+ i++;
216
+ }
217
+ for (const index of indexes) strArr[index] = "*";
218
+ return strArr.join("");
219
+ };
220
+ const censorEmail = (email, options) => {
221
+ if (!require_logger.isNonEmptyString(email)) return "";
222
+ if (!require_logger.isPlainObject(options)) options = {};
223
+ const mode = options.mode ?? "fixed";
224
+ if (mode !== "random" && mode !== "fixed") throw new TypeError(require_logger.createMessage("censorEmail", `Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${require_logger.getPreciseType(mode)}\`, with value: \`${require_safeStableStringify.safeStableStringify(mode, { keepUndefined: true })}\`.`));
225
+ if (!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(email)) return "";
226
+ const [local, domain] = email.split("@");
227
+ const domainParts = domain?.split(".");
228
+ if (!local || !domainParts || domainParts.length < 2) return "";
229
+ const [domainName, ...tldParts] = domainParts;
230
+ if (!domainName) return "";
231
+ const tld = tldParts.join(".");
232
+ const hashSeed = hashSeedGenerate(mode, email);
233
+ const localMinCensor = local.length < 4 ? 1 : 2;
234
+ const domainMinCensor = domainName.length < 4 ? 1 : 2;
235
+ return `${_censor(local, localMinCensor, .6, hashSeed)}@${_censor(domainName, domainMinCensor, .5, hashSeed)}.${tld.length <= 2 ? tld : _censor(tld, 1, .4, hashSeed)}`;
236
+ };
237
+ function chunkString(subject, limiter, options) {
238
+ if (require_logger.isNil(subject) || limiter <= 0) return subject;
239
+ require_assertIsString.assertIsString(subject, { message: ({ currentType, validType }) => errorMsg$1(`First parameter (\`subject\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`) });
240
+ if (!require_isInteger.isInteger(limiter)) throw new TypeError(errorMsg$1(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${require_logger.getPreciseType(limiter)}\`, with value: \`${require_safeStableStringify.safeStableStringify(limiter, { keepUndefined: true })}\`.`));
241
+ if (!require_logger.isPlainObject(options)) options = {};
242
+ const separator = options.separator ?? " ";
243
+ const reCountAfterSpace = options.reCountAfterSpace ?? false;
244
+ require_assertIsString.assertIsString(separator, { message: ({ currentType, validType }) => errorMsg$1(`Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`) });
245
+ require_logger.assertIsBoolean(reCountAfterSpace, { message: ({ currentType, validType }) => errorMsg$1(`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`) });
246
+ subject = require_normalizeSpaces.normalizeSpaces(subject);
247
+ if (!reCountAfterSpace) {
248
+ let result = "";
249
+ let currentCount = 0;
250
+ for (let i = 0; i < subject.length; i++) {
251
+ const char = subject[i];
252
+ if (currentCount === limiter) {
253
+ result += separator;
254
+ currentCount = 0;
255
+ }
256
+ result += char;
257
+ currentCount++;
258
+ }
259
+ return result;
260
+ }
261
+ const words = subject.split(" ");
262
+ const finalSegments = [];
263
+ let currentGroup = [];
264
+ let wordsInCurrentGroupCount = 0;
265
+ for (let i = 0; i < words.length; i++) {
266
+ const word = words[i];
267
+ let processedWord = "";
268
+ let charCountInWord = 0;
269
+ if (word) for (let j = 0; j < word.length; j++) {
270
+ processedWord += word[j];
271
+ charCountInWord++;
272
+ if (charCountInWord === limiter && j < word.length - 1) {
273
+ processedWord += separator;
274
+ charCountInWord = 0;
275
+ }
276
+ }
277
+ currentGroup.push(processedWord);
278
+ wordsInCurrentGroupCount++;
279
+ if (wordsInCurrentGroupCount === limiter || i === words.length - 1) {
280
+ finalSegments.push(currentGroup.join(separator));
281
+ currentGroup = [];
282
+ wordsInCurrentGroupCount = 0;
283
+ }
284
+ }
285
+ return finalSegments.join(" ");
286
+ }
287
+ const errorMsg$1 = (msg) => require_logger.createMessage("chunkString", msg);
288
+ const truncateString = (text, options) => {
289
+ if (!require_logger.isNonEmptyString(text)) return "";
290
+ if (!require_logger.isPlainObject(options)) options = {};
291
+ const trim = options.trim ?? true;
292
+ const length = options.length ?? 10;
293
+ let ending = options.ending ?? "...";
294
+ if (!require_isInteger.isInteger(length)) throw new TypeError(errorMsg(`Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${require_logger.getPreciseType(length)}\`, with value: \`${require_safeStableStringify.safeStableStringify(length, { keepUndefined: true })}\`.`));
295
+ if (length < 1) return "";
296
+ require_assertIsString.assertIsString(ending, { message: ({ currentType, validType }) => errorMsg(`Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`) });
297
+ require_logger.assertIsBoolean(trim, { message: ({ currentType, validType }) => errorMsg(`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`) });
298
+ if (require_isEmptyString.isEmptyString(ending)) ending = "...";
299
+ else ending = ending.trim();
300
+ const original = trim ? text.trim() : text;
301
+ if (original.length <= length) return original;
302
+ const sliced = original.slice(0, length);
303
+ return (trim ? sliced : sliced.trimEnd()) + ending;
304
+ };
305
+ const errorMsg = (msg) => require_logger.createMessage("truncateString", msg);
306
+ const formatDateFns = (date, options = {}) => {
307
+ if (require_logger.isNil(date) || !(require_safeStableStringify.isDate(date) || require_logger.isNonEmptyString(date))) return null;
308
+ if (!require_logger.isPlainObject(options)) options = {};
309
+ const { inputFormat, locale = "en", inputLocale = "en", ...restOptions } = options;
310
+ const format = options.format ?? "dd MMM yyyy - HH:mm:ss";
311
+ let parsedDate;
312
+ try {
313
+ if (require_logger.isNonEmptyString(date) && inputFormat && inputLocale) {
314
+ const valueOfInputLocale = require_logger.isNonEmptyString(inputLocale) ? inputLocale === "id" ? date_fns_locale.id : date_fns_locale.enUS : inputLocale;
315
+ parsedDate = (0, date_fns.parse)(date, inputFormat, /* @__PURE__ */ new Date(), { locale: valueOfInputLocale });
316
+ } else parsedDate = new Date(date);
317
+ if (require_logger.isNaN(parsedDate.getTime())) return null;
318
+ const valueOfLocale = require_logger.isNonEmptyString(locale) ? locale === "id" ? date_fns_locale.id : date_fns_locale.enUS : locale;
319
+ return (0, date_fns.format)(parsedDate, format, {
320
+ ...restOptions,
321
+ locale: valueOfLocale
322
+ });
323
+ } catch {
324
+ return null;
325
+ }
326
+ };
327
+ const formatDateIntl = (date, options) => {
328
+ if (require_logger.isNil(date) || !(require_safeStableStringify.isDate(date) || require_logger.isNonEmptyString(date))) return null;
329
+ const parsedDate = new Date(date);
330
+ if (require_logger.isNaN(parsedDate.getTime())) return null;
331
+ if (!require_logger.isPlainObject(options)) options = {};
332
+ const { locale = "en-US", ...restProps } = options;
333
+ try {
334
+ return new Intl.DateTimeFormat(require_logger.isNonEmptyString(locale) ? locale.trim() : "en-US", restProps).format(parsedDate);
335
+ } catch {
336
+ return null;
337
+ }
338
+ };
339
+ const formatDateTime = (date, format = "YYYY-MM-DD hh:mm:ss") => {
340
+ if (require_logger.isNil(format)) format = "YYYY-MM-DD hh:mm:ss";
341
+ if (!require_logger.isString(format)) return null;
342
+ if (require_logger.isNil(date) || !(require_safeStableStringify.isDate(date) || require_logger.isNonEmptyString(date))) return null;
343
+ try {
344
+ const parsedDate = new Date(date);
345
+ if (require_logger.isNaN(parsedDate.getTime())) return null;
346
+ const pad2 = (n) => n.toString().padStart(2, "0");
347
+ const map = {
348
+ YYYY: parsedDate.getFullYear().toString(),
349
+ MM: pad2(parsedDate.getMonth() + 1),
350
+ DD: pad2(parsedDate.getDate()),
351
+ hh: pad2(parsedDate.getHours()),
352
+ mm: pad2(parsedDate.getMinutes()),
353
+ ss: pad2(parsedDate.getSeconds())
354
+ };
355
+ const result = Object.entries(map).reduce((prev, [key, value]) => prev.split(key).join(value), format);
356
+ return !result.includes("NaN") ? result : null;
357
+ } catch {
358
+ return null;
359
+ }
360
+ };
361
+ const getGMTOffset = (date) => {
362
+ try {
363
+ if (require_logger.isNil(date) || require_logger.isString(date) && require_isEmptyString.isEmptyString(date)) date = /* @__PURE__ */ new Date();
364
+ else if (!(require_safeStableStringify.isDate(date) || require_logger.isNonEmptyString(date))) return "0";
365
+ const parsedDate = new Date(date);
366
+ if (require_logger.isNaN(parsedDate.getTime())) return "0";
367
+ const padZero = (num) => num.toString().padStart(2, "0");
368
+ let offset = parsedDate.getTimezoneOffset();
369
+ const sign = offset < 0 ? "+" : "-";
370
+ offset = Math.abs(offset);
371
+ return `${sign}${padZero(Math.floor(offset / 60))}${padZero(offset % 60)}`;
372
+ } catch {
373
+ return "0";
374
+ }
375
+ };
376
+ Object.defineProperty(exports, 'censorEmail', {
377
+ enumerable: true,
378
+ get: function () {
379
+ return censorEmail;
380
+ }
381
+ });
382
+ Object.defineProperty(exports, 'chunkString', {
383
+ enumerable: true,
384
+ get: function () {
385
+ return chunkString;
386
+ }
387
+ });
388
+ Object.defineProperty(exports, 'formatCurrency', {
389
+ enumerable: true,
390
+ get: function () {
391
+ return formatCurrency;
392
+ }
393
+ });
394
+ Object.defineProperty(exports, 'formatDateFns', {
395
+ enumerable: true,
396
+ get: function () {
397
+ return formatDateFns;
398
+ }
399
+ });
400
+ Object.defineProperty(exports, 'formatDateIntl', {
401
+ enumerable: true,
402
+ get: function () {
403
+ return formatDateIntl;
404
+ }
405
+ });
406
+ Object.defineProperty(exports, 'formatDateTime', {
407
+ enumerable: true,
408
+ get: function () {
409
+ return formatDateTime;
410
+ }
411
+ });
412
+ Object.defineProperty(exports, 'formatNumber', {
413
+ enumerable: true,
414
+ get: function () {
415
+ return formatNumber;
416
+ }
417
+ });
418
+ Object.defineProperty(exports, 'formatPhoneNumber', {
419
+ enumerable: true,
420
+ get: function () {
421
+ return formatPhoneNumber;
422
+ }
423
+ });
424
+ Object.defineProperty(exports, 'getGMTOffset', {
425
+ enumerable: true,
426
+ get: function () {
427
+ return getGMTOffset;
428
+ }
429
+ });
430
+ Object.defineProperty(exports, 'truncateString', {
431
+ enumerable: true,
432
+ get: function () {
433
+ return truncateString;
434
+ }
435
+ });
436
+ //# sourceMappingURL=formatters-Cjng28nY.cjs.map