@rzl-zone/utils-js 3.13.1-beta.0 → 3.14.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-DK6kpzbu.cjs +26 -0
  5. package/dist/AbortError-DK6kpzbu.cjs.map +1 -0
  6. package/dist/AbortError-DVT8lAKn.js +20 -0
  7. package/dist/AbortError-DVT8lAKn.js.map +1 -0
  8. package/dist/{assertIsArray-DrLORH0Y.js → assertIsArray-CG7L7vlt.js} +3 -3
  9. package/dist/assertIsArray-CG7L7vlt.js.map +1 -0
  10. package/dist/{assertIsArray-CqIFmlgj.cjs → assertIsArray-CtCRD-_G.cjs} +5 -5
  11. package/dist/assertIsArray-CtCRD-_G.cjs.map +1 -0
  12. package/dist/assertIsPlainObject-DPZLj-Ho.cjs +26 -0
  13. package/dist/assertIsPlainObject-DPZLj-Ho.cjs.map +1 -0
  14. package/dist/assertIsPlainObject-j9bDqNLo.js +20 -0
  15. package/dist/assertIsPlainObject-j9bDqNLo.js.map +1 -0
  16. package/dist/{assertIsString-1iLqxrN0.js → assertIsString-CHIwE12y.js} +4 -4
  17. package/dist/assertIsString-CHIwE12y.js.map +1 -0
  18. package/dist/{assertIsString-DGDLC-XD.cjs → assertIsString-CjE9kbQ_.cjs} +6 -6
  19. package/dist/assertIsString-CjE9kbQ_.cjs.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-BFz6MKaV.cjs +449 -0
  31. package/dist/conversions-BFz6MKaV.cjs.map +1 -0
  32. package/dist/{conversions-CA_3PTAH.js → conversions-Ben5p5Ts.js} +43 -40
  33. package/dist/conversions-Ben5p5Ts.js.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-ekJQF_bA-BepnCBkQ.cjs +67 -0
  45. package/dist/formatter-ekJQF_bA-BepnCBkQ.cjs.map +1 -0
  46. package/dist/formatter-ekJQF_bA-xLD9mGk4.js +55 -0
  47. package/dist/formatter-ekJQF_bA-xLD9mGk4.js.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-Bm3a_akj.js → formatters-BAbGsnYA.js} +78 -71
  53. package/dist/formatters-BAbGsnYA.js.map +1 -0
  54. package/dist/formatters-zd0Gs4Cs.cjs +436 -0
  55. package/dist/formatters-zd0Gs4Cs.cjs.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-CVIhlD1i.js +47 -0
  63. package/dist/hasOwnProp-CVIhlD1i.js.map +1 -0
  64. package/dist/hasOwnProp-D9Tpgokd.cjs +53 -0
  65. package/dist/hasOwnProp-D9Tpgokd.cjs.map +1 -0
  66. package/dist/{index-CakviK5E.d.cts → index-9JsU_wMu.d.ts} +1375 -937
  67. package/dist/{index-BqkYm8qT.d.ts → index-BP3sUrAx.d.ts} +242 -133
  68. package/dist/{index-CJx0EFQ4.d.cts → index-BVovC-yK.d.cts} +229 -200
  69. package/dist/index-C1X6ha9s.d.cts +1041 -0
  70. package/dist/index-CcPQZ41G.d.cts +1103 -0
  71. package/dist/index-CjpbuJF4.d.ts +2424 -0
  72. package/dist/index-CssrQyHh.d.cts +2424 -0
  73. package/dist/index-DZHiYYR7.d.cts +2179 -0
  74. package/dist/index-DZHiYYR7.d.ts +2179 -0
  75. package/dist/index-DlyDmXUo.d.ts +1103 -0
  76. package/dist/index-Dm4a___O.d.ts +1041 -0
  77. package/dist/{index-D5nTp1kV.d.ts → index-Dwduk7ez.d.cts} +1375 -937
  78. package/dist/{index-uaHl0X-r.d.cts → index-I5V6RbZM.d.cts} +1592 -790
  79. package/dist/{index-Bm5odgLW.d.ts → index-hOqBIL7F.d.ts} +1592 -790
  80. package/dist/{index-hOCUw-B9.d.ts → index-jyuOZMX7.d.ts} +229 -200
  81. package/dist/{index-BqkYm8qT.d.cts → index-lI0b7iUz.d.cts} +242 -133
  82. package/dist/{isBigInt-f6yY2fAV.js → isBigInt-Cez32M69.js} +2 -2
  83. package/dist/isBigInt-Cez32M69.js.map +1 -0
  84. package/dist/{isBigInt-CqZNWVtI.cjs → isBigInt-YgpNKTbA.cjs} +2 -2
  85. package/dist/isBigInt-YgpNKTbA.cjs.map +1 -0
  86. package/dist/{isEmptyString-Ga77_3Q1.js → isEmptyString-C9QLWjx2.js} +4 -4
  87. package/dist/isEmptyString-C9QLWjx2.js.map +1 -0
  88. package/dist/{isEmptyString-DNMPmS-H.cjs → isEmptyString-O4TFe1Ao.cjs} +5 -5
  89. package/dist/isEmptyString-O4TFe1Ao.cjs.map +1 -0
  90. package/dist/isEmptyValue-CFExALXZ.cjs +54 -0
  91. package/dist/isEmptyValue-CFExALXZ.cjs.map +1 -0
  92. package/dist/isEmptyValue-kCjnLjbN.js +36 -0
  93. package/dist/isEmptyValue-kCjnLjbN.js.map +1 -0
  94. package/dist/{isFinite-Crw95XV8.cjs → isFinite-B_hHbDpa.cjs} +6 -6
  95. package/dist/isFinite-B_hHbDpa.cjs.map +1 -0
  96. package/dist/{isFinite-BJO7Dt6B.js → isFinite-ZvNhyHlF.js} +5 -5
  97. package/dist/isFinite-ZvNhyHlF.js.map +1 -0
  98. package/dist/{isInteger-B75voxys.js → isInteger-aZgzTTZG.js} +4 -4
  99. package/dist/isInteger-aZgzTTZG.js.map +1 -0
  100. package/dist/{isInteger-CSMNm--9.cjs → isInteger-dnc6W63Z.cjs} +4 -4
  101. package/dist/isInteger-dnc6W63Z.cjs.map +1 -0
  102. package/dist/isNumber-BCWD4dW0.js +20 -0
  103. package/dist/isNumber-BCWD4dW0.js.map +1 -0
  104. package/dist/isNumber-BkzwAe50.cjs +26 -0
  105. package/dist/isNumber-BkzwAe50.cjs.map +1 -0
  106. package/dist/isPlainObject-CAe_ElKO.d.cts +331 -0
  107. package/dist/isPlainObject-CJvRG4Je.d.ts +331 -0
  108. package/dist/{isServer-BHOSvBhV.js → isServer-CQzrX5e0.js} +2 -2
  109. package/dist/isServer-CQzrX5e0.js.map +1 -0
  110. package/dist/{isServer-HA13Dzo2.cjs → isServer-DhFaedeT.cjs} +2 -2
  111. package/dist/isServer-DhFaedeT.cjs.map +1 -0
  112. package/dist/{isEqual-D8W3Wizi.cjs → isTypedArray-DjADSu8q.cjs} +45 -13
  113. package/dist/isTypedArray-DjADSu8q.cjs.map +1 -0
  114. package/dist/{isEqual-ekId-j5b.js → isTypedArray-DxsPKrLh.js} +29 -9
  115. package/dist/isTypedArray-DxsPKrLh.js.map +1 -0
  116. package/dist/{isValidDomain-BqyLVi7S.js → isValidDomain-CDtNOhMc.js} +13 -54
  117. package/dist/isValidDomain-CDtNOhMc.js.map +1 -0
  118. package/dist/{isValidDomain-ByrOfQsh.cjs → isValidDomain-D_x7uNIu.cjs} +16 -69
  119. package/dist/isValidDomain-D_x7uNIu.cjs.map +1 -0
  120. package/dist/{assertIsBoolean-DDhQ2D-k.js → logger-CLWnKRKE.js} +657 -587
  121. package/dist/logger-CLWnKRKE.js.map +1 -0
  122. package/dist/{assertIsBoolean-CEx4KbHg.cjs → logger-CUacYy3D.cjs} +658 -612
  123. package/dist/logger-CUacYy3D.cjs.map +1 -0
  124. package/dist/{noop-CkwxErJ2.cjs → noop-CjEbNsJL.cjs} +2 -2
  125. package/dist/noop-CjEbNsJL.cjs.map +1 -0
  126. package/dist/{noop-D_Ots__Z.js → noop-qxrcogt5.js} +2 -2
  127. package/dist/noop-qxrcogt5.js.map +1 -0
  128. package/dist/{normalizeSpaces-88yaixiu.cjs → normalizeSpaces-D0_Z4qnO.cjs} +6 -9
  129. package/dist/normalizeSpaces-D0_Z4qnO.cjs.map +1 -0
  130. package/dist/{normalizeSpaces-Cat8CHtt.js → normalizeSpaces-DAsxzBEQ.js} +4 -7
  131. package/dist/normalizeSpaces-DAsxzBEQ.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-BLHzVoh-.js → parsers-BBAE_xVM.js} +9 -8
  143. package/dist/parsers-BBAE_xVM.js.map +1 -0
  144. package/dist/{parsers-xAQmKCgS.cjs → parsers-i8WEeMJl.cjs} +10 -9
  145. package/dist/parsers-i8WEeMJl.cjs.map +1 -0
  146. package/dist/{parsing-BYo6U0EG.js → parsing-D9tbKQ0v.js} +3 -3
  147. package/dist/parsing-D9tbKQ0v.js.map +1 -0
  148. package/dist/{parsing-CuezVd0e.cjs → parsing-DGjB8cwr.cjs} +4 -4
  149. package/dist/parsing-DGjB8cwr.cjs.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-BMTIIYx8.js → predicates-C0dova7l.js} +45 -40
  155. package/dist/predicates-C0dova7l.js.map +1 -0
  156. package/dist/{predicates-ZmZpelMh.cjs → predicates-Dd7To7B4.cjs} +89 -84
  157. package/dist/predicates-Dd7To7B4.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-WZ6-GaTM.cjs → punyCode-DHTLhGdD.cjs} +12 -12
  165. package/dist/punyCode-DHTLhGdD.cjs.map +1 -0
  166. package/dist/{punyCode-COTqgXMJ.js → punyCode-Deb1Mrkc.js} +12 -12
  167. package/dist/punyCode-Deb1Mrkc.js.map +1 -0
  168. package/dist/{removeSpaces-CQJvw1yU.js → removeSpaces-BPnsdRN0.js} +4 -4
  169. package/dist/removeSpaces-BPnsdRN0.js.map +1 -0
  170. package/dist/{removeSpaces-BeGkktUl.cjs → removeSpaces-CN3pxBz_.cjs} +7 -7
  171. package/dist/removeSpaces-CN3pxBz_.cjs.map +1 -0
  172. package/dist/rzl-utils.global.js +13 -13
  173. package/dist/safeJsonParse-D1FLVTEM.cjs +209 -0
  174. package/dist/safeJsonParse-D1FLVTEM.cjs.map +1 -0
  175. package/dist/{safeJsonParse-D8H3wCv7.js → safeJsonParse-DEVKNDSn.js} +29 -28
  176. package/dist/safeJsonParse-DEVKNDSn.js.map +1 -0
  177. package/dist/safeStableStringify-C5HHKUdn.cjs +125 -0
  178. package/dist/safeStableStringify-C5HHKUdn.cjs.map +1 -0
  179. package/dist/{safeStableStringify-BLwA1VC-.js → safeStableStringify-DfwxmiWn.js} +20 -13
  180. package/dist/safeStableStringify-DfwxmiWn.js.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-CjxdO7aL.cjs → tailwind-BG7B0cDs.cjs} +59 -53
  192. package/dist/tailwind-BG7B0cDs.cjs.map +1 -0
  193. package/dist/{tailwind-RSE3obLb.js → tailwind-tJNnFPsF.js} +38 -32
  194. package/dist/tailwind-tJNnFPsF.js.map +1 -0
  195. package/dist/{toStringArrayUnRecursive-NreW1dyV.js → toStringArrayUnRecursive-D0WbLIRz.js} +9 -9
  196. package/dist/toStringArrayUnRecursive-D0WbLIRz.js.map +1 -0
  197. package/dist/toStringArrayUnRecursive-QLoaNX_-.cjs +51 -0
  198. package/dist/toStringArrayUnRecursive-QLoaNX_-.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-CLVfEB7O.js → urls-EoWslGgg.js} +50 -41
  204. package/dist/urls-EoWslGgg.js.map +1 -0
  205. package/dist/urls-NCzPepe2.cjs +308 -0
  206. package/dist/urls-NCzPepe2.cjs.map +1 -0
  207. package/package.json +6 -6
  208. package/dist/assertIsArray-CqIFmlgj.cjs.map +0 -1
  209. package/dist/assertIsArray-DrLORH0Y.js.map +0 -1
  210. package/dist/assertIsBoolean-CEx4KbHg.cjs.map +0 -1
  211. package/dist/assertIsBoolean-DDhQ2D-k.js.map +0 -1
  212. package/dist/assertIsString-1iLqxrN0.js.map +0 -1
  213. package/dist/assertIsString-DGDLC-XD.cjs.map +0 -1
  214. package/dist/conversions-Bxa01uIl.cjs +0 -446
  215. package/dist/conversions-Bxa01uIl.cjs.map +0 -1
  216. package/dist/conversions-CA_3PTAH.js.map +0 -1
  217. package/dist/formatters-Bm3a_akj.js.map +0 -1
  218. package/dist/formatters-Bt6QuhxK.cjs +0 -429
  219. package/dist/formatters-Bt6QuhxK.cjs.map +0 -1
  220. package/dist/index--h04HuBE.d.cts +0 -765
  221. package/dist/index--h04HuBE.d.ts +0 -765
  222. package/dist/index-Ap8U-8Qx.d.cts +0 -947
  223. package/dist/index-BAeeggeh.d.cts +0 -1716
  224. package/dist/index-BAeeggeh.d.ts +0 -1716
  225. package/dist/index-CMglhpFG.d.ts +0 -947
  226. package/dist/isBigInt-CqZNWVtI.cjs.map +0 -1
  227. package/dist/isBigInt-f6yY2fAV.js.map +0 -1
  228. package/dist/isEmptyObject-BYNnSKzw.js +0 -25
  229. package/dist/isEmptyObject-BYNnSKzw.js.map +0 -1
  230. package/dist/isEmptyObject-C2lQyFZS.cjs +0 -37
  231. package/dist/isEmptyObject-C2lQyFZS.cjs.map +0 -1
  232. package/dist/isEmptyString-DNMPmS-H.cjs.map +0 -1
  233. package/dist/isEmptyString-Ga77_3Q1.js.map +0 -1
  234. package/dist/isEmptyValue-D7-6WWS9.js +0 -24
  235. package/dist/isEmptyValue-D7-6WWS9.js.map +0 -1
  236. package/dist/isEmptyValue-DZaDHEIw.cjs +0 -30
  237. package/dist/isEmptyValue-DZaDHEIw.cjs.map +0 -1
  238. package/dist/isEqual-D8W3Wizi.cjs.map +0 -1
  239. package/dist/isEqual-ekId-j5b.js.map +0 -1
  240. package/dist/isFinite-BJO7Dt6B.js.map +0 -1
  241. package/dist/isFinite-Crw95XV8.cjs.map +0 -1
  242. package/dist/isInteger-B75voxys.js.map +0 -1
  243. package/dist/isInteger-CSMNm--9.cjs.map +0 -1
  244. package/dist/isPlainObject-ByfuseCf.d.cts +0 -339
  245. package/dist/isPlainObject-ByfuseCf.d.ts +0 -339
  246. package/dist/isServer-BHOSvBhV.js.map +0 -1
  247. package/dist/isServer-HA13Dzo2.cjs.map +0 -1
  248. package/dist/isTypedArray-CWlHRz_O.cjs +0 -43
  249. package/dist/isTypedArray-CWlHRz_O.cjs.map +0 -1
  250. package/dist/isTypedArray-CmnQ7Yx9.js +0 -31
  251. package/dist/isTypedArray-CmnQ7Yx9.js.map +0 -1
  252. package/dist/isValidDomain-BqyLVi7S.js.map +0 -1
  253. package/dist/isValidDomain-ByrOfQsh.cjs.map +0 -1
  254. package/dist/noop-CkwxErJ2.cjs.map +0 -1
  255. package/dist/noop-D_Ots__Z.js.map +0 -1
  256. package/dist/normalizeSpaces-88yaixiu.cjs.map +0 -1
  257. package/dist/normalizeSpaces-Cat8CHtt.js.map +0 -1
  258. package/dist/parsers-BLHzVoh-.js.map +0 -1
  259. package/dist/parsers-xAQmKCgS.cjs.map +0 -1
  260. package/dist/parsing-BYo6U0EG.js.map +0 -1
  261. package/dist/parsing-CuezVd0e.cjs.map +0 -1
  262. package/dist/predicates-BMTIIYx8.js.map +0 -1
  263. package/dist/predicates-ZmZpelMh.cjs.map +0 -1
  264. package/dist/punyCode-COTqgXMJ.js.map +0 -1
  265. package/dist/punyCode-WZ6-GaTM.cjs.map +0 -1
  266. package/dist/removeSpaces-BeGkktUl.cjs.map +0 -1
  267. package/dist/removeSpaces-CQJvw1yU.js.map +0 -1
  268. package/dist/safeJsonParse-BznDD3fi.cjs +0 -208
  269. package/dist/safeJsonParse-BznDD3fi.cjs.map +0 -1
  270. package/dist/safeJsonParse-D8H3wCv7.js.map +0 -1
  271. package/dist/safeStableStringify-4b-E_UHM.cjs +0 -106
  272. package/dist/safeStableStringify-4b-E_UHM.cjs.map +0 -1
  273. package/dist/safeStableStringify-BLwA1VC-.js.map +0 -1
  274. package/dist/tailwind-CjxdO7aL.cjs.map +0 -1
  275. package/dist/tailwind-RSE3obLb.js.map +0 -1
  276. package/dist/toStringArrayUnRecursive-D-jHROts.cjs +0 -51
  277. package/dist/toStringArrayUnRecursive-D-jHROts.cjs.map +0 -1
  278. package/dist/toStringArrayUnRecursive-NreW1dyV.js.map +0 -1
  279. package/dist/urls-C6BvhrrV.cjs +0 -299
  280. package/dist/urls-C6BvhrrV.cjs.map +0 -1
  281. package/dist/urls-CLVfEB7O.js.map +0 -1
@@ -2,28 +2,222 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1-beta.0`
5
+ * Version: `3.14.0-beta.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 { NumberRangeUnion } from "@rzl-zone/ts-types-plus";
11
+ import { D as NumberRangeUnion } from "../index-DZHiYYR7.js";
12
+ type CopyMethod = "clipboard" | "fallback" | "manual";
13
+ type CopyStatus = "success" | "error";
14
+ type CopyResult = {
15
+ /** ---------------------------------------------------------
16
+ * * ***Final operation status.***
17
+ * ----------------------------------------------------------
18
+ *
19
+ * ---
20
+ * Usually `"success"` when copy succeeds, otherwise `"error"`.
21
+ */
22
+ status: CopyStatus;
23
+ /** ---------------------------------------------------------
24
+ * * ***Indicates whether the operation succeeded.***
25
+ * ----------------------------------------------------------
26
+ *
27
+ * Usually `true` on successful copy operations.
28
+ */
29
+ success: boolean;
30
+ /** ---------------------------------------------------------
31
+ * * ***Copy mechanism that was used.***
32
+ * ----------------------------------------------------------
33
+ *
34
+ * - **Possible values:**
35
+ * - `"clipboard"`.
36
+ * - `"fallback"`.
37
+ * - `"manual"`.
38
+ */
39
+ method: CopyMethod;
40
+ /**
41
+ * * ***Optional error object captured during execution.***
42
+ */
43
+ error?: unknown;
44
+ /** ---------------------------------------------------------
45
+ * * ***Optional failure or fallback reason.***
46
+ * ----------------------------------------------------------
47
+ *
48
+ * - **Possible values:**
49
+ * - `"no-browser"`.
50
+ * - `"no-clipboard"`.
51
+ * - `"clipboard-error"`.
52
+ * - `"timeout"`.
53
+ * - `"fallback-failed"`.
54
+ */
55
+ reason?: "no-browser" | "no-clipboard" | "clipboard-error" | "timeout" | "fallback-failed";
56
+ /**
57
+ * * ***Total number of attempts performed.***
58
+ */
59
+ attempts: number;
60
+ /**
61
+ * * ***Total execution duration in milliseconds.***
62
+ */
63
+ duration: number;
64
+ /**
65
+ * * ***Unix timestamp of execution completion.***
66
+ */
67
+ timestamp: number;
68
+ };
69
+ /** ----------------------------------------------------------------------
70
+ * * ***Type: `CopyOptions`.***
71
+ * -----------------------------------------------------------------------
72
+ * **Configuration options for the `copyText` utility.**
73
+ *
74
+ * ---
75
+ * - **Behavior:**
76
+ * - Controls retry attempts and timeout handling.
77
+ * - Enables optional debug logging.
78
+ * - All properties are optional.
79
+ */
80
+ type CopyOptions = {
81
+ /** -----------------------------------------------------------------------
82
+ * * ***Enables internal debug logging.***
83
+ * ------------------------------------------------------------------------
84
+ *
85
+ * @default false
86
+ */
87
+ debug?: boolean;
88
+ /** -----------------------------------------------------------------------
89
+ * * ***Number of retry attempts before fallback.***
90
+ * ------------------------------------------------------------------------
91
+ *
92
+ * @default 1
93
+ */
94
+ retries?: number;
95
+ /** -----------------------------------------------------------------------
96
+ * * ***Timeout duration (in milliseconds) for each Clipboard API attempt.***
97
+ * ------------------------------------------------------------------------
98
+ *
99
+ * @default 2000
100
+ */
101
+ timeout?: number;
102
+ };
103
+ /** ----------------------------------------------------------------------
104
+ * * ***Utility: `copyText`.***
105
+ * -----------------------------------------------------------------------
106
+ * **Copies text to the user's clipboard with robust fallback handling.**
107
+ *
108
+ * ---
109
+ * - **Behavior:**
110
+ * - Attempts to use the modern
111
+ * ***`navigator.clipboard.writeText`*** Clipboard API.
112
+ * - Automatically retries clipboard operations when configured.
113
+ * - Falls back to legacy
114
+ * ***`document.execCommand("copy")`***
115
+ * if the Clipboard API is unavailable or fails.
116
+ * - As a last resort, programmatically selects the text
117
+ * to allow manual copying by the user.
118
+ * - Detects non-browser environments and safely exits
119
+ * without accessing browser-only APIs.
120
+ * - Returns detailed operation metadata including method,
121
+ * duration, attempts, and failure reason.
122
+ * - Does **not throw** on copy failure;
123
+ * instead returns a structured
124
+ * ***{@link CopyResult | `CopyResult`}*** object.
125
+ *
126
+ * ---
127
+ * @param {string} text
128
+ * The text content to copy to the clipboard.
129
+ *
130
+ * @param {CopyOptions} [options={}]
131
+ * Optional configuration object.
132
+ *
133
+ * @param {boolean} [options.debug=false]
134
+ * Enables internal debug logging.
135
+ *
136
+ * @param {number} [options.retries=1]
137
+ * Number of additional retry attempts
138
+ * after the initial Clipboard API attempt.
139
+ *
140
+ * @param {number} [options.timeout=2000]
141
+ * Timeout duration (in milliseconds)
142
+ * for each Clipboard API attempt.
143
+ *
144
+ * ---
145
+ * @returns {Promise<CopyResult>}
146
+ * A promise resolving to a
147
+ * ***{@link CopyResult | `CopyResult`}*** object containing:
148
+ * - `status` ➔ `"success"` or `"error"`.
149
+ * - `success` ➔ Indicates whether the operation succeeded.
150
+ * - `method` ➔ Copy mechanism used
151
+ * (`"clipboard"`, `"fallback"`, or `"manual"`).
152
+ * - `reason` ➔ Optional failure or fallback reason.
153
+ * - `error` ➔ Optional thrown error object.
154
+ * - `attempts` ➔ Total number of attempts performed.
155
+ * - `duration` ➔ Execution duration in milliseconds.
156
+ * - `timestamp` ➔ Unix timestamp of execution.
157
+ *
158
+ * ---
159
+ * @remarks
160
+ * - The Clipboard API requires a secure context
161
+ * (`HTTPS` or `localhost`).
162
+ * - Some browsers or mobile environments may restrict
163
+ * clipboard access without direct user interaction.
164
+ * - Clipboard operations may fail due to browser permission
165
+ * policies or missing user interaction.
166
+ * - Manual selection mode is only triggered when all
167
+ * programmatic copy strategies fail.
168
+ * - In server-side environments,
169
+ * the utility returns `"no-browser"`
170
+ * without attempting DOM access.
171
+ *
172
+ * ---
173
+ * @example
174
+ * ```ts
175
+ * const result = await copyText("Hello world");
176
+ *
177
+ * if (result.success) {
178
+ * console.log(`Copied using ${result.method}`);
179
+ * } else {
180
+ * console.error(result.reason);
181
+ * }
182
+ * ```
183
+ *
184
+ * ---
185
+ * @example
186
+ * ```ts
187
+ * await copyText("Debug mode", {
188
+ * debug: true,
189
+ * retries: 2
190
+ * });
191
+ * ```
192
+ */
193
+ declare function copyText(text: string, options?: CopyOptions): Promise<CopyResult>;
12
194
  /** ----------------------------------------------------------------------
13
195
  * * ***Utility: `findDuplicates`.***
14
- * ----------------------------------------------------------------------
196
+ * -----------------------------------------------------------------------
15
197
  * **Finds duplicate values in an array by deep equality comparison.**
198
+ *
199
+ * ---
16
200
  * - **Behavior:**
17
- * - Uses ***`isEqual` utility function*** to compare elements
18
- * (handles objects, arrays, dates, NaN, etc.).
19
- * - Returns a new array containing only the *first occurrences* of duplicated values.
20
- * - Does **not mutate** the original array.
21
- * - Throws ***{@link TypeError | `TypeError`}*** if input is not an array.
201
+ * - Uses ***`isEqual` utility function*** to compare elements
202
+ * (handles objects, arrays, dates, NaN, etc.).
203
+ * - Returns a new array containing only the *first occurrences* of duplicated values.
204
+ * - Does **not mutate** the original array.
205
+ * - Throws ***{@link TypeError | `TypeError`}*** if input is not an array.
206
+ *
207
+ * ---
22
208
  * @template T Type of elements in the input array.
209
+ *
210
+ * ---
23
211
  * @param {T[]} values - The array to check for duplicates.
212
+ *
213
+ * ---
214
+ * @throws **{@link TypeError | `TypeError`}** if the provided `values` argument is not an array.
215
+ *
216
+ * ---
24
217
  * @returns {T[]} An array of the duplicate values found in the input,
25
218
  * preserving order of their first duplicate appearance.
26
- * @throws **{@link TypeError | `TypeError`}** if the provided `values` argument is not an array.
219
+ *
220
+ * ---
27
221
  * @example
28
222
  * findDuplicates([1, 2, 2, 3, 4, 4]);
29
223
  * // ➔ [2, 4]
@@ -39,62 +233,90 @@ import { NumberRangeUnion } from "@rzl-zone/ts-types-plus";
39
233
  * // ➔ []
40
234
  */
41
235
  declare const findDuplicates: <T>(values: T[]) => T[];
42
- /** --------------------------------
236
+ /** -------------------------------------------------------------------------------
43
237
  * * ***Utility: `omitKeys`.***
44
- * --------------------------------
238
+ * --------------------------------------------------------------------------------
45
239
  * **This function creates a shallow copy of the given object omitting the
46
240
  * specified keys.**
241
+ *
242
+ * ---
47
243
  * - **Behavior:**
48
- * - It will return a new object without mutating the original.
49
- * - It also validates that ***`keysToOmit`*** does not contain duplicate keys.
50
- * - **ℹ️ Internally:**
51
- * - It uses ***`isEqual`*** to check for duplicates in
52
- * the ***`keysToOmit`*** array.
244
+ * - It will return a new object without mutating the original.
245
+ * - It also validates that ***`keysToOmit`*** does not contain duplicate keys.
246
+ *
247
+ * ---
248
+ * - **Internally:**
249
+ * - It uses ***`isEqual`*** to check for duplicates in
250
+ * the ***`keysToOmit`*** array.
251
+ *
252
+ * ---
53
253
  * @template I The type of the input object.
54
254
  * @template K The keys to omit from the object.
255
+ *
256
+ * ---
55
257
  * @param {I} object - The source object to omit keys from.
56
258
  * @param {K[]} keysToOmit - An array of keys to exclude from the returned object.
57
- * @returns {Omit<I, K>} A new object without the specified keys.
259
+ *
260
+ * ---
58
261
  * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.
59
262
  * @throws **{@link Error | `Error`}** if duplicate keys are found in `keysToOmit`.
263
+ *
264
+ * ---
265
+ * @returns {Omit<I, K>} A new object without the specified keys.
266
+ *
267
+ * ---
60
268
  * @example
61
269
  * omitKeys({ a: 1, b: 2, c: 3 }, ["b", "c"]);
62
- * //➔ { a: 1 }
270
+ * // { a: 1 }
63
271
  * omitKeys({ name: "John", age: 30 }, ["age"]);
64
- * //➔ { name: "John" }
272
+ * // { name: "John" }
65
273
  * omitKeys({ a: 1, b: 2 }, []);
66
- * //➔ { a: 1, b: 2 } (no changes)
274
+ * // { a: 1, b: 2 } (no changes)
67
275
  */
68
276
  declare const omitKeys: <I extends Record<string, unknown>, K extends keyof I>(object: I, keysToOmit: K[]) => Omit<I, K>;
69
277
  type IndexArray = NumberRangeUnion<0, 30>;
70
278
  type DotPath<T, Prev extends string = ""> = T extends Array<infer U> ? DotPath<U, `${Prev}${Prev extends "" ? "" : "."}${IndexArray}`> : T extends object ? { [K in keyof T & string]: `${Prev}${Prev extends "" ? "" : "."}${K}` | DotPath<T[K], `${Prev}${Prev extends "" ? "" : "."}${K}`> }[keyof T & string] : never;
71
279
  /** ------------------------------------------------------
72
280
  * * ***Utility: `omitKeysDeep`.***
73
- * ------------------------------------------------------
281
+ * -------------------------------------------------------
74
282
  * **Recursively omits properties from an object using dot notation paths.**
283
+ *
284
+ * ---
75
285
  * - **Behavior:**
76
- * - Removes resulting empty objects (`{}`) and arrays (`[]`), cascading upwards
77
- * to remove empty parents until root if needed.
78
- * - **⚠️ Be careful:**
79
- * - If after omission an object or array becomes empty, it will be removed entirely
80
- * including all the way up to the root if necessary, resulting in `{}`.
81
- * - **ℹ️ Note:**
82
- * - For array indices, TypeScript autocomplete only suggests `0`–`30`
83
- * (to prevent editor lag on large unions).
84
- * However, higher indices are still fully supported at runtime — you can
85
- * manually type `"arr.99.key"` and it will work the same.
86
- * @template I - Type of the input object
286
+ * - Removes resulting empty objects (`{}`) and arrays (`[]`), cascading upwards
287
+ * to remove empty parents until root if needed.
288
+ * ---
289
+ * - **Be careful:**
290
+ * - If after omission an object or array becomes empty, it will be removed entirely
291
+ * including all the way up to the root if necessary, resulting in `{}`.
292
+ * ---
293
+ * - **Note:**
294
+ * - For array indices, TypeScript autocomplete only suggests `0`–`30`
295
+ * (to prevent editor lag on large unions).
296
+ * However, higher indices are still fully supported at runtime — you can
297
+ * manually type `"arr.99.key"` and it will work the same.
298
+ *
299
+ * ---
300
+ * @template I - Type of the input object.
301
+ *
302
+ * ---
87
303
  * @param {I} object
88
304
  * The object to process, should be a plain nested object or array structure.
89
305
  * @param {DotPath<I>[]} keysToOmit
90
306
  * An array of string paths in dot notation indicating the properties to remove, paths
91
307
  * can include numeric indices to target array elements, e.g. `"arr.0.x"` to
92
308
  * remove `x` from the first object inside the `arr` array.
309
+ *
310
+ * ---
311
+ * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.
312
+ * @throws **{@link Error | `Error`}** if `keysToOmit` contains duplicate paths.
313
+ *
314
+ * ---
93
315
  * @returns {Partial<I>}
94
316
  * A new deeply cloned object with the specified keys omitted, with resulting
95
317
  * empty objects or arrays fully removed (even if it collapses to `{}`).
96
- * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.
97
- * @throws **{@link Error | `Error`}** if `keysToOmit` contains duplicate paths.
318
+ *
319
+ * ---
98
320
  * @example
99
321
  * omitKeysDeep({ arr: [{ a: 1 }] }, ["arr.0.a"]);
100
322
  * // ➔ {} (array becomes empty and removed)
@@ -136,4 +358,4 @@ type DotPath<T, Prev extends string = ""> = T extends Array<infer U> ? DotPath<U
136
358
  * // ➔ { mixed: { a: [1, 2, 3] } }
137
359
  */
138
360
  declare const omitKeysDeep: <I extends Record<string, unknown>>(object: I, keysToOmit: DotPath<I>[]) => Partial<I>;
139
- export { findDuplicates, omitKeys, omitKeysDeep };
361
+ export { copyText, findDuplicates, omitKeys, omitKeysDeep };
@@ -2,19 +2,146 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1-beta.0`
5
+ * Version: `3.14.0-beta.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 isPlainObject, D as isNaN, M as isArray, S as isUndefined, p as isNonEmptyArray, x as isObjectOrArray } from "../assertIsBoolean-DDhQ2D-k.js";
11
- import { t as assertIsArray } from "../assertIsArray-DrLORH0Y.js";
12
- import { n as isEmptyArray } from "../isEmptyObject-BYNnSKzw.js";
13
- import { t as safeStableStringify } from "../safeStableStringify-BLwA1VC-.js";
14
- import { t as isEqual } from "../isEqual-ekId-j5b.js";
15
- import { t as safeJsonParse } from "../safeJsonParse-D8H3wCv7.js";
10
+ import { E as isPlainObject, O as isArray, S as isNaN, g as isObjectOrArray, m as isNonEmptyArray, t as createMessage } from "../logger-CLWnKRKE.js";
11
+ import { t as assertIsArray } from "../assertIsArray-CG7L7vlt.js";
12
+ import { r as isEmptyArray } from "../isEmptyValue-kCjnLjbN.js";
13
+ import { r as isUndefined, t as safeStableStringify } from "../safeStableStringify-DfwxmiWn.js";
14
+ import { r as isEqual } from "../isTypedArray-DxsPKrLh.js";
15
+ import { t as safeJsonParse } from "../safeJsonParse-DEVKNDSn.js";
16
+ import { t as isServer } from "../isServer-CQzrX5e0.js";
17
+ async function copyText(text, options) {
18
+ if (!isPlainObject(options)) options = {};
19
+ const now = () => typeof performance !== "undefined" ? performance.now() : Date.now();
20
+ const start = now();
21
+ const timestamp = Date.now();
22
+ if (!!isServer()) return {
23
+ status: "error",
24
+ success: false,
25
+ method: "manual",
26
+ reason: "no-browser",
27
+ attempts: 0,
28
+ duration: now() - start,
29
+ timestamp
30
+ };
31
+ const maxAttempts = Math.max(0, options.retries ?? 1) + 1;
32
+ const timeout = options.timeout ?? 2e3;
33
+ let attempts = 0;
34
+ const log = (...args) => {
35
+ if (options.debug) console.log("[@rzl-zone/utils-js:copyText]: ", ...args);
36
+ };
37
+ const withTimeout = async (promise) => {
38
+ let timer;
39
+ try {
40
+ return await Promise.race([promise, new Promise((_, reject) => {
41
+ timer = setTimeout(() => reject(/* @__PURE__ */ new Error("timeout")), timeout);
42
+ })]);
43
+ } finally {
44
+ clearTimeout(timer);
45
+ }
46
+ };
47
+ const hasClipboard = typeof navigator !== "undefined" && !!navigator.clipboard;
48
+ if (hasClipboard) {
49
+ while (attempts < maxAttempts) {
50
+ attempts++;
51
+ try {
52
+ await withTimeout(navigator.clipboard.writeText(text));
53
+ log("Clipboard success", { attempts });
54
+ return {
55
+ status: "success",
56
+ success: true,
57
+ method: "clipboard",
58
+ attempts,
59
+ duration: now() - start,
60
+ timestamp
61
+ };
62
+ } catch (error) {
63
+ log("Clipboard attempt failed", error);
64
+ if (error instanceof Error && error?.message === "timeout") return {
65
+ status: "error",
66
+ success: false,
67
+ method: "clipboard",
68
+ error,
69
+ reason: "timeout",
70
+ attempts,
71
+ duration: now() - start,
72
+ timestamp
73
+ };
74
+ }
75
+ }
76
+ log("Clipboard exhausted ➔ fallback");
77
+ } else log("No clipboard API");
78
+ attempts++;
79
+ try {
80
+ if (fallbackCopy(text)) return {
81
+ status: "success",
82
+ success: true,
83
+ method: "fallback",
84
+ reason: hasClipboard ? "clipboard-error" : "no-clipboard",
85
+ attempts,
86
+ duration: now() - start,
87
+ timestamp
88
+ };
89
+ } catch (error) {
90
+ log("Fallback error", error);
91
+ }
92
+ attempts++;
93
+ log("Fallback failed ➔ manual select");
94
+ manualSelect(text);
95
+ return {
96
+ status: "error",
97
+ success: false,
98
+ method: "manual",
99
+ reason: "fallback-failed",
100
+ attempts,
101
+ duration: now() - start,
102
+ timestamp
103
+ };
104
+ }
105
+ function fallbackCopy(text) {
106
+ const textarea = document.createElement("textarea");
107
+ textarea.value = text;
108
+ textarea.setAttribute("readonly", "");
109
+ textarea.style.position = "fixed";
110
+ textarea.style.top = "-9999px";
111
+ textarea.style.left = "-9999px";
112
+ textarea.style.opacity = "0";
113
+ textarea.style.fontSize = "16px";
114
+ document.body.appendChild(textarea);
115
+ textarea.focus();
116
+ textarea.select();
117
+ try {
118
+ return document.execCommand("copy");
119
+ } finally {
120
+ textarea.blur();
121
+ setTimeout(() => {
122
+ textarea.remove();
123
+ }, 0);
124
+ }
125
+ }
126
+ function manualSelect(text) {
127
+ const textarea = document.createElement("textarea");
128
+ textarea.value = text;
129
+ textarea.setAttribute("readonly", "");
130
+ textarea.style.position = "fixed";
131
+ textarea.style.top = "-9999px";
132
+ textarea.style.left = "-9999px";
133
+ textarea.style.opacity = "0";
134
+ textarea.style.fontSize = "16px";
135
+ document.body.appendChild(textarea);
136
+ textarea.focus();
137
+ textarea.select();
138
+ setTimeout(() => {
139
+ textarea.blur();
140
+ textarea.remove();
141
+ }, 3e3);
142
+ }
16
143
  const findDuplicates = (values) => {
17
- assertIsArray(values, { message: ({ currentType, validType }) => `First parameter (\`values\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.` });
144
+ assertIsArray(values, { message: ({ currentType, validType }) => createMessage("findDuplicates", `First parameter (\`values\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`) });
18
145
  const duplicates = [];
19
146
  values.forEach((item, index) => {
20
147
  for (let i = index + 1; i < values.length; i++) if (isEqual(item, values[i])) {
@@ -26,16 +153,17 @@ const findDuplicates = (values) => {
26
153
  };
27
154
  const omitKeys = (object, keysToOmit) => {
28
155
  if (!isPlainObject(object)) return {};
29
- assertIsArray(keysToOmit, { message: ({ currentType, validType }) => `Second parameter (\`keysToOmit\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.` });
156
+ assertIsArray(keysToOmit, { message: ({ currentType, validType }) => errorMsg$1(`Second parameter (\`keysToOmit\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`) });
30
157
  const duplicates = findDuplicates(keysToOmit);
31
- if (duplicates.length > 0) throw new Error(`Function "omitKeys" Error: Duplicate keys detected - \`${duplicates}\``);
158
+ if (duplicates.length > 0) throw new Error(errorMsg$1(`Duplicate keys detected - \`${duplicates}\``));
32
159
  return Object.fromEntries(Object.entries(object).filter(([key]) => !keysToOmit.includes(key)));
33
160
  };
161
+ const errorMsg$1 = (msg) => createMessage("omitKeys", msg);
34
162
  const omitKeysDeep = (object, keysToOmit) => {
35
163
  if (!isPlainObject(object)) return {};
36
- assertIsArray(keysToOmit, { message: ({ currentType, validType }) => `Second parameter (\`keysToOmit\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.` });
164
+ assertIsArray(keysToOmit, { message: ({ currentType, validType }) => errorMsg(`Second parameter (\`keysToOmit\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`) });
37
165
  const duplicates = findDuplicates(keysToOmit);
38
- if (isNonEmptyArray(duplicates)) throw new Error(`Function "omitKeysDeep" Error: Duplicate keys detected - \`${safeStableStringify(duplicates, { keepUndefined: true })}\`.`);
166
+ if (isNonEmptyArray(duplicates)) throw new Error(errorMsg(`Duplicate keys detected - \`${safeStableStringify(duplicates, { keepUndefined: true })}\`.`));
39
167
  const omitAtPath = (obj, pathParts) => {
40
168
  if (!isObjectOrArray(obj)) return obj;
41
169
  const [current, ...rest] = pathParts;
@@ -58,5 +186,6 @@ const omitKeysDeep = (object, keysToOmit) => {
58
186
  for (const key of keysToOmit) omitAtPath(result, key.split("."));
59
187
  return deepRemoveEmptyObjects(result);
60
188
  };
61
- export { findDuplicates, omitKeys, omitKeysDeep };
189
+ const errorMsg = (msg) => createMessage("omitKeysDeep", msg);
190
+ export { copyText, findDuplicates, omitKeys, omitKeysDeep };
62
191
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/operations/findDuplicates.ts","../../src/operations/omitKeys.ts","../../src/operations/omitKeysDeep.ts"],"sourcesContent":["import { isEqual } from \"@/predicates/is/isEqual\";\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\n/** ----------------------------------------------------------------------\n * * ***Utility: `findDuplicates`.***\n * ----------------------------------------------------------------------\n * **Finds duplicate values in an array by deep equality comparison.**\n * - **Behavior:**\n * - Uses ***`isEqual` utility function*** to compare elements\n * (handles objects, arrays, dates, NaN, etc.).\n * - Returns a new array containing only the *first occurrences* of duplicated values.\n * - Does **not mutate** the original array.\n * - Throws ***{@link TypeError | `TypeError`}*** if input is not an array.\n * @template T Type of elements in the input array.\n * @param {T[]} values - The array to check for duplicates.\n * @returns {T[]} An array of the duplicate values found in the input,\n * preserving order of their first duplicate appearance.\n * @throws **{@link TypeError | `TypeError`}** if the provided `values` argument is not an array.\n * @example\n * findDuplicates([1, 2, 2, 3, 4, 4]);\n * // ➔ [2, 4]\n * findDuplicates([\"apple\", \"banana\", \"apple\", \"orange\"]);\n * // ➔ [\"apple\"]\n * findDuplicates([{ a: 1 }, { a: 1 }, { a: 2 }]);\n * // ➔ [{ a: 1 }]\n * findDuplicates([NaN, NaN, 1]);\n * // ➔ [NaN]\n * findDuplicates([true, false, true]);\n * // ➔ [true]\n * findDuplicates([1, 2, 3]);\n * // ➔ []\n */\nexport const findDuplicates = <T>(values: T[]): T[] => {\n assertIsArray(values, {\n message: ({ currentType, validType }) =>\n `First parameter (\\`values\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n });\n\n const duplicates: T[] = [];\n values.forEach((item, index) => {\n for (let i = index + 1; i < values.length; i++) {\n if (isEqual(item, values[i])) {\n if (!duplicates.some((dup) => isEqual(dup, item))) {\n duplicates.push(item);\n }\n break;\n }\n }\n });\n\n return duplicates;\n};\n","import { findDuplicates } from \"./findDuplicates\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\n/** --------------------------------\n * * ***Utility: `omitKeys`.***\n * --------------------------------\n * **This function creates a shallow copy of the given object omitting the\n * specified keys.**\n * - **Behavior:**\n * - It will return a new object without mutating the original.\n * - It also validates that ***`keysToOmit`*** does not contain duplicate keys.\n * - **ℹ️ Internally:**\n * - It uses ***`isEqual`*** to check for duplicates in\n * the ***`keysToOmit`*** array.\n * @template I The type of the input object.\n * @template K The keys to omit from the object.\n * @param {I} object - The source object to omit keys from.\n * @param {K[]} keysToOmit - An array of keys to exclude from the returned object.\n * @returns {Omit<I, K>} A new object without the specified keys.\n * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.\n * @throws **{@link Error | `Error`}** if duplicate keys are found in `keysToOmit`.\n * @example\n * omitKeys({ a: 1, b: 2, c: 3 }, [\"b\", \"c\"]);\n * //➔ { a: 1 }\n * omitKeys({ name: \"John\", age: 30 }, [\"age\"]);\n * //➔ { name: \"John\" }\n * omitKeys({ a: 1, b: 2 }, []);\n * //➔ { a: 1, b: 2 } (no changes)\n */\nexport const omitKeys = <I extends Record<string, unknown>, K extends keyof I>(\n object: I,\n keysToOmit: K[]\n): Omit<I, K> => {\n if (!isPlainObject(object)) return {} as Omit<I, K>;\n\n assertIsArray(keysToOmit, {\n message: ({ currentType, validType }) =>\n `Second parameter (\\`keysToOmit\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n });\n\n // Check for duplicate keys\n const duplicates = findDuplicates(keysToOmit);\n if (duplicates.length > 0) {\n throw new Error(\n `Function \"omitKeys\" Error: Duplicate keys detected - \\`${duplicates}\\``\n );\n }\n\n // Remove specified keys\n return Object.fromEntries(\n Object.entries(object).filter(([key]) => !keysToOmit.includes(key as K))\n ) as Omit<I, K>;\n};\n","import type { NumberRangeUnion } from \"@rzl-zone/ts-types-plus\";\n\nimport { findDuplicates } from \"./findDuplicates\";\n\nimport { isNaN } from \"@/predicates/is/isNaN\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isUndefined } from \"@/predicates/is/isUndefined\";\nimport { isEmptyArray } from \"@/predicates/is/isEmptyArray\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isNonEmptyArray } from \"@/predicates/is/isNonEmptyArray\";\nimport { isObjectOrArray } from \"@/predicates/is/isObjectOrArray\";\n\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\nimport { safeJsonParse } from \"@/conversions/json/safeJsonParse\";\nimport { safeStableStringify } from \"@/conversions/stringify/safeStableStringify\";\n\ntype IndexArray = NumberRangeUnion<0, 30>;\ntype DotPath<T, Prev extends string = \"\"> =\n T extends Array<infer U>\n ? DotPath<U, `${Prev}${Prev extends \"\" ? \"\" : \".\"}${IndexArray}`>\n : T extends object\n ? {\n [K in keyof T & string]:\n | `${Prev}${Prev extends \"\" ? \"\" : \".\"}${K}`\n | DotPath<T[K], `${Prev}${Prev extends \"\" ? \"\" : \".\"}${K}`>;\n }[keyof T & string]\n : never;\n\n/** ------------------------------------------------------\n * * ***Utility: `omitKeysDeep`.***\n * ------------------------------------------------------\n * **Recursively omits properties from an object using dot notation paths.**\n * - **Behavior:**\n * - Removes resulting empty objects (`{}`) and arrays (`[]`), cascading upwards\n * to remove empty parents until root if needed.\n * - **⚠️ Be careful:**\n * - If after omission an object or array becomes empty, it will be removed entirely\n * including all the way up to the root if necessary, resulting in `{}`.\n * - **ℹ️ Note:**\n * - For array indices, TypeScript autocomplete only suggests `0`–`30`\n * (to prevent editor lag on large unions).\n * However, higher indices are still fully supported at runtime — you can\n * manually type `\"arr.99.key\"` and it will work the same.\n * @template I - Type of the input object\n * @param {I} object\n * The object to process, should be a plain nested object or array structure.\n * @param {DotPath<I>[]} keysToOmit\n * An array of string paths in dot notation indicating the properties to remove, paths\n * can include numeric indices to target array elements, e.g. `\"arr.0.x\"` to\n * remove `x` from the first object inside the `arr` array.\n * @returns {Partial<I>}\n * A new deeply cloned object with the specified keys omitted, with resulting\n * empty objects or arrays fully removed (even if it collapses to `{}`).\n * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.\n * @throws **{@link Error | `Error`}** if `keysToOmit` contains duplicate paths.\n * @example\n * omitKeysDeep({ arr: [{ a: 1 }] }, [\"arr.0.a\"]);\n * // ➔ {} (array becomes empty and removed)\n * omitKeysDeep({ a: { b: { c: 1 }, d: 2 }, e: 3 }, [\"a.b.c\"]);\n * // ➔ { a: { d: 2 }, e: 3 }\n * omitKeysDeep({ a: [{ b: 1 }, { c: 2 }] }, [\"a.0.b\"]);\n * // ➔ { a: [{ c: 2 }] }\n * omitKeysDeep({ a: [{ b: 1 }] }, [\"a.0.b\"]);\n * // ➔ {} (array becomes empty and removed)\n * omitKeysDeep({ complex: [{ deep: [{ x: 1, y: 2 }] }] }, [\"complex.0.deep.0.x\"]);\n * // ➔ { complex: [{ deep: [{ y: 2 }] }] }\n * omitKeysDeep({ complex: [{ deep: [{ x: 1 }] }] }, [\"complex.0.deep.0.x\"]);\n * // ➔ {} (deep chain emptied and collapsed)\n * omitKeysDeep({ data: [[{ foo: 1, bar: 2 }]] }, [\"data.0.0.foo\"]);\n * // ➔ { data: [[{ bar: 2 }]] }\n * omitKeysDeep({ data: [[{ foo: 1 }]] }, [\"data.0.0.foo\"]);\n * // ➔ {} (nested arrays emptied completely)\n * omitKeysDeep({ x: [{ y: [{ z: 1 }, { w: 2 }] }] }, [\"x.0.y.0.z\"]);\n * // ➔ { x: [{ y: [{ w: 2 }] }] }\n * omitKeysDeep({ x: [{ y: [{ z: 1 }] }] }, [\"x.0.y.0.z\"]);\n * // ➔ {} (entire nested arrays removed)\n * omitKeysDeep({ p: { q: { r: 5 } }, s: 6 }, [\"p.q.r\"]);\n * // ➔ { s: 6 } (`p` removed because it becomes empty)\n * omitKeysDeep({ arr: [{ a: 1, b: 2 }, { c: 3 }] }, [\"arr.0.a\"]);\n * // ➔ { arr: [{ b: 2 }, { c: 3 }] }\n * omitKeysDeep({ root: [{ sub: [{ leaf: 10 }] }] }, [\"root.0.sub.0.leaf\"]);\n * // ➔ {} (deep nested arrays emptied to root)\n * omitKeysDeep({ meta: { tags: [\"x\", \"y\"], count: 2 } }, [\"meta.count\"]);\n * // ➔ { meta: { tags: [\"x\", \"y\"] } }\n * omitKeysDeep({ arr: [[{ a: 1 }, { b: 2 }]] }, [\"arr.0.0.a\"]);\n * // ➔ { arr: [[{ b: 2 }]] }\n * omitKeysDeep({ arr: [[{ a: 1 }]] }, [\"arr.0.0.a\"]);\n * // ➔ {} (double nested emptied)\n * omitKeysDeep({ nested: [{ list: [{ id: 1, val: 2 }] }] }, [\"nested.0.list.0.val\"]);\n * // ➔ { nested: [{ list: [{ id: 1 }] }] }\n * omitKeysDeep({ nested: [{ list: [{ id: 1 }] }] }, [\"nested.0.list.0.id\"]);\n * // ➔ {} (full collapse to empty)\n * omitKeysDeep({ mixed: { a: [1, 2, 3], b: { c: 4 } } }, [\"mixed.b.c\"]);\n * // ➔ { mixed: { a: [1, 2, 3] } }\n */\nexport const omitKeysDeep = <I extends Record<string, unknown>>(\n object: I,\n keysToOmit: DotPath<I>[]\n): Partial<I> => {\n if (!isPlainObject(object)) return {} as Partial<I>;\n\n assertIsArray(keysToOmit, {\n message: ({ currentType, validType }) =>\n `Second parameter (\\`keysToOmit\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n });\n\n const duplicates = findDuplicates(keysToOmit);\n if (isNonEmptyArray(duplicates)) {\n throw new Error(\n `Function \"omitKeysDeep\" Error: Duplicate keys detected - \\`${safeStableStringify(\n duplicates,\n {\n keepUndefined: true\n }\n )}\\`.`\n );\n }\n\n const omitAtPath = (obj: unknown, pathParts: string[]) => {\n if (!isObjectOrArray(obj)) return obj;\n\n const [current, ...rest] = pathParts;\n\n if (isEmptyArray(rest) && current) {\n if (isArray(obj)) {\n // Support numeric index\n const index = parseInt(current);\n if (!isNaN(index) && index in obj) {\n obj.splice(index, 1);\n }\n } else {\n delete obj[current];\n }\n } else {\n const next = current ? obj[current] : undefined;\n if (isObjectOrArray(next) && current) {\n obj[current] = omitAtPath(next, rest);\n }\n }\n return obj;\n };\n\n const deepRemoveEmptyObjects = (obj: unknown): unknown => {\n if (isArray(obj)) {\n return obj\n .map(deepRemoveEmptyObjects)\n .filter(\n (item) => !(isObjectOrArray(item) && Object.keys(item).length === 0)\n );\n }\n if (isObjectOrArray(obj)) {\n const cleaned = Object.fromEntries(\n Object.entries(obj)\n .map(([k, v]) => [k, deepRemoveEmptyObjects(v)])\n .filter(\n ([, v]) =>\n !isUndefined(v) &&\n !(isObjectOrArray(v) && Object.keys(v).length === 0)\n )\n );\n return cleaned;\n }\n return obj;\n };\n\n const result = safeJsonParse(safeStableStringify(object)); // clone deep to avoid mutating original\n for (const key of keysToOmit) {\n const parts = key.split(\".\");\n omitAtPath(result, parts);\n }\n\n return deepRemoveEmptyObjects(result) as Partial<I>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAa,kBAAqB,WAAqB;CACrD,cAAc,QAAQ,EACpB,UAAU,EAAE,aAAa,gBACvB,kDAAkD,UAAU,kDAAkD,YAAY,KAC9H,CAAC;CAED,MAAM,aAAkB,CAAC;CACzB,OAAO,SAAS,MAAM,UAAU;EAC9B,KAAK,IAAI,IAAI,QAAQ,GAAG,IAAI,OAAO,QAAQ,KACzC,IAAI,QAAQ,MAAM,OAAO,EAAE,GAAG;GAC5B,IAAI,CAAC,WAAW,MAAM,QAAQ,QAAQ,KAAK,IAAI,CAAC,GAC9C,WAAW,KAAK,IAAI;GAEtB;EACF;CAEJ,CAAC;CAED,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrBA,MAAa,YACX,QACA,eACe;CACf,IAAI,CAAC,cAAc,MAAM,GAAG,OAAO,CAAC;CAEpC,cAAc,YAAY,EACxB,UAAU,EAAE,aAAa,gBACvB,uDAAuD,UAAU,kDAAkD,YAAY,KACnI,CAAC;CAGD,MAAM,aAAa,eAAe,UAAU;CAC5C,IAAI,WAAW,SAAS,GACtB,MAAM,IAAI,MACR,0DAA0D,WAAW,GACvE;CAIF,OAAO,OAAO,YACZ,OAAO,QAAQ,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,WAAW,SAAS,GAAQ,CAAC,CACzE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC2CA,MAAa,gBACX,QACA,eACe;CACf,IAAI,CAAC,cAAc,MAAM,GAAG,OAAO,CAAC;CAEpC,cAAc,YAAY,EACxB,UAAU,EAAE,aAAa,gBACvB,uDAAuD,UAAU,kDAAkD,YAAY,KACnI,CAAC;CAED,MAAM,aAAa,eAAe,UAAU;CAC5C,IAAI,gBAAgB,UAAU,GAC5B,MAAM,IAAI,MACR,8DAA8D,oBAC5D,YACA,EACE,eAAe,KACjB,CACF,EAAE,IACJ;CAGF,MAAM,cAAc,KAAc,cAAwB;EACxD,IAAI,CAAC,gBAAgB,GAAG,GAAG,OAAO;EAElC,MAAM,CAAC,SAAS,GAAG,QAAQ;EAE3B,IAAI,aAAa,IAAI,KAAK,SACxB,IAAI,QAAQ,GAAG,GAAG;GAEhB,MAAM,QAAQ,SAAS,OAAO;GAC9B,IAAI,CAAC,MAAM,KAAK,KAAK,SAAS,KAC5B,IAAI,OAAO,OAAO,CAAC;EAEvB,OACE,OAAO,IAAI;OAER;GACL,MAAM,OAAO,UAAU,IAAI,WAAW;GACtC,IAAI,gBAAgB,IAAI,KAAK,SAC3B,IAAI,WAAW,WAAW,MAAM,IAAI;EAExC;EACA,OAAO;CACT;CAEA,MAAM,0BAA0B,QAA0B;EACxD,IAAI,QAAQ,GAAG,GACb,OAAO,IACJ,IAAI,sBAAsB,EAC1B,QACE,SAAS,EAAE,gBAAgB,IAAI,KAAK,OAAO,KAAK,IAAI,EAAE,WAAW,EACpE;EAEJ,IAAI,gBAAgB,GAAG,GAUrB,OATgB,OAAO,YACrB,OAAO,QAAQ,GAAG,EACf,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC,EAC9C,QACE,GAAG,OACF,CAAC,YAAY,CAAC,KACd,EAAE,gBAAgB,CAAC,KAAK,OAAO,KAAK,CAAC,EAAE,WAAW,EACtD,CAES;EAEf,OAAO;CACT;CAEA,MAAM,SAAS,cAAc,oBAAoB,MAAM,CAAC;CACxD,KAAK,MAAM,OAAO,YAEhB,WAAW,QADG,IAAI,MAAM,GACD,CAAC;CAG1B,OAAO,uBAAuB,MAAM;AACtC"}
1
+ {"version":3,"file":"index.js","names":["errorMsg"],"sources":["../../src/operations/copyText.ts","../../src/operations/findDuplicates.ts","../../src/operations/omitKeys.ts","../../src/operations/omitKeysDeep.ts"],"sourcesContent":["import { isPlainObject, isServer } from \"@/predicates\";\n\ntype CopyMethod = \"clipboard\" | \"fallback\" | \"manual\";\ntype CopyStatus = \"success\" | \"error\";\n\ntype CopyResult = {\n /** ---------------------------------------------------------\n * * ***Final operation status.***\n * ----------------------------------------------------------\n *\n * ---\n * Usually `\"success\"` when copy succeeds, otherwise `\"error\"`.\n */\n status: CopyStatus;\n\n /** ---------------------------------------------------------\n * * ***Indicates whether the operation succeeded.***\n * ----------------------------------------------------------\n *\n * Usually `true` on successful copy operations.\n */\n success: boolean;\n\n /** ---------------------------------------------------------\n * * ***Copy mechanism that was used.***\n * ----------------------------------------------------------\n *\n * - **Possible values:**\n * - `\"clipboard\"`.\n * - `\"fallback\"`.\n * - `\"manual\"`.\n */\n method: CopyMethod;\n\n /**\n * * ***Optional error object captured during execution.***\n */\n error?: unknown;\n\n /** ---------------------------------------------------------\n * * ***Optional failure or fallback reason.***\n * ----------------------------------------------------------\n *\n * - **Possible values:**\n * - `\"no-browser\"`.\n * - `\"no-clipboard\"`.\n * - `\"clipboard-error\"`.\n * - `\"timeout\"`.\n * - `\"fallback-failed\"`.\n */\n reason?:\n | \"no-browser\"\n | \"no-clipboard\"\n | \"clipboard-error\"\n | \"timeout\"\n | \"fallback-failed\";\n\n /**\n * * ***Total number of attempts performed.***\n */\n attempts: number;\n\n /**\n * * ***Total execution duration in milliseconds.***\n */\n duration: number;\n\n /**\n * * ***Unix timestamp of execution completion.***\n */\n timestamp: number;\n};\n\n/** ----------------------------------------------------------------------\n * * ***Type: `CopyOptions`.***\n * -----------------------------------------------------------------------\n * **Configuration options for the `copyText` utility.**\n *\n * ---\n * - **Behavior:**\n * - Controls retry attempts and timeout handling.\n * - Enables optional debug logging.\n * - All properties are optional.\n */\ntype CopyOptions = {\n /** -----------------------------------------------------------------------\n * * ***Enables internal debug logging.***\n * ------------------------------------------------------------------------\n *\n * @default false\n */\n debug?: boolean;\n\n /** -----------------------------------------------------------------------\n * * ***Number of retry attempts before fallback.***\n * ------------------------------------------------------------------------\n *\n * @default 1\n */\n retries?: number;\n\n /** -----------------------------------------------------------------------\n * * ***Timeout duration (in milliseconds) for each Clipboard API attempt.***\n * ------------------------------------------------------------------------\n *\n * @default 2000\n */\n timeout?: number;\n};\n\n/** ----------------------------------------------------------------------\n * * ***Utility: `copyText`.***\n * -----------------------------------------------------------------------\n * **Copies text to the user's clipboard with robust fallback handling.**\n *\n * ---\n * - **Behavior:**\n * - Attempts to use the modern\n * ***`navigator.clipboard.writeText`*** Clipboard API.\n * - Automatically retries clipboard operations when configured.\n * - Falls back to legacy\n * ***`document.execCommand(\"copy\")`***\n * if the Clipboard API is unavailable or fails.\n * - As a last resort, programmatically selects the text\n * to allow manual copying by the user.\n * - Detects non-browser environments and safely exits\n * without accessing browser-only APIs.\n * - Returns detailed operation metadata including method,\n * duration, attempts, and failure reason.\n * - Does **not throw** on copy failure;\n * instead returns a structured\n * ***{@link CopyResult | `CopyResult`}*** object.\n *\n * ---\n * @param {string} text\n * The text content to copy to the clipboard.\n *\n * @param {CopyOptions} [options={}]\n * Optional configuration object.\n *\n * @param {boolean} [options.debug=false]\n * Enables internal debug logging.\n *\n * @param {number} [options.retries=1]\n * Number of additional retry attempts\n * after the initial Clipboard API attempt.\n *\n * @param {number} [options.timeout=2000]\n * Timeout duration (in milliseconds)\n * for each Clipboard API attempt.\n *\n * ---\n * @returns {Promise<CopyResult>}\n * A promise resolving to a\n * ***{@link CopyResult | `CopyResult`}*** object containing:\n * - `status` ➔ `\"success\"` or `\"error\"`.\n * - `success` ➔ Indicates whether the operation succeeded.\n * - `method` ➔ Copy mechanism used\n * (`\"clipboard\"`, `\"fallback\"`, or `\"manual\"`).\n * - `reason` ➔ Optional failure or fallback reason.\n * - `error` ➔ Optional thrown error object.\n * - `attempts` ➔ Total number of attempts performed.\n * - `duration` ➔ Execution duration in milliseconds.\n * - `timestamp` ➔ Unix timestamp of execution.\n *\n * ---\n * @remarks\n * - The Clipboard API requires a secure context\n * (`HTTPS` or `localhost`).\n * - Some browsers or mobile environments may restrict\n * clipboard access without direct user interaction.\n * - Clipboard operations may fail due to browser permission\n * policies or missing user interaction.\n * - Manual selection mode is only triggered when all\n * programmatic copy strategies fail.\n * - In server-side environments,\n * the utility returns `\"no-browser\"`\n * without attempting DOM access.\n *\n * ---\n * @example\n * ```ts\n * const result = await copyText(\"Hello world\");\n *\n * if (result.success) {\n * console.log(`Copied using ${result.method}`);\n * } else {\n * console.error(result.reason);\n * }\n * ```\n *\n * ---\n * @example\n * ```ts\n * await copyText(\"Debug mode\", {\n * debug: true,\n * retries: 2\n * });\n * ```\n */\nexport async function copyText(\n text: string,\n options?: CopyOptions\n): Promise<CopyResult> {\n if (!isPlainObject(options)) options = {};\n\n const now = () =>\n typeof performance !== \"undefined\" ? performance.now() : Date.now();\n const start = now();\n const timestamp = Date.now();\n const isBrowser = !isServer();\n\n if (!isBrowser) {\n return {\n status: \"error\",\n success: false,\n method: \"manual\",\n reason: \"no-browser\",\n attempts: 0,\n duration: now() - start,\n timestamp\n };\n }\n\n const retries = Math.max(0, options.retries ?? 1);\n const maxAttempts = retries + 1;\n const timeout = options.timeout ?? 2000;\n\n let attempts = 0;\n\n const log = (...args: unknown[]) => {\n if (options.debug) console.log(\"[@rzl-zone/utils-js:copyText]: \", ...args);\n };\n\n const withTimeout = async <T>(promise: Promise<T>) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n try {\n return await Promise.race([\n promise,\n new Promise<never>((_, reject) => {\n timer = setTimeout(() => reject(new Error(\"timeout\")), timeout);\n })\n ]);\n } finally {\n clearTimeout(timer);\n }\n };\n\n const hasClipboard =\n typeof navigator !== \"undefined\" && !!navigator.clipboard;\n\n // === TRY CLIPBOARD API ===\n if (hasClipboard) {\n while (attempts < maxAttempts) {\n attempts++;\n try {\n await withTimeout(navigator.clipboard.writeText(text));\n log(\"Clipboard success\", { attempts });\n\n return {\n status: \"success\",\n success: true,\n method: \"clipboard\",\n attempts,\n duration: now() - start,\n timestamp\n };\n } catch (error: unknown) {\n log(\"Clipboard attempt failed\", error);\n\n if (error instanceof Error && error?.message === \"timeout\") {\n return {\n status: \"error\",\n success: false,\n method: \"clipboard\",\n error,\n reason: \"timeout\",\n attempts,\n duration: now() - start,\n timestamp\n };\n }\n }\n }\n\n log(\"Clipboard exhausted ➔ fallback\");\n } else {\n log(\"No clipboard API\");\n }\n\n // === FALLBACK ===\n attempts++;\n\n try {\n const ok = fallbackCopy(text);\n\n if (ok) {\n return {\n status: \"success\",\n success: true,\n method: \"fallback\",\n reason: hasClipboard ? \"clipboard-error\" : \"no-clipboard\",\n attempts,\n duration: now() - start,\n timestamp\n };\n }\n } catch (error) {\n log(\"Fallback error\", error);\n }\n\n // === LAST RESORT: MANUAL SELECT ===\n attempts++;\n\n log(\"Fallback failed ➔ manual select\");\n\n manualSelect(text);\n\n return {\n status: \"error\",\n success: false,\n method: \"manual\",\n reason: \"fallback-failed\",\n attempts,\n duration: now() - start,\n timestamp\n };\n}\n\n// --- fallback ---\nfunction fallbackCopy(text: string): boolean {\n const textarea = document.createElement(\"textarea\");\n textarea.value = text;\n\n textarea.setAttribute(\"readonly\", \"\");\n\n textarea.style.position = \"fixed\";\n textarea.style.top = \"-9999px\";\n textarea.style.left = \"-9999px\";\n textarea.style.opacity = \"0\";\n textarea.style.fontSize = \"16px\";\n\n document.body.appendChild(textarea);\n textarea.focus();\n textarea.select();\n\n try {\n return document.execCommand(\"copy\");\n } finally {\n textarea.blur();\n\n setTimeout(() => {\n textarea.remove();\n }, 0);\n }\n}\n\n// --- manual select ---\nfunction manualSelect(text: string) {\n const textarea = document.createElement(\"textarea\");\n textarea.value = text;\n\n textarea.setAttribute(\"readonly\", \"\");\n\n textarea.style.position = \"fixed\";\n textarea.style.top = \"-9999px\";\n textarea.style.left = \"-9999px\";\n textarea.style.opacity = \"0\";\n textarea.style.fontSize = \"16px\";\n\n document.body.appendChild(textarea);\n\n textarea.focus();\n textarea.select();\n\n setTimeout(() => {\n textarea.blur();\n\n textarea.remove();\n }, 3000);\n}\n","import { createMessage } from \"@/_private/logger\";\n\nimport { isEqual } from \"@/predicates/is/isEqual\";\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\n/** ----------------------------------------------------------------------\n * * ***Utility: `findDuplicates`.***\n * -----------------------------------------------------------------------\n * **Finds duplicate values in an array by deep equality comparison.**\n *\n * ---\n * - **Behavior:**\n * - Uses ***`isEqual` utility function*** to compare elements\n * (handles objects, arrays, dates, NaN, etc.).\n * - Returns a new array containing only the *first occurrences* of duplicated values.\n * - Does **not mutate** the original array.\n * - Throws ***{@link TypeError | `TypeError`}*** if input is not an array.\n *\n * ---\n * @template T Type of elements in the input array.\n *\n * ---\n * @param {T[]} values - The array to check for duplicates.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}** if the provided `values` argument is not an array.\n *\n * ---\n * @returns {T[]} An array of the duplicate values found in the input,\n * preserving order of their first duplicate appearance.\n *\n * ---\n * @example\n * findDuplicates([1, 2, 2, 3, 4, 4]);\n * // ➔ [2, 4]\n * findDuplicates([\"apple\", \"banana\", \"apple\", \"orange\"]);\n * // ➔ [\"apple\"]\n * findDuplicates([{ a: 1 }, { a: 1 }, { a: 2 }]);\n * // ➔ [{ a: 1 }]\n * findDuplicates([NaN, NaN, 1]);\n * // ➔ [NaN]\n * findDuplicates([true, false, true]);\n * // ➔ [true]\n * findDuplicates([1, 2, 3]);\n * // ➔ []\n */\nexport const findDuplicates = <T>(values: T[]): T[] => {\n assertIsArray(values, {\n message: ({ currentType, validType }) =>\n createMessage(\n \"findDuplicates\",\n `First parameter (\\`values\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n )\n });\n\n const duplicates: T[] = [];\n values.forEach((item, index) => {\n for (let i = index + 1; i < values.length; i++) {\n if (isEqual(item, values[i])) {\n if (!duplicates.some((dup) => isEqual(dup, item))) {\n duplicates.push(item);\n }\n break;\n }\n }\n });\n\n return duplicates;\n};\n","import { createMessage } from \"@/_private/logger\";\n\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\nimport { findDuplicates } from \"./findDuplicates\";\n\n/** -------------------------------------------------------------------------------\n * * ***Utility: `omitKeys`.***\n * --------------------------------------------------------------------------------\n * **This function creates a shallow copy of the given object omitting the\n * specified keys.**\n *\n * ---\n * - **Behavior:**\n * - It will return a new object without mutating the original.\n * - It also validates that ***`keysToOmit`*** does not contain duplicate keys.\n *\n * ---\n * - **Internally:**\n * - It uses ***`isEqual`*** to check for duplicates in\n * the ***`keysToOmit`*** array.\n *\n * ---\n * @template I The type of the input object.\n * @template K The keys to omit from the object.\n *\n * ---\n * @param {I} object - The source object to omit keys from.\n * @param {K[]} keysToOmit - An array of keys to exclude from the returned object.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.\n * @throws **{@link Error | `Error`}** if duplicate keys are found in `keysToOmit`.\n *\n * ---\n * @returns {Omit<I, K>} A new object without the specified keys.\n *\n * ---\n * @example\n * omitKeys({ a: 1, b: 2, c: 3 }, [\"b\", \"c\"]);\n * // ➔ { a: 1 }\n * omitKeys({ name: \"John\", age: 30 }, [\"age\"]);\n * // ➔ { name: \"John\" }\n * omitKeys({ a: 1, b: 2 }, []);\n * // ➔ { a: 1, b: 2 } (no changes)\n */\nexport const omitKeys = <I extends Record<string, unknown>, K extends keyof I>(\n object: I,\n keysToOmit: K[]\n): Omit<I, K> => {\n if (!isPlainObject(object)) return {} as Omit<I, K>;\n\n assertIsArray(keysToOmit, {\n message: ({ currentType, validType }) =>\n errorMsg(\n `Second parameter (\\`keysToOmit\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n )\n });\n\n // Check for duplicate keys\n const duplicates = findDuplicates(keysToOmit);\n if (duplicates.length > 0) {\n throw new Error(errorMsg(`Duplicate keys detected - \\`${duplicates}\\``));\n }\n\n // Remove specified keys\n return Object.fromEntries(\n Object.entries(object).filter(([key]) => !keysToOmit.includes(key as K))\n ) as Omit<I, K>;\n};\n\n/**\n * @internal ***`Not part of the public API.`***\n */\nconst errorMsg = (msg: string) => createMessage(\"omitKeys\", msg);\n","import type { NumberRangeUnion } from \"@rzl-zone/ts-types-plus\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\n\nimport { safeJsonParse } from \"@/conversions/json/safeJsonParse\";\nimport { safeStableStringify } from \"@/conversions/stringify/safeStableStringify\";\n\nimport { isNaN } from \"@/predicates/is/isNaN\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isUndefined } from \"@/predicates/is/isUndefined\";\nimport { isEmptyArray } from \"@/predicates/is/isEmptyArray\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isNonEmptyArray } from \"@/predicates/is/isNonEmptyArray\";\nimport { isObjectOrArray } from \"@/predicates/is/isObjectOrArray\";\n\nimport { findDuplicates } from \"./findDuplicates\";\n\ntype IndexArray = NumberRangeUnion<0, 30>;\ntype DotPath<T, Prev extends string = \"\"> =\n T extends Array<infer U>\n ? DotPath<U, `${Prev}${Prev extends \"\" ? \"\" : \".\"}${IndexArray}`>\n : T extends object\n ? {\n [K in keyof T & string]:\n | `${Prev}${Prev extends \"\" ? \"\" : \".\"}${K}`\n | DotPath<T[K], `${Prev}${Prev extends \"\" ? \"\" : \".\"}${K}`>;\n }[keyof T & string]\n : never;\n\n/** ------------------------------------------------------\n * * ***Utility: `omitKeysDeep`.***\n * -------------------------------------------------------\n * **Recursively omits properties from an object using dot notation paths.**\n *\n * ---\n * - **Behavior:**\n * - Removes resulting empty objects (`{}`) and arrays (`[]`), cascading upwards\n * to remove empty parents until root if needed.\n * ---\n * - **Be careful:**\n * - If after omission an object or array becomes empty, it will be removed entirely\n * including all the way up to the root if necessary, resulting in `{}`.\n * ---\n * - **Note:**\n * - For array indices, TypeScript autocomplete only suggests `0`–`30`\n * (to prevent editor lag on large unions).\n * However, higher indices are still fully supported at runtime — you can\n * manually type `\"arr.99.key\"` and it will work the same.\n *\n * ---\n * @template I - Type of the input object.\n *\n * ---\n * @param {I} object\n * The object to process, should be a plain nested object or array structure.\n * @param {DotPath<I>[]} keysToOmit\n * An array of string paths in dot notation indicating the properties to remove, paths\n * can include numeric indices to target array elements, e.g. `\"arr.0.x\"` to\n * remove `x` from the first object inside the `arr` array.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}** if `keysToOmit` is not an array.\n * @throws **{@link Error | `Error`}** if `keysToOmit` contains duplicate paths.\n *\n * ---\n * @returns {Partial<I>}\n * A new deeply cloned object with the specified keys omitted, with resulting\n * empty objects or arrays fully removed (even if it collapses to `{}`).\n *\n * ---\n * @example\n * omitKeysDeep({ arr: [{ a: 1 }] }, [\"arr.0.a\"]);\n * // ➔ {} (array becomes empty and removed)\n * omitKeysDeep({ a: { b: { c: 1 }, d: 2 }, e: 3 }, [\"a.b.c\"]);\n * // ➔ { a: { d: 2 }, e: 3 }\n * omitKeysDeep({ a: [{ b: 1 }, { c: 2 }] }, [\"a.0.b\"]);\n * // ➔ { a: [{ c: 2 }] }\n * omitKeysDeep({ a: [{ b: 1 }] }, [\"a.0.b\"]);\n * // ➔ {} (array becomes empty and removed)\n * omitKeysDeep({ complex: [{ deep: [{ x: 1, y: 2 }] }] }, [\"complex.0.deep.0.x\"]);\n * // ➔ { complex: [{ deep: [{ y: 2 }] }] }\n * omitKeysDeep({ complex: [{ deep: [{ x: 1 }] }] }, [\"complex.0.deep.0.x\"]);\n * // ➔ {} (deep chain emptied and collapsed)\n * omitKeysDeep({ data: [[{ foo: 1, bar: 2 }]] }, [\"data.0.0.foo\"]);\n * // ➔ { data: [[{ bar: 2 }]] }\n * omitKeysDeep({ data: [[{ foo: 1 }]] }, [\"data.0.0.foo\"]);\n * // ➔ {} (nested arrays emptied completely)\n * omitKeysDeep({ x: [{ y: [{ z: 1 }, { w: 2 }] }] }, [\"x.0.y.0.z\"]);\n * // ➔ { x: [{ y: [{ w: 2 }] }] }\n * omitKeysDeep({ x: [{ y: [{ z: 1 }] }] }, [\"x.0.y.0.z\"]);\n * // ➔ {} (entire nested arrays removed)\n * omitKeysDeep({ p: { q: { r: 5 } }, s: 6 }, [\"p.q.r\"]);\n * // ➔ { s: 6 } (`p` removed because it becomes empty)\n * omitKeysDeep({ arr: [{ a: 1, b: 2 }, { c: 3 }] }, [\"arr.0.a\"]);\n * // ➔ { arr: [{ b: 2 }, { c: 3 }] }\n * omitKeysDeep({ root: [{ sub: [{ leaf: 10 }] }] }, [\"root.0.sub.0.leaf\"]);\n * // ➔ {} (deep nested arrays emptied to root)\n * omitKeysDeep({ meta: { tags: [\"x\", \"y\"], count: 2 } }, [\"meta.count\"]);\n * // ➔ { meta: { tags: [\"x\", \"y\"] } }\n * omitKeysDeep({ arr: [[{ a: 1 }, { b: 2 }]] }, [\"arr.0.0.a\"]);\n * // ➔ { arr: [[{ b: 2 }]] }\n * omitKeysDeep({ arr: [[{ a: 1 }]] }, [\"arr.0.0.a\"]);\n * // ➔ {} (double nested emptied)\n * omitKeysDeep({ nested: [{ list: [{ id: 1, val: 2 }] }] }, [\"nested.0.list.0.val\"]);\n * // ➔ { nested: [{ list: [{ id: 1 }] }] }\n * omitKeysDeep({ nested: [{ list: [{ id: 1 }] }] }, [\"nested.0.list.0.id\"]);\n * // ➔ {} (full collapse to empty)\n * omitKeysDeep({ mixed: { a: [1, 2, 3], b: { c: 4 } } }, [\"mixed.b.c\"]);\n * // ➔ { mixed: { a: [1, 2, 3] } }\n */\nexport const omitKeysDeep = <I extends Record<string, unknown>>(\n object: I,\n keysToOmit: DotPath<I>[]\n): Partial<I> => {\n if (!isPlainObject(object)) return {} as Partial<I>;\n\n assertIsArray(keysToOmit, {\n message: ({ currentType, validType }) =>\n errorMsg(\n `Second parameter (\\`keysToOmit\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n )\n });\n\n const duplicates = findDuplicates(keysToOmit);\n if (isNonEmptyArray(duplicates)) {\n throw new Error(\n errorMsg(\n `Duplicate keys detected - \\`${safeStableStringify(duplicates, {\n keepUndefined: true\n })}\\`.`\n )\n );\n }\n\n const omitAtPath = (obj: unknown, pathParts: string[]) => {\n if (!isObjectOrArray(obj)) return obj;\n\n const [current, ...rest] = pathParts;\n\n if (isEmptyArray(rest) && current) {\n if (isArray(obj)) {\n // Support numeric index\n const index = parseInt(current);\n if (!isNaN(index) && index in obj) {\n obj.splice(index, 1);\n }\n } else {\n delete obj[current];\n }\n } else {\n const next = current ? obj[current] : undefined;\n if (isObjectOrArray(next) && current) {\n obj[current] = omitAtPath(next, rest);\n }\n }\n return obj;\n };\n\n const deepRemoveEmptyObjects = (obj: unknown): unknown => {\n if (isArray(obj)) {\n return obj\n .map(deepRemoveEmptyObjects)\n .filter(\n (item) => !(isObjectOrArray(item) && Object.keys(item).length === 0)\n );\n }\n if (isObjectOrArray(obj)) {\n const cleaned = Object.fromEntries(\n Object.entries(obj)\n .map(([k, v]) => [k, deepRemoveEmptyObjects(v)])\n .filter(\n ([, v]) =>\n !isUndefined(v) &&\n !(isObjectOrArray(v) && Object.keys(v).length === 0)\n )\n );\n return cleaned;\n }\n return obj;\n };\n\n const result = safeJsonParse(safeStableStringify(object)); // clone deep to avoid mutating original\n for (const key of keysToOmit) {\n const parts = key.split(\".\");\n omitAtPath(result, parts);\n }\n\n return deepRemoveEmptyObjects(result) as Partial<I>;\n};\n\n/**\n * @internal ***`Not part of the public API.`***\n */\nconst errorMsg = (msg: string) => createMessage(\"omitKeysDeep\", msg);\n"],"mappings":"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"}
@@ -2,12 +2,12 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1-beta.0`
5
+ * Version: `3.14.0-beta.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_parsers = require('../parsers-xAQmKCgS.cjs');
12
+ const require_parsers = require('../parsers-i8WEeMJl.cjs');
13
13
  exports.extractFileName = require_parsers.extractFileName;