@synnaxlabs/pluto 0.46.6 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/dist/Animated-BewuBtBY.cjs +1 -0
  2. package/dist/Animated-Ck-9v2gm.cjs +1 -0
  3. package/dist/Animated-M9ynNzcI.js +356 -0
  4. package/dist/Animated-otpyxn5i.js +28 -0
  5. package/dist/Box-BvqALodh.cjs +1 -0
  6. package/dist/Box-D5Qv__kr.js +95 -0
  7. package/dist/Button-BFoGC4WW.js +305 -0
  8. package/dist/Button-C3dvpk52.cjs +1 -0
  9. package/dist/Dialog-CO4iLhHf.js +58 -0
  10. package/dist/Dialog-DwhFD4z2.cjs +1 -0
  11. package/dist/Editable-BXFY3-UW.cjs +1 -0
  12. package/dist/Editable-CxgdRDPb.js +193 -0
  13. package/dist/Haul-2Xa_nMgc.cjs +1 -0
  14. package/dist/Haul-BuI0PZpo.js +128 -0
  15. package/dist/Items-DNcTFEUJ.cjs +4 -0
  16. package/dist/Items-G25zb57I.js +777 -0
  17. package/dist/Menu-D-uhqnfk.cjs +1 -0
  18. package/dist/Menu-DqkB9vpH.js +156 -0
  19. package/dist/Provider--RxgAoVG.js +434 -0
  20. package/dist/Provider-575hnWmi.cjs +5 -0
  21. package/dist/Tags-Dekr_hwk.cjs +1 -0
  22. package/dist/Tags-Dpu9kD_T.js +604 -0
  23. package/dist/Text-BzTkWLeU.js +1580 -0
  24. package/dist/Text-DECnk5vG.cjs +1 -0
  25. package/dist/{Video-CBAgqKPg.js → Video-CITi2j07.js} +1 -1
  26. package/dist/{Video-DqumxMbz.cjs → Video-VlT7jSYk.cjs} +1 -1
  27. package/dist/_commonjsHelpers-BH3jXuIh.cjs +1 -0
  28. package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
  29. package/dist/button.cjs +1 -1
  30. package/dist/button.js +1 -1
  31. package/dist/color.cjs +1 -1
  32. package/dist/color.js +1 -1
  33. package/dist/{css-BYwooBtA.js → css-D6ZBcSwh.js} +800 -799
  34. package/dist/css-HnNQMUzV.cjs +8 -0
  35. package/dist/css.cjs +1 -1
  36. package/dist/css.js +2 -2
  37. package/dist/debounce-CW9Q-DsR.js +17 -0
  38. package/dist/debounce-heEWeOqL.cjs +1 -0
  39. package/dist/deep-DRVLw7iw.js +349 -0
  40. package/dist/deep-DtdcJG4q.cjs +1 -0
  41. package/dist/dialog.cjs +1 -1
  42. package/dist/dialog.js +1 -1
  43. package/dist/dimensions-BFCMI7yN.js +19 -0
  44. package/dist/dimensions-CGLhBwVq.cjs +1 -0
  45. package/dist/eraser-Dm5Du4PL.cjs +11 -0
  46. package/dist/eraser-DvzR9kLf.js +955 -0
  47. package/dist/eslint.config.d.ts +3 -0
  48. package/dist/eslint.config.d.ts.map +1 -0
  49. package/dist/ether.cjs +1 -1
  50. package/dist/ether.js +70 -67
  51. package/dist/external-B2Q-Yx8D.cjs +1 -0
  52. package/dist/external-B7hb5HYU.js +88 -0
  53. package/dist/external-B9a_p-VK.cjs +1 -0
  54. package/dist/external-BA6DRS2n.cjs +1 -0
  55. package/dist/external-BVcgi9yX.cjs +1 -0
  56. package/dist/external-BZwFEYop.js +44 -0
  57. package/dist/external-BhOvtmPt.js +24 -0
  58. package/dist/external-C5W7VXIW.cjs +1 -0
  59. package/dist/external-C5ssXUvL.cjs +46 -0
  60. package/dist/external-CGRGVYRj.js +31 -0
  61. package/dist/{external-BiJTe5l7.js → external-CMiEiLpE.js} +29 -19
  62. package/dist/external-C_dsD7px.cjs +1 -0
  63. package/dist/external-CeNR2kU9.js +46 -0
  64. package/dist/{main-BINuQ9na.js → external-CraRr06G.js} +16962 -22990
  65. package/dist/external-D9LndfvY.js +29 -0
  66. package/dist/external-DEWhnbVF.cjs +1 -0
  67. package/dist/external-DUoHSX0Q.js +80 -0
  68. package/dist/external-DZSXelLG.js +130 -0
  69. package/dist/external-DrUtWpiV.js +388 -0
  70. package/dist/external-FIE7PzLB.cjs +1 -0
  71. package/dist/external-OLyg-4Ab.cjs +1 -0
  72. package/dist/external-_LWHQroW.cjs +1 -0
  73. package/dist/external-g62tixOz.cjs +85 -0
  74. package/dist/{external-CH77I63o.js → external-x9Ylk2op.js} +108 -97
  75. package/dist/flex.cjs +1 -1
  76. package/dist/flex.js +1 -1
  77. package/dist/{fontString-CVUEOEMw.js → fontString-CGd4NYXa.js} +11 -10
  78. package/dist/fontString-yPlq8smc.cjs +1 -0
  79. package/dist/header.cjs +1 -1
  80. package/dist/header.js +1 -1
  81. package/dist/hooks-15yB7IKE.js +74 -0
  82. package/dist/hooks-D_-XdOAe.cjs +1 -0
  83. package/dist/index.cjs +16 -16
  84. package/dist/index.js +10251 -9623
  85. package/dist/input.cjs +1 -1
  86. package/dist/input.js +1 -1
  87. package/dist/list.cjs +1 -1
  88. package/dist/list.js +1 -1
  89. package/dist/menu.cjs +1 -1
  90. package/dist/menu.js +1 -1
  91. package/dist/pluto.css +1 -1
  92. package/dist/{provider-CKYgKu3z.js → provider-C8In649C.js} +4955 -8152
  93. package/dist/provider-lNhTlIWj.cjs +72 -0
  94. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  95. package/dist/src/aether/main.d.ts.map +1 -1
  96. package/dist/src/arc/external.d.ts +1 -1
  97. package/dist/src/arc/external.d.ts.map +1 -1
  98. package/dist/src/arc/functions/Base.d.ts.map +1 -0
  99. package/dist/src/arc/functions/constant/Constant.d.ts.map +1 -0
  100. package/dist/src/arc/functions/constant/Form.d.ts.map +1 -0
  101. package/dist/src/arc/functions/constant/external.d.ts.map +1 -0
  102. package/dist/src/arc/functions/constant/index.d.ts.map +1 -0
  103. package/dist/src/arc/functions/external.d.ts.map +1 -0
  104. package/dist/src/arc/functions/index.d.ts.map +1 -0
  105. package/dist/src/arc/functions/operator/Operator.d.ts.map +1 -0
  106. package/dist/src/arc/functions/operator/external.d.ts.map +1 -0
  107. package/dist/src/arc/functions/operator/index.d.ts.map +1 -0
  108. package/dist/src/arc/functions/read/Form.d.ts.map +1 -0
  109. package/dist/src/arc/functions/read/Read.d.ts.map +1 -0
  110. package/dist/src/arc/functions/read/external.d.ts.map +1 -0
  111. package/dist/src/arc/functions/read/index.d.ts.map +1 -0
  112. package/dist/src/arc/functions/registry.d.ts.map +1 -0
  113. package/dist/src/arc/functions/select/Select.d.ts.map +1 -0
  114. package/dist/src/arc/functions/select/external.d.ts.map +1 -0
  115. package/dist/src/arc/functions/select/index.d.ts.map +1 -0
  116. package/dist/src/arc/functions/sink/Form.d.ts.map +1 -0
  117. package/dist/src/arc/functions/sink/Sink.d.ts.map +1 -0
  118. package/dist/src/arc/functions/sink/external.d.ts.map +1 -0
  119. package/dist/src/arc/functions/sink/index.d.ts.map +1 -0
  120. package/dist/src/arc/functions/source/Form.d.ts.map +1 -0
  121. package/dist/src/arc/functions/source/Source.d.ts.map +1 -0
  122. package/dist/src/arc/functions/source/external.d.ts.map +1 -0
  123. package/dist/src/arc/functions/source/index.d.ts.map +1 -0
  124. package/dist/src/arc/functions/stable/Form.d.ts.map +1 -0
  125. package/dist/src/arc/functions/stable/StableFor.d.ts.map +1 -0
  126. package/dist/src/arc/functions/stable/external.d.ts.map +1 -0
  127. package/dist/src/arc/functions/stable/index.d.ts.map +1 -0
  128. package/dist/src/arc/functions/status/Change.d.ts.map +1 -0
  129. package/dist/src/arc/functions/status/Form.d.ts.map +1 -0
  130. package/dist/src/arc/functions/status/external.d.ts.map +1 -0
  131. package/dist/src/arc/functions/status/index.d.ts.map +1 -0
  132. package/dist/src/arc/functions/types/index.d.ts.map +1 -0
  133. package/dist/src/arc/functions/types/spec.d.ts.map +1 -0
  134. package/dist/src/arc/handle/Core.d.ts.map +1 -1
  135. package/dist/src/arc/handle/Sink.d.ts.map +1 -1
  136. package/dist/src/arc/handle/Source.d.ts.map +1 -1
  137. package/dist/src/arc/handle/external.d.ts.map +1 -1
  138. package/dist/src/arc/handle/index.d.ts.map +1 -1
  139. package/dist/src/arc/queries.d.ts +6 -3
  140. package/dist/src/arc/queries.d.ts.map +1 -1
  141. package/dist/src/arc/queries.spec.d.ts +2 -0
  142. package/dist/src/arc/queries.spec.d.ts.map +1 -0
  143. package/dist/src/button/Button.d.ts +1 -1
  144. package/dist/src/button/Button.d.ts.map +1 -1
  145. package/dist/src/channel/AliasInput.d.ts +0 -1
  146. package/dist/src/channel/AliasInput.d.ts.map +1 -1
  147. package/dist/src/channel/CreateCalculatedIcon.d.ts +3 -0
  148. package/dist/src/channel/CreateCalculatedIcon.d.ts.map +1 -0
  149. package/dist/src/channel/LinePlot.d.ts +1 -3
  150. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  151. package/dist/src/channel/external.d.ts +1 -0
  152. package/dist/src/channel/external.d.ts.map +1 -1
  153. package/dist/src/channel/queries.d.ts +77 -5
  154. package/dist/src/channel/queries.d.ts.map +1 -1
  155. package/dist/src/component/SelectSize.d.ts.map +1 -1
  156. package/dist/src/css/css.d.ts +1 -2
  157. package/dist/src/css/css.d.ts.map +1 -1
  158. package/dist/src/flex/Box.d.ts +1 -2
  159. package/dist/src/flex/Box.d.ts.map +1 -1
  160. package/dist/src/flex/index.d.ts +1 -1
  161. package/dist/src/flex/index.d.ts.map +1 -1
  162. package/dist/src/flux/Provider.d.ts.map +1 -1
  163. package/dist/src/flux/aether/provider.d.ts +1 -1
  164. package/dist/src/flux/aether/provider.d.ts.map +1 -1
  165. package/dist/src/flux/core/client.d.ts.map +1 -1
  166. package/dist/src/flux/core/external.d.ts.map +1 -1
  167. package/dist/src/flux/core/index.d.ts.map +1 -1
  168. package/dist/src/flux/list.d.ts +5 -1
  169. package/dist/src/flux/list.d.ts.map +1 -1
  170. package/dist/src/group/index.d.ts.map +1 -1
  171. package/dist/src/hardware/device/Select.d.ts +0 -1
  172. package/dist/src/hardware/device/Select.d.ts.map +1 -1
  173. package/dist/src/hardware/device/queries.d.ts +6 -6
  174. package/dist/src/hardware/rack/Select.d.ts +0 -1
  175. package/dist/src/hardware/rack/Select.d.ts.map +1 -1
  176. package/dist/src/header/Header.d.ts.map +1 -1
  177. package/dist/src/icon/registry.d.ts.map +1 -1
  178. package/dist/src/index.d.ts +0 -1
  179. package/dist/src/index.d.ts.map +1 -1
  180. package/dist/src/input/Item.d.ts +2 -2
  181. package/dist/src/input/Item.d.ts.map +1 -1
  182. package/dist/src/log/aether/Log.d.ts.map +1 -1
  183. package/dist/src/menu/ContextMenu.d.ts +0 -3
  184. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  185. package/dist/src/menu/external.d.ts +1 -0
  186. package/dist/src/menu/external.d.ts.map +1 -1
  187. package/dist/src/menu/types.d.ts +4 -0
  188. package/dist/src/menu/types.d.ts.map +1 -0
  189. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  190. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  191. package/dist/src/schematic/symbol/Forms.d.ts +1 -0
  192. package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
  193. package/dist/src/schematic/symbol/Primitives.d.ts +11 -2
  194. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  195. package/dist/src/schematic/symbol/Symbols.d.ts +7 -0
  196. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  197. package/dist/src/schematic/symbol/registry.d.ts +2 -1
  198. package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
  199. package/dist/src/select/Button.d.ts +0 -1
  200. package/dist/src/select/Button.d.ts.map +1 -1
  201. package/dist/src/select/Multiple.d.ts +5 -6
  202. package/dist/src/select/Multiple.d.ts.map +1 -1
  203. package/dist/src/select/MultipleTrigger.d.ts +0 -1
  204. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  205. package/dist/src/select/SearchInput.d.ts.map +1 -1
  206. package/dist/src/select/Single.d.ts +1 -2
  207. package/dist/src/select/Single.d.ts.map +1 -1
  208. package/dist/src/select/Static.d.ts +0 -1
  209. package/dist/src/select/Static.d.ts.map +1 -1
  210. package/dist/src/select/external.d.ts +1 -0
  211. package/dist/src/select/external.d.ts.map +1 -1
  212. package/dist/src/select/flex/Alignment.d.ts +7 -0
  213. package/dist/src/select/flex/Alignment.d.ts.map +1 -0
  214. package/dist/src/select/flex/index.d.ts +2 -0
  215. package/dist/src/select/flex/index.d.ts.map +1 -0
  216. package/dist/src/select/text/Level.d.ts.map +1 -1
  217. package/dist/src/select/text/Weight.d.ts.map +1 -1
  218. package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
  219. package/dist/src/status/aether/external.d.ts.map +1 -1
  220. package/dist/src/status/core/external.d.ts +0 -1
  221. package/dist/src/status/core/external.d.ts.map +1 -1
  222. package/dist/src/status/core/index.d.ts.map +1 -1
  223. package/dist/src/status/external.d.ts +1 -0
  224. package/dist/src/status/external.d.ts.map +1 -1
  225. package/dist/src/status/index.d.ts.map +1 -1
  226. package/dist/src/status/queries.d.ts +5 -1
  227. package/dist/src/status/queries.d.ts.map +1 -1
  228. package/dist/src/synnax/Provider.d.ts.map +1 -1
  229. package/dist/src/tabs/Selector.d.ts.map +1 -1
  230. package/dist/src/telem/SelectDataType.d.ts.map +1 -1
  231. package/dist/src/telem/aether/context.d.ts +1 -2
  232. package/dist/src/telem/aether/context.d.ts.map +1 -1
  233. package/dist/src/telem/aether/noop.d.ts +2 -1
  234. package/dist/src/telem/aether/noop.d.ts.map +1 -1
  235. package/dist/src/telem/aether/remote.d.ts.map +1 -1
  236. package/dist/src/telem/aether/telem.d.ts +9 -0
  237. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  238. package/dist/src/telem/client/reader.d.ts +1 -1
  239. package/dist/src/telem/client/reader.d.ts.map +1 -1
  240. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  241. package/dist/src/telem/control/aether/controller.d.ts +0 -1
  242. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  243. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  244. package/dist/src/theming/Provider.d.ts +0 -2
  245. package/dist/src/theming/Provider.d.ts.map +1 -1
  246. package/dist/src/tooltip/Config.d.ts.map +1 -1
  247. package/dist/src/tree/Context.d.ts.map +1 -1
  248. package/dist/src/vis/input/aether/index.d.ts +2 -0
  249. package/dist/src/vis/input/aether/index.d.ts.map +1 -0
  250. package/dist/src/vis/input/aether/input.d.ts +40 -0
  251. package/dist/src/vis/input/aether/input.d.ts.map +1 -0
  252. package/dist/src/vis/input/index.d.ts +2 -0
  253. package/dist/src/vis/input/index.d.ts.map +1 -0
  254. package/dist/src/vis/input/use.d.ts +9 -0
  255. package/dist/src/vis/input/use.d.ts.map +1 -0
  256. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  257. package/dist/src/vis/value/aether/value.d.ts +1 -2
  258. package/dist/src/vis/value/aether/value.d.ts.map +1 -1
  259. package/dist/tabs.cjs +1 -1
  260. package/dist/tabs.js +1 -1
  261. package/dist/text.cjs +1 -1
  262. package/dist/text.js +2 -2
  263. package/dist/theme.css +11 -0
  264. package/dist/theming.cjs +1 -1
  265. package/dist/theming.js +2 -2
  266. package/dist/tree.cjs +1 -1
  267. package/dist/tree.js +1 -1
  268. package/dist/triggers.cjs +1 -1
  269. package/dist/triggers.js +1 -1
  270. package/dist/types-BNX_Jj6k.js +80 -0
  271. package/dist/types-D-yz1qsT.cjs +1 -0
  272. package/dist/{units-CeCcz4O4.js → units-BqIfn6VX.js} +1 -1
  273. package/dist/units-DCifOxd9.cjs +1 -0
  274. package/dist/useStaticData-BTwIe0Il.cjs +1 -0
  275. package/dist/useStaticData-p8sk2VCJ.js +1051 -0
  276. package/dist/value-B3LTg1lE.cjs +53 -0
  277. package/dist/value-ChGMEPP3.js +6508 -0
  278. package/dist/video.cjs +1 -1
  279. package/dist/video.js +1 -1
  280. package/package.json +8 -8
  281. package/dist/Toggle-DRTtCc6y.cjs +0 -1
  282. package/dist/Toggle-SqJF7wK1.js +0 -26
  283. package/dist/css-B0VZnJIa.cjs +0 -8
  284. package/dist/external-1IBrdKPg.cjs +0 -1
  285. package/dist/external-1mh1IYIp.cjs +0 -1
  286. package/dist/external-BbuMnccB.js +0 -23
  287. package/dist/external-BeFolwwf.js +0 -69
  288. package/dist/external-Bjog722s.cjs +0 -1
  289. package/dist/external-BvPQbXGU.js +0 -84
  290. package/dist/external-BvZvr2ca.cjs +0 -1
  291. package/dist/external-CUXPTsZd.cjs +0 -1
  292. package/dist/external-Ce0u9rc_.js +0 -14
  293. package/dist/external-CsEJE9T4.cjs +0 -1
  294. package/dist/external-CwPMtajL.cjs +0 -1
  295. package/dist/external-D824i9o6.cjs +0 -1
  296. package/dist/external-DRHDJFYP.js +0 -42
  297. package/dist/external-DSYv3Pz-.js +0 -10
  298. package/dist/external-DTobf-DQ.cjs +0 -1
  299. package/dist/external-DX0zVdQa.cjs +0 -1
  300. package/dist/external-DYHrJCQJ.js +0 -89
  301. package/dist/external-D_mw9H5h.cjs +0 -1
  302. package/dist/external-DgSrO_Q6.js +0 -78
  303. package/dist/external-Ds8xIImT.js +0 -30
  304. package/dist/external-SYYxDTqw.cjs +0 -1
  305. package/dist/external-hOOwYfqA.js +0 -87
  306. package/dist/external-i5v02pfP.cjs +0 -46
  307. package/dist/external-mvUR6Kge.js +0 -380
  308. package/dist/fontString-DBgTdlAe.cjs +0 -1
  309. package/dist/main-BnSpWlaf.cjs +0 -92
  310. package/dist/provider-CSa0L57i.js +0 -4673
  311. package/dist/provider-CWezGpoq.cjs +0 -52
  312. package/dist/provider-Fw6FIHoE.cjs +0 -83
  313. package/dist/src/arc/stage/Base.d.ts.map +0 -1
  314. package/dist/src/arc/stage/constant/Constant.d.ts.map +0 -1
  315. package/dist/src/arc/stage/constant/Form.d.ts.map +0 -1
  316. package/dist/src/arc/stage/constant/external.d.ts.map +0 -1
  317. package/dist/src/arc/stage/constant/index.d.ts.map +0 -1
  318. package/dist/src/arc/stage/external.d.ts.map +0 -1
  319. package/dist/src/arc/stage/index.d.ts.map +0 -1
  320. package/dist/src/arc/stage/operator/Operator.d.ts.map +0 -1
  321. package/dist/src/arc/stage/operator/external.d.ts.map +0 -1
  322. package/dist/src/arc/stage/operator/index.d.ts.map +0 -1
  323. package/dist/src/arc/stage/read/Form.d.ts.map +0 -1
  324. package/dist/src/arc/stage/read/Read.d.ts.map +0 -1
  325. package/dist/src/arc/stage/read/external.d.ts.map +0 -1
  326. package/dist/src/arc/stage/read/index.d.ts.map +0 -1
  327. package/dist/src/arc/stage/registry.d.ts.map +0 -1
  328. package/dist/src/arc/stage/select/Select.d.ts.map +0 -1
  329. package/dist/src/arc/stage/select/external.d.ts.map +0 -1
  330. package/dist/src/arc/stage/select/index.d.ts.map +0 -1
  331. package/dist/src/arc/stage/sink/Form.d.ts.map +0 -1
  332. package/dist/src/arc/stage/sink/Sink.d.ts.map +0 -1
  333. package/dist/src/arc/stage/sink/external.d.ts.map +0 -1
  334. package/dist/src/arc/stage/sink/index.d.ts.map +0 -1
  335. package/dist/src/arc/stage/source/Form.d.ts.map +0 -1
  336. package/dist/src/arc/stage/source/Source.d.ts.map +0 -1
  337. package/dist/src/arc/stage/source/external.d.ts.map +0 -1
  338. package/dist/src/arc/stage/source/index.d.ts.map +0 -1
  339. package/dist/src/arc/stage/stable/Form.d.ts.map +0 -1
  340. package/dist/src/arc/stage/stable/StableFor.d.ts.map +0 -1
  341. package/dist/src/arc/stage/stable/external.d.ts.map +0 -1
  342. package/dist/src/arc/stage/stable/index.d.ts.map +0 -1
  343. package/dist/src/arc/stage/status/Change.d.ts.map +0 -1
  344. package/dist/src/arc/stage/status/Form.d.ts.map +0 -1
  345. package/dist/src/arc/stage/status/external.d.ts.map +0 -1
  346. package/dist/src/arc/stage/status/index.d.ts.map +0 -1
  347. package/dist/src/arc/stage/types/index.d.ts.map +0 -1
  348. package/dist/src/arc/stage/types/spec.d.ts.map +0 -1
  349. package/dist/src/flex/Select.d.ts +0 -7
  350. package/dist/src/flex/Select.d.ts.map +0 -1
  351. package/dist/src/flex/external.d.ts +0 -3
  352. package/dist/src/flex/external.d.ts.map +0 -1
  353. package/dist/src/override/factory.d.ts +0 -3
  354. package/dist/src/override/factory.d.ts.map +0 -1
  355. package/dist/src/override/index.d.ts +0 -2
  356. package/dist/src/override/index.d.ts.map +0 -1
  357. package/dist/src/status/CreateIcon.d.ts +0 -1
  358. package/dist/src/status/CreateIcon.d.ts.map +0 -1
  359. package/dist/src/status/core/SelectVariant.d.ts +0 -7
  360. package/dist/src/status/core/SelectVariant.d.ts.map +0 -1
  361. package/dist/units-gFJ6UvpU.cjs +0 -1
  362. package/dist/useKeysData-DXXVQfXZ.js +0 -18
  363. package/dist/useKeysData-Do63LaI0.cjs +0 -1
  364. /package/dist/src/arc/{stage → functions}/Base.d.ts +0 -0
  365. /package/dist/src/arc/{stage → functions}/constant/Constant.d.ts +0 -0
  366. /package/dist/src/arc/{stage → functions}/constant/Form.d.ts +0 -0
  367. /package/dist/src/arc/{stage → functions}/constant/external.d.ts +0 -0
  368. /package/dist/src/arc/{stage → functions}/constant/index.d.ts +0 -0
  369. /package/dist/src/arc/{stage → functions}/external.d.ts +0 -0
  370. /package/dist/src/arc/{stage → functions}/index.d.ts +0 -0
  371. /package/dist/src/arc/{stage → functions}/operator/Operator.d.ts +0 -0
  372. /package/dist/src/arc/{stage → functions}/operator/external.d.ts +0 -0
  373. /package/dist/src/arc/{stage → functions}/operator/index.d.ts +0 -0
  374. /package/dist/src/arc/{stage → functions}/read/Form.d.ts +0 -0
  375. /package/dist/src/arc/{stage → functions}/read/Read.d.ts +0 -0
  376. /package/dist/src/arc/{stage → functions}/read/external.d.ts +0 -0
  377. /package/dist/src/arc/{stage → functions}/read/index.d.ts +0 -0
  378. /package/dist/src/arc/{stage → functions}/registry.d.ts +0 -0
  379. /package/dist/src/arc/{stage → functions}/select/Select.d.ts +0 -0
  380. /package/dist/src/arc/{stage → functions}/select/external.d.ts +0 -0
  381. /package/dist/src/arc/{stage → functions}/select/index.d.ts +0 -0
  382. /package/dist/src/arc/{stage → functions}/sink/Form.d.ts +0 -0
  383. /package/dist/src/arc/{stage → functions}/sink/Sink.d.ts +0 -0
  384. /package/dist/src/arc/{stage → functions}/sink/external.d.ts +0 -0
  385. /package/dist/src/arc/{stage → functions}/sink/index.d.ts +0 -0
  386. /package/dist/src/arc/{stage → functions}/source/Form.d.ts +0 -0
  387. /package/dist/src/arc/{stage → functions}/source/Source.d.ts +0 -0
  388. /package/dist/src/arc/{stage → functions}/source/external.d.ts +0 -0
  389. /package/dist/src/arc/{stage → functions}/source/index.d.ts +0 -0
  390. /package/dist/src/arc/{stage → functions}/stable/Form.d.ts +0 -0
  391. /package/dist/src/arc/{stage → functions}/stable/StableFor.d.ts +0 -0
  392. /package/dist/src/arc/{stage → functions}/stable/external.d.ts +0 -0
  393. /package/dist/src/arc/{stage → functions}/stable/index.d.ts +0 -0
  394. /package/dist/src/arc/{stage → functions}/status/Change.d.ts +0 -0
  395. /package/dist/src/arc/{stage → functions}/status/Form.d.ts +0 -0
  396. /package/dist/src/arc/{stage → functions}/status/external.d.ts +0 -0
  397. /package/dist/src/arc/{stage → functions}/status/index.d.ts +0 -0
  398. /package/dist/src/arc/{stage → functions}/types/index.d.ts +0 -0
  399. /package/dist/src/arc/{stage → functions}/types/spec.d.ts +0 -0
@@ -2,13 +2,13 @@ import O, { z as a } from "zod";
2
2
  const lr = (t) => O.union([
3
3
  O.union([O.null(), O.undefined()]).transform(() => []),
4
4
  t.array()
5
- ]), Mn = (t) => Array.isArray(t) ? t : t == null ? [] : [t], cr = (t, e) => {
5
+ ]), Tn = (t) => Array.isArray(t) ? t : t == null ? [] : [t], cr = (t, e) => {
6
6
  if (Array.isArray(e))
7
7
  return e.reduce((s, i) => cr(s, i), t ?? []);
8
8
  if (t == null) return [e];
9
9
  const r = t.findIndex((s) => s == e), n = [...t];
10
10
  return r === -1 ? n.push(e) : n[r] = e, n;
11
- }, An = ((t, e) => {
11
+ }, xn = ((t, e) => {
12
12
  if (t != null)
13
13
  return Array.isArray(e) ? t.filter((r) => !e.includes(r)) : t.filter((r) => r != e);
14
14
  }), hr = (t, e) => {
@@ -17,51 +17,51 @@ const lr = (t) => O.union([
17
17
  if (t == null) return [e];
18
18
  const r = t.findIndex((s) => s.key === e.key), n = [...t];
19
19
  return r === -1 ? n.push(e) : n[r] = e, n;
20
- }, En = ((t, e) => {
20
+ }, Sn = ((t, e) => {
21
21
  if (t != null)
22
22
  return Array.isArray(e) ? t.filter((r) => !e.includes(r.key)) : t.filter((r) => r.key !== e);
23
- }), bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
+ }), du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
24
  __proto__: null,
25
25
  nullableZ: lr,
26
- remove: An,
27
- removeKeyed: En,
28
- toArray: Mn,
26
+ remove: xn,
27
+ removeKeyed: Sn,
28
+ toArray: Tn,
29
29
  upsert: cr,
30
30
  upsertKeyed: hr
31
- }, Symbol.toStringTag, { value: "Module" })), Un = (t) => {
31
+ }, Symbol.toStringTag, { value: "Module" })), Nn = (t) => {
32
32
  const e = t.replace(/_[a-z]/g, (r) => r[1].toUpperCase());
33
33
  return e.length > 1 && e[0] === e[0].toUpperCase() && e[1] === e[1].toUpperCase() || e.length === 0 ? e : e[0].toLowerCase() + e.slice(1);
34
- }, Ye = (t) => {
35
- const e = (r, n = lt) => {
34
+ }, Ze = (t) => {
35
+ const e = (r, n = ut) => {
36
36
  if (typeof r == "string") return t(r);
37
37
  if (Array.isArray(r)) return r.map((o) => e(o, n));
38
- if (!rt(r)) return r;
39
- n = Cn(n);
38
+ if (!_e(r)) return r;
39
+ n = An(n);
40
40
  const s = {}, i = r;
41
41
  return "toJSON" in i && typeof i.toJSON == "function" ? e(i.toJSON(), n) : (Object.keys(i).forEach((o) => {
42
42
  let l = i[o];
43
43
  const f = t(o);
44
- n.recursive && (rt(l) ? er(l) || (l = e(l, n)) : n.recursiveInArray && _t(l) && (l = [...l].map((c) => {
44
+ n.recursive && (_e(l) ? er(l) || (l = e(l, n)) : n.recursiveInArray && _t(l) && (l = [...l].map((c) => {
45
45
  let d = c;
46
- return rt(c) ? er(d) || (d = e(c, n)) : _t(c) && (d = e({ key: c }, n).key), d;
46
+ return _e(c) ? er(d) || (d = e(c, n)) : _t(c) && (d = e({ key: c }, n).key), d;
47
47
  }))), s[f] = l;
48
48
  }), s);
49
49
  };
50
50
  return e;
51
- }, It = Ye(Un), Bn = (t) => (
51
+ }, Nt = Ze(Nn), In = (t) => (
52
52
  // Don't convert the first character and don't convert a character that is after a
53
53
  // non-alphanumeric character
54
54
  t.replace(
55
55
  /([a-z0-9])([A-Z])/g,
56
56
  (e, r, n) => `${r}_${n.toLowerCase()}`
57
57
  )
58
- ), fr = Ye(Bn), dr = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), jn = [Number, String, Uint8Array], lt = {
58
+ ), fr = Ze(In), dr = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), Mn = [Number, String, Uint8Array], ut = {
59
59
  recursive: !0,
60
60
  recursiveInArray: !0
61
- }, Cn = (t = lt) => (t.recursive == null ? t = lt : t.recursiveInArray ??= !1, t), _t = (t) => t != null && Array.isArray(t), rt = (t) => t != null && typeof t == "object" && !Array.isArray(t), er = (t) => jn.some((e) => t instanceof e), Rn = (t) => t.replace(/[\s_]+/g, "-").replace(
61
+ }, An = (t = ut) => (t.recursive == null ? t = ut : t.recursiveInArray ??= !1, t), _t = (t) => t != null && Array.isArray(t), _e = (t) => t != null && typeof t == "object" && !Array.isArray(t), er = (t) => Mn.some((e) => t instanceof e), En = (t) => t.replace(/[\s_]+/g, "-").replace(
62
62
  /([a-z0-9])([A-Z])/g,
63
63
  (e, r, n) => `${r}-${n.toLowerCase()}`
64
- ).toLowerCase(), Ln = Ye(Rn), Dn = (t) => {
64
+ ).toLowerCase(), Un = Ze(En), Bn = (t) => {
65
65
  if (t.length === 0) return t;
66
66
  let e = t.replace(/[_-]/g, " ");
67
67
  return e = e.replace(
@@ -71,15 +71,15 @@ const lr = (t) => O.union([
71
71
  /([A-Z]+)([A-Z][a-z])/g,
72
72
  (r, n, s) => `${n} ${s}`
73
73
  ), e = e.replace(/\s+/g, " ").trim(), e = e.replace(/\b\w/g, (r) => r.toUpperCase()), e;
74
- }, Pn = Ye(Dn), wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, Cn = Ze(Bn), gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
75
  __proto__: null,
76
76
  camelToSnake: fr,
77
77
  capitalize: dr,
78
- snakeToCamel: It,
79
- toKebab: Ln,
80
- toProperNoun: Pn
78
+ snakeToCamel: Nt,
79
+ toKebab: Un,
80
+ toProperNoun: Cn
81
81
  }, Symbol.toStringTag, { value: "Module" }));
82
- let kn = class {
82
+ let jn = class {
83
83
  contentType = "application/json";
84
84
  decoder;
85
85
  encoder;
@@ -93,7 +93,7 @@ let kn = class {
93
93
  return this.decodeString(this.decoder.decode(e), r);
94
94
  }
95
95
  decodeString(e, r) {
96
- const n = JSON.parse(e), s = It(n);
96
+ const n = JSON.parse(e), s = Nt(n);
97
97
  return r != null ? r.parse(s) : s;
98
98
  }
99
99
  encodeString(e) {
@@ -101,7 +101,7 @@ let kn = class {
101
101
  return JSON.stringify(r, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : typeof s == "bigint" ? s.toString() : s);
102
102
  }
103
103
  };
104
- const ct = new kn(), ht = (t) => [...new Set(t)], qn = (t, e, r = !0) => {
104
+ const lt = new jn(), ct = (t) => [...new Set(t)], Rn = (t, e, r = !0) => {
105
105
  const n = /* @__PURE__ */ new Map();
106
106
  return t.forEach((s) => {
107
107
  const i = e(s);
@@ -111,10 +111,10 @@ const ct = new kn(), ht = (t) => [...new Set(t)], qn = (t, e, r = !0) => {
111
111
  }
112
112
  n.set(i, s);
113
113
  }), Array.from(n.values());
114
- }, Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
114
+ }, mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
115
115
  __proto__: null,
116
- by: qn,
117
- unique: ht
116
+ by: Rn,
117
+ unique: ct
118
118
  }, Symbol.toStringTag, { value: "Module" })), B = (t) => t != null && typeof t == "object" && "value" in t;
119
119
  let re = class {
120
120
  /** The underlying primitive value */
@@ -136,8 +136,8 @@ let re = class {
136
136
  return this.value.toString();
137
137
  }
138
138
  };
139
- const Mt = (t) => t != null && typeof t == "object" && "toString" in t, gr = (t) => {
140
- if (Mt(t)) return t?.toString().length === 0;
139
+ const It = (t) => t != null && typeof t == "object" && "toString" in t, gr = (t) => {
140
+ if (It(t)) return t?.toString().length === 0;
141
141
  switch (typeof t) {
142
142
  case "string":
143
143
  return t.length === 0;
@@ -154,15 +154,15 @@ const Mt = (t) => t != null && typeof t == "object" && "toString" in t, gr = (t)
154
154
  default:
155
155
  return !1;
156
156
  }
157
- }, zn = (t) => !gr(t), Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
157
+ }, Ln = (t) => !gr(t), bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
158
158
  __proto__: null,
159
159
  ValueExtension: re,
160
160
  isCrudeValueExtension: B,
161
- isNonZero: zn,
162
- isStringer: Mt,
161
+ isNonZero: Ln,
162
+ isStringer: It,
163
163
  isZero: gr
164
- }, Symbol.toStringTag, { value: "Module" })), We = (t, e = !1) => {
165
- const r = Mt(t) ? "stringer" : typeof t;
164
+ }, Symbol.toStringTag, { value: "Module" })), Mt = (t, e = !1) => {
165
+ const r = It(t) ? "stringer" : typeof t;
166
166
  let n;
167
167
  switch (r) {
168
168
  case "string":
@@ -186,19 +186,19 @@ const Mt = (t) => t != null && typeof t == "object" && "toString" in t, gr = (t)
186
186
  default:
187
187
  return console.warn(`sortFunc: unknown type ${r}`), () => -1;
188
188
  }
189
- return e ? mr(n) : n;
190
- }, Zn = (t, e, r) => {
191
- const n = We(e[t], r);
189
+ return e ? Pn(n) : n;
190
+ }, wu = (t, e, r) => {
191
+ const n = Mt(e[t], r);
192
192
  return (s, i) => n(s[t], i[t]);
193
- }, Fn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, pr = (t, e) => {
193
+ }, $u = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, Dn = (t, e) => {
194
194
  if (t.length !== e.length) return t.length - e.length;
195
195
  if (t.length === 0) return 0;
196
- const r = We(t[0]), n = [...t].sort(r), s = [...e].sort(r);
196
+ const r = Mt(t[0]), n = [...t].sort(r), s = [...e].sort(r);
197
197
  return n.every((i, o) => i === s[o]) ? 0 : -1;
198
- }, Yn = (t, e) => {
199
- const r = ht(t), n = ht(e);
200
- return pr(r, n);
201
- }, Wn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, mr = (t) => (e, r) => t(r, e), ae = 0, Ue = -1, Be = 1, yr = (t) => t < ae, br = (t) => t > ae, Vn = (t) => t >= ae, wr = (t) => t === ae, Gn = (t, e) => {
198
+ }, Ou = (t, e) => {
199
+ const r = ct(t), n = ct(e);
200
+ return Dn(r, n);
201
+ }, vu = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, Pn = (t) => (e, r) => t(r, e), ve = 0, et = -1, tt = 1, kn = (t) => t < ve, qn = (t) => t > ve, Tu = (t) => t >= ve, zn = (t) => t === ve, xu = (t, e) => {
202
202
  const r = /([a-zA-Z]+)|(\d+)/g, n = t.replace(/[\s_.-]+/g, "").match(r), s = e.replace(/[\s_.-]+/g, "").match(r);
203
203
  if (!n || !s) return 0;
204
204
  for (let i = 0; i < Math.min(n.length, s.length); i++) {
@@ -212,57 +212,40 @@ const Mt = (t) => t != null && typeof t == "object" && "toString" in t, gr = (t)
212
212
  } else return isNaN(Number(o)) ? -1 : 1;
213
213
  }
214
214
  return n.length - s.length;
215
- }, xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
216
- __proto__: null,
217
- EQUAL: ae,
218
- GREATER_THAN: Be,
219
- LESS_THAN: Ue,
220
- isEqualTo: wr,
221
- isGreaterThan: br,
222
- isGreaterThanEqual: Vn,
223
- isLessThan: yr,
224
- newF: We,
225
- newFieldF: Zn,
226
- order: Wn,
227
- primitiveArrays: Fn,
228
- reverseF: mr,
229
- stringsWithNumbers: Gn,
230
- uniqueUnorderedPrimitiveArrays: Yn,
231
- unorderedPrimitiveArrays: pr
232
- }, Symbol.toStringTag, { value: "Module" })), Ve = a.tuple([a.number(), a.number()]);
215
+ }, Fe = a.tuple([a.number(), a.number()]);
233
216
  a.tuple([a.bigint(), a.bigint()]);
234
- const At = a.object({ width: a.number(), height: a.number() }), Hn = a.object({
217
+ const At = a.object({ width: a.number(), height: a.number() }), Zn = a.object({
235
218
  signedWidth: a.number(),
236
219
  signedHeight: a.number()
237
- }), Xn = ["width", "height"];
238
- a.enum(Xn);
239
- const Jn = ["start", "center", "end"], Kn = ["signedWidth", "signedHeight"];
240
- a.enum(Kn);
241
- const be = a.object({ x: a.number(), y: a.number() }), $r = a.object({ clientX: a.number(), clientY: a.number() }), Ge = ["x", "y"], Et = a.enum(Ge), Ut = ["top", "right", "bottom", "left"], Qn = a.enum(Ut), He = ["left", "right"], Bt = a.enum(He), Xe = ["top", "bottom"], jt = a.enum(Xe), Ct = ["center"], ft = a.enum(Ct), _n = [...Ut, ...Ct], Rt = a.enum(_n);
242
- a.enum(Jn);
243
- const es = ["first", "last"];
244
- a.enum(es);
245
- const Or = a.object({ lower: a.number(), upper: a.number() }), ts = a.object({ lower: a.bigint(), upper: a.bigint() });
246
- a.union([Or, Ve]);
247
- a.union([ts, Ve]);
248
- const rs = a.enum([...Et.options, ...Rt.options]);
220
+ }), Fn = ["width", "height"];
221
+ a.enum(Fn);
222
+ const Yn = ["start", "center", "end"], Vn = ["signedWidth", "signedHeight"];
223
+ a.enum(Vn);
224
+ const ye = a.object({ x: a.number(), y: a.number() }), pr = a.object({ clientX: a.number(), clientY: a.number() }), Ye = ["x", "y"], Et = a.enum(Ye), Ut = ["top", "right", "bottom", "left"], Wn = a.enum(Ut), Ve = ["left", "right"], Bt = a.enum(Ve), We = ["top", "bottom"], Ct = a.enum(We), jt = ["center"], ht = a.enum(jt), Gn = [...Ut, ...jt], Rt = a.enum(Gn);
225
+ a.enum(Yn);
226
+ const Hn = ["first", "last"];
227
+ a.enum(Hn);
228
+ const mr = a.object({ lower: a.number(), upper: a.number() }), Xn = a.object({ lower: a.bigint(), upper: a.bigint() });
229
+ a.union([mr, Fe]);
230
+ a.union([Xn, Fe]);
231
+ const Jn = a.enum([...Et.options, ...Rt.options]);
249
232
  a.enum(["x", "left", "right"]);
250
233
  a.enum(["y", "top", "bottom"]);
251
- const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
234
+ const Kn = a.union([Et, Rt, a.instanceof(String)]), ae = (t) => (e, r) => {
252
235
  if (typeof e == "bigint") {
253
- if (ke(r))
236
+ if (De(r))
254
237
  return t(e, BigInt(r));
255
238
  const n = t(Number(e), Number(r));
256
239
  return typeof n == "number" ? BigInt(Math.round(n)) : n;
257
240
  }
258
241
  return t(Number(e), Number(r));
259
- }, Z = oe((t, e) => t - e), ue = oe((t, e) => t + e), ss = (t, e, r = 1e-4) => Math.abs(t - e) < r, dt = (t, e) => {
242
+ }, Z = ae((t, e) => t - e), oe = ae((t, e) => t + e), Qn = (t, e, r = 1e-4) => Math.abs(t - e) < r, ft = (t, e) => {
260
243
  const r = typeof t == "bigint", n = typeof e == "bigint";
261
- return r && n ? t === e : r && ke(e) ? t === BigInt(e) : n && ke(t) ? e === BigInt(t) : t === e;
262
- }, is = (t) => {
244
+ return r && n ? t === e : r && De(e) ? t === BigInt(e) : n && De(t) ? e === BigInt(t) : t === e;
245
+ }, _n = (t) => {
263
246
  const e = 10 ** Math.floor(Math.log10(t));
264
247
  return Math.round(t / e) * e;
265
- }, vr = oe((t, e) => t <= e ? t : e), ke = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), as = oe((t, e) => t >= e ? t : e), Tr = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, R = oe((t, e) => t * e), Te = oe((t, e) => t / e), b = (t, e, r) => {
248
+ }, yr = ae((t, e) => t <= e ? t : e), De = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), es = ae((t, e) => t >= e ? t : e), br = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, R = ae((t, e) => t * e), Te = ae((t, e) => t / e), b = (t, e, r) => {
266
249
  const n = {};
267
250
  if (typeof e == "object" && (r = e, e = void 0), r = { makeValid: !0, ...r }, typeof t == "number" || typeof t == "bigint")
268
251
  e != null ? (n.lower = t, n.upper = e) : (n.lower = typeof t == "bigint" ? 0n : 0, n.upper = t);
@@ -271,13 +254,13 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
271
254
  [n.lower, n.upper] = t;
272
255
  } else
273
256
  n.lower = t.lower, n.upper = t.upper;
274
- return r?.makeValid ? xr(n) : n;
275
- }, os = Object.freeze({ lower: 0, upper: 0 }), us = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), ls = Object.freeze({ lower: 0, upper: 1 }), cs = Object.freeze({ lower: -1, upper: 1 }), hs = (t, e) => {
257
+ return r?.makeValid ? wr(n) : n;
258
+ }, ts = Object.freeze({ lower: 0, upper: 0 }), rs = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), ns = Object.freeze({ lower: 0, upper: 1 }), ss = Object.freeze({ lower: -1, upper: 1 }), is = (t, e) => {
276
259
  if (t == null && e == null) return !0;
277
260
  if (t == null || e == null) return !1;
278
261
  const r = b(t), n = b(e);
279
262
  return r?.lower === n?.lower && r?.upper === n?.upper;
280
- }, xr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, gt = (t, e) => {
263
+ }, wr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, dt = (t, e) => {
281
264
  const r = b(t);
282
265
  return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
283
266
  }, L = (t, e) => {
@@ -286,49 +269,49 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
286
269
  return e >= r.lower && e < r.upper;
287
270
  const n = b(e);
288
271
  return n.lower >= r.lower && n.upper <= r.upper;
289
- }, fs = (t, e) => {
272
+ }, as = (t, e) => {
290
273
  const r = b(t), n = b(e);
291
274
  return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : L(r, n.upper) || L(r, n.lower) || L(n, r.upper) || L(n, r.lower);
292
- }, le = (t) => {
275
+ }, ue = (t) => {
293
276
  const e = b(t);
294
277
  return e.upper - e.lower;
295
- }, ds = (t) => {
278
+ }, os = (t) => {
296
279
  const e = b(t);
297
280
  return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
298
- }, gs = (t) => {
299
- const e = le(t);
281
+ }, us = (t) => {
282
+ const e = ue(t);
300
283
  return typeof e == "number" ? e === 0 : e === 0n;
301
- }, ps = (t) => {
284
+ }, ls = (t) => {
302
285
  const e = b(t);
303
286
  return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
304
- }, ms = (t) => {
287
+ }, cs = (t) => {
305
288
  const e = b(t);
306
289
  return (e.upper + e.lower) / 2;
307
- }, Sr = (t) => ({
290
+ }, $r = (t) => ({
308
291
  lower: Math.min(...t.map((e) => b(e).lower)),
309
292
  upper: Math.max(...t.map((e) => b(e).upper))
310
- }), ys = (t) => ({
293
+ }), hs = (t) => ({
311
294
  lower: Math.max(...t.map((e) => b(e).lower)),
312
295
  upper: Math.min(...t.map((e) => b(e).upper))
313
- }), bs = (t) => {
296
+ }), fs = (t) => {
314
297
  const e = b(t), r = typeof e.lower == "bigint";
315
- return Array.from({ length: Number(le(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
316
- }, pt = (t, e) => {
298
+ return Array.from({ length: Number(ue(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
299
+ }, gt = (t, e) => {
317
300
  const r = t.map((i) => b(i)), n = r.findIndex((i) => L(i, e) || e < i.lower);
318
301
  if (n === -1) return { index: t.length, position: 0 };
319
302
  const s = r[n];
320
303
  return L(s, e) ? { index: n, position: Number(e - s.lower) } : { index: n, position: 0 };
321
- }, nt = {
304
+ }, rt = {
322
305
  removeBefore: 0,
323
306
  removeAfter: 0,
324
307
  insertInto: 0,
325
308
  deleteInBetween: 0
326
- }, ws = (t, e) => {
309
+ }, ds = (t, e) => {
327
310
  const r = t.map((c) => b(c)), n = b(e);
328
- if (r.length === 0) return nt;
329
- const s = pt(r, n.lower), i = pt(r, n.upper);
330
- if (s.index === t.length) return { ...nt, insertInto: t.length };
331
- if (i.index === 0) return { ...nt, removeAfter: i.position };
311
+ if (r.length === 0) return rt;
312
+ const s = gt(r, n.lower), i = gt(r, n.upper);
313
+ if (s.index === t.length) return { ...rt, insertInto: t.length };
314
+ if (i.index === 0) return { ...rt, removeAfter: i.position };
332
315
  if (s.index === i.index)
333
316
  return s.position !== 0 && i.position !== 0 ? null : {
334
317
  removeAfter: i.position,
@@ -336,28 +319,25 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
336
319
  insertInto: s.index,
337
320
  deleteInBetween: 0
338
321
  };
339
- let o = i.index - s.index, l = s.index, f = Z(Number(le(r[s.index])), s.position);
322
+ let o = i.index - s.index, l = s.index, f = Z(Number(ue(r[s.index])), s.position);
340
323
  return s.position !== 0 ? (o -= 1, l += 1) : f = 0, {
341
324
  removeBefore: f,
342
325
  removeAfter: i.position,
343
326
  insertInto: l,
344
327
  deleteInBetween: o
345
328
  };
346
- }, Nr = (t, e, r) => {
329
+ }, Or = (t, e, r) => {
347
330
  const n = t.map((l) => b(l)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
348
331
  if (s === 0) return e;
349
332
  let i = r, o = e;
350
- for (; dt(i, 0) === !1; ) {
333
+ for (; ft(i, 0) === !1; ) {
351
334
  const l = n.findIndex((f) => s > 0 ? o >= f.lower && o < f.upper : o > f.lower && o <= f.upper);
352
335
  if (l !== -1) {
353
336
  const f = n[l];
354
337
  let c;
355
338
  if (s > 0 ? c = Z(f.upper, o) : c = Z(o, f.lower), c > 0) {
356
- const d = vr(Tr(i), c);
357
- if (o = ue(
358
- o,
359
- s > 0 ? d : -d
360
- ), i = Z(i, s > 0 ? d : -d), dt(i, 0)) return o;
339
+ const d = yr(br(i), c);
340
+ if (o = oe(o, s > 0 ? d : -d), i = Z(i, s > 0 ? d : -d), ft(i, 0)) return o;
361
341
  continue;
362
342
  }
363
343
  }
@@ -373,7 +353,7 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
373
353
  }
374
354
  }
375
355
  return o;
376
- }, Ir = (t, e, r) => {
356
+ }, vr = (t, e, r) => {
377
357
  const n = t.map((o) => b(o));
378
358
  if (e === r) return typeof e == "bigint" ? 0n : 0;
379
359
  const s = e < r ? b([e, r]) : b([r, e]);
@@ -388,148 +368,148 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
388
368
  return i;
389
369
  }, Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
390
370
  __proto__: null,
391
- CLIP: cs,
392
- DECIMAL: ls,
393
- INFINITE: us,
394
- ZERO: os,
395
- bounds: Or,
396
- buildInsertionPlan: ws,
397
- clamp: gt,
371
+ CLIP: ss,
372
+ DECIMAL: ns,
373
+ INFINITE: rs,
374
+ ZERO: ts,
375
+ bounds: mr,
376
+ buildInsertionPlan: ds,
377
+ clamp: dt,
398
378
  construct: b,
399
379
  contains: L,
400
- distance: Ir,
401
- equals: hs,
402
- findInsertPosition: pt,
403
- isFinite: ps,
404
- isZero: ds,
405
- linspace: bs,
406
- makeValid: xr,
407
- max: Sr,
408
- mean: ms,
409
- min: ys,
410
- overlapsWith: fs,
411
- span: le,
412
- spanIsZero: gs,
413
- traverse: Nr
414
- }, Symbol.toStringTag, { value: "Module" })), Mr = rs, z = (t) => Ge.includes(t) ? t : Xe.includes(t) ? "y" : "x", $s = (t) => z(t) === "x" ? "y" : "x", Os = (t) => z(t) === "x" ? "width" : "height", vs = (t) => z(t) === "x" ? "left" : "top", Ts = (t) => Mr.safeParse(t).success, xs = (t) => z(t) === "x" ? "signedWidth" : "signedHeight", Ss = (t) => t === "center" ? !1 : z(t) === "x", Ns = (t) => z(t) === "y", Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
380
+ distance: vr,
381
+ equals: is,
382
+ findInsertPosition: gt,
383
+ isFinite: ls,
384
+ isZero: os,
385
+ linspace: fs,
386
+ makeValid: wr,
387
+ max: $r,
388
+ mean: cs,
389
+ min: hs,
390
+ overlapsWith: as,
391
+ span: ue,
392
+ spanIsZero: us,
393
+ traverse: Or
394
+ }, Symbol.toStringTag, { value: "Module" })), Tr = Jn, z = (t) => Ye.includes(t) ? t : We.includes(t) ? "y" : "x", gs = (t) => z(t) === "x" ? "y" : "x", ps = (t) => z(t) === "x" ? "width" : "height", ms = (t) => z(t) === "x" ? "left" : "top", ys = (t) => Tr.safeParse(t).success, bs = (t) => z(t) === "x" ? "signedWidth" : "signedHeight", ws = (t) => t === "center" ? !1 : z(t) === "x", $s = (t) => z(t) === "y", Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
415
395
  __proto__: null,
416
- DIRECTIONS: Ge,
396
+ DIRECTIONS: Ye,
417
397
  construct: z,
418
- crude: Mr,
419
- dimension: Os,
398
+ crude: Tr,
399
+ dimension: ps,
420
400
  direction: Et,
421
- isDirection: Ts,
422
- isX: Ss,
423
- isY: Ns,
424
- location: vs,
425
- signedDimension: xs,
426
- swap: $s
427
- }, Symbol.toStringTag, { value: "Module" })), Ms = Bt, As = jt, Es = ft, Us = {
401
+ isDirection: ys,
402
+ isX: ws,
403
+ isY: $s,
404
+ location: ms,
405
+ signedDimension: bs,
406
+ swap: gs
407
+ }, Symbol.toStringTag, { value: "Module" })), vs = Bt, Ts = Ct, xs = ht, Ss = {
428
408
  top: "bottom",
429
409
  right: "left",
430
410
  bottom: "top",
431
411
  left: "right",
432
412
  center: "center"
433
- }, Bs = {
413
+ }, Ns = {
434
414
  top: "left",
435
415
  right: "top",
436
416
  bottom: "right",
437
417
  left: "bottom",
438
418
  center: "center"
439
- }, js = ns, H = (t) => t instanceof String || !Ge.includes(t) ? t : t === "x" ? "left" : "top", Cs = (t) => Us[H(t)], Rs = (t) => Bs[H(t)], we = (t) => {
419
+ }, Is = Kn, H = (t) => t instanceof String || !Ye.includes(t) ? t : t === "x" ? "left" : "top", Ms = (t) => Ss[H(t)], As = (t) => Ns[H(t)], be = (t) => {
440
420
  const e = H(t);
441
421
  return e === "top" || e === "bottom" ? "y" : "x";
442
- }, Ls = a.object({
443
- x: Bt.or(ft),
444
- y: jt.or(ft)
445
- }), Ar = a.object({ x: Bt, y: jt }), xe = Object.freeze({ x: "left", y: "top" }), Lt = Object.freeze({ x: "right", y: "top" }), Je = Object.freeze({ x: "left", y: "bottom" }), Dt = Object.freeze({ x: "right", y: "bottom" }), Pt = Object.freeze({ x: "center", y: "center" }), kt = Object.freeze({ x: "center", y: "top" }), qt = Object.freeze({ x: "center", y: "bottom" }), zt = Object.freeze({ x: "right", y: "center" }), Zt = Object.freeze({ x: "left", y: "center" }), Ds = Object.freeze([
422
+ }, Es = a.object({
423
+ x: Bt.or(ht),
424
+ y: Ct.or(ht)
425
+ }), xr = a.object({ x: Bt, y: Ct }), xe = Object.freeze({ x: "left", y: "top" }), Lt = Object.freeze({ x: "right", y: "top" }), Ge = Object.freeze({ x: "left", y: "bottom" }), Dt = Object.freeze({ x: "right", y: "bottom" }), Pt = Object.freeze({ x: "center", y: "center" }), kt = Object.freeze({ x: "center", y: "top" }), qt = Object.freeze({ x: "center", y: "bottom" }), zt = Object.freeze({ x: "right", y: "center" }), Zt = Object.freeze({ x: "left", y: "center" }), Us = Object.freeze([
446
426
  Zt,
447
427
  zt,
448
428
  kt,
449
429
  qt,
450
430
  xe,
451
431
  Lt,
452
- Je,
432
+ Ge,
453
433
  Dt,
454
434
  Pt
455
- ]), Ft = (t, e) => t.x === e.x && t.y === e.y, Ps = (t, e) => {
435
+ ]), Ft = (t, e) => t.x === e.x && t.y === e.y, Bs = (t, e) => {
456
436
  if (typeof e == "object") {
457
437
  let r = !0;
458
438
  return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
459
439
  }
460
440
  return t.x === e || t.y === e;
461
- }, Er = (t) => [t.x, t.y], je = (t) => we(H(t)) === "x", ks = (t) => we(H(t)) === "y", qs = (t) => `${t.x}${dr(t.y)}`, zs = (t, e) => {
441
+ }, Sr = (t) => [t.x, t.y], Ue = (t) => be(H(t)) === "x", Cs = (t) => be(H(t)) === "y", js = (t) => `${t.x}${dr(t.y)}`, Rs = (t, e) => {
462
442
  let r, n;
463
- if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = H(t), n = H(e ?? t)), we(r) === we(n) && r !== "center" && n !== "center")
443
+ if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = H(t), n = H(e ?? t)), be(r) === be(n) && r !== "center" && n !== "center")
464
444
  throw new Error(
465
445
  `[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
466
446
  );
467
447
  const s = { ...Pt };
468
- return r === "center" ? je(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? je(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : je(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
469
- }, Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
448
+ return r === "center" ? Ue(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? Ue(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : Ue(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
449
+ }, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
470
450
  __proto__: null,
471
451
  BOTTOM_CENTER: qt,
472
- BOTTOM_LEFT: Je,
452
+ BOTTOM_LEFT: Ge,
473
453
  BOTTOM_RIGHT: Dt,
474
454
  CENTER: Pt,
475
455
  CENTER_LEFT: Zt,
476
- CENTER_LOCATIONS: Ct,
456
+ CENTER_LOCATIONS: jt,
477
457
  CENTER_RIGHT: zt,
478
458
  OUTER_LOCATIONS: Ut,
479
459
  TOP_CENTER: kt,
480
460
  TOP_LEFT: xe,
481
461
  TOP_RIGHT: Lt,
482
- XY_LOCATIONS: Ds,
483
- X_LOCATIONS: He,
484
- Y_LOCATIONS: Xe,
485
- center: Es,
462
+ XY_LOCATIONS: Us,
463
+ X_LOCATIONS: Ve,
464
+ Y_LOCATIONS: We,
465
+ center: xs,
486
466
  construct: H,
487
- constructXY: zs,
488
- corner: Ar,
489
- crude: js,
490
- direction: we,
491
- isX: je,
492
- isY: ks,
467
+ constructXY: Rs,
468
+ corner: xr,
469
+ crude: Is,
470
+ direction: be,
471
+ isX: Ue,
472
+ isY: Cs,
493
473
  location: Rt,
494
- outer: Qn,
495
- rotate90: Rs,
496
- swap: Cs,
497
- x: Ms,
498
- xy: Ls,
499
- xyCouple: Er,
474
+ outer: Wn,
475
+ rotate90: As,
476
+ swap: Ms,
477
+ x: vs,
478
+ xy: Es,
479
+ xyCouple: Sr,
500
480
  xyEquals: Ft,
501
- xyMatches: Ps,
502
- xyToString: qs,
503
- y: As
504
- }, Symbol.toStringTag, { value: "Module" })), mt = a.union([
481
+ xyMatches: Bs,
482
+ xyToString: js,
483
+ y: Ts
484
+ }, Symbol.toStringTag, { value: "Module" })), pt = a.union([
505
485
  a.number(),
506
- be,
507
- Ve,
486
+ ye,
487
+ Fe,
508
488
  At,
509
- Hn,
510
- $r
489
+ Zn,
490
+ pr
511
491
  ]), v = (t, e) => {
512
492
  if (typeof t == "string") {
513
493
  if (e === void 0) throw new Error("The y coordinate must be given.");
514
494
  return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
515
495
  }
516
496
  return typeof t == "number" ? { x: t, y: e ?? t } : Array.isArray(t) ? { x: t[0], y: t[1] } : "signedWidth" in t ? { x: t.signedWidth, y: t.signedHeight } : "clientX" in t ? { x: t.clientX, y: t.clientY } : "width" in t ? { x: t.width, y: t.height } : { x: t.x, y: t.y };
517
- }, q = Object.freeze({ x: 0, y: 0 }), Ur = Object.freeze({ x: 1, y: 1 }), Fs = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ys = Object.freeze({ x: NaN, y: NaN }), qe = (t, e, r = 0) => {
497
+ }, q = Object.freeze({ x: 0, y: 0 }), Nr = Object.freeze({ x: 1, y: 1 }), Ds = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ps = Object.freeze({ x: NaN, y: NaN }), Pe = (t, e, r = 0) => {
518
498
  const n = v(t), s = v(e);
519
499
  return r === 0 ? n.x === s.x && n.y === s.y : Math.abs(n.x - s.x) <= r && Math.abs(n.y - s.y) <= r;
520
- }, Ws = (t) => qe(t, q), Yt = (t, e, r) => {
500
+ }, ks = (t) => Pe(t, q), Yt = (t, e, r) => {
521
501
  const n = v(t), s = v(e, r);
522
502
  return { x: n.x * s.x, y: n.y * s.y };
523
- }, Br = (t, e) => {
503
+ }, Ir = (t, e) => {
524
504
  const r = v(t);
525
505
  return { x: r.x + e, y: r.y };
526
- }, jr = (t, e) => {
506
+ }, Mr = (t, e) => {
527
507
  const r = v(t);
528
508
  return { x: r.x, y: r.y + e };
529
- }, $e = (t, e, r, ...n) => {
509
+ }, we = (t, e, r, ...n) => {
530
510
  if (typeof e == "string") {
531
511
  if (typeof r != "number") throw new Error("The value must be a number.");
532
- return e === "x" ? Br(t, r) : jr(t, r);
512
+ return e === "x" ? Ir(t, r) : Mr(t, r);
533
513
  }
534
514
  if (typeof e == "object" && "x" in e && typeof e.x == "string") {
535
515
  const s = v(r), i = v(t);
@@ -539,123 +519,123 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
539
519
  const o = v(i);
540
520
  return { x: s.x + o.x, y: s.y + o.y };
541
521
  }, q);
542
- }, Vs = (t, e, r) => {
522
+ }, qs = (t, e, r) => {
543
523
  const n = v(t);
544
524
  return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
545
- }, Gs = (t, e) => {
525
+ }, zs = (t, e) => {
546
526
  const r = v(t), n = v(e);
547
527
  return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
548
- }, Hs = (t, e) => {
528
+ }, Zs = (t, e) => {
549
529
  const r = v(t), n = v(e);
550
530
  return { x: n.x - r.x, y: n.y - r.y };
551
- }, Xs = (t) => {
531
+ }, Fs = (t) => {
552
532
  const e = v(t);
553
533
  return Number.isNaN(e.x) || Number.isNaN(e.y);
554
- }, Js = (t) => {
534
+ }, Ys = (t) => {
555
535
  const e = v(t);
556
536
  return Number.isFinite(e.x) && Number.isFinite(e.y);
557
- }, Ks = (t) => {
537
+ }, Vs = (t) => {
558
538
  const e = v(t);
559
539
  return [e.x, e.y];
560
- }, Qs = (t) => {
540
+ }, Ws = (t) => {
561
541
  const e = v(t);
562
542
  return { left: e.x, top: e.y };
563
- }, yt = (t, e = 0) => {
543
+ }, mt = (t, e = 0) => {
564
544
  const r = v(t);
565
545
  return {
566
546
  x: Number(r.x.toFixed(e)),
567
547
  y: Number(r.y.toFixed(e))
568
548
  };
569
- }, he = (t, e) => {
549
+ }, ce = (t, e) => {
570
550
  const r = v(t), n = v(e);
571
551
  return { x: r.x - n.x, y: r.y - n.y };
572
- }, fe = (t) => {
552
+ }, he = (t) => {
573
553
  const e = v(t), r = Math.hypot(e.x, e.y);
574
554
  return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
575
- }, Cr = (t) => {
555
+ }, Ar = (t) => {
576
556
  const e = v(t), r = Math.hypot(e.x, e.y);
577
557
  return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
578
- }, Rr = (...t) => {
579
- const e = t.reduce((r, n) => $e(r, n), q);
558
+ }, Er = (...t) => {
559
+ const e = t.reduce((r, n) => we(r, n), q);
580
560
  return Yt(e, 1 / t.length);
581
- }, _s = (t, e) => {
561
+ }, Gs = (t, e) => {
582
562
  const r = [];
583
563
  for (let n = 0; n < t.length; n++) {
584
564
  const s = t[n];
585
565
  let i, o, l, f;
586
566
  if (n === 0) {
587
- const c = t[n + 1], d = he(c, s);
588
- o = fe(d), l = o, f = e;
567
+ const c = t[n + 1], d = ce(c, s);
568
+ o = he(d), l = o, f = e;
589
569
  } else if (n === t.length - 1) {
590
- const c = t[n - 1], d = he(s, c);
591
- i = fe(d), l = i, f = e;
570
+ const c = t[n - 1], d = ce(s, c);
571
+ i = he(d), l = i, f = e;
592
572
  } else {
593
- const c = t[n - 1], d = t[n + 1], m = he(s, c), p = he(d, s);
594
- i = fe(m), o = fe(p);
573
+ const c = t[n - 1], d = t[n + 1], m = ce(s, c), p = ce(d, s);
574
+ i = he(m), o = he(p);
595
575
  const A = Math.acos(
596
576
  (m.x * p.x + m.y * p.y) / (Math.hypot(m.x, m.y) * Math.hypot(p.x, p.y))
597
577
  ), U = Math.sin(A / 2);
598
- U === 0 ? f = e : f = e / U, l = Cr(Rr(i, o));
578
+ U === 0 ? f = e : f = e / U, l = Ar(Er(i, o));
599
579
  }
600
580
  r.push(Yt(l, f));
601
581
  }
602
582
  return r;
603
- }, ei = (t) => {
583
+ }, Hs = (t) => {
604
584
  const e = v(t);
605
585
  return { x: e.y, y: e.x };
606
- }, bt = (t) => {
586
+ }, yt = (t) => {
607
587
  const e = v(t);
608
588
  return { x: Math.round(e.x), y: Math.round(e.y) };
609
- }, ti = (t) => {
589
+ }, Xs = (t) => {
610
590
  const e = v(t);
611
591
  return { x: 1 / e.x, y: 1 / e.y };
612
592
  }, Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
613
593
  __proto__: null,
614
- INFINITY: Fs,
615
- NAN: Ys,
616
- ONE: Ur,
594
+ INFINITY: Ds,
595
+ NAN: Ps,
596
+ ONE: Nr,
617
597
  ZERO: q,
618
- average: Rr,
619
- calculateMiters: _s,
620
- clientXY: $r,
598
+ average: Er,
599
+ calculateMiters: Gs,
600
+ clientXY: pr,
621
601
  construct: v,
622
- couple: Ks,
623
- crudeZ: mt,
624
- css: Qs,
625
- distance: Gs,
626
- equals: qe,
627
- isFinite: Js,
628
- isNan: Xs,
629
- isZero: Ws,
630
- normal: fe,
631
- normalize: Cr,
632
- reciprocal: ti,
633
- round: bt,
602
+ couple: Vs,
603
+ crudeZ: pt,
604
+ css: Ws,
605
+ distance: zs,
606
+ equals: Pe,
607
+ isFinite: Ys,
608
+ isNan: Fs,
609
+ isZero: ks,
610
+ normal: he,
611
+ normalize: Ar,
612
+ reciprocal: Xs,
613
+ round: yt,
634
614
  scale: Yt,
635
- set: Vs,
636
- sub: he,
637
- swap: ei,
638
- translate: $e,
639
- translateX: Br,
640
- translateY: jr,
641
- translation: Hs,
642
- truncate: yt,
643
- xy: be
644
- }, Symbol.toStringTag, { value: "Module" })), Ne = a.union([a.number(), a.string()]), ri = a.object({
615
+ set: qs,
616
+ sub: ce,
617
+ swap: Hs,
618
+ translate: we,
619
+ translateX: Ir,
620
+ translateY: Mr,
621
+ translation: Zs,
622
+ truncate: mt,
623
+ xy: ye
624
+ }, Symbol.toStringTag, { value: "Module" })), Ne = a.union([a.number(), a.string()]), Js = a.object({
645
625
  top: Ne,
646
626
  left: Ne,
647
627
  width: Ne,
648
628
  height: Ne
649
- }), ni = a.object({
629
+ }), Ks = a.object({
650
630
  left: a.number(),
651
631
  top: a.number(),
652
632
  right: a.number(),
653
633
  bottom: a.number()
654
- }), si = a.object({
655
- one: be,
656
- two: be,
657
- root: Ar
658
- }), Lr = { one: q, two: q, root: xe }, ii = { one: q, two: Ur, root: Je }, Dr = (t, e) => ({
634
+ }), Qs = a.object({
635
+ one: ye,
636
+ two: ye,
637
+ root: xr
638
+ }), Ur = { one: q, two: q, root: xe }, _s = { one: q, two: Nr, root: Ge }, Br = (t, e) => ({
659
639
  one: t.one,
660
640
  two: t.two,
661
641
  root: e ?? t.root
@@ -677,7 +657,7 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
677
657
  x: i.one.x + e.signedWidth,
678
658
  y: i.one.y + e.signedHeight
679
659
  } : i.two = e, i));
680
- }, ai = (t, e, r) => {
660
+ }, ei = (t, e, r) => {
681
661
  const n = x(t);
682
662
  if (typeof e == "string") {
683
663
  if (r == null) throw new Error("Invalid arguments for resize");
@@ -691,63 +671,63 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
691
671
  );
692
672
  }
693
673
  return x(n.one, e, void 0, void 0, n.root);
694
- }, oi = (t, e, r = !0) => {
674
+ }, ti = (t, e, r = !0) => {
695
675
  const n = x(t);
696
676
  let s = (i, o) => i < o;
697
- return r && (s = (i, o) => i <= o), "one" in e ? s(V(n), V(e)) && s(_(e), _(n)) && s(G(n), G(e)) && s(ee(e), ee(n)) : s(V(n), e.x) && s(e.x, _(n)) && s(G(n), e.y) && s(e.y, ee(n));
698
- }, ui = (t, e) => qe(t.one, e.one) && qe(t.two, e.two) && Ft(t.root, e.root), Pr = (t) => ({
677
+ return r && (s = (i, o) => i <= o), "one" in e ? s(W(n), W(e)) && s(_(e), _(n)) && s(G(n), G(e)) && s(ee(e), ee(n)) : s(W(n), e.x) && s(e.x, _(n)) && s(G(n), e.y) && s(e.y, ee(n));
678
+ }, ri = (t, e) => Pe(t.one, e.one) && Pe(t.two, e.two) && Ft(t.root, e.root), Cr = (t) => ({
699
679
  width: X(t),
700
680
  height: J(t)
701
- }), li = (t) => ({
702
- signedWidth: Ke(t),
703
- signedHeight: Qe(t)
704
- }), ci = (t) => ({
681
+ }), ni = (t) => ({
682
+ signedWidth: He(t),
683
+ signedHeight: Xe(t)
684
+ }), si = (t) => ({
705
685
  top: G(t),
706
- left: V(t),
686
+ left: W(t),
707
687
  width: X(t),
708
688
  height: J(t)
709
- }), Wt = (t, e, r = !1) => {
710
- const n = z(e) === "y" ? Qe(t) : Ke(t);
689
+ }), Vt = (t, e, r = !1) => {
690
+ const n = z(e) === "y" ? Xe(t) : He(t);
711
691
  return r ? n : Math.abs(n);
712
692
  }, F = (t, e) => {
713
693
  const r = x(t);
714
694
  return {
715
- x: e.x === "center" ? wt(r).x : te(r, e.x),
716
- y: e.y === "center" ? wt(r).y : te(r, e.y)
695
+ x: e.x === "center" ? bt(r).x : te(r, e.x),
696
+ y: e.y === "center" ? bt(r).y : te(r, e.y)
717
697
  };
718
698
  }, te = (t, e) => {
719
- const r = x(t), n = Er(r.root).includes(e) ? Math.min : Math.max;
720
- return He.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
721
- }, hi = (t) => zr(t) === 0, X = (t) => Wt(t, "x"), J = (t) => Wt(t, "y"), Ke = (t) => {
699
+ const r = x(t), n = Sr(r.root).includes(e) ? Math.min : Math.max;
700
+ return Ve.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
701
+ }, ii = (t) => Lr(t) === 0, X = (t) => Vt(t, "x"), J = (t) => Vt(t, "y"), He = (t) => {
722
702
  const e = x(t);
723
703
  return e.two.x - e.one.x;
724
- }, Qe = (t) => {
704
+ }, Xe = (t) => {
725
705
  const e = x(t);
726
706
  return e.two.y - e.one.y;
727
- }, kr = (t) => F(t, xe), fi = (t) => F(t, kt), di = (t) => F(t, Lt), gi = (t) => F(t, Je), pi = (t) => F(t, qt), mi = (t) => F(t, Dt), yi = (t) => F(t, Zt), bi = (t) => F(t, zt), _ = (t) => te(t, "right"), ee = (t) => te(t, "bottom"), V = (t) => te(t, "left"), G = (t) => te(t, "top"), wt = (t) => $e(kr(t), {
728
- x: Ke(t) / 2,
729
- y: Qe(t) / 2
730
- }), Vt = (t) => {
707
+ }, jr = (t) => F(t, xe), ai = (t) => F(t, kt), oi = (t) => F(t, Lt), ui = (t) => F(t, Ge), li = (t) => F(t, qt), ci = (t) => F(t, Dt), hi = (t) => F(t, Zt), fi = (t) => F(t, zt), _ = (t) => te(t, "right"), ee = (t) => te(t, "bottom"), W = (t) => te(t, "left"), G = (t) => te(t, "top"), bt = (t) => we(jr(t), {
708
+ x: He(t) / 2,
709
+ y: Xe(t) / 2
710
+ }), Wt = (t) => {
731
711
  const e = x(t);
732
- return e.root.x === "left" ? V(e) : _(e);
712
+ return e.root.x === "left" ? W(e) : _(e);
733
713
  }, Gt = (t) => {
734
714
  const e = x(t);
735
715
  return e.root.y === "top" ? G(e) : ee(e);
736
- }, wi = (t) => ({ x: Vt(t), y: Gt(t) }), Ce = (t) => {
716
+ }, di = (t) => ({ x: Wt(t), y: Gt(t) }), Be = (t) => {
737
717
  const e = x(t);
738
718
  return { lower: e.one.x, upper: e.two.x };
739
- }, Re = (t) => {
719
+ }, Ce = (t) => {
740
720
  const e = x(t);
741
721
  return { lower: e.one.y, upper: e.two.y };
742
- }, $i = (t, e) => Dr(t, e), Oi = (t, e) => {
743
- const r = x(t), n = He.includes(e) ? "x" : Xe.includes(e) ? "y" : null;
722
+ }, gi = (t, e) => Br(t, e), pi = (t, e) => {
723
+ const r = x(t), n = Ve.includes(e) ? "x" : We.includes(e) ? "y" : null;
744
724
  if (n === null) throw new Error(`Invalid location: ${e}`);
745
725
  const s = e === "top" || e === "left" ? Math.min : Math.max, i = { ...r.one }, o = { ...r.two };
746
726
  return i[n] = s(r.one[n], r.two[n]), o[n] = s(r.one[n], r.two[n]), [i, o];
747
- }, vi = (t, e) => {
748
- const r = x(t), n = x(e), s = Vt(n) + (X(n) - X(r)) / 2, i = Gt(n) + (J(n) - J(r)) / 2;
749
- return x({ x: s, y: i }, Pr(r));
750
- }, qr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Ti = (t) => X(t) / J(t), xi = (t, e, r) => {
727
+ }, mi = (t, e) => {
728
+ const r = x(t), n = x(e), s = Wt(n) + (X(n) - X(r)) / 2, i = Gt(n) + (J(n) - J(r)) / 2;
729
+ return x({ x: s, y: i }, Cr(r));
730
+ }, Rr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, yi = (t) => X(t) / J(t), bi = (t, e, r) => {
751
731
  if (typeof e == "string") {
752
732
  if (r == null) throw new Error("Undefined amount passed into box.translate");
753
733
  const s = z(e);
@@ -755,141 +735,141 @@ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
755
735
  }
756
736
  const n = x(t);
757
737
  return x(
758
- $e(n.one, e),
759
- $e(n.two, e),
738
+ we(n.one, e),
739
+ we(n.two, e),
760
740
  void 0,
761
741
  void 0,
762
742
  n.root
763
743
  );
764
- }, Si = (t, e) => {
765
- const r = Math.max(V(t), V(e)), n = Math.max(G(t), G(e)), s = Math.min(_(t), _(e)), i = Math.min(ee(t), ee(e));
766
- return r > s || n > i ? Lr : x({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
767
- }, zr = (t) => X(t) * J(t), Ni = (t, e) => {
744
+ }, wi = (t, e) => {
745
+ const r = Math.max(W(t), W(e)), n = Math.max(G(t), G(e)), s = Math.min(_(t), _(e)), i = Math.min(ee(t), ee(e));
746
+ return r > s || n > i ? Ur : x({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
747
+ }, Lr = (t) => X(t) * J(t), $i = (t, e) => {
768
748
  const r = x(t);
769
749
  return x(
770
- yt(r.one, e),
771
- yt(r.two, e),
750
+ mt(r.one, e),
751
+ mt(r.two, e),
772
752
  void 0,
773
753
  void 0,
774
754
  r.root
775
755
  );
776
- }, Ii = (t, e, r, n, s, i) => {
756
+ }, Oi = (t, e, r, n, s, i) => {
777
757
  const o = { x: t, y: e }, l = { x: t + r, y: e + n };
778
758
  return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, l.x -= r / 2) : (o.x -= r, l.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, l.y -= n / 2) : (o.y -= n, l.y -= n)), x(o, l, void 0, void 0, i);
779
- }, Mi = (t) => {
759
+ }, vi = (t) => {
780
760
  const e = x(t);
781
- return x(bt(e.one), bt(e.two), void 0, void 0, e.root);
761
+ return x(yt(e.one), yt(e.two), void 0, void 0, e.root);
782
762
  }, Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
783
763
  __proto__: null,
784
- DECIMAL: ii,
785
- ZERO: Lr,
786
- area: zr,
787
- areaIsZero: hi,
788
- aspect: Ti,
764
+ DECIMAL: _s,
765
+ ZERO: Ur,
766
+ area: Lr,
767
+ areaIsZero: ii,
768
+ aspect: yi,
789
769
  bottom: ee,
790
- bottomCenter: pi,
791
- bottomLeft: gi,
792
- bottomRight: mi,
793
- box: si,
794
- center: wt,
795
- centerLeft: yi,
796
- centerRight: bi,
770
+ bottomCenter: li,
771
+ bottomLeft: ui,
772
+ bottomRight: ci,
773
+ box: Qs,
774
+ center: bt,
775
+ centerLeft: hi,
776
+ centerRight: fi,
797
777
  construct: x,
798
- constructWithAlternateRoot: Ii,
799
- contains: oi,
800
- copy: Dr,
801
- css: ci,
802
- cssBox: ri,
803
- dim: Wt,
804
- dims: Pr,
805
- domRect: ni,
806
- edgePoints: Oi,
807
- equals: ui,
778
+ constructWithAlternateRoot: Oi,
779
+ contains: ti,
780
+ copy: Br,
781
+ css: si,
782
+ cssBox: Js,
783
+ dim: Vt,
784
+ dims: Cr,
785
+ domRect: Ks,
786
+ edgePoints: pi,
787
+ equals: ri,
808
788
  height: J,
809
- intersection: Si,
810
- isBox: qr,
811
- left: V,
789
+ intersection: wi,
790
+ isBox: Rr,
791
+ left: W,
812
792
  loc: te,
813
- positionInCenter: vi,
814
- reRoot: $i,
815
- resize: ai,
793
+ positionInCenter: mi,
794
+ reRoot: gi,
795
+ resize: ei,
816
796
  right: _,
817
- root: wi,
818
- round: Mi,
819
- signedDims: li,
820
- signedHeight: Qe,
821
- signedWidth: Ke,
797
+ root: di,
798
+ round: vi,
799
+ signedDims: ni,
800
+ signedHeight: Xe,
801
+ signedWidth: He,
822
802
  top: G,
823
- topCenter: fi,
824
- topLeft: kr,
825
- topRight: di,
826
- translate: xi,
827
- truncate: Ni,
803
+ topCenter: ai,
804
+ topLeft: jr,
805
+ topRight: oi,
806
+ translate: bi,
807
+ truncate: $i,
828
808
  width: X,
829
- x: Vt,
830
- xBounds: Ce,
809
+ x: Wt,
810
+ xBounds: Be,
831
811
  xyLoc: F,
832
812
  y: Gt,
833
- yBounds: Re
834
- }, Symbol.toStringTag, { value: "Module" })), Zr = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Ai = a.union([At, Zr, be, Ve]), Ei = { width: 0, height: 0 }, Ui = { width: 1, height: 1 }, D = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, Bi = (t, e) => {
813
+ yBounds: Ce
814
+ }, Symbol.toStringTag, { value: "Module" })), Dr = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Ti = a.union([At, Dr, ye, Fe]), xi = { width: 0, height: 0 }, Si = { width: 1, height: 1 }, D = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, Ni = (t, e) => {
835
815
  if (e == null) return !1;
836
816
  const r = D(t), n = D(e);
837
817
  return r.width === n.width && r.height === n.height;
838
- }, ji = (t) => {
818
+ }, Ii = (t) => {
839
819
  const e = D(t);
840
820
  return { width: e.height, height: e.width };
841
- }, Ci = (t) => {
821
+ }, Mi = (t) => {
842
822
  const e = D(t);
843
823
  return `0 0 ${e.width} ${e.height}`;
844
- }, Ri = (t) => {
824
+ }, Ai = (t) => {
845
825
  const e = D(t);
846
826
  return [e.width, e.height];
847
- }, Li = (t) => ({
827
+ }, Ei = (t) => ({
848
828
  width: Math.max(...t.map((e) => D(e).width)),
849
829
  height: Math.max(...t.map((e) => D(e).height))
850
- }), Di = (t) => ({
830
+ }), Ui = (t) => ({
851
831
  width: Math.min(...t.map((e) => D(e).width)),
852
832
  height: Math.min(...t.map((e) => D(e).height))
853
- }), Pi = (t, e) => {
833
+ }), Bi = (t, e) => {
854
834
  const r = D(t);
855
835
  return { width: r.width * e, height: r.height * e };
856
836
  }, Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
857
837
  __proto__: null,
858
- DECIMAL: Ui,
859
- ZERO: Ei,
838
+ DECIMAL: Si,
839
+ ZERO: xi,
860
840
  construct: D,
861
- couple: Ri,
862
- crude: Ai,
841
+ couple: Ai,
842
+ crude: Ti,
863
843
  dimensions: At,
864
- equals: Bi,
865
- max: Li,
866
- min: Di,
867
- scale: Pi,
868
- signed: Zr,
869
- svgViewBox: Ci,
870
- swap: ji
871
- }, Symbol.toStringTag, { value: "Module" })), ki = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, qi = a.object({ offset: mt, scale: mt }), zi = a.object({ offset: a.number(), scale: a.number() }), Zi = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
844
+ equals: Ni,
845
+ max: Ei,
846
+ min: Ui,
847
+ scale: Bi,
848
+ signed: Dr,
849
+ svgViewBox: Mi,
850
+ swap: Ii
851
+ }, Symbol.toStringTag, { value: "Module" })), Ci = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, ji = a.object({ offset: pt, scale: pt }), Ri = a.object({ offset: a.number(), scale: a.number() }), Li = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
872
852
  e,
873
853
  s ? n - t : n + t
874
- ], Fi = (t) => (e, r, n, s) => [
854
+ ], Di = (t) => (e, r, n, s) => [
875
855
  e,
876
856
  s ? n / t : n * t
877
- ], Yi = (t) => (e, r, n) => {
857
+ ], Pi = (t) => (e, r, n) => {
878
858
  if (e === null) return [t, n];
879
859
  const { lower: s, upper: i } = e, { lower: o, upper: l } = t, f = i - s, c = l - o;
880
860
  if (r === "dimension") return [t, n * (c / f)];
881
861
  const d = (n - s) * (c / f) + o;
882
862
  return [t, d];
883
- }, Wi = (t) => (e, r, n) => [t, n], Vi = () => (t, e, r) => {
863
+ }, ki = (t) => (e, r, n) => [t, n], qi = () => (t, e, r) => {
884
864
  if (t === null) throw new Error("cannot invert without bounds");
885
865
  if (e === "dimension") return [t, r];
886
866
  const { lower: n, upper: s } = t;
887
867
  return [t, s - (r - n)];
888
- }, Gi = (t) => (e, r, n) => {
868
+ }, zi = (t) => (e, r, n) => {
889
869
  const { lower: s, upper: i } = t;
890
- return n = ki(n, s, i), [e, n];
870
+ return n = Ci(n, s, i), [e, n];
891
871
  };
892
- let $t = class se {
872
+ let wt = class se {
893
873
  ops = [];
894
874
  currBounds = null;
895
875
  currType = null;
@@ -923,7 +903,7 @@ let $t = class se {
923
903
  * @param value - The amount to translate by.
924
904
  */
925
905
  translate(e) {
926
- const r = this.new(), n = Zi(e);
906
+ const r = this.new(), n = Li(e);
927
907
  return n.type = "translate", r.ops.push(n), r;
928
908
  }
929
909
  /**
@@ -933,23 +913,23 @@ let $t = class se {
933
913
  * @param value - The amount to magnify by.
934
914
  */
935
915
  magnify(e) {
936
- const r = this.new(), n = Fi(e);
916
+ const r = this.new(), n = Di(e);
937
917
  return n.type = "magnify", r.ops.push(n), r;
938
918
  }
939
919
  scale(e, r) {
940
- const n = b(e, r), s = this.new(), i = Yi(n);
920
+ const n = b(e, r), s = this.new(), i = Pi(n);
941
921
  return i.type = "scale", s.ops.push(i), s;
942
922
  }
943
923
  clamp(e, r) {
944
- const n = b(e, r), s = this.new(), i = Gi(n);
924
+ const n = b(e, r), s = this.new(), i = zi(n);
945
925
  return i.type = "clamp", s.ops.push(i), s;
946
926
  }
947
927
  reBound(e, r) {
948
- const n = b(e, r), s = this.new(), i = Wi(n);
928
+ const n = b(e, r), s = this.new(), i = ki(n);
949
929
  return i.type = "re-bound", s.ops.push(i), s;
950
930
  }
951
931
  invert() {
952
- const e = Vi();
932
+ const e = qi();
953
933
  e.type = "invert";
954
934
  const r = this.new();
955
935
  return r.ops.push(e), r;
@@ -988,11 +968,11 @@ let $t = class se {
988
968
  return { scale: this.dim(1), offset: this.pos(0) };
989
969
  }
990
970
  static IDENTITY = new se();
991
- }, Hi = class P {
971
+ }, Zi = class P {
992
972
  x;
993
973
  y;
994
974
  currRoot;
995
- constructor(e = new $t(), r = new $t(), n = null) {
975
+ constructor(e = new wt(), r = new wt(), n = null) {
996
976
  this.x = e, this.y = r, this.currRoot = n;
997
977
  }
998
978
  static translate(e, r) {
@@ -1034,19 +1014,19 @@ let $t = class se {
1034
1014
  }
1035
1015
  scale(e) {
1036
1016
  const r = this.copy();
1037
- if (qr(e)) {
1017
+ if (Rr(e)) {
1038
1018
  const n = this.currRoot;
1039
- return r.currRoot = e.root, n != null && !Ft(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(Ce(e)), r.y = r.y.scale(Re(e)), r;
1019
+ return r.currRoot = e.root, n != null && !Ft(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(Be(e)), r.y = r.y.scale(Ce(e)), r;
1040
1020
  }
1041
1021
  return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
1042
1022
  }
1043
1023
  reBound(e) {
1044
1024
  const r = this.copy();
1045
- return r.x = this.x.reBound(Ce(e)), r.y = this.y.reBound(Re(e)), r;
1025
+ return r.x = this.x.reBound(Be(e)), r.y = this.y.reBound(Ce(e)), r;
1046
1026
  }
1047
1027
  clamp(e) {
1048
1028
  const r = this.copy();
1049
- return r.x = this.x.clamp(Ce(e)), r.y = this.y.clamp(Re(e)), r;
1029
+ return r.x = this.x.clamp(Be(e)), r.y = this.y.clamp(Ce(e)), r;
1050
1030
  }
1051
1031
  copy() {
1052
1032
  const e = new P();
@@ -1081,26 +1061,26 @@ let $t = class se {
1081
1061
  };
1082
1062
  const Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1083
1063
  __proto__: null,
1084
- Scale: $t,
1085
- XY: Hi,
1086
- crudeXYTransform: qi,
1087
- transform: zi
1064
+ Scale: wt,
1065
+ XY: Zi,
1066
+ crudeXYTransform: ji,
1067
+ transform: Ri
1088
1068
  }, Symbol.toStringTag, { value: "Module" }));
1089
- let Fr = (t, e = 21) => (r = e) => {
1069
+ let Pr = (t, e = 21) => (r = e) => {
1090
1070
  let n = "", s = r | 0;
1091
1071
  for (; s--; )
1092
1072
  n += t[Math.random() * t.length | 0];
1093
1073
  return n;
1094
1074
  };
1095
- const Yr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Xi = `0123456789${Yr}`, Wr = 11, Ji = Fr(Yr, 1), Ki = Fr(Xi, Wr - 1), Ht = () => `${Ji()}${Ki()}`, Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1075
+ const kr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Fi = `0123456789${kr}`, qr = 11, Yi = Pr(kr, 1), Vi = Pr(Fi, qr - 1), Ht = () => `${Yi()}${Vi()}`, Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1096
1076
  __proto__: null,
1097
- LENGTH: Wr,
1077
+ LENGTH: qr,
1098
1078
  create: Ht
1099
- }, Symbol.toStringTag, { value: "Module" })), Qi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, _i = 2 ** 8 - 1, ea = 2 ** 16 - 1, ta = 2 ** 32 - 1, ra = 2n ** 64n - 1n, na = 2 ** 64 - 1, sa = -128, ia = 2 ** 7 - 1, aa = -32768, oa = 2 ** 15 - 1, ua = -2147483648, la = 2 ** 31 - 1, ca = -(2n ** 63n), ze = 2n ** 63n - 1n, ha = -9223372036854776e3, Vr = 2 ** 63 - 1, fa = a.enum(["static", "dynamic"]), tr = 365, Ie = 30, da = a.union([
1079
+ }, Symbol.toStringTag, { value: "Module" })), Wi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, Gi = a.enum(["static", "dynamic"]), Hi = 2 ** 8 - 1, Xi = 2 ** 16 - 1, Ji = 2 ** 32 - 1, Ki = 2n ** 64n - 1n, Qi = 2 ** 64 - 1, _i = -128, ea = 2 ** 7 - 1, ta = -32768, ra = 2 ** 15 - 1, na = -2147483648, sa = 2 ** 31 - 1, ia = -(2n ** 63n), ke = 2n ** 63n - 1n, aa = -9223372036854776e3, zr = 2 ** 63 - 1, tr = 365, Ie = 30, oa = a.union([
1100
1080
  a.tuple([a.int()]),
1101
1081
  a.tuple([a.int(), a.int().min(1).max(12)]),
1102
1082
  a.tuple([a.int(), a.int().min(1).max(12), a.int().min(1).max(31)])
1103
- ]), Gr = (t, e) => {
1083
+ ]), Zr = (t, e) => {
1104
1084
  const r = new $(e);
1105
1085
  if (![
1106
1086
  h.DAY,
@@ -1127,7 +1107,7 @@ let $ = class g extends re {
1127
1107
  else if (Array.isArray(e)) super(g.parseDate(e));
1128
1108
  else {
1129
1109
  let n = 0n;
1130
- e instanceof Number && (e = e.valueOf()), r === "local" && (n = g.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e === Vr ? e = ze : e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = g.MAX : e = g.MIN)), B(e) && (e = e.value), super(BigInt(e.valueOf()) + n);
1110
+ e instanceof Number && (e = e.valueOf()), r === "local" && (n = g.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e === zr ? e = ke : e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = g.MAX : e = g.MIN)), B(e) && (e = e.value), super(BigInt(e.valueOf()) + n);
1131
1111
  }
1132
1112
  }
1133
1113
  static parseDate([e = 1970, r = 1, n = 1]) {
@@ -1282,7 +1262,7 @@ let $ = class g extends re {
1282
1262
  * TimeSpan.
1283
1263
  */
1284
1264
  add(e) {
1285
- return new g(ue(this.valueOf(), new h(e).valueOf()));
1265
+ return new g(oe(this.valueOf(), new h(e).valueOf()));
1286
1266
  }
1287
1267
  /**
1288
1268
  * Subtracts a TimeSpan from the TimeStamp.
@@ -1483,7 +1463,7 @@ let $ = class g extends re {
1483
1463
  * @example TimeStamp.now().remainder(TimeStamp.DAY) // => TimeStamp representing the current day
1484
1464
  */
1485
1465
  remainder(e) {
1486
- return Gr(this, e);
1466
+ return Zr(this, e);
1487
1467
  }
1488
1468
  /** @returns true if the day portion TimeStamp is today, false otherwise. */
1489
1469
  get isToday() {
@@ -1582,7 +1562,7 @@ let $ = class g extends re {
1582
1562
  /** One day after the unix epoch */
1583
1563
  static DAY = g.days(1);
1584
1564
  /** The maximum possible value for a timestamp */
1585
- static MAX = new g(ze);
1565
+ static MAX = new g(ke);
1586
1566
  /** The minimum possible value for a timestamp */
1587
1567
  static MIN = new g(0);
1588
1568
  /** The unix epoch */
@@ -1596,7 +1576,7 @@ let $ = class g extends re {
1596
1576
  a.bigint().transform((e) => new g(e)),
1597
1577
  a.date().transform((e) => new g(e)),
1598
1578
  a.custom((e) => e instanceof h).transform((e) => new g(e)),
1599
- da.transform((e) => new g(e))
1579
+ oa.transform((e) => new g(e))
1600
1580
  ]);
1601
1581
  /**
1602
1582
  * Sorts two timestamps.
@@ -1621,7 +1601,7 @@ class h extends re {
1621
1601
  * @returns A TimeSpan representing the given number of seconds.
1622
1602
  */
1623
1603
  static fromSeconds(e) {
1624
- return e instanceof h ? e : e instanceof st ? e.period : e instanceof $ ? new h(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? h.seconds(e) : new h(e));
1604
+ return e instanceof h ? e : e instanceof nt ? e.period : e instanceof $ ? new h(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? h.seconds(e) : new h(e));
1625
1605
  }
1626
1606
  /**
1627
1607
  * Creates a TimeSpan representing the given number of milliseconds.
@@ -1630,7 +1610,7 @@ class h extends re {
1630
1610
  * @returns A TimeSpan representing the given number of milliseconds.
1631
1611
  */
1632
1612
  static fromMilliseconds(e) {
1633
- return e instanceof h ? e : e instanceof st ? e.period : e instanceof $ ? new h(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? h.milliseconds(e) : new h(e));
1613
+ return e instanceof h ? e : e instanceof nt ? e.period : e instanceof $ ? new h(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? h.milliseconds(e) : new h(e));
1634
1614
  }
1635
1615
  /**
1636
1616
  * @returns the primitive value of the TimeSpan. Overrides standard JS valueOf()
@@ -1682,7 +1662,7 @@ class h extends re {
1682
1662
  * @returns A new TimeSpan representing the remainder.
1683
1663
  */
1684
1664
  remainder(e) {
1685
- return Gr(this, e);
1665
+ return Zr(this, e);
1686
1666
  }
1687
1667
  /**
1688
1668
  * Truncates the TimeSpan to the nearest multiple of the given span.
@@ -1705,15 +1685,15 @@ class h extends re {
1705
1685
  */
1706
1686
  toString(e = "full") {
1707
1687
  if (e === "semantic") return this.toSemanticString();
1708
- const r = this.truncate(h.DAY), n = this.truncate(h.HOUR), s = this.truncate(h.MINUTE), i = this.truncate(h.SECOND), o = this.truncate(h.MILLISECOND), l = this.truncate(h.MICROSECOND), f = this.truncate(h.NANOSECOND), c = r, d = n.sub(r), m = s.sub(n), p = i.sub(s), A = o.sub(i), U = l.sub(o), C = f.sub(l);
1688
+ const r = this.truncate(h.DAY), n = this.truncate(h.HOUR), s = this.truncate(h.MINUTE), i = this.truncate(h.SECOND), o = this.truncate(h.MILLISECOND), l = this.truncate(h.MICROSECOND), f = this.truncate(h.NANOSECOND), c = r, d = n.sub(r), m = s.sub(n), p = i.sub(s), A = o.sub(i), U = l.sub(o), j = f.sub(l);
1709
1689
  let w = "";
1710
- return c.isZero || (w += `${c.days}d `), d.isZero || (w += `${d.hours}h `), m.isZero || (w += `${m.minutes}m `), p.isZero || (w += `${p.seconds}s `), A.isZero || (w += `${A.milliseconds}ms `), U.isZero || (w += `${U.microseconds}µs `), C.isZero || (w += `${C.nanoseconds}ns`), w.trim();
1690
+ return c.isZero || (w += `${c.days}d `), d.isZero || (w += `${d.hours}h `), m.isZero || (w += `${m.minutes}m `), p.isZero || (w += `${p.seconds}s `), A.isZero || (w += `${A.milliseconds}ms `), U.isZero || (w += `${U.microseconds}µs `), j.isZero || (w += `${j.nanoseconds}ns`), w.trim();
1711
1691
  }
1712
1692
  toSemanticString() {
1713
1693
  const e = this.valueOf() < 0n ? -this.valueOf() : this.valueOf(), r = new h(e), n = this.valueOf() < 0n;
1714
1694
  if (r.valueOf() === 0n) return "0s";
1715
1695
  if (r.lessThan(h.SECOND)) return "< 1s";
1716
- const s = r.days, i = r.hours, o = r.minutes, l = r.seconds, f = Math.floor(s / tr), c = Math.floor(s / Ie), d = Math.floor(s / 7), m = Math.floor(s), p = Math.floor(i), A = Math.floor(o), U = Math.floor(l), C = n ? "-" : "";
1696
+ const s = r.days, i = r.hours, o = r.minutes, l = r.seconds, f = Math.floor(s / tr), c = Math.floor(s / Ie), d = Math.floor(s / 7), m = Math.floor(s), p = Math.floor(i), A = Math.floor(o), U = Math.floor(l), j = n ? "-" : "";
1717
1697
  if (f >= 1) {
1718
1698
  let w = `${f}y`;
1719
1699
  if (f < 2) {
@@ -1722,12 +1702,12 @@ class h extends re {
1722
1702
  );
1723
1703
  N > 0 && (w += ` ${N}mo`);
1724
1704
  }
1725
- return C + w;
1705
+ return j + w;
1726
1706
  }
1727
1707
  if (d >= 1 && s < Ie && s % 7 === 0) {
1728
1708
  let w = `${d}w`;
1729
1709
  const N = Math.floor(s % 7), K = Math.floor(i - d * 7 * 24);
1730
- return d < 2 && (N > 0 ? w += ` ${N}d` : K > 0 && K < 24 && (w += ` ${K}h`)), C + w;
1710
+ return d < 2 && (N > 0 ? w += ` ${N}d` : K > 0 && K < 24 && (w += ` ${K}h`)), j + w;
1731
1711
  }
1732
1712
  if (c >= 1) {
1733
1713
  let w = `${c}mo`;
@@ -1735,17 +1715,17 @@ class h extends re {
1735
1715
  const N = Math.floor(s % Ie);
1736
1716
  N > 0 && (w += ` ${N}d`);
1737
1717
  }
1738
- return C + w;
1718
+ return j + w;
1739
1719
  }
1740
1720
  if (d >= 1) {
1741
1721
  let w = `${d}w`;
1742
1722
  const N = Math.floor(s % 7), K = Math.floor(i - d * 7 * 24);
1743
- return d < 2 && (N > 0 ? w += ` ${N}d` : K > 0 && K < 24 && (w += ` ${K}h`)), C + w;
1723
+ return d < 2 && (N > 0 ? w += ` ${N}d` : K > 0 && K < 24 && (w += ` ${K}h`)), j + w;
1744
1724
  }
1745
1725
  if (m >= 1) {
1746
1726
  let w = `${m}d`;
1747
1727
  const N = Math.floor(i - m * 24);
1748
- return m < 2 && N > 0 && (w += ` ${N}h`), C + w;
1728
+ return m < 2 && N > 0 && (w += ` ${N}h`), j + w;
1749
1729
  }
1750
1730
  if (p >= 1) {
1751
1731
  let w = `${p}h`;
@@ -1753,7 +1733,7 @@ class h extends re {
1753
1733
  const N = Math.floor(o - p * 60);
1754
1734
  N > 0 && (w += ` ${N}m`);
1755
1735
  }
1756
- return C + w;
1736
+ return j + w;
1757
1737
  }
1758
1738
  if (A >= 1) {
1759
1739
  let w = `${A}m`;
@@ -1761,9 +1741,9 @@ class h extends re {
1761
1741
  const N = Math.floor(l - A * 60);
1762
1742
  N > 0 && (w += ` ${N}s`);
1763
1743
  }
1764
- return C + w;
1744
+ return j + w;
1765
1745
  }
1766
- return `${C}${U}s`;
1746
+ return `${j}${U}s`;
1767
1747
  }
1768
1748
  /**
1769
1749
  * Multiplies the TimeSpan by a scalar value.
@@ -1921,7 +1901,7 @@ class h extends re {
1921
1901
  /** Represents a day. */
1922
1902
  static DAY = h.days(1);
1923
1903
  /** The maximum possible value for a TimeSpan. */
1924
- static MAX = new h(ze);
1904
+ static MAX = new h(ke);
1925
1905
  /** The minimum possible value for a TimeSpan. */
1926
1906
  static MIN = new h(0);
1927
1907
  /** The zero value for a TimeSpan. */
@@ -1934,10 +1914,10 @@ class h extends re {
1934
1914
  a.bigint().transform((e) => new h(e)),
1935
1915
  a.instanceof(h),
1936
1916
  a.instanceof($).transform((e) => new h(e)),
1937
- a.custom((e) => e instanceof st).transform((e) => new h(e))
1917
+ a.custom((e) => e instanceof nt).transform((e) => new h(e))
1938
1918
  ]);
1939
1919
  }
1940
- let st = class j extends re {
1920
+ let nt = class C extends re {
1941
1921
  constructor(e) {
1942
1922
  B(e) && (e = e.value), super(e.valueOf());
1943
1923
  }
@@ -1947,7 +1927,7 @@ let st = class j extends re {
1947
1927
  }
1948
1928
  /** @returns The number of seconds in the Rate. */
1949
1929
  equals(e) {
1950
- return this.valueOf() === new j(e).valueOf();
1930
+ return this.valueOf() === new C(e).valueOf();
1951
1931
  }
1952
1932
  /**
1953
1933
  * Calculates the period of the Rate as a TimeSpan.
@@ -2002,7 +1982,7 @@ let st = class j extends re {
2002
1982
  * @returns A new Rate representing the sum of the two rates.
2003
1983
  */
2004
1984
  add(e) {
2005
- return new j(ue(this.valueOf(), new j(e).valueOf()));
1985
+ return new C(oe(this.valueOf(), new C(e).valueOf()));
2006
1986
  }
2007
1987
  /**
2008
1988
  * Subtracts another Rate from this Rate.
@@ -2011,7 +1991,7 @@ let st = class j extends re {
2011
1991
  * @returns A new Rate representing the difference of the two rates.
2012
1992
  */
2013
1993
  sub(e) {
2014
- return new j(Z(this.valueOf(), new j(e).valueOf()));
1994
+ return new C(Z(this.valueOf(), new C(e).valueOf()));
2015
1995
  }
2016
1996
  /**
2017
1997
  * Multiplies this Rate by a scalar value.
@@ -2020,7 +2000,7 @@ let st = class j extends re {
2020
2000
  * @returns A new Rate representing this Rate multiplied by the value.
2021
2001
  */
2022
2002
  mult(e) {
2023
- return new j(R(this.valueOf(), e));
2003
+ return new C(R(this.valueOf(), e));
2024
2004
  }
2025
2005
  /**
2026
2006
  * Divides this Rate by a scalar value.
@@ -2029,7 +2009,7 @@ let st = class j extends re {
2029
2009
  * @returns A new Rate representing this Rate divided by the value.
2030
2010
  */
2031
2011
  div(e) {
2032
- return new j(Te(this.valueOf(), e));
2012
+ return new C(Te(this.valueOf(), e));
2033
2013
  }
2034
2014
  /**
2035
2015
  * Creates a Rate representing the given number of Hz.
@@ -2038,7 +2018,7 @@ let st = class j extends re {
2038
2018
  * @returns A Rate representing the given number of Hz.
2039
2019
  */
2040
2020
  static hz(e) {
2041
- return new j(e);
2021
+ return new C(e);
2042
2022
  }
2043
2023
  /**
2044
2024
  * Creates a Rate representing the given number of kHz.
@@ -2047,12 +2027,12 @@ let st = class j extends re {
2047
2027
  * @returns A Rate representing the given number of kHz.
2048
2028
  */
2049
2029
  static khz(e) {
2050
- return j.hz(e * 1e3);
2030
+ return C.hz(e * 1e3);
2051
2031
  }
2052
2032
  /** A zod schema for validating and transforming rates */
2053
2033
  static z = a.union([
2054
- a.number().transform((e) => new j(e)),
2055
- a.instanceof(j)
2034
+ a.number().transform((e) => new C(e)),
2035
+ a.instanceof(C)
2056
2036
  ]);
2057
2037
  }, M = class E extends re {
2058
2038
  /**
@@ -2081,7 +2061,7 @@ let st = class j extends re {
2081
2061
  * @returns A Size representing the given number of values.
2082
2062
  */
2083
2063
  size(e) {
2084
- return new Ze(e * this.valueOf());
2064
+ return new qe(e * this.valueOf());
2085
2065
  }
2086
2066
  /**
2087
2067
  * Adds another Density to this Density.
@@ -2090,7 +2070,7 @@ let st = class j extends re {
2090
2070
  * @returns A new Density representing the sum of the two densities.
2091
2071
  */
2092
2072
  add(e) {
2093
- return new E(ue(this.valueOf(), new E(e).valueOf()));
2073
+ return new E(oe(this.valueOf(), new E(e).valueOf()));
2094
2074
  }
2095
2075
  /**
2096
2076
  * Subtracts another Density from this Density.
@@ -2558,7 +2538,7 @@ let st = class j extends re {
2558
2538
  a.string().transform((e) => new u(e)),
2559
2539
  a.instanceof(u)
2560
2540
  ]);
2561
- }, Ze = class y extends re {
2541
+ }, qe = class y extends re {
2562
2542
  constructor(e) {
2563
2543
  B(e) && (e = e.value), super(e.valueOf());
2564
2544
  }
@@ -2572,7 +2552,7 @@ let st = class j extends re {
2572
2552
  }
2573
2553
  /** @returns a new Size representing the sum of the two Sizes. */
2574
2554
  add(e) {
2575
- return B(e) && (e = e.value), new y(ue(this.valueOf(), e.valueOf()));
2555
+ return B(e) && (e = e.value), new y(oe(this.valueOf(), e.valueOf()));
2576
2556
  }
2577
2557
  /** @returns a new Size representing the difference of the two Sizes. */
2578
2558
  sub(e) {
@@ -2710,65 +2690,65 @@ const Uu = a.union([
2710
2690
  a.instanceof(Int16Array),
2711
2691
  a.instanceof(Int32Array),
2712
2692
  a.instanceof(BigInt64Array)
2713
- ]), Hr = (t) => {
2693
+ ]), Fr = (t) => {
2714
2694
  const e = typeof t;
2715
2695
  return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof $ || t instanceof h || t instanceof Date;
2716
- }, ga = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Le(r, -n), Le = (t, e) => e == 0 ? t : t == 0 ? e : typeof t == "bigint" && typeof e == "bigint" || typeof t == "number" && typeof e == "number" ? t + e : Number(t) + Number(e), pa = "00000000-0000-0000-0000-000000000000", ma = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
2717
- function ya(t) {
2718
- return typeof t == "string" && ma.test(t);
2696
+ }, ua = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : je(r, -n), je = (t, e) => e == 0 ? t : t == 0 ? e : typeof t == "bigint" && typeof e == "bigint" || typeof t == "number" && typeof e == "number" ? t + e : Number(t) + Number(e), la = "00000000-0000-0000-0000-000000000000", ca = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
2697
+ function ha(t) {
2698
+ return typeof t == "string" && ca.test(t);
2719
2699
  }
2720
2700
  const I = [];
2721
2701
  for (let t = 0; t < 256; ++t)
2722
2702
  I.push((t + 256).toString(16).slice(1));
2723
- function Xr(t, e = 0) {
2703
+ function Yr(t, e = 0) {
2724
2704
  return (I[t[e + 0]] + I[t[e + 1]] + I[t[e + 2]] + I[t[e + 3]] + "-" + I[t[e + 4]] + I[t[e + 5]] + "-" + I[t[e + 6]] + I[t[e + 7]] + "-" + I[t[e + 8]] + I[t[e + 9]] + "-" + I[t[e + 10]] + I[t[e + 11]] + I[t[e + 12]] + I[t[e + 13]] + I[t[e + 14]] + I[t[e + 15]]).toLowerCase();
2725
2705
  }
2726
- function ba(t, e = 0) {
2727
- const r = Xr(t, e);
2728
- if (!ya(r))
2706
+ function fa(t, e = 0) {
2707
+ const r = Yr(t, e);
2708
+ if (!ha(r))
2729
2709
  throw TypeError("Stringified UUID is invalid");
2730
2710
  return r;
2731
2711
  }
2732
- let it;
2733
- const wa = new Uint8Array(16);
2734
- function $a() {
2735
- if (!it) {
2712
+ let st;
2713
+ const da = new Uint8Array(16);
2714
+ function ga() {
2715
+ if (!st) {
2736
2716
  if (typeof crypto > "u" || !crypto.getRandomValues)
2737
2717
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2738
- it = crypto.getRandomValues.bind(crypto);
2718
+ st = crypto.getRandomValues.bind(crypto);
2739
2719
  }
2740
- return it(wa);
2720
+ return st(da);
2741
2721
  }
2742
- const Oa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), rr = { randomUUID: Oa };
2743
- function va(t, e, r) {
2722
+ const pa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), rr = { randomUUID: pa };
2723
+ function ma(t, e, r) {
2744
2724
  t = t || {};
2745
- const n = t.random ?? t.rng?.() ?? $a();
2725
+ const n = t.random ?? t.rng?.() ?? ga();
2746
2726
  if (n.length < 16)
2747
2727
  throw new Error("Random bytes length must be >= 16");
2748
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Xr(n);
2728
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Yr(n);
2749
2729
  }
2750
- function Ta(t, e, r) {
2751
- return rr.randomUUID && !t ? rr.randomUUID() : va(t);
2730
+ function ya(t, e, r) {
2731
+ return rr.randomUUID && !t ? rr.randomUUID() : ma(t);
2752
2732
  }
2753
- const xa = () => Ta(), Xt = (t, e) => ba(t, e), Sa = pa, Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2733
+ const ba = () => ya(), Xt = (t, e) => fa(t, e), wa = la, Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2754
2734
  __proto__: null,
2755
- ZERO: Sa,
2756
- create: xa,
2735
+ ZERO: wa,
2736
+ create: ba,
2757
2737
  parse: Xt
2758
- }, Symbol.toStringTag, { value: "Module" })), Y = -1, Ot = {
2759
- [Symbol.iterator]: () => Ot,
2738
+ }, Symbol.toStringTag, { value: "Module" })), Y = -1, $t = {
2739
+ [Symbol.iterator]: () => $t,
2760
2740
  next: () => ({ done: !0, value: void 0 })
2761
- }, Na = a.string().transform(
2741
+ }, $a = a.string().transform(
2762
2742
  (t) => new Uint8Array(
2763
2743
  atob(t).split("").map((e) => e.charCodeAt(0))
2764
2744
  ).buffer
2765
- ), Ia = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), vt = 10, Jr = (t, e) => {
2745
+ ), Oa = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), Ot = 10, Vr = (t, e) => {
2766
2746
  if (t === "number" && !e.isNumeric)
2767
2747
  throw new Error(`cannot convert series of type ${e.toString()} to number`);
2768
2748
  if (t === "bigint" && !e.usesBigInt)
2769
2749
  throw new Error(`cannot convert series of type ${e.toString()} to bigint`);
2770
- }, Kr = "sy_x_telem_series";
2771
- let Qr = class W {
2750
+ }, Wr = "sy_x_telem_series";
2751
+ let Gr = class V {
2772
2752
  /**
2773
2753
  * A unique identifier for the series. If specified by the user, it is their
2774
2754
  * responsibility to ensure that it is unique. If not specified, a new ID will be
@@ -2779,7 +2759,7 @@ let Qr = class W {
2779
2759
  * A discriminator used for identifying instances of the series class even
2780
2760
  * when bundlers mangle the class name.
2781
2761
  */
2782
- discriminator = Kr;
2762
+ discriminator = Wr;
2783
2763
  /** The data type of the series. */
2784
2764
  dataType;
2785
2765
  /**
@@ -2828,18 +2808,18 @@ let Qr = class W {
2828
2808
  dataType: S.z,
2829
2809
  alignment: a.coerce.bigint().optional(),
2830
2810
  data: a.union([
2831
- Na,
2832
- Ia,
2811
+ $a,
2812
+ Oa,
2833
2813
  a.instanceof(ArrayBuffer),
2834
2814
  a.instanceof(Uint8Array)
2835
2815
  ]),
2836
- glBufferUsage: fa.optional().default("static").optional()
2816
+ glBufferUsage: Gi.optional().default("static").optional()
2837
2817
  });
2838
2818
  /**
2839
2819
  * A zod schema that validates and constructs a series from it's crude
2840
2820
  * representation.
2841
2821
  */
2842
- static z = W.crudeZ.transform((e) => new W(e));
2822
+ static z = V.crudeZ.transform((e) => new V(e));
2843
2823
  /**
2844
2824
  * The Series constructor accepts either a SeriesArgs object or a CrudeSeries value.
2845
2825
  *
@@ -2914,7 +2894,7 @@ let Qr = class W {
2914
2894
  * @throws Error if data type cannot be inferred from input
2915
2895
  */
2916
2896
  constructor(e) {
2917
- Ma(e) && (e = { data: e }), e.data ??= [];
2897
+ va(e) && (e = { data: e }), e.data ??= [];
2918
2898
  const {
2919
2899
  dataType: r,
2920
2900
  timeRange: n,
@@ -2925,12 +2905,12 @@ let Qr = class W {
2925
2905
  key: f = Ht(),
2926
2906
  data: c
2927
2907
  } = e;
2928
- if (_r(c)) {
2908
+ if (Hr(c)) {
2929
2909
  const p = c;
2930
2910
  this.key = p.key, this.dataType = p.dataType, this.sampleOffset = p.sampleOffset, this.gl = p.gl, this._data = p._data, this.timeRange = p.timeRange, this.alignment = p.alignment, this.alignmentMultiple = p.alignmentMultiple, this.cachedMin = p.cachedMin, this.cachedMax = p.cachedMax, this.writePos = p.writePos, this._refCount = p._refCount, this.cachedLength = p.cachedLength;
2931
2911
  return;
2932
2912
  }
2933
- const d = Hr(c), m = Array.isArray(c);
2913
+ const d = Fr(c), m = Array.isArray(c);
2934
2914
  if (r != null) this.dataType = new S(r);
2935
2915
  else {
2936
2916
  if (c instanceof ArrayBuffer)
@@ -2968,7 +2948,7 @@ let Qr = class W {
2968
2948
  (A instanceof $ || A instanceof Date || A instanceof h) && (p = p.map((U) => new $(U).valueOf())), this.dataType.equals(S.STRING) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(`${p.join(`
2969
2949
  `)}
2970
2950
  `).buffer) : this.dataType.equals(S.JSON) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(
2971
- `${p.map((U) => ct.encodeString(U)).join(`
2951
+ `${p.map((U) => lt.encodeString(U)).join(`
2972
2952
  `)}
2973
2953
  `
2974
2954
  ).buffer) : this.dataType.usesBigInt && typeof A == "number" ? this._data = new this.dataType.Array(
@@ -2994,7 +2974,7 @@ let Qr = class W {
2994
2974
  static alloc({ capacity: e, dataType: r, ...n }) {
2995
2975
  if (e === 0)
2996
2976
  throw new Error("[Series] - cannot allocate an array of length 0");
2997
- const s = new new S(r).Array(e), i = new W({ data: s.buffer, dataType: r, ...n });
2977
+ const s = new new S(r).Array(e), i = new V({ data: s.buffer, dataType: r, ...n });
2998
2978
  return i.writePos = 0, i;
2999
2979
  }
3000
2980
  /**
@@ -3086,14 +3066,14 @@ let Qr = class W {
3086
3066
  parseJSON(e) {
3087
3067
  if (!this.dataType.equals(S.JSON))
3088
3068
  throw new Error("cannot parse non-JSON series as JSON");
3089
- return this.toStrings().map((r) => e.parse(ct.decodeString(r)));
3069
+ return this.toStrings().map((r) => e.parse(lt.decodeString(r)));
3090
3070
  }
3091
3071
  /**
3092
3072
  * Returns the capacity of the series in bytes.
3093
3073
  * @returns The size of the underlying buffer in bytes.
3094
3074
  */
3095
3075
  get byteCapacity() {
3096
- return new Ze(this.underlyingData.byteLength);
3076
+ return new qe(this.underlyingData.byteLength);
3097
3077
  }
3098
3078
  /**
3099
3079
  * Returns the capacity of the series in samples.
@@ -3109,7 +3089,7 @@ let Qr = class W {
3109
3089
  * @returns The size of the data in bytes.
3110
3090
  */
3111
3091
  get byteLength() {
3112
- return this.writePos === Y ? this.byteCapacity : this.dataType.isVariable ? new Ze(this.writePos) : this.dataType.density.size(this.writePos);
3092
+ return this.writePos === Y ? this.byteCapacity : this.dataType.isVariable ? new qe(this.writePos) : this.dataType.density.size(this.writePos);
3113
3093
  }
3114
3094
  /**
3115
3095
  * Returns the number of samples in this array.
@@ -3125,7 +3105,7 @@ let Qr = class W {
3125
3105
  let e = 0;
3126
3106
  const r = [0];
3127
3107
  return this.data.forEach((n, s) => {
3128
- n === vt && (e++, r.push(s + 1));
3108
+ n === Ot && (e++, r.push(s + 1));
3129
3109
  }), this._cachedIndexes = r, this.cachedLength = e, e;
3130
3110
  }
3131
3111
  /**
@@ -3141,8 +3121,8 @@ let Qr = class W {
3141
3121
  if (this.dataType.equals(e)) return this;
3142
3122
  const n = new e.Array(this.length);
3143
3123
  for (let s = 0; s < this.length; s++)
3144
- n[s] = ga(this.dataType, e, this.data[s], r);
3145
- return new W({
3124
+ n[s] = ua(this.dataType, e, this.data[s], r);
3125
+ return new V({
3146
3126
  data: n.buffer,
3147
3127
  dataType: e,
3148
3128
  timeRange: this.timeRange,
@@ -3171,7 +3151,7 @@ let Qr = class W {
3171
3151
  calcMax() {
3172
3152
  if (this.dataType.isVariable)
3173
3153
  throw new Error("cannot calculate maximum on a variable length data type");
3174
- return this.writePos === 0 ? -1 / 0 : (this.cachedMax ??= this.calcRawMax(), Le(this.cachedMax, this.sampleOffset));
3154
+ return this.writePos === 0 ? -1 / 0 : (this.cachedMax ??= this.calcRawMax(), je(this.cachedMax, this.sampleOffset));
3175
3155
  }
3176
3156
  calcRawMin() {
3177
3157
  if (this.length === 0) return 1 / 0;
@@ -3192,7 +3172,7 @@ let Qr = class W {
3192
3172
  calcMin() {
3193
3173
  if (this.dataType.isVariable)
3194
3174
  throw new Error("cannot calculate minimum on a variable length data type");
3195
- return this.writePos === 0 ? 1 / 0 : (this.cachedMin ??= this.calcRawMin(), Le(this.cachedMin, this.sampleOffset));
3175
+ return this.writePos === 0 ? 1 / 0 : (this.cachedMin ??= this.calcRawMin(), je(this.cachedMin, this.sampleOffset));
3196
3176
  }
3197
3177
  /** @returns the bounds of the series. */
3198
3178
  get bounds() {
@@ -3225,7 +3205,7 @@ let Qr = class W {
3225
3205
  if (r === !0) throw new Error(`[series] - no value at index ${e}`);
3226
3206
  return;
3227
3207
  }
3228
- return Le(n, this.sampleOffset);
3208
+ return je(n, this.sampleOffset);
3229
3209
  }
3230
3210
  atUUID(e, r) {
3231
3211
  e < 0 && (e = this.length + e);
@@ -3245,7 +3225,7 @@ let Qr = class W {
3245
3225
  else {
3246
3226
  e < 0 && (e = this.length + e);
3247
3227
  for (let o = 0; o < this.data.length; o++)
3248
- if (this.data[o] === vt) {
3228
+ if (this.data[o] === Ot) {
3249
3229
  if (e === 0) {
3250
3230
  s = o;
3251
3231
  break;
@@ -3258,7 +3238,7 @@ let Qr = class W {
3258
3238
  }
3259
3239
  }
3260
3240
  const i = this.data.slice(n, s);
3261
- return this.dataType.equals(S.STRING) ? new TextDecoder().decode(i) : It(JSON.parse(new TextDecoder().decode(i)));
3241
+ return this.dataType.equals(S.STRING) ? new TextDecoder().decode(i) : Nt(JSON.parse(new TextDecoder().decode(i)));
3262
3242
  }
3263
3243
  /**
3264
3244
  * @returns the index of the first sample that is greater than or equal to the given value.
@@ -3267,7 +3247,7 @@ let Qr = class W {
3267
3247
  */
3268
3248
  binarySearch(e) {
3269
3249
  let r = 0, n = this.length - 1;
3270
- const s = We(e);
3250
+ const s = Mt(e);
3271
3251
  for (; r <= n; ) {
3272
3252
  const i = Math.floor((r + n) / 2), o = s(this.at(i, !0), e);
3273
3253
  if (o === 0) return i;
@@ -3299,7 +3279,7 @@ let Qr = class W {
3299
3279
  ), this.gl.prevBuffer = Y;
3300
3280
  }
3301
3281
  as(e) {
3302
- return Jr(e, this.dataType), this;
3282
+ return Vr(e, this.dataType), this;
3303
3283
  }
3304
3284
  /** @returns a digest containing information about the series. */
3305
3285
  get digest() {
@@ -3347,10 +3327,10 @@ let Qr = class W {
3347
3327
  }
3348
3328
  [Symbol.iterator]() {
3349
3329
  if (this.dataType.isVariable) {
3350
- const e = new Aa(this);
3351
- return this.dataType.equals(S.JSON) ? new Ea(e) : e;
3330
+ const e = new Ta(this);
3331
+ return this.dataType.equals(S.JSON) ? new xa(e) : e;
3352
3332
  }
3353
- return this.dataType.equals(S.UUID) ? new Ua(this) : new Ba(this);
3333
+ return this.dataType.equals(S.UUID) ? new Sa(this) : new Na(this);
3354
3334
  }
3355
3335
  /**
3356
3336
  * Returns a slice of the series from start to end.
@@ -3396,7 +3376,7 @@ let Qr = class W {
3396
3376
  subBytes(e, r) {
3397
3377
  if (e >= 0 && (r == null || r >= this.byteLength.valueOf())) return this;
3398
3378
  const n = this.data.subarray(e, r);
3399
- return new W({
3379
+ return new V({
3400
3380
  data: n,
3401
3381
  dataType: this.dataType,
3402
3382
  timeRange: this.timeRange,
@@ -3408,7 +3388,7 @@ let Qr = class W {
3408
3388
  sliceSub(e, r, n) {
3409
3389
  if (r <= 0 && (n == null || n >= this.length)) return this;
3410
3390
  let s;
3411
- return e ? s = this.data.subarray(r, n) : s = this.data.slice(r, n), new W({
3391
+ return e ? s = this.data.subarray(r, n) : s = this.data.slice(r, n), new V({
3412
3392
  data: s,
3413
3393
  dataType: this.dataType,
3414
3394
  timeRange: this.timeRange,
@@ -3423,7 +3403,7 @@ let Qr = class W {
3423
3403
  * @returns A new series with the specified alignment.
3424
3404
  */
3425
3405
  reAlign(e) {
3426
- return new W({
3406
+ return new V({
3427
3407
  data: this.buffer,
3428
3408
  dataType: this.dataType,
3429
3409
  timeRange: Q.ZERO,
@@ -3450,7 +3430,7 @@ let Qr = class W {
3450
3430
  return e += "])", e;
3451
3431
  }
3452
3432
  };
3453
- const Ma = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Qr ? !0 : Hr(t), _r = Qi(Kr, Qr);
3433
+ const va = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Gr ? !0 : Fr(t), Hr = Wi(Wr, Gr);
3454
3434
  let nr = class {
3455
3435
  series;
3456
3436
  end;
@@ -3458,12 +3438,12 @@ let nr = class {
3458
3438
  constructor(e, r, n) {
3459
3439
  this.series = e;
3460
3440
  const s = b(0, e.length + 1);
3461
- this.end = gt(s, n), this.index = gt(s, r);
3441
+ this.end = dt(s, n), this.index = dt(s, r);
3462
3442
  }
3463
3443
  next() {
3464
3444
  return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
3465
3445
  }
3466
- }, Aa = class {
3446
+ }, Ta = class {
3467
3447
  series;
3468
3448
  index;
3469
3449
  decoder;
@@ -3476,11 +3456,11 @@ let nr = class {
3476
3456
  }
3477
3457
  next() {
3478
3458
  const e = this.index, r = this.series.data;
3479
- for (; this.index < r.length && r[this.index] !== vt; ) this.index++;
3459
+ for (; this.index < r.length && r[this.index] !== Ot; ) this.index++;
3480
3460
  const n = this.index;
3481
3461
  return e === n ? { done: !0, value: void 0 } : (this.index++, { done: !1, value: this.decoder.decode(this.series.buffer.slice(e, n)) });
3482
3462
  }
3483
- }, Ea = class en {
3463
+ }, xa = class Xr {
3484
3464
  wrapped;
3485
3465
  static schema = a.record(a.string(), a.unknown());
3486
3466
  constructor(e) {
@@ -3490,10 +3470,10 @@ let nr = class {
3490
3470
  const e = this.wrapped.next();
3491
3471
  return e.done === !0 ? { done: !0, value: void 0 } : {
3492
3472
  done: !1,
3493
- value: ct.decodeString(e.value, en.schema)
3473
+ value: lt.decodeString(e.value, Xr.schema)
3494
3474
  };
3495
3475
  }
3496
- }, Ua = class {
3476
+ }, Sa = class {
3497
3477
  series;
3498
3478
  index;
3499
3479
  data;
@@ -3508,8 +3488,7 @@ let nr = class {
3508
3488
  const e = Xt(this.data, this.index * this.density);
3509
3489
  return this.index++, { done: !1, value: e };
3510
3490
  }
3511
- };
3512
- class Ba {
3491
+ }, Na = class {
3513
3492
  series;
3514
3493
  index;
3515
3494
  constructor(e) {
@@ -3521,8 +3500,8 @@ class Ba {
3521
3500
  value: this.series.at(this.index++, !0)
3522
3501
  };
3523
3502
  }
3524
- }
3525
- class Lu {
3503
+ };
3504
+ class Du {
3526
3505
  /** The array of series in this collection */
3527
3506
  series;
3528
3507
  /**
@@ -3575,7 +3554,7 @@ class Lu {
3575
3554
  this.series = e;
3576
3555
  }
3577
3556
  as(e) {
3578
- return Jr(e, this.dataType), this;
3557
+ return Vr(e, this.dataType), this;
3579
3558
  }
3580
3559
  /**
3581
3560
  * Returns the data type of the series in this collection. If the collection is empty,
@@ -3617,7 +3596,7 @@ class Lu {
3617
3596
  const r = () => new Error(
3618
3597
  `cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`
3619
3598
  ), n = e.dataType.equals(this.dataType);
3620
- if (_r(e)) {
3599
+ if (Hr(e)) {
3621
3600
  if (this.series.length !== 0 && !n) throw r();
3622
3601
  this.series.push(e);
3623
3602
  } else {
@@ -3654,7 +3633,7 @@ class Lu {
3654
3633
  * @returns An iterator over the specified range.
3655
3634
  */
3656
3635
  subIterator(e, r) {
3657
- return new at(this, e, r ?? this.length);
3636
+ return new it(this, e, r ?? this.length);
3658
3637
  }
3659
3638
  /**
3660
3639
  * Returns an iterator over a portion of the multi-series based on alignment.
@@ -3664,7 +3643,7 @@ class Lu {
3664
3643
  */
3665
3644
  subAlignmentIterator(e, r) {
3666
3645
  if (e >= this.alignmentBounds.upper || r <= this.alignmentBounds.lower)
3667
- return Ot;
3646
+ return $t;
3668
3647
  let n = 0;
3669
3648
  for (let i = 0; i < this.series.length; i++) {
3670
3649
  const o = this.series[i];
@@ -3689,7 +3668,7 @@ class Lu {
3689
3668
  break;
3690
3669
  }
3691
3670
  }
3692
- return new at(this, n, s);
3671
+ return new it(this, n, s);
3693
3672
  }
3694
3673
  /**
3695
3674
  * Returns an iterator over the specified alignment range and span.
@@ -3698,7 +3677,7 @@ class Lu {
3698
3677
  * @returns An iterator over the specified range.
3699
3678
  */
3700
3679
  subAlignmentSpanIterator(e, r) {
3701
- if (e >= this.alignmentBounds.upper) return Ot;
3680
+ if (e >= this.alignmentBounds.upper) return $t;
3702
3681
  r = Math.min(r, Number(this.distance(e, this.alignmentBounds.upper)));
3703
3682
  let n = 0;
3704
3683
  for (let s = 0; s < this.series.length; s++) {
@@ -3710,7 +3689,7 @@ class Lu {
3710
3689
  break;
3711
3690
  }
3712
3691
  }
3713
- return new at(this, n, n + r);
3692
+ return new it(this, n, n + r);
3714
3693
  }
3715
3694
  /**
3716
3695
  * Updates the WebGL buffer for all series in the collection.
@@ -3723,13 +3702,13 @@ class Lu {
3723
3702
  * Returns the bounds containing the minimum and maximum values across all series.
3724
3703
  */
3725
3704
  get bounds() {
3726
- return Sr(this.series.map((e) => e.bounds));
3705
+ return $r(this.series.map((e) => e.bounds));
3727
3706
  }
3728
3707
  /**
3729
3708
  * Returns the sum of the byte lengths of all series.
3730
3709
  */
3731
3710
  get byteLength() {
3732
- return new Ze(this.series.reduce((e, r) => e + r.byteLength.valueOf(), 0));
3711
+ return new qe(this.series.reduce((e, r) => e + r.byteLength.valueOf(), 0));
3733
3712
  }
3734
3713
  /**
3735
3714
  * Returns a combined typed array containing all data from all series.
@@ -3750,7 +3729,7 @@ class Lu {
3750
3729
  */
3751
3730
  traverseAlignment(e, r) {
3752
3731
  const n = this.series.map((s) => s.alignmentBounds);
3753
- return Nr(n, e, r);
3732
+ return Or(n, e, r);
3754
3733
  }
3755
3734
  /**
3756
3735
  * Acquires a reference to the WebGL buffer for all series.
@@ -3773,7 +3752,7 @@ class Lu {
3773
3752
  */
3774
3753
  distance(e, r) {
3775
3754
  const n = this.series.map((s) => s.alignmentBounds);
3776
- return Ir(n, e, r);
3755
+ return vr(n, e, r);
3777
3756
  }
3778
3757
  /**
3779
3758
  * Parses a JSON multi-series into an array of values using the provided zod schema.
@@ -3796,7 +3775,7 @@ class Lu {
3796
3775
  next() {
3797
3776
  return { done: !0, value: void 0 };
3798
3777
  }
3799
- } : new ja(this.series);
3778
+ } : new Ia(this.series);
3800
3779
  }
3801
3780
  /**
3802
3781
  * Returns an array of the values in the multi-series as strings.
@@ -3807,7 +3786,7 @@ class Lu {
3807
3786
  return this.series.flatMap((e) => e.toStrings());
3808
3787
  }
3809
3788
  }
3810
- let ja = class {
3789
+ class Ia {
3811
3790
  series;
3812
3791
  seriesIndex;
3813
3792
  internal;
@@ -3821,8 +3800,8 @@ let ja = class {
3821
3800
  [Symbol.iterator]() {
3822
3801
  return this;
3823
3802
  }
3824
- };
3825
- class at {
3803
+ }
3804
+ class it {
3826
3805
  series;
3827
3806
  index;
3828
3807
  end;
@@ -3841,46 +3820,46 @@ const sr = (t) => {
3841
3820
  return { domain: e, sample: r };
3842
3821
  };
3843
3822
  a.object({ key: a.string(), value: a.string() });
3844
- const Ca = a.record(
3823
+ const Ma = a.record(
3845
3824
  a.union([a.number(), a.string(), a.symbol()]),
3846
3825
  a.unknown()
3847
- ), Jt = (t) => Object.entries(t), Ra = (t, e) => Object.fromEntries(Jt(t).map(([r, n]) => [r, e(n, r)])), La = (t) => Object.fromEntries(Jt(t).filter(([e, r]) => r !== void 0)), Da = (t, ...e) => {
3826
+ ), Jt = (t) => Object.entries(t), Aa = (t, e) => Object.fromEntries(Jt(t).map(([r, n]) => [r, e(n, r)])), Ea = (t) => Object.fromEntries(Jt(t).filter(([e, r]) => r !== void 0)), Ua = (t, ...e) => {
3848
3827
  const r = { ...t };
3849
3828
  for (const n of e) delete r[n];
3850
3829
  return r;
3851
3830
  }, Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3852
3831
  __proto__: null,
3853
3832
  entries: Jt,
3854
- map: Ra,
3855
- omit: Da,
3856
- purgeUndefined: La,
3857
- unknownZ: Ca
3858
- }, Symbol.toStringTag, { value: "Module" })), tn = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Pa = tn(), rn = ["macOS", "Windows", "Linux"], ka = ["macos", "windows", "linux"], qa = {
3833
+ map: Aa,
3834
+ omit: Ua,
3835
+ purgeUndefined: Ea,
3836
+ unknownZ: Ma
3837
+ }, Symbol.toStringTag, { value: "Module" })), Jr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Ba = Jr(), Kr = ["macOS", "Windows", "Linux"], Ca = ["macos", "windows", "linux"], ja = {
3859
3838
  macos: "macOS",
3860
3839
  windows: "Windows",
3861
3840
  linux: "Linux"
3862
- }, za = a.enum(rn).or(
3863
- a.enum(ka).transform((t) => qa[t])
3864
- ), Za = () => {
3841
+ }, Ra = a.enum(Kr).or(
3842
+ a.enum(Ca).transform((t) => ja[t])
3843
+ ), La = () => {
3865
3844
  if (typeof window > "u") return;
3866
3845
  const t = window.navigator.userAgent.toLowerCase();
3867
3846
  if (t.includes("mac")) return "macOS";
3868
3847
  if (t.includes("win")) return "Windows";
3869
3848
  if (t.includes("linux")) return "Linux";
3870
3849
  };
3871
- let ot;
3872
- const Fa = ((t = {}) => {
3850
+ let at;
3851
+ const Da = ((t = {}) => {
3873
3852
  const { force: e, default: r } = t;
3874
- return e ?? ot ?? (ot = Za(), ot ?? r);
3853
+ return e ?? at ?? (at = La(), at ?? r);
3875
3854
  }), ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3876
3855
  __proto__: null,
3877
- OPERATING_SYSTEMS: rn,
3878
- RUNTIME: Pa,
3879
- detect: tn,
3880
- getOS: Fa,
3881
- osZ: za
3882
- }, Symbol.toStringTag, { value: "Module" })), Ya = (...t) => t.map(nn).join(""), nn = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), Wa = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3883
- class De {
3856
+ OPERATING_SYSTEMS: Kr,
3857
+ RUNTIME: Ba,
3858
+ detect: Jr,
3859
+ getOS: Da,
3860
+ osZ: Ra
3861
+ }, Symbol.toStringTag, { value: "Module" })), Pa = (...t) => t.map(Qr).join(""), Qr = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), ka = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3862
+ class Re {
3884
3863
  protocol;
3885
3864
  host;
3886
3865
  port;
@@ -3892,7 +3871,7 @@ class De {
3892
3871
  * @param pathPrefix - A path prefix to use for all requests. Defaults to "".
3893
3872
  */
3894
3873
  constructor({ host: e, port: r, protocol: n = "", pathPrefix: s = "" }) {
3895
- this.protocol = n, this.host = e, this.port = r, this.path = nn(s);
3874
+ this.protocol = n, this.host = e, this.port = r, this.path = Qr(s);
3896
3875
  }
3897
3876
  /**
3898
3877
  * Replaces creates a new URL with the specified properties replaced.
@@ -3900,7 +3879,7 @@ class De {
3900
3879
  * @returns a new URL.
3901
3880
  */
3902
3881
  replace(e) {
3903
- return new De({
3882
+ return new Re({
3904
3883
  host: e.host ?? this.host,
3905
3884
  port: e.port ?? this.port,
3906
3885
  protocol: e.protocol ?? this.protocol,
@@ -3913,82 +3892,82 @@ class De {
3913
3892
  * @returns a new URL.
3914
3893
  */
3915
3894
  child(e) {
3916
- return new De({
3895
+ return new Re({
3917
3896
  ...this,
3918
- pathPrefix: Ya(this.path, e)
3897
+ pathPrefix: Pa(this.path, e)
3919
3898
  });
3920
3899
  }
3921
3900
  /** @returns a string representation of the url */
3922
3901
  toString() {
3923
- return Wa(
3902
+ return ka(
3924
3903
  `${this.protocol}://${this.host}:${this.port}/${this.path}`
3925
3904
  );
3926
3905
  }
3927
- static UNKNOWN = new De({ host: "unknown", port: 0 });
3906
+ static UNKNOWN = new Re({ host: "unknown", port: 0 });
3928
3907
  }
3929
- const Tt = 2, xt = 3, sn = 2, Va = (t, e) => {
3908
+ const vt = 2, Tt = 3, _r = 2, qa = (t, e) => {
3930
3909
  if (Number.isNaN(t) || !Number.isFinite(t)) return t;
3931
- const r = le(e);
3910
+ const r = ue(e);
3932
3911
  if (r == 0) return t;
3933
3912
  let n;
3934
- r >= 1e3 ? n = Tt : r >= 1 ? n = xt : n = Math.ceil(-Math.log10(r)) + sn;
3913
+ r >= 1e3 ? n = vt : r >= 1 ? n = Tt : n = Math.ceil(-Math.log10(r)) + _r;
3935
3914
  const s = 10 ** n;
3936
3915
  return Math.round(t * s) / s;
3937
- }, Ga = 5, Ha = 1e-10, Xa = (t, e) => {
3916
+ }, za = 5, Za = 1e-10, Fa = (t, e) => {
3938
3917
  if (Number.isNaN(t) || !Number.isFinite(t)) return t;
3939
3918
  const r = Math.abs(t);
3940
3919
  if (r === 0) return 0;
3941
3920
  let n = !1, s = 0;
3942
3921
  if (e != null) {
3943
- s = le(e);
3922
+ s = ue(e);
3944
3923
  const l = s / r;
3945
- n = s > 0 && l > Ha;
3924
+ n = s > 0 && l > Za;
3946
3925
  }
3947
3926
  if (n) {
3948
3927
  let l;
3949
- s >= 1e3 ? l = Tt : s >= 1 ? l = xt : l = Math.ceil(-Math.log10(s)) + sn;
3928
+ s >= 1e3 ? l = vt : s >= 1 ? l = Tt : l = Math.ceil(-Math.log10(s)) + _r;
3950
3929
  const f = 10 ** l;
3951
3930
  return Math.round(t * f) / f;
3952
3931
  }
3953
3932
  if (r >= 1e3) {
3954
- const l = 10 ** Tt;
3933
+ const l = 10 ** vt;
3955
3934
  return Math.round(t * l) / l;
3956
3935
  }
3957
3936
  if (r >= 1) {
3958
- const l = 10 ** xt;
3937
+ const l = 10 ** Tt;
3959
3938
  return Math.round(t * l) / l;
3960
3939
  }
3961
- const i = Math.floor(Math.log10(r)), o = 10 ** (Ga - i - 1);
3940
+ const i = Math.floor(Math.log10(r)), o = 10 ** (za - i - 1);
3962
3941
  return Math.round(t * o) / o;
3963
3942
  }, qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3964
3943
  __proto__: null,
3965
- MAX_INT16: oa,
3966
- MAX_INT32: la,
3967
- MAX_INT64: ze,
3968
- MAX_INT64_NUMBER: Vr,
3969
- MAX_INT8: ia,
3970
- MAX_UINT16: ea,
3971
- MAX_UINT32: ta,
3972
- MAX_UINT64: ra,
3973
- MAX_UINT64_NUMBER: na,
3974
- MAX_UINT8: _i,
3975
- MIN_INT16: aa,
3976
- MIN_INT32: ua,
3977
- MIN_INT64: ca,
3978
- MIN_INT64_NUMBER: ha,
3979
- MIN_INT8: sa,
3980
- abs: Tr,
3981
- add: ue,
3982
- closeTo: ss,
3944
+ MAX_INT16: ra,
3945
+ MAX_INT32: sa,
3946
+ MAX_INT64: ke,
3947
+ MAX_INT64_NUMBER: zr,
3948
+ MAX_INT8: ea,
3949
+ MAX_UINT16: Xi,
3950
+ MAX_UINT32: Ji,
3951
+ MAX_UINT64: Ki,
3952
+ MAX_UINT64_NUMBER: Qi,
3953
+ MAX_UINT8: Hi,
3954
+ MIN_INT16: ta,
3955
+ MIN_INT32: na,
3956
+ MIN_INT64: ia,
3957
+ MIN_INT64_NUMBER: aa,
3958
+ MIN_INT8: _i,
3959
+ abs: br,
3960
+ add: oe,
3961
+ closeTo: Qn,
3983
3962
  div: Te,
3984
- equal: dt,
3985
- isInteger: ke,
3986
- max: as,
3987
- min: vr,
3963
+ equal: ft,
3964
+ isInteger: De,
3965
+ max: es,
3966
+ min: yr,
3988
3967
  mult: R,
3989
- roundBySpan: Va,
3990
- roundToNearestMagnitude: is,
3991
- smartRound: Xa,
3968
+ roundBySpan: qa,
3969
+ roundToNearestMagnitude: _n,
3970
+ smartRound: Fa,
3992
3971
  sub: Z
3993
3972
  }, Symbol.toStringTag, { value: "Module" }));
3994
3973
  a.object({
@@ -3996,65 +3975,65 @@ a.object({
3996
3975
  maxRetries: a.number().optional(),
3997
3976
  scale: a.number().optional()
3998
3977
  });
3999
- const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.number().min(0).max(255), an = a.number().min(0).max(1), _e = a.tuple([ie, ie, ie, an]), Ka = a.tuple([ie, ie, ie]), Qa = a.object({ rgba255: _e }), _a = a.number().min(0).max(360), eo = a.number().min(0).max(100), to = a.number().min(0).max(100), on = a.tuple([_a, eo, to, an]), et = a.union([Fe, Ka, _e, on, Qa]), tt = et.transform((t) => T(t)), ro = (t) => tt.safeParse(t).success, no = (t) => _e.safeParse(t).success, so = ((t) => {
3978
+ const Ya = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, ze = a.string().regex(Ya), ie = a.number().min(0).max(255), en = a.number().min(0).max(1), Je = a.tuple([ie, ie, ie, en]), Va = a.tuple([ie, ie, ie]), Wa = a.object({ rgba255: Je }), Ga = a.number().min(0).max(360), Ha = a.number().min(0).max(100), Xa = a.number().min(0).max(100), tn = a.tuple([Ga, Ha, Xa, en]), Ke = a.union([ze, Va, Je, tn, Wa]), Qe = Ke.transform((t) => T(t)), Ja = (t) => Qe.safeParse(t).success, Ka = (t) => Je.safeParse(t).success, Qa = ((t) => {
4000
3979
  if (t == null) return;
4001
- const e = tt.safeParse(t);
4002
- if (e.success) return ln(e.data);
3980
+ const e = Qe.safeParse(t);
3981
+ if (e.success) return nn(e.data);
4003
3982
  if (typeof t == "string") return t;
4004
3983
  throw e.error;
4005
3984
  }), T = (t, e = 1) => {
4006
- if (t = et.parse(t), typeof t == "string") return Pe(t, e);
3985
+ if (t = Ke.parse(t), typeof t == "string") return Le(t, e);
4007
3986
  if (Array.isArray(t)) {
4008
3987
  if (t.length < 3 || t.length > 4)
4009
3988
  throw new Error(`Invalid color: [${t.join(", ")}]`);
4010
3989
  return t.length === 3 ? [...t, e] : t;
4011
3990
  }
4012
3991
  return t.rgba255;
4013
- }, un = (t, e) => {
3992
+ }, rn = (t, e) => {
4014
3993
  if (t == null || e == null) return t == e;
4015
3994
  const r = T(t), n = T(e);
4016
3995
  return r.every((s, i) => s === n[i]);
4017
- }, io = ((t) => {
3996
+ }, _a = ((t) => {
4018
3997
  if (t == null) return;
4019
3998
  const [e, r, n, s] = T(t);
4020
3999
  return `#${Me(e)}${Me(r)}${Me(n)}${s === 1 ? "" : Me(s * 255)}`;
4021
- }), ln = (t) => {
4000
+ }), nn = (t) => {
4022
4001
  const [e, r, n, s] = T(t);
4023
4002
  return `rgba(${e}, ${r}, ${n}, ${s})`;
4024
- }, ao = (t) => `rgb(${cn(t)})`, cn = (t) => {
4003
+ }, eo = (t) => `rgb(${sn(t)})`, sn = (t) => {
4025
4004
  const [e, r, n] = T(t);
4026
4005
  return `${e}, ${r}, ${n}`;
4027
- }, oo = (t) => [...Kt(t), ye(t)], Kt = (t) => [
4006
+ }, to = (t) => [...Kt(t), me(t)], Kt = (t) => [
4007
+ de(t) / 255,
4028
4008
  ge(t) / 255,
4029
- pe(t) / 255,
4030
- me(t) / 255
4031
- ], ge = (t) => T(t)[0], pe = (t) => T(t)[1], me = (t) => T(t)[2], ye = (t) => T(t)[3], uo = (t) => un(Qt, t), lo = (t) => wo(T(t)), co = (t, e) => {
4009
+ pe(t) / 255
4010
+ ], de = (t) => T(t)[0], ge = (t) => T(t)[1], pe = (t) => T(t)[2], me = (t) => T(t)[3], ro = (t) => rn(Qt, t), no = (t) => fo(T(t)), so = (t, e) => {
4032
4011
  const [r, n, s] = T(t);
4033
4012
  if (e > 100)
4034
4013
  throw new Error(`Color opacity must be between 0 and 100, got ${e}`);
4035
4014
  return e > 1 && (e /= 100), [r, n, s, e];
4036
- }, Oe = (t) => {
4015
+ }, $e = (t) => {
4037
4016
  const [e, r, n] = Kt(t).map(
4038
4017
  (s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
4039
4018
  );
4040
4019
  return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
4041
- }, ho = (t) => {
4020
+ }, io = (t) => {
4042
4021
  const [e, r, n] = Kt(t);
4043
4022
  return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
4044
- }, St = (t, e) => {
4045
- const r = T(t), n = T(e), s = Oe(r), i = Oe(n);
4023
+ }, xt = (t, e) => {
4024
+ const r = T(t), n = T(e), s = $e(r), i = $e(n);
4046
4025
  return (Math.max(s, i) + 0.5) / (Math.min(s, i) + 0.5);
4047
- }, fo = (t, ...e) => {
4026
+ }, ao = (t, ...e) => {
4048
4027
  if (e.length === 0)
4049
4028
  throw new Error("[Color.pickByContrast] - must provide at least one color");
4050
- const r = T(t), [n] = e.sort((s, i) => St(r, i) - St(r, s));
4029
+ const r = T(t), [n] = e.sort((s, i) => xt(r, i) - xt(r, s));
4051
4030
  return T(n);
4052
- }, go = (t) => Oe(t) < 0.5, po = (t) => Oe(t) > 0.5, Pe = (t, e = 1) => (t = Fe.parse(t), t = mo(t), [
4031
+ }, oo = (t) => $e(t) < 0.5, uo = (t) => $e(t) > 0.5, Le = (t, e = 1) => (t = ze.parse(t), t = lo(t), [
4053
4032
  Ae(t, 0),
4054
4033
  Ae(t, 2),
4055
4034
  Ae(t, 4),
4056
4035
  t.length === 8 ? Ae(t, 6) / 255 : e
4057
- ]), Qt = [0, 0, 0, 0], Me = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ae = (t, e) => parseInt(t.slice(e, e + 2), 16), mo = (t) => t.startsWith("#") ? t.slice(1) : t, ir = {
4036
+ ]), Qt = [0, 0, 0, 0], Me = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ae = (t, e) => parseInt(t.slice(e, e + 2), 16), lo = (t) => t.startsWith("#") ? t.slice(1) : t, ir = {
4058
4037
  black: "#000000",
4059
4038
  white: "#ffffff",
4060
4039
  red: "#ff0000",
@@ -4086,16 +4065,16 @@ const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.n
4086
4065
  khaki: "#f0e68c",
4087
4066
  crimson: "#dc143c",
4088
4067
  transparent: "transparent"
4089
- }, yo = (t) => {
4068
+ }, co = (t) => {
4090
4069
  if (!t) return;
4091
4070
  const e = t.trim().toLowerCase();
4092
4071
  if (!(e === "transparent" || e === "none")) {
4093
4072
  if (e.startsWith("#")) {
4094
4073
  if (e.length === 4) {
4095
4074
  const r = e[1], n = e[2], s = e[3], i = `#${r}${r}${n}${n}${s}${s}`;
4096
- if (Fe.safeParse(i).success) return Pe(i);
4075
+ if (ze.safeParse(i).success) return Le(i);
4097
4076
  }
4098
- return (e.length === 7 || e.length === 9) && Fe.safeParse(e).success ? Pe(e) : void 0;
4077
+ return (e.length === 7 || e.length === 9) && ze.safeParse(e).success ? Le(e) : void 0;
4099
4078
  }
4100
4079
  if (e.startsWith("rgb")) {
4101
4080
  const r = e.match(
@@ -4106,10 +4085,10 @@ const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.n
4106
4085
  return [parseInt(n), parseInt(s), parseInt(i), o ? parseFloat(o) : 1];
4107
4086
  }
4108
4087
  }
4109
- if (ir[e]) return Pe(ir[e]);
4088
+ if (ir[e]) return Le(ir[e]);
4110
4089
  }
4111
- }, bo = (t) => {
4112
- t = on.parse(t);
4090
+ }, ho = (t) => {
4091
+ t = tn.parse(t);
4113
4092
  let [e, r, n] = t;
4114
4093
  const s = t[3];
4115
4094
  e /= 360, r /= 100, n /= 100;
@@ -4118,11 +4097,11 @@ const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.n
4118
4097
  i = o = l = n;
4119
4098
  else {
4120
4099
  const f = n < 0.5 ? n * (1 + r) : n + r - n * r, c = 2 * n - f;
4121
- i = ut(c, f, e + 1 / 3), o = ut(c, f, e), l = ut(c, f, e - 1 / 3);
4100
+ i = ot(c, f, e + 1 / 3), o = ot(c, f, e), l = ot(c, f, e - 1 / 3);
4122
4101
  }
4123
4102
  return [Math.round(i * 255), Math.round(o * 255), Math.round(l * 255), s];
4124
- }, ut = (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t), wo = (t) => {
4125
- t = _e.parse(t);
4103
+ }, ot = (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t), fo = (t) => {
4104
+ t = Je.parse(t);
4126
4105
  let [e, r, n] = t;
4127
4106
  const s = t[3];
4128
4107
  e /= 255, r /= 255, n /= 255;
@@ -4135,12 +4114,12 @@ const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.n
4135
4114
  f = c > 0.5 ? d / (2 - i - o) : d / (i + o), i === e ? l = (r - n) / d + (r < n ? 6 : 0) : i === r ? l = (n - e) / d + 2 : l = (e - r) / d + 4, l /= 6;
4136
4115
  }
4137
4116
  return l *= 360, f *= 100, c *= 100, [Math.round(l), Math.round(f), Math.round(c), s];
4138
- }, $o = T("#000000"), Oo = T("#ffffff"), hn = a.object({
4117
+ }, go = T("#000000"), po = T("#ffffff"), an = a.object({
4139
4118
  key: a.string(),
4140
- color: et,
4119
+ color: Ke,
4141
4120
  position: a.number(),
4142
4121
  switched: a.boolean().optional()
4143
- }), vo = a.array(hn), To = (t, e) => {
4122
+ }), mo = a.array(an), yo = (t, e) => {
4144
4123
  if (t.length === 0) return Qt;
4145
4124
  if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return T(t[0].color);
4146
4125
  if (e >= t[t.length - 1].position)
@@ -4151,150 +4130,150 @@ const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.n
4151
4130
  if (e === n.position) return T(n.color);
4152
4131
  if (e === s.position) return T(s.color);
4153
4132
  const i = (e - n.position) / (s.position - n.position), o = T(n.color), l = T(s.color), f = Math.round(
4154
- ge(o) + i * (ge(l) - ge(o))
4133
+ de(o) + i * (de(l) - de(o))
4155
4134
  ), c = Math.round(
4156
- pe(o) + i * (pe(l) - pe(o))
4135
+ ge(o) + i * (ge(l) - ge(o))
4157
4136
  ), d = Math.round(
4158
- me(o) + i * (me(l) - me(o))
4159
- ), m = ye(o) + i * (ye(l) - ye(o));
4137
+ pe(o) + i * (pe(l) - pe(o))
4138
+ ), m = me(o) + i * (me(l) - me(o));
4160
4139
  return T([f, c, d, m]);
4161
4140
  }
4162
4141
  return T(t[t.length - 1].color);
4163
- }, xo = a.object({
4142
+ }, bo = a.object({
4164
4143
  key: a.string(),
4165
4144
  name: a.string(),
4166
- color: tt
4167
- }), So = a.object({
4145
+ color: Qe
4146
+ }), wo = a.object({
4168
4147
  key: a.string(),
4169
4148
  name: a.string(),
4170
- swatches: a.array(xo)
4171
- }), No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4149
+ swatches: a.array(bo)
4150
+ }), $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4172
4151
  __proto__: null,
4173
- BLACK: $o,
4174
- WHITE: Oo,
4152
+ BLACK: go,
4153
+ WHITE: po,
4175
4154
  ZERO: Qt,
4176
- aValue: ye,
4177
- bValue: me,
4178
- colorZ: tt,
4155
+ aValue: me,
4156
+ bValue: pe,
4157
+ colorZ: Qe,
4179
4158
  construct: T,
4180
- contrast: St,
4181
- crudeZ: et,
4182
- cssString: so,
4183
- equals: un,
4184
- fromCSS: yo,
4185
- fromGradient: To,
4186
- fromHSLA: bo,
4187
- gValue: pe,
4188
- gradientZ: vo,
4189
- grayness: ho,
4190
- hex: io,
4191
- hsla: lo,
4192
- isColor: no,
4193
- isCrude: ro,
4194
- isDark: go,
4195
- isLight: po,
4196
- isZero: uo,
4197
- luminance: Oe,
4198
- paletteZ: So,
4199
- pickByContrast: fo,
4200
- rValue: ge,
4201
- rgbCSS: ao,
4202
- rgbString: cn,
4203
- rgba1: oo,
4204
- rgbaCSS: ln,
4205
- setAlpha: co,
4206
- stopZ: hn
4207
- }, Symbol.toStringTag, { value: "Module" })), fn = a.int().min(0).max(255), dn = 255, gn = 0, Io = {
4208
- lower: gn,
4209
- upper: dn + 1
4210
- }, pn = a.object({
4159
+ contrast: xt,
4160
+ crudeZ: Ke,
4161
+ cssString: Qa,
4162
+ equals: rn,
4163
+ fromCSS: co,
4164
+ fromGradient: yo,
4165
+ fromHSLA: ho,
4166
+ gValue: ge,
4167
+ gradientZ: mo,
4168
+ grayness: io,
4169
+ hex: _a,
4170
+ hsla: no,
4171
+ isColor: Ka,
4172
+ isCrude: Ja,
4173
+ isDark: oo,
4174
+ isLight: uo,
4175
+ isZero: ro,
4176
+ luminance: $e,
4177
+ paletteZ: wo,
4178
+ pickByContrast: ao,
4179
+ rValue: de,
4180
+ rgbCSS: eo,
4181
+ rgbString: sn,
4182
+ rgba1: to,
4183
+ rgbaCSS: nn,
4184
+ setAlpha: so,
4185
+ stopZ: an
4186
+ }, Symbol.toStringTag, { value: "Module" })), on = a.int().min(0).max(255), un = 255, ln = 0, Oo = {
4187
+ lower: ln,
4188
+ upper: un + 1
4189
+ }, cn = a.object({
4211
4190
  name: a.string(),
4212
4191
  key: a.string()
4213
- }), ve = (t) => a.object({
4214
- subject: pn,
4192
+ }), Oe = (t) => a.object({
4193
+ subject: cn,
4215
4194
  resource: t,
4216
- authority: fn
4217
- }), Mo = (...t) => (e) => e.filter((r) => {
4195
+ authority: on
4196
+ }), vo = (...t) => (e) => e.filter((r) => {
4218
4197
  let n = !1;
4219
4198
  return r.to != null && (n = t.includes(r.to.resource)), r.from != null && !n && (n = t.includes(r.from.resource)), n;
4220
- }), mn = (t) => a.object({
4221
- from: ve(t),
4199
+ }), hn = (t) => a.object({
4200
+ from: Oe(t),
4222
4201
  to: a.null()
4223
- }), yn = (t) => a.object({
4202
+ }), fn = (t) => a.object({
4224
4203
  from: a.null(),
4225
- to: ve(t)
4226
- }), Ao = (t) => a.union([
4227
- mn(t),
4228
- yn(t),
4204
+ to: Oe(t)
4205
+ }), To = (t) => a.union([
4206
+ hn(t),
4207
+ fn(t),
4229
4208
  a.object({
4230
- from: ve(t),
4231
- to: ve(t)
4209
+ from: Oe(t),
4210
+ to: Oe(t)
4232
4211
  })
4233
4212
  ]), zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4234
4213
  __proto__: null,
4235
- ABSOLUTE_AUTHORITY: dn,
4236
- AUTHORITY_BOUNDS: Io,
4237
- ZERO_AUTHORITY: gn,
4238
- acquireZ: yn,
4239
- authorityZ: fn,
4240
- filterTransfersByChannelKey: Mo,
4241
- releaseZ: mn,
4242
- stateZ: ve,
4243
- subjectZ: pn,
4244
- transferZ: Ao
4245
- }, Symbol.toStringTag, { value: "Module" })), Eo = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Uo = (t, e) => {
4214
+ ABSOLUTE_AUTHORITY: un,
4215
+ AUTHORITY_BOUNDS: Oo,
4216
+ ZERO_AUTHORITY: ln,
4217
+ acquireZ: fn,
4218
+ authorityZ: on,
4219
+ filterTransfersByChannelKey: vo,
4220
+ releaseZ: hn,
4221
+ stateZ: Oe,
4222
+ subjectZ: cn,
4223
+ transferZ: To
4224
+ }, Symbol.toStringTag, { value: "Module" })), xo = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), So = (t, e) => {
4246
4225
  const r = Symbol.for(t);
4247
- if (!Eo(r)) {
4226
+ if (!xo(r)) {
4248
4227
  const n = e();
4249
4228
  Object.defineProperty(globalThis, r, { value: n });
4250
4229
  }
4251
4230
  return () => globalThis[r];
4252
- }, bn = "sy_x_error", Bo = (t) => (e) => e != null && typeof e == "object" && "type" in e && typeof e.type == "string" ? e.type.startsWith(t) : e instanceof Error ? e.message.startsWith(t) : typeof e != "string" ? !1 : e.startsWith(t), wn = (t) => class de extends Error {
4253
- static discriminator = bn;
4254
- discriminator = de.discriminator;
4231
+ }, dn = "sy_x_error", No = (t) => (e) => e != null && typeof e == "object" && "type" in e && typeof e.type == "string" ? e.type.startsWith(t) : e instanceof Error ? e.message.startsWith(t) : typeof e != "string" ? !1 : e.startsWith(t), gn = (t) => class fe extends Error {
4232
+ static discriminator = dn;
4233
+ discriminator = fe.discriminator;
4255
4234
  static TYPE = t;
4256
- type = de.TYPE;
4257
- static matches = Bo(t);
4258
- matches = de.matches;
4235
+ type = fe.TYPE;
4236
+ static matches = No(t);
4237
+ matches = fe.matches;
4259
4238
  constructor(r, n) {
4260
- super(r, n), this.name = de.TYPE;
4239
+ super(r, n), this.name = fe.TYPE;
4261
4240
  }
4262
4241
  static sub(r) {
4263
- return wn(`${t}.${r}`);
4242
+ return gn(`${t}.${r}`);
4264
4243
  }
4265
- }, jo = (t) => {
4244
+ }, Io = (t) => {
4266
4245
  if (t == null || typeof t != "object") return !1;
4267
4246
  const e = t;
4268
- if (e.discriminator !== bn) return !1;
4247
+ if (e.discriminator !== dn) return !1;
4269
4248
  if (!("type" in e))
4270
4249
  throw new Error(
4271
4250
  `X Error is missing its type property: ${JSON.stringify(e)}`
4272
4251
  );
4273
4252
  return !0;
4274
- }, ce = "unknown", ar = "nil";
4275
- class Co {
4253
+ }, le = "unknown", ar = "nil";
4254
+ class Mo {
4276
4255
  providers = [];
4277
4256
  register(e) {
4278
4257
  this.providers.push(e);
4279
4258
  }
4280
4259
  encode(e) {
4281
4260
  if (e == null) return { type: ar, data: "" };
4282
- if (jo(e))
4261
+ if (Io(e))
4283
4262
  for (const r of this.providers) {
4284
4263
  const n = r.encode(e);
4285
4264
  if (n != null) return n;
4286
4265
  }
4287
- if (e instanceof Error) return { type: ce, data: e.message };
4288
- if (typeof e == "string") return { type: ce, data: e };
4266
+ if (e instanceof Error) return { type: le, data: e.message };
4267
+ if (typeof e == "string") return { type: le, data: e };
4289
4268
  try {
4290
- return { type: ce, data: JSON.stringify(e) };
4269
+ return { type: le, data: JSON.stringify(e) };
4291
4270
  } catch {
4292
- return { type: ce, data: "unable to encode error information" };
4271
+ return { type: le, data: "unable to encode error information" };
4293
4272
  }
4294
4273
  }
4295
4274
  decode(e) {
4296
4275
  if (e == null || e.type === ar) return null;
4297
- if (e.type === ce) return new or(e.data);
4276
+ if (e.type === le) return new or(e.data);
4298
4277
  for (const r of this.providers) {
4299
4278
  const n = r.decode(e);
4300
4279
  if (n != null) return n;
@@ -4302,11 +4281,11 @@ class Co {
4302
4281
  return new or(e.data);
4303
4282
  }
4304
4283
  }
4305
- Uo("synnax-error-registry", () => new Co());
4306
- class or extends wn("unknown") {
4284
+ So("synnax-error-registry", () => new Mo());
4285
+ class or extends gn("unknown") {
4307
4286
  }
4308
4287
  a.object({ type: a.string(), data: a.string() });
4309
- const Zu = () => new Promise((t) => setTimeout(t, 0)), Ro = O.object({
4288
+ const Zu = () => new Promise((t) => setTimeout(t, 0)), Ao = O.object({
4310
4289
  jsonrpc: O.literal("2.0"),
4311
4290
  method: O.string(),
4312
4291
  // params should be z.union([z.record(z.string(), z.json()),
@@ -4314,12 +4293,12 @@ const Zu = () => new Promise((t) => setTimeout(t, 0)), Ro = O.object({
4314
4293
  // definition of params then in the JSON-RPC spec.
4315
4294
  params: O.any().optional(),
4316
4295
  id: O.union([O.string(), O.number(), O.null()]).optional()
4317
- }), $n = O.object({
4296
+ }), pn = O.object({
4318
4297
  jsonrpc: O.literal("2.0"),
4319
4298
  id: O.union([O.string(), O.number(), O.null()])
4320
- }), Lo = $n.extend({
4299
+ }), Eo = pn.extend({
4321
4300
  result: O.json()
4322
- }), Do = $n.extend({
4301
+ }), Uo = pn.extend({
4323
4302
  error: O.object({
4324
4303
  code: O.number().int(),
4325
4304
  // This should be z.string(), but the VSCode JSON RPC implementation uses a looser
@@ -4327,35 +4306,35 @@ const Zu = () => new Promise((t) => setTimeout(t, 0)), Ro = O.object({
4327
4306
  message: O.string().optional(),
4328
4307
  data: O.json().optional()
4329
4308
  })
4330
- }), Po = O.union([Lo, Do]);
4331
- O.union([Ro, Po]);
4332
- const ko = O.uuid(), qo = O.object({
4333
- key: ko,
4309
+ }), Bo = O.union([Eo, Uo]);
4310
+ O.union([Ao, Bo]);
4311
+ const Co = O.uuid(), jo = O.object({
4312
+ key: Co,
4334
4313
  name: O.string().min(1),
4335
4314
  color: O.string()
4336
- }), zo = (t, e, r) => {
4315
+ }), Ro = (t, e, r) => {
4337
4316
  const n = t.get(e);
4338
4317
  return n === void 0 ? (t.set(e, r), r) : n;
4339
4318
  }, Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4340
4319
  __proto__: null,
4341
- getOrSetDefault: zo
4342
- }, Symbol.toStringTag, { value: "Module" })), Nt = a.string().regex(/^\d+\.\d+\.\d+$/), Se = ((t, e, r = {}) => {
4320
+ getOrSetDefault: Ro
4321
+ }, Symbol.toStringTag, { value: "Module" })), St = a.string().regex(/^\d+\.\d+\.\d+$/), Se = ((t, e, r = {}) => {
4343
4322
  r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
4344
- const n = Nt.parse(t), s = Nt.parse(e), [i, o, l] = n.split(".").map(Number), [f, c, d] = s.split(".").map(Number);
4323
+ const n = St.parse(t), s = St.parse(e), [i, o, l] = n.split(".").map(Number), [f, c, d] = s.split(".").map(Number);
4345
4324
  if (r.checkMajor) {
4346
- if (i < f) return Ue;
4347
- if (i > f) return Be;
4325
+ if (i < f) return et;
4326
+ if (i > f) return tt;
4348
4327
  }
4349
4328
  if (r.checkMinor) {
4350
- if (o < c) return Ue;
4351
- if (o > c) return Be;
4329
+ if (o < c) return et;
4330
+ if (o > c) return tt;
4352
4331
  }
4353
4332
  if (r.checkPatch) {
4354
- if (l < d) return Ue;
4355
- if (l > d) return Be;
4333
+ if (l < d) return et;
4334
+ if (l > d) return tt;
4356
4335
  }
4357
- return ae;
4358
- }), Zo = (t, e, r = {}) => wr(Se(t, e, r)), On = (t, e, r = {}) => br(Se(t, e, r)), Fo = (t, e, r = {}) => yr(Se(t, e, r)), Yo = ({
4336
+ return ve;
4337
+ }), Lo = (t, e, r = {}) => zn(Se(t, e, r)), mn = (t, e, r = {}) => qn(Se(t, e, r)), Do = (t, e, r = {}) => kn(Se(t, e, r)), Po = ({
4359
4338
  name: t,
4360
4339
  migrate: e
4361
4340
  }) => (r) => {
@@ -4365,7 +4344,7 @@ const ko = O.uuid(), qo = O.object({
4365
4344
  } catch (n) {
4366
4345
  throw console.log(`${t} failed to migrate from ${r.version}`), console.error(n), n;
4367
4346
  }
4368
- }, Wo = ({
4347
+ }, ko = ({
4369
4348
  name: t,
4370
4349
  migrations: e,
4371
4350
  targetSchema: r,
@@ -4391,7 +4370,7 @@ const ko = O.uuid(), qo = O.object({
4391
4370
  let l = !1;
4392
4371
  const f = (c) => {
4393
4372
  try {
4394
- if (o === 0 || On(c.version, i))
4373
+ if (o === 0 || mn(c.version, i))
4395
4374
  return console.log(l ? `${t} ${c.version} now up to date` : `${t} version ${c.version} is up to date with target version ${s.version}`), c;
4396
4375
  const d = c.version, m = e[d], p = m(c);
4397
4376
  return l = !0, f(p);
@@ -4420,13 +4399,13 @@ const ko = O.uuid(), qo = O.object({
4420
4399
  }, Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4421
4400
  __proto__: null,
4422
4401
  compareSemVer: Se,
4423
- createMigration: Yo,
4424
- migrator: Wo,
4425
- semVerNewer: On,
4426
- semVerOlder: Fo,
4427
- semVerZ: Nt,
4428
- versionsEqual: Zo
4429
- }, Symbol.toStringTag, { value: "Module" })), vn = ["standard", "scientific", "engineering"], Vo = a.enum(vn), Go = (t, e, r) => {
4402
+ createMigration: Po,
4403
+ migrator: ko,
4404
+ semVerNewer: mn,
4405
+ semVerOlder: Do,
4406
+ semVerZ: St,
4407
+ versionsEqual: Lo
4408
+ }, Symbol.toStringTag, { value: "Module" })), yn = ["standard", "scientific", "engineering"], qo = a.enum(yn), zo = (t, e, r) => {
4430
4409
  if (Number.isNaN(t)) return "NaN";
4431
4410
  if (t === 1 / 0) return "∞";
4432
4411
  if (t === -1 / 0) return "-∞";
@@ -4435,63 +4414,71 @@ const ko = O.uuid(), qo = O.object({
4435
4414
  return e === 0 ? "0ᴇ0" : `0.${"0".repeat(e)}ᴇ0`;
4436
4415
  let n;
4437
4416
  return r === "scientific" ? n = Math.floor(Math.log10(Math.abs(t))) : n = Math.floor(Math.log10(Math.abs(t)) / 3) * 3, `${(t / 10 ** n).toFixed(e)}ᴇ${n}`;
4438
- }, Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4417
+ }, Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4439
4418
  __proto__: null,
4440
- NOTATIONS: vn,
4441
- notationZ: Vo,
4442
- stringifyNumber: Go
4443
- }, Symbol.toStringTag, { value: "Module" })), Vu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, Tn = a.enum([
4419
+ NOTATIONS: yn,
4420
+ notationZ: qo,
4421
+ stringifyNumber: zo
4422
+ }, Symbol.toStringTag, { value: "Module" })), Wu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, bn = a.enum([
4444
4423
  "success",
4445
4424
  "info",
4446
4425
  "warning",
4447
4426
  "error",
4448
4427
  "loading",
4449
4428
  "disabled"
4450
- ]), Ho = (t) => a.object({
4429
+ ]), Zo = (t) => a.object({
4451
4430
  key: a.string(),
4452
4431
  name: a.string().default(""),
4453
- variant: Tn,
4432
+ variant: bn,
4454
4433
  message: a.string(),
4455
4434
  description: a.string().optional(),
4456
4435
  time: $.z,
4457
- labels: lr(qo).optional(),
4436
+ labels: lr(jo).optional(),
4458
4437
  details: t ?? a.unknown().optional()
4459
- }), Xo = a.object({
4438
+ }), Fo = a.object({
4460
4439
  stack: a.string(),
4461
4440
  error: a.instanceof(Error)
4462
- }), Jo = (t, e) => {
4441
+ }), Yo = (t, e) => {
4463
4442
  if (!(t instanceof Error)) throw t;
4464
- return xn({
4443
+ return wn({
4465
4444
  variant: "error",
4466
4445
  message: e ?? t.message,
4467
4446
  description: e != null ? t.message : void 0,
4468
4447
  details: { stack: t.stack ?? "", error: t }
4469
4448
  });
4470
- }, xn = (t) => ({
4449
+ }, wn = (t) => ({
4471
4450
  key: Ht(),
4472
4451
  time: $.now(),
4473
4452
  name: "",
4474
4453
  ...t
4475
- }), Ko = (t, e = []) => {
4454
+ }), Vo = (t, e = []) => {
4476
4455
  if (t != null)
4477
4456
  return Array.isArray(e) ? e.includes(t) ? t : void 0 : e === t ? t : void 0;
4478
- }, Qo = (t, e = []) => {
4457
+ }, Wo = (t, e = []) => {
4479
4458
  if (t != null)
4480
4459
  return Array.isArray(e) ? e.includes(t) ? void 0 : t : e === t ? void 0 : t;
4481
4460
  }, Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4482
4461
  __proto__: null,
4483
- create: xn,
4484
- exceptionDetailsSchema: Xo,
4485
- fromException: Jo,
4486
- keepVariants: Ko,
4487
- removeVariants: Qo,
4488
- statusZ: Ho,
4489
- variantZ: Tn
4490
- }, Symbol.toStringTag, { value: "Module" })), _o = (t, e = "") => {
4462
+ create: wn,
4463
+ exceptionDetailsSchema: Fo,
4464
+ fromException: Yo,
4465
+ keepVariants: Vo,
4466
+ removeVariants: Wo,
4467
+ statusZ: Zo,
4468
+ variantZ: bn
4469
+ }, Symbol.toStringTag, { value: "Module" })), Go = (t, e) => {
4470
+ if (!e.has(t)) return t;
4471
+ let r = t, n = 1, s = t;
4472
+ for (; e.has(s); ) {
4473
+ const i = s.match(Ho);
4474
+ i ? (r = s.slice(0, i.index).trim(), n = parseInt(i[1]) + 1) : (r = s, n = 1), s = `${r} (${n})`;
4475
+ }
4476
+ return s;
4477
+ }, Ho = /\((\d+)\)$/, Xo = (t, e = "") => {
4491
4478
  if (typeof t == "string") return t;
4492
4479
  const r = t.length;
4493
4480
  return r === 0 ? e : r === 1 ? t[0] : r === 2 ? `${t[0]} and ${t[1]}` : `${t.slice(0, -1).join(", ")}, and ${t[r - 1]}`;
4494
- }, eu = (t) => {
4481
+ }, Jo = (t) => {
4495
4482
  const e = t.split(" "), r = /* @__PURE__ */ new Set(), n = e.map((o) => o.charAt(0).toLowerCase()).join("");
4496
4483
  r.add(n.replace(/-/g, "_")), r.add(n.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
4497
4484
  const s = /\d+/g;
@@ -4509,14 +4496,14 @@ const ko = O.uuid(), qo = O.object({
4509
4496
  return r.add(i.join("").replace(/-/g, "_")), r.add(i.join("_").replace(/-/g, "_")), Array.from(r).filter(
4510
4497
  (o) => o.length >= 2 && o.length <= 12 && !/^\d/.test(o)
4511
4498
  );
4512
- }, tu = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, ru = (t) => t.length === 0 ? t : t[t.length - 1] === "y" ? `${t.slice(0, -1)}ies` : t[t.length - 1] === "s" || t[t.length - 1] === "x" || t[t.length - 1] === "z" || t.endsWith("ch") || t.endsWith("sh") ? `${t}es` : `${t}s`, Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4499
+ }, Ko = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4513
4500
  __proto__: null,
4514
- createShortIdentifiers: eu,
4515
- naturalLanguageJoin: _o,
4516
- pluralName: ru,
4517
- trimPrefix: tu
4518
- }, Symbol.toStringTag, { value: "Module" })), nu = new Error("request for lock canceled");
4519
- var su = function(t, e, r, n) {
4501
+ createShortIdentifiers: Jo,
4502
+ deduplicateFileName: Go,
4503
+ naturalLanguageJoin: Xo,
4504
+ trimPrefix: Ko
4505
+ }, Symbol.toStringTag, { value: "Module" })), Qo = new Error("request for lock canceled");
4506
+ var _o = function(t, e, r, n) {
4520
4507
  function s(i) {
4521
4508
  return i instanceof r ? i : new r(function(o) {
4522
4509
  o(i);
@@ -4543,20 +4530,20 @@ var su = function(t, e, r, n) {
4543
4530
  c((n = n.apply(t, e || [])).next());
4544
4531
  });
4545
4532
  };
4546
- class iu {
4547
- constructor(e, r = nu) {
4533
+ class eu {
4534
+ constructor(e, r = Qo) {
4548
4535
  this._value = e, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
4549
4536
  }
4550
4537
  acquire(e = 1, r = 0) {
4551
4538
  if (e <= 0)
4552
4539
  throw new Error(`invalid weight ${e}: must be positive`);
4553
4540
  return new Promise((n, s) => {
4554
- const i = { resolve: n, reject: s, weight: e, priority: r }, o = Sn(this._queue, (l) => r <= l.priority);
4541
+ const i = { resolve: n, reject: s, weight: e, priority: r }, o = $n(this._queue, (l) => r <= l.priority);
4555
4542
  o === -1 && e <= this._value ? this._dispatchItem(i) : this._queue.splice(o + 1, 0, i);
4556
4543
  });
4557
4544
  }
4558
4545
  runExclusive(e) {
4559
- return su(this, arguments, void 0, function* (r, n = 1, s = 0) {
4546
+ return _o(this, arguments, void 0, function* (r, n = 1, s = 0) {
4560
4547
  const [i, o] = yield this.acquire(n, s);
4561
4548
  try {
4562
4549
  return yield r(i);
@@ -4569,7 +4556,7 @@ class iu {
4569
4556
  if (e <= 0)
4570
4557
  throw new Error(`invalid weight ${e}: must be positive`);
4571
4558
  return this._couldLockImmediately(e, r) ? Promise.resolve() : new Promise((n) => {
4572
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), au(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4559
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), tu(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4573
4560
  });
4574
4561
  }
4575
4562
  isLocked() {
@@ -4624,17 +4611,17 @@ class iu {
4624
4611
  return (this._queue.length === 0 || this._queue[0].priority < r) && e <= this._value;
4625
4612
  }
4626
4613
  }
4627
- function au(t, e) {
4628
- const r = Sn(t, (n) => e.priority <= n.priority);
4614
+ function tu(t, e) {
4615
+ const r = $n(t, (n) => e.priority <= n.priority);
4629
4616
  t.splice(r + 1, 0, e);
4630
4617
  }
4631
- function Sn(t, e) {
4618
+ function $n(t, e) {
4632
4619
  for (let r = t.length - 1; r >= 0; r--)
4633
4620
  if (e(t[r]))
4634
4621
  return r;
4635
4622
  return -1;
4636
4623
  }
4637
- var ou = function(t, e, r, n) {
4624
+ var ru = function(t, e, r, n) {
4638
4625
  function s(i) {
4639
4626
  return i instanceof r ? i : new r(function(o) {
4640
4627
  o(i);
@@ -4661,12 +4648,12 @@ var ou = function(t, e, r, n) {
4661
4648
  c((n = n.apply(t, e || [])).next());
4662
4649
  });
4663
4650
  };
4664
- class uu {
4651
+ class nu {
4665
4652
  constructor(e) {
4666
- this._semaphore = new iu(1, e);
4653
+ this._semaphore = new eu(1, e);
4667
4654
  }
4668
4655
  acquire() {
4669
- return ou(this, arguments, void 0, function* (e = 0) {
4656
+ return ru(this, arguments, void 0, function* (e = 0) {
4670
4657
  const [, r] = yield this._semaphore.acquire(1, e);
4671
4658
  return r;
4672
4659
  });
@@ -4687,34 +4674,34 @@ class uu {
4687
4674
  return this._semaphore.cancel();
4688
4675
  }
4689
4676
  }
4690
- class Nn extends uu {
4677
+ class On extends nu {
4691
4678
  constructor(e) {
4692
4679
  super(), Object.assign(this, e);
4693
4680
  }
4694
4681
  }
4695
- const lu = (t) => new Nn(t), Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4682
+ const su = (t) => new On(t), Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4696
4683
  __proto__: null,
4697
- mutex: Nn,
4698
- newMutex: lu
4684
+ mutex: On,
4685
+ newMutex: su
4699
4686
  }, Symbol.toStringTag, { value: "Module" }));
4700
- function In(t) {
4687
+ function vn(t) {
4701
4688
  var e, r, n = "";
4702
4689
  if (typeof t == "string" || typeof t == "number") n += t;
4703
4690
  else if (typeof t == "object") if (Array.isArray(t)) {
4704
4691
  var s = t.length;
4705
- for (e = 0; e < s; e++) t[e] && (r = In(t[e])) && (n && (n += " "), n += r);
4692
+ for (e = 0; e < s; e++) t[e] && (r = vn(t[e])) && (n && (n += " "), n += r);
4706
4693
  } else for (r in t) t[r] && (n && (n += " "), n += r);
4707
4694
  return n;
4708
4695
  }
4709
- function cu() {
4710
- for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = In(t)) && (n && (n += " "), n += e);
4696
+ function iu() {
4697
+ for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = vn(t)) && (n && (n += " "), n += e);
4711
4698
  return n;
4712
4699
  }
4713
- const hu = cu, ne = "-", ur = "__", Ee = "--", fu = (t) => {
4714
- const e = (...r) => hu(...r);
4700
+ const au = iu, ne = "-", ur = "__", Ee = "--", ou = (t) => {
4701
+ const e = (...r) => au(...r);
4715
4702
  return e.B = (...r) => t + ne + r.join(ne), e.E = (r) => t + ur + r, e.M = (...r) => t + Ee + r.join("-"), e.BM = (r, ...n) => e.B(r) + Ee + n.join("-"), e.BE = (r, ...n) => e.B(r) + ur + n.join(ne), e.BEM = (r, n, ...s) => e.BE(r, n) + Ee + s.join(ne), e.var = (...r) => Ee + t + ne + r.join(ne), e;
4716
4703
  };
4717
- class du {
4704
+ class uu {
4718
4705
  rows = [];
4719
4706
  columns = [];
4720
4707
  prefix;
@@ -4743,57 +4730,71 @@ class du {
4743
4730
  };
4744
4731
  }
4745
4732
  }
4746
- const gu = (t, e) => Object.entries(e).forEach(
4733
+ const lu = (t, e) => Object.entries(e).forEach(
4747
4734
  ([r, n]) => n != null && t.style.setProperty(r, `${n}`)
4748
- ), pu = (t, e) => Array.from(t.style).forEach((r) => {
4735
+ ), cu = (t, e) => Array.from(t.style).forEach((r) => {
4749
4736
  r.startsWith(e) && t.style.removeProperty(r);
4750
- }), mu = (t) => {
4751
- const e = fu(t);
4752
- return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", Zs.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", Is.construct(r)), e.sharp = (r) => r !== !1 && e.M("sharp"), e.rounded = (r) => r !== !1 && e.M("rounded"), e.bordered = (r) => typeof r == "boolean" ? r && e.M("bordered") : r != null ? e.M(`bordered-${r.toString()}`) : e.M("bordered"), e.selected = (r) => r && e.M("selected"), e.altColor = (r) => r && e.M("alt-color"), e.editable = (r) => r && e.M("editable"), e.noSelect = e.M("no-select"), e.applyVars = gu, e.removeVars = pu, e.newGridBuilder = (r) => new du(r), e.dropRegion = (r) => r && e.B("haul-drop-region"), e.px = (r) => `${r}px`, e.inheritDims = (r = !0) => r && e.M("inherit-dims"), e.shade = ((r) => r != null && e.M(`shade-${r}`)), e.colorVar = (r) => {
4737
+ }), hu = (t) => {
4738
+ const e = ou(t);
4739
+ return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", Ls.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", Os.construct(r)), e.sharp = (r) => r !== !1 && e.M("sharp"), e.rounded = (r) => r !== !1 && e.M("rounded"), e.bordered = (r) => typeof r == "boolean" ? r && e.M("bordered") : r != null ? e.M(`bordered-${r.toString()}`) : e.M("bordered"), e.selected = (r) => r && e.M("selected"), e.altColor = (r) => r && e.M("alt-color"), e.editable = (r) => r && e.M("editable"), e.noSelect = e.M("no-select"), e.applyVars = lu, e.removeVars = cu, e.newGridBuilder = (r) => new uu(r), e.dropRegion = (r) => r && e.B("haul-drop-region"), e.px = (r) => `${r}px`, e.inheritDims = (r = !0) => r && e.M("inherit-dims"), e.shade = ((r) => r != null && e.M(`shade-${r}`)), e.colorVar = (r) => {
4753
4740
  if (!(r == null || r === !1))
4754
- return typeof r == "number" ? `var(--${t}-gray-l${r})` : No.cssString(r);
4741
+ return typeof r == "number" ? `var(--${t}-gray-l${r})` : $o.cssString(r);
4755
4742
  }, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e.level = (r) => e.M(`level-${r}`), e;
4756
- }, Ju = mu("pluto");
4743
+ }, Ju = hu("pluto");
4757
4744
  export {
4758
- qu as A,
4759
- Yu as B,
4745
+ Bu as $,
4746
+ wu as A,
4747
+ qe as B,
4760
4748
  Ju as C,
4761
4749
  Eu as D,
4762
- Wu as F,
4763
- Hu as G,
4764
- Vu as H,
4765
- Xu as J,
4766
- Zs as K,
4767
- Lu as O,
4750
+ $u as E,
4751
+ Tu as F,
4752
+ Vu as G,
4753
+ Su as H,
4754
+ Xu as I,
4755
+ Ci as J,
4756
+ Ls as K,
4757
+ $o as L,
4758
+ Hu as M,
4759
+ zu as N,
4760
+ Du as O,
4761
+ et as P,
4768
4762
  Nu as Q,
4769
- No as R,
4763
+ qu as R,
4770
4764
  ku as S,
4771
- Zu as U,
4772
- Gu as X,
4773
- zu as Z,
4774
- Mu as _,
4775
- bu as a,
4776
- Au as b,
4777
- Ou as c,
4778
- Su as d,
4779
- h as e,
4780
- Tu as f,
4781
- S as g,
4782
- Uu as h,
4783
- Ze as i,
4765
+ Ou as T,
4766
+ gu as U,
4767
+ Zu as V,
4768
+ iu as W,
4769
+ Fu as X,
4770
+ Gu as Y,
4771
+ Yu as Z,
4772
+ vu as _,
4773
+ Dn as a,
4774
+ M as a0,
4775
+ qn as b,
4776
+ mu as c,
4777
+ Pn as d,
4778
+ zn as e,
4779
+ Mt as f,
4780
+ ve as g,
4781
+ du as h,
4782
+ Au as i,
4784
4783
  Iu as j,
4785
4784
  xu as k,
4786
- ki as l,
4787
- Q as m,
4788
- fu as n,
4789
- cu as o,
4790
- Is as p,
4791
- Pu as q,
4792
- $ as r,
4793
- wu as s,
4794
- Fu as t,
4795
- Bu as u,
4796
- st as v,
4797
- M as w,
4798
- Qr as x
4785
+ Pu as l,
4786
+ h as m,
4787
+ ou as n,
4788
+ Mu as o,
4789
+ Os as p,
4790
+ tt as q,
4791
+ Wu as r,
4792
+ $ as s,
4793
+ Q as t,
4794
+ S as u,
4795
+ Uu as v,
4796
+ kn as w,
4797
+ nt as x,
4798
+ bu as y,
4799
+ Gr as z
4799
4800
  };