@synnaxlabs/pluto 0.45.1 → 0.46.1

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 (634) hide show
  1. package/dist/{Toggle-DY4PmA0_.cjs → Toggle-D7uuc8BY.cjs} +1 -1
  2. package/dist/{Toggle-CzRMXK-K.js → Toggle-Djy3iEFS.js} +2 -2
  3. package/dist/{Video-CgaO8bTm.cjs → Video-BgaQjOlJ.cjs} +1 -1
  4. package/dist/{Video-B4UWip-3.js → Video-Com7iIjJ.js} +2 -2
  5. package/dist/button.cjs +1 -1
  6. package/dist/button.js +1 -1
  7. package/dist/color.cjs +1 -1
  8. package/dist/color.js +1 -1
  9. package/dist/css-DA2F4zE4.cjs +8 -0
  10. package/dist/{css-BUXMI9PB.js → css-qKD7ZG81.js} +1450 -1285
  11. package/dist/css.cjs +1 -1
  12. package/dist/css.js +2 -2
  13. package/dist/dialog.cjs +1 -1
  14. package/dist/dialog.js +1 -1
  15. package/dist/ether.cjs +1 -1
  16. package/dist/ether.js +72 -69
  17. package/dist/{external-S6GiiOBy.cjs → external-BH7AW9vg.cjs} +1 -1
  18. package/dist/{external-Du8Z1FRh.js → external-BXAiwKcS.js} +62 -62
  19. package/dist/external-B_BNwXoG.js +89 -0
  20. package/dist/external-BaO1j7U1.cjs +1 -0
  21. package/dist/external-BatQDwpn.cjs +1 -0
  22. package/dist/external-Bfddv9ir.cjs +1 -0
  23. package/dist/external-Bp0LGk7L.cjs +1 -0
  24. package/dist/{external-CJrxLSWV.js → external-BqSq3_g3.js} +2 -2
  25. package/dist/{external-CBLyUVI_.js → external-BwAIT4Et.js} +12 -12
  26. package/dist/external-BwzXukg6.js +42 -0
  27. package/dist/{external-BY99QanC.js → external-C0szVQZ4.js} +10 -10
  28. package/dist/{external-ByxpHVEA.js → external-CG-WeHt1.js} +26 -26
  29. package/dist/external-CM-K5NTq.js +14 -0
  30. package/dist/external-CaehDJtX.cjs +1 -0
  31. package/dist/external-CfY-kR5_.js +23 -0
  32. package/dist/{external-C-0pnmB4.js → external-CtIn5ns5.js} +25 -25
  33. package/dist/{external-D_PgcvDj.js → external-CwtqVaYf.js} +69 -69
  34. package/dist/external-DLIuO7_6.cjs +1 -0
  35. package/dist/external-DPsERPGZ.js +87 -0
  36. package/dist/external-DZ9ZLLOd.cjs +1 -0
  37. package/dist/external-JI_JLXE9.cjs +46 -0
  38. package/dist/external-R1DnhHJ8.cjs +1 -0
  39. package/dist/{external-DzuRmcYi.js → external-fThC1Pt0.js} +137 -122
  40. package/dist/external-iLU86byd.cjs +1 -0
  41. package/dist/external-ok-onqCX.cjs +1 -0
  42. package/dist/external-qAqWNZPd.cjs +1 -0
  43. package/dist/flex.cjs +1 -1
  44. package/dist/flex.js +1 -1
  45. package/dist/fontString-BpD7ezh8.cjs +1 -0
  46. package/dist/{fontString-B3WuZ-o6.js → fontString-CpT1noV1.js} +2 -2
  47. package/dist/header.cjs +1 -1
  48. package/dist/header.js +1 -1
  49. package/dist/index.cjs +35 -7
  50. package/dist/index.js +32720 -21375
  51. package/dist/input.cjs +1 -1
  52. package/dist/input.js +1 -1
  53. package/dist/jsx-runtime-Dszzpdy0.cjs +22 -0
  54. package/dist/{jsx-runtime-C5mzlN2N.js → jsx-runtime-OVHDjVDe.js} +14 -14
  55. package/dist/list.cjs +1 -1
  56. package/dist/list.js +1 -1
  57. package/dist/main-20msMsI6.cjs +92 -0
  58. package/dist/{main-mGfIFfsW.js → main-DCwBsS0F.js} +17684 -17076
  59. package/dist/menu.cjs +1 -1
  60. package/dist/menu.js +1 -1
  61. package/dist/pluto.css +1 -1
  62. package/dist/provider-B-VPfAGa.js +4673 -0
  63. package/dist/provider-D295Uocj.cjs +52 -0
  64. package/dist/provider-DVqod4rl.cjs +83 -0
  65. package/dist/provider-qIzR8Puy.js +18803 -0
  66. package/dist/src/arc/Arc.d.ts +6 -0
  67. package/dist/src/arc/Arc.d.ts.map +1 -0
  68. package/dist/src/arc/external.d.ts +4 -0
  69. package/dist/src/arc/external.d.ts.map +1 -0
  70. package/dist/src/arc/handle/Core.d.ts +8 -0
  71. package/dist/src/arc/handle/Core.d.ts.map +1 -0
  72. package/dist/src/arc/handle/Sink.d.ts +5 -0
  73. package/dist/src/arc/handle/Sink.d.ts.map +1 -0
  74. package/dist/src/arc/handle/Source.d.ts +5 -0
  75. package/dist/src/arc/handle/Source.d.ts.map +1 -0
  76. package/dist/src/arc/handle/external.d.ts +3 -0
  77. package/dist/src/arc/handle/external.d.ts.map +1 -0
  78. package/dist/src/arc/handle/index.d.ts +2 -0
  79. package/dist/src/arc/handle/index.d.ts.map +1 -0
  80. package/dist/src/arc/index.d.ts +2 -0
  81. package/dist/src/arc/index.d.ts.map +1 -0
  82. package/dist/src/arc/queries.d.ts +89 -0
  83. package/dist/src/arc/queries.d.ts.map +1 -0
  84. package/dist/src/arc/stage/Base.d.ts +32 -0
  85. package/dist/src/arc/stage/Base.d.ts.map +1 -0
  86. package/dist/src/arc/stage/constant/Constant.d.ts +9 -0
  87. package/dist/src/arc/stage/constant/Constant.d.ts.map +1 -0
  88. package/dist/src/arc/stage/constant/Form.d.ts +2 -0
  89. package/dist/src/arc/stage/constant/Form.d.ts.map +1 -0
  90. package/dist/src/arc/stage/constant/external.d.ts +3 -0
  91. package/dist/src/arc/stage/constant/external.d.ts.map +1 -0
  92. package/dist/src/arc/stage/constant/index.d.ts +2 -0
  93. package/dist/src/arc/stage/constant/index.d.ts.map +1 -0
  94. package/dist/src/arc/stage/external.d.ts +4 -0
  95. package/dist/src/arc/stage/external.d.ts.map +1 -0
  96. package/dist/src/arc/stage/index.d.ts +2 -0
  97. package/dist/src/arc/stage/index.d.ts.map +1 -0
  98. package/dist/src/arc/stage/operator/Operator.d.ts +17 -0
  99. package/dist/src/arc/stage/operator/Operator.d.ts.map +1 -0
  100. package/dist/src/arc/stage/operator/external.d.ts +242 -0
  101. package/dist/src/arc/stage/operator/external.d.ts.map +1 -0
  102. package/dist/src/arc/stage/operator/index.d.ts +2 -0
  103. package/dist/src/arc/stage/operator/index.d.ts.map +1 -0
  104. package/dist/src/arc/stage/read/Form.d.ts +3 -0
  105. package/dist/src/arc/stage/read/Form.d.ts.map +1 -0
  106. package/dist/src/arc/stage/read/Read.d.ts +10 -0
  107. package/dist/src/arc/stage/read/Read.d.ts.map +1 -0
  108. package/dist/src/arc/stage/read/external.d.ts +9 -0
  109. package/dist/src/arc/stage/read/external.d.ts.map +1 -0
  110. package/dist/src/arc/stage/read/index.d.ts +2 -0
  111. package/dist/src/arc/stage/read/index.d.ts.map +1 -0
  112. package/dist/src/arc/stage/registry.d.ts +11 -0
  113. package/dist/src/arc/stage/registry.d.ts.map +1 -0
  114. package/dist/src/arc/stage/select/Select.d.ts +2 -0
  115. package/dist/src/arc/stage/select/Select.d.ts.map +1 -0
  116. package/dist/src/arc/stage/select/external.d.ts +12 -0
  117. package/dist/src/arc/stage/select/external.d.ts.map +1 -0
  118. package/dist/src/arc/stage/select/index.d.ts +2 -0
  119. package/dist/src/arc/stage/select/index.d.ts.map +1 -0
  120. package/dist/src/arc/stage/sink/Form.d.ts +3 -0
  121. package/dist/src/arc/stage/sink/Form.d.ts.map +1 -0
  122. package/dist/src/arc/stage/sink/Sink.d.ts +11 -0
  123. package/dist/src/arc/stage/sink/Sink.d.ts.map +1 -0
  124. package/dist/src/arc/stage/sink/external.d.ts +10 -0
  125. package/dist/src/arc/stage/sink/external.d.ts.map +1 -0
  126. package/dist/src/arc/stage/sink/index.d.ts +2 -0
  127. package/dist/src/arc/stage/sink/index.d.ts.map +1 -0
  128. package/dist/src/arc/stage/source/Form.d.ts +3 -0
  129. package/dist/src/arc/stage/source/Form.d.ts.map +1 -0
  130. package/dist/src/arc/stage/source/Source.d.ts +10 -0
  131. package/dist/src/arc/stage/source/Source.d.ts.map +1 -0
  132. package/dist/src/arc/stage/source/external.d.ts +9 -0
  133. package/dist/src/arc/stage/source/external.d.ts.map +1 -0
  134. package/dist/src/arc/stage/source/index.d.ts +2 -0
  135. package/dist/src/arc/stage/source/index.d.ts.map +1 -0
  136. package/dist/src/arc/stage/stable/Form.d.ts +2 -0
  137. package/dist/src/arc/stage/stable/Form.d.ts.map +1 -0
  138. package/dist/src/arc/stage/stable/StableFor.d.ts +9 -0
  139. package/dist/src/arc/stage/stable/StableFor.d.ts.map +1 -0
  140. package/dist/src/arc/stage/stable/external.d.ts +3 -0
  141. package/dist/src/arc/stage/stable/external.d.ts.map +1 -0
  142. package/dist/src/arc/stage/stable/index.d.ts +2 -0
  143. package/dist/src/arc/stage/stable/index.d.ts.map +1 -0
  144. package/dist/src/arc/stage/status/Change.d.ts +21 -0
  145. package/dist/src/arc/stage/status/Change.d.ts.map +1 -0
  146. package/dist/src/arc/stage/status/Form.d.ts +3 -0
  147. package/dist/src/arc/stage/status/Form.d.ts.map +1 -0
  148. package/dist/src/arc/stage/status/external.d.ts +7 -0
  149. package/dist/src/arc/stage/status/external.d.ts.map +1 -0
  150. package/dist/src/arc/stage/status/index.d.ts +2 -0
  151. package/dist/src/arc/stage/status/index.d.ts.map +1 -0
  152. package/dist/src/arc/stage/types/index.d.ts +2 -0
  153. package/dist/src/arc/stage/types/index.d.ts.map +1 -0
  154. package/dist/src/arc/stage/types/spec.d.ts +25 -0
  155. package/dist/src/arc/stage/types/spec.d.ts.map +1 -0
  156. package/dist/src/button/color.d.ts +1 -2
  157. package/dist/src/button/color.d.ts.map +1 -1
  158. package/dist/src/channel/AliasInput.d.ts +3 -3
  159. package/dist/src/channel/AliasInput.d.ts.map +1 -1
  160. package/dist/src/channel/LinePlot.d.ts +4 -4
  161. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  162. package/dist/src/channel/Select.d.ts +5 -5
  163. package/dist/src/channel/Select.d.ts.map +1 -1
  164. package/dist/src/channel/queries.d.ts +37 -70
  165. package/dist/src/channel/queries.d.ts.map +1 -1
  166. package/dist/src/css/bem.d.ts +1 -2
  167. package/dist/src/css/bem.d.ts.map +1 -1
  168. package/dist/src/dialog/Frame.d.ts.map +1 -1
  169. package/dist/src/divider/Divider.d.ts +1 -1
  170. package/dist/src/divider/Divider.d.ts.map +1 -1
  171. package/dist/src/ether.d.ts +2 -2
  172. package/dist/src/ether.d.ts.map +1 -1
  173. package/dist/src/flux/Provider.d.ts.map +1 -1
  174. package/dist/src/flux/aether/external.d.ts +1 -1
  175. package/dist/src/flux/aether/external.d.ts.map +1 -1
  176. package/dist/src/flux/aether/provider.d.ts +1 -1
  177. package/dist/src/flux/aether/provider.d.ts.map +1 -1
  178. package/dist/src/flux/core/external.d.ts +1 -0
  179. package/dist/src/flux/core/external.d.ts.map +1 -1
  180. package/dist/src/flux/core/store.d.ts +19 -13
  181. package/dist/src/flux/core/store.d.ts.map +1 -1
  182. package/dist/src/flux/core/streamer.d.ts +1 -1
  183. package/dist/src/flux/core/streamer.d.ts.map +1 -1
  184. package/dist/src/flux/core/types.d.ts +42 -0
  185. package/dist/src/flux/core/types.d.ts.map +1 -0
  186. package/dist/src/flux/external.d.ts +1 -1
  187. package/dist/src/flux/external.d.ts.map +1 -1
  188. package/dist/src/flux/form.d.ts +29 -127
  189. package/dist/src/flux/form.d.ts.map +1 -1
  190. package/dist/src/flux/list.d.ts +28 -228
  191. package/dist/src/flux/list.d.ts.map +1 -1
  192. package/dist/src/flux/result.d.ts +32 -90
  193. package/dist/src/flux/result.d.ts.map +1 -1
  194. package/dist/src/flux/retrieve.d.ts +47 -176
  195. package/dist/src/flux/retrieve.d.ts.map +1 -1
  196. package/dist/src/flux/update.d.ts +45 -134
  197. package/dist/src/flux/update.d.ts.map +1 -1
  198. package/dist/src/form/Context.d.ts +2 -2
  199. package/dist/src/form/Context.d.ts.map +1 -1
  200. package/dist/src/form/Context.spec.d.ts +2 -0
  201. package/dist/src/form/Context.spec.d.ts.map +1 -0
  202. package/dist/src/group/queries.d.ts +18 -18
  203. package/dist/src/group/queries.d.ts.map +1 -1
  204. package/dist/src/hardware/device/Select.d.ts +2 -2
  205. package/dist/src/hardware/device/Select.d.ts.map +1 -1
  206. package/dist/src/hardware/device/queries.d.ts +369 -9
  207. package/dist/src/hardware/device/queries.d.ts.map +1 -1
  208. package/dist/src/hardware/rack/Select.d.ts +3 -3
  209. package/dist/src/hardware/rack/Select.d.ts.map +1 -1
  210. package/dist/src/hardware/rack/queries.d.ts +15 -11
  211. package/dist/src/hardware/rack/queries.d.ts.map +1 -1
  212. package/dist/src/hardware/task/queries.d.ts +70 -17
  213. package/dist/src/hardware/task/queries.d.ts.map +1 -1
  214. package/dist/src/hooks/useRequiredContext.d.ts.map +1 -1
  215. package/dist/src/hooks/useRequiredContext.spec.d.ts +2 -0
  216. package/dist/src/hooks/useRequiredContext.spec.d.ts.map +1 -0
  217. package/dist/src/icon/Modbus.d.ts +2 -0
  218. package/dist/src/icon/Modbus.d.ts.map +1 -0
  219. package/dist/src/icon/registry.d.ts +16 -3
  220. package/dist/src/icon/registry.d.ts.map +1 -1
  221. package/dist/src/index.d.ts +4 -3
  222. package/dist/src/index.d.ts.map +1 -1
  223. package/dist/src/input/Boolean.d.ts +3 -2
  224. package/dist/src/input/Boolean.d.ts.map +1 -1
  225. package/dist/src/input/Checkbox.d.ts +2 -3
  226. package/dist/src/input/Checkbox.d.ts.map +1 -1
  227. package/dist/src/input/DateTime.d.ts +1 -18
  228. package/dist/src/input/DateTime.d.ts.map +1 -1
  229. package/dist/src/input/Switch.d.ts +2 -3
  230. package/dist/src/input/Switch.d.ts.map +1 -1
  231. package/dist/src/input/Text.d.ts +2 -1
  232. package/dist/src/input/Text.d.ts.map +1 -1
  233. package/dist/src/input/external.d.ts +0 -1
  234. package/dist/src/input/external.d.ts.map +1 -1
  235. package/dist/src/label/Select.d.ts +5 -5
  236. package/dist/src/label/Select.d.ts.map +1 -1
  237. package/dist/src/label/queries.d.ts +35 -20
  238. package/dist/src/label/queries.d.ts.map +1 -1
  239. package/dist/src/{vis/lineplot → lineplot}/Axis.d.ts +3 -3
  240. package/dist/src/lineplot/Axis.d.ts.map +1 -0
  241. package/dist/src/{vis/lineplot → lineplot}/Legend.d.ts +1 -1
  242. package/dist/src/lineplot/Legend.d.ts.map +1 -0
  243. package/dist/src/{vis/lineplot → lineplot}/Line.d.ts +2 -2
  244. package/dist/src/lineplot/Line.d.ts.map +1 -0
  245. package/dist/src/{vis/lineplot → lineplot}/LinePlot.d.ts +3 -3
  246. package/dist/src/lineplot/LinePlot.d.ts.map +1 -0
  247. package/dist/src/{vis/lineplot → lineplot}/Title.d.ts +1 -1
  248. package/dist/src/lineplot/Title.d.ts.map +1 -0
  249. package/dist/src/{vis/lineplot → lineplot}/Viewport.d.ts +1 -1
  250. package/dist/src/lineplot/Viewport.d.ts.map +1 -0
  251. package/dist/src/{vis/lineplot → lineplot}/aether/BoundQuerier.d.ts +1 -1
  252. package/dist/src/lineplot/aether/BoundQuerier.d.ts.map +1 -0
  253. package/dist/src/{vis/lineplot → lineplot}/aether/LinePlot.d.ts +5 -5
  254. package/dist/src/lineplot/aether/LinePlot.d.ts.map +1 -0
  255. package/dist/src/{vis/lineplot → lineplot}/aether/XAxis.d.ts +3 -3
  256. package/dist/src/lineplot/aether/XAxis.d.ts.map +1 -0
  257. package/dist/src/{vis/lineplot → lineplot}/aether/YAxis.d.ts +2 -2
  258. package/dist/src/lineplot/aether/YAxis.d.ts.map +1 -0
  259. package/dist/src/{vis/lineplot → lineplot}/aether/axis.d.ts +6 -6
  260. package/dist/src/lineplot/aether/axis.d.ts.map +1 -0
  261. package/dist/src/lineplot/aether/external.d.ts.map +1 -0
  262. package/dist/src/lineplot/aether/index.d.ts.map +1 -0
  263. package/dist/src/{vis/lineplot → lineplot}/external.d.ts +1 -0
  264. package/dist/src/lineplot/external.d.ts.map +1 -0
  265. package/dist/src/lineplot/index.d.ts.map +1 -0
  266. package/dist/src/lineplot/queries.d.ts +33 -0
  267. package/dist/src/lineplot/queries.d.ts.map +1 -0
  268. package/dist/src/lineplot/queries.spec.d.ts +2 -0
  269. package/dist/src/lineplot/queries.spec.d.ts.map +1 -0
  270. package/dist/src/{vis/lineplot → lineplot}/range/Annotation.d.ts +1 -1
  271. package/dist/src/lineplot/range/Annotation.d.ts.map +1 -0
  272. package/dist/src/{vis/lineplot → lineplot}/range/Provider.d.ts +2 -2
  273. package/dist/src/lineplot/range/Provider.d.ts.map +1 -0
  274. package/dist/src/{vis/lineplot → lineplot}/range/aether/annotation.d.ts +3 -3
  275. package/dist/src/lineplot/range/aether/annotation.d.ts.map +1 -0
  276. package/dist/src/{vis/lineplot → lineplot}/range/aether/external.d.ts +1 -1
  277. package/dist/src/lineplot/range/aether/external.d.ts.map +1 -0
  278. package/dist/src/lineplot/range/aether/index.d.ts.map +1 -0
  279. package/dist/src/{vis/lineplot → lineplot}/range/aether/provider.d.ts +10 -10
  280. package/dist/src/lineplot/range/aether/provider.d.ts.map +1 -0
  281. package/dist/src/lineplot/range/external.d.ts.map +1 -0
  282. package/dist/src/lineplot/range/index.d.ts.map +1 -0
  283. package/dist/src/{vis/lineplot → lineplot}/tooltip/Tooltip.d.ts +1 -1
  284. package/dist/src/lineplot/tooltip/Tooltip.d.ts.map +1 -0
  285. package/dist/src/lineplot/tooltip/aether/index.d.ts.map +1 -0
  286. package/dist/src/{vis/lineplot → lineplot}/tooltip/aether/tooltip.d.ts +4 -4
  287. package/dist/src/lineplot/tooltip/aether/tooltip.d.ts.map +1 -0
  288. package/dist/src/lineplot/tooltip/index.d.ts.map +1 -0
  289. package/dist/src/lineplot/useBoundQuerier.d.ts.map +1 -0
  290. package/dist/src/list/Frame.d.ts +16 -1
  291. package/dist/src/list/Frame.d.ts.map +1 -1
  292. package/dist/src/list/pager.d.ts +7 -1
  293. package/dist/src/list/pager.d.ts.map +1 -1
  294. package/dist/src/list/useCombinedData.d.ts.map +1 -1
  295. package/dist/src/list/useKeysData.d.ts.map +1 -1
  296. package/dist/src/list/useMapData.d.ts.map +1 -1
  297. package/dist/src/list/useStaticData.d.ts.map +1 -1
  298. package/dist/src/{vis/log → log}/Log.d.ts +2 -2
  299. package/dist/src/log/Log.d.ts.map +1 -0
  300. package/dist/src/{vis/log → log}/aether/Log.d.ts +4 -4
  301. package/dist/src/log/aether/Log.d.ts.map +1 -0
  302. package/dist/src/log/aether/index.d.ts.map +1 -0
  303. package/dist/src/log/external.d.ts +3 -0
  304. package/dist/src/log/external.d.ts.map +1 -0
  305. package/dist/src/log/index.d.ts +2 -0
  306. package/dist/src/log/index.d.ts.map +1 -0
  307. package/dist/src/log/queries.d.ts +33 -0
  308. package/dist/src/log/queries.d.ts.map +1 -0
  309. package/dist/src/log/queries.spec.d.ts +2 -0
  310. package/dist/src/log/queries.spec.d.ts.map +1 -0
  311. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  312. package/dist/src/ontology/aether/index.d.ts +2 -0
  313. package/dist/src/ontology/aether/index.d.ts.map +1 -0
  314. package/dist/src/ontology/aether/queries.d.ts +15 -0
  315. package/dist/src/ontology/aether/queries.d.ts.map +1 -0
  316. package/dist/src/ontology/external.d.ts +1 -0
  317. package/dist/src/ontology/external.d.ts.map +1 -1
  318. package/dist/src/ontology/queries.d.ts +27 -23
  319. package/dist/src/ontology/queries.d.ts.map +1 -1
  320. package/dist/src/pluto/Pluto.d.ts +13 -0
  321. package/dist/src/pluto/Pluto.d.ts.map +1 -1
  322. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  323. package/dist/src/ranger/Breadcrumb.d.ts +3 -1
  324. package/dist/src/ranger/Breadcrumb.d.ts.map +1 -1
  325. package/dist/src/ranger/CreateIcon.d.ts +3 -0
  326. package/dist/src/ranger/CreateIcon.d.ts.map +1 -0
  327. package/dist/src/ranger/Select.d.ts +4 -14
  328. package/dist/src/ranger/Select.d.ts.map +1 -1
  329. package/dist/src/ranger/SelectStage.d.ts +7 -0
  330. package/dist/src/ranger/SelectStage.d.ts.map +1 -0
  331. package/dist/src/ranger/StageIcon.d.ts +8 -0
  332. package/dist/src/ranger/StageIcon.d.ts.map +1 -0
  333. package/dist/src/ranger/aether/index.d.ts.map +1 -1
  334. package/dist/src/ranger/aether/queries.d.ts +2 -2
  335. package/dist/src/ranger/aether/queries.d.ts.map +1 -1
  336. package/dist/src/ranger/external.d.ts +5 -1
  337. package/dist/src/ranger/external.d.ts.map +1 -1
  338. package/dist/src/ranger/queries.d.ts +41 -41
  339. package/dist/src/ranger/queries.d.ts.map +1 -1
  340. package/dist/src/ranger/stage.d.ts +20 -0
  341. package/dist/src/ranger/stage.d.ts.map +1 -0
  342. package/dist/src/ranger/stage.spec.d.ts +2 -0
  343. package/dist/src/ranger/stage.spec.d.ts.map +1 -0
  344. package/dist/src/resize/Core.d.ts.map +1 -1
  345. package/dist/src/schematic/Schematic.d.ts +6 -0
  346. package/dist/src/schematic/Schematic.d.ts.map +1 -0
  347. package/dist/src/schematic/edge/Edge.d.ts +15 -0
  348. package/dist/src/schematic/edge/Edge.d.ts.map +1 -0
  349. package/dist/src/schematic/edge/connector/connector.d.ts.map +1 -0
  350. package/dist/src/schematic/edge/connector/connector.spec.d.ts.map +1 -0
  351. package/dist/src/schematic/edge/connector/index.d.ts.map +1 -0
  352. package/dist/src/schematic/edge/index.d.ts +3 -0
  353. package/dist/src/schematic/edge/index.d.ts.map +1 -0
  354. package/dist/src/schematic/edge/paths.d.ts +28 -0
  355. package/dist/src/schematic/edge/paths.d.ts.map +1 -0
  356. package/dist/src/schematic/external.d.ts +3 -0
  357. package/dist/src/schematic/external.d.ts.map +1 -1
  358. package/dist/src/schematic/queries.d.ts +43 -0
  359. package/dist/src/schematic/queries.d.ts.map +1 -0
  360. package/dist/src/schematic/queries.spec.d.ts +2 -0
  361. package/dist/src/schematic/queries.spec.d.ts.map +1 -0
  362. package/dist/src/schematic/symbol/Custom.d.ts.map +1 -1
  363. package/dist/src/schematic/symbol/Forms.d.ts +1 -0
  364. package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
  365. package/dist/src/schematic/symbol/Primitives.d.ts +1 -1
  366. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  367. package/dist/src/schematic/symbol/Symbols.d.ts +11 -1
  368. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  369. package/dist/src/schematic/symbol/queries.d.ts +20 -19
  370. package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
  371. package/dist/src/schematic/symbol/registry.d.ts +2 -1
  372. package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
  373. package/dist/src/select/Dialog.d.ts +1 -1
  374. package/dist/src/select/Dialog.d.ts.map +1 -1
  375. package/dist/src/select/Frame.d.ts +4 -1
  376. package/dist/src/select/Frame.d.ts.map +1 -1
  377. package/dist/src/select/ListItem.d.ts.map +1 -1
  378. package/dist/src/select/MultipleTrigger.d.ts +5 -2
  379. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  380. package/dist/src/showcase/DividerShowcase.d.ts.map +1 -1
  381. package/dist/src/showcase/InputShowcase.d.ts +1 -1
  382. package/dist/src/showcase/InputShowcase.d.ts.map +1 -1
  383. package/dist/src/showcase/SelectShowcase.d.ts.map +1 -1
  384. package/dist/src/showcase/TagShowcase.d.ts.map +1 -1
  385. package/dist/src/state/state.d.ts +2 -1
  386. package/dist/src/state/state.d.ts.map +1 -1
  387. package/dist/src/status/CreateIcon.d.ts +1 -0
  388. package/dist/src/status/CreateIcon.d.ts.map +1 -0
  389. package/dist/src/status/Select.d.ts +12 -0
  390. package/dist/src/status/Select.d.ts.map +1 -0
  391. package/dist/src/status/SelectVariant.d.ts +7 -0
  392. package/dist/src/status/SelectVariant.d.ts.map +1 -0
  393. package/dist/src/status/aether/aggregator.d.ts +3 -25
  394. package/dist/src/status/aether/aggregator.d.ts.map +1 -1
  395. package/dist/src/status/aether/errorHandler.d.ts +1 -1
  396. package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
  397. package/dist/src/status/{Aggregator.d.ts → core/Aggregator.d.ts} +4 -4
  398. package/dist/src/status/core/Aggregator.d.ts.map +1 -0
  399. package/dist/src/status/core/Aggregator.spec.d.ts.map +1 -0
  400. package/dist/src/status/core/CreateIcon.d.ts +3 -0
  401. package/dist/src/status/core/CreateIcon.d.ts.map +1 -0
  402. package/dist/src/status/{Indicator.d.ts → core/Indicator.d.ts} +1 -1
  403. package/dist/src/status/core/Indicator.d.ts.map +1 -0
  404. package/dist/src/status/{Notification.d.ts → core/Notification.d.ts} +3 -3
  405. package/dist/src/status/core/Notification.d.ts.map +1 -0
  406. package/dist/src/status/core/Notification.spec.d.ts.map +1 -0
  407. package/dist/src/status/core/SelectVariant.d.ts +7 -0
  408. package/dist/src/status/core/SelectVariant.d.ts.map +1 -0
  409. package/dist/src/status/core/Summary.d.ts +12 -0
  410. package/dist/src/status/core/Summary.d.ts.map +1 -0
  411. package/dist/src/status/core/colors.d.ts.map +1 -0
  412. package/dist/src/status/core/external.d.ts +8 -0
  413. package/dist/src/status/core/external.d.ts.map +1 -0
  414. package/dist/src/status/core/index.d.ts +2 -0
  415. package/dist/src/status/core/index.d.ts.map +1 -0
  416. package/dist/src/status/external.d.ts +3 -5
  417. package/dist/src/status/external.d.ts.map +1 -1
  418. package/dist/src/status/index.d.ts.map +1 -1
  419. package/dist/src/status/queries.d.ts +64 -0
  420. package/dist/src/status/queries.d.ts.map +1 -0
  421. package/dist/src/status/queries.spec.d.ts +2 -0
  422. package/dist/src/status/queries.spec.d.ts.map +1 -0
  423. package/dist/src/synnax/Provider.d.ts +8 -5
  424. package/dist/src/synnax/Provider.d.ts.map +1 -1
  425. package/dist/src/table/external.d.ts +1 -0
  426. package/dist/src/table/external.d.ts.map +1 -1
  427. package/dist/src/table/queries.d.ts +35 -0
  428. package/dist/src/table/queries.d.ts.map +1 -0
  429. package/dist/src/table/queries.spec.d.ts +2 -0
  430. package/dist/src/table/queries.spec.d.ts.map +1 -0
  431. package/dist/src/tag/Tags.d.ts +1 -1
  432. package/dist/src/tag/Tags.d.ts.map +1 -1
  433. package/dist/src/telem/aether/noop.d.ts.map +1 -1
  434. package/dist/src/telem/aether/remote.d.ts +4 -4
  435. package/dist/src/telem/aether/telem.d.ts +1 -1
  436. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  437. package/dist/src/telem/client/streamer.d.ts +1 -0
  438. package/dist/src/telem/client/streamer.d.ts.map +1 -1
  439. package/dist/src/telem/control/Chip.d.ts.map +1 -1
  440. package/dist/src/telem/control/aether/chip.d.ts +9 -32
  441. package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
  442. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  443. package/dist/src/telem/control/aether/indicator.d.ts +15 -38
  444. package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
  445. package/dist/src/telem/external.d.ts +1 -0
  446. package/dist/src/telem/external.d.ts.map +1 -1
  447. package/dist/src/telem/text/TimeRange.d.ts +10 -0
  448. package/dist/src/telem/text/TimeRange.d.ts.map +1 -0
  449. package/dist/src/telem/text/TimeRange.spec.d.ts +2 -0
  450. package/dist/src/telem/text/TimeRange.spec.d.ts.map +1 -0
  451. package/dist/src/telem/text/TimeSpan.d.ts +10 -0
  452. package/dist/src/telem/text/TimeSpan.d.ts.map +1 -0
  453. package/dist/src/telem/text/TimeSpan.spec.d.ts +2 -0
  454. package/dist/src/telem/text/TimeSpan.spec.d.ts.map +1 -0
  455. package/dist/src/telem/text/TimeSpanSince.d.ts +11 -0
  456. package/dist/src/telem/text/TimeSpanSince.d.ts.map +1 -0
  457. package/dist/src/telem/text/TimeStamp.d.ts +12 -0
  458. package/dist/src/telem/text/TimeStamp.d.ts.map +1 -0
  459. package/dist/src/telem/text/TimeStamp.spec.d.ts +2 -0
  460. package/dist/src/telem/text/TimeStamp.spec.d.ts.map +1 -0
  461. package/dist/src/telem/text/external.d.ts +5 -0
  462. package/dist/src/telem/text/external.d.ts.map +1 -0
  463. package/dist/src/telem/text/index.d.ts +2 -0
  464. package/dist/src/telem/text/index.d.ts.map +1 -0
  465. package/dist/src/text/Editable.d.ts.map +1 -1
  466. package/dist/src/text/external.d.ts +0 -1
  467. package/dist/src/text/external.d.ts.map +1 -1
  468. package/dist/src/tooltip/Dialog.d.ts.map +1 -1
  469. package/dist/src/tree/Context.d.ts +13 -0
  470. package/dist/src/tree/Context.d.ts.map +1 -0
  471. package/dist/src/tree/Item.d.ts +2 -3
  472. package/dist/src/tree/Item.d.ts.map +1 -1
  473. package/dist/src/tree/Tree.d.ts +2 -2
  474. package/dist/src/tree/Tree.d.ts.map +1 -1
  475. package/dist/src/tree/core.d.ts +2 -1
  476. package/dist/src/tree/core.d.ts.map +1 -1
  477. package/dist/src/tree/core.spec.d.ts +2 -0
  478. package/dist/src/tree/core.spec.d.ts.map +1 -0
  479. package/dist/src/user/index.d.ts +2 -0
  480. package/dist/src/user/index.d.ts.map +1 -0
  481. package/dist/src/user/queries.d.ts +50 -0
  482. package/dist/src/user/queries.d.ts.map +1 -0
  483. package/dist/src/user/queries.spec.d.ts +2 -0
  484. package/dist/src/user/queries.spec.d.ts.map +1 -0
  485. package/dist/src/viewport/use.d.ts.map +1 -1
  486. package/dist/src/vis/diagram/Diagram.d.ts +16 -4
  487. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  488. package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
  489. package/dist/src/vis/diagram/aether/types.d.ts +6 -49
  490. package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
  491. package/dist/src/vis/diagram/external.d.ts +1 -1
  492. package/dist/src/vis/diagram/external.d.ts.map +1 -1
  493. package/dist/src/vis/diagram/useTriggers.d.ts +12 -0
  494. package/dist/src/vis/diagram/useTriggers.d.ts.map +1 -0
  495. package/dist/src/vis/diagram/util.d.ts +2 -0
  496. package/dist/src/vis/diagram/util.d.ts.map +1 -1
  497. package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
  498. package/dist/src/vis/draw2d/index.d.ts +16 -6
  499. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  500. package/dist/src/vis/gauge/aether/gauge.d.ts +297 -0
  501. package/dist/src/vis/gauge/aether/gauge.d.ts.map +1 -0
  502. package/dist/src/vis/gauge/aether/index.d.ts +2 -0
  503. package/dist/src/vis/gauge/aether/index.d.ts.map +1 -0
  504. package/dist/src/vis/gauge/index.d.ts +2 -0
  505. package/dist/src/vis/gauge/index.d.ts.map +1 -0
  506. package/dist/src/vis/gauge/use.d.ts +84 -0
  507. package/dist/src/vis/gauge/use.d.ts.map +1 -0
  508. package/dist/src/vis/text/atlas.d.ts.map +1 -1
  509. package/dist/src/vis/value/TelemForm.d.ts.map +1 -1
  510. package/dist/src/workspace/queries.d.ts +37 -4
  511. package/dist/src/workspace/queries.d.ts.map +1 -1
  512. package/dist/tabs.cjs +1 -1
  513. package/dist/tabs.js +1 -1
  514. package/dist/text.cjs +1 -1
  515. package/dist/text.js +2 -2
  516. package/dist/theme.css +1593 -1594
  517. package/dist/theming.cjs +1 -1
  518. package/dist/theming.js +2 -2
  519. package/dist/tree.cjs +1 -1
  520. package/dist/tree.js +1 -1
  521. package/dist/triggers.cjs +1 -1
  522. package/dist/triggers.js +1 -1
  523. package/dist/units-CLbZ5ejs.cjs +1 -0
  524. package/dist/{units-BPvO622s.js → units-WtYBE1br.js} +1 -1
  525. package/dist/useKeysData-DXXVQfXZ.js +18 -0
  526. package/dist/useKeysData-Do63LaI0.cjs +1 -0
  527. package/dist/video.cjs +1 -1
  528. package/dist/video.js +1 -1
  529. package/package.json +20 -20
  530. package/README.md +0 -35
  531. package/dist/Animated-BT-w0cPF.cjs +0 -1
  532. package/dist/Animated-B_xTpw9g.js +0 -27
  533. package/dist/LinePlot-De-VLJHL.cjs +0 -53
  534. package/dist/LinePlot-mRCOU5PM.js +0 -6263
  535. package/dist/css-CmXY6iPo.cjs +0 -8
  536. package/dist/eraser-BcLVtorx.js +0 -14206
  537. package/dist/eraser-h8NIswGM.cjs +0 -63
  538. package/dist/external-BA4cUJmi.js +0 -42
  539. package/dist/external-BBGCooyz.cjs +0 -1
  540. package/dist/external-BF3OTViJ.js +0 -44
  541. package/dist/external-BNitHfU5.js +0 -24
  542. package/dist/external-CGbANgXa.cjs +0 -1
  543. package/dist/external-CMtT44YA.cjs +0 -1
  544. package/dist/external-CNbPkF53.cjs +0 -1
  545. package/dist/external-CbHzHgtw.js +0 -92
  546. package/dist/external-CiJ7RsGt.cjs +0 -1
  547. package/dist/external-D2VXaXzu.cjs +0 -1
  548. package/dist/external-DNwQ_1PT.js +0 -124
  549. package/dist/external-DYC1EK6G.cjs +0 -1
  550. package/dist/external-Dl5JyJaH.cjs +0 -1
  551. package/dist/external-DynvKrxv.cjs +0 -46
  552. package/dist/external-ETemCKjS.cjs +0 -1
  553. package/dist/external-aXmXhGMj.cjs +0 -1
  554. package/dist/external-zzhrikgD.cjs +0 -1
  555. package/dist/fontString-C4QgiFXy.cjs +0 -1
  556. package/dist/jsx-runtime-CITbqOLs.cjs +0 -22
  557. package/dist/main-DCvw0wt3.cjs +0 -92
  558. package/dist/src/flux/core/params.d.ts +0 -31
  559. package/dist/src/flux/core/params.d.ts.map +0 -1
  560. package/dist/src/input/TextArea.d.ts +0 -25
  561. package/dist/src/input/TextArea.d.ts.map +0 -1
  562. package/dist/src/ranger/TimeRangeChip.d.ts +0 -10
  563. package/dist/src/ranger/TimeRangeChip.d.ts.map +0 -1
  564. package/dist/src/status/Aggregator.d.ts.map +0 -1
  565. package/dist/src/status/Aggregator.spec.d.ts.map +0 -1
  566. package/dist/src/status/Indicator.d.ts.map +0 -1
  567. package/dist/src/status/Notification.d.ts.map +0 -1
  568. package/dist/src/status/Notification.spec.d.ts.map +0 -1
  569. package/dist/src/status/Summary.d.ts +0 -8
  570. package/dist/src/status/Summary.d.ts.map +0 -1
  571. package/dist/src/status/colors.d.ts.map +0 -1
  572. package/dist/src/text/DateTime.d.ts +0 -12
  573. package/dist/src/text/DateTime.d.ts.map +0 -1
  574. package/dist/src/vis/diagram/edge/Edge.d.ts +0 -15
  575. package/dist/src/vis/diagram/edge/Edge.d.ts.map +0 -1
  576. package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +0 -1
  577. package/dist/src/vis/diagram/edge/connector/connector.spec.d.ts.map +0 -1
  578. package/dist/src/vis/diagram/edge/connector/index.d.ts.map +0 -1
  579. package/dist/src/vis/diagram/edge/index.d.ts +0 -2
  580. package/dist/src/vis/diagram/edge/index.d.ts.map +0 -1
  581. package/dist/src/vis/diagram/edge/paths.d.ts +0 -18
  582. package/dist/src/vis/diagram/edge/paths.d.ts.map +0 -1
  583. package/dist/src/vis/lineplot/Axis.d.ts.map +0 -1
  584. package/dist/src/vis/lineplot/Legend.d.ts.map +0 -1
  585. package/dist/src/vis/lineplot/Line.d.ts.map +0 -1
  586. package/dist/src/vis/lineplot/LinePlot.d.ts.map +0 -1
  587. package/dist/src/vis/lineplot/Title.d.ts.map +0 -1
  588. package/dist/src/vis/lineplot/Viewport.d.ts.map +0 -1
  589. package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +0 -1
  590. package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +0 -1
  591. package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +0 -1
  592. package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +0 -1
  593. package/dist/src/vis/lineplot/aether/axis.d.ts.map +0 -1
  594. package/dist/src/vis/lineplot/aether/external.d.ts.map +0 -1
  595. package/dist/src/vis/lineplot/aether/index.d.ts.map +0 -1
  596. package/dist/src/vis/lineplot/external.d.ts.map +0 -1
  597. package/dist/src/vis/lineplot/index.d.ts.map +0 -1
  598. package/dist/src/vis/lineplot/range/Annotation.d.ts.map +0 -1
  599. package/dist/src/vis/lineplot/range/Provider.d.ts.map +0 -1
  600. package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +0 -1
  601. package/dist/src/vis/lineplot/range/aether/external.d.ts.map +0 -1
  602. package/dist/src/vis/lineplot/range/aether/index.d.ts.map +0 -1
  603. package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +0 -1
  604. package/dist/src/vis/lineplot/range/external.d.ts.map +0 -1
  605. package/dist/src/vis/lineplot/range/index.d.ts.map +0 -1
  606. package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts.map +0 -1
  607. package/dist/src/vis/lineplot/tooltip/aether/index.d.ts.map +0 -1
  608. package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +0 -1
  609. package/dist/src/vis/lineplot/tooltip/index.d.ts.map +0 -1
  610. package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +0 -1
  611. package/dist/src/vis/log/Log.d.ts.map +0 -1
  612. package/dist/src/vis/log/aether/Log.d.ts.map +0 -1
  613. package/dist/src/vis/log/aether/index.d.ts.map +0 -1
  614. package/dist/src/vis/log/index.d.ts +0 -2
  615. package/dist/src/vis/log/index.d.ts.map +0 -1
  616. package/dist/units-DkdMPsxa.cjs +0 -1
  617. package/dist/useKeysData-B1kiZOOw.js +0 -14
  618. package/dist/useKeysData-G9Mk3mA6.cjs +0 -1
  619. /package/dist/src/{vis/lineplot → lineplot}/aether/external.d.ts +0 -0
  620. /package/dist/src/{vis/lineplot → lineplot}/aether/index.d.ts +0 -0
  621. /package/dist/src/{vis/lineplot → lineplot}/index.d.ts +0 -0
  622. /package/dist/src/{vis/lineplot → lineplot}/range/aether/index.d.ts +0 -0
  623. /package/dist/src/{vis/lineplot → lineplot}/range/external.d.ts +0 -0
  624. /package/dist/src/{vis/lineplot → lineplot}/range/index.d.ts +0 -0
  625. /package/dist/src/{vis/lineplot → lineplot}/tooltip/aether/index.d.ts +0 -0
  626. /package/dist/src/{vis/lineplot → lineplot}/tooltip/index.d.ts +0 -0
  627. /package/dist/src/{vis/lineplot → lineplot}/useBoundQuerier.d.ts +0 -0
  628. /package/dist/src/{vis/log → log}/aether/index.d.ts +0 -0
  629. /package/dist/src/{vis/diagram → schematic}/edge/connector/connector.d.ts +0 -0
  630. /package/dist/src/{vis/diagram → schematic}/edge/connector/connector.spec.d.ts +0 -0
  631. /package/dist/src/{vis/diagram → schematic}/edge/connector/index.d.ts +0 -0
  632. /package/dist/src/status/{Aggregator.spec.d.ts → core/Aggregator.spec.d.ts} +0 -0
  633. /package/dist/src/status/{Notification.spec.d.ts → core/Notification.spec.d.ts} +0 -0
  634. /package/dist/src/status/{colors.d.ts → core/colors.d.ts} +0 -0
@@ -1,38 +1,67 @@
1
- import S, { z as a } from "zod";
2
- const fn = (t) => {
1
+ import O, { z as a } from "zod";
2
+ const or = (t) => O.union([
3
+ O.union([O.null(), O.undefined()]).transform(() => []),
4
+ t.array()
5
+ ]), Sn = (t) => Array.isArray(t) ? t : t == null ? [] : [t], ur = (t, e) => {
6
+ if (Array.isArray(e))
7
+ return e.reduce((s, i) => ur(s, i), t ?? []);
8
+ if (t == null) return [e];
9
+ const r = t.findIndex((s) => s == e), n = [...t];
10
+ return r === -1 ? n.push(e) : n[r] = e, n;
11
+ }, Nn = ((t, e) => {
12
+ if (t != null)
13
+ return Array.isArray(e) ? t.filter((r) => !e.includes(r)) : t.filter((r) => r != e);
14
+ }), lr = (t, e) => {
15
+ if (Array.isArray(e))
16
+ return e.reduce((s, i) => lr(s, i), t ?? []);
17
+ if (t == null) return [e];
18
+ const r = t.findIndex((s) => s.key === e.key), n = [...t];
19
+ return r === -1 ? n.push(e) : n[r] = e, n;
20
+ }, In = ((t, e) => {
21
+ if (t != null)
22
+ return Array.isArray(e) ? t.filter((r) => !e.includes(r.key)) : t.filter((r) => r.key !== e);
23
+ }), pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
+ __proto__: null,
25
+ nullableZ: or,
26
+ remove: Nn,
27
+ removeKeyed: In,
28
+ toArray: Sn,
29
+ upsert: ur,
30
+ upsertKeyed: lr
31
+ }, Symbol.toStringTag, { value: "Module" })), Mn = (t) => {
3
32
  const e = t.replace(/_[a-z]/g, (r) => r[1].toUpperCase());
4
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);
5
- }, qe = (t) => {
6
- const e = (r, n = nt) => {
34
+ }, Ye = (t) => {
35
+ const e = (r, n = lt) => {
7
36
  if (typeof r == "string") return t(r);
8
37
  if (Array.isArray(r)) return r.map((o) => e(o, n));
9
- if (!Qe(r)) return r;
10
- n = pn(n);
38
+ if (!rt(r)) return r;
39
+ n = Un(n);
11
40
  const s = {}, i = r;
12
41
  return "toJSON" in i && typeof i.toJSON == "function" ? e(i.toJSON(), n) : (Object.keys(i).forEach((o) => {
13
- let c = i[o];
14
- const h = t(o);
15
- n.recursive && (Qe(c) ? Wt(c) || (c = e(c, n)) : n.recursiveInArray && Ft(c) && (c = [...c].map((l) => {
42
+ let h = i[o];
43
+ const f = t(o);
44
+ n.recursive && (rt(h) ? Qt(h) || (h = e(h, n)) : n.recursiveInArray && Kt(h) && (h = [...h].map((l) => {
16
45
  let d = l;
17
- return Qe(l) ? Wt(d) || (d = e(l, n)) : Ft(l) && (d = e({ key: l }, n).key), d;
18
- }))), s[h] = c;
46
+ return rt(l) ? Qt(d) || (d = e(l, n)) : Kt(l) && (d = e({ key: l }, n).key), d;
47
+ }))), s[f] = h;
19
48
  }), s);
20
49
  };
21
50
  return e;
22
- }, bt = qe(fn), dn = (t) => (
51
+ }, St = Ye(Mn), An = (t) => (
23
52
  // Don't convert the first character and don't convert a character that is after a
24
53
  // non-alphanumeric character
25
54
  t.replace(
26
55
  /([a-z0-9])([A-Z])/g,
27
56
  (e, r, n) => `${r}_${n.toLowerCase()}`
28
57
  )
29
- ), Qt = qe(dn), _t = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), gn = [Number, String, Uint8Array], nt = {
58
+ ), cr = Ye(An), hr = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), En = [Number, String, Uint8Array], lt = {
30
59
  recursive: !0,
31
60
  recursiveInArray: !0
32
- }, pn = (t = nt) => (t.recursive == null ? t = nt : t.recursiveInArray ??= !1, t), Ft = (t) => t != null && Array.isArray(t), Qe = (t) => t != null && typeof t == "object" && !Array.isArray(t), Wt = (t) => gn.some((e) => t instanceof e), mn = (t) => t.replace(/\s+/g, "-").replace(
61
+ }, Un = (t = lt) => (t.recursive == null ? t = lt : t.recursiveInArray ??= !1, t), Kt = (t) => t != null && Array.isArray(t), rt = (t) => t != null && typeof t == "object" && !Array.isArray(t), Qt = (t) => En.some((e) => t instanceof e), Bn = (t) => t.replace(/[\s_]+/g, "-").replace(
33
62
  /([a-z0-9])([A-Z])/g,
34
63
  (e, r, n) => `${r}-${n.toLowerCase()}`
35
- ).toLowerCase(), yn = qe(mn), wn = (t) => {
64
+ ).toLowerCase(), jn = Ye(Bn), Cn = (t) => {
36
65
  if (t.length === 0) return t;
37
66
  let e = t.replace(/[_-]/g, " ");
38
67
  return e = e.replace(
@@ -42,15 +71,15 @@ const fn = (t) => {
42
71
  /([A-Z]+)([A-Z][a-z])/g,
43
72
  (r, n, s) => `${n} ${s}`
44
73
  ), e = e.replace(/\s+/g, " ").trim(), e = e.replace(/\b\w/g, (r) => r.toUpperCase()), e;
45
- }, bn = qe(wn), Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, Rn = Ye(Cn), mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
46
75
  __proto__: null,
47
- camelToSnake: Qt,
48
- capitalize: _t,
49
- snakeToCamel: bt,
50
- toKebab: yn,
51
- toProperNoun: bn
76
+ camelToSnake: cr,
77
+ capitalize: hr,
78
+ snakeToCamel: St,
79
+ toKebab: jn,
80
+ toProperNoun: Rn
52
81
  }, Symbol.toStringTag, { value: "Module" }));
53
- let On = class {
82
+ let Ln = class {
54
83
  contentType = "application/json";
55
84
  decoder;
56
85
  encoder;
@@ -64,15 +93,15 @@ let On = class {
64
93
  return this.decodeString(this.decoder.decode(e), r);
65
94
  }
66
95
  decodeString(e, r) {
67
- const n = JSON.parse(e), s = bt(n);
96
+ const n = JSON.parse(e), s = St(n);
68
97
  return r != null ? r.parse(s) : s;
69
98
  }
70
99
  encodeString(e) {
71
- const r = Qt(e);
100
+ const r = cr(e);
72
101
  return JSON.stringify(r, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : typeof s == "bigint" ? s.toString() : s);
73
102
  }
74
103
  };
75
- const st = new On(), it = (t) => [...new Set(t)], vn = (t, e, r = !0) => {
104
+ const ct = new Ln(), ht = (t) => [...new Set(t)], Dn = (t, e, r = !0) => {
76
105
  const n = /* @__PURE__ */ new Map();
77
106
  return t.forEach((s) => {
78
107
  const i = e(s);
@@ -82,12 +111,12 @@ const st = new On(), it = (t) => [...new Set(t)], vn = (t, e, r = !0) => {
82
111
  }
83
112
  n.set(i, s);
84
113
  }), Array.from(n.values());
85
- }, Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
114
+ }, bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
86
115
  __proto__: null,
87
- by: vn,
88
- unique: it
89
- }, Symbol.toStringTag, { value: "Module" })), A = (t) => t != null && typeof t == "object" && "value" in t;
90
- let ee = class {
116
+ by: Dn,
117
+ unique: ht
118
+ }, Symbol.toStringTag, { value: "Module" })), B = (t) => t != null && typeof t == "object" && "value" in t;
119
+ let re = class {
91
120
  /** The underlying primitive value */
92
121
  value;
93
122
  constructor(e) {
@@ -107,8 +136,8 @@ let ee = class {
107
136
  return this.value.toString();
108
137
  }
109
138
  };
110
- const Ot = (t) => t != null && typeof t == "object" && "toString" in t, er = (t) => {
111
- if (Ot(t)) return t?.toString().length === 0;
139
+ const Nt = (t) => t != null && typeof t == "object" && "toString" in t, fr = (t) => {
140
+ if (Nt(t)) return t?.toString().length === 0;
112
141
  switch (typeof t) {
113
142
  case "string":
114
143
  return t.length === 0;
@@ -125,15 +154,15 @@ const Ot = (t) => t != null && typeof t == "object" && "toString" in t, er = (t)
125
154
  default:
126
155
  return !1;
127
156
  }
128
- }, xn = (t) => !er(t), Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
157
+ }, Pn = (t) => !fr(t), $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
129
158
  __proto__: null,
130
- ValueExtension: ee,
131
- isCrudeValueExtension: A,
132
- isNonZero: xn,
133
- isStringer: Ot,
134
- isZero: er
135
- }, Symbol.toStringTag, { value: "Module" })), ze = (t, e = !1) => {
136
- const r = Ot(t) ? "stringer" : typeof t;
159
+ ValueExtension: re,
160
+ isCrudeValueExtension: B,
161
+ isNonZero: Pn,
162
+ isStringer: Nt,
163
+ isZero: fr
164
+ }, Symbol.toStringTag, { value: "Module" })), We = (t, e = !1) => {
165
+ const r = Nt(t) ? "stringer" : typeof t;
137
166
  let n;
138
167
  switch (r) {
139
168
  case "string":
@@ -157,83 +186,83 @@ const Ot = (t) => t != null && typeof t == "object" && "toString" in t, er = (t)
157
186
  default:
158
187
  return console.warn(`sortFunc: unknown type ${r}`), () => -1;
159
188
  }
160
- return e ? rr(n) : n;
161
- }, $n = (t, e, r) => {
162
- const n = ze(e[t], r);
189
+ return e ? gr(n) : n;
190
+ }, kn = (t, e, r) => {
191
+ const n = We(e[t], r);
163
192
  return (s, i) => n(s[t], i[t]);
164
- }, Tn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, tr = (t, e) => {
193
+ }, qn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, dr = (t, e) => {
165
194
  if (t.length !== e.length) return t.length - e.length;
166
195
  if (t.length === 0) return 0;
167
- const r = ze(t[0]), n = [...t].sort(r), s = [...e].sort(r);
196
+ const r = We(t[0]), n = [...t].sort(r), s = [...e].sort(r);
168
197
  return n.every((i, o) => i === s[o]) ? 0 : -1;
169
- }, Sn = (t, e) => {
170
- const r = it(t), n = it(e);
171
- return tr(r, n);
172
- }, Nn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, rr = (t) => (e, r) => t(r, e), se = 0, Me = -1, Ee = 1, nr = (t) => t < se, sr = (t) => t > se, In = (t) => t >= se, ir = (t) => t === se, Mn = (t, e) => {
198
+ }, zn = (t, e) => {
199
+ const r = ht(t), n = ht(e);
200
+ return dr(r, n);
201
+ }, Zn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, gr = (t) => (e, r) => t(r, e), ae = 0, Ue = -1, Be = 1, pr = (t) => t < ae, mr = (t) => t > ae, Fn = (t) => t >= ae, yr = (t) => t === ae, Yn = (t, e) => {
173
202
  const r = /([a-zA-Z]+)|(\d+)/g, n = t.replace(/[\s_.-]+/g, "").match(r), s = e.replace(/[\s_.-]+/g, "").match(r);
174
203
  if (!n || !s) return 0;
175
204
  for (let i = 0; i < Math.min(n.length, s.length); i++) {
176
- const o = n[i], c = s[i];
177
- if (isNaN(Number(o)) && isNaN(Number(c))) {
178
- const h = o.localeCompare(c);
179
- if (h !== 0) return h;
180
- } else if (!isNaN(Number(o)) && !isNaN(Number(c))) {
181
- const h = Number(o) - Number(c);
182
- if (h !== 0) return h;
205
+ const o = n[i], h = s[i];
206
+ if (isNaN(Number(o)) && isNaN(Number(h))) {
207
+ const f = o.localeCompare(h);
208
+ if (f !== 0) return f;
209
+ } else if (!isNaN(Number(o)) && !isNaN(Number(h))) {
210
+ const f = Number(o) - Number(h);
211
+ if (f !== 0) return f;
183
212
  } else return isNaN(Number(o)) ? -1 : 1;
184
213
  }
185
214
  return n.length - s.length;
186
- }, Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
215
+ }, Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
187
216
  __proto__: null,
188
- EQUAL: se,
189
- GREATER_THAN: Ee,
190
- LESS_THAN: Me,
191
- isEqualTo: ir,
192
- isGreaterThan: sr,
193
- isGreaterThanEqual: In,
194
- isLessThan: nr,
195
- newF: ze,
196
- newFieldF: $n,
197
- order: Nn,
198
- primitiveArrays: Tn,
199
- reverseF: rr,
200
- stringsWithNumbers: Mn,
201
- uniqueUnorderedPrimitiveArrays: Sn,
202
- unorderedPrimitiveArrays: tr
203
- }, Symbol.toStringTag, { value: "Module" })), Ze = a.tuple([a.number(), a.number()]);
217
+ EQUAL: ae,
218
+ GREATER_THAN: Be,
219
+ LESS_THAN: Ue,
220
+ isEqualTo: yr,
221
+ isGreaterThan: mr,
222
+ isGreaterThanEqual: Fn,
223
+ isLessThan: pr,
224
+ newF: We,
225
+ newFieldF: kn,
226
+ order: Zn,
227
+ primitiveArrays: qn,
228
+ reverseF: gr,
229
+ stringsWithNumbers: Yn,
230
+ uniqueUnorderedPrimitiveArrays: zn,
231
+ unorderedPrimitiveArrays: dr
232
+ }, Symbol.toStringTag, { value: "Module" })), Ve = a.tuple([a.number(), a.number()]);
204
233
  a.tuple([a.bigint(), a.bigint()]);
205
- const vt = a.object({ width: a.number(), height: a.number() }), En = a.object({
234
+ const It = a.object({ width: a.number(), height: a.number() }), Wn = a.object({
206
235
  signedWidth: a.number(),
207
236
  signedHeight: a.number()
208
- }), An = ["width", "height"];
209
- a.enum(An);
210
- const Bn = ["start", "center", "end"], Un = ["signedWidth", "signedHeight"];
211
- a.enum(Un);
212
- const pe = a.object({ x: a.number(), y: a.number() }), ar = a.object({ clientX: a.number(), clientY: a.number() }), Ye = ["x", "y"], xt = a.enum(Ye), $t = ["top", "right", "bottom", "left"], Cn = a.enum($t), Fe = ["left", "right"], Tt = a.enum(Fe), We = ["top", "bottom"], St = a.enum(We), Nt = ["center"], at = a.enum(Nt), jn = [...$t, ...Nt], It = a.enum(jn);
213
- a.enum(Bn);
214
- const Rn = ["first", "last"];
215
- a.enum(Rn);
216
- const or = a.object({ lower: a.number(), upper: a.number() }), Ln = a.object({ lower: a.bigint(), upper: a.bigint() });
217
- a.union([or, Ze]);
218
- a.union([Ln, Ze]);
219
- const Dn = a.enum([...xt.options, ...It.options]);
237
+ }), Vn = ["width", "height"];
238
+ a.enum(Vn);
239
+ const Gn = ["start", "center", "end"], Hn = ["signedWidth", "signedHeight"];
240
+ a.enum(Hn);
241
+ const ye = a.object({ x: a.number(), y: a.number() }), br = a.object({ clientX: a.number(), clientY: a.number() }), Ge = ["x", "y"], Mt = a.enum(Ge), At = ["top", "right", "bottom", "left"], Xn = a.enum(At), He = ["left", "right"], Et = a.enum(He), Xe = ["top", "bottom"], Ut = a.enum(Xe), Bt = ["center"], ft = a.enum(Bt), Jn = [...At, ...Bt], jt = a.enum(Jn);
242
+ a.enum(Gn);
243
+ const Kn = ["first", "last"];
244
+ a.enum(Kn);
245
+ const wr = a.object({ lower: a.number(), upper: a.number() }), Qn = a.object({ lower: a.bigint(), upper: a.bigint() });
246
+ a.union([wr, Ve]);
247
+ a.union([Qn, Ve]);
248
+ const _n = a.enum([...Mt.options, ...jt.options]);
220
249
  a.enum(["x", "left", "right"]);
221
250
  a.enum(["y", "top", "bottom"]);
222
- const Pn = a.union([xt, It, a.instanceof(String)]), ie = (t) => (e, r) => {
251
+ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
223
252
  if (typeof e == "bigint") {
224
- if (Le(r))
253
+ if (ke(r))
225
254
  return t(e, BigInt(r));
226
255
  const n = t(Number(e), Number(r));
227
256
  return typeof n == "number" ? BigInt(Math.round(n)) : n;
228
257
  }
229
258
  return t(Number(e), Number(r));
230
- }, q = ie((t, e) => t - e), ae = ie((t, e) => t + e), kn = (t, e, r = 1e-4) => Math.abs(t - e) < r, ot = (t, e) => {
259
+ }, Z = oe((t, e) => t - e), ue = oe((t, e) => t + e), ts = (t, e, r = 1e-4) => Math.abs(t - e) < r, dt = (t, e) => {
231
260
  const r = typeof t == "bigint", n = typeof e == "bigint";
232
- return r && n ? t === e : r && Le(e) ? t === BigInt(e) : n && Le(t) ? e === BigInt(t) : t === e;
233
- }, qn = (t) => {
261
+ return r && n ? t === e : r && ke(e) ? t === BigInt(e) : n && ke(t) ? e === BigInt(t) : t === e;
262
+ }, rs = (t) => {
234
263
  const e = 10 ** Math.floor(Math.log10(t));
235
264
  return Math.round(t / e) * e;
236
- }, ur = ie((t, e) => t <= e ? t : e), Le = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), zn = ie((t, e) => t >= e ? t : e), lr = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, C = ie((t, e) => t * e), Oe = ie((t, e) => t / e), b = (t, e, r) => {
265
+ }, $r = oe((t, e) => t <= e ? t : e), ke = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), ns = oe((t, e) => t >= e ? t : e), Or = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, R = oe((t, e) => t * e), ve = oe((t, e) => t / e), b = (t, e, r) => {
237
266
  const n = {};
238
267
  if (typeof e == "object" && (r = e, e = void 0), r = { makeValid: !0, ...r }, typeof t == "number" || typeof t == "bigint")
239
268
  e != null ? (n.lower = t, n.upper = e) : (n.lower = typeof t == "bigint" ? 0n : 0, n.upper = t);
@@ -242,64 +271,64 @@ const Pn = a.union([xt, It, a.instanceof(String)]), ie = (t) => (e, r) => {
242
271
  [n.lower, n.upper] = t;
243
272
  } else
244
273
  n.lower = t.lower, n.upper = t.upper;
245
- return r?.makeValid ? cr(n) : n;
246
- }, Zn = Object.freeze({ lower: 0, upper: 0 }), Yn = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), Fn = Object.freeze({ lower: 0, upper: 1 }), Wn = Object.freeze({ lower: -1, upper: 1 }), Vn = (t, e) => {
274
+ return r?.makeValid ? vr(n) : n;
275
+ }, ss = Object.freeze({ lower: 0, upper: 0 }), is = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), as = Object.freeze({ lower: 0, upper: 1 }), os = Object.freeze({ lower: -1, upper: 1 }), us = (t, e) => {
247
276
  if (t == null && e == null) return !0;
248
277
  if (t == null || e == null) return !1;
249
278
  const r = b(t), n = b(e);
250
279
  return r?.lower === n?.lower && r?.upper === n?.upper;
251
- }, cr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, ut = (t, e) => {
280
+ }, vr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, gt = (t, e) => {
252
281
  const r = b(t);
253
282
  return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
254
- }, j = (t, e) => {
283
+ }, L = (t, e) => {
255
284
  const r = b(t);
256
285
  if (typeof e == "number" || typeof e == "bigint")
257
286
  return e >= r.lower && e < r.upper;
258
287
  const n = b(e);
259
288
  return n.lower >= r.lower && n.upper <= r.upper;
260
- }, Gn = (t, e) => {
289
+ }, ls = (t, e) => {
261
290
  const r = b(t), n = b(e);
262
- return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : j(r, n.upper) || j(r, n.lower) || j(n, r.upper) || j(n, r.lower);
263
- }, ve = (t) => {
291
+ 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
+ }, Te = (t) => {
264
293
  const e = b(t);
265
294
  return e.upper - e.lower;
266
- }, Hn = (t) => {
295
+ }, cs = (t) => {
267
296
  const e = b(t);
268
297
  return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
269
- }, Jn = (t) => {
270
- const e = ve(t);
298
+ }, hs = (t) => {
299
+ const e = Te(t);
271
300
  return typeof e == "number" ? e === 0 : e === 0n;
272
- }, Xn = (t) => {
301
+ }, fs = (t) => {
273
302
  const e = b(t);
274
303
  return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
275
- }, Kn = (t) => {
304
+ }, ds = (t) => {
276
305
  const e = b(t);
277
306
  return (e.upper + e.lower) / 2;
278
- }, hr = (t) => ({
307
+ }, Tr = (t) => ({
279
308
  lower: Math.min(...t.map((e) => b(e).lower)),
280
309
  upper: Math.max(...t.map((e) => b(e).upper))
281
- }), Qn = (t) => ({
310
+ }), gs = (t) => ({
282
311
  lower: Math.max(...t.map((e) => b(e).lower)),
283
312
  upper: Math.min(...t.map((e) => b(e).upper))
284
- }), _n = (t) => {
313
+ }), ps = (t) => {
285
314
  const e = b(t), r = typeof e.lower == "bigint";
286
- return Array.from({ length: Number(ve(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
287
- }, lt = (t, e) => {
288
- const r = t.map((i) => b(i)), n = r.findIndex((i) => j(i, e) || e < i.lower);
315
+ return Array.from({ length: Number(Te(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
316
+ }, pt = (t, e) => {
317
+ const r = t.map((i) => b(i)), n = r.findIndex((i) => L(i, e) || e < i.lower);
289
318
  if (n === -1) return { index: t.length, position: 0 };
290
319
  const s = r[n];
291
- return j(s, e) ? { index: n, position: Number(e - s.lower) } : { index: n, position: 0 };
292
- }, _e = {
320
+ return L(s, e) ? { index: n, position: Number(e - s.lower) } : { index: n, position: 0 };
321
+ }, nt = {
293
322
  removeBefore: 0,
294
323
  removeAfter: 0,
295
324
  insertInto: 0,
296
325
  deleteInBetween: 0
297
- }, es = (t, e) => {
326
+ }, ms = (t, e) => {
298
327
  const r = t.map((l) => b(l)), n = b(e);
299
- if (r.length === 0) return _e;
300
- const s = lt(r, n.lower), i = lt(r, n.upper);
301
- if (s.index === t.length) return { ..._e, insertInto: t.length };
302
- if (i.index === 0) return { ..._e, removeAfter: i.position };
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 };
303
332
  if (s.index === i.index)
304
333
  return s.position !== 0 && i.position !== 0 ? null : {
305
334
  removeAfter: i.position,
@@ -307,326 +336,333 @@ const Pn = a.union([xt, It, a.instanceof(String)]), ie = (t) => (e, r) => {
307
336
  insertInto: s.index,
308
337
  deleteInBetween: 0
309
338
  };
310
- let o = i.index - s.index, c = s.index, h = q(Number(ve(r[s.index])), s.position);
311
- return s.position !== 0 ? (o -= 1, c += 1) : h = 0, {
312
- removeBefore: h,
339
+ let o = i.index - s.index, h = s.index, f = Z(Number(Te(r[s.index])), s.position);
340
+ return s.position !== 0 ? (o -= 1, h += 1) : f = 0, {
341
+ removeBefore: f,
313
342
  removeAfter: i.position,
314
- insertInto: c,
343
+ insertInto: h,
315
344
  deleteInBetween: o
316
345
  };
317
- }, fr = (t, e, r) => {
318
- const n = t.map((c) => b(c)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
346
+ }, xr = (t, e, r) => {
347
+ const n = t.map((h) => b(h)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
319
348
  if (s === 0) return e;
320
349
  let i = r, o = e;
321
- for (; ot(i, 0) === !1; ) {
322
- const c = n.findIndex((h) => s > 0 ? o >= h.lower && o < h.upper : o > h.lower && o <= h.upper);
323
- if (c !== -1) {
324
- const h = n[c];
350
+ for (; dt(i, 0) === !1; ) {
351
+ const h = n.findIndex((f) => s > 0 ? o >= f.lower && o < f.upper : o > f.lower && o <= f.upper);
352
+ if (h !== -1) {
353
+ const f = n[h];
325
354
  let l;
326
- if (s > 0 ? l = q(h.upper, o) : l = q(o, h.lower), l > 0) {
327
- const d = ur(lr(i), l);
328
- if (o = ae(
355
+ if (s > 0 ? l = Z(f.upper, o) : l = Z(o, f.lower), l > 0) {
356
+ const d = $r(Or(i), l);
357
+ if (o = ue(
329
358
  o,
330
359
  s > 0 ? d : -d
331
- ), i = q(i, s > 0 ? d : -d), ot(i, 0)) return o;
360
+ ), i = Z(i, s > 0 ? d : -d), dt(i, 0)) return o;
332
361
  continue;
333
362
  }
334
363
  }
335
364
  if (s > 0) {
336
- const h = n.filter((l) => l.lower > o);
337
- if (h.length > 0) o = h[0].lower;
365
+ const f = n.filter((l) => l.lower > o);
366
+ if (f.length > 0) o = f[0].lower;
338
367
  else return o;
339
368
  } else {
340
- const h = n.filter((l) => l.upper < o);
341
- if (h.length > 0)
342
- o = h[h.length - 1].upper;
369
+ const f = n.filter((l) => l.upper < o);
370
+ if (f.length > 0)
371
+ o = f[f.length - 1].upper;
343
372
  else return o;
344
373
  }
345
374
  }
346
375
  return o;
347
- }, dr = (t, e, r) => {
376
+ }, Sr = (t, e, r) => {
348
377
  const n = t.map((o) => b(o));
349
378
  if (e === r) return typeof e == "bigint" ? 0n : 0;
350
379
  const s = e < r ? b([e, r]) : b([r, e]);
351
380
  let i = typeof e == "bigint" ? 0n : 0;
352
381
  for (const o of n) {
353
- const c = o.lower > s.lower ? o.lower : s.lower, h = o.upper < s.upper ? o.upper : s.upper;
354
- if (c < h) {
355
- const l = h - c;
382
+ const h = o.lower > s.lower ? o.lower : s.lower, f = o.upper < s.upper ? o.upper : s.upper;
383
+ if (h < f) {
384
+ const l = f - h;
356
385
  i = i + l;
357
386
  }
358
387
  }
359
388
  return i;
360
- }, jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
389
+ }, vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
361
390
  __proto__: null,
362
- CLIP: Wn,
363
- DECIMAL: Fn,
364
- INFINITE: Yn,
365
- ZERO: Zn,
366
- bounds: or,
367
- buildInsertionPlan: es,
368
- clamp: ut,
391
+ CLIP: os,
392
+ DECIMAL: as,
393
+ INFINITE: is,
394
+ ZERO: ss,
395
+ bounds: wr,
396
+ buildInsertionPlan: ms,
397
+ clamp: gt,
369
398
  construct: b,
370
- contains: j,
371
- distance: dr,
372
- equals: Vn,
373
- findInsertPosition: lt,
374
- isFinite: Xn,
375
- isZero: Hn,
376
- linspace: _n,
377
- makeValid: cr,
378
- max: hr,
379
- mean: Kn,
380
- min: Qn,
381
- overlapsWith: Gn,
382
- span: ve,
383
- spanIsZero: Jn,
384
- traverse: fr
385
- }, Symbol.toStringTag, { value: "Module" })), gr = Dn, k = (t) => Ye.includes(t) ? t : We.includes(t) ? "y" : "x", ts = (t) => k(t) === "x" ? "y" : "x", rs = (t) => k(t) === "x" ? "width" : "height", ns = (t) => k(t) === "x" ? "left" : "top", ss = (t) => gr.safeParse(t).success, is = (t) => k(t) === "x" ? "signedWidth" : "signedHeight", as = (t) => t === "center" ? !1 : k(t) === "x", os = (t) => k(t) === "y", us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
399
+ contains: L,
400
+ distance: Sr,
401
+ equals: us,
402
+ findInsertPosition: pt,
403
+ isFinite: fs,
404
+ isZero: cs,
405
+ linspace: ps,
406
+ makeValid: vr,
407
+ max: Tr,
408
+ mean: ds,
409
+ min: gs,
410
+ overlapsWith: ls,
411
+ span: Te,
412
+ spanIsZero: hs,
413
+ traverse: xr
414
+ }, Symbol.toStringTag, { value: "Module" })), Nr = _n, z = (t) => Ge.includes(t) ? t : Xe.includes(t) ? "y" : "x", ys = (t) => z(t) === "x" ? "y" : "x", bs = (t) => z(t) === "x" ? "width" : "height", ws = (t) => z(t) === "x" ? "left" : "top", $s = (t) => Nr.safeParse(t).success, Os = (t) => z(t) === "x" ? "signedWidth" : "signedHeight", vs = (t) => t === "center" ? !1 : z(t) === "x", Ts = (t) => z(t) === "y", xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
386
415
  __proto__: null,
387
- DIRECTIONS: Ye,
388
- construct: k,
389
- crude: gr,
390
- dimension: rs,
391
- direction: xt,
392
- isDirection: ss,
393
- isX: as,
394
- isY: os,
395
- location: ns,
396
- signedDimension: is,
397
- swap: ts
398
- }, Symbol.toStringTag, { value: "Module" })), ls = Tt, cs = St, hs = at, fs = {
416
+ DIRECTIONS: Ge,
417
+ construct: z,
418
+ crude: Nr,
419
+ dimension: bs,
420
+ direction: Mt,
421
+ isDirection: $s,
422
+ isX: vs,
423
+ isY: Ts,
424
+ location: ws,
425
+ signedDimension: Os,
426
+ swap: ys
427
+ }, Symbol.toStringTag, { value: "Module" })), Ss = Et, Ns = Ut, Is = ft, Ms = {
399
428
  top: "bottom",
400
429
  right: "left",
401
430
  bottom: "top",
402
431
  left: "right",
403
432
  center: "center"
404
- }, ds = {
433
+ }, As = {
405
434
  top: "left",
406
435
  right: "top",
407
436
  bottom: "right",
408
437
  left: "bottom",
409
438
  center: "center"
410
- }, gs = Pn, G = (t) => t instanceof String || !Ye.includes(t) ? t : t === "x" ? "left" : "top", ps = (t) => fs[G(t)], ms = (t) => ds[G(t)], me = (t) => {
411
- const e = G(t);
439
+ }, Es = es, H = (t) => t instanceof String || !Ge.includes(t) ? t : t === "x" ? "left" : "top", Us = (t) => Ms[H(t)], Bs = (t) => As[H(t)], be = (t) => {
440
+ const e = H(t);
412
441
  return e === "top" || e === "bottom" ? "y" : "x";
413
- }, ys = a.object({
414
- x: Tt.or(at),
415
- y: St.or(at)
416
- }), pr = a.object({ x: Tt, y: St }), xe = Object.freeze({ x: "left", y: "top" }), Mt = Object.freeze({ x: "right", y: "top" }), Ve = Object.freeze({ x: "left", y: "bottom" }), Et = Object.freeze({ x: "right", y: "bottom" }), At = Object.freeze({ x: "center", y: "center" }), Bt = Object.freeze({ x: "center", y: "top" }), Ut = Object.freeze({ x: "center", y: "bottom" }), Ct = Object.freeze({ x: "right", y: "center" }), jt = Object.freeze({ x: "left", y: "center" }), ws = Object.freeze([
417
- jt,
418
- Ct,
419
- Bt,
420
- Ut,
442
+ }, js = a.object({
443
+ x: Et.or(ft),
444
+ y: Ut.or(ft)
445
+ }), Ir = a.object({ x: Et, y: Ut }), xe = Object.freeze({ x: "left", y: "top" }), Ct = Object.freeze({ x: "right", y: "top" }), Je = Object.freeze({ x: "left", y: "bottom" }), Rt = Object.freeze({ x: "right", y: "bottom" }), Lt = Object.freeze({ x: "center", y: "center" }), Dt = Object.freeze({ x: "center", y: "top" }), Pt = Object.freeze({ x: "center", y: "bottom" }), kt = Object.freeze({ x: "right", y: "center" }), qt = Object.freeze({ x: "left", y: "center" }), Cs = Object.freeze([
446
+ qt,
447
+ kt,
448
+ Dt,
449
+ Pt,
421
450
  xe,
422
- Mt,
423
- Ve,
424
- Et,
425
- At
426
- ]), Rt = (t, e) => t.x === e.x && t.y === e.y, bs = (t, e) => {
451
+ Ct,
452
+ Je,
453
+ Rt,
454
+ Lt
455
+ ]), zt = (t, e) => t.x === e.x && t.y === e.y, Rs = (t, e) => {
427
456
  if (typeof e == "object") {
428
457
  let r = !0;
429
458
  return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
430
459
  }
431
460
  return t.x === e || t.y === e;
432
- }, mr = (t) => [t.x, t.y], Ae = (t) => me(G(t)) === "x", Os = (t) => me(G(t)) === "y", vs = (t) => `${t.x}${_t(t.y)}`, xs = (t, e) => {
461
+ }, Mr = (t) => [t.x, t.y], je = (t) => be(H(t)) === "x", Ls = (t) => be(H(t)) === "y", Ds = (t) => `${t.x}${hr(t.y)}`, Ps = (t, e) => {
433
462
  let r, n;
434
- if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = G(t), n = G(e ?? t)), me(r) === me(n) && r !== "center" && n !== "center")
463
+ 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")
435
464
  throw new Error(
436
465
  `[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
437
466
  );
438
- const s = { ...At };
439
- return r === "center" ? Ae(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? Ae(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : Ae(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
440
- }, $s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
467
+ const s = { ...Lt };
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
+ }, ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
441
470
  __proto__: null,
442
- BOTTOM_CENTER: Ut,
443
- BOTTOM_LEFT: Ve,
444
- BOTTOM_RIGHT: Et,
445
- CENTER: At,
446
- CENTER_LEFT: jt,
447
- CENTER_LOCATIONS: Nt,
448
- CENTER_RIGHT: Ct,
449
- OUTER_LOCATIONS: $t,
450
- TOP_CENTER: Bt,
471
+ BOTTOM_CENTER: Pt,
472
+ BOTTOM_LEFT: Je,
473
+ BOTTOM_RIGHT: Rt,
474
+ CENTER: Lt,
475
+ CENTER_LEFT: qt,
476
+ CENTER_LOCATIONS: Bt,
477
+ CENTER_RIGHT: kt,
478
+ OUTER_LOCATIONS: At,
479
+ TOP_CENTER: Dt,
451
480
  TOP_LEFT: xe,
452
- TOP_RIGHT: Mt,
453
- XY_LOCATIONS: ws,
454
- X_LOCATIONS: Fe,
455
- Y_LOCATIONS: We,
456
- center: hs,
457
- construct: G,
458
- constructXY: xs,
459
- corner: pr,
460
- crude: gs,
461
- direction: me,
462
- isX: Ae,
463
- isY: Os,
464
- location: It,
465
- outer: Cn,
466
- rotate90: ms,
467
- swap: ps,
468
- x: ls,
469
- xy: ys,
470
- xyCouple: mr,
471
- xyEquals: Rt,
472
- xyMatches: bs,
473
- xyToString: vs,
474
- y: cs
475
- }, Symbol.toStringTag, { value: "Module" })), ct = a.union([
481
+ TOP_RIGHT: Ct,
482
+ XY_LOCATIONS: Cs,
483
+ X_LOCATIONS: He,
484
+ Y_LOCATIONS: Xe,
485
+ center: Is,
486
+ construct: H,
487
+ constructXY: Ps,
488
+ corner: Ir,
489
+ crude: Es,
490
+ direction: be,
491
+ isX: je,
492
+ isY: Ls,
493
+ location: jt,
494
+ outer: Xn,
495
+ rotate90: Bs,
496
+ swap: Us,
497
+ x: Ss,
498
+ xy: js,
499
+ xyCouple: Mr,
500
+ xyEquals: zt,
501
+ xyMatches: Rs,
502
+ xyToString: Ds,
503
+ y: Ns
504
+ }, Symbol.toStringTag, { value: "Module" })), mt = a.union([
476
505
  a.number(),
477
- pe,
478
- Ze,
479
- vt,
480
- En,
481
- ar
506
+ ye,
507
+ Ve,
508
+ It,
509
+ Wn,
510
+ br
482
511
  ]), v = (t, e) => {
483
512
  if (typeof t == "string") {
484
513
  if (e === void 0) throw new Error("The y coordinate must be given.");
485
514
  return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
486
515
  }
487
516
  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 };
488
- }, P = Object.freeze({ x: 0, y: 0 }), yr = Object.freeze({ x: 1, y: 1 }), Ts = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ss = Object.freeze({ x: NaN, y: NaN }), De = (t, e, r = 0) => {
517
+ }, q = Object.freeze({ x: 0, y: 0 }), Ar = Object.freeze({ x: 1, y: 1 }), qs = Object.freeze({ x: 1 / 0, y: 1 / 0 }), zs = Object.freeze({ x: NaN, y: NaN }), qe = (t, e, r = 0) => {
489
518
  const n = v(t), s = v(e);
490
519
  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;
491
- }, Ns = (t) => De(t, P), Lt = (t, e, r) => {
520
+ }, Zs = (t) => qe(t, q), Zt = (t, e, r) => {
492
521
  const n = v(t), s = v(e, r);
493
522
  return { x: n.x * s.x, y: n.y * s.y };
494
- }, wr = (t, e) => {
523
+ }, Er = (t, e) => {
495
524
  const r = v(t);
496
525
  return { x: r.x + e, y: r.y };
497
- }, br = (t, e) => {
526
+ }, Ur = (t, e) => {
498
527
  const r = v(t);
499
528
  return { x: r.x, y: r.y + e };
500
- }, ye = (t, e, r, ...n) => {
529
+ }, we = (t, e, r, ...n) => {
501
530
  if (typeof e == "string") {
502
531
  if (typeof r != "number") throw new Error("The value must be a number.");
503
- return e === "x" ? wr(t, r) : br(t, r);
532
+ return e === "x" ? Er(t, r) : Ur(t, r);
504
533
  }
505
534
  if (typeof e == "object" && "x" in e && typeof e.x == "string") {
506
535
  const s = v(r), i = v(t);
507
536
  return e.x === "left" ? s.x = -s.x : e.x === "center" && (s.x = 0), e.y === "top" ? s.y = -s.y : e.y === "center" && (s.y = 0), { x: i.x + s.x, y: i.y + s.y };
508
537
  }
509
- return [t, e, r ?? P, ...n].reduce((s, i) => {
538
+ return [t, e, r ?? q, ...n].reduce((s, i) => {
510
539
  const o = v(i);
511
540
  return { x: s.x + o.x, y: s.y + o.y };
512
- }, P);
513
- }, Is = (t, e, r) => {
541
+ }, q);
542
+ }, Fs = (t, e, r) => {
514
543
  const n = v(t);
515
544
  return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
516
- }, Ms = (t, e) => {
545
+ }, Ys = (t, e) => {
517
546
  const r = v(t), n = v(e);
518
547
  return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
519
- }, Es = (t, e) => {
548
+ }, Ws = (t, e) => {
520
549
  const r = v(t), n = v(e);
521
550
  return { x: n.x - r.x, y: n.y - r.y };
522
- }, As = (t) => {
551
+ }, Vs = (t) => {
523
552
  const e = v(t);
524
553
  return Number.isNaN(e.x) || Number.isNaN(e.y);
525
- }, Bs = (t) => {
554
+ }, Gs = (t) => {
526
555
  const e = v(t);
527
556
  return Number.isFinite(e.x) && Number.isFinite(e.y);
528
- }, Us = (t) => {
557
+ }, Hs = (t) => {
529
558
  const e = v(t);
530
559
  return [e.x, e.y];
531
- }, Cs = (t) => {
560
+ }, Xs = (t) => {
532
561
  const e = v(t);
533
562
  return { left: e.x, top: e.y };
534
- }, ht = (t, e = 0) => {
563
+ }, yt = (t, e = 0) => {
535
564
  const r = v(t);
536
- return { x: Number(r.x.toFixed(e)), y: Number(r.y.toFixed(e)) };
537
- }, ue = (t, e) => {
565
+ return {
566
+ x: Number(r.x.toFixed(e)),
567
+ y: Number(r.y.toFixed(e))
568
+ };
569
+ }, ce = (t, e) => {
538
570
  const r = v(t), n = v(e);
539
571
  return { x: r.x - n.x, y: r.y - n.y };
540
- }, le = (t) => {
572
+ }, he = (t) => {
541
573
  const e = v(t), r = Math.hypot(e.x, e.y);
542
574
  return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
543
- }, Or = (t) => {
575
+ }, Br = (t) => {
544
576
  const e = v(t), r = Math.hypot(e.x, e.y);
545
577
  return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
546
- }, vr = (...t) => {
547
- const e = t.reduce((r, n) => ye(r, n), P);
548
- return Lt(e, 1 / t.length);
549
- }, js = (t, e) => {
578
+ }, jr = (...t) => {
579
+ const e = t.reduce((r, n) => we(r, n), q);
580
+ return Zt(e, 1 / t.length);
581
+ }, Js = (t, e) => {
550
582
  const r = [];
551
583
  for (let n = 0; n < t.length; n++) {
552
584
  const s = t[n];
553
- let i, o, c, h;
585
+ let i, o, h, f;
554
586
  if (n === 0) {
555
- const l = t[n + 1], d = ue(l, s);
556
- o = le(d), c = o, h = e;
587
+ const l = t[n + 1], d = ce(l, s);
588
+ o = he(d), h = o, f = e;
557
589
  } else if (n === t.length - 1) {
558
- const l = t[n - 1], d = ue(s, l);
559
- i = le(d), c = i, h = e;
590
+ const l = t[n - 1], d = ce(s, l);
591
+ i = he(d), h = i, f = e;
560
592
  } else {
561
- const l = t[n - 1], d = t[n + 1], y = ue(s, l), p = ue(d, s);
562
- i = le(y), o = le(p);
563
- const L = Math.acos(
564
- (y.x * p.x + y.y * p.y) / (Math.hypot(y.x, y.y) * Math.hypot(p.x, p.y))
565
- ), B = Math.sin(L / 2);
566
- B === 0 ? h = e : h = e / B, c = Or(vr(i, o));
593
+ const l = t[n - 1], d = t[n + 1], m = ce(s, l), p = ce(d, s);
594
+ i = he(m), o = he(p);
595
+ const A = Math.acos(
596
+ (m.x * p.x + m.y * p.y) / (Math.hypot(m.x, m.y) * Math.hypot(p.x, p.y))
597
+ ), U = Math.sin(A / 2);
598
+ U === 0 ? f = e : f = e / U, h = Br(jr(i, o));
567
599
  }
568
- r.push(Lt(c, h));
600
+ r.push(Zt(h, f));
569
601
  }
570
602
  return r;
571
- }, Rs = (t) => {
603
+ }, Ks = (t) => {
572
604
  const e = v(t);
573
605
  return { x: e.y, y: e.x };
574
- }, ft = (t) => {
606
+ }, bt = (t) => {
575
607
  const e = v(t);
576
608
  return { x: Math.round(e.x), y: Math.round(e.y) };
577
- }, Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
609
+ }, Qs = (t) => {
610
+ const e = v(t);
611
+ return { x: 1 / e.x, y: 1 / e.y };
612
+ }, Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
578
613
  __proto__: null,
579
- INFINITY: Ts,
580
- NAN: Ss,
581
- ONE: yr,
582
- ZERO: P,
583
- average: vr,
584
- calculateMiters: js,
585
- clientXY: ar,
614
+ INFINITY: qs,
615
+ NAN: zs,
616
+ ONE: Ar,
617
+ ZERO: q,
618
+ average: jr,
619
+ calculateMiters: Js,
620
+ clientXY: br,
586
621
  construct: v,
587
- couple: Us,
588
- crudeZ: ct,
589
- css: Cs,
590
- distance: Ms,
591
- equals: De,
592
- isFinite: Bs,
593
- isNan: As,
594
- isZero: Ns,
595
- normal: le,
596
- normalize: Or,
597
- round: ft,
598
- scale: Lt,
599
- set: Is,
600
- sub: ue,
601
- swap: Rs,
602
- translate: ye,
603
- translateX: wr,
604
- translateY: br,
605
- translation: Es,
606
- truncate: ht,
607
- xy: pe
608
- }, Symbol.toStringTag, { value: "Module" })), Te = a.union([a.number(), a.string()]), Ls = a.object({
609
- top: Te,
610
- left: Te,
611
- width: Te,
612
- height: Te
613
- }), Ds = a.object({
622
+ couple: Hs,
623
+ crudeZ: mt,
624
+ css: Xs,
625
+ distance: Ys,
626
+ equals: qe,
627
+ isFinite: Gs,
628
+ isNan: Vs,
629
+ isZero: Zs,
630
+ normal: he,
631
+ normalize: Br,
632
+ reciprocal: Qs,
633
+ round: bt,
634
+ scale: Zt,
635
+ set: Fs,
636
+ sub: ce,
637
+ swap: Ks,
638
+ translate: we,
639
+ translateX: Er,
640
+ translateY: Ur,
641
+ translation: Ws,
642
+ truncate: yt,
643
+ xy: ye
644
+ }, Symbol.toStringTag, { value: "Module" })), Ne = a.union([a.number(), a.string()]), _s = a.object({
645
+ top: Ne,
646
+ left: Ne,
647
+ width: Ne,
648
+ height: Ne
649
+ }), ei = a.object({
614
650
  left: a.number(),
615
651
  top: a.number(),
616
652
  right: a.number(),
617
653
  bottom: a.number()
618
- }), Ps = a.object({
619
- one: pe,
620
- two: pe,
621
- root: pr
622
- }), xr = { one: P, two: P, root: xe }, ks = { one: P, two: yr, root: Ve }, $r = (t, e) => ({
654
+ }), ti = a.object({
655
+ one: ye,
656
+ two: ye,
657
+ root: Ir
658
+ }), Cr = { one: q, two: q, root: xe }, ri = { one: q, two: Ar, root: Je }, Rr = (t, e) => ({
623
659
  one: t.one,
624
660
  two: t.two,
625
661
  root: e ?? t.root
626
- }), $ = (t, e, r = 0, n = 0, s) => {
662
+ }), x = (t, e, r = 0, n = 0, s) => {
627
663
  const i = {
628
- one: { ...P },
629
- two: { ...P },
664
+ one: { ...q },
665
+ two: { ...q },
630
666
  root: s ?? xe
631
667
  };
632
668
  if (typeof t == "number") {
@@ -641,219 +677,219 @@ const Pn = a.union([xt, It, a.instanceof(String)]), ie = (t) => (e, r) => {
641
677
  x: i.one.x + e.signedWidth,
642
678
  y: i.one.y + e.signedHeight
643
679
  } : i.two = e, i));
644
- }, qs = (t, e, r) => {
645
- const n = $(t);
680
+ }, ni = (t, e, r) => {
681
+ const n = x(t);
646
682
  if (typeof e == "string") {
647
683
  if (r == null) throw new Error("Invalid arguments for resize");
648
- const s = k(e);
649
- return $(
684
+ const s = z(e);
685
+ return x(
650
686
  n.one,
651
687
  void 0,
652
- s === "x" ? r : H(n),
688
+ s === "x" ? r : X(n),
653
689
  s === "y" ? r : J(n),
654
690
  n.root
655
691
  );
656
692
  }
657
- return $(n.one, e, void 0, void 0, n.root);
658
- }, zs = (t, e, r = !0) => {
659
- const n = $(t);
693
+ return x(n.one, e, void 0, void 0, n.root);
694
+ }, si = (t, e, r = !0) => {
695
+ const n = x(t);
660
696
  let s = (i, o) => i < o;
661
- return r && (s = (i, o) => i <= o), "one" in e ? s(W(n), W(e)) && s(K(e), K(n)) && s(V(n), V(e)) && s(Q(e), Q(n)) : s(W(n), e.x) && s(e.x, K(n)) && s(V(n), e.y) && s(e.y, Q(n));
662
- }, Zs = (t, e) => De(t.one, e.one) && De(t.two, e.two) && Rt(t.root, e.root), Tr = (t) => ({
663
- width: H(t),
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
+ }, ii = (t, e) => qe(t.one, e.one) && qe(t.two, e.two) && zt(t.root, e.root), Lr = (t) => ({
699
+ width: X(t),
664
700
  height: J(t)
665
- }), Ys = (t) => ({
666
- signedWidth: Ge(t),
667
- signedHeight: He(t)
668
- }), Fs = (t) => ({
669
- top: V(t),
670
- left: W(t),
671
- width: H(t),
701
+ }), ai = (t) => ({
702
+ signedWidth: Ke(t),
703
+ signedHeight: Qe(t)
704
+ }), oi = (t) => ({
705
+ top: G(t),
706
+ left: V(t),
707
+ width: X(t),
672
708
  height: J(t)
673
- }), Dt = (t, e, r = !1) => {
674
- const n = k(e) === "y" ? He(t) : Ge(t);
709
+ }), Ft = (t, e, r = !1) => {
710
+ const n = z(e) === "y" ? Qe(t) : Ke(t);
675
711
  return r ? n : Math.abs(n);
676
- }, z = (t, e) => {
677
- const r = $(t);
712
+ }, F = (t, e) => {
713
+ const r = x(t);
678
714
  return {
679
- x: e.x === "center" ? dt(r).x : _(r, e.x),
680
- y: e.y === "center" ? dt(r).y : _(r, e.y)
715
+ x: e.x === "center" ? wt(r).x : te(r, e.x),
716
+ y: e.y === "center" ? wt(r).y : te(r, e.y)
681
717
  };
682
- }, _ = (t, e) => {
683
- const r = $(t), n = mr(r.root).includes(e) ? Math.min : Math.max;
684
- return Fe.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
685
- }, Ws = (t) => t.one.x === t.two.x && t.one.y === t.two.y, H = (t) => Dt(t, "x"), J = (t) => Dt(t, "y"), Ge = (t) => {
686
- const e = $(t);
718
+ }, te = (t, e) => {
719
+ const r = x(t), n = Mr(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
+ }, ui = (t) => kr(t) === 0, X = (t) => Ft(t, "x"), J = (t) => Ft(t, "y"), Ke = (t) => {
722
+ const e = x(t);
687
723
  return e.two.x - e.one.x;
688
- }, He = (t) => {
689
- const e = $(t);
724
+ }, Qe = (t) => {
725
+ const e = x(t);
690
726
  return e.two.y - e.one.y;
691
- }, Sr = (t) => z(t, xe), Vs = (t) => z(t, Bt), Gs = (t) => z(t, Mt), Hs = (t) => z(t, Ve), Js = (t) => z(t, Ut), Xs = (t) => z(t, Et), Ks = (t) => z(t, jt), Qs = (t) => z(t, Ct), K = (t) => _(t, "right"), Q = (t) => _(t, "bottom"), W = (t) => _(t, "left"), V = (t) => _(t, "top"), dt = (t) => ye(Sr(t), {
692
- x: Ge(t) / 2,
693
- y: He(t) / 2
694
- }), Pt = (t) => {
695
- const e = $(t);
696
- return e.root.x === "left" ? W(e) : K(e);
697
- }, kt = (t) => {
698
- const e = $(t);
699
- return e.root.y === "top" ? V(e) : Q(e);
700
- }, _s = (t) => ({ x: Pt(t), y: kt(t) }), Be = (t) => {
701
- const e = $(t);
727
+ }, Dr = (t) => F(t, xe), li = (t) => F(t, Dt), ci = (t) => F(t, Ct), hi = (t) => F(t, Je), fi = (t) => F(t, Pt), di = (t) => F(t, Rt), gi = (t) => F(t, qt), pi = (t) => F(t, kt), _ = (t) => te(t, "right"), ee = (t) => te(t, "bottom"), V = (t) => te(t, "left"), G = (t) => te(t, "top"), wt = (t) => we(Dr(t), {
728
+ x: Ke(t) / 2,
729
+ y: Qe(t) / 2
730
+ }), Yt = (t) => {
731
+ const e = x(t);
732
+ return e.root.x === "left" ? V(e) : _(e);
733
+ }, Wt = (t) => {
734
+ const e = x(t);
735
+ return e.root.y === "top" ? G(e) : ee(e);
736
+ }, mi = (t) => ({ x: Yt(t), y: Wt(t) }), Ce = (t) => {
737
+ const e = x(t);
702
738
  return { lower: e.one.x, upper: e.two.x };
703
- }, Ue = (t) => {
704
- const e = $(t);
739
+ }, Re = (t) => {
740
+ const e = x(t);
705
741
  return { lower: e.one.y, upper: e.two.y };
706
- }, ei = (t, e) => $r(t, e), ti = (t, e) => {
707
- const r = $(t), n = Fe.includes(e) ? "x" : We.includes(e) ? "y" : null;
742
+ }, yi = (t, e) => Rr(t, e), bi = (t, e) => {
743
+ const r = x(t), n = He.includes(e) ? "x" : Xe.includes(e) ? "y" : null;
708
744
  if (n === null) throw new Error(`Invalid location: ${e}`);
709
745
  const s = e === "top" || e === "left" ? Math.min : Math.max, i = { ...r.one }, o = { ...r.two };
710
746
  return i[n] = s(r.one[n], r.two[n]), o[n] = s(r.one[n], r.two[n]), [i, o];
711
- }, ri = (t, e) => {
712
- const r = $(t), n = $(e), s = Pt(n) + (H(n) - H(r)) / 2, i = kt(n) + (J(n) - J(r)) / 2;
713
- return $({ x: s, y: i }, Tr(r));
714
- }, Nr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, ni = (t) => H(t) / J(t), si = (t, e, r) => {
747
+ }, wi = (t, e) => {
748
+ const r = x(t), n = x(e), s = Yt(n) + (X(n) - X(r)) / 2, i = Wt(n) + (J(n) - J(r)) / 2;
749
+ return x({ x: s, y: i }, Lr(r));
750
+ }, Pr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, $i = (t) => X(t) / J(t), Oi = (t, e, r) => {
715
751
  if (typeof e == "string") {
716
752
  if (r == null) throw new Error("Undefined amount passed into box.translate");
717
- const s = k(e);
753
+ const s = z(e);
718
754
  e = v(s, r);
719
755
  }
720
- const n = $(t);
721
- return $(
722
- ye(n.one, e),
723
- ye(n.two, e),
756
+ const n = x(t);
757
+ return x(
758
+ we(n.one, e),
759
+ we(n.two, e),
724
760
  void 0,
725
761
  void 0,
726
762
  n.root
727
763
  );
728
- }, ii = (t, e) => {
729
- const r = Math.max(W(t), W(e)), n = Math.max(V(t), V(e)), s = Math.min(K(t), K(e)), i = Math.min(Q(t), Q(e));
730
- return r > s || n > i ? xr : $({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
731
- }, ai = (t) => H(t) * J(t), oi = (t, e) => {
732
- const r = $(t);
733
- return $(
734
- ht(r.one, e),
735
- ht(r.two, e),
764
+ }, vi = (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 ? Cr : x({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
767
+ }, kr = (t) => X(t) * J(t), Ti = (t, e) => {
768
+ const r = x(t);
769
+ return x(
770
+ yt(r.one, e),
771
+ yt(r.two, e),
736
772
  void 0,
737
773
  void 0,
738
774
  r.root
739
775
  );
740
- }, ui = (t, e, r, n, s, i) => {
741
- const o = { x: t, y: e }, c = { x: t + r, y: e + n };
742
- return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, c.x -= r / 2) : (o.x -= r, c.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, c.y -= n / 2) : (o.y -= n, c.y -= n)), $(o, c, void 0, void 0, i);
743
- }, li = (t) => {
744
- const e = $(t);
745
- return $(ft(e.one), ft(e.two), void 0, void 0, e.root);
746
- }, Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
776
+ }, xi = (t, e, r, n, s, i) => {
777
+ const o = { x: t, y: e }, h = { x: t + r, y: e + n };
778
+ return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, h.x -= r / 2) : (o.x -= r, h.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, h.y -= n / 2) : (o.y -= n, h.y -= n)), x(o, h, void 0, void 0, i);
779
+ }, Si = (t) => {
780
+ const e = x(t);
781
+ return x(bt(e.one), bt(e.two), void 0, void 0, e.root);
782
+ }, xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
747
783
  __proto__: null,
748
- DECIMAL: ks,
749
- ZERO: xr,
750
- area: ai,
751
- areaIsZero: Ws,
752
- aspect: ni,
753
- bottom: Q,
754
- bottomCenter: Js,
755
- bottomLeft: Hs,
756
- bottomRight: Xs,
757
- box: Ps,
758
- center: dt,
759
- centerLeft: Ks,
760
- centerRight: Qs,
761
- construct: $,
762
- constructWithAlternateRoot: ui,
763
- contains: zs,
764
- copy: $r,
765
- css: Fs,
766
- cssBox: Ls,
767
- dim: Dt,
768
- dims: Tr,
769
- domRect: Ds,
770
- edgePoints: ti,
771
- equals: Zs,
784
+ DECIMAL: ri,
785
+ ZERO: Cr,
786
+ area: kr,
787
+ areaIsZero: ui,
788
+ aspect: $i,
789
+ bottom: ee,
790
+ bottomCenter: fi,
791
+ bottomLeft: hi,
792
+ bottomRight: di,
793
+ box: ti,
794
+ center: wt,
795
+ centerLeft: gi,
796
+ centerRight: pi,
797
+ construct: x,
798
+ constructWithAlternateRoot: xi,
799
+ contains: si,
800
+ copy: Rr,
801
+ css: oi,
802
+ cssBox: _s,
803
+ dim: Ft,
804
+ dims: Lr,
805
+ domRect: ei,
806
+ edgePoints: bi,
807
+ equals: ii,
772
808
  height: J,
773
- intersection: ii,
774
- isBox: Nr,
775
- left: W,
776
- loc: _,
777
- positionInCenter: ri,
778
- reRoot: ei,
779
- resize: qs,
780
- right: K,
781
- root: _s,
782
- round: li,
783
- signedDims: Ys,
784
- signedHeight: He,
785
- signedWidth: Ge,
786
- top: V,
787
- topCenter: Vs,
788
- topLeft: Sr,
789
- topRight: Gs,
790
- translate: si,
791
- truncate: oi,
792
- width: H,
793
- x: Pt,
794
- xBounds: Be,
795
- xyLoc: z,
796
- y: kt,
797
- yBounds: Ue
798
- }, Symbol.toStringTag, { value: "Module" })), Ir = a.object({ signedWidth: a.number(), signedHeight: a.number() }), ci = a.union([vt, Ir, pe, Ze]), hi = { width: 0, height: 0 }, fi = { width: 1, height: 1 }, R = (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 }, di = (t, e) => {
809
+ intersection: vi,
810
+ isBox: Pr,
811
+ left: V,
812
+ loc: te,
813
+ positionInCenter: wi,
814
+ reRoot: yi,
815
+ resize: ni,
816
+ right: _,
817
+ root: mi,
818
+ round: Si,
819
+ signedDims: ai,
820
+ signedHeight: Qe,
821
+ signedWidth: Ke,
822
+ top: G,
823
+ topCenter: li,
824
+ topLeft: Dr,
825
+ topRight: ci,
826
+ translate: Oi,
827
+ truncate: Ti,
828
+ width: X,
829
+ x: Yt,
830
+ xBounds: Ce,
831
+ xyLoc: F,
832
+ y: Wt,
833
+ yBounds: Re
834
+ }, Symbol.toStringTag, { value: "Module" })), qr = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Ni = a.union([It, qr, ye, Ve]), Ii = { width: 0, height: 0 }, Mi = { 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 }, Ai = (t, e) => {
799
835
  if (e == null) return !1;
800
- const r = R(t), n = R(e);
836
+ const r = D(t), n = D(e);
801
837
  return r.width === n.width && r.height === n.height;
802
- }, gi = (t) => {
803
- const e = R(t);
838
+ }, Ei = (t) => {
839
+ const e = D(t);
804
840
  return { width: e.height, height: e.width };
805
- }, pi = (t) => {
806
- const e = R(t);
841
+ }, Ui = (t) => {
842
+ const e = D(t);
807
843
  return `0 0 ${e.width} ${e.height}`;
808
- }, mi = (t) => {
809
- const e = R(t);
844
+ }, Bi = (t) => {
845
+ const e = D(t);
810
846
  return [e.width, e.height];
811
- }, yi = (t) => ({
812
- width: Math.max(...t.map((e) => R(e).width)),
813
- height: Math.max(...t.map((e) => R(e).height))
814
- }), wi = (t) => ({
815
- width: Math.min(...t.map((e) => R(e).width)),
816
- height: Math.min(...t.map((e) => R(e).height))
817
- }), bi = (t, e) => {
818
- const r = R(t);
847
+ }, ji = (t) => ({
848
+ width: Math.max(...t.map((e) => D(e).width)),
849
+ height: Math.max(...t.map((e) => D(e).height))
850
+ }), Ci = (t) => ({
851
+ width: Math.min(...t.map((e) => D(e).width)),
852
+ height: Math.min(...t.map((e) => D(e).height))
853
+ }), Ri = (t, e) => {
854
+ const r = D(t);
819
855
  return { width: r.width * e, height: r.height * e };
820
- }, Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
856
+ }, Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
821
857
  __proto__: null,
822
- DECIMAL: fi,
823
- ZERO: hi,
824
- construct: R,
825
- couple: mi,
826
- crude: ci,
827
- dimensions: vt,
828
- equals: di,
829
- max: yi,
830
- min: wi,
831
- scale: bi,
832
- signed: Ir,
833
- svgViewBox: pi,
834
- swap: gi
835
- }, Symbol.toStringTag, { value: "Module" })), Oi = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, vi = a.object({ offset: ct, scale: ct }), xi = a.object({ offset: a.number(), scale: a.number() }), $i = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
858
+ DECIMAL: Mi,
859
+ ZERO: Ii,
860
+ construct: D,
861
+ couple: Bi,
862
+ crude: Ni,
863
+ dimensions: It,
864
+ equals: Ai,
865
+ max: ji,
866
+ min: Ci,
867
+ scale: Ri,
868
+ signed: qr,
869
+ svgViewBox: Ui,
870
+ swap: Ei
871
+ }, Symbol.toStringTag, { value: "Module" })), Li = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, Di = a.object({ offset: mt, scale: mt }), Pi = a.object({ offset: a.number(), scale: a.number() }), ki = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
836
872
  e,
837
873
  s ? n - t : n + t
838
- ], Ti = (t) => (e, r, n, s) => [
874
+ ], qi = (t) => (e, r, n, s) => [
839
875
  e,
840
876
  s ? n / t : n * t
841
- ], Si = (t) => (e, r, n) => {
877
+ ], zi = (t) => (e, r, n) => {
842
878
  if (e === null) return [t, n];
843
- const { lower: s, upper: i } = e, { lower: o, upper: c } = t, h = i - s, l = c - o;
844
- if (r === "dimension") return [t, n * (l / h)];
845
- const d = (n - s) * (l / h) + o;
879
+ const { lower: s, upper: i } = e, { lower: o, upper: h } = t, f = i - s, l = h - o;
880
+ if (r === "dimension") return [t, n * (l / f)];
881
+ const d = (n - s) * (l / f) + o;
846
882
  return [t, d];
847
- }, Ni = (t) => (e, r, n) => [t, n], Ii = () => (t, e, r) => {
883
+ }, Zi = (t) => (e, r, n) => [t, n], Fi = () => (t, e, r) => {
848
884
  if (t === null) throw new Error("cannot invert without bounds");
849
885
  if (e === "dimension") return [t, r];
850
886
  const { lower: n, upper: s } = t;
851
887
  return [t, s - (r - n)];
852
- }, Mi = (t) => (e, r, n) => {
888
+ }, Yi = (t) => (e, r, n) => {
853
889
  const { lower: s, upper: i } = t;
854
- return n = Oi(n, s, i), [e, n];
890
+ return n = Li(n, s, i), [e, n];
855
891
  };
856
- let gt = class re {
892
+ let $t = class se {
857
893
  ops = [];
858
894
  currBounds = null;
859
895
  currType = null;
@@ -867,7 +903,7 @@ let gt = class re {
867
903
  * @param value - The amount to translate by.
868
904
  */
869
905
  static translate(e) {
870
- return new re().translate(e);
906
+ return new se().translate(e);
871
907
  }
872
908
  /**
873
909
  * @returns a new scale with a magnification as its first operation. Any number provided
@@ -875,10 +911,10 @@ let gt = class re {
875
911
  * @param value - The amount to translate by.
876
912
  */
877
913
  static magnify(e) {
878
- return new re().magnify(e);
914
+ return new se().magnify(e);
879
915
  }
880
916
  static scale(e, r) {
881
- return new re().scale(e, r);
917
+ return new se().scale(e, r);
882
918
  }
883
919
  /**
884
920
  * @returns a copy of the scale with a translation as its next operation. Any
@@ -887,7 +923,7 @@ let gt = class re {
887
923
  * @param value - The amount to translate by.
888
924
  */
889
925
  translate(e) {
890
- const r = this.new(), n = $i(e);
926
+ const r = this.new(), n = ki(e);
891
927
  return n.type = "translate", r.ops.push(n), r;
892
928
  }
893
929
  /**
@@ -897,23 +933,23 @@ let gt = class re {
897
933
  * @param value - The amount to magnify by.
898
934
  */
899
935
  magnify(e) {
900
- const r = this.new(), n = Ti(e);
936
+ const r = this.new(), n = qi(e);
901
937
  return n.type = "magnify", r.ops.push(n), r;
902
938
  }
903
939
  scale(e, r) {
904
- const n = b(e, r), s = this.new(), i = Si(n);
940
+ const n = b(e, r), s = this.new(), i = zi(n);
905
941
  return i.type = "scale", s.ops.push(i), s;
906
942
  }
907
943
  clamp(e, r) {
908
- const n = b(e, r), s = this.new(), i = Mi(n);
944
+ const n = b(e, r), s = this.new(), i = Yi(n);
909
945
  return i.type = "clamp", s.ops.push(i), s;
910
946
  }
911
947
  reBound(e, r) {
912
- const n = b(e, r), s = this.new(), i = Ni(n);
948
+ const n = b(e, r), s = this.new(), i = Zi(n);
913
949
  return i.type = "re-bound", s.ops.push(i), s;
914
950
  }
915
951
  invert() {
916
- const e = Ii();
952
+ const e = Fi();
917
953
  e.type = "invert";
918
954
  const r = this.new();
919
955
  return r.ops.push(e), r;
@@ -925,7 +961,7 @@ let gt = class re {
925
961
  return this.exec("dimension", e);
926
962
  }
927
963
  new() {
928
- const e = new re();
964
+ const e = new se();
929
965
  return e.ops = this.ops.slice(), e.reversed = this.reversed, e;
930
966
  }
931
967
  exec(e, r) {
@@ -939,9 +975,9 @@ let gt = class re {
939
975
  e.ops.reverse();
940
976
  const r = [];
941
977
  return e.ops.forEach((n, s) => {
942
- if (n.type === "scale" || r.some(([o, c]) => s >= o && s <= c))
978
+ if (n.type === "scale" || r.some(([o, h]) => s >= o && s <= h))
943
979
  return;
944
- const i = e.ops.findIndex((o, c) => o.type === "scale" && c > s);
980
+ const i = e.ops.findIndex((o, h) => o.type === "scale" && h > s);
945
981
  i !== -1 && r.push([s, i]);
946
982
  }), r.forEach(([n, s]) => {
947
983
  const i = e.ops.slice(n, s);
@@ -951,34 +987,34 @@ let gt = class re {
951
987
  get transform() {
952
988
  return { scale: this.dim(1), offset: this.pos(0) };
953
989
  }
954
- static IDENTITY = new re();
955
- }, Ei = class D {
990
+ static IDENTITY = new se();
991
+ }, Wi = class P {
956
992
  x;
957
993
  y;
958
994
  currRoot;
959
- constructor(e = new gt(), r = new gt(), n = null) {
995
+ constructor(e = new $t(), r = new $t(), n = null) {
960
996
  this.x = e, this.y = r, this.currRoot = n;
961
997
  }
962
998
  static translate(e, r) {
963
- return new D().translate(e, r);
999
+ return new P().translate(e, r);
964
1000
  }
965
1001
  static translateX(e) {
966
- return new D().translateX(e);
1002
+ return new P().translateX(e);
967
1003
  }
968
1004
  static translateY(e) {
969
- return new D().translateY(e);
1005
+ return new P().translateY(e);
970
1006
  }
971
1007
  static clamp(e) {
972
- return new D().clamp(e);
1008
+ return new P().clamp(e);
973
1009
  }
974
1010
  static magnify(e) {
975
- return new D().magnify(e);
1011
+ return new P().magnify(e);
976
1012
  }
977
1013
  static scale(e) {
978
- return new D().scale(e);
1014
+ return new P().scale(e);
979
1015
  }
980
1016
  static reBound(e) {
981
- return new D().reBound(e);
1017
+ return new P().reBound(e);
982
1018
  }
983
1019
  translate(e, r) {
984
1020
  const n = v(e, r), s = this.copy();
@@ -998,22 +1034,22 @@ let gt = class re {
998
1034
  }
999
1035
  scale(e) {
1000
1036
  const r = this.copy();
1001
- if (Nr(e)) {
1037
+ if (Pr(e)) {
1002
1038
  const n = this.currRoot;
1003
- return r.currRoot = e.root, n != null && !Rt(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(Ue(e)), r;
1039
+ return r.currRoot = e.root, n != null && !zt(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;
1004
1040
  }
1005
1041
  return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
1006
1042
  }
1007
1043
  reBound(e) {
1008
1044
  const r = this.copy();
1009
- return r.x = this.x.reBound(Be(e)), r.y = this.y.reBound(Ue(e)), r;
1045
+ return r.x = this.x.reBound(Ce(e)), r.y = this.y.reBound(Re(e)), r;
1010
1046
  }
1011
1047
  clamp(e) {
1012
1048
  const r = this.copy();
1013
- return r.x = this.x.clamp(Be(e)), r.y = this.y.clamp(Ue(e)), r;
1049
+ return r.x = this.x.clamp(Ce(e)), r.y = this.y.clamp(Re(e)), r;
1014
1050
  }
1015
1051
  copy() {
1016
- const e = new D();
1052
+ const e = new P();
1017
1053
  return e.currRoot = this.currRoot, e.x = this.x, e.y = this.y, e;
1018
1054
  }
1019
1055
  reverse() {
@@ -1027,7 +1063,7 @@ let gt = class re {
1027
1063
  return { x: this.x.dim(e.x), y: this.y.dim(e.y) };
1028
1064
  }
1029
1065
  box(e) {
1030
- return $(
1066
+ return x(
1031
1067
  this.pos(e.one),
1032
1068
  this.pos(e.two),
1033
1069
  0,
@@ -1041,62 +1077,62 @@ let gt = class re {
1041
1077
  offset: this.pos({ x: 0, y: 0 })
1042
1078
  };
1043
1079
  }
1044
- static IDENTITY = new D();
1080
+ static IDENTITY = new P();
1045
1081
  };
1046
- const Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1082
+ const Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1047
1083
  __proto__: null,
1048
- Scale: gt,
1049
- XY: Ei,
1050
- crudeXYTransform: vi,
1051
- transform: xi
1084
+ Scale: $t,
1085
+ XY: Wi,
1086
+ crudeXYTransform: Di,
1087
+ transform: Pi
1052
1088
  }, Symbol.toStringTag, { value: "Module" }));
1053
- let Mr = (t, e = 21) => (r = e) => {
1089
+ let zr = (t, e = 21) => (r = e) => {
1054
1090
  let n = "", s = r | 0;
1055
1091
  for (; s--; )
1056
1092
  n += t[Math.random() * t.length | 0];
1057
1093
  return n;
1058
1094
  };
1059
- const Er = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Ai = `0123456789${Er}`, Ar = 11, Bi = Mr(Er, 1), Ui = Mr(Ai, Ar - 1), qt = () => `${Bi()}${Ui()}`, ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1095
+ const Zr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Vi = `0123456789${Zr}`, Fr = 11, Gi = zr(Zr, 1), Hi = zr(Vi, Fr - 1), Vt = () => `${Gi()}${Hi()}`, Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1060
1096
  __proto__: null,
1061
- LENGTH: Ar,
1062
- create: qt
1063
- }, Symbol.toStringTag, { value: "Module" })), Ci = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, ji = a.enum(["static", "dynamic"]), Ri = a.union([
1097
+ LENGTH: Fr,
1098
+ create: Vt
1099
+ }, Symbol.toStringTag, { value: "Module" })), Xi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, Ji = 2 ** 8 - 1, Ki = 2 ** 16 - 1, Qi = 2 ** 32 - 1, _i = 2n ** 64n - 1n, ea = 2 ** 64 - 1, ta = -128, ra = 2 ** 7 - 1, na = -32768, sa = 2 ** 15 - 1, ia = -2147483648, aa = 2 ** 31 - 1, oa = -(2n ** 63n), ze = 2n ** 63n - 1n, ua = -9223372036854776e3, Yr = 2 ** 63 - 1, la = a.enum(["static", "dynamic"]), _t = 365, Ie = 30, ca = a.union([
1064
1100
  a.tuple([a.int()]),
1065
1101
  a.tuple([a.int(), a.int().min(1).max(12)]),
1066
1102
  a.tuple([a.int(), a.int().min(1).max(12), a.int().min(1).max(31)])
1067
- ]), Br = (t, e) => {
1068
- const r = new w(e);
1103
+ ]), Wr = (t, e) => {
1104
+ const r = new $(e);
1069
1105
  if (![
1070
- O.DAY,
1071
- O.HOUR,
1072
- O.MINUTE,
1073
- O.SECOND,
1074
- O.MILLISECOND,
1075
- O.MICROSECOND,
1076
- O.NANOSECOND
1106
+ c.DAY,
1107
+ c.HOUR,
1108
+ c.MINUTE,
1109
+ c.SECOND,
1110
+ c.MILLISECOND,
1111
+ c.MICROSECOND,
1112
+ c.NANOSECOND
1077
1113
  ].some((s) => s.equals(r)))
1078
1114
  throw new Error(
1079
1115
  "Invalid argument for remainder. Must be an even TimeSpan or Timestamp"
1080
1116
  );
1081
1117
  const n = t.valueOf() % r.valueOf();
1082
- return t instanceof w ? new w(n) : new O(n);
1118
+ return t instanceof $ ? new $(n) : new c(n);
1083
1119
  };
1084
- let w = class f extends ee {
1120
+ let $ = class g extends re {
1085
1121
  constructor(e, r = "UTC") {
1086
- if (e == null) super(f.now().valueOf());
1122
+ if (e == null) super(g.now().valueOf());
1087
1123
  else if (e instanceof Date)
1088
- super(BigInt(e.getTime()) * f.MILLISECOND.valueOf());
1124
+ super(BigInt(e.getTime()) * g.MILLISECOND.valueOf());
1089
1125
  else if (typeof e == "string")
1090
- super(f.parseDateTimeString(e, r).valueOf());
1091
- else if (Array.isArray(e)) super(f.parseDate(e));
1126
+ super(g.parseDateTimeString(e, r).valueOf());
1127
+ else if (Array.isArray(e)) super(g.parseDate(e));
1092
1128
  else {
1093
1129
  let n = 0n;
1094
- e instanceof Number && (e = e.valueOf()), r === "local" && (n = f.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = f.MAX : e = f.MIN)), A(e) && (e = e.value), super(BigInt(e.valueOf()) + n);
1130
+ e instanceof Number && (e = e.valueOf()), r === "local" && (n = g.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e === Yr ? 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);
1095
1131
  }
1096
1132
  }
1097
1133
  static parseDate([e = 1970, r = 1, n = 1]) {
1098
1134
  const s = new Date(e, r - 1, n, 0, 0, 0, 0);
1099
- return new f(BigInt(s.getTime()) * f.MILLISECOND.valueOf()).truncate(f.DAY).valueOf();
1135
+ return new g(BigInt(s.getTime()) * g.MILLISECOND.valueOf()).truncate(g.DAY).valueOf();
1100
1136
  }
1101
1137
  /**
1102
1138
  * @returns the primitive value of the TimeStamp. Overrides standard JS valueOf()
@@ -1107,49 +1143,22 @@ let w = class f extends ee {
1107
1143
  }
1108
1144
  static parseTimeString(e, r = "UTC") {
1109
1145
  const [n, s, i] = e.split(":");
1110
- let o = "00", c = "00";
1111
- i != null && ([o, c] = i.split("."));
1112
- let h = f.hours(parseInt(n ?? "00")).add(f.minutes(parseInt(s ?? "00"))).add(f.seconds(parseInt(o ?? "00"))).add(f.milliseconds(parseInt(c ?? "00")));
1113
- return r === "local" && (h = h.add(f.utcOffset)), h.valueOf();
1146
+ let o = "00", h = "00";
1147
+ i != null && ([o, h] = i.split("."));
1148
+ let f = g.hours(parseInt(n ?? "00")).add(g.minutes(parseInt(s ?? "00"))).add(g.seconds(parseInt(o ?? "00"))).add(g.milliseconds(parseInt(h ?? "00")));
1149
+ return r === "local" && (f = f.add(g.utcOffset)), f.valueOf();
1114
1150
  }
1115
1151
  static parseDateTimeString(e, r = "UTC") {
1116
1152
  if (!e.includes("/") && !e.includes("-"))
1117
- return f.parseTimeString(e, r);
1153
+ return g.parseTimeString(e, r);
1118
1154
  const n = new Date(e);
1119
- return e.includes(":") || n.setUTCHours(0, 0, 0, 0), new f(
1120
- BigInt(n.getTime()) * f.MILLISECOND.valueOf(),
1155
+ return e.includes(":") || n.setUTCHours(0, 0, 0, 0), new g(
1156
+ BigInt(n.getTime()) * g.MILLISECOND.valueOf(),
1121
1157
  r
1122
1158
  ).valueOf();
1123
1159
  }
1124
- /**
1125
- * Formats the TimeStamp as a string in the specified format.
1126
- *
1127
- * @param format - The format to use for the string representation.
1128
- * @param tzInfo - The timezone to use when creating the string representation.
1129
- * @returns A string representation of the TimeStamp in the specified format.
1130
- */
1131
- fString(e = "ISO", r = "UTC") {
1132
- switch (e) {
1133
- case "ISODate":
1134
- return this.toISOString(r).slice(0, 10);
1135
- case "ISOTime":
1136
- return this.toISOString(r).slice(11, 23);
1137
- case "time":
1138
- return this.timeString(!1, r);
1139
- case "preciseTime":
1140
- return this.timeString(!0, r);
1141
- case "date":
1142
- return this.dateString();
1143
- case "preciseDate":
1144
- return `${this.dateString()} ${this.timeString(!0, r)}`;
1145
- case "dateTime":
1146
- return `${this.dateString()} ${this.timeString(!1, r)}`;
1147
- default:
1148
- return this.toISOString(r);
1149
- }
1150
- }
1151
1160
  toISOString(e = "UTC") {
1152
- return e === "UTC" ? this.date().toISOString() : this.sub(f.utcOffset).date().toISOString();
1161
+ return e === "UTC" ? this.date().toISOString() : this.sub(g.utcOffset).date().toISOString();
1153
1162
  }
1154
1163
  timeString(e = !1, r = "UTC") {
1155
1164
  const n = this.toISOString(r);
@@ -1161,8 +1170,8 @@ let w = class f extends ee {
1161
1170
  }
1162
1171
  /** @returns The UTC offset for the time zone of the machine. */
1163
1172
  static get utcOffset() {
1164
- return new O(
1165
- BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * f.MINUTE.valueOf()
1173
+ return new c(
1174
+ BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * g.MINUTE.valueOf()
1166
1175
  );
1167
1176
  }
1168
1177
  /**
@@ -1171,7 +1180,7 @@ let w = class f extends ee {
1171
1180
  * @param other - The other timestamp.
1172
1181
  */
1173
1182
  static since(e) {
1174
- return new f().span(e);
1183
+ return new g().span(e);
1175
1184
  }
1176
1185
  /** @returns A JavaScript Date object representing the TimeStamp. */
1177
1186
  date() {
@@ -1184,7 +1193,7 @@ let w = class f extends ee {
1184
1193
  * @returns True if the TimeStamps are equal, false otherwise.
1185
1194
  */
1186
1195
  equals(e) {
1187
- return this.valueOf() === new f(e).valueOf();
1196
+ return this.valueOf() === new g(e).valueOf();
1188
1197
  }
1189
1198
  /**
1190
1199
  * Creates a TimeSpan representing the duration between the two timestamps.
@@ -1204,7 +1213,7 @@ let w = class f extends ee {
1204
1213
  * valid, regardless of the TimeStamp order.
1205
1214
  */
1206
1215
  range(e) {
1207
- return new X(this, e).makeValid();
1216
+ return new Q(this, e).makeValid();
1208
1217
  }
1209
1218
  /**
1210
1219
  * Creates a TimeRange starting at the TimeStamp and spanning the given
@@ -1233,7 +1242,7 @@ let w = class f extends ee {
1233
1242
  * otherwise.
1234
1243
  */
1235
1244
  after(e) {
1236
- return this.valueOf() > new f(e).valueOf();
1245
+ return this.valueOf() > new g(e).valueOf();
1237
1246
  }
1238
1247
  /**
1239
1248
  * Checks if the TimeStamp is after or equal to the given TimeStamp.
@@ -1243,7 +1252,7 @@ let w = class f extends ee {
1243
1252
  * false otherwise.
1244
1253
  */
1245
1254
  afterEq(e) {
1246
- return this.valueOf() >= new f(e).valueOf();
1255
+ return this.valueOf() >= new g(e).valueOf();
1247
1256
  }
1248
1257
  /**
1249
1258
  * Checks if the TimeStamp is before the given TimeStamp.
@@ -1253,7 +1262,7 @@ let w = class f extends ee {
1253
1262
  * otherwise.
1254
1263
  */
1255
1264
  before(e) {
1256
- return this.valueOf() < new f(e).valueOf();
1265
+ return this.valueOf() < new g(e).valueOf();
1257
1266
  }
1258
1267
  /**
1259
1268
  * Checks if TimeStamp is before or equal to the current timestamp.
@@ -1263,7 +1272,7 @@ let w = class f extends ee {
1263
1272
  * false otherwise.
1264
1273
  */
1265
1274
  beforeEq(e) {
1266
- return this.valueOf() <= new f(e).valueOf();
1275
+ return this.valueOf() <= new g(e).valueOf();
1267
1276
  }
1268
1277
  /**
1269
1278
  * Adds a TimeSpan to the TimeStamp.
@@ -1273,7 +1282,7 @@ let w = class f extends ee {
1273
1282
  * TimeSpan.
1274
1283
  */
1275
1284
  add(e) {
1276
- return new f(ae(this.valueOf(), new O(e).valueOf()));
1285
+ return new g(ue(this.valueOf(), new c(e).valueOf()));
1277
1286
  }
1278
1287
  /**
1279
1288
  * Subtracts a TimeSpan from the TimeStamp.
@@ -1283,43 +1292,43 @@ let w = class f extends ee {
1283
1292
  * TimeSpan.
1284
1293
  */
1285
1294
  sub(e) {
1286
- return new f(q(this.valueOf(), new O(e).valueOf()));
1295
+ return new g(Z(this.valueOf(), new c(e).valueOf()));
1287
1296
  }
1288
1297
  /**
1289
1298
  * @returns the floating point number of hours since the unix epoch to the timestamp
1290
1299
  * value.
1291
1300
  */
1292
1301
  get hours() {
1293
- return Number(this.valueOf()) / Number(O.HOUR.valueOf());
1302
+ return Number(this.valueOf()) / Number(c.HOUR.valueOf());
1294
1303
  }
1295
1304
  /**
1296
1305
  * @returns the floating point number of minutes since the unix epoch to the timestamp
1297
1306
  * value.
1298
1307
  */
1299
1308
  get minutes() {
1300
- return Number(this.valueOf()) / Number(O.MINUTE.valueOf());
1309
+ return Number(this.valueOf()) / Number(c.MINUTE.valueOf());
1301
1310
  }
1302
1311
  /**
1303
1312
  * @returns the floating point number of days since the unix epoch to the timestamp
1304
1313
  * value.
1305
1314
  */
1306
1315
  get days() {
1307
- return Number(this.valueOf()) / Number(O.DAY.valueOf());
1316
+ return Number(this.valueOf()) / Number(c.DAY.valueOf());
1308
1317
  }
1309
1318
  /**
1310
1319
  * @returns the floating point number of seconds since the unix epoch to the timestamp
1311
1320
  * value.
1312
1321
  */
1313
1322
  get seconds() {
1314
- return Number(this.valueOf()) / Number(O.SECOND.valueOf());
1323
+ return Number(this.valueOf()) / Number(c.SECOND.valueOf());
1315
1324
  }
1316
1325
  /** @returns the floating point number of milliseconds since the unix epoch. */
1317
1326
  get milliseconds() {
1318
- return Number(this.valueOf()) / Number(f.MILLISECOND.valueOf());
1327
+ return Number(this.valueOf()) / Number(g.MILLISECOND.valueOf());
1319
1328
  }
1320
1329
  /** @returns the floating point number of microseconds since the unix epoch. */
1321
1330
  get microseconds() {
1322
- return Number(this.valueOf()) / Number(f.MICROSECOND.valueOf());
1331
+ return Number(this.valueOf()) / Number(g.MICROSECOND.valueOf());
1323
1332
  }
1324
1333
  /**
1325
1334
  * @returns the floating point number of nanoseconds since the unix epoch.
@@ -1339,7 +1348,7 @@ let w = class f extends ee {
1339
1348
  */
1340
1349
  setYear(e) {
1341
1350
  const r = this.date();
1342
- return r.setUTCFullYear(e), new f(r);
1351
+ return r.setUTCFullYear(e), new g(r);
1343
1352
  }
1344
1353
  /** @returns the integer month that the timestamp corresponds to with its year. */
1345
1354
  get month() {
@@ -1351,7 +1360,7 @@ let w = class f extends ee {
1351
1360
  */
1352
1361
  setMonth(e) {
1353
1362
  const r = this.date();
1354
- return r.setUTCMonth(e), new f(r);
1363
+ return r.setUTCMonth(e), new g(r);
1355
1364
  }
1356
1365
  /** @returns the integer day that the timestamp corresponds to within its month. */
1357
1366
  get day() {
@@ -1363,7 +1372,7 @@ let w = class f extends ee {
1363
1372
  */
1364
1373
  setDay(e) {
1365
1374
  const r = this.date();
1366
- return r.setUTCDate(e), new f(r);
1375
+ return r.setUTCDate(e), new g(r);
1367
1376
  }
1368
1377
  /**
1369
1378
  * @returns the integer hour that the timestamp corresponds to within its day.
@@ -1383,7 +1392,7 @@ let w = class f extends ee {
1383
1392
  */
1384
1393
  setLocalHour(e) {
1385
1394
  const r = this.date();
1386
- return r.setHours(e), new f(r);
1395
+ return r.setHours(e), new g(r);
1387
1396
  }
1388
1397
  /**
1389
1398
  * @returns a copy of the timestamp with the hour changed.
@@ -1391,7 +1400,7 @@ let w = class f extends ee {
1391
1400
  */
1392
1401
  setHour(e) {
1393
1402
  const r = this.date();
1394
- return r.setUTCHours(e), new f(r);
1403
+ return r.setUTCHours(e), new g(r);
1395
1404
  }
1396
1405
  /** @returns the integer minute that the timestamp corresponds to within its hour. */
1397
1406
  get minute() {
@@ -1403,7 +1412,7 @@ let w = class f extends ee {
1403
1412
  */
1404
1413
  setMinute(e) {
1405
1414
  const r = this.date();
1406
- return r.setUTCMinutes(e), new f(r);
1415
+ return r.setUTCMinutes(e), new g(r);
1407
1416
  }
1408
1417
  /**
1409
1418
  * @returns the integer second that the timestamp corresponds to within its
@@ -1418,11 +1427,11 @@ let w = class f extends ee {
1418
1427
  */
1419
1428
  setSecond(e) {
1420
1429
  const r = this.date();
1421
- return r.setUTCSeconds(e), new f(r);
1430
+ return r.setUTCSeconds(e), new g(r);
1422
1431
  }
1423
1432
  /**
1424
- * @reutrns the integer millisecond that the timestamp corresponds to within
1425
- * its second.
1433
+ * @returns the integer millisecond that the timestamp corresponds to within its
1434
+ * second.
1426
1435
  */
1427
1436
  get millisecond() {
1428
1437
  return this.date().getUTCMilliseconds();
@@ -1433,11 +1442,34 @@ let w = class f extends ee {
1433
1442
  */
1434
1443
  setMillisecond(e) {
1435
1444
  const r = this.date();
1436
- return r.setUTCMilliseconds(e), new f(r);
1445
+ return r.setUTCMilliseconds(e), new g(r);
1437
1446
  }
1438
- /** @returns the time stamp formatted as an ISO string. */
1439
- toString() {
1440
- return this.date().toISOString();
1447
+ /**
1448
+ * Returns a string representation of the TimeStamp.
1449
+ *
1450
+ * @param format - Optional format for the string representation. Defaults to "ISO".
1451
+ * @param tzInfo - Optional timezone info. Defaults to "UTC".
1452
+ * @returns A string representation of the TimeStamp.
1453
+ */
1454
+ toString(e = "ISO", r = "UTC") {
1455
+ switch (e) {
1456
+ case "ISODate":
1457
+ return this.toISOString(r).slice(0, 10);
1458
+ case "ISOTime":
1459
+ return this.toISOString(r).slice(11, 23);
1460
+ case "time":
1461
+ return this.timeString(!1, r);
1462
+ case "preciseTime":
1463
+ return this.timeString(!0, r);
1464
+ case "date":
1465
+ return this.dateString();
1466
+ case "preciseDate":
1467
+ return `${this.dateString()} ${this.timeString(!0, r)}`;
1468
+ case "dateTime":
1469
+ return `${this.dateString()} ${this.timeString(!1, r)}`;
1470
+ default:
1471
+ return this.toISOString(r);
1472
+ }
1441
1473
  }
1442
1474
  /**
1443
1475
  * @returns A new TimeStamp that is the remainder of the TimeStamp divided by the
@@ -1451,11 +1483,11 @@ let w = class f extends ee {
1451
1483
  * @example TimeStamp.now().remainder(TimeStamp.DAY) // => TimeStamp representing the current day
1452
1484
  */
1453
1485
  remainder(e) {
1454
- return Br(this, e);
1486
+ return Wr(this, e);
1455
1487
  }
1456
1488
  /** @returns true if the day portion TimeStamp is today, false otherwise. */
1457
1489
  get isToday() {
1458
- return this.truncate(O.DAY).equals(f.now().truncate(O.DAY));
1490
+ return this.truncate(c.DAY).equals(g.now().truncate(c.DAY));
1459
1491
  }
1460
1492
  /**
1461
1493
  * Truncates the TimeStamp to the nearest multiple of the given span.
@@ -1472,7 +1504,7 @@ let w = class f extends ee {
1472
1504
  * JavaScript can do).
1473
1505
  */
1474
1506
  static now() {
1475
- return new f(/* @__PURE__ */ new Date());
1507
+ return new g(/* @__PURE__ */ new Date());
1476
1508
  }
1477
1509
  /**
1478
1510
  * Finds the maximum timestamp among the provided timestamps.
@@ -1481,9 +1513,9 @@ let w = class f extends ee {
1481
1513
  * @returns The maximum (latest) timestamp from the input.
1482
1514
  */
1483
1515
  static max(...e) {
1484
- let r = f.MIN;
1516
+ let r = g.MIN;
1485
1517
  for (const n of e) {
1486
- const s = new f(n);
1518
+ const s = new g(n);
1487
1519
  s.after(r) && (r = s);
1488
1520
  }
1489
1521
  return r;
@@ -1495,9 +1527,9 @@ let w = class f extends ee {
1495
1527
  * @returns The minimum (earliest) timestamp from the input.
1496
1528
  */
1497
1529
  static min(...e) {
1498
- let r = f.MAX;
1530
+ let r = g.MAX;
1499
1531
  for (const n of e) {
1500
- const s = new f(n);
1532
+ const s = new g(n);
1501
1533
  s.before(r) && (r = s);
1502
1534
  }
1503
1535
  return r;
@@ -1509,62 +1541,62 @@ let w = class f extends ee {
1509
1541
  * @returns A TimeStamp representing the given number of nanoseconds.
1510
1542
  */
1511
1543
  static nanoseconds(e, r = "UTC") {
1512
- return new f(e, r);
1544
+ return new g(e, r);
1513
1545
  }
1514
1546
  /** One nanosecond after the unix epoch */
1515
- static NANOSECOND = f.nanoseconds(1);
1547
+ static NANOSECOND = g.nanoseconds(1);
1516
1548
  /** @returns a new TimeStamp n microseconds after the unix epoch */
1517
1549
  static microseconds(e, r = "UTC") {
1518
- return f.nanoseconds(e * 1e3, r);
1550
+ return g.nanoseconds(e * 1e3, r);
1519
1551
  }
1520
1552
  /** One microsecond after the unix epoch */
1521
- static MICROSECOND = f.microseconds(1);
1553
+ static MICROSECOND = g.microseconds(1);
1522
1554
  /** @returns a new TimeStamp n milliseconds after the unix epoch */
1523
1555
  static milliseconds(e, r = "UTC") {
1524
- return f.microseconds(e * 1e3, r);
1556
+ return g.microseconds(e * 1e3, r);
1525
1557
  }
1526
1558
  /** One millisecond after the unix epoch */
1527
- static MILLISECOND = f.milliseconds(1);
1559
+ static MILLISECOND = g.milliseconds(1);
1528
1560
  /** @returns a new TimeStamp n seconds after the unix epoch */
1529
1561
  static seconds(e, r = "UTC") {
1530
- return f.milliseconds(e * 1e3, r);
1562
+ return g.milliseconds(e * 1e3, r);
1531
1563
  }
1532
1564
  /** One second after the unix epoch */
1533
- static SECOND = f.seconds(1);
1565
+ static SECOND = g.seconds(1);
1534
1566
  /** @returns a new TimeStamp n minutes after the unix epoch */
1535
1567
  static minutes(e, r = "UTC") {
1536
- return f.seconds(e * 60, r);
1568
+ return g.seconds(e * 60, r);
1537
1569
  }
1538
1570
  /** One minute after the unix epoch */
1539
- static MINUTE = f.minutes(1);
1571
+ static MINUTE = g.minutes(1);
1540
1572
  /** @returns a new TimeStamp n hours after the unix epoch */
1541
1573
  static hours(e, r = "UTC") {
1542
- return f.minutes(e * 60, r);
1574
+ return g.minutes(e * 60, r);
1543
1575
  }
1544
1576
  /** One hour after the unix epoch */
1545
- static HOUR = f.hours(1);
1577
+ static HOUR = g.hours(1);
1546
1578
  /** @returns a new TimeStamp n days after the unix epoch */
1547
1579
  static days(e, r = "UTC") {
1548
- return f.hours(e * 24, r);
1580
+ return g.hours(e * 24, r);
1549
1581
  }
1550
1582
  /** One day after the unix epoch */
1551
- static DAY = f.days(1);
1583
+ static DAY = g.days(1);
1552
1584
  /** The maximum possible value for a timestamp */
1553
- static MAX = new f((1n << 63n) - 1n);
1585
+ static MAX = new g(ze);
1554
1586
  /** The minimum possible value for a timestamp */
1555
- static MIN = new f(0);
1587
+ static MIN = new g(0);
1556
1588
  /** The unix epoch */
1557
- static ZERO = new f(0);
1589
+ static ZERO = new g(0);
1558
1590
  /** A zod schema for validating timestamps */
1559
1591
  static z = a.union([
1560
- a.instanceof(f),
1561
- a.object({ value: a.bigint() }).transform((e) => new f(e.value)),
1562
- a.string().transform((e) => new f(BigInt(e))),
1563
- a.number().transform((e) => new f(e)),
1564
- a.bigint().transform((e) => new f(e)),
1565
- a.date().transform((e) => new f(e)),
1566
- a.custom((e) => e instanceof O).transform((e) => new f(e)),
1567
- Ri.transform((e) => new f(e))
1592
+ a.instanceof(g),
1593
+ a.object({ value: a.bigint() }).transform((e) => new g(e.value)),
1594
+ a.string().transform((e) => new g(BigInt(e))),
1595
+ a.number().transform((e) => new g(e)),
1596
+ a.bigint().transform((e) => new g(e)),
1597
+ a.date().transform((e) => new g(e)),
1598
+ a.custom((e) => e instanceof c).transform((e) => new g(e)),
1599
+ ca.transform((e) => new g(e))
1568
1600
  ]);
1569
1601
  /**
1570
1602
  * Sorts two timestamps.
@@ -1577,9 +1609,10 @@ let w = class f extends ee {
1577
1609
  static sort(e, r) {
1578
1610
  return Number(e.valueOf() - r.valueOf());
1579
1611
  }
1580
- }, O = class g extends ee {
1612
+ };
1613
+ class c extends re {
1581
1614
  constructor(e) {
1582
- typeof e == "number" && (e = Math.trunc(e.valueOf())), A(e) && (e = e.value), super(BigInt(e.valueOf()));
1615
+ typeof e == "number" && (e = Math.trunc(e.valueOf())), B(e) && (e = e.value), super(BigInt(e.valueOf()));
1583
1616
  }
1584
1617
  /**
1585
1618
  * Creates a TimeSpan representing the given number of seconds.
@@ -1588,7 +1621,7 @@ let w = class f extends ee {
1588
1621
  * @returns A TimeSpan representing the given number of seconds.
1589
1622
  */
1590
1623
  static fromSeconds(e) {
1591
- return e instanceof g ? e : e instanceof E ? e.period : e instanceof w ? new g(e) : (A(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? g.seconds(e) : new g(e));
1624
+ return e instanceof c ? e : e instanceof st ? e.period : e instanceof $ ? new c(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? c.seconds(e) : new c(e));
1592
1625
  }
1593
1626
  /**
1594
1627
  * Creates a TimeSpan representing the given number of milliseconds.
@@ -1597,7 +1630,7 @@ let w = class f extends ee {
1597
1630
  * @returns A TimeSpan representing the given number of milliseconds.
1598
1631
  */
1599
1632
  static fromMilliseconds(e) {
1600
- return e instanceof g ? e : e instanceof E ? e.period : e instanceof w ? new g(e) : (A(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? g.milliseconds(e) : new g(e));
1633
+ return e instanceof c ? e : e instanceof st ? e.period : e instanceof $ ? new c(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? c.milliseconds(e) : new c(e));
1601
1634
  }
1602
1635
  /**
1603
1636
  * @returns the primitive value of the TimeSpan. Overrides standard JS valueOf()
@@ -1613,7 +1646,7 @@ let w = class f extends ee {
1613
1646
  * @returns True if the TimeSpan is less than the other TimeSpan, false otherwise.
1614
1647
  */
1615
1648
  lessThan(e) {
1616
- return this.valueOf() < new g(e).valueOf();
1649
+ return this.valueOf() < new c(e).valueOf();
1617
1650
  }
1618
1651
  /**
1619
1652
  * Checks if the TimeSpan is greater than another TimeSpan.
@@ -1622,7 +1655,7 @@ let w = class f extends ee {
1622
1655
  * @returns True if the TimeSpan is greater than the other TimeSpan, false otherwise.
1623
1656
  */
1624
1657
  greaterThan(e) {
1625
- return this.valueOf() > new g(e).valueOf();
1658
+ return this.valueOf() > new c(e).valueOf();
1626
1659
  }
1627
1660
  /**
1628
1661
  * Checks if the TimeSpan is less than or equal to another TimeSpan.
@@ -1631,7 +1664,7 @@ let w = class f extends ee {
1631
1664
  * @returns True if the TimeSpan is less than or equal to the other TimeSpan, false otherwise.
1632
1665
  */
1633
1666
  lessThanOrEqual(e) {
1634
- return this.valueOf() <= new g(e).valueOf();
1667
+ return this.valueOf() <= new c(e).valueOf();
1635
1668
  }
1636
1669
  /**
1637
1670
  * Checks if the TimeSpan is greater than or equal to another TimeSpan.
@@ -1640,7 +1673,7 @@ let w = class f extends ee {
1640
1673
  * @returns True if the TimeSpan is greater than or equal to the other TimeSpan, false otherwise.
1641
1674
  */
1642
1675
  greaterThanOrEqual(e) {
1643
- return this.valueOf() >= new g(e).valueOf();
1676
+ return this.valueOf() >= new c(e).valueOf();
1644
1677
  }
1645
1678
  /**
1646
1679
  * Calculates the remainder of the TimeSpan when divided by another TimeSpan.
@@ -1649,7 +1682,7 @@ let w = class f extends ee {
1649
1682
  * @returns A new TimeSpan representing the remainder.
1650
1683
  */
1651
1684
  remainder(e) {
1652
- return Br(this, e);
1685
+ return Wr(this, e);
1653
1686
  }
1654
1687
  /**
1655
1688
  * Truncates the TimeSpan to the nearest multiple of the given span.
@@ -1658,19 +1691,79 @@ let w = class f extends ee {
1658
1691
  * @returns A new TimeSpan that is truncated to the nearest multiple of the given span.
1659
1692
  */
1660
1693
  truncate(e) {
1661
- return new g(
1694
+ return new c(
1662
1695
  BigInt(Math.trunc(Number(this.valueOf() / e.valueOf()))) * e.valueOf()
1663
1696
  );
1664
1697
  }
1665
1698
  /**
1666
1699
  * Returns a string representation of the TimeSpan.
1667
1700
  *
1701
+ * @param format - Optional format for the string representation. Defaults to "full".
1702
+ * - "full": Shows all non-zero units with full precision (e.g., "2d 3h 45m 12s 500ms")
1703
+ * - "semantic": Shows 1-2 most significant units (e.g., "2d 3h")
1668
1704
  * @returns A string representation of the TimeSpan.
1669
1705
  */
1670
- toString() {
1671
- const e = this.truncate(g.DAY), r = this.truncate(g.HOUR), n = this.truncate(g.MINUTE), s = this.truncate(g.SECOND), i = this.truncate(g.MILLISECOND), o = this.truncate(g.MICROSECOND), c = this.truncate(g.NANOSECOND), h = e, l = r.sub(e), d = n.sub(r), y = s.sub(n), p = i.sub(s), L = o.sub(i), B = c.sub(o);
1672
- let Z = "";
1673
- return h.isZero || (Z += `${h.days}d `), l.isZero || (Z += `${l.hours}h `), d.isZero || (Z += `${d.minutes}m `), y.isZero || (Z += `${y.seconds}s `), p.isZero || (Z += `${p.milliseconds}ms `), L.isZero || (Z += `${L.microseconds}µs `), B.isZero || (Z += `${B.nanoseconds}ns`), Z.trim();
1706
+ toString(e = "full") {
1707
+ if (e === "semantic") return this.toSemanticString();
1708
+ const r = this.truncate(c.DAY), n = this.truncate(c.HOUR), s = this.truncate(c.MINUTE), i = this.truncate(c.SECOND), o = this.truncate(c.MILLISECOND), h = this.truncate(c.MICROSECOND), f = this.truncate(c.NANOSECOND), l = r, d = n.sub(r), m = s.sub(n), p = i.sub(s), A = o.sub(i), U = h.sub(o), C = f.sub(h);
1709
+ let w = "";
1710
+ return l.isZero || (w += `${l.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();
1711
+ }
1712
+ toSemanticString() {
1713
+ const e = this.valueOf() < 0n ? -this.valueOf() : this.valueOf(), r = new c(e), n = this.valueOf() < 0n;
1714
+ if (r.valueOf() === 0n) return "0s";
1715
+ if (r.lessThan(c.SECOND)) return "< 1s";
1716
+ const s = r.days, i = r.hours, o = r.minutes, h = r.seconds, f = Math.floor(s / _t), l = Math.floor(s / Ie), d = Math.floor(s / 7), m = Math.floor(s), p = Math.floor(i), A = Math.floor(o), U = Math.floor(h), C = n ? "-" : "";
1717
+ if (f >= 1) {
1718
+ let w = `${f}y`;
1719
+ if (f < 2) {
1720
+ const N = Math.floor(
1721
+ s % _t / Ie
1722
+ );
1723
+ N > 0 && (w += ` ${N}mo`);
1724
+ }
1725
+ return C + w;
1726
+ }
1727
+ if (d >= 1 && s < Ie && s % 7 === 0) {
1728
+ let w = `${d}w`;
1729
+ 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;
1731
+ }
1732
+ if (l >= 1) {
1733
+ let w = `${l}mo`;
1734
+ if (l < 3) {
1735
+ const N = Math.floor(s % Ie);
1736
+ N > 0 && (w += ` ${N}d`);
1737
+ }
1738
+ return C + w;
1739
+ }
1740
+ if (d >= 1) {
1741
+ let w = `${d}w`;
1742
+ 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;
1744
+ }
1745
+ if (m >= 1) {
1746
+ let w = `${m}d`;
1747
+ const N = Math.floor(i - m * 24);
1748
+ return m < 2 && N > 0 && (w += ` ${N}h`), C + w;
1749
+ }
1750
+ if (p >= 1) {
1751
+ let w = `${p}h`;
1752
+ if (p < 3) {
1753
+ const N = Math.floor(o - p * 60);
1754
+ N > 0 && (w += ` ${N}m`);
1755
+ }
1756
+ return C + w;
1757
+ }
1758
+ if (A >= 1) {
1759
+ let w = `${A}m`;
1760
+ if (A < 5) {
1761
+ const N = Math.floor(h - A * 60);
1762
+ N > 0 && (w += ` ${N}s`);
1763
+ }
1764
+ return C + w;
1765
+ }
1766
+ return `${C}${U}s`;
1674
1767
  }
1675
1768
  /**
1676
1769
  * Multiplies the TimeSpan by a scalar value.
@@ -1679,7 +1772,7 @@ let w = class f extends ee {
1679
1772
  * @returns A new TimeSpan that is this TimeSpan multiplied by the provided value.
1680
1773
  */
1681
1774
  mult(e) {
1682
- return new g(C(this.valueOf(), e));
1775
+ return new c(R(this.valueOf(), e));
1683
1776
  }
1684
1777
  /**
1685
1778
  * Divides the TimeSpan by a scalar value.
@@ -1688,31 +1781,31 @@ let w = class f extends ee {
1688
1781
  * @returns A new TimeSpan that is this TimeSpan divided by the provided value.
1689
1782
  */
1690
1783
  div(e) {
1691
- return new g(Oe(this.valueOf(), e));
1784
+ return new c(ve(this.valueOf(), e));
1692
1785
  }
1693
1786
  /** @returns the decimal number of days in the TimeSpan. */
1694
1787
  get days() {
1695
- return Number(this.valueOf()) / Number(g.DAY.valueOf());
1788
+ return Number(this.valueOf()) / Number(c.DAY.valueOf());
1696
1789
  }
1697
1790
  /** @returns the decimal number of hours in the TimeSpan. */
1698
1791
  get hours() {
1699
- return Number(this.valueOf()) / Number(g.HOUR.valueOf());
1792
+ return Number(this.valueOf()) / Number(c.HOUR.valueOf());
1700
1793
  }
1701
1794
  /** @returns the decimal number of minutes in the TimeSpan. */
1702
1795
  get minutes() {
1703
- return Number(this.valueOf()) / Number(g.MINUTE.valueOf());
1796
+ return Number(this.valueOf()) / Number(c.MINUTE.valueOf());
1704
1797
  }
1705
1798
  /** @returns The number of seconds in the TimeSpan. */
1706
1799
  get seconds() {
1707
- return Number(this.valueOf()) / Number(g.SECOND.valueOf());
1800
+ return Number(this.valueOf()) / Number(c.SECOND.valueOf());
1708
1801
  }
1709
1802
  /** @returns The number of milliseconds in the TimeSpan. */
1710
1803
  get milliseconds() {
1711
- return Number(this.valueOf()) / Number(g.MILLISECOND.valueOf());
1804
+ return Number(this.valueOf()) / Number(c.MILLISECOND.valueOf());
1712
1805
  }
1713
1806
  /** @returns The number of microseconds in the TimeSpan. */
1714
1807
  get microseconds() {
1715
- return Number(this.valueOf()) / Number(g.MICROSECOND.valueOf());
1808
+ return Number(this.valueOf()) / Number(c.MICROSECOND.valueOf());
1716
1809
  }
1717
1810
  /** @returns The number of nanoseconds in the TimeSpan. */
1718
1811
  get nanoseconds() {
@@ -1732,7 +1825,7 @@ let w = class f extends ee {
1732
1825
  * @returns True if the TimeSpans are equal, false otherwise.
1733
1826
  */
1734
1827
  equals(e) {
1735
- return this.valueOf() === new g(e).valueOf();
1828
+ return this.valueOf() === new c(e).valueOf();
1736
1829
  }
1737
1830
  /**
1738
1831
  * Adds a TimeSpan to the TimeSpan.
@@ -1740,7 +1833,7 @@ let w = class f extends ee {
1740
1833
  * @returns A new TimeSpan representing the sum of the two TimeSpans.
1741
1834
  */
1742
1835
  add(e) {
1743
- return new g(this.valueOf() + new g(e).valueOf());
1836
+ return new c(this.valueOf() + new c(e).valueOf());
1744
1837
  }
1745
1838
  /**
1746
1839
  * Creates a TimeSpan representing the duration between the two timestamps.
@@ -1748,7 +1841,7 @@ let w = class f extends ee {
1748
1841
  * @param other
1749
1842
  */
1750
1843
  sub(e) {
1751
- return new g(this.valueOf() - new g(e).valueOf());
1844
+ return new c(this.valueOf() - new c(e).valueOf());
1752
1845
  }
1753
1846
  /**
1754
1847
  * Creates a TimeSpan representing the given number of nanoseconds.
@@ -1757,10 +1850,10 @@ let w = class f extends ee {
1757
1850
  * @returns A TimeSpan representing the given number of nanoseconds.
1758
1851
  */
1759
1852
  static nanoseconds(e = 1) {
1760
- return new g(e);
1853
+ return new c(e);
1761
1854
  }
1762
1855
  /** A nanosecond. */
1763
- static NANOSECOND = g.nanoseconds(1);
1856
+ static NANOSECOND = c.nanoseconds(1);
1764
1857
  /**
1765
1858
  * Creates a TimeSpan representing the given number of microseconds.
1766
1859
  *
@@ -1768,10 +1861,10 @@ let w = class f extends ee {
1768
1861
  * @returns A TimeSpan representing the given number of microseconds.
1769
1862
  */
1770
1863
  static microseconds(e = 1) {
1771
- return g.nanoseconds(C(e, 1e3));
1864
+ return c.nanoseconds(R(e, 1e3));
1772
1865
  }
1773
1866
  /** A microsecond. */
1774
- static MICROSECOND = g.microseconds(1);
1867
+ static MICROSECOND = c.microseconds(1);
1775
1868
  /**
1776
1869
  * Creates a TimeSpan representing the given number of milliseconds.
1777
1870
  *
@@ -1779,10 +1872,10 @@ let w = class f extends ee {
1779
1872
  * @returns A TimeSpan representing the given number of milliseconds.
1780
1873
  */
1781
1874
  static milliseconds(e = 1) {
1782
- return g.microseconds(C(e, 1e3));
1875
+ return c.microseconds(R(e, 1e3));
1783
1876
  }
1784
1877
  /** A millisecond. */
1785
- static MILLISECOND = g.milliseconds(1);
1878
+ static MILLISECOND = c.milliseconds(1);
1786
1879
  /**
1787
1880
  * Creates a TimeSpan representing the given number of seconds.
1788
1881
  *
@@ -1790,10 +1883,10 @@ let w = class f extends ee {
1790
1883
  * @returns A TimeSpan representing the given number of seconds.
1791
1884
  */
1792
1885
  static seconds(e = 1) {
1793
- return g.milliseconds(C(e, 1e3));
1886
+ return c.milliseconds(R(e, 1e3));
1794
1887
  }
1795
1888
  /** A second. */
1796
- static SECOND = g.seconds(1);
1889
+ static SECOND = c.seconds(1);
1797
1890
  /**
1798
1891
  * Creates a TimeSpan representing the given number of minutes.
1799
1892
  *
@@ -1801,10 +1894,10 @@ let w = class f extends ee {
1801
1894
  * @returns A TimeSpan representing the given number of minutes.
1802
1895
  */
1803
1896
  static minutes(e = 1) {
1804
- return g.seconds(C(e, 60));
1897
+ return c.seconds(R(e, 60));
1805
1898
  }
1806
1899
  /** A minute. */
1807
- static MINUTE = g.minutes(1);
1900
+ static MINUTE = c.minutes(1);
1808
1901
  /**
1809
1902
  * Creates a TimeSpan representing the given number of hours.
1810
1903
  *
@@ -1812,10 +1905,10 @@ let w = class f extends ee {
1812
1905
  * @returns A TimeSpan representing the given number of hours.
1813
1906
  */
1814
1907
  static hours(e) {
1815
- return g.minutes(C(e, 60));
1908
+ return c.minutes(R(e, 60));
1816
1909
  }
1817
1910
  /** Represents an hour. */
1818
- static HOUR = g.hours(1);
1911
+ static HOUR = c.hours(1);
1819
1912
  /**
1820
1913
  * Creates a TimeSpan representing the given number of days.
1821
1914
  *
@@ -1823,30 +1916,30 @@ let w = class f extends ee {
1823
1916
  * @returns A TimeSpan representing the given number of days.
1824
1917
  */
1825
1918
  static days(e) {
1826
- return g.hours(C(e, 24));
1919
+ return c.hours(R(e, 24));
1827
1920
  }
1828
1921
  /** Represents a day. */
1829
- static DAY = g.days(1);
1922
+ static DAY = c.days(1);
1830
1923
  /** The maximum possible value for a TimeSpan. */
1831
- static MAX = new g((1n << 63n) - 1n);
1924
+ static MAX = new c(ze);
1832
1925
  /** The minimum possible value for a TimeSpan. */
1833
- static MIN = new g(0);
1926
+ static MIN = new c(0);
1834
1927
  /** The zero value for a TimeSpan. */
1835
- static ZERO = new g(0);
1836
- /** A zod schema for validating and transforming timespans */
1928
+ static ZERO = new c(0);
1929
+ /** A zod schema for validating and transforming time spans */
1837
1930
  static z = a.union([
1838
- a.object({ value: a.bigint() }).transform((e) => new g(e.value)),
1839
- a.string().transform((e) => new g(BigInt(e))),
1840
- a.number().transform((e) => new g(e)),
1841
- a.bigint().transform((e) => new g(e)),
1842
- a.instanceof(g),
1843
- a.instanceof(w).transform((e) => new g(e)),
1844
- a.custom((e) => e instanceof E).transform((e) => new g(e))
1931
+ a.object({ value: a.bigint() }).transform((e) => new c(e.value)),
1932
+ a.string().transform((e) => new c(BigInt(e))),
1933
+ a.number().transform((e) => new c(e)),
1934
+ a.bigint().transform((e) => new c(e)),
1935
+ a.instanceof(c),
1936
+ a.instanceof($).transform((e) => new c(e)),
1937
+ a.custom((e) => e instanceof st).transform((e) => new c(e))
1845
1938
  ]);
1846
- };
1847
- class E extends ee {
1939
+ }
1940
+ let st = class j extends re {
1848
1941
  constructor(e) {
1849
- A(e) && (e = e.value), super(e.valueOf());
1942
+ B(e) && (e = e.value), super(e.valueOf());
1850
1943
  }
1851
1944
  /** @returns a pretty string representation of the rate in the format "X Hz". */
1852
1945
  toString() {
@@ -1854,7 +1947,7 @@ class E extends ee {
1854
1947
  }
1855
1948
  /** @returns The number of seconds in the Rate. */
1856
1949
  equals(e) {
1857
- return this.valueOf() === new E(e).valueOf();
1950
+ return this.valueOf() === new j(e).valueOf();
1858
1951
  }
1859
1952
  /**
1860
1953
  * Calculates the period of the Rate as a TimeSpan.
@@ -1862,7 +1955,7 @@ class E extends ee {
1862
1955
  * @returns A TimeSpan representing the period of the Rate.
1863
1956
  */
1864
1957
  get period() {
1865
- return O.seconds(1 / this.valueOf());
1958
+ return c.seconds(1 / this.valueOf());
1866
1959
  }
1867
1960
  /**
1868
1961
  * Calculates the number of samples in the given TimeSpan at this rate.
@@ -1871,7 +1964,7 @@ class E extends ee {
1871
1964
  * @returns The number of samples in the given TimeSpan at this rate.
1872
1965
  */
1873
1966
  sampleCount(e) {
1874
- return new O(e).seconds * this.valueOf();
1967
+ return new c(e).seconds * this.valueOf();
1875
1968
  }
1876
1969
  /**
1877
1970
  * Calculates the number of bytes in the given TimeSpan at this rate.
@@ -1881,7 +1974,7 @@ class E extends ee {
1881
1974
  * @returns The number of bytes in the given TimeSpan at this rate.
1882
1975
  */
1883
1976
  byteCount(e, r) {
1884
- return this.sampleCount(e) * new I(r).valueOf();
1977
+ return this.sampleCount(e) * new M(r).valueOf();
1885
1978
  }
1886
1979
  /**
1887
1980
  * Calculates a TimeSpan given the number of samples at this rate.
@@ -1890,7 +1983,7 @@ class E extends ee {
1890
1983
  * @returns A TimeSpan that corresponds to the given number of samples.
1891
1984
  */
1892
1985
  span(e) {
1893
- return O.seconds(e / this.valueOf());
1986
+ return c.seconds(e / this.valueOf());
1894
1987
  }
1895
1988
  /**
1896
1989
  * Calculates a TimeSpan given the number of bytes at this rate.
@@ -1900,7 +1993,7 @@ class E extends ee {
1900
1993
  * @returns A TimeSpan that corresponds to the given number of bytes.
1901
1994
  */
1902
1995
  byteSpan(e, r) {
1903
- return this.span(e.valueOf() / new I(r).valueOf());
1996
+ return this.span(e.valueOf() / new M(r).valueOf());
1904
1997
  }
1905
1998
  /**
1906
1999
  * Adds another Rate to this Rate.
@@ -1909,7 +2002,7 @@ class E extends ee {
1909
2002
  * @returns A new Rate representing the sum of the two rates.
1910
2003
  */
1911
2004
  add(e) {
1912
- return new E(ae(this.valueOf(), new E(e).valueOf()));
2005
+ return new j(ue(this.valueOf(), new j(e).valueOf()));
1913
2006
  }
1914
2007
  /**
1915
2008
  * Subtracts another Rate from this Rate.
@@ -1918,7 +2011,7 @@ class E extends ee {
1918
2011
  * @returns A new Rate representing the difference of the two rates.
1919
2012
  */
1920
2013
  sub(e) {
1921
- return new E(q(this.valueOf(), new E(e).valueOf()));
2014
+ return new j(Z(this.valueOf(), new j(e).valueOf()));
1922
2015
  }
1923
2016
  /**
1924
2017
  * Multiplies this Rate by a scalar value.
@@ -1927,7 +2020,7 @@ class E extends ee {
1927
2020
  * @returns A new Rate representing this Rate multiplied by the value.
1928
2021
  */
1929
2022
  mult(e) {
1930
- return new E(C(this.valueOf(), e));
2023
+ return new j(R(this.valueOf(), e));
1931
2024
  }
1932
2025
  /**
1933
2026
  * Divides this Rate by a scalar value.
@@ -1936,7 +2029,7 @@ class E extends ee {
1936
2029
  * @returns A new Rate representing this Rate divided by the value.
1937
2030
  */
1938
2031
  div(e) {
1939
- return new E(Oe(this.valueOf(), e));
2032
+ return new j(ve(this.valueOf(), e));
1940
2033
  }
1941
2034
  /**
1942
2035
  * Creates a Rate representing the given number of Hz.
@@ -1945,7 +2038,7 @@ class E extends ee {
1945
2038
  * @returns A Rate representing the given number of Hz.
1946
2039
  */
1947
2040
  static hz(e) {
1948
- return new E(e);
2041
+ return new j(e);
1949
2042
  }
1950
2043
  /**
1951
2044
  * Creates a Rate representing the given number of kHz.
@@ -1954,15 +2047,14 @@ class E extends ee {
1954
2047
  * @returns A Rate representing the given number of kHz.
1955
2048
  */
1956
2049
  static khz(e) {
1957
- return E.hz(e * 1e3);
2050
+ return j.hz(e * 1e3);
1958
2051
  }
1959
2052
  /** A zod schema for validating and transforming rates */
1960
2053
  static z = a.union([
1961
- a.number().transform((e) => new E(e)),
1962
- a.instanceof(E)
2054
+ a.number().transform((e) => new j(e)),
2055
+ a.instanceof(j)
1963
2056
  ]);
1964
- }
1965
- let I = class M extends ee {
2057
+ }, M = class E extends re {
1966
2058
  /**
1967
2059
  * Creates a Density representing the given number of bytes per value.
1968
2060
  *
@@ -1971,7 +2063,7 @@ let I = class M extends ee {
1971
2063
  * @returns A Density representing the given number of bytes per value.
1972
2064
  */
1973
2065
  constructor(e) {
1974
- A(e) && (e = e.value), super(e.valueOf());
2066
+ B(e) && (e = e.value), super(e.valueOf());
1975
2067
  }
1976
2068
  /**
1977
2069
  * Calculates the number of values in the given Size.
@@ -1989,7 +2081,7 @@ let I = class M extends ee {
1989
2081
  * @returns A Size representing the given number of values.
1990
2082
  */
1991
2083
  size(e) {
1992
- return new Pe(e * this.valueOf());
2084
+ return new Ze(e * this.valueOf());
1993
2085
  }
1994
2086
  /**
1995
2087
  * Adds another Density to this Density.
@@ -1998,7 +2090,7 @@ let I = class M extends ee {
1998
2090
  * @returns A new Density representing the sum of the two densities.
1999
2091
  */
2000
2092
  add(e) {
2001
- return new M(ae(this.valueOf(), new M(e).valueOf()));
2093
+ return new E(ue(this.valueOf(), new E(e).valueOf()));
2002
2094
  }
2003
2095
  /**
2004
2096
  * Subtracts another Density from this Density.
@@ -2007,7 +2099,7 @@ let I = class M extends ee {
2007
2099
  * @returns A new Density representing the difference of the two densities.
2008
2100
  */
2009
2101
  sub(e) {
2010
- return new M(q(this.valueOf(), new M(e).valueOf()));
2102
+ return new E(Z(this.valueOf(), new E(e).valueOf()));
2011
2103
  }
2012
2104
  /**
2013
2105
  * Multiplies this Density by a scalar value.
@@ -2016,7 +2108,7 @@ let I = class M extends ee {
2016
2108
  * @returns A new Density representing this Density multiplied by the value.
2017
2109
  */
2018
2110
  mult(e) {
2019
- return new M(C(this.valueOf(), e));
2111
+ return new E(R(this.valueOf(), e));
2020
2112
  }
2021
2113
  /**
2022
2114
  * Divides this Density by a scalar value.
@@ -2025,26 +2117,26 @@ let I = class M extends ee {
2025
2117
  * @returns A new Density representing this Density divided by the value.
2026
2118
  */
2027
2119
  div(e) {
2028
- return new M(Oe(this.valueOf(), e));
2120
+ return new E(ve(this.valueOf(), e));
2029
2121
  }
2030
2122
  /** Unknown/Invalid Density. */
2031
- static UNKNOWN = new M(0);
2123
+ static UNKNOWN = new E(0);
2032
2124
  /** 128 bits per value. */
2033
- static BIT128 = new M(16);
2125
+ static BIT128 = new E(16);
2034
2126
  /** 64 bits per value. */
2035
- static BIT64 = new M(8);
2127
+ static BIT64 = new E(8);
2036
2128
  /** 32 bits per value. */
2037
- static BIT32 = new M(4);
2129
+ static BIT32 = new E(4);
2038
2130
  /** 16 bits per value. */
2039
- static BIT16 = new M(2);
2131
+ static BIT16 = new E(2);
2040
2132
  /** 8 bits per value. */
2041
- static BIT8 = new M(1);
2133
+ static BIT8 = new E(1);
2042
2134
  /** A zod schema for validating and transforming densities */
2043
2135
  static z = a.union([
2044
- a.number().transform((e) => new M(e)),
2045
- a.instanceof(M)
2136
+ a.number().transform((e) => new E(e)),
2137
+ a.instanceof(E)
2046
2138
  ]);
2047
- }, X = class U {
2139
+ }, Q = class k {
2048
2140
  /**
2049
2141
  * The starting TimeStamp of the TimeRange.
2050
2142
  *
@@ -2070,11 +2162,11 @@ let I = class M extends ee {
2070
2162
  * @param end - A TimeStamp representing the end of the range.
2071
2163
  */
2072
2164
  constructor(e, r) {
2073
- typeof e == "object" && "start" in e ? (this.start = new w(e.start), this.end = new w(e.end)) : (this.start = new w(e), this.end = new w(r));
2165
+ typeof e == "object" && "start" in e ? (this.start = new $(e.start), this.end = new $(e.end)) : (this.start = new $(e), this.end = new $(r));
2074
2166
  }
2075
2167
  /** @returns The TimeSpan occupied by the TimeRange. */
2076
2168
  get span() {
2077
- return new O(this.end.valueOf() - this.start.valueOf());
2169
+ return new c(this.end.valueOf() - this.start.valueOf());
2078
2170
  }
2079
2171
  /**
2080
2172
  * Checks if the timestamp is valid i.e. the start is before the end.
@@ -2093,12 +2185,12 @@ let I = class M extends ee {
2093
2185
  return this.isValid ? this : this.swap();
2094
2186
  }
2095
2187
  /**
2096
- * Checks if the TimeRange has a zero span.
2188
+ * Checks if the TimeRange is zero (both start and end are TimeStamp.ZERO).
2097
2189
  *
2098
- * @returns True if the TimeRange has a zero span.
2190
+ * @returns True if both start and end are TimeStamp.ZERO, false otherwise.
2099
2191
  */
2100
2192
  get isZero() {
2101
- return this.span.isZero;
2193
+ return this.start.isZero && this.end.isZero;
2102
2194
  }
2103
2195
  /**
2104
2196
  * @returns the TimeRange as a numeric object with start and end properties.
@@ -2112,7 +2204,7 @@ let I = class M extends ee {
2112
2204
  * @returns A TimeRange with the start and end swapped.
2113
2205
  */
2114
2206
  swap() {
2115
- return new U(this.end, this.start);
2207
+ return new k(this.end, this.start);
2116
2208
  }
2117
2209
  get numericBounds() {
2118
2210
  return {
@@ -2126,7 +2218,7 @@ let I = class M extends ee {
2126
2218
  * @param other - The TimeRange to compare to.
2127
2219
  * @returns True if the TimeRange is equal to the given TimeRange.
2128
2220
  */
2129
- equals(e, r = O.ZERO) {
2221
+ equals(e, r = c.ZERO) {
2130
2222
  if (r.isZero)
2131
2223
  return this.start.equals(e.start) && this.end.equals(e.end);
2132
2224
  let n = this.start.sub(e.start).valueOf(), s = this.end.sub(e.end).valueOf();
@@ -2146,7 +2238,7 @@ let I = class M extends ee {
2146
2238
  * @returns A pretty string representation of the TimeRange.
2147
2239
  */
2148
2240
  toPrettyString() {
2149
- return `${this.start.fString("preciseDate")} - ${this.span.toString()}`;
2241
+ return `${this.start.toString("preciseDate")} - ${this.span.toString()}`;
2150
2242
  }
2151
2243
  /**
2152
2244
  * Checks if the two time ranges overlap. If the two time ranges are equal, returns
@@ -2159,16 +2251,16 @@ let I = class M extends ee {
2159
2251
  * checking for overlap.
2160
2252
  * @returns True if the two TimeRanges overlap, false otherwise.
2161
2253
  */
2162
- overlapsWith(e, r = O.ZERO) {
2254
+ overlapsWith(e, r = c.ZERO) {
2163
2255
  e = e.makeValid();
2164
2256
  const n = this.makeValid();
2165
2257
  if (this.equals(e)) return !0;
2166
2258
  if (e.end.equals(n.start) || n.end.equals(e.start)) return !1;
2167
- const s = w.max(n.start, e.start), i = w.min(n.end, e.end);
2168
- return i.before(s) ? !1 : new O(i.sub(s)).greaterThanOrEqual(r);
2259
+ const s = $.max(n.start, e.start), i = $.min(n.end, e.end);
2260
+ return i.before(s) ? !1 : new c(i.sub(s)).greaterThanOrEqual(r);
2169
2261
  }
2170
2262
  contains(e) {
2171
- return e instanceof U ? this.contains(e.start) && this.contains(e.end) : this.start.beforeEq(e) && this.end.after(e);
2263
+ return e instanceof k ? this.contains(e.start) && this.contains(e.end) : this.start.beforeEq(e) && this.end.after(e);
2172
2264
  }
2173
2265
  /**
2174
2266
  * Returns a new TimeRange that is bound by the given TimeRange.
@@ -2182,25 +2274,23 @@ let I = class M extends ee {
2182
2274
  * console.log(bounded); // TimeRange(1500, 2000)
2183
2275
  */
2184
2276
  boundBy(e) {
2185
- const r = new U(this.start, this.end);
2277
+ const r = new k(this.start, this.end);
2186
2278
  return e.start.after(this.start) && (r.start = e.start), e.start.after(this.end) && (r.end = e.start), e.end.before(this.end) && (r.end = e.end), e.end.before(this.start) && (r.start = e.end), r;
2187
2279
  }
2188
2280
  static max(...e) {
2189
- return new U(
2190
- w.min(...e.map((r) => r.start)),
2191
- w.max(...e.map((r) => r.end))
2281
+ return new k(
2282
+ $.min(...e.map((r) => r.start)),
2283
+ $.max(...e.map((r) => r.end))
2192
2284
  );
2193
2285
  }
2194
2286
  /** The maximum possible time range. */
2195
- static MAX = new U(w.MIN, w.MAX);
2196
- /** The minimum possible time range. */
2197
- static MIN = new U(w.MAX, w.MIN);
2287
+ static MAX = new k($.MIN, $.MAX);
2198
2288
  /** A time range whose start and end are both zero. */
2199
- static ZERO = new U(w.ZERO, w.ZERO);
2289
+ static ZERO = new k($.ZERO, $.ZERO);
2200
2290
  /** A zod schema for validating and transforming time ranges */
2201
2291
  static z = a.union([
2202
- a.object({ start: w.z, end: w.z }).transform((e) => new U(e.start, e.end)),
2203
- a.instanceof(U)
2292
+ a.object({ start: $.z, end: $.z }).transform((e) => new k(e.start, e.end)),
2293
+ a.instanceof(k)
2204
2294
  ]);
2205
2295
  /**
2206
2296
  * Sorts two time ranges. The range with the earlier start time is considered less than
@@ -2214,7 +2304,7 @@ let I = class M extends ee {
2214
2304
  * equal.
2215
2305
  */
2216
2306
  static sort(e, r) {
2217
- return w.sort(e.start, r.start) || w.sort(e.end, r.end);
2307
+ return $.sort(e.start, r.start) || $.sort(e.end, r.end);
2218
2308
  }
2219
2309
  /**
2220
2310
  * Simplify takes the list of `TimeRange`s, makes all of them valid, sorts them, and
@@ -2224,17 +2314,17 @@ let I = class M extends ee {
2224
2314
  * @returns A list of simplified `TimeRange`s.
2225
2315
  */
2226
2316
  static simplify(e) {
2227
- return e.map((r) => r.makeValid()).sort((r, n) => U.sort(r, n)).reduce((r, n) => {
2228
- if (n.isZero) return r;
2317
+ return e.map((r) => r.makeValid()).sort((r, n) => k.sort(r, n)).reduce((r, n) => {
2318
+ if (n.span.isZero) return r;
2229
2319
  if (r.length === 0)
2230
2320
  return r.push(n), r;
2231
2321
  const s = r[r.length - 1];
2232
- return s.overlapsWith(n) || s.end.equals(n.start) ? s.end = w.max(s.end, n.end) : r.push(n), r;
2322
+ return s.overlapsWith(n) || s.end.equals(n.start) ? s.end = $.max(s.end, n.end) : r.push(n), r;
2233
2323
  }, []);
2234
2324
  }
2235
- }, T = class u extends ee {
2325
+ }, S = class u extends re {
2236
2326
  constructor(e) {
2237
- if (A(e) && (e = e.value), e instanceof u || typeof e == "string" || typeof e.valueOf() == "string")
2327
+ if (B(e) && (e = e.value), e instanceof u || typeof e == "string" || typeof e.valueOf() == "string")
2238
2328
  super(e.valueOf());
2239
2329
  else {
2240
2330
  const r = u.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);
@@ -2264,9 +2354,10 @@ let I = class M extends ee {
2264
2354
  matches(...e) {
2265
2355
  return e.some((r) => this.equals(r));
2266
2356
  }
2267
- /** @returns a string representation of the DataType. */
2268
- toString() {
2269
- return this.valueOf();
2357
+ /** @returns a string representation of the DataType. If short is true, a 1-4
2358
+ * character representation (i64, str, etc.) is returned instead. */
2359
+ toString(e = !1) {
2360
+ return e ? u.SHORT_STRINGS.get(this.valueOf()) ?? this.valueOf() : this.valueOf();
2270
2361
  }
2271
2362
  /**
2272
2363
  * @returns true if the DataType has a variable density.
@@ -2370,11 +2461,11 @@ let I = class M extends ee {
2370
2461
  static UINT16 = new u("uint16");
2371
2462
  /** Represents a 8-bit unsigned integer value. */
2372
2463
  static UINT8 = new u("uint8");
2373
- /** Represents a boolean value. Alias for UINT8. */
2374
- static BOOLEAN = this.UINT8;
2464
+ /** Represents a boolean value. Stored as a 8-bit unsigned integer. */
2465
+ static BOOLEAN = new u("boolean");
2375
2466
  /** Represents a 64-bit unix epoch. */
2376
2467
  static TIMESTAMP = new u("timestamp");
2377
- /** Represents a UUID data type */
2468
+ /** Represents a UUID data type. */
2378
2469
  static UUID = new u("uuid");
2379
2470
  /** Represents a string data type. Strings have an unknown density, and are separate
2380
2471
  * by a newline character. */
@@ -2411,20 +2502,20 @@ let I = class M extends ee {
2411
2502
  [BigInt64Array.name, u.INT64]
2412
2503
  ]);
2413
2504
  static DENSITIES = /* @__PURE__ */ new Map([
2414
- [u.UINT8.toString(), I.BIT8],
2415
- [u.UINT16.toString(), I.BIT16],
2416
- [u.UINT32.toString(), I.BIT32],
2417
- [u.UINT64.toString(), I.BIT64],
2418
- [u.FLOAT32.toString(), I.BIT32],
2419
- [u.FLOAT64.toString(), I.BIT64],
2420
- [u.INT8.toString(), I.BIT8],
2421
- [u.INT16.toString(), I.BIT16],
2422
- [u.INT32.toString(), I.BIT32],
2423
- [u.INT64.toString(), I.BIT64],
2424
- [u.TIMESTAMP.toString(), I.BIT64],
2425
- [u.STRING.toString(), I.UNKNOWN],
2426
- [u.JSON.toString(), I.UNKNOWN],
2427
- [u.UUID.toString(), I.BIT128]
2505
+ [u.UINT8.toString(), M.BIT8],
2506
+ [u.UINT16.toString(), M.BIT16],
2507
+ [u.UINT32.toString(), M.BIT32],
2508
+ [u.UINT64.toString(), M.BIT64],
2509
+ [u.FLOAT32.toString(), M.BIT32],
2510
+ [u.FLOAT64.toString(), M.BIT64],
2511
+ [u.INT8.toString(), M.BIT8],
2512
+ [u.INT16.toString(), M.BIT16],
2513
+ [u.INT32.toString(), M.BIT32],
2514
+ [u.INT64.toString(), M.BIT64],
2515
+ [u.TIMESTAMP.toString(), M.BIT64],
2516
+ [u.STRING.toString(), M.UNKNOWN],
2517
+ [u.JSON.toString(), M.UNKNOWN],
2518
+ [u.UUID.toString(), M.BIT128]
2428
2519
  ]);
2429
2520
  /** All the data types. */
2430
2521
  static ALL = [
@@ -2444,31 +2535,48 @@ let I = class M extends ee {
2444
2535
  u.STRING,
2445
2536
  u.JSON
2446
2537
  ];
2538
+ static SHORT_STRINGS = /* @__PURE__ */ new Map([
2539
+ [u.UINT8.toString(), "u8"],
2540
+ [u.UINT16.toString(), "u16"],
2541
+ [u.UINT32.toString(), "u32"],
2542
+ [u.UINT64.toString(), "u64"],
2543
+ [u.INT8.toString(), "i8"],
2544
+ [u.INT16.toString(), "i16"],
2545
+ [u.INT32.toString(), "i32"],
2546
+ [u.INT64.toString(), "i64"],
2547
+ [u.FLOAT32.toString(), "f32"],
2548
+ [u.FLOAT64.toString(), "f64"],
2549
+ [u.BOOLEAN.toString(), "bool"],
2550
+ [u.TIMESTAMP.toString(), "ts"],
2551
+ [u.UUID.toString(), "uuid"],
2552
+ [u.STRING.toString(), "str"],
2553
+ [u.JSON.toString(), "json"]
2554
+ ]);
2447
2555
  static BIG_INT_TYPES = [u.INT64, u.UINT64, u.TIMESTAMP];
2448
2556
  /** A zod schema for a DataType. */
2449
2557
  static z = a.union([
2450
2558
  a.string().transform((e) => new u(e)),
2451
2559
  a.instanceof(u)
2452
2560
  ]);
2453
- }, Pe = class m extends ee {
2561
+ }, Ze = class y extends re {
2454
2562
  constructor(e) {
2455
- A(e) && (e = e.value), super(e.valueOf());
2563
+ B(e) && (e = e.value), super(e.valueOf());
2456
2564
  }
2457
2565
  /** @returns true if the Size is larger than the other size. */
2458
2566
  largerThan(e) {
2459
- return A(e) && (e = e.value), this.valueOf() > e.valueOf();
2567
+ return B(e) && (e = e.value), this.valueOf() > e.valueOf();
2460
2568
  }
2461
2569
  /** @returns true if the Size is smaller than the other size. */
2462
2570
  smallerThan(e) {
2463
- return A(e) && (e = e.value), this.valueOf() < e.valueOf();
2571
+ return B(e) && (e = e.value), this.valueOf() < e.valueOf();
2464
2572
  }
2465
2573
  /** @returns a new Size representing the sum of the two Sizes. */
2466
2574
  add(e) {
2467
- return A(e) && (e = e.value), new m(ae(this.valueOf(), e.valueOf()));
2575
+ return B(e) && (e = e.value), new y(ue(this.valueOf(), e.valueOf()));
2468
2576
  }
2469
2577
  /** @returns a new Size representing the difference of the two Sizes. */
2470
2578
  sub(e) {
2471
- return A(e) && (e = e.value), new m(q(this.valueOf(), e.valueOf()));
2579
+ return B(e) && (e = e.value), new y(Z(this.valueOf(), e.valueOf()));
2472
2580
  }
2473
2581
  /**
2474
2582
  * Multiplies this Size by a scalar value.
@@ -2477,7 +2585,7 @@ let I = class M extends ee {
2477
2585
  * @returns A new Size representing this Size multiplied by the value.
2478
2586
  */
2479
2587
  mult(e) {
2480
- return new m(C(this.valueOf(), e));
2588
+ return new y(R(this.valueOf(), e));
2481
2589
  }
2482
2590
  /**
2483
2591
  * Divides this Size by a scalar value.
@@ -2486,39 +2594,39 @@ let I = class M extends ee {
2486
2594
  * @returns A new Size representing this Size divided by the value.
2487
2595
  */
2488
2596
  div(e) {
2489
- return new m(Oe(this.valueOf(), e));
2597
+ return new y(ve(this.valueOf(), e));
2490
2598
  }
2491
2599
  /** @returns a new Size representing the truncated value of the Size. */
2492
2600
  truncate(e) {
2493
- return new m(
2494
- Math.trunc(this.valueOf() / new m(e).valueOf()) * new m(e).valueOf()
2601
+ return new y(
2602
+ Math.trunc(this.valueOf() / new y(e).valueOf()) * new y(e).valueOf()
2495
2603
  );
2496
2604
  }
2497
2605
  /** @returns a new Size representing the remainder of the Size. */
2498
2606
  remainder(e) {
2499
- return m.bytes(this.valueOf() % new m(e).valueOf());
2607
+ return y.bytes(this.valueOf() % new y(e).valueOf());
2500
2608
  }
2501
2609
  /** @returns the number of gigabytes in the Size. */
2502
2610
  get gigabytes() {
2503
- return this.valueOf() / m.GIGABYTE.valueOf();
2611
+ return this.valueOf() / y.GIGABYTE.valueOf();
2504
2612
  }
2505
2613
  /** @returns the number of megabytes in the Size. */
2506
2614
  get megabytes() {
2507
- return this.valueOf() / m.MEGABYTE.valueOf();
2615
+ return this.valueOf() / y.MEGABYTE.valueOf();
2508
2616
  }
2509
2617
  /** @returns the number of kilobytes in the Size. */
2510
2618
  get kilobytes() {
2511
- return this.valueOf() / m.KILOBYTE.valueOf();
2619
+ return this.valueOf() / y.KILOBYTE.valueOf();
2512
2620
  }
2513
2621
  /** @returns the number of terabytes in the Size. */
2514
2622
  get terabytes() {
2515
- return this.valueOf() / m.TERABYTE.valueOf();
2623
+ return this.valueOf() / y.TERABYTE.valueOf();
2516
2624
  }
2517
2625
  /** @returns a nicely formatted string representation of the Size. */
2518
2626
  toString() {
2519
- const e = this.truncate(m.TERABYTE), r = this.truncate(m.GIGABYTE), n = this.truncate(m.MEGABYTE), s = this.truncate(m.KILOBYTE), i = this.truncate(m.BYTE), o = e, c = r.sub(e), h = n.sub(r), l = s.sub(n), d = i.sub(s);
2520
- let y = "";
2521
- return o.isZero || (y += `${o.terabytes}TB `), c.isZero || (y += `${c.gigabytes}GB `), h.isZero || (y += `${h.megabytes}MB `), l.isZero || (y += `${l.kilobytes}KB `), (!d.isZero || y === "") && (y += `${d.valueOf()}B`), y.trim();
2627
+ const e = this.truncate(y.TERABYTE), r = this.truncate(y.GIGABYTE), n = this.truncate(y.MEGABYTE), s = this.truncate(y.KILOBYTE), i = this.truncate(y.BYTE), o = e, h = r.sub(e), f = n.sub(r), l = s.sub(n), d = i.sub(s);
2628
+ let m = "";
2629
+ return o.isZero || (m += `${o.terabytes}TB `), h.isZero || (m += `${h.gigabytes}GB `), f.isZero || (m += `${f.megabytes}MB `), l.isZero || (m += `${l.kilobytes}KB `), (!d.isZero || m === "") && (m += `${d.valueOf()}B`), m.trim();
2522
2630
  }
2523
2631
  /**
2524
2632
  * Creates a Size from the given number of bytes.
@@ -2527,10 +2635,10 @@ let I = class M extends ee {
2527
2635
  * @returns A Size representing the given number of bytes.
2528
2636
  */
2529
2637
  static bytes(e = 1) {
2530
- return new m(e);
2638
+ return new y(e);
2531
2639
  }
2532
2640
  /** A single byte */
2533
- static BYTE = new m(1);
2641
+ static BYTE = new y(1);
2534
2642
  /**
2535
2643
  * Creates a Size from the given number if kilobytes.
2536
2644
  *
@@ -2538,10 +2646,10 @@ let I = class M extends ee {
2538
2646
  * @returns A Size representing the given number of kilobytes.
2539
2647
  */
2540
2648
  static kilobytes(e = 1) {
2541
- return m.bytes(new m(e).valueOf() * 1e3);
2649
+ return y.bytes(new y(e).valueOf() * 1e3);
2542
2650
  }
2543
2651
  /** A kilobyte */
2544
- static KILOBYTE = m.kilobytes(1);
2652
+ static KILOBYTE = y.kilobytes(1);
2545
2653
  /**
2546
2654
  * Creates a Size from the given number of megabytes.
2547
2655
  *
@@ -2549,10 +2657,10 @@ let I = class M extends ee {
2549
2657
  * @returns A Size representing the given number of megabytes.
2550
2658
  */
2551
2659
  static megabytes(e = 1) {
2552
- return m.kilobytes(new m(e).valueOf() * 1e3);
2660
+ return y.kilobytes(new y(e).valueOf() * 1e3);
2553
2661
  }
2554
2662
  /** A megabyte */
2555
- static MEGABYTE = m.megabytes(1);
2663
+ static MEGABYTE = y.megabytes(1);
2556
2664
  /**
2557
2665
  * Creates a Size from the given number of gigabytes.
2558
2666
  *
@@ -2560,10 +2668,10 @@ let I = class M extends ee {
2560
2668
  * @returns A Size representing the given number of gigabytes.
2561
2669
  */
2562
2670
  static gigabytes(e = 1) {
2563
- return m.megabytes(new m(e).valueOf() * 1e3);
2671
+ return y.megabytes(new y(e).valueOf() * 1e3);
2564
2672
  }
2565
2673
  /** A gigabyte */
2566
- static GIGABYTE = m.gigabytes(1);
2674
+ static GIGABYTE = y.gigabytes(1);
2567
2675
  /**
2568
2676
  * Creates a Size from the given number of terabytes.
2569
2677
  *
@@ -2571,23 +2679,27 @@ let I = class M extends ee {
2571
2679
  * @returns A Size representing the given number of terabytes.
2572
2680
  */
2573
2681
  static terabytes(e) {
2574
- return m.gigabytes(new m(e).valueOf() * 1e3);
2682
+ return y.gigabytes(new y(e).valueOf() * 1e3);
2575
2683
  }
2576
2684
  /** A terabyte. */
2577
- static TERABYTE = m.terabytes(1);
2685
+ static TERABYTE = y.terabytes(1);
2578
2686
  /** The zero value for Size */
2579
- static ZERO = new m(0);
2687
+ static ZERO = new y(0);
2580
2688
  /** A zod schema for a Size. */
2581
2689
  static z = a.union([
2582
- a.number().transform((e) => new m(e)),
2583
- a.instanceof(m)
2690
+ a.number().transform((e) => new y(e)),
2691
+ a.instanceof(y)
2584
2692
  ]);
2585
2693
  /** @returns true if the Size is zero. */
2586
2694
  get isZero() {
2587
2695
  return this.valueOf() === 0;
2588
2696
  }
2589
2697
  };
2590
- const qo = a.union([
2698
+ a.object({
2699
+ start: a.number(),
2700
+ end: a.number()
2701
+ });
2702
+ const Mu = a.union([
2591
2703
  a.instanceof(Uint8Array),
2592
2704
  a.instanceof(Uint16Array),
2593
2705
  a.instanceof(Uint32Array),
@@ -2598,40 +2710,65 @@ const qo = a.union([
2598
2710
  a.instanceof(Int16Array),
2599
2711
  a.instanceof(Int32Array),
2600
2712
  a.instanceof(BigInt64Array)
2601
- ]), Ur = (t) => {
2713
+ ]), Vr = (t) => {
2602
2714
  const e = typeof t;
2603
- return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof w || t instanceof O || t instanceof Date;
2604
- }, Li = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Ce(r, -n), Ce = (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), Di = /^(?:[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;
2605
- function Pi(t) {
2606
- return typeof t == "string" && Di.test(t);
2715
+ return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof $ || t instanceof c || t instanceof Date;
2716
+ }, ha = (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), fa = "00000000-0000-0000-0000-000000000000", da = /^(?:[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 ga(t) {
2718
+ return typeof t == "string" && da.test(t);
2607
2719
  }
2608
- const N = [];
2720
+ const I = [];
2609
2721
  for (let t = 0; t < 256; ++t)
2610
- N.push((t + 256).toString(16).slice(1));
2611
- function ki(t, e = 0) {
2612
- return (N[t[e + 0]] + N[t[e + 1]] + N[t[e + 2]] + N[t[e + 3]] + "-" + N[t[e + 4]] + N[t[e + 5]] + "-" + N[t[e + 6]] + N[t[e + 7]] + "-" + N[t[e + 8]] + N[t[e + 9]] + "-" + N[t[e + 10]] + N[t[e + 11]] + N[t[e + 12]] + N[t[e + 13]] + N[t[e + 14]] + N[t[e + 15]]).toLowerCase();
2722
+ I.push((t + 256).toString(16).slice(1));
2723
+ function Gr(t, e = 0) {
2724
+ 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();
2613
2725
  }
2614
- function qi(t, e = 0) {
2615
- const r = ki(t, e);
2616
- if (!Pi(r))
2726
+ function pa(t, e = 0) {
2727
+ const r = Gr(t, e);
2728
+ if (!ga(r))
2617
2729
  throw TypeError("Stringified UUID is invalid");
2618
2730
  return r;
2619
2731
  }
2620
- typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
2621
- const Cr = (t, e) => qi(t, e), Y = -1, pt = {
2622
- [Symbol.iterator]: () => pt,
2732
+ let it;
2733
+ const ma = new Uint8Array(16);
2734
+ function ya() {
2735
+ if (!it) {
2736
+ if (typeof crypto > "u" || !crypto.getRandomValues)
2737
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2738
+ it = crypto.getRandomValues.bind(crypto);
2739
+ }
2740
+ return it(ma);
2741
+ }
2742
+ const ba = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), er = { randomUUID: ba };
2743
+ function wa(t, e, r) {
2744
+ t = t || {};
2745
+ const n = t.random ?? t.rng?.() ?? ya();
2746
+ if (n.length < 16)
2747
+ throw new Error("Random bytes length must be >= 16");
2748
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Gr(n);
2749
+ }
2750
+ function $a(t, e, r) {
2751
+ return er.randomUUID && !t ? er.randomUUID() : wa(t);
2752
+ }
2753
+ const Oa = () => $a(), Gt = (t, e) => pa(t, e), va = fa, Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2754
+ __proto__: null,
2755
+ ZERO: va,
2756
+ create: Oa,
2757
+ parse: Gt
2758
+ }, Symbol.toStringTag, { value: "Module" })), Y = -1, Ot = {
2759
+ [Symbol.iterator]: () => Ot,
2623
2760
  next: () => ({ done: !0, value: void 0 })
2624
- }, zi = a.string().transform(
2761
+ }, Ta = a.string().transform(
2625
2762
  (t) => new Uint8Array(
2626
2763
  atob(t).split("").map((e) => e.charCodeAt(0))
2627
2764
  ).buffer
2628
- ), Zi = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), mt = 10, jr = (t, e) => {
2765
+ ), xa = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), vt = 10, Hr = (t, e) => {
2629
2766
  if (t === "number" && !e.isNumeric)
2630
2767
  throw new Error(`cannot convert series of type ${e.toString()} to number`);
2631
2768
  if (t === "bigint" && !e.usesBigInt)
2632
2769
  throw new Error(`cannot convert series of type ${e.toString()} to bigint`);
2633
- }, Rr = "sy_x_telem_series";
2634
- let Lr = class F {
2770
+ }, Xr = "sy_x_telem_series";
2771
+ let Jr = class W {
2635
2772
  /**
2636
2773
  * A unique identifier for the series. If specified by the user, it is their
2637
2774
  * responsibility to ensure that it is unique. If not specified, a new ID will be
@@ -2642,7 +2779,7 @@ let Lr = class F {
2642
2779
  * A discriminator used for identifying instances of the series class even
2643
2780
  * when bundlers mangle the class name.
2644
2781
  */
2645
- discriminator = Rr;
2782
+ discriminator = Xr;
2646
2783
  /** The data type of the series. */
2647
2784
  dataType;
2648
2785
  /**
@@ -2658,7 +2795,7 @@ let Lr = class F {
2658
2795
  /** The underlying data. */
2659
2796
  _data;
2660
2797
  /** The time range occupied by the series' data. */
2661
- timeRange = X.ZERO;
2798
+ timeRange = Q.ZERO;
2662
2799
  /**
2663
2800
  * Alignment defines the location of the series relative to other series in a logical
2664
2801
  * group. Useful for defining the position of the series within a channel's data.
@@ -2687,22 +2824,22 @@ let Lr = class F {
2687
2824
  * can be constructed into a series.
2688
2825
  */
2689
2826
  static crudeZ = a.object({
2690
- timeRange: X.z.optional(),
2691
- dataType: T.z,
2827
+ timeRange: Q.z.optional(),
2828
+ dataType: S.z,
2692
2829
  alignment: a.coerce.bigint().optional(),
2693
2830
  data: a.union([
2694
- zi,
2695
- Zi,
2831
+ Ta,
2832
+ xa,
2696
2833
  a.instanceof(ArrayBuffer),
2697
2834
  a.instanceof(Uint8Array)
2698
2835
  ]),
2699
- glBufferUsage: ji.optional().default("static").optional()
2836
+ glBufferUsage: la.optional().default("static").optional()
2700
2837
  });
2701
2838
  /**
2702
2839
  * A zod schema that validates and constructs a series from it's crude
2703
2840
  * representation.
2704
2841
  */
2705
- static z = F.crudeZ.transform((e) => new F(e));
2842
+ static z = W.crudeZ.transform((e) => new W(e));
2706
2843
  /**
2707
2844
  * The Series constructor accepts either a SeriesArgs object or a CrudeSeries value.
2708
2845
  *
@@ -2777,30 +2914,30 @@ let Lr = class F {
2777
2914
  * @throws Error if data type cannot be inferred from input
2778
2915
  */
2779
2916
  constructor(e) {
2780
- Yi(e) && (e = { data: e }), e.data ??= [];
2917
+ Sa(e) && (e = { data: e }), e.data ??= [];
2781
2918
  const {
2782
2919
  dataType: r,
2783
2920
  timeRange: n,
2784
2921
  sampleOffset: s = 0,
2785
2922
  glBufferUsage: i = "static",
2786
2923
  alignment: o = 0n,
2787
- alignmentMultiple: c = 1n,
2788
- key: h = qt(),
2924
+ alignmentMultiple: h = 1n,
2925
+ key: f = Vt(),
2789
2926
  data: l
2790
2927
  } = e;
2791
- if (Dr(l)) {
2928
+ if (Kr(l)) {
2792
2929
  const p = l;
2793
2930
  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;
2794
2931
  return;
2795
2932
  }
2796
- const d = Ur(l), y = Array.isArray(l);
2797
- if (r != null) this.dataType = new T(r);
2933
+ const d = Vr(l), m = Array.isArray(l);
2934
+ if (r != null) this.dataType = new S(r);
2798
2935
  else {
2799
2936
  if (l instanceof ArrayBuffer)
2800
2937
  throw new Error(
2801
2938
  "cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
2802
2939
  );
2803
- if (y || d) {
2940
+ if (m || d) {
2804
2941
  let p = l;
2805
2942
  if (!d) {
2806
2943
  if (l.length === 0)
@@ -2809,38 +2946,38 @@ let Lr = class F {
2809
2946
  );
2810
2947
  p = l[0];
2811
2948
  }
2812
- if (typeof p == "string") this.dataType = T.STRING;
2813
- else if (typeof p == "number") this.dataType = T.FLOAT64;
2814
- else if (typeof p == "bigint") this.dataType = T.INT64;
2815
- else if (typeof p == "boolean") this.dataType = T.BOOLEAN;
2816
- else if (p instanceof w || p instanceof Date || p instanceof w)
2817
- this.dataType = T.TIMESTAMP;
2818
- else if (typeof p == "object") this.dataType = T.JSON;
2949
+ if (typeof p == "string") this.dataType = S.STRING;
2950
+ else if (typeof p == "number") this.dataType = S.FLOAT64;
2951
+ else if (typeof p == "bigint") this.dataType = S.INT64;
2952
+ else if (typeof p == "boolean") this.dataType = S.BOOLEAN;
2953
+ else if (p instanceof $ || p instanceof Date || p instanceof $)
2954
+ this.dataType = S.TIMESTAMP;
2955
+ else if (typeof p == "object") this.dataType = S.JSON;
2819
2956
  else
2820
2957
  throw new Error(
2821
2958
  `cannot infer data type of ${typeof p} when constructing a Series from a JS array`
2822
2959
  );
2823
- } else this.dataType = new T(l);
2960
+ } else this.dataType = new S(l);
2824
2961
  }
2825
- if (!y && !d) this._data = l;
2826
- else if (y && l.length === 0)
2962
+ if (!m && !d) this._data = l;
2963
+ else if (m && l.length === 0)
2827
2964
  this._data = new this.dataType.Array([]).buffer;
2828
2965
  else {
2829
2966
  let p = d ? [l] : l;
2830
- const L = p[0];
2831
- (L instanceof w || L instanceof Date || L instanceof O) && (p = p.map((B) => new w(B).valueOf())), this.dataType.equals(T.STRING) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(`${p.join(`
2967
+ const A = p[0];
2968
+ (A instanceof $ || A instanceof Date || A instanceof c) && (p = p.map((U) => new $(U).valueOf())), this.dataType.equals(S.STRING) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(`${p.join(`
2832
2969
  `)}
2833
- `).buffer) : this.dataType.equals(T.JSON) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(
2834
- `${p.map((B) => st.encodeString(B)).join(`
2970
+ `).buffer) : this.dataType.equals(S.JSON) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(
2971
+ `${p.map((U) => ct.encodeString(U)).join(`
2835
2972
  `)}
2836
2973
  `
2837
- ).buffer) : this.dataType.usesBigInt && typeof L == "number" ? this._data = new this.dataType.Array(
2838
- p.map((B) => BigInt(Math.round(B)))
2839
- ).buffer : !this.dataType.usesBigInt && typeof L == "bigint" ? this._data = new this.dataType.Array(
2974
+ ).buffer) : this.dataType.usesBigInt && typeof A == "number" ? this._data = new this.dataType.Array(
2975
+ p.map((U) => BigInt(Math.round(U)))
2976
+ ).buffer : !this.dataType.usesBigInt && typeof A == "bigint" ? this._data = new this.dataType.Array(
2840
2977
  p.map(Number)
2841
2978
  ).buffer : this._data = new this.dataType.Array(p).buffer;
2842
2979
  }
2843
- this.key = h, this.alignment = o, this.alignmentMultiple = c, this.sampleOffset = s ?? 0, this.timeRange = n ?? X.ZERO, this.gl = {
2980
+ this.key = f, this.alignment = o, this.alignmentMultiple = h, this.sampleOffset = s ?? 0, this.timeRange = n ?? Q.ZERO, this.gl = {
2844
2981
  control: null,
2845
2982
  buffer: null,
2846
2983
  prevBuffer: 0,
@@ -2857,7 +2994,7 @@ let Lr = class F {
2857
2994
  static alloc({ capacity: e, dataType: r, ...n }) {
2858
2995
  if (e === 0)
2859
2996
  throw new Error("[Series] - cannot allocate an array of length 0");
2860
- const s = new new T(r).Array(e), i = new F({ data: s.buffer, dataType: r, ...n });
2997
+ const s = new new S(r).Array(e), i = new W({ data: s.buffer, dataType: r, ...n });
2861
2998
  return i.writePos = 0, i;
2862
2999
  }
2863
3000
  /**
@@ -2947,16 +3084,16 @@ let Lr = class F {
2947
3084
  * @returns An array of values parsed from the JSON series.
2948
3085
  */
2949
3086
  parseJSON(e) {
2950
- if (!this.dataType.equals(T.JSON))
3087
+ if (!this.dataType.equals(S.JSON))
2951
3088
  throw new Error("cannot parse non-JSON series as JSON");
2952
- return this.toStrings().map((r) => e.parse(st.decodeString(r)));
3089
+ return this.toStrings().map((r) => e.parse(ct.decodeString(r)));
2953
3090
  }
2954
3091
  /**
2955
3092
  * Returns the capacity of the series in bytes.
2956
3093
  * @returns The size of the underlying buffer in bytes.
2957
3094
  */
2958
3095
  get byteCapacity() {
2959
- return new Pe(this.underlyingData.byteLength);
3096
+ return new Ze(this.underlyingData.byteLength);
2960
3097
  }
2961
3098
  /**
2962
3099
  * Returns the capacity of the series in samples.
@@ -2972,7 +3109,7 @@ let Lr = class F {
2972
3109
  * @returns The size of the data in bytes.
2973
3110
  */
2974
3111
  get byteLength() {
2975
- return this.writePos === Y ? this.byteCapacity : this.dataType.isVariable ? new Pe(this.writePos) : this.dataType.density.size(this.writePos);
3112
+ return this.writePos === Y ? this.byteCapacity : this.dataType.isVariable ? new Ze(this.writePos) : this.dataType.density.size(this.writePos);
2976
3113
  }
2977
3114
  /**
2978
3115
  * Returns the number of samples in this array.
@@ -2988,7 +3125,7 @@ let Lr = class F {
2988
3125
  let e = 0;
2989
3126
  const r = [0];
2990
3127
  return this.data.forEach((n, s) => {
2991
- n === mt && (e++, r.push(s + 1));
3128
+ n === vt && (e++, r.push(s + 1));
2992
3129
  }), this._cachedIndexes = r, this.cachedLength = e, e;
2993
3130
  }
2994
3131
  /**
@@ -3004,8 +3141,8 @@ let Lr = class F {
3004
3141
  if (this.dataType.equals(e)) return this;
3005
3142
  const n = new e.Array(this.length);
3006
3143
  for (let s = 0; s < this.length; s++)
3007
- n[s] = Li(this.dataType, e, this.data[s], r);
3008
- return new F({
3144
+ n[s] = ha(this.dataType, e, this.data[s], r);
3145
+ return new W({
3009
3146
  data: n.buffer,
3010
3147
  dataType: e,
3011
3148
  timeRange: this.timeRange,
@@ -3016,7 +3153,7 @@ let Lr = class F {
3016
3153
  }
3017
3154
  calcRawMax() {
3018
3155
  if (this.length === 0) return -1 / 0;
3019
- if (this.dataType.equals(T.TIMESTAMP))
3156
+ if (this.dataType.equals(S.TIMESTAMP))
3020
3157
  this.cachedMax = this.data[this.data.length - 1];
3021
3158
  else if (this.dataType.usesBigInt) {
3022
3159
  const e = this.data;
@@ -3034,11 +3171,11 @@ let Lr = class F {
3034
3171
  calcMax() {
3035
3172
  if (this.dataType.isVariable)
3036
3173
  throw new Error("cannot calculate maximum on a variable length data type");
3037
- return this.writePos === 0 ? -1 / 0 : (this.cachedMax ??= this.calcRawMax(), Ce(this.cachedMax, this.sampleOffset));
3174
+ return this.writePos === 0 ? -1 / 0 : (this.cachedMax ??= this.calcRawMax(), Le(this.cachedMax, this.sampleOffset));
3038
3175
  }
3039
3176
  calcRawMin() {
3040
3177
  if (this.length === 0) return 1 / 0;
3041
- if (this.dataType.equals(T.TIMESTAMP)) this.cachedMin = this.data[0];
3178
+ if (this.dataType.equals(S.TIMESTAMP)) this.cachedMin = this.data[0];
3042
3179
  else if (this.dataType.usesBigInt) {
3043
3180
  const e = this.data;
3044
3181
  this.cachedMin = e.reduce((r, n) => r < n ? r : n);
@@ -3055,7 +3192,7 @@ let Lr = class F {
3055
3192
  calcMin() {
3056
3193
  if (this.dataType.isVariable)
3057
3194
  throw new Error("cannot calculate minimum on a variable length data type");
3058
- return this.writePos === 0 ? 1 / 0 : (this.cachedMin ??= this.calcRawMin(), Ce(this.cachedMin, this.sampleOffset));
3195
+ return this.writePos === 0 ? 1 / 0 : (this.cachedMin ??= this.calcRawMin(), Le(this.cachedMin, this.sampleOffset));
3059
3196
  }
3060
3197
  /** @returns the bounds of the series. */
3061
3198
  get bounds() {
@@ -3081,18 +3218,18 @@ let Lr = class F {
3081
3218
  }
3082
3219
  at(e, r = !1) {
3083
3220
  if (this.dataType.isVariable) return this.atVariable(e, r ?? !1);
3084
- if (this.dataType.equals(T.UUID)) return this.atUUID(e, r);
3221
+ if (this.dataType.equals(S.UUID)) return this.atUUID(e, r);
3085
3222
  e < 0 && (e = this.length + e);
3086
3223
  const n = this.data[e];
3087
3224
  if (n == null) {
3088
3225
  if (r === !0) throw new Error(`[series] - no value at index ${e}`);
3089
3226
  return;
3090
3227
  }
3091
- return Ce(n, this.sampleOffset);
3228
+ return Le(n, this.sampleOffset);
3092
3229
  }
3093
3230
  atUUID(e, r) {
3094
3231
  e < 0 && (e = this.length + e);
3095
- const n = Cr(
3232
+ const n = Gt(
3096
3233
  new Uint8Array(this.buffer, e * this.dataType.density.valueOf())
3097
3234
  );
3098
3235
  if (n == null) {
@@ -3108,7 +3245,7 @@ let Lr = class F {
3108
3245
  else {
3109
3246
  e < 0 && (e = this.length + e);
3110
3247
  for (let o = 0; o < this.data.length; o++)
3111
- if (this.data[o] === mt) {
3248
+ if (this.data[o] === vt) {
3112
3249
  if (e === 0) {
3113
3250
  s = o;
3114
3251
  break;
@@ -3121,7 +3258,7 @@ let Lr = class F {
3121
3258
  }
3122
3259
  }
3123
3260
  const i = this.data.slice(n, s);
3124
- return this.dataType.equals(T.STRING) ? new TextDecoder().decode(i) : bt(JSON.parse(new TextDecoder().decode(i)));
3261
+ return this.dataType.equals(S.STRING) ? new TextDecoder().decode(i) : St(JSON.parse(new TextDecoder().decode(i)));
3125
3262
  }
3126
3263
  /**
3127
3264
  * @returns the index of the first sample that is greater than or equal to the given value.
@@ -3130,7 +3267,7 @@ let Lr = class F {
3130
3267
  */
3131
3268
  binarySearch(e) {
3132
3269
  let r = 0, n = this.length - 1;
3133
- const s = ze(e);
3270
+ const s = We(e);
3134
3271
  for (; r <= n; ) {
3135
3272
  const i = Math.floor((r + n) / 2), o = s(this.at(i, !0), e);
3136
3273
  if (o === 0) return i;
@@ -3146,7 +3283,7 @@ let Lr = class F {
3146
3283
  * be the same buffer previously passed to {@method acquire} or {@method updateGLBuffer}.
3147
3284
  */
3148
3285
  updateGLBuffer(e) {
3149
- if (this.gl.control = e, !this.dataType.equals(T.FLOAT32) && !this.dataType.equals(T.UINT8))
3286
+ if (this.gl.control = e, !this.dataType.equals(S.FLOAT32) && !this.dataType.equals(S.UINT8))
3150
3287
  throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");
3151
3288
  const { buffer: r, bufferUsage: n, prevBuffer: s } = this.gl;
3152
3289
  if (r == null && (this.gl.buffer = e.createBuffer()), this.writePos !== s)
@@ -3162,7 +3299,7 @@ let Lr = class F {
3162
3299
  ), this.gl.prevBuffer = Y;
3163
3300
  }
3164
3301
  as(e) {
3165
- return jr(e, this.dataType), this;
3302
+ return Hr(e, this.dataType), this;
3166
3303
  }
3167
3304
  /** @returns a digest containing information about the series. */
3168
3305
  get digest() {
@@ -3171,8 +3308,8 @@ let Lr = class F {
3171
3308
  dataType: this.dataType.toString(),
3172
3309
  sampleOffset: this.sampleOffset,
3173
3310
  alignment: {
3174
- lower: Gt(this.alignmentBounds.lower),
3175
- upper: Gt(this.alignmentBounds.upper),
3311
+ lower: rr(this.alignmentBounds.lower),
3312
+ upper: rr(this.alignmentBounds.upper),
3176
3313
  multiple: this.alignmentMultiple
3177
3314
  },
3178
3315
  timeRange: this.timeRange.toString(),
@@ -3210,10 +3347,10 @@ let Lr = class F {
3210
3347
  }
3211
3348
  [Symbol.iterator]() {
3212
3349
  if (this.dataType.isVariable) {
3213
- const e = new Fi(this);
3214
- return this.dataType.equals(T.JSON) ? new Wi(e) : e;
3350
+ const e = new Na(this);
3351
+ return this.dataType.equals(S.JSON) ? new Ia(e) : e;
3215
3352
  }
3216
- return this.dataType.equals(T.UUID) ? new Vi(this) : new Gi(this);
3353
+ return this.dataType.equals(S.UUID) ? new Ma(this) : new Aa(this);
3217
3354
  }
3218
3355
  /**
3219
3356
  * Returns a slice of the series from start to end.
@@ -3240,7 +3377,7 @@ let Lr = class F {
3240
3377
  * @returns An iterator over the specified range.
3241
3378
  */
3242
3379
  subIterator(e, r) {
3243
- return new Vt(this, e, r ?? this.length);
3380
+ return new tr(this, e, r ?? this.length);
3244
3381
  }
3245
3382
  /**
3246
3383
  * Returns an iterator over a portion of the series based on alignment.
@@ -3254,12 +3391,12 @@ let Lr = class F {
3254
3391
  ), s = Math.ceil(
3255
3392
  Number(r - this.alignment) / Number(this.alignmentMultiple)
3256
3393
  );
3257
- return new Vt(this, n, s);
3394
+ return new tr(this, n, s);
3258
3395
  }
3259
3396
  subBytes(e, r) {
3260
3397
  if (e >= 0 && (r == null || r >= this.byteLength.valueOf())) return this;
3261
3398
  const n = this.data.subarray(e, r);
3262
- return new F({
3399
+ return new W({
3263
3400
  data: n,
3264
3401
  dataType: this.dataType,
3265
3402
  timeRange: this.timeRange,
@@ -3271,7 +3408,7 @@ let Lr = class F {
3271
3408
  sliceSub(e, r, n) {
3272
3409
  if (r <= 0 && (n == null || n >= this.length)) return this;
3273
3410
  let s;
3274
- return e ? s = this.data.subarray(r, n) : s = this.data.slice(r, n), new F({
3411
+ return e ? s = this.data.subarray(r, n) : s = this.data.slice(r, n), new W({
3275
3412
  data: s,
3276
3413
  dataType: this.dataType,
3277
3414
  timeRange: this.timeRange,
@@ -3286,10 +3423,10 @@ let Lr = class F {
3286
3423
  * @returns A new series with the specified alignment.
3287
3424
  */
3288
3425
  reAlign(e) {
3289
- return new F({
3426
+ return new W({
3290
3427
  data: this.buffer,
3291
3428
  dataType: this.dataType,
3292
- timeRange: X.ZERO,
3429
+ timeRange: Q.ZERO,
3293
3430
  sampleOffset: this.sampleOffset,
3294
3431
  glBufferUsage: "static",
3295
3432
  alignment: e
@@ -3313,21 +3450,20 @@ let Lr = class F {
3313
3450
  return e += "])", e;
3314
3451
  }
3315
3452
  };
3316
- const Yi = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Lr ? !0 : Ur(t), Dr = Ci(Rr, Lr);
3317
- class Vt {
3453
+ const Sa = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Jr ? !0 : Vr(t), Kr = Xi(Xr, Jr);
3454
+ let tr = class {
3318
3455
  series;
3319
3456
  end;
3320
3457
  index;
3321
3458
  constructor(e, r, n) {
3322
3459
  this.series = e;
3323
3460
  const s = b(0, e.length + 1);
3324
- this.end = ut(s, n), this.index = ut(s, r);
3461
+ this.end = gt(s, n), this.index = gt(s, r);
3325
3462
  }
3326
3463
  next() {
3327
3464
  return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
3328
3465
  }
3329
- }
3330
- let Fi = class {
3466
+ }, Na = class {
3331
3467
  series;
3332
3468
  index;
3333
3469
  decoder;
@@ -3340,11 +3476,11 @@ let Fi = class {
3340
3476
  }
3341
3477
  next() {
3342
3478
  const e = this.index, r = this.series.data;
3343
- for (; this.index < r.length && r[this.index] !== mt; ) this.index++;
3479
+ for (; this.index < r.length && r[this.index] !== vt; ) this.index++;
3344
3480
  const n = this.index;
3345
3481
  return e === n ? { done: !0, value: void 0 } : (this.index++, { done: !1, value: this.decoder.decode(this.series.buffer.slice(e, n)) });
3346
3482
  }
3347
- }, Wi = class Pr {
3483
+ }, Ia = class Qr {
3348
3484
  wrapped;
3349
3485
  static schema = a.record(a.string(), a.unknown());
3350
3486
  constructor(e) {
@@ -3354,25 +3490,26 @@ let Fi = class {
3354
3490
  const e = this.wrapped.next();
3355
3491
  return e.done === !0 ? { done: !0, value: void 0 } : {
3356
3492
  done: !1,
3357
- value: st.decodeString(e.value, Pr.schema)
3493
+ value: ct.decodeString(e.value, Qr.schema)
3358
3494
  };
3359
3495
  }
3360
- }, Vi = class {
3496
+ }, Ma = class {
3361
3497
  series;
3362
3498
  index;
3363
3499
  data;
3364
3500
  density;
3365
3501
  constructor(e) {
3366
- if (!e.dataType.equals(T.UUID))
3502
+ if (!e.dataType.equals(S.UUID))
3367
3503
  throw new Error("cannot create a UUID series iterator for a non-UUID series");
3368
- this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = T.UUID.density.valueOf();
3504
+ this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = S.UUID.density.valueOf();
3369
3505
  }
3370
3506
  next() {
3371
3507
  if (this.index >= this.series.length) return { done: !0, value: void 0 };
3372
- const e = Cr(this.data, this.index * this.density);
3508
+ const e = Gt(this.data, this.index * this.density);
3373
3509
  return this.index++, { done: !1, value: e };
3374
3510
  }
3375
- }, Gi = class {
3511
+ };
3512
+ class Aa {
3376
3513
  series;
3377
3514
  index;
3378
3515
  constructor(e) {
@@ -3384,7 +3521,8 @@ let Fi = class {
3384
3521
  value: this.series.at(this.index++, !0)
3385
3522
  };
3386
3523
  }
3387
- }, Fo = class {
3524
+ }
3525
+ class ju {
3388
3526
  /** The array of series in this collection */
3389
3527
  series;
3390
3528
  /**
@@ -3437,14 +3575,14 @@ let Fi = class {
3437
3575
  this.series = e;
3438
3576
  }
3439
3577
  as(e) {
3440
- return jr(e, this.dataType), this;
3578
+ return Hr(e, this.dataType), this;
3441
3579
  }
3442
3580
  /**
3443
3581
  * Returns the data type of the series in this collection. If the collection is empty,
3444
3582
  * returns DataType.UNKNOWN.
3445
3583
  */
3446
3584
  get dataType() {
3447
- return this.series.length === 0 ? T.UNKNOWN : this.series[0].dataType;
3585
+ return this.series.length === 0 ? S.UNKNOWN : this.series[0].dataType;
3448
3586
  }
3449
3587
  /**
3450
3588
  * Returns the combined time range of all series in the collection. If the collection
@@ -3452,7 +3590,7 @@ let Fi = class {
3452
3590
  * series to the end of the last series.
3453
3591
  */
3454
3592
  get timeRange() {
3455
- return this.series.length === 0 ? X.ZERO : new X(
3593
+ return this.series.length === 0 ? Q.ZERO : new Q(
3456
3594
  this.series[0].timeRange.start,
3457
3595
  this.series[this.series.length - 1].timeRange.end
3458
3596
  );
@@ -3479,7 +3617,7 @@ let Fi = class {
3479
3617
  const r = () => new Error(
3480
3618
  `cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`
3481
3619
  ), n = e.dataType.equals(this.dataType);
3482
- if (Dr(e)) {
3620
+ if (Kr(e)) {
3483
3621
  if (this.series.length !== 0 && !n) throw r();
3484
3622
  this.series.push(e);
3485
3623
  } else {
@@ -3497,7 +3635,7 @@ let Fi = class {
3497
3635
  }
3498
3636
  atAlignment(e, r) {
3499
3637
  for (const n of this.series)
3500
- if (j(n.alignmentBounds, e))
3638
+ if (L(n.alignmentBounds, e))
3501
3639
  return n.atAlignment(e, r);
3502
3640
  if (r) throw new Error(`[series] - no value at alignment ${e}`);
3503
3641
  }
@@ -3516,7 +3654,7 @@ let Fi = class {
3516
3654
  * @returns An iterator over the specified range.
3517
3655
  */
3518
3656
  subIterator(e, r) {
3519
- return new et(this, e, r ?? this.length);
3657
+ return new at(this, e, r ?? this.length);
3520
3658
  }
3521
3659
  /**
3522
3660
  * Returns an iterator over a portion of the multi-series based on alignment.
@@ -3526,13 +3664,13 @@ let Fi = class {
3526
3664
  */
3527
3665
  subAlignmentIterator(e, r) {
3528
3666
  if (e >= this.alignmentBounds.upper || r <= this.alignmentBounds.lower)
3529
- return pt;
3667
+ return Ot;
3530
3668
  let n = 0;
3531
3669
  for (let i = 0; i < this.series.length; i++) {
3532
3670
  const o = this.series[i];
3533
3671
  if (e < o.alignment) break;
3534
3672
  if (e >= o.alignmentBounds.upper) n += o.length;
3535
- else if (j(o.alignmentBounds, e)) {
3673
+ else if (L(o.alignmentBounds, e)) {
3536
3674
  n += Math.ceil(
3537
3675
  Number(e - o.alignment) / Number(o.alignmentMultiple)
3538
3676
  );
@@ -3544,14 +3682,14 @@ let Fi = class {
3544
3682
  const o = this.series[i];
3545
3683
  if (r < o.alignment) break;
3546
3684
  if (r >= o.alignmentBounds.upper) s += o.length;
3547
- else if (j(o.alignmentBounds, r)) {
3685
+ else if (L(o.alignmentBounds, r)) {
3548
3686
  s += Math.ceil(
3549
3687
  Number(r - o.alignment) / Number(o.alignmentMultiple)
3550
3688
  );
3551
3689
  break;
3552
3690
  }
3553
3691
  }
3554
- return new et(this, n, s);
3692
+ return new at(this, n, s);
3555
3693
  }
3556
3694
  /**
3557
3695
  * Returns an iterator over the specified alignment range and span.
@@ -3560,19 +3698,19 @@ let Fi = class {
3560
3698
  * @returns An iterator over the specified range.
3561
3699
  */
3562
3700
  subAlignmentSpanIterator(e, r) {
3563
- if (e >= this.alignmentBounds.upper) return pt;
3701
+ if (e >= this.alignmentBounds.upper) return Ot;
3564
3702
  r = Math.min(r, Number(this.distance(e, this.alignmentBounds.upper)));
3565
3703
  let n = 0;
3566
3704
  for (let s = 0; s < this.series.length; s++) {
3567
3705
  const i = this.series[s];
3568
3706
  if (e < i.alignment) break;
3569
3707
  if (e >= i.alignmentBounds.upper) n += i.length;
3570
- else if (j(i.alignmentBounds, e)) {
3708
+ else if (L(i.alignmentBounds, e)) {
3571
3709
  n += Number(e - i.alignment);
3572
3710
  break;
3573
3711
  }
3574
3712
  }
3575
- return new et(this, n, n + r);
3713
+ return new at(this, n, n + r);
3576
3714
  }
3577
3715
  /**
3578
3716
  * Updates the WebGL buffer for all series in the collection.
@@ -3585,13 +3723,13 @@ let Fi = class {
3585
3723
  * Returns the bounds containing the minimum and maximum values across all series.
3586
3724
  */
3587
3725
  get bounds() {
3588
- return hr(this.series.map((e) => e.bounds));
3726
+ return Tr(this.series.map((e) => e.bounds));
3589
3727
  }
3590
3728
  /**
3591
3729
  * Returns the sum of the byte lengths of all series.
3592
3730
  */
3593
3731
  get byteLength() {
3594
- return new Pe(this.series.reduce((e, r) => e + r.byteLength.valueOf(), 0));
3732
+ return new Ze(this.series.reduce((e, r) => e + r.byteLength.valueOf(), 0));
3595
3733
  }
3596
3734
  /**
3597
3735
  * Returns a combined typed array containing all data from all series.
@@ -3612,7 +3750,7 @@ let Fi = class {
3612
3750
  */
3613
3751
  traverseAlignment(e, r) {
3614
3752
  const n = this.series.map((s) => s.alignmentBounds);
3615
- return fr(n, e, r);
3753
+ return xr(n, e, r);
3616
3754
  }
3617
3755
  /**
3618
3756
  * Acquires a reference to the WebGL buffer for all series.
@@ -3635,7 +3773,7 @@ let Fi = class {
3635
3773
  */
3636
3774
  distance(e, r) {
3637
3775
  const n = this.series.map((s) => s.alignmentBounds);
3638
- return dr(n, e, r);
3776
+ return Sr(n, e, r);
3639
3777
  }
3640
3778
  /**
3641
3779
  * Parses a JSON multi-series into an array of values using the provided zod schema.
@@ -3645,7 +3783,7 @@ let Fi = class {
3645
3783
  * @returns An array of values parsed from the JSON series.
3646
3784
  */
3647
3785
  parseJSON(e) {
3648
- if (!this.dataType.equals(T.JSON))
3786
+ if (!this.dataType.equals(S.JSON))
3649
3787
  throw new Error("cannot parse non-JSON series as JSON");
3650
3788
  return this.series.flatMap((r) => r.parseJSON(e));
3651
3789
  }
@@ -3658,7 +3796,7 @@ let Fi = class {
3658
3796
  next() {
3659
3797
  return { done: !0, value: void 0 };
3660
3798
  }
3661
- } : new Hi(this.series);
3799
+ } : new Ea(this.series);
3662
3800
  }
3663
3801
  /**
3664
3802
  * Returns an array of the values in the multi-series as strings.
@@ -3668,8 +3806,8 @@ let Fi = class {
3668
3806
  toStrings() {
3669
3807
  return this.series.flatMap((e) => e.toStrings());
3670
3808
  }
3671
- };
3672
- class Hi {
3809
+ }
3810
+ let Ea = class {
3673
3811
  series;
3674
3812
  seriesIndex;
3675
3813
  internal;
@@ -3683,8 +3821,7 @@ class Hi {
3683
3821
  [Symbol.iterator]() {
3684
3822
  return this;
3685
3823
  }
3686
- }
3687
- let et = class {
3824
+ }, at = class {
3688
3825
  series;
3689
3826
  index;
3690
3827
  end;
@@ -3698,51 +3835,51 @@ let et = class {
3698
3835
  return this;
3699
3836
  }
3700
3837
  };
3701
- const Gt = (t) => {
3838
+ const rr = (t) => {
3702
3839
  const e = t >> 32n, r = t & 0xffffffffn;
3703
3840
  return { domain: e, sample: r };
3704
3841
  };
3705
3842
  a.object({ key: a.string(), value: a.string() });
3706
- const Ji = a.record(
3843
+ const Ua = a.record(
3707
3844
  a.union([a.number(), a.string(), a.symbol()]),
3708
3845
  a.unknown()
3709
- ), zt = (t) => Object.entries(t), Xi = (t, e) => Object.fromEntries(zt(t).map(([r, n]) => [r, e(n, r)])), Ki = (t) => Object.fromEntries(zt(t).filter(([e, r]) => r !== void 0)), Qi = (t, ...e) => {
3846
+ ), Ht = (t) => Object.entries(t), Ba = (t, e) => Object.fromEntries(Ht(t).map(([r, n]) => [r, e(n, r)])), ja = (t) => Object.fromEntries(Ht(t).filter(([e, r]) => r !== void 0)), Ca = (t, ...e) => {
3710
3847
  const r = { ...t };
3711
3848
  for (const n of e) delete r[n];
3712
3849
  return r;
3713
- }, Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3850
+ }, Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3714
3851
  __proto__: null,
3715
- entries: zt,
3716
- map: Xi,
3717
- omit: Qi,
3718
- purgeUndefined: Ki,
3719
- unknownZ: Ji
3720
- }, Symbol.toStringTag, { value: "Module" })), kr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", _i = kr(), qr = ["macOS", "Windows", "Linux"], ea = ["macos", "windows", "linux"], ta = {
3852
+ entries: Ht,
3853
+ map: Ba,
3854
+ omit: Ca,
3855
+ purgeUndefined: ja,
3856
+ unknownZ: Ua
3857
+ }, Symbol.toStringTag, { value: "Module" })), _r = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Ra = _r(), en = ["macOS", "Windows", "Linux"], La = ["macos", "windows", "linux"], Da = {
3721
3858
  macos: "macOS",
3722
3859
  windows: "Windows",
3723
3860
  linux: "Linux"
3724
- }, ra = a.enum(qr).or(
3725
- a.enum(ea).transform((t) => ta[t])
3726
- ), na = () => {
3861
+ }, Pa = a.enum(en).or(
3862
+ a.enum(La).transform((t) => Da[t])
3863
+ ), ka = () => {
3727
3864
  if (typeof window > "u") return;
3728
3865
  const t = window.navigator.userAgent.toLowerCase();
3729
3866
  if (t.includes("mac")) return "macOS";
3730
3867
  if (t.includes("win")) return "Windows";
3731
3868
  if (t.includes("linux")) return "Linux";
3732
3869
  };
3733
- let tt;
3734
- const sa = (t = {}) => {
3870
+ let ot;
3871
+ const qa = ((t = {}) => {
3735
3872
  const { force: e, default: r } = t;
3736
- return e ?? tt ?? (tt = na(), tt ?? r);
3737
- }, Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3873
+ return e ?? ot ?? (ot = ka(), ot ?? r);
3874
+ }), Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3738
3875
  __proto__: null,
3739
- OPERATING_SYSTEMS: qr,
3740
- RUNTIME: _i,
3741
- detect: kr,
3742
- getOS: sa,
3743
- osZ: ra
3744
- }, Symbol.toStringTag, { value: "Module" })), ia = (...t) => t.map(zr).join(""), zr = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), aa = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3745
- class je {
3876
+ OPERATING_SYSTEMS: en,
3877
+ RUNTIME: Ra,
3878
+ detect: _r,
3879
+ getOS: qa,
3880
+ osZ: Pa
3881
+ }, Symbol.toStringTag, { value: "Module" })), za = (...t) => t.map(tn).join(""), tn = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), Za = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3882
+ class De {
3746
3883
  protocol;
3747
3884
  host;
3748
3885
  port;
@@ -3754,7 +3891,7 @@ class je {
3754
3891
  * @param pathPrefix - A path prefix to use for all requests. Defaults to "".
3755
3892
  */
3756
3893
  constructor({ host: e, port: r, protocol: n = "", pathPrefix: s = "" }) {
3757
- this.protocol = n, this.host = e, this.port = r, this.path = zr(s);
3894
+ this.protocol = n, this.host = e, this.port = r, this.path = tn(s);
3758
3895
  }
3759
3896
  /**
3760
3897
  * Replaces creates a new URL with the specified properties replaced.
@@ -3762,7 +3899,7 @@ class je {
3762
3899
  * @returns a new URL.
3763
3900
  */
3764
3901
  replace(e) {
3765
- return new je({
3902
+ return new De({
3766
3903
  host: e.host ?? this.host,
3767
3904
  port: e.port ?? this.port,
3768
3905
  protocol: e.protocol ?? this.protocol,
@@ -3775,106 +3912,121 @@ class je {
3775
3912
  * @returns a new URL.
3776
3913
  */
3777
3914
  child(e) {
3778
- return new je({
3915
+ return new De({
3779
3916
  ...this,
3780
- pathPrefix: ia(this.path, e)
3917
+ pathPrefix: za(this.path, e)
3781
3918
  });
3782
3919
  }
3783
3920
  /** @returns a string representation of the url */
3784
3921
  toString() {
3785
- return aa(
3922
+ return Za(
3786
3923
  `${this.protocol}://${this.host}:${this.port}/${this.path}`
3787
3924
  );
3788
3925
  }
3789
- static UNKNOWN = new je({ host: "unknown", port: 0 });
3926
+ static UNKNOWN = new De({ host: "unknown", port: 0 });
3790
3927
  }
3791
- const oa = 2, ua = 3, la = 2, ca = (t, e) => {
3928
+ const Fa = 2, Ya = 3, Wa = 2, Va = (t, e) => {
3792
3929
  if (Number.isNaN(t) || !Number.isFinite(t)) return t;
3793
- const r = ve(e);
3930
+ const r = Te(e);
3794
3931
  if (r == 0) return t;
3795
3932
  let n;
3796
- r >= 1e3 ? n = oa : r >= 1 ? n = ua : n = Math.ceil(-Math.log10(r)) + la;
3933
+ r >= 1e3 ? n = Fa : r >= 1 ? n = Ya : n = Math.ceil(-Math.log10(r)) + Wa;
3797
3934
  const s = 10 ** n;
3798
3935
  return Math.round(t * s) / s;
3799
- }, Jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3936
+ }, Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3800
3937
  __proto__: null,
3801
- abs: lr,
3802
- add: ae,
3803
- closeTo: kn,
3804
- div: Oe,
3805
- equal: ot,
3806
- isInteger: Le,
3807
- max: zn,
3808
- min: ur,
3809
- mult: C,
3810
- roundBySpan: ca,
3811
- roundToNearestMagnitude: qn,
3812
- sub: q
3938
+ MAX_INT16: sa,
3939
+ MAX_INT32: aa,
3940
+ MAX_INT64: ze,
3941
+ MAX_INT64_NUMBER: Yr,
3942
+ MAX_INT8: ra,
3943
+ MAX_UINT16: Ki,
3944
+ MAX_UINT32: Qi,
3945
+ MAX_UINT64: _i,
3946
+ MAX_UINT64_NUMBER: ea,
3947
+ MAX_UINT8: Ji,
3948
+ MIN_INT16: na,
3949
+ MIN_INT32: ia,
3950
+ MIN_INT64: oa,
3951
+ MIN_INT64_NUMBER: ua,
3952
+ MIN_INT8: ta,
3953
+ abs: Or,
3954
+ add: ue,
3955
+ closeTo: ts,
3956
+ div: ve,
3957
+ equal: dt,
3958
+ isInteger: ke,
3959
+ max: ns,
3960
+ min: $r,
3961
+ mult: R,
3962
+ roundBySpan: Va,
3963
+ roundToNearestMagnitude: rs,
3964
+ sub: Z
3813
3965
  }, Symbol.toStringTag, { value: "Module" }));
3814
3966
  a.object({
3815
- baseInterval: O.z.optional(),
3967
+ baseInterval: c.z.optional(),
3816
3968
  maxRetries: a.number().optional(),
3817
3969
  scale: a.number().optional()
3818
3970
  });
3819
- const ha = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, ke = a.string().regex(ha), ne = a.number().min(0).max(255), Zr = a.number().min(0).max(1), Je = a.tuple([ne, ne, ne, Zr]), fa = a.tuple([ne, ne, ne]), da = a.object({ rgba255: Je }), ga = a.number().min(0).max(360), pa = a.number().min(0).max(100), ma = a.number().min(0).max(100), Yr = a.tuple([ga, pa, ma, Zr]), Xe = a.union([ke, fa, Je, Yr, da]), Ke = Xe.transform((t) => x(t)), ya = (t) => Ke.safeParse(t).success, wa = (t) => Je.safeParse(t).success, ba = (t) => {
3971
+ const Ga = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ga), ie = a.number().min(0).max(255), rn = a.number().min(0).max(1), _e = a.tuple([ie, ie, ie, rn]), Ha = a.tuple([ie, ie, ie]), Xa = a.object({ rgba255: _e }), Ja = a.number().min(0).max(360), Ka = a.number().min(0).max(100), Qa = a.number().min(0).max(100), nn = a.tuple([Ja, Ka, Qa, rn]), et = a.union([Fe, Ha, _e, nn, Xa]), tt = et.transform((t) => T(t)), _a = (t) => tt.safeParse(t).success, eo = (t) => _e.safeParse(t).success, to = ((t) => {
3820
3972
  if (t == null) return;
3821
- const e = Ke.safeParse(t);
3822
- if (e.success) return Wr(e.data);
3973
+ const e = tt.safeParse(t);
3974
+ if (e.success) return an(e.data);
3823
3975
  if (typeof t == "string") return t;
3824
3976
  throw e.error;
3825
- }, x = (t, e = 1) => {
3826
- if (t = Xe.parse(t), typeof t == "string") return Re(t, e);
3977
+ }), T = (t, e = 1) => {
3978
+ if (t = et.parse(t), typeof t == "string") return Pe(t, e);
3827
3979
  if (Array.isArray(t)) {
3828
3980
  if (t.length < 3 || t.length > 4)
3829
3981
  throw new Error(`Invalid color: [${t.join(", ")}]`);
3830
3982
  return t.length === 3 ? [...t, e] : t;
3831
3983
  }
3832
3984
  return t.rgba255;
3833
- }, Fr = (t, e) => {
3985
+ }, sn = (t, e) => {
3834
3986
  if (t == null || e == null) return t == e;
3835
- const r = x(t), n = x(e);
3987
+ const r = T(t), n = T(e);
3836
3988
  return r.every((s, i) => s === n[i]);
3837
- }, Oa = (t) => {
3989
+ }, ro = ((t) => {
3838
3990
  if (t == null) return;
3839
- const [e, r, n, s] = x(t);
3840
- return `#${Se(e)}${Se(r)}${Se(n)}${s === 1 ? "" : Se(s * 255)}`;
3841
- }, Wr = (t) => {
3842
- const [e, r, n, s] = x(t);
3991
+ const [e, r, n, s] = T(t);
3992
+ return `#${Me(e)}${Me(r)}${Me(n)}${s === 1 ? "" : Me(s * 255)}`;
3993
+ }), an = (t) => {
3994
+ const [e, r, n, s] = T(t);
3843
3995
  return `rgba(${e}, ${r}, ${n}, ${s})`;
3844
- }, va = (t) => `rgb(${Vr(t)})`, Vr = (t) => {
3845
- const [e, r, n] = x(t);
3996
+ }, no = (t) => `rgb(${on(t)})`, on = (t) => {
3997
+ const [e, r, n] = T(t);
3846
3998
  return `${e}, ${r}, ${n}`;
3847
- }, xa = (t) => [...Zt(t), ge(t)], Zt = (t) => [
3848
- he(t) / 255,
3849
- fe(t) / 255,
3850
- de(t) / 255
3851
- ], he = (t) => x(t)[0], fe = (t) => x(t)[1], de = (t) => x(t)[2], ge = (t) => x(t)[3], $a = (t) => Fr(Yt, t), Ta = (t) => Ca(x(t)), Sa = (t, e) => {
3852
- const [r, n, s] = x(t);
3999
+ }, so = (t) => [...Xt(t), me(t)], Xt = (t) => [
4000
+ de(t) / 255,
4001
+ ge(t) / 255,
4002
+ pe(t) / 255
4003
+ ], de = (t) => T(t)[0], ge = (t) => T(t)[1], pe = (t) => T(t)[2], me = (t) => T(t)[3], io = (t) => sn(Jt, t), ao = (t) => mo(T(t)), oo = (t, e) => {
4004
+ const [r, n, s] = T(t);
3853
4005
  if (e > 100)
3854
4006
  throw new Error(`Color opacity must be between 0 and 100, got ${e}`);
3855
4007
  return e > 1 && (e /= 100), [r, n, s, e];
3856
- }, we = (t) => {
3857
- const [e, r, n] = Zt(t).map(
4008
+ }, $e = (t) => {
4009
+ const [e, r, n] = Xt(t).map(
3858
4010
  (s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
3859
4011
  );
3860
4012
  return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
3861
- }, Na = (t) => {
3862
- const [e, r, n] = Zt(t);
4013
+ }, uo = (t) => {
4014
+ const [e, r, n] = Xt(t);
3863
4015
  return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
3864
- }, yt = (t, e) => {
3865
- const r = x(t), n = x(e), s = we(r), i = we(n);
4016
+ }, Tt = (t, e) => {
4017
+ const r = T(t), n = T(e), s = $e(r), i = $e(n);
3866
4018
  return (Math.max(s, i) + 0.5) / (Math.min(s, i) + 0.5);
3867
- }, Ia = (t, ...e) => {
4019
+ }, lo = (t, ...e) => {
3868
4020
  if (e.length === 0)
3869
4021
  throw new Error("[Color.pickByContrast] - must provide at least one color");
3870
- const r = x(t), [n] = e.sort((s, i) => yt(r, i) - yt(r, s));
3871
- return x(n);
3872
- }, Ma = (t) => we(t) < 0.5, Ea = (t) => we(t) > 0.5, Re = (t, e = 1) => (t = ke.parse(t), t = Aa(t), [
3873
- Ne(t, 0),
3874
- Ne(t, 2),
3875
- Ne(t, 4),
3876
- t.length === 8 ? Ne(t, 6) / 255 : e
3877
- ]), Yt = [0, 0, 0, 0], Se = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ne = (t, e) => parseInt(t.slice(e, e + 2), 16), Aa = (t) => t.startsWith("#") ? t.slice(1) : t, Ht = {
4022
+ const r = T(t), [n] = e.sort((s, i) => Tt(r, i) - Tt(r, s));
4023
+ return T(n);
4024
+ }, co = (t) => $e(t) < 0.5, ho = (t) => $e(t) > 0.5, Pe = (t, e = 1) => (t = Fe.parse(t), t = fo(t), [
4025
+ Ae(t, 0),
4026
+ Ae(t, 2),
4027
+ Ae(t, 4),
4028
+ t.length === 8 ? Ae(t, 6) / 255 : e
4029
+ ]), Jt = [0, 0, 0, 0], Me = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ae = (t, e) => parseInt(t.slice(e, e + 2), 16), fo = (t) => t.startsWith("#") ? t.slice(1) : t, nr = {
3878
4030
  black: "#000000",
3879
4031
  white: "#ffffff",
3880
4032
  red: "#ff0000",
@@ -3906,16 +4058,16 @@ const ha = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, ke = a.string().regex(ha), ne = a.n
3906
4058
  khaki: "#f0e68c",
3907
4059
  crimson: "#dc143c",
3908
4060
  transparent: "transparent"
3909
- }, Ba = (t) => {
4061
+ }, go = (t) => {
3910
4062
  if (!t) return;
3911
4063
  const e = t.trim().toLowerCase();
3912
4064
  if (!(e === "transparent" || e === "none")) {
3913
4065
  if (e.startsWith("#")) {
3914
4066
  if (e.length === 4) {
3915
4067
  const r = e[1], n = e[2], s = e[3], i = `#${r}${r}${n}${n}${s}${s}`;
3916
- if (ke.safeParse(i).success) return Re(i);
4068
+ if (Fe.safeParse(i).success) return Pe(i);
3917
4069
  }
3918
- return (e.length === 7 || e.length === 9) && ke.safeParse(e).success ? Re(e) : void 0;
4070
+ return (e.length === 7 || e.length === 9) && Fe.safeParse(e).success ? Pe(e) : void 0;
3919
4071
  }
3920
4072
  if (e.startsWith("rgb")) {
3921
4073
  const r = e.match(
@@ -3926,252 +4078,256 @@ const ha = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, ke = a.string().regex(ha), ne = a.n
3926
4078
  return [parseInt(n), parseInt(s), parseInt(i), o ? parseFloat(o) : 1];
3927
4079
  }
3928
4080
  }
3929
- if (Ht[e]) return Re(Ht[e]);
4081
+ if (nr[e]) return Pe(nr[e]);
3930
4082
  }
3931
- }, Ua = (t) => {
3932
- t = Yr.parse(t);
4083
+ }, po = (t) => {
4084
+ t = nn.parse(t);
3933
4085
  let [e, r, n] = t;
3934
4086
  const s = t[3];
3935
4087
  e /= 360, r /= 100, n /= 100;
3936
- let i, o, c;
4088
+ let i, o, h;
3937
4089
  if (r === 0)
3938
- i = o = c = n;
4090
+ i = o = h = n;
3939
4091
  else {
3940
- const h = n < 0.5 ? n * (1 + r) : n + r - n * r, l = 2 * n - h;
3941
- i = rt(l, h, e + 1 / 3), o = rt(l, h, e), c = rt(l, h, e - 1 / 3);
4092
+ const f = n < 0.5 ? n * (1 + r) : n + r - n * r, l = 2 * n - f;
4093
+ i = ut(l, f, e + 1 / 3), o = ut(l, f, e), h = ut(l, f, e - 1 / 3);
3942
4094
  }
3943
- return [Math.round(i * 255), Math.round(o * 255), Math.round(c * 255), s];
3944
- }, rt = (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), Ca = (t) => {
3945
- t = Je.parse(t);
4095
+ return [Math.round(i * 255), Math.round(o * 255), Math.round(h * 255), s];
4096
+ }, 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), mo = (t) => {
4097
+ t = _e.parse(t);
3946
4098
  let [e, r, n] = t;
3947
4099
  const s = t[3];
3948
4100
  e /= 255, r /= 255, n /= 255;
3949
4101
  const i = Math.max(e, r, n), o = Math.min(e, r, n);
3950
- let c, h, l = (i + o) / 2;
4102
+ let h, f, l = (i + o) / 2;
3951
4103
  if (i === o)
3952
- c = h = 0;
4104
+ h = f = 0;
3953
4105
  else {
3954
4106
  const d = i - o;
3955
- h = l > 0.5 ? d / (2 - i - o) : d / (i + o), i === e ? c = (r - n) / d + (r < n ? 6 : 0) : i === r ? c = (n - e) / d + 2 : c = (e - r) / d + 4, c /= 6;
4107
+ f = l > 0.5 ? d / (2 - i - o) : d / (i + o), i === e ? h = (r - n) / d + (r < n ? 6 : 0) : i === r ? h = (n - e) / d + 2 : h = (e - r) / d + 4, h /= 6;
3956
4108
  }
3957
- return c *= 360, h *= 100, l *= 100, [Math.round(c), Math.round(h), Math.round(l), s];
3958
- }, ja = x("#000000"), Ra = x("#ffffff"), Gr = a.object({
4109
+ return h *= 360, f *= 100, l *= 100, [Math.round(h), Math.round(f), Math.round(l), s];
4110
+ }, yo = T("#000000"), bo = T("#ffffff"), un = a.object({
3959
4111
  key: a.string(),
3960
- color: Xe,
4112
+ color: et,
3961
4113
  position: a.number(),
3962
4114
  switched: a.boolean().optional()
3963
- }), La = a.array(Gr), Da = (t, e) => {
3964
- if (t.length === 0) return Yt;
3965
- if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return x(t[0].color);
4115
+ }), wo = a.array(un), $o = (t, e) => {
4116
+ if (t.length === 0) return Jt;
4117
+ if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return T(t[0].color);
3966
4118
  if (e >= t[t.length - 1].position)
3967
- return x(t[t.length - 1].color);
4119
+ return T(t[t.length - 1].color);
3968
4120
  for (let r = 0; r < t.length - 1; r++) {
3969
4121
  const n = t[r], s = t[r + 1];
3970
4122
  if (e < n.position || e > s.position) continue;
3971
- if (e === n.position) return x(n.color);
3972
- if (e === s.position) return x(s.color);
3973
- const i = (e - n.position) / (s.position - n.position), o = x(n.color), c = x(s.color), h = Math.round(
3974
- he(o) + i * (he(c) - he(o))
4123
+ if (e === n.position) return T(n.color);
4124
+ if (e === s.position) return T(s.color);
4125
+ const i = (e - n.position) / (s.position - n.position), o = T(n.color), h = T(s.color), f = Math.round(
4126
+ de(o) + i * (de(h) - de(o))
3975
4127
  ), l = Math.round(
3976
- fe(o) + i * (fe(c) - fe(o))
4128
+ ge(o) + i * (ge(h) - ge(o))
3977
4129
  ), d = Math.round(
3978
- de(o) + i * (de(c) - de(o))
3979
- ), y = ge(o) + i * (ge(c) - ge(o));
3980
- return x([h, l, d, y]);
4130
+ pe(o) + i * (pe(h) - pe(o))
4131
+ ), m = me(o) + i * (me(h) - me(o));
4132
+ return T([f, l, d, m]);
3981
4133
  }
3982
- return x(t[t.length - 1].color);
3983
- }, Pa = a.object({
4134
+ return T(t[t.length - 1].color);
4135
+ }, Oo = a.object({
3984
4136
  key: a.string(),
3985
4137
  name: a.string(),
3986
- color: Ke
3987
- }), ka = a.object({
4138
+ color: tt
4139
+ }), vo = a.object({
3988
4140
  key: a.string(),
3989
4141
  name: a.string(),
3990
- swatches: a.array(Pa)
3991
- }), qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4142
+ swatches: a.array(Oo)
4143
+ }), To = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3992
4144
  __proto__: null,
3993
- BLACK: ja,
3994
- WHITE: Ra,
3995
- ZERO: Yt,
3996
- aValue: ge,
3997
- bValue: de,
3998
- colorZ: Ke,
3999
- construct: x,
4000
- contrast: yt,
4001
- crudeZ: Xe,
4002
- cssString: ba,
4003
- equals: Fr,
4004
- fromCSS: Ba,
4005
- fromGradient: Da,
4006
- fromHSLA: Ua,
4007
- gValue: fe,
4008
- gradientZ: La,
4009
- grayness: Na,
4010
- hex: Oa,
4011
- hsla: Ta,
4012
- isColor: wa,
4013
- isCrude: ya,
4014
- isDark: Ma,
4015
- isLight: Ea,
4016
- isZero: $a,
4017
- luminance: we,
4018
- paletteZ: ka,
4019
- pickByContrast: Ia,
4020
- rValue: he,
4021
- rgbCSS: va,
4022
- rgbString: Vr,
4023
- rgba1: xa,
4024
- rgbaCSS: Wr,
4025
- setAlpha: Sa,
4026
- stopZ: Gr
4027
- }, Symbol.toStringTag, { value: "Module" })), Hr = a.int().min(0).max(255), Jr = 255, Xr = 0, za = {
4028
- lower: Xr,
4029
- upper: Jr + 1
4030
- }, Kr = a.object({
4145
+ BLACK: yo,
4146
+ WHITE: bo,
4147
+ ZERO: Jt,
4148
+ aValue: me,
4149
+ bValue: pe,
4150
+ colorZ: tt,
4151
+ construct: T,
4152
+ contrast: Tt,
4153
+ crudeZ: et,
4154
+ cssString: to,
4155
+ equals: sn,
4156
+ fromCSS: go,
4157
+ fromGradient: $o,
4158
+ fromHSLA: po,
4159
+ gValue: ge,
4160
+ gradientZ: wo,
4161
+ grayness: uo,
4162
+ hex: ro,
4163
+ hsla: ao,
4164
+ isColor: eo,
4165
+ isCrude: _a,
4166
+ isDark: co,
4167
+ isLight: ho,
4168
+ isZero: io,
4169
+ luminance: $e,
4170
+ paletteZ: vo,
4171
+ pickByContrast: lo,
4172
+ rValue: de,
4173
+ rgbCSS: no,
4174
+ rgbString: on,
4175
+ rgba1: so,
4176
+ rgbaCSS: an,
4177
+ setAlpha: oo,
4178
+ stopZ: un
4179
+ }, Symbol.toStringTag, { value: "Module" })), ln = a.int().min(0).max(255), cn = 255, hn = 0, xo = {
4180
+ lower: hn,
4181
+ upper: cn + 1
4182
+ }, fn = a.object({
4031
4183
  name: a.string(),
4032
4184
  key: a.string()
4033
- }), be = (t) => a.object({
4034
- subject: Kr,
4185
+ }), Oe = (t) => a.object({
4186
+ subject: fn,
4035
4187
  resource: t,
4036
- authority: Hr
4037
- }), Za = (...t) => (e) => e.filter((r) => {
4188
+ authority: ln
4189
+ }), So = (...t) => (e) => e.filter((r) => {
4038
4190
  let n = !1;
4039
4191
  return r.to != null && (n = t.includes(r.to.resource)), r.from != null && !n && (n = t.includes(r.from.resource)), n;
4040
- }), Qr = (t) => a.object({
4041
- from: be(t),
4192
+ }), dn = (t) => a.object({
4193
+ from: Oe(t),
4042
4194
  to: a.null()
4043
- }), _r = (t) => a.object({
4195
+ }), gn = (t) => a.object({
4044
4196
  from: a.null(),
4045
- to: be(t)
4046
- }), Ya = (t) => a.union([
4047
- Qr(t),
4048
- _r(t),
4197
+ to: Oe(t)
4198
+ }), No = (t) => a.union([
4199
+ dn(t),
4200
+ gn(t),
4049
4201
  a.object({
4050
- from: be(t),
4051
- to: be(t)
4202
+ from: Oe(t),
4203
+ to: Oe(t)
4052
4204
  })
4053
- ]), Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4205
+ ]), ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4054
4206
  __proto__: null,
4055
- ABSOLUTE_AUTHORITY: Jr,
4056
- AUTHORITY_BOUNDS: za,
4057
- ZERO_AUTHORITY: Xr,
4058
- acquireZ: _r,
4059
- authorityZ: Hr,
4060
- filterTransfersByChannelKey: Za,
4061
- releaseZ: Qr,
4062
- stateZ: be,
4063
- subjectZ: Kr,
4064
- transferZ: Ya
4065
- }, Symbol.toStringTag, { value: "Module" })), Fa = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Wa = (t, e) => {
4207
+ ABSOLUTE_AUTHORITY: cn,
4208
+ AUTHORITY_BOUNDS: xo,
4209
+ ZERO_AUTHORITY: hn,
4210
+ acquireZ: gn,
4211
+ authorityZ: ln,
4212
+ filterTransfersByChannelKey: So,
4213
+ releaseZ: dn,
4214
+ stateZ: Oe,
4215
+ subjectZ: fn,
4216
+ transferZ: No
4217
+ }, Symbol.toStringTag, { value: "Module" })), Io = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Mo = (t, e) => {
4066
4218
  const r = Symbol.for(t);
4067
- if (!Fa(r)) {
4219
+ if (!Io(r)) {
4068
4220
  const n = e();
4069
4221
  Object.defineProperty(globalThis, r, { value: n });
4070
4222
  }
4071
4223
  return () => globalThis[r];
4072
- }, en = "sy_x_error", Va = (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), tn = (t) => class ce extends Error {
4073
- static discriminator = en;
4074
- discriminator = ce.discriminator;
4224
+ }, pn = "sy_x_error", Ao = (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), mn = (t) => class fe extends Error {
4225
+ static discriminator = pn;
4226
+ discriminator = fe.discriminator;
4075
4227
  static TYPE = t;
4076
- type = ce.TYPE;
4077
- static matches = Va(t);
4078
- matches = ce.matches;
4228
+ type = fe.TYPE;
4229
+ static matches = Ao(t);
4230
+ matches = fe.matches;
4079
4231
  constructor(r, n) {
4080
- super(r, n), this.name = ce.TYPE;
4232
+ super(r, n), this.name = fe.TYPE;
4081
4233
  }
4082
4234
  static sub(r) {
4083
- return tn(`${t}.${r}`);
4235
+ return mn(`${t}.${r}`);
4084
4236
  }
4085
- }, Ga = (t) => {
4237
+ }, Eo = (t) => {
4086
4238
  if (t == null || typeof t != "object") return !1;
4087
4239
  const e = t;
4088
- if (e.discriminator !== en) return !1;
4240
+ if (e.discriminator !== pn) return !1;
4089
4241
  if (!("type" in e))
4090
4242
  throw new Error(
4091
4243
  `X Error is missing its type property: ${JSON.stringify(e)}`
4092
4244
  );
4093
4245
  return !0;
4094
- }, oe = "unknown", Jt = "nil";
4095
- class Ha {
4246
+ }, le = "unknown", sr = "nil";
4247
+ class Uo {
4096
4248
  providers = [];
4097
4249
  register(e) {
4098
4250
  this.providers.push(e);
4099
4251
  }
4100
4252
  encode(e) {
4101
- if (e == null) return { type: Jt, data: "" };
4102
- if (Ga(e))
4253
+ if (e == null) return { type: sr, data: "" };
4254
+ if (Eo(e))
4103
4255
  for (const r of this.providers) {
4104
4256
  const n = r.encode(e);
4105
4257
  if (n != null) return n;
4106
4258
  }
4107
- if (e instanceof Error) return { type: oe, data: e.message };
4108
- if (typeof e == "string") return { type: oe, data: e };
4259
+ if (e instanceof Error) return { type: le, data: e.message };
4260
+ if (typeof e == "string") return { type: le, data: e };
4109
4261
  try {
4110
- return { type: oe, data: JSON.stringify(e) };
4262
+ return { type: le, data: JSON.stringify(e) };
4111
4263
  } catch {
4112
- return { type: oe, data: "unable to encode error information" };
4264
+ return { type: le, data: "unable to encode error information" };
4113
4265
  }
4114
4266
  }
4115
4267
  decode(e) {
4116
- if (e == null || e.type === Jt) return null;
4117
- if (e.type === oe) return new Xt(e.data);
4268
+ if (e == null || e.type === sr) return null;
4269
+ if (e.type === le) return new ir(e.data);
4118
4270
  for (const r of this.providers) {
4119
4271
  const n = r.decode(e);
4120
4272
  if (n != null) return n;
4121
4273
  }
4122
- return new Xt(e.data);
4274
+ return new ir(e.data);
4123
4275
  }
4124
4276
  }
4125
- Wa("synnax-error-registry", () => new Ha());
4126
- class Xt extends tn("unknown") {
4277
+ Mo("synnax-error-registry", () => new Uo());
4278
+ class ir extends mn("unknown") {
4127
4279
  }
4128
4280
  a.object({ type: a.string(), data: a.string() });
4129
- const Ko = () => new Promise((t) => setTimeout(t, 0)), Ja = S.object({
4130
- jsonrpc: S.literal("2.0"),
4131
- method: S.string(),
4281
+ const qu = () => new Promise((t) => setTimeout(t, 0)), Bo = O.object({
4282
+ jsonrpc: O.literal("2.0"),
4283
+ method: O.string(),
4132
4284
  // params should be z.union([z.record(z.string(), z.json()),
4133
4285
  // z.array(z.json())]).optional() but the VSCode JSON RPC implementation uses a looser
4134
4286
  // definition of params then in the JSON-RPC spec.
4135
- params: S.any().optional(),
4136
- id: S.union([S.string(), S.number(), S.null()]).optional()
4137
- }), rn = S.object({
4138
- jsonrpc: S.literal("2.0"),
4139
- id: S.union([S.string(), S.number(), S.null()])
4140
- }), Xa = rn.extend({
4141
- result: S.json()
4142
- }), Ka = rn.extend({
4143
- error: S.object({
4144
- code: S.number().int(),
4287
+ params: O.any().optional(),
4288
+ id: O.union([O.string(), O.number(), O.null()]).optional()
4289
+ }), yn = O.object({
4290
+ jsonrpc: O.literal("2.0"),
4291
+ id: O.union([O.string(), O.number(), O.null()])
4292
+ }), jo = yn.extend({
4293
+ result: O.json()
4294
+ }), Co = yn.extend({
4295
+ error: O.object({
4296
+ code: O.number().int(),
4145
4297
  // This should be z.string(), but the VSCode JSON RPC implementation uses a looser
4146
4298
  // definition of error than the JSON-RPC spec.
4147
- message: S.string().optional(),
4148
- data: S.json().optional()
4299
+ message: O.string().optional(),
4300
+ data: O.json().optional()
4149
4301
  })
4150
- }), Qa = S.union([Xa, Ka]);
4151
- S.union([Ja, Qa]);
4152
- const _a = (t, e, r) => {
4302
+ }), Ro = O.union([jo, Co]);
4303
+ O.union([Bo, Ro]);
4304
+ const Lo = O.uuid(), Do = O.object({
4305
+ key: Lo,
4306
+ name: O.string().min(1),
4307
+ color: O.string()
4308
+ }), Po = (t, e, r) => {
4153
4309
  const n = t.get(e);
4154
4310
  return n === void 0 ? (t.set(e, r), r) : n;
4155
- }, Qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4311
+ }, zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4156
4312
  __proto__: null,
4157
- getOrSetDefault: _a
4158
- }, Symbol.toStringTag, { value: "Module" })), wt = a.string().regex(/^\d+\.\d+\.\d+$/), $e = (t, e, r = {}) => {
4313
+ getOrSetDefault: Po
4314
+ }, Symbol.toStringTag, { value: "Module" })), xt = a.string().regex(/^\d+\.\d+\.\d+$/), Se = ((t, e, r = {}) => {
4159
4315
  r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
4160
- const n = wt.parse(t), s = wt.parse(e), [i, o, c] = n.split(".").map(Number), [h, l, d] = s.split(".").map(Number);
4316
+ const n = xt.parse(t), s = xt.parse(e), [i, o, h] = n.split(".").map(Number), [f, l, d] = s.split(".").map(Number);
4161
4317
  if (r.checkMajor) {
4162
- if (i < h) return Me;
4163
- if (i > h) return Ee;
4318
+ if (i < f) return Ue;
4319
+ if (i > f) return Be;
4164
4320
  }
4165
4321
  if (r.checkMinor) {
4166
- if (o < l) return Me;
4167
- if (o > l) return Ee;
4322
+ if (o < l) return Ue;
4323
+ if (o > l) return Be;
4168
4324
  }
4169
4325
  if (r.checkPatch) {
4170
- if (c < d) return Me;
4171
- if (c > d) return Ee;
4326
+ if (h < d) return Ue;
4327
+ if (h > d) return Be;
4172
4328
  }
4173
- return se;
4174
- }, eo = (t, e, r = {}) => ir($e(t, e, r)), nn = (t, e, r = {}) => sr($e(t, e, r)), to = (t, e, r = {}) => nr($e(t, e, r)), ro = ({
4329
+ return ae;
4330
+ }), ko = (t, e, r = {}) => yr(Se(t, e, r)), bn = (t, e, r = {}) => mr(Se(t, e, r)), qo = (t, e, r = {}) => pr(Se(t, e, r)), zo = ({
4175
4331
  name: t,
4176
4332
  migrate: e
4177
4333
  }) => (r) => {
@@ -4181,14 +4337,14 @@ const _a = (t, e, r) => {
4181
4337
  } catch (n) {
4182
4338
  throw console.log(`${t} failed to migrate from ${r.version}`), console.error(n), n;
4183
4339
  }
4184
- }, no = ({
4340
+ }, Zo = ({
4185
4341
  name: t,
4186
4342
  migrations: e,
4187
4343
  targetSchema: r,
4188
4344
  defaultVersion: n,
4189
4345
  def: s
4190
4346
  }) => {
4191
- const i = Object.keys(e).sort($e).pop();
4347
+ const i = Object.keys(e).sort(Se).pop();
4192
4348
  if (i == null)
4193
4349
  return (l) => {
4194
4350
  if (l.version ??= n, l.version !== s.version)
@@ -4204,13 +4360,13 @@ const _a = (t, e, r) => {
4204
4360
  }
4205
4361
  };
4206
4362
  const o = Object.keys(e).length;
4207
- let c = !1;
4208
- const h = (l) => {
4363
+ let h = !1;
4364
+ const f = (l) => {
4209
4365
  try {
4210
- if (o === 0 || nn(l.version, i))
4211
- return console.log(c ? `${t} ${l.version} now up to date` : `${t} version ${l.version} is up to date with target version ${s.version}`), l;
4212
- const d = l.version, y = e[d], p = y(l);
4213
- return c = !0, h(p);
4366
+ if (o === 0 || bn(l.version, i))
4367
+ return console.log(h ? `${t} ${l.version} now up to date` : `${t} version ${l.version} is up to date with target version ${s.version}`), l;
4368
+ const d = l.version, m = e[d], p = m(l);
4369
+ return h = !0, f(p);
4214
4370
  } catch (d) {
4215
4371
  return console.log(
4216
4372
  `${t} failed to migrate from ${l.version} to ${i}`
@@ -4228,21 +4384,21 @@ const _a = (t, e, r) => {
4228
4384
  return console.log(
4229
4385
  `${t} version is null and no default version set. Exiting with default`
4230
4386
  ), s;
4231
- return h(l);
4387
+ return f(l);
4232
4388
  } catch (d) {
4233
4389
  return console.log(`${t} failed to parse final result. Exiting with default`), console.error(d), s;
4234
4390
  }
4235
4391
  };
4236
- }, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4392
+ }, Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4237
4393
  __proto__: null,
4238
- compareSemVer: $e,
4239
- createMigration: ro,
4240
- migrator: no,
4241
- semVerNewer: nn,
4242
- semVerOlder: to,
4243
- semVerZ: wt,
4244
- versionsEqual: eo
4245
- }, Symbol.toStringTag, { value: "Module" })), sn = ["standard", "scientific", "engineering"], so = a.enum(sn), io = (t, e, r) => {
4394
+ compareSemVer: Se,
4395
+ createMigration: zo,
4396
+ migrator: Zo,
4397
+ semVerNewer: bn,
4398
+ semVerOlder: qo,
4399
+ semVerZ: xt,
4400
+ versionsEqual: ko
4401
+ }, Symbol.toStringTag, { value: "Module" })), wn = ["standard", "scientific", "engineering"], Fo = a.enum(wn), Yo = (t, e, r) => {
4246
4402
  if (Number.isNaN(t)) return "NaN";
4247
4403
  if (t === 1 / 0) return "∞";
4248
4404
  if (t === -1 / 0) return "-∞";
@@ -4251,28 +4407,32 @@ const _a = (t, e, r) => {
4251
4407
  return e === 0 ? "0ᴇ0" : `0.${"0".repeat(e)}ᴇ0`;
4252
4408
  let n;
4253
4409
  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}`;
4254
- }, eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4410
+ }, Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4255
4411
  __proto__: null,
4256
- NOTATIONS: sn,
4257
- notationZ: so,
4258
- stringifyNumber: io
4259
- }, Symbol.toStringTag, { value: "Module" })), tu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, an = a.enum([
4412
+ NOTATIONS: wn,
4413
+ notationZ: Fo,
4414
+ stringifyNumber: Yo
4415
+ }, Symbol.toStringTag, { value: "Module" })), Yu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, $n = a.enum([
4260
4416
  "success",
4261
4417
  "info",
4262
4418
  "warning",
4263
4419
  "error",
4264
4420
  "loading",
4265
4421
  "disabled"
4266
- ]), ao = (t) => a.object({
4422
+ ]), Wo = (t) => a.object({
4267
4423
  key: a.string(),
4268
- variant: an,
4424
+ name: a.string().default(""),
4425
+ variant: $n,
4269
4426
  message: a.string(),
4270
4427
  description: a.string().optional(),
4271
- time: w.z,
4428
+ time: $.z,
4429
+ labels: or(Do).optional(),
4272
4430
  details: t ?? a.unknown().optional()
4273
- }), oo = (t, e) => {
4431
+ }), Vo = a.object({
4432
+ stack: a.string()
4433
+ }), Go = (t, e) => {
4274
4434
  if (!(t instanceof Error)) throw t;
4275
- return on({
4435
+ return On({
4276
4436
  variant: "error",
4277
4437
  message: e ?? t.message,
4278
4438
  description: e != null ? t.message : void 0,
@@ -4280,37 +4440,39 @@ const _a = (t, e, r) => {
4280
4440
  stack: t.stack ?? ""
4281
4441
  }
4282
4442
  });
4283
- }, on = (t) => ({
4284
- key: qt(),
4285
- time: w.now(),
4443
+ }, On = (t) => ({
4444
+ key: Vt(),
4445
+ time: $.now(),
4446
+ name: "",
4286
4447
  ...t
4287
- }), uo = (t, e = []) => {
4448
+ }), Ho = (t, e = []) => {
4288
4449
  if (t != null)
4289
4450
  return Array.isArray(e) ? e.includes(t) ? t : void 0 : e === t ? t : void 0;
4290
- }, lo = (t, e = []) => {
4451
+ }, Xo = (t, e = []) => {
4291
4452
  if (t != null)
4292
4453
  return Array.isArray(e) ? e.includes(t) ? void 0 : t : e === t ? void 0 : t;
4293
- }, ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4454
+ }, Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4294
4455
  __proto__: null,
4295
- create: on,
4296
- fromException: oo,
4297
- keepVariants: uo,
4298
- removeVariants: lo,
4299
- statusZ: ao,
4300
- variantZ: an
4301
- }, Symbol.toStringTag, { value: "Module" })), co = (t, e = "") => {
4456
+ create: On,
4457
+ exceptionDetailsSchema: Vo,
4458
+ fromException: Go,
4459
+ keepVariants: Ho,
4460
+ removeVariants: Xo,
4461
+ statusZ: Wo,
4462
+ variantZ: $n
4463
+ }, Symbol.toStringTag, { value: "Module" })), Jo = (t, e = "") => {
4302
4464
  if (typeof t == "string") return t;
4303
4465
  const r = t.length;
4304
4466
  return r === 0 ? e : r === 1 ? t[0] : r === 2 ? `${t[0]} and ${t[1]}` : `${t.slice(0, -1).join(", ")}, and ${t[r - 1]}`;
4305
- }, ho = (t) => {
4467
+ }, Ko = (t) => {
4306
4468
  const e = t.split(" "), r = /* @__PURE__ */ new Set(), n = e.map((o) => o.charAt(0).toLowerCase()).join("");
4307
4469
  r.add(n.replace(/-/g, "_")), r.add(n.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
4308
4470
  const s = /\d+/g;
4309
- t.match(s) && e.forEach((o, c) => {
4471
+ t.match(s) && e.forEach((o, h) => {
4310
4472
  if (s.test(o)) {
4311
- const h = e.map((l, d) => d !== c ? l.charAt(0).toLowerCase() : l).join("");
4312
- r.add(h.replace(/-/g, "_")), r.add(
4313
- h.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_")
4473
+ const f = e.map((l, d) => d !== h ? l.charAt(0).toLowerCase() : l).join("");
4474
+ r.add(f.replace(/-/g, "_")), r.add(
4475
+ f.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_")
4314
4476
  );
4315
4477
  }
4316
4478
  });
@@ -4320,53 +4482,54 @@ const _a = (t, e, r) => {
4320
4482
  return r.add(i.join("").replace(/-/g, "_")), r.add(i.join("_").replace(/-/g, "_")), Array.from(r).filter(
4321
4483
  (o) => o.length >= 2 && o.length <= 12 && !/^\d/.test(o)
4322
4484
  );
4323
- }, fo = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4485
+ }, Qo = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, _o = (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`, Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4324
4486
  __proto__: null,
4325
- createShortIdentifiers: ho,
4326
- naturalLanguageJoin: co,
4327
- trimPrefix: fo
4328
- }, Symbol.toStringTag, { value: "Module" })), go = new Error("request for lock canceled");
4329
- var po = function(t, e, r, n) {
4487
+ createShortIdentifiers: Ko,
4488
+ naturalLanguageJoin: Jo,
4489
+ pluralName: _o,
4490
+ trimPrefix: Qo
4491
+ }, Symbol.toStringTag, { value: "Module" })), eu = new Error("request for lock canceled");
4492
+ var tu = function(t, e, r, n) {
4330
4493
  function s(i) {
4331
4494
  return i instanceof r ? i : new r(function(o) {
4332
4495
  o(i);
4333
4496
  });
4334
4497
  }
4335
4498
  return new (r || (r = Promise))(function(i, o) {
4336
- function c(d) {
4499
+ function h(d) {
4337
4500
  try {
4338
4501
  l(n.next(d));
4339
- } catch (y) {
4340
- o(y);
4502
+ } catch (m) {
4503
+ o(m);
4341
4504
  }
4342
4505
  }
4343
- function h(d) {
4506
+ function f(d) {
4344
4507
  try {
4345
4508
  l(n.throw(d));
4346
- } catch (y) {
4347
- o(y);
4509
+ } catch (m) {
4510
+ o(m);
4348
4511
  }
4349
4512
  }
4350
4513
  function l(d) {
4351
- d.done ? i(d.value) : s(d.value).then(c, h);
4514
+ d.done ? i(d.value) : s(d.value).then(h, f);
4352
4515
  }
4353
4516
  l((n = n.apply(t, e || [])).next());
4354
4517
  });
4355
4518
  };
4356
- class mo {
4357
- constructor(e, r = go) {
4519
+ class ru {
4520
+ constructor(e, r = eu) {
4358
4521
  this._value = e, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
4359
4522
  }
4360
4523
  acquire(e = 1, r = 0) {
4361
4524
  if (e <= 0)
4362
4525
  throw new Error(`invalid weight ${e}: must be positive`);
4363
4526
  return new Promise((n, s) => {
4364
- const i = { resolve: n, reject: s, weight: e, priority: r }, o = un(this._queue, (c) => r <= c.priority);
4527
+ const i = { resolve: n, reject: s, weight: e, priority: r }, o = vn(this._queue, (h) => r <= h.priority);
4365
4528
  o === -1 && e <= this._value ? this._dispatchItem(i) : this._queue.splice(o + 1, 0, i);
4366
4529
  });
4367
4530
  }
4368
4531
  runExclusive(e) {
4369
- return po(this, arguments, void 0, function* (r, n = 1, s = 0) {
4532
+ return tu(this, arguments, void 0, function* (r, n = 1, s = 0) {
4370
4533
  const [i, o] = yield this.acquire(n, s);
4371
4534
  try {
4372
4535
  return yield r(i);
@@ -4379,7 +4542,7 @@ class mo {
4379
4542
  if (e <= 0)
4380
4543
  throw new Error(`invalid weight ${e}: must be positive`);
4381
4544
  return this._couldLockImmediately(e, r) ? Promise.resolve() : new Promise((n) => {
4382
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), yo(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4545
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), nu(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4383
4546
  });
4384
4547
  }
4385
4548
  isLocked() {
@@ -4426,7 +4589,7 @@ class mo {
4426
4589
  if (!n)
4427
4590
  continue;
4428
4591
  const s = n.findIndex((i) => i.priority <= e);
4429
- (s === -1 ? n : n.splice(0, s)).forEach((i) => i.resolve());
4592
+ (s === -1 ? n : n.splice(0, s)).forEach(((i) => i.resolve()));
4430
4593
  }
4431
4594
  }
4432
4595
  }
@@ -4434,49 +4597,49 @@ class mo {
4434
4597
  return (this._queue.length === 0 || this._queue[0].priority < r) && e <= this._value;
4435
4598
  }
4436
4599
  }
4437
- function yo(t, e) {
4438
- const r = un(t, (n) => e.priority <= n.priority);
4600
+ function nu(t, e) {
4601
+ const r = vn(t, (n) => e.priority <= n.priority);
4439
4602
  t.splice(r + 1, 0, e);
4440
4603
  }
4441
- function un(t, e) {
4604
+ function vn(t, e) {
4442
4605
  for (let r = t.length - 1; r >= 0; r--)
4443
4606
  if (e(t[r]))
4444
4607
  return r;
4445
4608
  return -1;
4446
4609
  }
4447
- var wo = function(t, e, r, n) {
4610
+ var su = function(t, e, r, n) {
4448
4611
  function s(i) {
4449
4612
  return i instanceof r ? i : new r(function(o) {
4450
4613
  o(i);
4451
4614
  });
4452
4615
  }
4453
4616
  return new (r || (r = Promise))(function(i, o) {
4454
- function c(d) {
4617
+ function h(d) {
4455
4618
  try {
4456
4619
  l(n.next(d));
4457
- } catch (y) {
4458
- o(y);
4620
+ } catch (m) {
4621
+ o(m);
4459
4622
  }
4460
4623
  }
4461
- function h(d) {
4624
+ function f(d) {
4462
4625
  try {
4463
4626
  l(n.throw(d));
4464
- } catch (y) {
4465
- o(y);
4627
+ } catch (m) {
4628
+ o(m);
4466
4629
  }
4467
4630
  }
4468
4631
  function l(d) {
4469
- d.done ? i(d.value) : s(d.value).then(c, h);
4632
+ d.done ? i(d.value) : s(d.value).then(h, f);
4470
4633
  }
4471
4634
  l((n = n.apply(t, e || [])).next());
4472
4635
  });
4473
4636
  };
4474
- class bo {
4637
+ class iu {
4475
4638
  constructor(e) {
4476
- this._semaphore = new mo(1, e);
4639
+ this._semaphore = new ru(1, e);
4477
4640
  }
4478
4641
  acquire() {
4479
- return wo(this, arguments, void 0, function* (e = 0) {
4642
+ return su(this, arguments, void 0, function* (e = 0) {
4480
4643
  const [, r] = yield this._semaphore.acquire(1, e);
4481
4644
  return r;
4482
4645
  });
@@ -4497,34 +4660,34 @@ class bo {
4497
4660
  return this._semaphore.cancel();
4498
4661
  }
4499
4662
  }
4500
- class ln extends bo {
4663
+ class Tn extends iu {
4501
4664
  constructor(e) {
4502
4665
  super(), Object.assign(this, e);
4503
4666
  }
4504
4667
  }
4505
- const Oo = (t) => new ln(t), su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4668
+ const au = (t) => new Tn(t), Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4506
4669
  __proto__: null,
4507
- mutex: ln,
4508
- newMutex: Oo
4670
+ mutex: Tn,
4671
+ newMutex: au
4509
4672
  }, Symbol.toStringTag, { value: "Module" }));
4510
- function cn(t) {
4673
+ function xn(t) {
4511
4674
  var e, r, n = "";
4512
4675
  if (typeof t == "string" || typeof t == "number") n += t;
4513
4676
  else if (typeof t == "object") if (Array.isArray(t)) {
4514
4677
  var s = t.length;
4515
- for (e = 0; e < s; e++) t[e] && (r = cn(t[e])) && (n && (n += " "), n += r);
4678
+ for (e = 0; e < s; e++) t[e] && (r = xn(t[e])) && (n && (n += " "), n += r);
4516
4679
  } else for (r in t) t[r] && (n && (n += " "), n += r);
4517
4680
  return n;
4518
4681
  }
4519
- function vo() {
4520
- for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = cn(t)) && (n && (n += " "), n += e);
4682
+ function ou() {
4683
+ for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = xn(t)) && (n && (n += " "), n += e);
4521
4684
  return n;
4522
4685
  }
4523
- const xo = vo, te = "-", Kt = "__", Ie = "--", hn = (t) => {
4524
- const e = (...r) => xo(...r);
4525
- return e.B = (...r) => t + te + r.join(te), e.E = (r) => t + Kt + r, e.M = (...r) => t + Ie + r.join("-"), e.BM = (r, ...n) => e.B(r) + Ie + n.join("-"), e.BE = (r, ...n) => e.B(r) + Kt + n.join(te), e.BEM = (r, n, ...s) => e.BE(r, n) + Ie + s.join(te), e.extend = (r) => hn(e.B(r)), e.var = (...r) => Ie + t + te + r.join(te), e;
4686
+ const uu = ou, ne = "-", ar = "__", Ee = "--", lu = (t) => {
4687
+ const e = (...r) => uu(...r);
4688
+ return e.B = (...r) => t + ne + r.join(ne), e.E = (r) => t + ar + 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) + ar + 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;
4526
4689
  };
4527
- class $o {
4690
+ class cu {
4528
4691
  rows = [];
4529
4692
  columns = [];
4530
4693
  prefix;
@@ -4553,55 +4716,57 @@ class $o {
4553
4716
  };
4554
4717
  }
4555
4718
  }
4556
- const To = (t, e) => Object.entries(e).forEach(
4719
+ const hu = (t, e) => Object.entries(e).forEach(
4557
4720
  ([r, n]) => n != null && t.style.setProperty(r, `${n}`)
4558
- ), So = (t, e) => Array.from(t.style).forEach((r) => {
4721
+ ), fu = (t, e) => Array.from(t.style).forEach((r) => {
4559
4722
  r.startsWith(e) && t.style.removeProperty(r);
4560
- }), No = (t) => {
4561
- const e = hn(t);
4562
- return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", $s.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", us.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 = To, e.removeVars = So, e.newGridBuilder = (r) => new $o(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) => {
4723
+ }), du = (t) => {
4724
+ const e = lu(t);
4725
+ return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", ks.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", xs.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 = hu, e.removeVars = fu, e.newGridBuilder = (r) => new cu(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) => {
4563
4726
  if (!(r == null || r === !1))
4564
- return typeof r == "number" ? `var(--${t}-gray-l${r})` : qa.cssString(r);
4727
+ return typeof r == "number" ? `var(--${t}-gray-l${r})` : To.cssString(r);
4565
4728
  }, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e.level = (r) => e.M(`level-${r}`), e;
4566
- }, iu = No("pluto");
4729
+ }, Hu = du("pluto");
4567
4730
  export {
4568
- nu as $,
4569
- Lr as A,
4570
- I as B,
4571
- iu as C,
4572
- ko as G,
4573
- Lo as H,
4574
- Ro as K,
4575
- X as O,
4576
- Oi as R,
4577
- Ho as S,
4578
- Mo as U,
4579
- Fo as W,
4580
- Do as _,
4581
- Po as a,
4582
- tu as b,
4583
- Ao as c,
4584
- jo as d,
4585
- Uo as e,
4586
- qa as f,
4587
- T as g,
4588
- qo as h,
4589
- O as i,
4590
- E as j,
4591
- Jo as k,
4592
- Pe as l,
4593
- su as m,
4594
- hn as n,
4595
- Co as o,
4596
- us as p,
4597
- $s as q,
4598
- w as r,
4599
- Xo as s,
4600
- Ko as t,
4601
- vo as u,
4602
- _o as v,
4603
- eu as w,
4604
- ru as x,
4605
- Qo as y,
4606
- Go as z
4731
+ ku as A,
4732
+ Yu as B,
4733
+ Hu as C,
4734
+ Iu as D,
4735
+ Vu as F,
4736
+ vu as H,
4737
+ ks as K,
4738
+ Pu as N,
4739
+ ju as O,
4740
+ Tu as Q,
4741
+ Li as R,
4742
+ Du as S,
4743
+ mu as U,
4744
+ Wu as V,
4745
+ Zu as W,
4746
+ Gu as X,
4747
+ Su as _,
4748
+ pu as a,
4749
+ Nu as b,
4750
+ bu as c,
4751
+ c as d,
4752
+ $u as e,
4753
+ S as f,
4754
+ Mu as g,
4755
+ Ze as h,
4756
+ Ou as i,
4757
+ xu as j,
4758
+ To as k,
4759
+ qu as l,
4760
+ Q as m,
4761
+ lu as n,
4762
+ ou as o,
4763
+ xs as p,
4764
+ Lu as q,
4765
+ $ as r,
4766
+ zu as s,
4767
+ Au as t,
4768
+ M as u,
4769
+ st as v,
4770
+ Jr as x,
4771
+ Fu as z
4607
4772
  };