@studiometa/js-toolkit 2.6.0 → 2.6.3

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 (387) hide show
  1. package/Base/index.cjs +41 -41
  2. package/Base/index.cjs.map +7 -0
  3. package/Base/index.js +58 -64
  4. package/Base/index.js.map +7 -0
  5. package/Base/managers/AbstractManager.cjs +6 -10
  6. package/Base/managers/AbstractManager.cjs.map +7 -0
  7. package/Base/managers/AbstractManager.js +6 -11
  8. package/Base/managers/AbstractManager.js.map +7 -0
  9. package/Base/managers/ChildrenManager.cjs +3 -11
  10. package/Base/managers/ChildrenManager.cjs.map +7 -0
  11. package/Base/managers/ChildrenManager.js +3 -12
  12. package/Base/managers/ChildrenManager.js.map +7 -0
  13. package/Base/managers/EventsManager.cjs +57 -61
  14. package/Base/managers/EventsManager.cjs.map +7 -0
  15. package/Base/managers/EventsManager.js +57 -62
  16. package/Base/managers/EventsManager.js.map +7 -0
  17. package/Base/managers/OptionsManager.cjs +8 -14
  18. package/Base/managers/OptionsManager.cjs.map +7 -0
  19. package/Base/managers/OptionsManager.js +8 -15
  20. package/Base/managers/OptionsManager.js.map +7 -0
  21. package/Base/managers/RefsManager.cjs +2 -2
  22. package/Base/managers/RefsManager.cjs.map +7 -0
  23. package/Base/managers/RefsManager.js +2 -2
  24. package/Base/managers/RefsManager.js.map +7 -0
  25. package/Base/managers/ResponsiveOptionsManager.cjs +1 -0
  26. package/Base/managers/ResponsiveOptionsManager.cjs.map +7 -0
  27. package/Base/managers/ResponsiveOptionsManager.js +1 -0
  28. package/Base/managers/ResponsiveOptionsManager.js.map +7 -0
  29. package/Base/managers/ServicesManager.cjs +3 -12
  30. package/Base/managers/ServicesManager.cjs.map +7 -0
  31. package/Base/managers/ServicesManager.js +3 -13
  32. package/Base/managers/ServicesManager.js.map +7 -0
  33. package/Base/types.cjs +1 -0
  34. package/Base/types.cjs.map +7 -0
  35. package/Base/types.js +1 -0
  36. package/Base/types.js.map +7 -0
  37. package/Base/utils.cjs +1 -0
  38. package/Base/utils.cjs.map +7 -0
  39. package/Base/utils.js +1 -0
  40. package/Base/utils.js.map +7 -0
  41. package/decorators/index.cjs +1 -0
  42. package/decorators/index.cjs.map +7 -0
  43. package/decorators/index.js +1 -0
  44. package/decorators/index.js.map +7 -0
  45. package/decorators/withBreakpointManager.cjs +1 -0
  46. package/decorators/withBreakpointManager.cjs.map +7 -0
  47. package/decorators/withBreakpointManager.js +1 -0
  48. package/decorators/withBreakpointManager.js.map +7 -0
  49. package/decorators/withBreakpointObserver.cjs +10 -15
  50. package/decorators/withBreakpointObserver.cjs.map +7 -0
  51. package/decorators/withBreakpointObserver.js +10 -16
  52. package/decorators/withBreakpointObserver.js.map +7 -0
  53. package/decorators/withDrag.cjs +5 -9
  54. package/decorators/withDrag.cjs.map +7 -0
  55. package/decorators/withDrag.js +5 -10
  56. package/decorators/withDrag.js.map +7 -0
  57. package/decorators/withExtraConfig.cjs +2 -6
  58. package/decorators/withExtraConfig.cjs.map +7 -0
  59. package/decorators/withExtraConfig.js +2 -7
  60. package/decorators/withExtraConfig.js.map +7 -0
  61. package/decorators/withFreezedOptions.cjs +2 -9
  62. package/decorators/withFreezedOptions.cjs.map +7 -0
  63. package/decorators/withFreezedOptions.js +2 -10
  64. package/decorators/withFreezedOptions.js.map +7 -0
  65. package/decorators/withIntersectionObserver.cjs +11 -16
  66. package/decorators/withIntersectionObserver.cjs.map +7 -0
  67. package/decorators/withIntersectionObserver.js +11 -17
  68. package/decorators/withIntersectionObserver.js.map +7 -0
  69. package/decorators/withMountWhenInView.cjs +11 -16
  70. package/decorators/withMountWhenInView.cjs.map +7 -0
  71. package/decorators/withMountWhenInView.js +11 -17
  72. package/decorators/withMountWhenInView.js.map +7 -0
  73. package/decorators/withResponsiveOptions.cjs +1 -0
  74. package/decorators/withResponsiveOptions.cjs.map +7 -0
  75. package/decorators/withResponsiveOptions.js +1 -0
  76. package/decorators/withResponsiveOptions.js.map +7 -0
  77. package/decorators/withScrolledInView.cjs +45 -50
  78. package/decorators/withScrolledInView.cjs.map +7 -0
  79. package/decorators/withScrolledInView.js +45 -51
  80. package/decorators/withScrolledInView.js.map +7 -0
  81. package/decorators/withVue2.cjs +9 -15
  82. package/decorators/withVue2.cjs.map +7 -0
  83. package/decorators/withVue2.js +9 -16
  84. package/decorators/withVue2.js.map +7 -0
  85. package/helpers/createApp.cjs +1 -0
  86. package/helpers/createApp.cjs.map +7 -0
  87. package/helpers/createApp.js +1 -0
  88. package/helpers/createApp.js.map +7 -0
  89. package/helpers/getClosestParent.cjs +1 -0
  90. package/helpers/getClosestParent.cjs.map +7 -0
  91. package/helpers/getClosestParent.js +1 -0
  92. package/helpers/getClosestParent.js.map +7 -0
  93. package/helpers/getDirectChildren.cjs +1 -0
  94. package/helpers/getDirectChildren.cjs.map +7 -0
  95. package/helpers/getDirectChildren.js +1 -0
  96. package/helpers/getDirectChildren.js.map +7 -0
  97. package/helpers/getInstanceFromElement.cjs +1 -0
  98. package/helpers/getInstanceFromElement.cjs.map +7 -0
  99. package/helpers/getInstanceFromElement.js +1 -0
  100. package/helpers/getInstanceFromElement.js.map +7 -0
  101. package/helpers/importOnInteraction.cjs +2 -1
  102. package/helpers/importOnInteraction.cjs.map +7 -0
  103. package/helpers/importOnInteraction.js +2 -1
  104. package/helpers/importOnInteraction.js.map +7 -0
  105. package/helpers/importWhenIdle.cjs +1 -0
  106. package/helpers/importWhenIdle.cjs.map +7 -0
  107. package/helpers/importWhenIdle.js +1 -0
  108. package/helpers/importWhenIdle.js.map +7 -0
  109. package/helpers/importWhenVisible.cjs +2 -1
  110. package/helpers/importWhenVisible.cjs.map +7 -0
  111. package/helpers/importWhenVisible.js +2 -1
  112. package/helpers/importWhenVisible.js.map +7 -0
  113. package/helpers/index.cjs +1 -0
  114. package/helpers/index.cjs.map +7 -0
  115. package/helpers/index.js +1 -0
  116. package/helpers/index.js.map +7 -0
  117. package/helpers/utils.cjs +1 -0
  118. package/helpers/utils.cjs.map +7 -0
  119. package/helpers/utils.js +1 -0
  120. package/helpers/utils.js.map +7 -0
  121. package/index.cjs +1 -0
  122. package/index.cjs.map +7 -0
  123. package/index.js +1 -0
  124. package/index.js.map +7 -0
  125. package/package.json +1 -1
  126. package/services/drag.cjs +1 -0
  127. package/services/drag.cjs.map +7 -0
  128. package/services/drag.js +1 -0
  129. package/services/drag.js.map +7 -0
  130. package/services/index.cjs +1 -0
  131. package/services/index.cjs.map +7 -0
  132. package/services/index.js +1 -0
  133. package/services/index.js.map +7 -0
  134. package/services/key.cjs +2 -1
  135. package/services/key.cjs.map +7 -0
  136. package/services/key.js +2 -1
  137. package/services/key.js.map +7 -0
  138. package/services/load.cjs +1 -0
  139. package/services/load.cjs.map +7 -0
  140. package/services/load.js +1 -0
  141. package/services/load.js.map +7 -0
  142. package/services/pointer.cjs +3 -3
  143. package/services/pointer.cjs.map +7 -0
  144. package/services/pointer.js +3 -3
  145. package/services/pointer.js.map +7 -0
  146. package/services/raf.cjs +1 -0
  147. package/services/raf.cjs.map +7 -0
  148. package/services/raf.js +1 -0
  149. package/services/raf.js.map +7 -0
  150. package/services/resize.cjs +1 -0
  151. package/services/resize.cjs.map +7 -0
  152. package/services/resize.js +1 -0
  153. package/services/resize.js.map +7 -0
  154. package/services/scroll.cjs +1 -0
  155. package/services/scroll.cjs.map +7 -0
  156. package/services/scroll.js +1 -0
  157. package/services/scroll.js.map +7 -0
  158. package/services/service.cjs +1 -0
  159. package/services/service.cjs.map +7 -0
  160. package/services/service.js +1 -0
  161. package/services/service.js.map +7 -0
  162. package/utils/collide/boundingRectToCircle.cjs +1 -0
  163. package/utils/collide/boundingRectToCircle.cjs.map +7 -0
  164. package/utils/collide/boundingRectToCircle.js +1 -0
  165. package/utils/collide/boundingRectToCircle.js.map +7 -0
  166. package/utils/collide/collideCircleCircle.cjs +1 -0
  167. package/utils/collide/collideCircleCircle.cjs.map +7 -0
  168. package/utils/collide/collideCircleCircle.js +1 -0
  169. package/utils/collide/collideCircleCircle.js.map +7 -0
  170. package/utils/collide/collideCircleRect.cjs +1 -0
  171. package/utils/collide/collideCircleRect.cjs.map +7 -0
  172. package/utils/collide/collideCircleRect.js +1 -0
  173. package/utils/collide/collideCircleRect.js.map +7 -0
  174. package/utils/collide/collidePointCircle.cjs +1 -0
  175. package/utils/collide/collidePointCircle.cjs.map +7 -0
  176. package/utils/collide/collidePointCircle.js +1 -0
  177. package/utils/collide/collidePointCircle.js.map +7 -0
  178. package/utils/collide/collidePointRect.cjs +1 -0
  179. package/utils/collide/collidePointRect.cjs.map +7 -0
  180. package/utils/collide/collidePointRect.js +1 -0
  181. package/utils/collide/collidePointRect.js.map +7 -0
  182. package/utils/collide/collideRectRect.cjs +1 -0
  183. package/utils/collide/collideRectRect.cjs.map +7 -0
  184. package/utils/collide/collideRectRect.js +1 -0
  185. package/utils/collide/collideRectRect.js.map +7 -0
  186. package/utils/collide/index.cjs +1 -0
  187. package/utils/collide/index.cjs.map +7 -0
  188. package/utils/collide/index.js +1 -0
  189. package/utils/collide/index.js.map +7 -0
  190. package/utils/css/animate.cjs +10 -13
  191. package/utils/css/animate.cjs.map +7 -0
  192. package/utils/css/animate.js +10 -13
  193. package/utils/css/animate.js.map +7 -0
  194. package/utils/css/classes.cjs +2 -1
  195. package/utils/css/classes.cjs.map +7 -0
  196. package/utils/css/classes.js +2 -1
  197. package/utils/css/classes.js.map +7 -0
  198. package/utils/css/getOffsetSizes.cjs +1 -0
  199. package/utils/css/getOffsetSizes.cjs.map +7 -0
  200. package/utils/css/getOffsetSizes.js +1 -0
  201. package/utils/css/getOffsetSizes.js.map +7 -0
  202. package/utils/css/index.cjs +1 -0
  203. package/utils/css/index.cjs.map +7 -0
  204. package/utils/css/index.js +1 -0
  205. package/utils/css/index.js.map +7 -0
  206. package/utils/css/matrix.cjs +2 -2
  207. package/utils/css/matrix.cjs.map +7 -0
  208. package/utils/css/matrix.js +2 -2
  209. package/utils/css/matrix.js.map +7 -0
  210. package/utils/css/styles.cjs +1 -0
  211. package/utils/css/styles.cjs.map +7 -0
  212. package/utils/css/styles.js +1 -0
  213. package/utils/css/styles.js.map +7 -0
  214. package/utils/css/transform.cjs +2 -2
  215. package/utils/css/transform.cjs.map +7 -0
  216. package/utils/css/transform.js +2 -2
  217. package/utils/css/transform.js.map +7 -0
  218. package/utils/css/transition.cjs +3 -7
  219. package/utils/css/transition.cjs.map +7 -0
  220. package/utils/css/transition.js +3 -8
  221. package/utils/css/transition.js.map +7 -0
  222. package/utils/css/utils.cjs +1 -0
  223. package/utils/css/utils.cjs.map +7 -0
  224. package/utils/css/utils.js +1 -0
  225. package/utils/css/utils.js.map +7 -0
  226. package/utils/debounce.cjs +1 -0
  227. package/utils/debounce.cjs.map +7 -0
  228. package/utils/debounce.js +1 -0
  229. package/utils/debounce.js.map +7 -0
  230. package/utils/focusTrap.cjs +1 -0
  231. package/utils/focusTrap.cjs.map +7 -0
  232. package/utils/focusTrap.js +1 -0
  233. package/utils/focusTrap.js.map +7 -0
  234. package/utils/has.cjs +1 -0
  235. package/utils/has.cjs.map +7 -0
  236. package/utils/has.js +1 -0
  237. package/utils/has.js.map +7 -0
  238. package/utils/history.cjs +1 -0
  239. package/utils/history.cjs.map +7 -0
  240. package/utils/history.js +1 -0
  241. package/utils/history.js.map +7 -0
  242. package/utils/index.cjs +1 -0
  243. package/utils/index.cjs.map +7 -0
  244. package/utils/index.js +1 -0
  245. package/utils/index.js.map +7 -0
  246. package/utils/is.cjs +1 -0
  247. package/utils/is.cjs.map +7 -0
  248. package/utils/is.js +1 -0
  249. package/utils/is.js.map +7 -0
  250. package/utils/keyCodes.cjs +1 -0
  251. package/utils/keyCodes.cjs.map +7 -0
  252. package/utils/keyCodes.js +1 -0
  253. package/utils/keyCodes.js.map +7 -0
  254. package/utils/math/clamp.cjs +1 -0
  255. package/utils/math/clamp.cjs.map +7 -0
  256. package/utils/math/clamp.js +1 -0
  257. package/utils/math/clamp.js.map +7 -0
  258. package/utils/math/clamp01.cjs +1 -0
  259. package/utils/math/clamp01.cjs.map +7 -0
  260. package/utils/math/clamp01.js +1 -0
  261. package/utils/math/clamp01.js.map +7 -0
  262. package/utils/math/createEases.cjs +1 -0
  263. package/utils/math/createEases.cjs.map +7 -0
  264. package/utils/math/createEases.js +1 -0
  265. package/utils/math/createEases.js.map +7 -0
  266. package/utils/math/damp.cjs +1 -0
  267. package/utils/math/damp.cjs.map +7 -0
  268. package/utils/math/damp.js +1 -0
  269. package/utils/math/damp.js.map +7 -0
  270. package/utils/math/ease.cjs +1 -0
  271. package/utils/math/ease.cjs.map +7 -0
  272. package/utils/math/ease.js +1 -0
  273. package/utils/math/ease.js.map +7 -0
  274. package/utils/math/index.cjs +1 -0
  275. package/utils/math/index.cjs.map +7 -0
  276. package/utils/math/index.js +1 -0
  277. package/utils/math/index.js.map +7 -0
  278. package/utils/math/inertiaFinalValue.cjs +1 -0
  279. package/utils/math/inertiaFinalValue.cjs.map +7 -0
  280. package/utils/math/inertiaFinalValue.js +1 -0
  281. package/utils/math/inertiaFinalValue.js.map +7 -0
  282. package/utils/math/lerp.cjs +1 -0
  283. package/utils/math/lerp.cjs.map +7 -0
  284. package/utils/math/lerp.js +1 -0
  285. package/utils/math/lerp.js.map +7 -0
  286. package/utils/math/map.cjs +1 -0
  287. package/utils/math/map.cjs.map +7 -0
  288. package/utils/math/map.js +1 -0
  289. package/utils/math/map.js.map +7 -0
  290. package/utils/math/round.cjs +1 -0
  291. package/utils/math/round.cjs.map +7 -0
  292. package/utils/math/round.js +1 -0
  293. package/utils/math/round.js.map +7 -0
  294. package/utils/memoize.cjs +1 -0
  295. package/utils/memoize.cjs.map +7 -0
  296. package/utils/memoize.js +1 -0
  297. package/utils/memoize.js.map +7 -0
  298. package/utils/nextFrame.cjs +1 -0
  299. package/utils/nextFrame.cjs.map +7 -0
  300. package/utils/nextFrame.js +1 -0
  301. package/utils/nextFrame.js.map +7 -0
  302. package/utils/nextMicrotask.cjs +1 -0
  303. package/utils/nextMicrotask.cjs.map +7 -0
  304. package/utils/nextMicrotask.js +1 -0
  305. package/utils/nextMicrotask.js.map +7 -0
  306. package/utils/nextTick.cjs +1 -0
  307. package/utils/nextTick.cjs.map +7 -0
  308. package/utils/nextTick.js +1 -0
  309. package/utils/nextTick.js.map +7 -0
  310. package/utils/noop.cjs +1 -0
  311. package/utils/noop.cjs.map +7 -0
  312. package/utils/noop.js +1 -0
  313. package/utils/noop.js.map +7 -0
  314. package/utils/object/autoBind.cjs +1 -0
  315. package/utils/object/autoBind.cjs.map +7 -0
  316. package/utils/object/autoBind.js +1 -0
  317. package/utils/object/autoBind.js.map +7 -0
  318. package/utils/object/getAllProperties.cjs +1 -0
  319. package/utils/object/getAllProperties.cjs.map +7 -0
  320. package/utils/object/getAllProperties.js +1 -0
  321. package/utils/object/getAllProperties.js.map +7 -0
  322. package/utils/object/index.cjs +1 -0
  323. package/utils/object/index.cjs.map +7 -0
  324. package/utils/object/index.js +1 -0
  325. package/utils/object/index.js.map +7 -0
  326. package/utils/scheduler.cjs +1 -0
  327. package/utils/scheduler.cjs.map +7 -0
  328. package/utils/scheduler.js +1 -0
  329. package/utils/scheduler.js.map +7 -0
  330. package/utils/scrollTo.cjs +1 -0
  331. package/utils/scrollTo.cjs.map +7 -0
  332. package/utils/scrollTo.d.ts +1 -1
  333. package/utils/scrollTo.js +1 -0
  334. package/utils/scrollTo.js.map +7 -0
  335. package/utils/string/index.cjs +1 -0
  336. package/utils/string/index.cjs.map +7 -0
  337. package/utils/string/index.js +1 -0
  338. package/utils/string/index.js.map +7 -0
  339. package/utils/string/withLeadingCharacters.cjs +1 -0
  340. package/utils/string/withLeadingCharacters.cjs.map +7 -0
  341. package/utils/string/withLeadingCharacters.js +1 -0
  342. package/utils/string/withLeadingCharacters.js.map +7 -0
  343. package/utils/string/withLeadingSlash.cjs +1 -0
  344. package/utils/string/withLeadingSlash.cjs.map +7 -0
  345. package/utils/string/withLeadingSlash.js +1 -0
  346. package/utils/string/withLeadingSlash.js.map +7 -0
  347. package/utils/string/withTrailingCharacters.cjs +1 -0
  348. package/utils/string/withTrailingCharacters.cjs.map +7 -0
  349. package/utils/string/withTrailingCharacters.js +1 -0
  350. package/utils/string/withTrailingCharacters.js.map +7 -0
  351. package/utils/string/withTrailingSlash.cjs +1 -0
  352. package/utils/string/withTrailingSlash.cjs.map +7 -0
  353. package/utils/string/withTrailingSlash.js +1 -0
  354. package/utils/string/withTrailingSlash.js.map +7 -0
  355. package/utils/string/withoutLeadingCharacters.cjs +1 -0
  356. package/utils/string/withoutLeadingCharacters.cjs.map +7 -0
  357. package/utils/string/withoutLeadingCharacters.js +1 -0
  358. package/utils/string/withoutLeadingCharacters.js.map +7 -0
  359. package/utils/string/withoutLeadingCharactersRecursive.cjs +1 -0
  360. package/utils/string/withoutLeadingCharactersRecursive.cjs.map +7 -0
  361. package/utils/string/withoutLeadingCharactersRecursive.js +1 -0
  362. package/utils/string/withoutLeadingCharactersRecursive.js.map +7 -0
  363. package/utils/string/withoutLeadingSlash.cjs +1 -0
  364. package/utils/string/withoutLeadingSlash.cjs.map +7 -0
  365. package/utils/string/withoutLeadingSlash.js +1 -0
  366. package/utils/string/withoutLeadingSlash.js.map +7 -0
  367. package/utils/string/withoutTrailingCharacters.cjs +1 -0
  368. package/utils/string/withoutTrailingCharacters.cjs.map +7 -0
  369. package/utils/string/withoutTrailingCharacters.js +1 -0
  370. package/utils/string/withoutTrailingCharacters.js.map +7 -0
  371. package/utils/string/withoutTrailingCharactersRecursive.cjs +1 -0
  372. package/utils/string/withoutTrailingCharactersRecursive.cjs.map +7 -0
  373. package/utils/string/withoutTrailingCharactersRecursive.js +1 -0
  374. package/utils/string/withoutTrailingCharactersRecursive.js.map +7 -0
  375. package/utils/string/withoutTrailingSlash.cjs +1 -0
  376. package/utils/string/withoutTrailingSlash.cjs.map +7 -0
  377. package/utils/string/withoutTrailingSlash.js +1 -0
  378. package/utils/string/withoutTrailingSlash.js.map +7 -0
  379. package/utils/throttle.cjs +1 -0
  380. package/utils/throttle.cjs.map +7 -0
  381. package/utils/throttle.js +1 -0
  382. package/utils/throttle.js.map +7 -0
  383. package/utils/tween.cjs +2 -2
  384. package/utils/tween.cjs.map +7 -0
  385. package/utils/tween.d.ts +7 -1
  386. package/utils/tween.js +2 -2
  387. package/utils/tween.js.map +7 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../packages/js-toolkit/utils/scrollTo.js"],
4
+ "sourcesContent": ["import damp from './math/damp.js';\n\n/**\n * Handler for the click event on anchor links\n *\n * @param {HTMLElement|string} selectorElement The target element.\n * @param {{ offset?: number, dampFactor?: number }} options Options for the scroll.\n * @returns {Promise<number>} A promising resolving with the target scroll position.\n */\nexport default function scrollTo(selectorElement, { offset = 0, dampFactor = 0.2 } = {}) {\n let targetElement = null;\n\n if (selectorElement instanceof HTMLElement) {\n targetElement = selectorElement;\n } else {\n targetElement = document.querySelector(selectorElement);\n }\n\n if (!targetElement) {\n return Promise.resolve(window.pageYOffset);\n }\n\n const sizes = targetElement.getBoundingClientRect();\n const scrollMargin = getComputedStyle(targetElement).scrollMarginTop || '0';\n const max = document.documentElement.scrollHeight - window.innerHeight;\n let scrollTarget = sizes.top + window.pageYOffset - Number.parseInt(scrollMargin, 10) - offset;\n\n // Make sure to not scroll more than the max scroll allowed\n if (scrollTarget > max) {\n scrollTarget = max;\n }\n\n return new Promise((resolve) => {\n let isScrolling = false;\n let scroll = window.pageYOffset;\n let dampScroll = window.pageYOffset;\n\n /**\n * Handler for the wheel event\n * Is used to cancel the programmatic scroll animation\n */\n function eventHandler() {\n isScrolling = false;\n }\n\n /**\n * Scroll animation end's hook\n */\n function end() {\n window.removeEventListener('wheel', eventHandler);\n window.removeEventListener('touchmove', eventHandler);\n resolve(window.pageYOffset);\n }\n\n /**\n * Scroll animation's loop\n * @returns {void|number}\n */\n function loop() {\n if (!isScrolling) {\n return end();\n }\n\n dampScroll = damp(scroll, dampScroll, dampFactor);\n window.scrollTo({ top: dampScroll });\n\n if (dampScroll === scroll) {\n isScrolling = false;\n }\n\n return requestAnimationFrame(loop);\n }\n\n /**\n * Start the scroll animation\n * @param {number} target The target scroll\n */\n function start(target) {\n // Update vars\n isScrolling = true;\n dampScroll = window.pageYOffset;\n scroll = target;\n\n // Bind wheel event to stop the animation if\n // the user wants to scroll manually\n window.addEventListener('wheel', eventHandler, { passive: true });\n window.addEventListener('touchmove', eventHandler, { passive: true });\n\n // Init the loop\n loop();\n }\n\n // Start the scroll\n start(scrollTarget);\n });\n}\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AASF,SAAR,SAA0B,iBAAiB,EAAE,SAAS,GAAG,aAAa,IAAI,IAAI,CAAC,GAAG;AACvF,MAAI,gBAAgB;AAEpB,MAAI,2BAA2B,aAAa;AAC1C,oBAAgB;AAAA,EAClB,OAAO;AACL,oBAAgB,SAAS,cAAc,eAAe;AAAA,EACxD;AAEA,MAAI,CAAC,eAAe;AAClB,WAAO,QAAQ,QAAQ,OAAO,WAAW;AAAA,EAC3C;AAEA,QAAM,QAAQ,cAAc,sBAAsB;AAClD,QAAM,eAAe,iBAAiB,aAAa,EAAE,mBAAmB;AACxE,QAAM,MAAM,SAAS,gBAAgB,eAAe,OAAO;AAC3D,MAAI,eAAe,MAAM,MAAM,OAAO,cAAc,OAAO,SAAS,cAAc,EAAE,IAAI;AAGxF,MAAI,eAAe,KAAK;AACtB,mBAAe;AAAA,EACjB;AAEA,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,QAAI,cAAc;AAClB,QAAI,SAAS,OAAO;AACpB,QAAI,aAAa,OAAO;AAMxB,aAAS,eAAe;AACtB,oBAAc;AAAA,IAChB;AAKA,aAAS,MAAM;AACb,aAAO,oBAAoB,SAAS,YAAY;AAChD,aAAO,oBAAoB,aAAa,YAAY;AACpD,cAAQ,OAAO,WAAW;AAAA,IAC5B;AAMA,aAAS,OAAO;AACd,UAAI,CAAC,aAAa;AAChB,eAAO,IAAI;AAAA,MACb;AAEA,mBAAa,KAAK,QAAQ,YAAY,UAAU;AAChD,aAAO,SAAS,EAAE,KAAK,WAAW,CAAC;AAEnC,UAAI,eAAe,QAAQ;AACzB,sBAAc;AAAA,MAChB;AAEA,aAAO,sBAAsB,IAAI;AAAA,IACnC;AAMA,aAAS,MAAM,QAAQ;AAErB,oBAAc;AACd,mBAAa,OAAO;AACpB,eAAS;AAIT,aAAO,iBAAiB,SAAS,cAAc,EAAE,SAAS,KAAK,CAAC;AAChE,aAAO,iBAAiB,aAAa,cAAc,EAAE,SAAS,KAAK,CAAC;AAGpE,WAAK;AAAA,IACP;AAGA,UAAM,YAAY;AAAA,EACpB,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -48,3 +48,4 @@ var import_withoutTrailingSlash = __toESM(require("./withoutTrailingSlash.cjs"),
48
48
  var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.cjs"), 1);
49
49
  var import_withTrailingSlash = __toESM(require("./withTrailingSlash.cjs"), 1);
50
50
  if (module.exports.default) module.exports = module.exports.default;
51
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/index.js"],
4
+ "sourcesContent": ["export { default as withLeadingCharacters } from './withLeadingCharacters.js';\nexport { default as withLeadingSlash } from './withLeadingSlash.js';\nexport { default as withoutLeadingCharacters } from './withoutLeadingCharacters.js';\nexport { default as withoutLeadingCharactersRecursive } from './withoutLeadingCharactersRecursive.js';\nexport { default as withoutLeadingSlash } from './withoutLeadingSlash.js';\nexport { default as withoutTrailingCharacters } from './withoutTrailingCharacters.js';\nexport { default as withoutTrailingCharactersRecursive } from './withoutTrailingCharactersRecursive.js';\nexport { default as withoutTrailingSlash } from './withoutTrailingSlash.js';\nexport { default as withTrailingCharacters } from './withTrailingCharacters.js';\nexport { default as withTrailingSlash } from './withTrailingSlash.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAiD;AACjD,8BAA4C;AAC5C,sCAAoD;AACpD,+CAA6D;AAC7D,iCAA+C;AAC/C,uCAAqD;AACrD,gDAA8D;AAC9D,kCAAgD;AAChD,oCAAkD;AAClD,+BAA6C;",
6
+ "names": []
7
+ }
@@ -20,3 +20,4 @@ export {
20
20
  default8 as withoutTrailingCharactersRecursive,
21
21
  default9 as withoutTrailingSlash
22
22
  };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/index.js"],
4
+ "sourcesContent": ["export { default as withLeadingCharacters } from './withLeadingCharacters.js';\nexport { default as withLeadingSlash } from './withLeadingSlash.js';\nexport { default as withoutLeadingCharacters } from './withoutLeadingCharacters.js';\nexport { default as withoutLeadingCharactersRecursive } from './withoutLeadingCharactersRecursive.js';\nexport { default as withoutLeadingSlash } from './withoutLeadingSlash.js';\nexport { default as withoutTrailingCharacters } from './withoutTrailingCharacters.js';\nexport { default as withoutTrailingCharactersRecursive } from './withoutTrailingCharactersRecursive.js';\nexport { default as withoutTrailingSlash } from './withoutTrailingSlash.js';\nexport { default as withTrailingCharacters } from './withTrailingCharacters.js';\nexport { default as withTrailingSlash } from './withTrailingSlash.js';\n"],
5
+ "mappings": "AAAA,SAAoB,WAAXA,gBAAwC;AACjD,SAAoB,WAAXA,gBAAmC;AAC5C,SAAoB,WAAXA,gBAA2C;AACpD,SAAoB,WAAXA,gBAAoD;AAC7D,SAAoB,WAAXA,gBAAsC;AAC/C,SAAoB,WAAXA,gBAA4C;AACrD,SAAoB,WAAXA,gBAAqD;AAC9D,SAAoB,WAAXA,gBAAuC;AAChD,SAAoB,WAAXA,iBAAyC;AAClD,SAAoB,WAAXA,iBAAoC;",
6
+ "names": ["default"]
7
+ }
@@ -33,3 +33,4 @@ function withLeadingCharacters(string, characters) {
33
33
  return `${characters}${(0, import_withoutLeadingCharacters.default)(string, characters)}`;
34
34
  }
35
35
  if (module.exports.default) module.exports = module.exports.default;
36
+ //# sourceMappingURL=withLeadingCharacters.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withLeadingCharacters.js"],
4
+ "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Add the given characters to the start of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withLeadingCharacters(string, characters) {\n return `${characters}${withoutLeadingCharacters(string, characters)}`;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAqC;AAStB,SAAR,sBAAuC,QAAQ,YAAY;AAChE,SAAO,GAAG,iBAAa,gCAAAA,SAAyB,QAAQ,UAAU;AACpE;",
6
+ "names": ["withoutLeadingCharacters"]
7
+ }
@@ -5,3 +5,4 @@ function withLeadingCharacters(string, characters) {
5
5
  export {
6
6
  withLeadingCharacters as default
7
7
  };
8
+ //# sourceMappingURL=withLeadingCharacters.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withLeadingCharacters.js"],
4
+ "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Add the given characters to the start of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withLeadingCharacters(string, characters) {\n return `${characters}${withoutLeadingCharacters(string, characters)}`;\n}\n"],
5
+ "mappings": "AAAA,OAAO,8BAA8B;AAStB,SAAR,sBAAuC,QAAQ,YAAY;AAChE,SAAO,GAAG,aAAa,yBAAyB,QAAQ,UAAU;AACpE;",
6
+ "names": []
7
+ }
@@ -33,3 +33,4 @@ function withLeadingSlash(string) {
33
33
  return (0, import_withLeadingCharacters.default)(string, "/");
34
34
  }
35
35
  if (module.exports.default) module.exports = module.exports.default;
36
+ //# sourceMappingURL=withLeadingSlash.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withLeadingSlash.js"],
4
+ "sourcesContent": ["import withLeadingCharacters from './withLeadingCharacters.js';\n\n/**\n * Add a leading slash to a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string with a leading slash.\n */\nexport default function withLeadingSlash(string) {\n return withLeadingCharacters(string, '/');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAkC;AAQnB,SAAR,iBAAkC,QAAQ;AAC/C,aAAO,6BAAAA,SAAsB,QAAQ,GAAG;AAC1C;",
6
+ "names": ["withLeadingCharacters"]
7
+ }
@@ -5,3 +5,4 @@ function withLeadingSlash(string) {
5
5
  export {
6
6
  withLeadingSlash as default
7
7
  };
8
+ //# sourceMappingURL=withLeadingSlash.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withLeadingSlash.js"],
4
+ "sourcesContent": ["import withLeadingCharacters from './withLeadingCharacters.js';\n\n/**\n * Add a leading slash to a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string with a leading slash.\n */\nexport default function withLeadingSlash(string) {\n return withLeadingCharacters(string, '/');\n}\n"],
5
+ "mappings": "AAAA,OAAO,2BAA2B;AAQnB,SAAR,iBAAkC,QAAQ;AAC/C,SAAO,sBAAsB,QAAQ,GAAG;AAC1C;",
6
+ "names": []
7
+ }
@@ -33,3 +33,4 @@ function withTrailingCharacters(string, characters) {
33
33
  return `${(0, import_withoutTrailingCharacters.default)(string, characters)}${characters}`;
34
34
  }
35
35
  if (module.exports.default) module.exports = module.exports.default;
36
+ //# sourceMappingURL=withTrailingCharacters.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withTrailingCharacters.js"],
4
+ "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Add the given characters to the end of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the end.\n * @returns {string}\n */\nexport default function withTrailingCharacters(string, characters) {\n return `${withoutTrailingCharacters(string, characters)}${characters}`;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAsC;AASvB,SAAR,uBAAwC,QAAQ,YAAY;AACjE,SAAO,OAAG,iCAAAA,SAA0B,QAAQ,UAAU,IAAI;AAC5D;",
6
+ "names": ["withoutTrailingCharacters"]
7
+ }
@@ -5,3 +5,4 @@ function withTrailingCharacters(string, characters) {
5
5
  export {
6
6
  withTrailingCharacters as default
7
7
  };
8
+ //# sourceMappingURL=withTrailingCharacters.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withTrailingCharacters.js"],
4
+ "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Add the given characters to the end of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the end.\n * @returns {string}\n */\nexport default function withTrailingCharacters(string, characters) {\n return `${withoutTrailingCharacters(string, characters)}${characters}`;\n}\n"],
5
+ "mappings": "AAAA,OAAO,+BAA+B;AASvB,SAAR,uBAAwC,QAAQ,YAAY;AACjE,SAAO,GAAG,0BAA0B,QAAQ,UAAU,IAAI;AAC5D;",
6
+ "names": []
7
+ }
@@ -33,3 +33,4 @@ function withTrailingSlash(string) {
33
33
  return (0, import_withTrailingCharacters.default)(string, "/");
34
34
  }
35
35
  if (module.exports.default) module.exports = module.exports.default;
36
+ //# sourceMappingURL=withTrailingSlash.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withTrailingSlash.js"],
4
+ "sourcesContent": ["import withTrailingCharacters from './withTrailingCharacters.js';\n\n/**\n * Add a trailing slash to a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string with a trailing slash.\n */\nexport default function withTrailingSlash(string) {\n return withTrailingCharacters(string, '/');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAAmC;AAQpB,SAAR,kBAAmC,QAAQ;AAChD,aAAO,8BAAAA,SAAuB,QAAQ,GAAG;AAC3C;",
6
+ "names": ["withTrailingCharacters"]
7
+ }
@@ -5,3 +5,4 @@ function withTrailingSlash(string) {
5
5
  export {
6
6
  withTrailingSlash as default
7
7
  };
8
+ //# sourceMappingURL=withTrailingSlash.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withTrailingSlash.js"],
4
+ "sourcesContent": ["import withTrailingCharacters from './withTrailingCharacters.js';\n\n/**\n * Add a trailing slash to a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string with a trailing slash.\n */\nexport default function withTrailingSlash(string) {\n return withTrailingCharacters(string, '/');\n}\n"],
5
+ "mappings": "AAAA,OAAO,4BAA4B;AAQpB,SAAR,kBAAmC,QAAQ;AAChD,SAAO,uBAAuB,QAAQ,GAAG;AAC3C;",
6
+ "names": []
7
+ }
@@ -26,3 +26,4 @@ function withoutLeadingCharacters(string, characters) {
26
26
  return string.replace(new RegExp(`^${characters}`), "");
27
27
  }
28
28
  if (module.exports.default) module.exports = module.exports.default;
29
+ //# sourceMappingURL=withoutLeadingCharacters.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingCharacters.js"],
4
+ "sourcesContent": ["/**\n * Remove the given characters from the start of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to remove from the start.\n * @returns {string}\n */\nexport default function withoutLeadingCharacters(string, characters) {\n return string.replace(new RegExp(`^${characters}`), '');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOe,SAAR,yBAA0C,QAAQ,YAAY;AACnE,SAAO,OAAO,QAAQ,IAAI,OAAO,IAAI,YAAY,GAAG,EAAE;AACxD;",
6
+ "names": []
7
+ }
@@ -4,3 +4,4 @@ function withoutLeadingCharacters(string, characters) {
4
4
  export {
5
5
  withoutLeadingCharacters as default
6
6
  };
7
+ //# sourceMappingURL=withoutLeadingCharacters.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingCharacters.js"],
4
+ "sourcesContent": ["/**\n * Remove the given characters from the start of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to remove from the start.\n * @returns {string}\n */\nexport default function withoutLeadingCharacters(string, characters) {\n return string.replace(new RegExp(`^${characters}`), '');\n}\n"],
5
+ "mappings": "AAOe,SAAR,yBAA0C,QAAQ,YAAY;AACnE,SAAO,OAAO,QAAQ,IAAI,OAAO,IAAI,YAAY,GAAG,EAAE;AACxD;",
6
+ "names": []
7
+ }
@@ -38,3 +38,4 @@ function withoutLeadingCharactersRecursive(string, characters) {
38
38
  return str;
39
39
  }
40
40
  if (module.exports.default) module.exports = module.exports.default;
41
+ //# sourceMappingURL=withoutLeadingCharactersRecursive.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingCharactersRecursive.js"],
4
+ "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Remove the given characters to the start of the given string recursively.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withoutLeadingCharactersRecursive(string, characters) {\n let str = withoutLeadingCharacters(string, characters);\n const regex = new RegExp(`^${characters}`);\n\n while (regex.test(str)) {\n str = withoutLeadingCharacters(str, characters);\n }\n\n return str;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAqC;AAStB,SAAR,kCAAmD,QAAQ,YAAY;AAC5E,MAAI,UAAM,gCAAAA,SAAyB,QAAQ,UAAU;AACrD,QAAM,QAAQ,IAAI,OAAO,IAAI,YAAY;AAEzC,SAAO,MAAM,KAAK,GAAG,GAAG;AACtB,cAAM,gCAAAA,SAAyB,KAAK,UAAU;AAAA,EAChD;AAEA,SAAO;AACT;",
6
+ "names": ["withoutLeadingCharacters"]
7
+ }
@@ -10,3 +10,4 @@ function withoutLeadingCharactersRecursive(string, characters) {
10
10
  export {
11
11
  withoutLeadingCharactersRecursive as default
12
12
  };
13
+ //# sourceMappingURL=withoutLeadingCharactersRecursive.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingCharactersRecursive.js"],
4
+ "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Remove the given characters to the start of the given string recursively.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withoutLeadingCharactersRecursive(string, characters) {\n let str = withoutLeadingCharacters(string, characters);\n const regex = new RegExp(`^${characters}`);\n\n while (regex.test(str)) {\n str = withoutLeadingCharacters(str, characters);\n }\n\n return str;\n}\n"],
5
+ "mappings": "AAAA,OAAO,8BAA8B;AAStB,SAAR,kCAAmD,QAAQ,YAAY;AAC5E,MAAI,MAAM,yBAAyB,QAAQ,UAAU;AACrD,QAAM,QAAQ,IAAI,OAAO,IAAI,YAAY;AAEzC,SAAO,MAAM,KAAK,GAAG,GAAG;AACtB,UAAM,yBAAyB,KAAK,UAAU;AAAA,EAChD;AAEA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -33,3 +33,4 @@ function withoutLeadingSlash(string) {
33
33
  return (0, import_withoutLeadingCharacters.default)(string, "/");
34
34
  }
35
35
  if (module.exports.default) module.exports = module.exports.default;
36
+ //# sourceMappingURL=withoutLeadingSlash.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingSlash.js"],
4
+ "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Remove the leading slash from a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string without leading slash.\n */\nexport default function withoutLeadingSlash(string) {\n return withoutLeadingCharacters(string, '/');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAqC;AAQtB,SAAR,oBAAqC,QAAQ;AAClD,aAAO,gCAAAA,SAAyB,QAAQ,GAAG;AAC7C;",
6
+ "names": ["withoutLeadingCharacters"]
7
+ }
@@ -5,3 +5,4 @@ function withoutLeadingSlash(string) {
5
5
  export {
6
6
  withoutLeadingSlash as default
7
7
  };
8
+ //# sourceMappingURL=withoutLeadingSlash.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingSlash.js"],
4
+ "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Remove the leading slash from a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string without leading slash.\n */\nexport default function withoutLeadingSlash(string) {\n return withoutLeadingCharacters(string, '/');\n}\n"],
5
+ "mappings": "AAAA,OAAO,8BAA8B;AAQtB,SAAR,oBAAqC,QAAQ;AAClD,SAAO,yBAAyB,QAAQ,GAAG;AAC7C;",
6
+ "names": []
7
+ }
@@ -26,3 +26,4 @@ function withoutTrailingCharacters(string, characters) {
26
26
  return string.replace(new RegExp(`${characters}$`), "");
27
27
  }
28
28
  if (module.exports.default) module.exports = module.exports.default;
29
+ //# sourceMappingURL=withoutTrailingCharacters.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingCharacters.js"],
4
+ "sourcesContent": ["/**\n * Remove the given characters from the end of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to remove from the end.\n * @returns {string}\n */\nexport default function withoutTrailingCharacters(string, characters) {\n return string.replace(new RegExp(`${characters}$`), '');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOe,SAAR,0BAA2C,QAAQ,YAAY;AACpE,SAAO,OAAO,QAAQ,IAAI,OAAO,GAAG,aAAa,GAAG,EAAE;AACxD;",
6
+ "names": []
7
+ }
@@ -4,3 +4,4 @@ function withoutTrailingCharacters(string, characters) {
4
4
  export {
5
5
  withoutTrailingCharacters as default
6
6
  };
7
+ //# sourceMappingURL=withoutTrailingCharacters.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingCharacters.js"],
4
+ "sourcesContent": ["/**\n * Remove the given characters from the end of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to remove from the end.\n * @returns {string}\n */\nexport default function withoutTrailingCharacters(string, characters) {\n return string.replace(new RegExp(`${characters}$`), '');\n}\n"],
5
+ "mappings": "AAOe,SAAR,0BAA2C,QAAQ,YAAY;AACpE,SAAO,OAAO,QAAQ,IAAI,OAAO,GAAG,aAAa,GAAG,EAAE;AACxD;",
6
+ "names": []
7
+ }
@@ -38,3 +38,4 @@ function withoutTrailingCharactersRecursive(string, characters) {
38
38
  return str;
39
39
  }
40
40
  if (module.exports.default) module.exports = module.exports.default;
41
+ //# sourceMappingURL=withoutTrailingCharactersRecursive.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingCharactersRecursive.js"],
4
+ "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Remove the given characters to the start of the given string recursively.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withoutTrailingCharactersRecursive(string, characters) {\n let str = withoutTrailingCharacters(string, characters);\n const regex = new RegExp(`${characters}$`);\n\n while (regex.test(str)) {\n str = withoutTrailingCharacters(str, characters);\n }\n\n return str;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAsC;AASvB,SAAR,mCAAoD,QAAQ,YAAY;AAC7E,MAAI,UAAM,iCAAAA,SAA0B,QAAQ,UAAU;AACtD,QAAM,QAAQ,IAAI,OAAO,GAAG,aAAa;AAEzC,SAAO,MAAM,KAAK,GAAG,GAAG;AACtB,cAAM,iCAAAA,SAA0B,KAAK,UAAU;AAAA,EACjD;AAEA,SAAO;AACT;",
6
+ "names": ["withoutTrailingCharacters"]
7
+ }
@@ -10,3 +10,4 @@ function withoutTrailingCharactersRecursive(string, characters) {
10
10
  export {
11
11
  withoutTrailingCharactersRecursive as default
12
12
  };
13
+ //# sourceMappingURL=withoutTrailingCharactersRecursive.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingCharactersRecursive.js"],
4
+ "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Remove the given characters to the start of the given string recursively.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withoutTrailingCharactersRecursive(string, characters) {\n let str = withoutTrailingCharacters(string, characters);\n const regex = new RegExp(`${characters}$`);\n\n while (regex.test(str)) {\n str = withoutTrailingCharacters(str, characters);\n }\n\n return str;\n}\n"],
5
+ "mappings": "AAAA,OAAO,+BAA+B;AASvB,SAAR,mCAAoD,QAAQ,YAAY;AAC7E,MAAI,MAAM,0BAA0B,QAAQ,UAAU;AACtD,QAAM,QAAQ,IAAI,OAAO,GAAG,aAAa;AAEzC,SAAO,MAAM,KAAK,GAAG,GAAG;AACtB,UAAM,0BAA0B,KAAK,UAAU;AAAA,EACjD;AAEA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -33,3 +33,4 @@ function withoutTrailingSlash(string) {
33
33
  return (0, import_withoutTrailingCharacters.default)(string, "/");
34
34
  }
35
35
  if (module.exports.default) module.exports = module.exports.default;
36
+ //# sourceMappingURL=withoutTrailingSlash.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingSlash.js"],
4
+ "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Remove the trailing slash from a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string without trailing slash.\n */\nexport default function withoutTrailingSlash(string) {\n return withoutTrailingCharacters(string, '/');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAsC;AAQvB,SAAR,qBAAsC,QAAQ;AACnD,aAAO,iCAAAA,SAA0B,QAAQ,GAAG;AAC9C;",
6
+ "names": ["withoutTrailingCharacters"]
7
+ }
@@ -5,3 +5,4 @@ function withoutTrailingSlash(string) {
5
5
  export {
6
6
  withoutTrailingSlash as default
7
7
  };
8
+ //# sourceMappingURL=withoutTrailingSlash.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingSlash.js"],
4
+ "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Remove the trailing slash from a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string without trailing slash.\n */\nexport default function withoutTrailingSlash(string) {\n return withoutTrailingCharacters(string, '/');\n}\n"],
5
+ "mappings": "AAAA,OAAO,+BAA+B;AAQvB,SAAR,qBAAsC,QAAQ;AACnD,SAAO,0BAA0B,QAAQ,GAAG;AAC9C;",
6
+ "names": []
7
+ }
@@ -34,3 +34,4 @@ function throttle(fn, delay = 16) {
34
34
  };
35
35
  }
36
36
  if (module.exports.default) module.exports = module.exports.default;
37
+ //# sourceMappingURL=throttle.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../packages/js-toolkit/utils/throttle.js"],
4
+ "sourcesContent": ["/**\n * Simple throttling helper that limits a function to only run once every {delay}ms.\n *\n * @param {Function} fn The function to throttle\n * @param {number} [delay] The delay in ms\n * @returns {Function} The throttled function.\n */\nexport default function throttle(fn, delay = 16) {\n let lastCall = 0;\n return function throttled(...args) {\n const now = Date.now();\n if (now - lastCall < delay) {\n return false;\n }\n lastCall = now;\n return fn(...args);\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOe,SAAR,SAA0B,IAAI,QAAQ,IAAI;AAC/C,MAAI,WAAW;AACf,SAAO,SAAS,aAAa,MAAM;AACjC,UAAM,MAAM,KAAK,IAAI;AACrB,QAAI,MAAM,WAAW,OAAO;AAC1B,aAAO;AAAA,IACT;AACA,eAAW;AACX,WAAO,GAAG,GAAG,IAAI;AAAA,EACnB;AACF;",
6
+ "names": []
7
+ }
package/utils/throttle.js CHANGED
@@ -12,3 +12,4 @@ function throttle(fn, delay = 16) {
12
12
  export {
13
13
  throttle as default
14
14
  };
15
+ //# sourceMappingURL=throttle.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../packages/js-toolkit/utils/throttle.js"],
4
+ "sourcesContent": ["/**\n * Simple throttling helper that limits a function to only run once every {delay}ms.\n *\n * @param {Function} fn The function to throttle\n * @param {number} [delay] The delay in ms\n * @returns {Function} The throttled function.\n */\nexport default function throttle(fn, delay = 16) {\n let lastCall = 0;\n return function throttled(...args) {\n const now = Date.now();\n if (now - lastCall < delay) {\n return false;\n }\n lastCall = now;\n return fn(...args);\n };\n}\n"],
5
+ "mappings": "AAOe,SAAR,SAA0B,IAAI,QAAQ,IAAI;AAC/C,MAAI,WAAW;AACf,SAAO,SAAS,aAAa,MAAM;AACjC,UAAM,MAAM,KAAK,IAAI;AACrB,QAAI,MAAM,WAAW,OAAO;AAC1B,aAAO;AAAA,IACT;AACA,eAAW;AACX,WAAO,GAAG,GAAG,IAAI;AAAA,EACnB;AACF;",
6
+ "names": []
7
+ }
package/utils/tween.cjs CHANGED
@@ -46,12 +46,11 @@ function normalizeEase(ease) {
46
46
  return ease;
47
47
  }
48
48
  function tween(callback, options = {}) {
49
- var _a;
50
49
  const raf = (0, import_raf.default)();
51
50
  let progressValue = 0;
52
51
  let easedProgress = 0;
53
52
  const ease = normalizeEase(options.easing);
54
- let duration = (_a = options.duration) != null ? _a : 1;
53
+ let duration = options.duration ?? 1;
55
54
  duration *= 1e3;
56
55
  let startTime = performance.now();
57
56
  let endTime = startTime + duration;
@@ -115,3 +114,4 @@ function tween(callback, options = {}) {
115
114
  };
116
115
  }
117
116
  if (module.exports.default) module.exports = module.exports.default;
117
+ //# sourceMappingURL=tween.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../packages/js-toolkit/utils/tween.js"],
4
+ "sourcesContent": ["import { cubicBezier } from '@motionone/easing';\nimport { lerp, map, clamp01 } from './math/index.js';\nimport { isDefined, isArray } from './is.js';\nimport { noop, noopValue as linear } from './noop.js';\nimport useRaf from '../services/raf.js';\n\nlet id = 0;\nconst PROGRESS_PRECISION = 0.0001;\n\n/**\n * @typedef {[number, number, number, number]} BezierCurve\n * @typedef {{\n * duration?: number;\n * easing?: import('./math/createEases.js').EasingFunction|BezierCurve;\n * onStart?: () => void;\n * onProgress?: (progress: number, easedProgress: number) => void;\n * onFinish?: (progress: number, easedProgress: number) => void;\n * }} TweenOptions\n */\n\n/**\n * Normalize a easing function with default fallbacks.\n * @param {((p:number) => number)|[number,number,number,number]} ease\n * @returns {(p:number) => number}\n */\nexport function normalizeEase(ease) {\n if (!isDefined(ease)) {\n return linear;\n }\n\n if (isArray(ease)) {\n return cubicBezier(...ease);\n }\n\n return ease;\n}\n\n/**\n * Tween from 0 to 1.\n * @param {(progress:number)=>any} callback\n * @param {TweenOptions} [options]\n * @returns {any}\n */\nexport function tween(callback, options = {}) {\n const raf = useRaf();\n\n let progressValue = 0;\n let easedProgress = 0;\n\n const ease = normalizeEase(options.easing);\n let duration = options.duration ?? 1;\n duration *= 1000;\n\n let startTime = performance.now();\n let endTime = startTime + duration;\n\n const key = `tw-${id}`;\n id += 1;\n\n const { onStart = noop, onProgress = noop, onFinish = noop } = options;\n let isRunning = false;\n\n /**\n * Pause the animation.\n *\n * @returns {void}\n */\n function pause() {\n isRunning = false;\n raf.remove(key);\n }\n\n /**\n * Set the progress value.\n *\n * @param {number} newProgress The new progress value.\n * @returns {number}\n */\n function progress(newProgress) {\n if (typeof newProgress === 'undefined') {\n return easedProgress;\n }\n\n progressValue = newProgress;\n easedProgress = ease(progressValue);\n\n // Stop when reaching precision\n if (Math.abs(1 - easedProgress) < PROGRESS_PRECISION) {\n progressValue = 1;\n easedProgress = 1;\n }\n\n callback(easedProgress);\n onProgress(progressValue, easedProgress);\n\n if (easedProgress === 1) {\n pause();\n requestAnimationFrame(() => onFinish(progressValue, easedProgress));\n }\n\n return progressValue;\n }\n\n /**\n * Loop for rendering the animation.\n *\n * @param {Object} props\n * @param {number} props.time\n * @returns {void}\n */\n function tick(props) {\n if (!isRunning) {\n raf.remove(key);\n return;\n }\n\n progress(clamp01(map(props.time, startTime, endTime, 0, 1)));\n }\n\n /**\n * Play the animation.\n *\n * @returns {void}\n */\n function start() {\n onStart();\n startTime = performance.now();\n endTime = startTime + duration;\n progressValue = 0;\n easedProgress = 0;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n /**\n * Play a paused animation.\n * @returns {void}\n */\n function play() {\n if (isRunning) {\n return;\n }\n\n startTime = performance.now() - lerp(0, duration, progressValue);\n endTime = startTime + duration;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n return {\n start,\n finish: () => progress(1),\n pause,\n play,\n progress,\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA4B;AAC5B,kBAAmC;AACnC,gBAAmC;AACnC,kBAA0C;AAC1C,iBAAmB;AAEnB,IAAI,KAAK;AACT,IAAM,qBAAqB;AAkBpB,SAAS,cAAc,MAAM;AAClC,MAAI,KAAC,qBAAU,IAAI,GAAG;AACpB,WAAO,YAAAA;AAAA,EACT;AAEA,UAAI,mBAAQ,IAAI,GAAG;AACjB,eAAO,2BAAY,GAAG,IAAI;AAAA,EAC5B;AAEA,SAAO;AACT;AAQO,SAAS,MAAM,UAAU,UAAU,CAAC,GAAG;AAC5C,QAAM,UAAM,WAAAC,SAAO;AAEnB,MAAI,gBAAgB;AACpB,MAAI,gBAAgB;AAEpB,QAAM,OAAO,cAAc,QAAQ,MAAM;AACzC,MAAI,WAAW,QAAQ,YAAY;AACnC,cAAY;AAEZ,MAAI,YAAY,YAAY,IAAI;AAChC,MAAI,UAAU,YAAY;AAE1B,QAAM,MAAM,MAAM;AAClB,QAAM;AAEN,QAAM,EAAE,UAAU,kBAAM,aAAa,kBAAM,WAAW,iBAAK,IAAI;AAC/D,MAAI,YAAY;AAOhB,WAAS,QAAQ;AACf,gBAAY;AACZ,QAAI,OAAO,GAAG;AAAA,EAChB;AAQA,WAAS,SAAS,aAAa;AAC7B,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO;AAAA,IACT;AAEA,oBAAgB;AAChB,oBAAgB,KAAK,aAAa;AAGlC,QAAI,KAAK,IAAI,IAAI,aAAa,IAAI,oBAAoB;AACpD,sBAAgB;AAChB,sBAAgB;AAAA,IAClB;AAEA,aAAS,aAAa;AACtB,eAAW,eAAe,aAAa;AAEvC,QAAI,kBAAkB,GAAG;AACvB,YAAM;AACN,4BAAsB,MAAM,SAAS,eAAe,aAAa,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AASA,WAAS,KAAK,OAAO;AACnB,QAAI,CAAC,WAAW;AACd,UAAI,OAAO,GAAG;AACd;AAAA,IACF;AAEA,iBAAS,yBAAQ,iBAAI,MAAM,MAAM,WAAW,SAAS,GAAG,CAAC,CAAC,CAAC;AAAA,EAC7D;AAOA,WAAS,QAAQ;AACf,YAAQ;AACR,gBAAY,YAAY,IAAI;AAC5B,cAAU,YAAY;AACtB,oBAAgB;AAChB,oBAAgB;AAChB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAMA,WAAS,OAAO;AACd,QAAI,WAAW;AACb;AAAA,IACF;AAEA,gBAAY,YAAY,IAAI,QAAI,kBAAK,GAAG,UAAU,aAAa;AAC/D,cAAU,YAAY;AACtB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAEA,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,MAAM,SAAS,CAAC;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": ["linear", "useRaf"]
7
+ }
package/utils/tween.d.ts CHANGED
@@ -22,4 +22,10 @@ export function normalizeEase(ease: [number, number, number, number] | ((p: numb
22
22
  */
23
23
  export function tween(callback: (progress: number) => any, options?: TweenOptions): any;
24
24
  export type BezierCurve = [number, number, number, number];
25
- export type TweenOptions = TweenOptions;
25
+ export type TweenOptions = {
26
+ duration?: number;
27
+ easing?: import('./math/createEases.js').EasingFunction | BezierCurve;
28
+ onStart?: () => void;
29
+ onProgress?: (progress: number, easedProgress: number) => void;
30
+ onFinish?: (progress: number, easedProgress: number) => void;
31
+ };
package/utils/tween.js CHANGED
@@ -15,12 +15,11 @@ function normalizeEase(ease) {
15
15
  return ease;
16
16
  }
17
17
  function tween(callback, options = {}) {
18
- var _a;
19
18
  const raf = useRaf();
20
19
  let progressValue = 0;
21
20
  let easedProgress = 0;
22
21
  const ease = normalizeEase(options.easing);
23
- let duration = (_a = options.duration) != null ? _a : 1;
22
+ let duration = options.duration ?? 1;
24
23
  duration *= 1e3;
25
24
  let startTime = performance.now();
26
25
  let endTime = startTime + duration;
@@ -87,3 +86,4 @@ export {
87
86
  normalizeEase,
88
87
  tween
89
88
  };
89
+ //# sourceMappingURL=tween.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../packages/js-toolkit/utils/tween.js"],
4
+ "sourcesContent": ["import { cubicBezier } from '@motionone/easing';\nimport { lerp, map, clamp01 } from './math/index.js';\nimport { isDefined, isArray } from './is.js';\nimport { noop, noopValue as linear } from './noop.js';\nimport useRaf from '../services/raf.js';\n\nlet id = 0;\nconst PROGRESS_PRECISION = 0.0001;\n\n/**\n * @typedef {[number, number, number, number]} BezierCurve\n * @typedef {{\n * duration?: number;\n * easing?: import('./math/createEases.js').EasingFunction|BezierCurve;\n * onStart?: () => void;\n * onProgress?: (progress: number, easedProgress: number) => void;\n * onFinish?: (progress: number, easedProgress: number) => void;\n * }} TweenOptions\n */\n\n/**\n * Normalize a easing function with default fallbacks.\n * @param {((p:number) => number)|[number,number,number,number]} ease\n * @returns {(p:number) => number}\n */\nexport function normalizeEase(ease) {\n if (!isDefined(ease)) {\n return linear;\n }\n\n if (isArray(ease)) {\n return cubicBezier(...ease);\n }\n\n return ease;\n}\n\n/**\n * Tween from 0 to 1.\n * @param {(progress:number)=>any} callback\n * @param {TweenOptions} [options]\n * @returns {any}\n */\nexport function tween(callback, options = {}) {\n const raf = useRaf();\n\n let progressValue = 0;\n let easedProgress = 0;\n\n const ease = normalizeEase(options.easing);\n let duration = options.duration ?? 1;\n duration *= 1000;\n\n let startTime = performance.now();\n let endTime = startTime + duration;\n\n const key = `tw-${id}`;\n id += 1;\n\n const { onStart = noop, onProgress = noop, onFinish = noop } = options;\n let isRunning = false;\n\n /**\n * Pause the animation.\n *\n * @returns {void}\n */\n function pause() {\n isRunning = false;\n raf.remove(key);\n }\n\n /**\n * Set the progress value.\n *\n * @param {number} newProgress The new progress value.\n * @returns {number}\n */\n function progress(newProgress) {\n if (typeof newProgress === 'undefined') {\n return easedProgress;\n }\n\n progressValue = newProgress;\n easedProgress = ease(progressValue);\n\n // Stop when reaching precision\n if (Math.abs(1 - easedProgress) < PROGRESS_PRECISION) {\n progressValue = 1;\n easedProgress = 1;\n }\n\n callback(easedProgress);\n onProgress(progressValue, easedProgress);\n\n if (easedProgress === 1) {\n pause();\n requestAnimationFrame(() => onFinish(progressValue, easedProgress));\n }\n\n return progressValue;\n }\n\n /**\n * Loop for rendering the animation.\n *\n * @param {Object} props\n * @param {number} props.time\n * @returns {void}\n */\n function tick(props) {\n if (!isRunning) {\n raf.remove(key);\n return;\n }\n\n progress(clamp01(map(props.time, startTime, endTime, 0, 1)));\n }\n\n /**\n * Play the animation.\n *\n * @returns {void}\n */\n function start() {\n onStart();\n startTime = performance.now();\n endTime = startTime + duration;\n progressValue = 0;\n easedProgress = 0;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n /**\n * Play a paused animation.\n * @returns {void}\n */\n function play() {\n if (isRunning) {\n return;\n }\n\n startTime = performance.now() - lerp(0, duration, progressValue);\n endTime = startTime + duration;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n return {\n start,\n finish: () => progress(1),\n pause,\n play,\n progress,\n };\n}\n"],
5
+ "mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,MAAM,KAAK,eAAe;AACnC,SAAS,WAAW,eAAe;AACnC,SAAS,MAAM,aAAa,cAAc;AAC1C,OAAO,YAAY;AAEnB,IAAI,KAAK;AACT,MAAM,qBAAqB;AAkBpB,SAAS,cAAc,MAAM;AAClC,MAAI,CAAC,UAAU,IAAI,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,IAAI,GAAG;AACjB,WAAO,YAAY,GAAG,IAAI;AAAA,EAC5B;AAEA,SAAO;AACT;AAQO,SAAS,MAAM,UAAU,UAAU,CAAC,GAAG;AAC5C,QAAM,MAAM,OAAO;AAEnB,MAAI,gBAAgB;AACpB,MAAI,gBAAgB;AAEpB,QAAM,OAAO,cAAc,QAAQ,MAAM;AACzC,MAAI,WAAW,QAAQ,YAAY;AACnC,cAAY;AAEZ,MAAI,YAAY,YAAY,IAAI;AAChC,MAAI,UAAU,YAAY;AAE1B,QAAM,MAAM,MAAM;AAClB,QAAM;AAEN,QAAM,EAAE,UAAU,MAAM,aAAa,MAAM,WAAW,KAAK,IAAI;AAC/D,MAAI,YAAY;AAOhB,WAAS,QAAQ;AACf,gBAAY;AACZ,QAAI,OAAO,GAAG;AAAA,EAChB;AAQA,WAAS,SAAS,aAAa;AAC7B,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO;AAAA,IACT;AAEA,oBAAgB;AAChB,oBAAgB,KAAK,aAAa;AAGlC,QAAI,KAAK,IAAI,IAAI,aAAa,IAAI,oBAAoB;AACpD,sBAAgB;AAChB,sBAAgB;AAAA,IAClB;AAEA,aAAS,aAAa;AACtB,eAAW,eAAe,aAAa;AAEvC,QAAI,kBAAkB,GAAG;AACvB,YAAM;AACN,4BAAsB,MAAM,SAAS,eAAe,aAAa,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AASA,WAAS,KAAK,OAAO;AACnB,QAAI,CAAC,WAAW;AACd,UAAI,OAAO,GAAG;AACd;AAAA,IACF;AAEA,aAAS,QAAQ,IAAI,MAAM,MAAM,WAAW,SAAS,GAAG,CAAC,CAAC,CAAC;AAAA,EAC7D;AAOA,WAAS,QAAQ;AACf,YAAQ;AACR,gBAAY,YAAY,IAAI;AAC5B,cAAU,YAAY;AACtB,oBAAgB;AAChB,oBAAgB;AAChB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAMA,WAAS,OAAO;AACd,QAAI,WAAW;AACb;AAAA,IACF;AAEA,gBAAY,YAAY,IAAI,IAAI,KAAK,GAAG,UAAU,aAAa;AAC/D,cAAU,YAAY;AACtB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAEA,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,MAAM,SAAS,CAAC;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }