es-toolkit 1.6.1-dev.137 → 1.6.1-dev.138

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 (274) hide show
  1. package/dist/array/compact.d.mts +1 -0
  2. package/dist/array/compact.d.ts +1 -0
  3. package/dist/array/compact.js.map +1 -1
  4. package/dist/array/compact.mjs +1 -1
  5. package/dist/array/drop.d.mts +1 -0
  6. package/dist/array/drop.d.ts +1 -0
  7. package/dist/array/drop.js.map +1 -1
  8. package/dist/array/drop.mjs +1 -1
  9. package/dist/array/dropRight.d.mts +1 -0
  10. package/dist/array/dropRight.d.ts +1 -0
  11. package/dist/array/dropRight.js.map +1 -1
  12. package/dist/array/dropRight.mjs +1 -1
  13. package/dist/array/dropRightWhile.d.mts +1 -0
  14. package/dist/array/dropRightWhile.d.ts +1 -0
  15. package/dist/array/dropRightWhile.js.map +1 -1
  16. package/dist/array/dropRightWhile.mjs +2 -2
  17. package/dist/array/dropWhile.d.mts +1 -0
  18. package/dist/array/dropWhile.d.ts +1 -0
  19. package/dist/array/dropWhile.js.map +1 -1
  20. package/dist/array/dropWhile.mjs +1 -1
  21. package/dist/array/groupBy.d.mts +2 -0
  22. package/dist/array/groupBy.d.ts +2 -0
  23. package/dist/array/groupBy.js.map +1 -1
  24. package/dist/array/groupBy.mjs +1 -1
  25. package/dist/array/index.js.map +1 -1
  26. package/dist/array/index.mjs +28 -28
  27. package/dist/array/intersection.d.mts +1 -0
  28. package/dist/array/intersection.d.ts +1 -0
  29. package/dist/array/intersection.js.map +1 -1
  30. package/dist/array/intersection.mjs +1 -1
  31. package/dist/array/intersectionBy.d.mts +2 -0
  32. package/dist/array/intersectionBy.d.ts +2 -0
  33. package/dist/array/intersectionBy.js.map +1 -1
  34. package/dist/array/intersectionBy.mjs +1 -1
  35. package/dist/array/intersectionWith.d.mts +1 -0
  36. package/dist/array/intersectionWith.d.ts +1 -0
  37. package/dist/array/intersectionWith.js.map +1 -1
  38. package/dist/array/intersectionWith.mjs +1 -1
  39. package/dist/array/keyBy.d.mts +2 -0
  40. package/dist/array/keyBy.d.ts +2 -0
  41. package/dist/array/keyBy.js.map +1 -1
  42. package/dist/array/keyBy.mjs +1 -1
  43. package/dist/array/maxBy.d.mts +1 -0
  44. package/dist/array/maxBy.d.ts +1 -0
  45. package/dist/array/maxBy.js.map +1 -1
  46. package/dist/array/maxBy.mjs +1 -1
  47. package/dist/array/minBy.d.mts +1 -0
  48. package/dist/array/minBy.d.ts +1 -0
  49. package/dist/array/minBy.js.map +1 -1
  50. package/dist/array/minBy.mjs +1 -1
  51. package/dist/array/partition.d.mts +1 -0
  52. package/dist/array/partition.d.ts +1 -0
  53. package/dist/array/partition.js.map +1 -1
  54. package/dist/array/partition.mjs +1 -1
  55. package/dist/array/sample.d.mts +1 -0
  56. package/dist/array/sample.d.ts +1 -0
  57. package/dist/array/sample.js.map +1 -1
  58. package/dist/array/sample.mjs +1 -1
  59. package/dist/array/sampleSize.d.mts +1 -0
  60. package/dist/array/sampleSize.d.ts +1 -0
  61. package/dist/array/sampleSize.js.map +1 -1
  62. package/dist/array/sampleSize.mjs +2 -2
  63. package/dist/array/shuffle.d.mts +1 -0
  64. package/dist/array/shuffle.d.ts +1 -0
  65. package/dist/array/shuffle.js.map +1 -1
  66. package/dist/array/shuffle.mjs +1 -1
  67. package/dist/array/takeRight.d.mts +1 -0
  68. package/dist/array/takeRight.d.ts +1 -0
  69. package/dist/array/takeRight.js.map +1 -1
  70. package/dist/array/takeRight.mjs +1 -1
  71. package/dist/array/union.d.mts +1 -0
  72. package/dist/array/union.d.ts +1 -0
  73. package/dist/array/union.js.map +1 -1
  74. package/dist/array/union.mjs +2 -2
  75. package/dist/array/unionBy.d.mts +2 -0
  76. package/dist/array/unionBy.d.ts +2 -0
  77. package/dist/array/unionBy.js.map +1 -1
  78. package/dist/array/unionBy.mjs +1 -1
  79. package/dist/array/unionWith.d.mts +1 -0
  80. package/dist/array/unionWith.d.ts +1 -0
  81. package/dist/array/unionWith.js.map +1 -1
  82. package/dist/array/unionWith.mjs +2 -2
  83. package/dist/array/uniq.d.mts +1 -0
  84. package/dist/array/uniq.d.ts +1 -0
  85. package/dist/array/uniq.js.map +1 -1
  86. package/dist/array/uniq.mjs +1 -1
  87. package/dist/array/uniqBy.d.mts +2 -0
  88. package/dist/array/uniqBy.d.ts +2 -0
  89. package/dist/array/uniqBy.js.map +1 -1
  90. package/dist/array/uniqBy.mjs +1 -1
  91. package/dist/array/uniqWith.d.mts +1 -0
  92. package/dist/array/uniqWith.d.ts +1 -0
  93. package/dist/array/uniqWith.js.map +1 -1
  94. package/dist/array/uniqWith.mjs +1 -1
  95. package/dist/array/xor.d.mts +1 -0
  96. package/dist/array/xor.d.ts +1 -0
  97. package/dist/array/xor.js.map +1 -1
  98. package/dist/array/xor.mjs +4 -4
  99. package/dist/array/xorBy.js.map +1 -1
  100. package/dist/array/xorBy.mjs +3 -3
  101. package/dist/array/xorWith.js.map +1 -1
  102. package/dist/array/xorWith.mjs +4 -4
  103. package/dist/array/zipObject.d.mts +2 -0
  104. package/dist/array/zipObject.d.ts +2 -0
  105. package/dist/array/zipObject.js.map +1 -1
  106. package/dist/array/zipObject.mjs +1 -1
  107. package/dist/{chunk-2PFDLYQC.mjs → chunk-237HGSZS.mjs} +1 -1
  108. package/dist/chunk-237HGSZS.mjs.map +1 -0
  109. package/dist/{chunk-DOOIIHT3.mjs → chunk-2KNLZB7V.mjs} +1 -1
  110. package/dist/chunk-2KNLZB7V.mjs.map +1 -0
  111. package/dist/{chunk-OUTSP4VR.mjs → chunk-2ZCITDMK.mjs} +2 -2
  112. package/dist/chunk-2ZCITDMK.mjs.map +1 -0
  113. package/dist/{chunk-G42NUGNE.mjs → chunk-3IP4JVLL.mjs} +1 -1
  114. package/dist/chunk-3IP4JVLL.mjs.map +1 -0
  115. package/dist/{chunk-MQWVBKUT.mjs → chunk-6CLH5YZ2.mjs} +1 -1
  116. package/dist/chunk-6CLH5YZ2.mjs.map +1 -0
  117. package/dist/{chunk-DA7GSKQ5.mjs → chunk-6GWEY5EL.mjs} +1 -1
  118. package/dist/chunk-6GWEY5EL.mjs.map +1 -0
  119. package/dist/{chunk-KSXWREB5.mjs → chunk-AJKZMN2V.mjs} +1 -1
  120. package/dist/chunk-AJKZMN2V.mjs.map +1 -0
  121. package/dist/{chunk-A67NF2C7.mjs → chunk-BCTYOXT7.mjs} +1 -1
  122. package/dist/chunk-BCTYOXT7.mjs.map +1 -0
  123. package/dist/{chunk-ZQNAZPSK.mjs → chunk-BMRTZMRE.mjs} +1 -1
  124. package/dist/chunk-BMRTZMRE.mjs.map +1 -0
  125. package/dist/{chunk-UFAA5WKR.mjs → chunk-CMBC4MXG.mjs} +1 -1
  126. package/dist/chunk-CMBC4MXG.mjs.map +1 -0
  127. package/dist/{chunk-JGNFYNYU.mjs → chunk-CXGIXTSH.mjs} +1 -1
  128. package/dist/chunk-CXGIXTSH.mjs.map +1 -0
  129. package/dist/{chunk-5L2V7WD3.mjs → chunk-DN3NOZ3H.mjs} +1 -1
  130. package/dist/chunk-DN3NOZ3H.mjs.map +1 -0
  131. package/dist/{chunk-NKTBEEIT.mjs → chunk-DTJJIMKJ.mjs} +1 -1
  132. package/dist/chunk-DTJJIMKJ.mjs.map +1 -0
  133. package/dist/{chunk-XFCW7XJ4.mjs → chunk-DVK2N4KC.mjs} +1 -1
  134. package/dist/chunk-DVK2N4KC.mjs.map +1 -0
  135. package/dist/{chunk-Q5XXJXXQ.mjs → chunk-DXB7EZUQ.mjs} +1 -1
  136. package/dist/chunk-DXB7EZUQ.mjs.map +1 -0
  137. package/dist/{chunk-H5YR3ZV4.mjs → chunk-E6E4RZLN.mjs} +1 -1
  138. package/dist/chunk-E6E4RZLN.mjs.map +1 -0
  139. package/dist/{chunk-PYLGHB3F.mjs → chunk-FVVSE2F2.mjs} +1 -1
  140. package/dist/chunk-FVVSE2F2.mjs.map +1 -0
  141. package/dist/{chunk-DPLJQQFX.mjs → chunk-G7UQ5PUR.mjs} +1 -1
  142. package/dist/chunk-G7UQ5PUR.mjs.map +1 -0
  143. package/dist/{chunk-OFWKFUFZ.mjs → chunk-HPFDYUGP.mjs} +1 -1
  144. package/dist/chunk-HPFDYUGP.mjs.map +1 -0
  145. package/dist/{chunk-OIHARMNM.mjs → chunk-IJD7FE2Z.mjs} +1 -1
  146. package/dist/chunk-IJD7FE2Z.mjs.map +1 -0
  147. package/dist/{chunk-XDKEPIUV.mjs → chunk-IQLKIDXF.mjs} +1 -1
  148. package/dist/chunk-IQLKIDXF.mjs.map +1 -0
  149. package/dist/{chunk-GTVOVGGZ.mjs → chunk-JE6JKZU3.mjs} +2 -2
  150. package/dist/chunk-JE6JKZU3.mjs.map +1 -0
  151. package/dist/{chunk-Q75KEFW5.mjs → chunk-JEKUA56R.mjs} +1 -1
  152. package/dist/chunk-JEKUA56R.mjs.map +1 -0
  153. package/dist/{chunk-VKM3R5T5.mjs → chunk-L7FQX5MN.mjs} +3 -3
  154. package/dist/chunk-L7FQX5MN.mjs.map +1 -0
  155. package/dist/{chunk-K2BAFL2T.mjs → chunk-LJ2C6MVP.mjs} +1 -1
  156. package/dist/chunk-LJ2C6MVP.mjs.map +1 -0
  157. package/dist/{chunk-4MRXVNGG.mjs → chunk-LUIKU43M.mjs} +1 -1
  158. package/dist/chunk-LUIKU43M.mjs.map +1 -0
  159. package/dist/{chunk-NRNKP6JF.mjs → chunk-NFS7RWWE.mjs} +1 -1
  160. package/dist/chunk-NFS7RWWE.mjs.map +1 -0
  161. package/dist/{chunk-H2FV6Z5X.mjs → chunk-O64NE2P4.mjs} +2 -2
  162. package/dist/{chunk-GNSJP2AB.mjs → chunk-O6UXZR3U.mjs} +1 -1
  163. package/dist/chunk-O6UXZR3U.mjs.map +1 -0
  164. package/dist/{chunk-FXOABQRO.mjs → chunk-OOKNBU4V.mjs} +1 -1
  165. package/dist/chunk-OOKNBU4V.mjs.map +1 -0
  166. package/dist/{chunk-WPDDOUQT.mjs → chunk-OXAZEEGP.mjs} +1 -1
  167. package/dist/chunk-OXAZEEGP.mjs.map +1 -0
  168. package/dist/{chunk-E54CCWDL.mjs → chunk-Q47NGNXT.mjs} +3 -3
  169. package/dist/{chunk-OEOAJOLQ.mjs → chunk-QOJGMVVR.mjs} +1 -1
  170. package/dist/chunk-QOJGMVVR.mjs.map +1 -0
  171. package/dist/{chunk-JSS4FXUD.mjs → chunk-QRSJBBFY.mjs} +3 -3
  172. package/dist/{chunk-PLTO44KM.mjs → chunk-QZITBKWX.mjs} +1 -1
  173. package/dist/chunk-QZITBKWX.mjs.map +1 -0
  174. package/dist/{chunk-UPJXHWSJ.mjs → chunk-R6QA7PLZ.mjs} +2 -2
  175. package/dist/chunk-R6QA7PLZ.mjs.map +1 -0
  176. package/dist/{chunk-ACFP3XMB.mjs → chunk-S3CORED5.mjs} +1 -1
  177. package/dist/chunk-S3CORED5.mjs.map +1 -0
  178. package/dist/{chunk-2EFS3VA3.mjs → chunk-XI7KRD2C.mjs} +1 -1
  179. package/dist/chunk-XI7KRD2C.mjs.map +1 -0
  180. package/dist/error/AbortError.d.mts +1 -1
  181. package/dist/error/AbortError.d.ts +1 -1
  182. package/dist/error/AbortError.js.map +1 -1
  183. package/dist/error/AbortError.mjs +1 -1
  184. package/dist/error/index.js.map +1 -1
  185. package/dist/error/index.mjs +1 -1
  186. package/dist/function/debounce.d.mts +1 -0
  187. package/dist/function/debounce.d.ts +1 -0
  188. package/dist/function/debounce.js.map +1 -1
  189. package/dist/function/debounce.mjs +1 -1
  190. package/dist/function/index.js.map +1 -1
  191. package/dist/function/index.mjs +3 -3
  192. package/dist/function/once.d.mts +1 -0
  193. package/dist/function/once.d.ts +1 -0
  194. package/dist/function/once.js.map +1 -1
  195. package/dist/function/once.mjs +1 -1
  196. package/dist/function/throttle.d.mts +1 -0
  197. package/dist/function/throttle.d.ts +1 -0
  198. package/dist/function/throttle.js.map +1 -1
  199. package/dist/function/throttle.mjs +1 -1
  200. package/dist/index.js.map +1 -1
  201. package/dist/index.mjs +41 -41
  202. package/dist/math/index.js.map +1 -1
  203. package/dist/math/index.mjs +1 -1
  204. package/dist/math/meanBy.d.mts +1 -0
  205. package/dist/math/meanBy.d.ts +1 -0
  206. package/dist/math/meanBy.js.map +1 -1
  207. package/dist/math/meanBy.mjs +1 -1
  208. package/dist/object/index.js.map +1 -1
  209. package/dist/object/index.mjs +4 -4
  210. package/dist/object/omit.d.mts +2 -0
  211. package/dist/object/omit.d.ts +2 -0
  212. package/dist/object/omit.js.map +1 -1
  213. package/dist/object/omit.mjs +1 -1
  214. package/dist/object/omitBy.d.mts +1 -0
  215. package/dist/object/omitBy.d.ts +1 -0
  216. package/dist/object/omitBy.js.map +1 -1
  217. package/dist/object/omitBy.mjs +1 -1
  218. package/dist/object/pick.d.mts +2 -0
  219. package/dist/object/pick.d.ts +2 -0
  220. package/dist/object/pick.js.map +1 -1
  221. package/dist/object/pick.mjs +1 -1
  222. package/dist/object/pickBy.d.mts +1 -0
  223. package/dist/object/pickBy.d.ts +1 -0
  224. package/dist/object/pickBy.js.map +1 -1
  225. package/dist/object/pickBy.mjs +1 -1
  226. package/dist/predicate/index.js.map +1 -1
  227. package/dist/predicate/index.mjs +1 -1
  228. package/dist/predicate/isNotNil.d.mts +1 -0
  229. package/dist/predicate/isNotNil.d.ts +1 -0
  230. package/dist/predicate/isNotNil.js.map +1 -1
  231. package/dist/predicate/isNotNil.mjs +1 -1
  232. package/dist/promise/delay.js.map +1 -1
  233. package/dist/promise/delay.mjs +2 -2
  234. package/dist/promise/index.js.map +1 -1
  235. package/dist/promise/index.mjs +2 -2
  236. package/package.json +2 -1
  237. package/dist/chunk-2EFS3VA3.mjs.map +0 -1
  238. package/dist/chunk-2PFDLYQC.mjs.map +0 -1
  239. package/dist/chunk-4MRXVNGG.mjs.map +0 -1
  240. package/dist/chunk-5L2V7WD3.mjs.map +0 -1
  241. package/dist/chunk-A67NF2C7.mjs.map +0 -1
  242. package/dist/chunk-ACFP3XMB.mjs.map +0 -1
  243. package/dist/chunk-DA7GSKQ5.mjs.map +0 -1
  244. package/dist/chunk-DOOIIHT3.mjs.map +0 -1
  245. package/dist/chunk-DPLJQQFX.mjs.map +0 -1
  246. package/dist/chunk-FXOABQRO.mjs.map +0 -1
  247. package/dist/chunk-G42NUGNE.mjs.map +0 -1
  248. package/dist/chunk-GNSJP2AB.mjs.map +0 -1
  249. package/dist/chunk-GTVOVGGZ.mjs.map +0 -1
  250. package/dist/chunk-H5YR3ZV4.mjs.map +0 -1
  251. package/dist/chunk-JGNFYNYU.mjs.map +0 -1
  252. package/dist/chunk-K2BAFL2T.mjs.map +0 -1
  253. package/dist/chunk-KSXWREB5.mjs.map +0 -1
  254. package/dist/chunk-MQWVBKUT.mjs.map +0 -1
  255. package/dist/chunk-NKTBEEIT.mjs.map +0 -1
  256. package/dist/chunk-NRNKP6JF.mjs.map +0 -1
  257. package/dist/chunk-OEOAJOLQ.mjs.map +0 -1
  258. package/dist/chunk-OFWKFUFZ.mjs.map +0 -1
  259. package/dist/chunk-OIHARMNM.mjs.map +0 -1
  260. package/dist/chunk-OUTSP4VR.mjs.map +0 -1
  261. package/dist/chunk-PLTO44KM.mjs.map +0 -1
  262. package/dist/chunk-PYLGHB3F.mjs.map +0 -1
  263. package/dist/chunk-Q5XXJXXQ.mjs.map +0 -1
  264. package/dist/chunk-Q75KEFW5.mjs.map +0 -1
  265. package/dist/chunk-UFAA5WKR.mjs.map +0 -1
  266. package/dist/chunk-UPJXHWSJ.mjs.map +0 -1
  267. package/dist/chunk-VKM3R5T5.mjs.map +0 -1
  268. package/dist/chunk-WPDDOUQT.mjs.map +0 -1
  269. package/dist/chunk-XDKEPIUV.mjs.map +0 -1
  270. package/dist/chunk-XFCW7XJ4.mjs.map +0 -1
  271. package/dist/chunk-ZQNAZPSK.mjs.map +0 -1
  272. /package/dist/{chunk-H2FV6Z5X.mjs.map → chunk-O64NE2P4.mjs.map} +0 -0
  273. /package/dist/{chunk-E54CCWDL.mjs.map → chunk-Q47NGNXT.mjs.map} +0 -0
  274. /package/dist/{chunk-JSS4FXUD.mjs.map → chunk-QRSJBBFY.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/compact.ts"],"sourcesContent":["type NotFalsey<T> = Exclude<T, false | null | 0 | '' | undefined>;\n\n/**\n * Removes falsey values (false, null, 0, '', undefined, NaN) from an array.\n *\n * @template T - The type of elements in the array.\n * @param {readonly T[]} arr - The input array to remove falsey values.\n * @returns {Array<Exclude<T, false | null | 0 | '' | undefined>>} - A new array with all falsey values removed.\n *\n * @example\n * compact([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n * Returns: [1, 2, 3, 4, 5]\n */\nexport function compact<T>(arr: readonly T[]): Array<NotFalsey<T>> {\n const result: Array<NotFalsey<T>> = [];\n\n for (const item of arr) {\n if (item) {\n result.push(item as NotFalsey<T>);\n }\n }\n\n return result;\n}\n"],"mappings":";AAaO,SAAS,QAAW,KAAwC;AACjE,QAAM,SAA8B,CAAC;AAErC,aAAW,QAAQ,KAAK;AACtB,QAAI,MAAM;AACR,aAAO,KAAK,IAAoB;AAAA,IAClC;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -6,4 +6,4 @@ function uniq(arr) {
6
6
  export {
7
7
  uniq
8
8
  };
9
- //# sourceMappingURL=chunk-XFCW7XJ4.mjs.map
9
+ //# sourceMappingURL=chunk-DVK2N4KC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/uniq.ts"],"sourcesContent":["/**\n * Creates a duplicate-free version of an array.\n *\n * This function takes an array and returns a new array containing only the unique values\n * from the original array, preserving the order of first occurrence.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: readonly T[]): T[] {\n return Array.from(new Set(arr));\n}\n"],"mappings":";AAeO,SAAS,KAAQ,KAAwB;AAC9C,SAAO,MAAM,KAAK,IAAI,IAAI,GAAG,CAAC;AAChC;","names":[]}
@@ -9,4 +9,4 @@ var AbortError = class extends Error {
9
9
  export {
10
10
  AbortError
11
11
  };
12
- //# sourceMappingURL=chunk-Q5XXJXXQ.mjs.map
12
+ //# sourceMappingURL=chunk-DXB7EZUQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/error/AbortError.ts"],"sourcesContent":["/**\n * An error class representing an aborted operation.\n * @augments Error\n */\nexport class AbortError extends Error {\n constructor(message = 'The operation was aborted') {\n super(message);\n this.name = 'AbortError';\n }\n}\n"],"mappings":";AAIO,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YAAY,UAAU,6BAA6B;AACjD,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
@@ -14,4 +14,4 @@ function groupBy(arr, getKeyFromItem) {
14
14
  export {
15
15
  groupBy
16
16
  };
17
- //# sourceMappingURL=chunk-H5YR3ZV4.mjs.map
17
+ //# sourceMappingURL=chunk-E6E4RZLN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/groupBy.ts"],"sourcesContent":["/**\n * Groups the elements of an array based on a provided key-generating function.\n *\n * This function takes an array and a function that generates a key from each element. It returns\n * an object where the keys are the generated keys and the values are arrays of elements that share\n * the same key.\n *\n * @template T - The type of elements in the array.\n * @template K - The type of keys.\n * @param {T[]} arr - The array to group.\n * @param {(item: T) => K} getKeyFromItem - A function that generates a key from an element.\n * @returns {Record<K, T[]>} An object where each key is associated with an array of elements that\n * share that key.\n *\n * @example\n * const array = [\n * { category: 'fruit', name: 'apple' },\n * { category: 'fruit', name: 'banana' },\n * { category: 'vegetable', name: 'carrot' }\n * ];\n * const result = groupBy(array, item => item.category);\n * // result will be:\n * // {\n * // fruit: [\n * // { category: 'fruit', name: 'apple' },\n * // { category: 'fruit', name: 'banana' }\n * // ],\n * // vegetable: [\n * // { category: 'vegetable', name: 'carrot' }\n * // ]\n * // }\n */\nexport function groupBy<T, K extends PropertyKey>(arr: readonly T[], getKeyFromItem: (item: T) => K): Record<K, T[]> {\n const result = {} as Record<K, T[]>;\n\n for (const item of arr) {\n const key = getKeyFromItem(item);\n\n if (result[key] == null) {\n result[key] = [];\n }\n\n result[key].push(item);\n }\n\n return result;\n}\n"],"mappings":";AAgCO,SAAS,QAAkC,KAAmB,gBAAgD;AACnH,QAAM,SAAS,CAAC;AAEhB,aAAW,QAAQ,KAAK;AACtB,UAAM,MAAM,eAAe,IAAI;AAE/B,QAAI,OAAO,GAAG,KAAK,MAAM;AACvB,aAAO,GAAG,IAAI,CAAC;AAAA,IACjB;AAEA,WAAO,GAAG,EAAE,KAAK,IAAI;AAAA,EACvB;AAEA,SAAO;AACT;","names":[]}
@@ -9,4 +9,4 @@ function intersection(firstArr, secondArr) {
9
9
  export {
10
10
  intersection
11
11
  };
12
- //# sourceMappingURL=chunk-PYLGHB3F.mjs.map
12
+ //# sourceMappingURL=chunk-FVVSE2F2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/intersection.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements that are\n * present in both arrays. It effectively filters out any elements from the first array that\n * are not found in the second array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @returns {T[]} A new array containing the elements that are present in both arrays.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [3, 4, 5, 6, 7];\n * const result = intersection(array1, array2);\n * // result will be [3, 4, 5] since these elements are in both arrays.\n */\nexport function intersection<T>(firstArr: readonly T[], secondArr: readonly T[]): T[] {\n const secondSet = new Set(secondArr);\n\n return firstArr.filter(item => {\n return secondSet.has(item);\n });\n}\n"],"mappings":";AAkBO,SAAS,aAAgB,UAAwB,WAA8B;AACpF,QAAM,YAAY,IAAI,IAAI,SAAS;AAEnC,SAAO,SAAS,OAAO,UAAQ;AAC7B,WAAO,UAAU,IAAI,IAAI;AAAA,EAC3B,CAAC;AACH;","names":[]}
@@ -11,4 +11,4 @@ function shuffle(arr) {
11
11
  export {
12
12
  shuffle
13
13
  };
14
- //# sourceMappingURL=chunk-DPLJQQFX.mjs.map
14
+ //# sourceMappingURL=chunk-G7UQ5PUR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/shuffle.ts"],"sourcesContent":["/**\n * Randomizes the order of elements in an array using the Fisher-Yates algorithm.\n *\n * This function takes an array and returns a new array with its elements shuffled in a random order.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to shuffle.\n * @returns {T[]} A new array with its elements shuffled in random order.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const shuffledArray = shuffle(array);\n * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2]\n */\nexport function shuffle<T>(arr: readonly T[]): T[] {\n const result = arr.slice();\n\n /**\n * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm\n */\n for (let i = result.length - 1; i >= 1; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n\n return result;\n}\n"],"mappings":";AAcO,SAAS,QAAW,KAAwB;AACjD,QAAM,SAAS,IAAI,MAAM;AAKzB,WAAS,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK;AAC3C,UAAM,IAAI,KAAK,MAAM,KAAK,OAAO,KAAK,IAAI,EAAE;AAC5C,KAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAAA,EAChD;AAEA,SAAO;AACT;","names":[]}
@@ -10,4 +10,4 @@ function pick(obj, keys) {
10
10
  export {
11
11
  pick
12
12
  };
13
- //# sourceMappingURL=chunk-OFWKFUFZ.mjs.map
13
+ //# sourceMappingURL=chunk-HPFDYUGP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/object/pick.ts"],"sourcesContent":["/**\n * Creates a new object composed of the picked object properties.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * includes only the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to pick keys from.\n * @param {K[]} keys - An array of keys to be picked from the object.\n * @returns {Pick<T, K>} A new object with the specified keys picked.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = pick(obj, ['a', 'c']);\n * // result will be { a: 1, c: 3 }\n */\nexport function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {\n const result = {} as Pick<T, K>;\n\n for (const key of keys) {\n result[key] = obj[key];\n }\n\n return result;\n}\n"],"mappings":";AAiBO,SAAS,KAAuD,KAAQ,MAAuB;AACpG,QAAM,SAAS,CAAC;AAEhB,aAAW,OAAO,MAAM;AACtB,WAAO,GAAG,IAAI,IAAI,GAAG;AAAA,EACvB;AAEA,SAAO;AACT;","names":[]}
@@ -15,4 +15,4 @@ function minBy(items, getValue) {
15
15
  export {
16
16
  minBy
17
17
  };
18
- //# sourceMappingURL=chunk-OIHARMNM.mjs.map
18
+ //# sourceMappingURL=chunk-IJD7FE2Z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/minBy.ts"],"sourcesContent":["/**\n * Finds the element in an array that has the minimum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the minimum value as determined by the `getValue` function.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n */\nexport function minBy<T>(items: T[], getValue: (element: T) => number): T {\n let minElement = items[0];\n let min = Infinity;\n\n for (const element of items) {\n const value = getValue(element);\n if (value < min) {\n min = value;\n minElement = element;\n }\n }\n\n return minElement;\n}\n"],"mappings":";AAYO,SAAS,MAAS,OAAY,UAAqC;AACxE,MAAI,aAAa,MAAM,CAAC;AACxB,MAAI,MAAM;AAEV,aAAW,WAAW,OAAO;AAC3B,UAAM,QAAQ,SAAS,OAAO;AAC9B,QAAI,QAAQ,KAAK;AACf,YAAM;AACN,mBAAa;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -9,4 +9,4 @@ function takeRight(arr, count) {
9
9
  export {
10
10
  takeRight
11
11
  };
12
- //# sourceMappingURL=chunk-XDKEPIUV.mjs.map
12
+ //# sourceMappingURL=chunk-IQLKIDXF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/takeRight.ts"],"sourcesContent":["/**\n * Returns a new array containing the last `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the last `count` elements from `arr`.\n *\n * @example\n * // Returns [4, 5]\n * takeRight([1, 2, 3, 4, 5], 2);\n *\n * @example\n * // Returns ['b', 'c']\n * takeRight(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * takeRight([1, 2, 3], 5);\n */\nexport function takeRight<T>(arr: readonly T[], count: number): T[] {\n if (count === 0) {\n return [];\n }\n\n return arr.slice(-count);\n}\n"],"mappings":";AAqBO,SAAS,UAAa,KAAmB,OAAoB;AAClE,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,CAAC,KAAK;AACzB;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dropWhile
3
- } from "./chunk-K2BAFL2T.mjs";
3
+ } from "./chunk-LJ2C6MVP.mjs";
4
4
 
5
5
  // src/array/dropRightWhile.ts
6
6
  function dropRightWhile(arr, canContinueDropping) {
@@ -12,4 +12,4 @@ function dropRightWhile(arr, canContinueDropping) {
12
12
  export {
13
13
  dropRightWhile
14
14
  };
15
- //# sourceMappingURL=chunk-GTVOVGGZ.mjs.map
15
+ //# sourceMappingURL=chunk-JE6JKZU3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/dropRightWhile.ts"],"sourcesContent":["import { dropWhile } from './dropWhile.ts';\n\n/**\n * Removes elements from the end of an array until the predicate returns false.\n *\n * This function iterates over an array from the end and drops elements until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element from the end,\n * and dropping continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRightWhile(array, x => x > 3);\n * // result will be [1, 2, 3] since elements greater than 3 are dropped from the end.\n */\nexport function dropRightWhile<T>(arr: readonly T[], canContinueDropping: (item: T) => boolean): T[] {\n const reversed = arr.slice().reverse();\n const dropped = dropWhile(reversed, canContinueDropping);\n return dropped.slice().reverse();\n}\n"],"mappings":";;;;;AAoBO,SAAS,eAAkB,KAAmB,qBAAgD;AACnG,QAAM,WAAW,IAAI,MAAM,EAAE,QAAQ;AACrC,QAAM,UAAU,UAAU,UAAU,mBAAmB;AACvD,SAAO,QAAQ,MAAM,EAAE,QAAQ;AACjC;","names":[]}
@@ -6,4 +6,4 @@ function dropRight(arr, itemsCount) {
6
6
  export {
7
7
  dropRight
8
8
  };
9
- //# sourceMappingURL=chunk-Q75KEFW5.mjs.map
9
+ //# sourceMappingURL=chunk-JEKUA56R.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/dropRight.ts"],"sourcesContent":["/**\n * Removes a specified number of elements from the end of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the end.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the end of the array.\n * @returns {T[]} A new array with the specified number of elements removed from the end.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRight(array, 2);\n * // result will be [1, 2, 3] since the last two elements are dropped.\n */\nexport function dropRight<T>(arr: readonly T[], itemsCount: number): T[] {\n return arr.slice(0, -itemsCount);\n}\n"],"mappings":";AAgBO,SAAS,UAAa,KAAmB,YAAyB;AACvE,SAAO,IAAI,MAAM,GAAG,CAAC,UAAU;AACjC;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  union
3
- } from "./chunk-UPJXHWSJ.mjs";
3
+ } from "./chunk-R6QA7PLZ.mjs";
4
4
  import {
5
5
  intersection
6
- } from "./chunk-PYLGHB3F.mjs";
6
+ } from "./chunk-FVVSE2F2.mjs";
7
7
  import {
8
8
  difference
9
9
  } from "./chunk-JPUKH67K.mjs";
@@ -16,4 +16,4 @@ function xor(arr1, arr2) {
16
16
  export {
17
17
  xor
18
18
  };
19
- //# sourceMappingURL=chunk-VKM3R5T5.mjs.map
19
+ //# sourceMappingURL=chunk-L7FQX5MN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/xor.ts"],"sourcesContent":["import { difference } from './difference.ts';\nimport { intersection } from './intersection.ts';\nimport { union } from './union.ts';\n\n/**\n * Computes the symmetric difference between two arrays. The symmetric difference is the set of elements\n * which are in either of the arrays, but not in their intersection.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both.\n *\n * @example\n * // Returns [1, 2, 5, 6]\n * xor([1, 2, 3, 4], [3, 4, 5, 6]);\n *\n * @example\n * // Returns ['a', 'c']\n * xor(['a', 'b'], ['b', 'c']);\n */\nexport function xor<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n return difference(union(arr1, arr2), intersection(arr1, arr2));\n}\n"],"mappings":";;;;;;;;;;;AAqBO,SAAS,IAAO,MAAoB,MAAyB;AAClE,SAAO,WAAW,MAAM,MAAM,IAAI,GAAG,aAAa,MAAM,IAAI,CAAC;AAC/D;","names":[]}
@@ -10,4 +10,4 @@ function dropWhile(arr, canContinueDropping) {
10
10
  export {
11
11
  dropWhile
12
12
  };
13
- //# sourceMappingURL=chunk-K2BAFL2T.mjs.map
13
+ //# sourceMappingURL=chunk-LJ2C6MVP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/dropWhile.ts"],"sourcesContent":["/**\n * Removes elements from the beginning of an array until the predicate returns false.\n *\n * This function iterates over an array and drops elements from the start until the provided\n * predicate function returns false. It then returns a new array with the remaining elements.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {(item: T) => boolean} canContinueDropping - A predicate function that determines\n * whether to continue dropping elements. The function is called with each element, and dropping\n * continues as long as it returns true.\n * @returns {T[]} A new array with the elements remaining after the predicate returns false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropWhile(array, x => x < 3);\n * // result will be [3, 4, 5] since elements less than 3 are dropped.\n */\nexport function dropWhile<T>(arr: readonly T[], canContinueDropping: (item: T) => boolean): T[] {\n const dropEndIndex = arr.findIndex(item => !canContinueDropping(item));\n if (dropEndIndex === -1) {\n return [];\n }\n\n return arr.slice(dropEndIndex);\n}\n"],"mappings":";AAkBO,SAAS,UAAa,KAAmB,qBAAgD;AAC9F,QAAM,eAAe,IAAI,UAAU,UAAQ,CAAC,oBAAoB,IAAI,CAAC;AACrE,MAAI,iBAAiB,IAAI;AACvB,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,YAAY;AAC/B;","names":[]}
@@ -23,4 +23,4 @@ function sampleSize(array, size) {
23
23
  export {
24
24
  sampleSize
25
25
  };
26
- //# sourceMappingURL=chunk-4MRXVNGG.mjs.map
26
+ //# sourceMappingURL=chunk-LUIKU43M.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/sampleSize.ts"],"sourcesContent":["import { randomInt } from '../math';\n\n/**\n * Returns a sample element array of a specified `size`.\n *\n * This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm.\n *\n * {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algoritm}\n *\n * @template T - The type of elements in the array.\n * @param {T[]} array - The array to sample from.\n * @param {number} size - The size of sample.\n * @returns {T[]} A new array with sample size applied.\n * @throws {Error} Throws an error if `size` is greater than the length of `array`.\n *\n * @example\n * const result = sampleSize([1, 2, 3], 2)\n * // result will be an array containing two of the elements from the array.\n * // [1, 2] or [1, 3] or [2, 3]\n */\nexport function sampleSize<T>(array: readonly T[], size: number): T[] {\n if (size > array.length) {\n throw new Error('Size must be less than or equal to the length of array.');\n }\n\n const result = new Array(size);\n const selected = new Set();\n\n for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {\n let index = randomInt(0, step + 1);\n\n if (selected.has(index)) {\n index = step;\n }\n\n selected.add(index);\n\n result[resultIndex] = array[index];\n }\n\n return result;\n}\n"],"mappings":";;;;;AAoBO,SAAS,WAAc,OAAqB,MAAmB;AACpE,MAAI,OAAO,MAAM,QAAQ;AACvB,UAAM,IAAI,MAAM,yDAAyD;AAAA,EAC3E;AAEA,QAAM,SAAS,IAAI,MAAM,IAAI;AAC7B,QAAM,WAAW,oBAAI,IAAI;AAEzB,WAAS,OAAO,MAAM,SAAS,MAAM,cAAc,GAAG,OAAO,MAAM,QAAQ,QAAQ,eAAe;AAChG,QAAI,QAAQ,UAAU,GAAG,OAAO,CAAC;AAEjC,QAAI,SAAS,IAAI,KAAK,GAAG;AACvB,cAAQ;AAAA,IACV;AAEA,aAAS,IAAI,KAAK;AAElB,WAAO,WAAW,IAAI,MAAM,KAAK;AAAA,EACnC;AAEA,SAAO;AACT;","names":[]}
@@ -13,4 +13,4 @@ function unionBy(arr1, arr2, mapper) {
13
13
  export {
14
14
  unionBy
15
15
  };
16
- //# sourceMappingURL=chunk-NRNKP6JF.mjs.map
16
+ //# sourceMappingURL=chunk-NFS7RWWE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/unionBy.ts"],"sourcesContent":["/**\n * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for numbers (modulo comparison)\n * const moduloMapper = (x) => x % 3;\n * unionBy([1, 2, 3], [4, 5, 6], moduloMapper);\n * // Returns [1, 2, 3]\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = (obj) => obj.id;\n * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]\n */\nexport function unionBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[] {\n const map = new Map<U, T>();\n\n for (const item of [...arr1, ...arr2]) {\n const key = mapper(item);\n\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return Array.from(map.values());\n}\n"],"mappings":";AAsBO,SAAS,QAAc,MAAoB,MAAoB,QAA6B;AACjG,QAAM,MAAM,oBAAI,IAAU;AAE1B,aAAW,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG;AACrC,UAAM,MAAM,OAAO,IAAI;AAEvB,QAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AACjB,UAAI,IAAI,KAAK,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI,OAAO,CAAC;AAChC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AbortError
3
- } from "./chunk-Q5XXJXXQ.mjs";
3
+ } from "./chunk-DXB7EZUQ.mjs";
4
4
 
5
5
  // src/promise/delay.ts
6
6
  function delay(ms, { signal } = {}) {
@@ -23,4 +23,4 @@ function delay(ms, { signal } = {}) {
23
23
  export {
24
24
  delay
25
25
  };
26
- //# sourceMappingURL=chunk-H2FV6Z5X.mjs.map
26
+ //# sourceMappingURL=chunk-O64NE2P4.mjs.map
@@ -7,4 +7,4 @@ function intersectionBy(firstArr, secondArr, mapper) {
7
7
  export {
8
8
  intersectionBy
9
9
  };
10
- //# sourceMappingURL=chunk-GNSJP2AB.mjs.map
10
+ //# sourceMappingURL=chunk-O6UXZR3U.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/intersectionBy.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a mapping function.\n *\n * This function takes two arrays and a mapping function. It returns a new array containing\n * the elements from the first array that, when mapped using the provided function, have matching\n * mapped elements in the second array. It effectively filters out any elements from the first array\n * that do not have corresponding mapped values in the second array.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(item: T) => U} mapper - A function to map the elements of both arrays for comparison.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding mapped values in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.\n */\nexport function intersectionBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (item: T) => U): T[] {\n const mappedSecondSet = new Set(secondArr.map(mapper));\n return firstArr.filter(item => mappedSecondSet.has(mapper(item)));\n}\n"],"mappings":";AAsBO,SAAS,eAAqB,UAAwB,WAAyB,QAA6B;AACjH,QAAM,kBAAkB,IAAI,IAAI,UAAU,IAAI,MAAM,CAAC;AACrD,SAAO,SAAS,OAAO,UAAQ,gBAAgB,IAAI,OAAO,IAAI,CAAC,CAAC;AAClE;","names":[]}
@@ -15,4 +15,4 @@ function maxBy(items, getValue) {
15
15
  export {
16
16
  maxBy
17
17
  };
18
- //# sourceMappingURL=chunk-FXOABQRO.mjs.map
18
+ //# sourceMappingURL=chunk-OOKNBU4V.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/maxBy.ts"],"sourcesContent":["/**\n * Finds the element in an array that has the maximum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the maximum value as determined by the `getValue` function.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n */\nexport function maxBy<T>(items: T[], getValue: (element: T) => number): T {\n let maxElement = items[0];\n let max = -Infinity;\n\n for (const element of items) {\n const value = getValue(element);\n if (value > max) {\n max = value;\n maxElement = element;\n }\n }\n\n return maxElement;\n}\n"],"mappings":";AAYO,SAAS,MAAS,OAAY,UAAqC;AACxE,MAAI,aAAa,MAAM,CAAC;AACxB,MAAI,MAAM;AAEV,aAAW,WAAW,OAAO;AAC3B,UAAM,QAAQ,SAAS,OAAO;AAC9B,QAAI,QAAQ,KAAK;AACf,YAAM;AACN,mBAAa;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -13,4 +13,4 @@ function uniqBy(arr, mapper) {
13
13
  export {
14
14
  uniqBy
15
15
  };
16
- //# sourceMappingURL=chunk-WPDDOUQT.mjs.map
16
+ //# sourceMappingURL=chunk-OXAZEEGP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/uniqBy.ts"],"sourcesContent":["/**\n * Returns a new array containing only the unique elements from the original array,\n * based on the values returned by the mapper function.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} arr - The array to process.\n * @param {(item: T) => U} mapper - The function used to convert the array elements.\n * @returns {T[]} A new array containing only the unique elements from the original array, based on the values returned by the mapper function.\n *\n * @example\n * ```ts\n * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor);\n * // [1.2, 2.1, 3.3, 5.7, 7.19]\n * ```\n */\nexport function uniqBy<T, U>(arr: readonly T[], mapper: (item: T) => U): T[] {\n const map = new Map<U, T>();\n\n for (const item of arr) {\n const key = mapper(item);\n\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return Array.from(map.values());\n}\n"],"mappings":";AAgBO,SAAS,OAAa,KAAmB,QAA6B;AAC3E,QAAM,MAAM,oBAAI,IAAU;AAE1B,aAAW,QAAQ,KAAK;AACtB,UAAM,MAAM,OAAO,IAAI;AAEvB,QAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AACjB,UAAI,IAAI,KAAK,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI,OAAO,CAAC;AAChC;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  unionBy
3
- } from "./chunk-NRNKP6JF.mjs";
3
+ } from "./chunk-NFS7RWWE.mjs";
4
4
  import {
5
5
  intersectionBy
6
- } from "./chunk-GNSJP2AB.mjs";
6
+ } from "./chunk-O6UXZR3U.mjs";
7
7
  import {
8
8
  differenceBy
9
9
  } from "./chunk-LVWX5B43.mjs";
@@ -18,4 +18,4 @@ function xorBy(arr1, arr2, mapper) {
18
18
  export {
19
19
  xorBy
20
20
  };
21
- //# sourceMappingURL=chunk-E54CCWDL.mjs.map
21
+ //# sourceMappingURL=chunk-Q47NGNXT.mjs.map
@@ -14,4 +14,4 @@ function throttle(func, throttleMs) {
14
14
  export {
15
15
  throttle
16
16
  };
17
- //# sourceMappingURL=chunk-OEOAJOLQ.mjs.map
17
+ //# sourceMappingURL=chunk-QOJGMVVR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/function/throttle.ts"],"sourcesContent":["/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {F} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F {\n let lastCallTime: number | null;\n\n const throttledFunction = function (...args: Parameters<F>) {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n } as F;\n\n return throttledFunction;\n}\n"],"mappings":";AA0BO,SAAS,SAA6C,MAAS,YAAuB;AAC3F,MAAI;AAEJ,QAAM,oBAAoB,YAAa,MAAqB;AAC1D,UAAM,MAAM,KAAK,IAAI;AAErB,QAAI,gBAAgB,QAAQ,MAAM,gBAAgB,YAAY;AAC5D,qBAAe;AACf,WAAK,GAAG,IAAI;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  unionWith
3
- } from "./chunk-OUTSP4VR.mjs";
3
+ } from "./chunk-2ZCITDMK.mjs";
4
4
  import {
5
5
  intersectionWith
6
- } from "./chunk-2EFS3VA3.mjs";
6
+ } from "./chunk-XI7KRD2C.mjs";
7
7
  import {
8
8
  differenceWith
9
9
  } from "./chunk-6NVQAHXP.mjs";
@@ -18,4 +18,4 @@ function xorWith(arr1, arr2, areElementsEqual) {
18
18
  export {
19
19
  xorWith
20
20
  };
21
- //# sourceMappingURL=chunk-JSS4FXUD.mjs.map
21
+ //# sourceMappingURL=chunk-QRSJBBFY.mjs.map
@@ -14,4 +14,4 @@ function omit(obj, keys) {
14
14
  export {
15
15
  omit
16
16
  };
17
- //# sourceMappingURL=chunk-PLTO44KM.mjs.map
17
+ //# sourceMappingURL=chunk-QZITBKWX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/object/omit.ts"],"sourcesContent":["/**\n * Creates a new object with specified keys omitted.\n *\n * This function takes an object and an array of keys, and returns a new object that\n * excludes the properties corresponding to the specified keys.\n *\n * @template T - The type of object.\n * @template K - The type of keys in object.\n * @param {T} obj - The object to omit keys from.\n * @param {K[]} keys - An array of keys to be omitted from the object.\n * @returns {Omit<T, K>} A new object with the specified keys omitted.\n *\n * @example\n * const obj = { a: 1, b: 2, c: 3 };\n * const result = omit(obj, ['b', 'c']);\n * // result will be { a: 1 }\n */\nexport function omit<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> {\n const result = { ...obj };\n\n for (const key of keys) {\n delete result[key];\n }\n\n return result as Omit<T, K>;\n}\n"],"mappings":";;;;;AAiBO,SAAS,KAAuD,KAAQ,MAAuB;AACpG,QAAM,SAAS,mBAAK;AAEpB,aAAW,OAAO,MAAM;AACtB,WAAO,OAAO,GAAG;AAAA,EACnB;AAEA,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  uniq
3
- } from "./chunk-XFCW7XJ4.mjs";
3
+ } from "./chunk-DVK2N4KC.mjs";
4
4
 
5
5
  // src/array/union.ts
6
6
  function union(arr1, arr2) {
@@ -10,4 +10,4 @@ function union(arr1, arr2) {
10
10
  export {
11
11
  union
12
12
  };
13
- //# sourceMappingURL=chunk-UPJXHWSJ.mjs.map
13
+ //# sourceMappingURL=chunk-R6QA7PLZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/union.ts"],"sourcesContent":["import { uniq } from './uniq.ts';\n\n/**\n * Creates an array of unique values from all given arrays.\n *\n * This function takes two arrays, merges them into a single array, and returns a new array\n * containing only the unique values from the merged array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @returns {T[]} A new array of unique values.\n *\n * @example\n * const array1 = [1, 2, 3];\n * const array2 = [3, 4, 5];\n * const result = union(array1, array2);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function union<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n return uniq(arr1.concat(arr2));\n}\n"],"mappings":";;;;;AAmBO,SAAS,MAAS,MAAoB,MAAyB;AACpE,SAAO,KAAK,KAAK,OAAO,IAAI,CAAC;AAC/B;","names":[]}
@@ -6,4 +6,4 @@ function drop(arr, itemsCount) {
6
6
  export {
7
7
  drop
8
8
  };
9
- //# sourceMappingURL=chunk-ACFP3XMB.mjs.map
9
+ //# sourceMappingURL=chunk-S3CORED5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/drop.ts"],"sourcesContent":["/**\n * Removes a specified number of elements from the beginning of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the start.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the beginning of the array.\n * @returns {T[]} A new array with the specified number of elements removed from the start.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = drop(array, 2);\n * // result will be [3, 4, 5] since the first two elements are dropped.\n */\nexport function drop<T>(arr: readonly T[], itemsCount: number): T[] {\n return arr.slice(itemsCount);\n}\n"],"mappings":";AAgBO,SAAS,KAAQ,KAAmB,YAAyB;AAClE,SAAO,IAAI,MAAM,UAAU;AAC7B;","names":[]}
@@ -10,4 +10,4 @@ function intersectionWith(firstArr, secondArr, areItemsEqual) {
10
10
  export {
11
11
  intersectionWith
12
12
  };
13
- //# sourceMappingURL=chunk-2EFS3VA3.mjs.map
13
+ //# sourceMappingURL=chunk-XI7KRD2C.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/array/intersectionWith.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a custom equality function.\n *\n * This function takes two arrays and a custom equality function. It returns a new array containing\n * the elements from the first array that have matching elements in the second array, as determined\n * by the custom equality function. It effectively filters out any elements from the first array that\n * do not have corresponding matches in the second array according to the equality function.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(x: T, y: T) => boolean} areItemsEqual - A custom function to determine if two elements are equal.\n * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = intersectionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 2 }] since this element has a matching id in both arrays.\n */\nexport function intersectionWith<T>(\n firstArr: readonly T[],\n secondArr: readonly T[],\n areItemsEqual: (x: T, y: T) => boolean\n): T[] {\n return firstArr.filter(firstItem => {\n return secondArr.some(secondItem => {\n return areItemsEqual(firstItem, secondItem);\n });\n });\n}\n"],"mappings":";AAsBO,SAAS,iBACd,UACA,WACA,eACK;AACL,SAAO,SAAS,OAAO,eAAa;AAClC,WAAO,UAAU,KAAK,gBAAc;AAClC,aAAO,cAAc,WAAW,UAAU;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * An error class representing an aborted operation.
3
- * @extends Error
3
+ * @augments Error
4
4
  */
5
5
  declare class AbortError extends Error {
6
6
  constructor(message?: string);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * An error class representing an aborted operation.
3
- * @extends Error
3
+ * @augments Error
4
4
  */
5
5
  declare class AbortError extends Error {
6
6
  constructor(message?: string);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/error/AbortError.ts"],"sourcesContent":["/**\n * An error class representing an aborted operation.\n * @extends Error\n */\nexport class AbortError extends Error {\n constructor(message = 'The operation was aborted') {\n super(message);\n this.name = 'AbortError';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YAAY,UAAU,6BAA6B;AACjD,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/error/AbortError.ts"],"sourcesContent":["/**\n * An error class representing an aborted operation.\n * @augments Error\n */\nexport class AbortError extends Error {\n constructor(message = 'The operation was aborted') {\n super(message);\n this.name = 'AbortError';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YAAY,UAAU,6BAA6B;AACjD,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AbortError
3
- } from "../chunk-Q5XXJXXQ.mjs";
3
+ } from "../chunk-DXB7EZUQ.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  AbortError
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/error/index.ts","../../src/error/AbortError.ts"],"sourcesContent":["export { AbortError } from './AbortError.ts';\n","/**\n * An error class representing an aborted operation.\n * @extends Error\n */\nexport class AbortError extends Error {\n constructor(message = 'The operation was aborted') {\n super(message);\n this.name = 'AbortError';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIO,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YAAY,UAAU,6BAA6B;AACjD,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/error/index.ts","../../src/error/AbortError.ts"],"sourcesContent":["export { AbortError } from './AbortError.ts';\n","/**\n * An error class representing an aborted operation.\n * @augments Error\n */\nexport class AbortError extends Error {\n constructor(message = 'The operation was aborted') {\n super(message);\n this.name = 'AbortError';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIO,IAAM,aAAN,cAAyB,MAAM;AAAA,EACpC,YAAY,UAAU,6BAA6B;AACjD,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import "../chunk-FZEZH22H.mjs";
2
2
  import {
3
3
  AbortError
4
- } from "../chunk-Q5XXJXXQ.mjs";
4
+ } from "../chunk-DXB7EZUQ.mjs";
5
5
  import "../chunk-2MM5EJJX.mjs";
6
6
  export {
7
7
  AbortError
@@ -6,6 +6,7 @@ interface DebounceOptions {
6
6
  * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`
7
7
  * method to cancel any pending execution.
8
8
  *
9
+ * @template F - The type of function.
9
10
  * @param {F} func - The function to debounce.
10
11
  * @param {number} debounceMs - The number of milliseconds to delay.
11
12
  * @param {DebounceOptions} options - The options object.
@@ -6,6 +6,7 @@ interface DebounceOptions {
6
6
  * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`
7
7
  * method to cancel any pending execution.
8
8
  *
9
+ * @template F - The type of function.
9
10
  * @param {F} func - The function to debounce.
10
11
  * @param {number} debounceMs - The number of milliseconds to delay.
11
12
  * @param {DebounceOptions} options - The options object.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/function/debounce.ts"],"sourcesContent":["interface DebounceOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object.\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @returns {F & { cancel: () => void }} A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n * console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<F extends (...args: any[]) => void>(\n func: F,\n debounceMs: number,\n { signal }: DebounceOptions = {}\n): F & { cancel: () => void } {\n let timeoutId: number | null = null;\n\n const debounced = function (...args: Parameters<F>) {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n\n if (signal?.aborted) {\n return;\n }\n\n timeoutId = setTimeout(() => {\n func(...args);\n timeoutId = null;\n }, debounceMs) as any;\n } as F & { cancel: () => void };\n\n const onAbort = function () {\n debounced.cancel();\n };\n\n debounced.cancel = function () {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n signal?.addEventListener('abort', onAbort, { once: true });\n\n return debounced;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCO,SAAS,SACd,MACA,YACA,EAAE,OAAO,IAAqB,CAAC,GACH;AAC5B,MAAI,YAA2B;AAE/B,QAAM,YAAY,YAAa,MAAqB;AAClD,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AAAA,IACxB;AAEA,QAAI,iCAAQ,SAAS;AACnB;AAAA,IACF;AAEA,gBAAY,WAAW,MAAM;AAC3B,WAAK,GAAG,IAAI;AACZ,kBAAY;AAAA,IACd,GAAG,UAAU;AAAA,EACf;AAEA,QAAM,UAAU,WAAY;AAC1B,cAAU,OAAO;AAAA,EACnB;AAEA,YAAU,SAAS,WAAY;AAC7B,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AACtB,kBAAY;AAAA,IACd;AAAA,EACF;AAEA,mCAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK;AAExD,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/function/debounce.ts"],"sourcesContent":["interface DebounceOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * @template F - The type of function.\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object.\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @returns {F & { cancel: () => void }} A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n * console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<F extends (...args: any[]) => void>(\n func: F,\n debounceMs: number,\n { signal }: DebounceOptions = {}\n): F & { cancel: () => void } {\n let timeoutId: number | null = null;\n\n const debounced = function (...args: Parameters<F>) {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n\n if (signal?.aborted) {\n return;\n }\n\n timeoutId = setTimeout(() => {\n func(...args);\n timeoutId = null;\n }, debounceMs) as any;\n } as F & { cancel: () => void };\n\n const onAbort = function () {\n debounced.cancel();\n };\n\n debounced.cancel = function () {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n signal?.addEventListener('abort', onAbort, { once: true });\n\n return debounced;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCO,SAAS,SACd,MACA,YACA,EAAE,OAAO,IAAqB,CAAC,GACH;AAC5B,MAAI,YAA2B;AAE/B,QAAM,YAAY,YAAa,MAAqB;AAClD,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AAAA,IACxB;AAEA,QAAI,iCAAQ,SAAS;AACnB;AAAA,IACF;AAEA,gBAAY,WAAW,MAAM;AAC3B,WAAK,GAAG,IAAI;AACZ,kBAAY;AAAA,IACd,GAAG,UAAU;AAAA,EACf;AAEA,QAAM,UAAU,WAAY;AAC1B,cAAU,OAAO;AAAA,EACnB;AAEA,YAAU,SAAS,WAAY;AAC7B,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AACtB,kBAAY;AAAA,IACd;AAAA,EACF;AAEA,mCAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK;AAExD,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  debounce
3
- } from "../chunk-G42NUGNE.mjs";
3
+ } from "../chunk-3IP4JVLL.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  debounce
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/function/index.ts","../../src/function/debounce.ts","../../src/function/noop.ts","../../src/function/once.ts","../../src/function/throttle.ts"],"sourcesContent":["export { debounce } from './debounce.ts';\nexport { noop } from './noop.ts';\nexport { once } from './once.ts';\nexport { throttle } from './throttle.ts';\n","interface DebounceOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object.\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @returns {F & { cancel: () => void }} A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n * console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<F extends (...args: any[]) => void>(\n func: F,\n debounceMs: number,\n { signal }: DebounceOptions = {}\n): F & { cancel: () => void } {\n let timeoutId: number | null = null;\n\n const debounced = function (...args: Parameters<F>) {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n\n if (signal?.aborted) {\n return;\n }\n\n timeoutId = setTimeout(() => {\n func(...args);\n timeoutId = null;\n }, debounceMs) as any;\n } as F & { cancel: () => void };\n\n const onAbort = function () {\n debounced.cancel();\n };\n\n debounced.cancel = function () {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n signal?.addEventListener('abort', onAbort, { once: true });\n\n return debounced;\n}\n","/**\n * A no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * noop(); // Does nothing\n *\n * @returns {void} This function does not return anything.\n */\nexport function noop(): void {}\n","/**\n * Creates a function that is restricted to invoking the provided function `func` once.\n * Repeated calls to the function will return the value from the first invocation.\n *\n * @param {F} func - The function to restrict.\n * @returns {F} A new function that invokes `func` once and caches the result.\n *\n * @example\n * const initialize = once(() => {\n * console.log('Initialized!');\n * return true;\n * });\n *\n * initialize(); // Logs: 'Initialized!' and returns true\n * initialize(); // Returns true without logging\n */\nexport function once<F extends () => any>(func: F): F {\n let called = false;\n let cache: ReturnType<F> | undefined;\n\n return function () {\n if (called) {\n return cache;\n }\n\n const result = func();\n\n called = true;\n cache = result;\n\n return result;\n } as F;\n}\n","/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {F} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F {\n let lastCallTime: number | null;\n\n const throttledFunction = function (...args: Parameters<F>) {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n } as F;\n\n return throttledFunction;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACsCO,SAAS,SACd,MACA,YACA,EAAE,OAAO,IAAqB,CAAC,GACH;AAC5B,MAAI,YAA2B;AAE/B,QAAM,YAAY,YAAa,MAAqB;AAClD,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AAAA,IACxB;AAEA,QAAI,iCAAQ,SAAS;AACnB;AAAA,IACF;AAEA,gBAAY,WAAW,MAAM;AAC3B,WAAK,GAAG,IAAI;AACZ,kBAAY;AAAA,IACd,GAAG,UAAU;AAAA,EACf;AAEA,QAAM,UAAU,WAAY;AAC1B,cAAU,OAAO;AAAA,EACnB;AAEA,YAAU,SAAS,WAAY;AAC7B,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AACtB,kBAAY;AAAA,IACd;AAAA,EACF;AAEA,mCAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK;AAExD,SAAO;AACT;;;ACjEO,SAAS,OAAa;AAAC;;;ACOvB,SAAS,KAA0B,MAAY;AACpD,MAAI,SAAS;AACb,MAAI;AAEJ,SAAO,WAAY;AACjB,QAAI,QAAQ;AACV,aAAO;AAAA,IACT;AAEA,UAAM,SAAS,KAAK;AAEpB,aAAS;AACT,YAAQ;AAER,WAAO;AAAA,EACT;AACF;;;ACPO,SAAS,SAA6C,MAAS,YAAuB;AAC3F,MAAI;AAEJ,QAAM,oBAAoB,YAAa,MAAqB;AAC1D,UAAM,MAAM,KAAK,IAAI;AAErB,QAAI,gBAAgB,QAAQ,MAAM,gBAAgB,YAAY;AAC5D,qBAAe;AACf,WAAK,GAAG,IAAI;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/function/index.ts","../../src/function/debounce.ts","../../src/function/noop.ts","../../src/function/once.ts","../../src/function/throttle.ts"],"sourcesContent":["export { debounce } from './debounce.ts';\nexport { noop } from './noop.ts';\nexport { once } from './once.ts';\nexport { throttle } from './throttle.ts';\n","interface DebounceOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n * method to cancel any pending execution.\n *\n * @template F - The type of function.\n * @param {F} func - The function to debounce.\n * @param {number} debounceMs - The number of milliseconds to delay.\n * @param {DebounceOptions} options - The options object.\n * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the debounced function.\n * @returns {F & { cancel: () => void }} A new debounced function with a `cancel` method.\n *\n * @example\n * const debouncedFunction = debounce(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' after 1 second if not called again in that time\n * debouncedFunction();\n *\n * // Will not log anything as the previous call is canceled\n * debouncedFunction.cancel();\n *\n * // With AbortSignal\n * const controller = new AbortController();\n * const signal = controller.signal;\n * const debouncedWithSignal = debounce(() => {\n * console.log('Function executed');\n * }, 1000, { signal });\n *\n * debouncedWithSignal();\n *\n * // Will cancel the debounced function call\n * controller.abort();\n */\nexport function debounce<F extends (...args: any[]) => void>(\n func: F,\n debounceMs: number,\n { signal }: DebounceOptions = {}\n): F & { cancel: () => void } {\n let timeoutId: number | null = null;\n\n const debounced = function (...args: Parameters<F>) {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n\n if (signal?.aborted) {\n return;\n }\n\n timeoutId = setTimeout(() => {\n func(...args);\n timeoutId = null;\n }, debounceMs) as any;\n } as F & { cancel: () => void };\n\n const onAbort = function () {\n debounced.cancel();\n };\n\n debounced.cancel = function () {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n signal?.addEventListener('abort', onAbort, { once: true });\n\n return debounced;\n}\n","/**\n * A no-operation function that does nothing.\n * This can be used as a placeholder or default function.\n *\n * @example\n * noop(); // Does nothing\n *\n * @returns {void} This function does not return anything.\n */\nexport function noop(): void {}\n","/**\n * Creates a function that is restricted to invoking the provided function `func` once.\n * Repeated calls to the function will return the value from the first invocation.\n *\n * @template F - The type of function.\n * @param {F} func - The function to restrict.\n * @returns {F} A new function that invokes `func` once and caches the result.\n *\n * @example\n * const initialize = once(() => {\n * console.log('Initialized!');\n * return true;\n * });\n *\n * initialize(); // Logs: 'Initialized!' and returns true\n * initialize(); // Returns true without logging\n */\nexport function once<F extends () => any>(func: F): F {\n let called = false;\n let cache: ReturnType<F> | undefined;\n\n return function () {\n if (called) {\n return cache;\n }\n\n const result = func();\n\n called = true;\n cache = result;\n\n return result;\n } as F;\n}\n","/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {F} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F {\n let lastCallTime: number | null;\n\n const throttledFunction = function (...args: Parameters<F>) {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n } as F;\n\n return throttledFunction;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACuCO,SAAS,SACd,MACA,YACA,EAAE,OAAO,IAAqB,CAAC,GACH;AAC5B,MAAI,YAA2B;AAE/B,QAAM,YAAY,YAAa,MAAqB;AAClD,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AAAA,IACxB;AAEA,QAAI,iCAAQ,SAAS;AACnB;AAAA,IACF;AAEA,gBAAY,WAAW,MAAM;AAC3B,WAAK,GAAG,IAAI;AACZ,kBAAY;AAAA,IACd,GAAG,UAAU;AAAA,EACf;AAEA,QAAM,UAAU,WAAY;AAC1B,cAAU,OAAO;AAAA,EACnB;AAEA,YAAU,SAAS,WAAY;AAC7B,QAAI,cAAc,MAAM;AACtB,mBAAa,SAAS;AACtB,kBAAY;AAAA,IACd;AAAA,EACF;AAEA,mCAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK;AAExD,SAAO;AACT;;;AClEO,SAAS,OAAa;AAAC;;;ACQvB,SAAS,KAA0B,MAAY;AACpD,MAAI,SAAS;AACb,MAAI;AAEJ,SAAO,WAAY;AACjB,QAAI,QAAQ;AACV,aAAO;AAAA,IACT;AAEA,UAAM,SAAS,KAAK;AAEpB,aAAS;AACT,YAAQ;AAER,WAAO;AAAA,EACT;AACF;;;ACPO,SAAS,SAA6C,MAAS,YAAuB;AAC3F,MAAI;AAEJ,QAAM,oBAAoB,YAAa,MAAqB;AAC1D,UAAM,MAAM,KAAK,IAAI;AAErB,QAAI,gBAAgB,QAAQ,MAAM,gBAAgB,YAAY;AAC5D,qBAAe;AACf,WAAK,GAAG,IAAI;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,16 +1,16 @@
1
1
  import "../chunk-N6EM6ETS.mjs";
2
2
  import {
3
3
  debounce
4
- } from "../chunk-G42NUGNE.mjs";
4
+ } from "../chunk-3IP4JVLL.mjs";
5
5
  import {
6
6
  noop
7
7
  } from "../chunk-LKXCOLNY.mjs";
8
8
  import {
9
9
  once
10
- } from "../chunk-UFAA5WKR.mjs";
10
+ } from "../chunk-CMBC4MXG.mjs";
11
11
  import {
12
12
  throttle
13
- } from "../chunk-OEOAJOLQ.mjs";
13
+ } from "../chunk-QOJGMVVR.mjs";
14
14
  import "../chunk-2MM5EJJX.mjs";
15
15
  export {
16
16
  debounce,
@@ -2,6 +2,7 @@
2
2
  * Creates a function that is restricted to invoking the provided function `func` once.
3
3
  * Repeated calls to the function will return the value from the first invocation.
4
4
  *
5
+ * @template F - The type of function.
5
6
  * @param {F} func - The function to restrict.
6
7
  * @returns {F} A new function that invokes `func` once and caches the result.
7
8
  *
@@ -2,6 +2,7 @@
2
2
  * Creates a function that is restricted to invoking the provided function `func` once.
3
3
  * Repeated calls to the function will return the value from the first invocation.
4
4
  *
5
+ * @template F - The type of function.
5
6
  * @param {F} func - The function to restrict.
6
7
  * @returns {F} A new function that invokes `func` once and caches the result.
7
8
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/function/once.ts"],"sourcesContent":["/**\n * Creates a function that is restricted to invoking the provided function `func` once.\n * Repeated calls to the function will return the value from the first invocation.\n *\n * @param {F} func - The function to restrict.\n * @returns {F} A new function that invokes `func` once and caches the result.\n *\n * @example\n * const initialize = once(() => {\n * console.log('Initialized!');\n * return true;\n * });\n *\n * initialize(); // Logs: 'Initialized!' and returns true\n * initialize(); // Returns true without logging\n */\nexport function once<F extends () => any>(func: F): F {\n let called = false;\n let cache: ReturnType<F> | undefined;\n\n return function () {\n if (called) {\n return cache;\n }\n\n const result = func();\n\n called = true;\n cache = result;\n\n return result;\n } as F;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,SAAS,KAA0B,MAAY;AACpD,MAAI,SAAS;AACb,MAAI;AAEJ,SAAO,WAAY;AACjB,QAAI,QAAQ;AACV,aAAO;AAAA,IACT;AAEA,UAAM,SAAS,KAAK;AAEpB,aAAS;AACT,YAAQ;AAER,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/function/once.ts"],"sourcesContent":["/**\n * Creates a function that is restricted to invoking the provided function `func` once.\n * Repeated calls to the function will return the value from the first invocation.\n *\n * @template F - The type of function.\n * @param {F} func - The function to restrict.\n * @returns {F} A new function that invokes `func` once and caches the result.\n *\n * @example\n * const initialize = once(() => {\n * console.log('Initialized!');\n * return true;\n * });\n *\n * initialize(); // Logs: 'Initialized!' and returns true\n * initialize(); // Returns true without logging\n */\nexport function once<F extends () => any>(func: F): F {\n let called = false;\n let cache: ReturnType<F> | undefined;\n\n return function () {\n if (called) {\n return cache;\n }\n\n const result = func();\n\n called = true;\n cache = result;\n\n return result;\n } as F;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,KAA0B,MAAY;AACpD,MAAI,SAAS;AACb,MAAI;AAEJ,SAAO,WAAY;AACjB,QAAI,QAAQ;AACV,aAAO;AAAA,IACT;AAEA,UAAM,SAAS,KAAK;AAEpB,aAAS;AACT,YAAQ;AAER,WAAO;AAAA,EACT;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  once
3
- } from "../chunk-UFAA5WKR.mjs";
3
+ } from "../chunk-CMBC4MXG.mjs";
4
4
  import "../chunk-2MM5EJJX.mjs";
5
5
  export {
6
6
  once
@@ -3,6 +3,7 @@
3
3
  * per every `throttleMs` milliseconds. Subsequent calls to the throttled function
4
4
  * within the wait time will not trigger the execution of the original function.
5
5
  *
6
+ * @template F - The type of function.
6
7
  * @param {F} func - The function to throttle.
7
8
  * @param {number} throttleMs - The number of milliseconds to throttle executions to.
8
9
  * @returns {F} A new throttled function that accepts the same parameters as the original function.
@@ -3,6 +3,7 @@
3
3
  * per every `throttleMs` milliseconds. Subsequent calls to the throttled function
4
4
  * within the wait time will not trigger the execution of the original function.
5
5
  *
6
+ * @template F - The type of function.
6
7
  * @param {F} func - The function to throttle.
7
8
  * @param {number} throttleMs - The number of milliseconds to throttle executions to.
8
9
  * @returns {F} A new throttled function that accepts the same parameters as the original function.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/function/throttle.ts"],"sourcesContent":["/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {F} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F {\n let lastCallTime: number | null;\n\n const throttledFunction = function (...args: Parameters<F>) {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n } as F;\n\n return throttledFunction;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBO,SAAS,SAA6C,MAAS,YAAuB;AAC3F,MAAI;AAEJ,QAAM,oBAAoB,YAAa,MAAqB;AAC1D,UAAM,MAAM,KAAK,IAAI;AAErB,QAAI,gBAAgB,QAAQ,MAAM,gBAAgB,YAAY;AAC5D,qBAAe;AACf,WAAK,GAAG,IAAI;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/function/throttle.ts"],"sourcesContent":["/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {F} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F {\n let lastCallTime: number | null;\n\n const throttledFunction = function (...args: Parameters<F>) {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n } as F;\n\n return throttledFunction;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BO,SAAS,SAA6C,MAAS,YAAuB;AAC3F,MAAI;AAEJ,QAAM,oBAAoB,YAAa,MAAqB;AAC1D,UAAM,MAAM,KAAK,IAAI;AAErB,QAAI,gBAAgB,QAAQ,MAAM,gBAAgB,YAAY;AAC5D,qBAAe;AACf,WAAK,GAAG,IAAI;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}