@synnaxlabs/pluto 0.48.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-CC7iS0zH.js → Animated-38tdmPR0.js} +116 -120
- package/dist/{Animated-DfDp0-ep.js → Animated-Bp6IK3ct.js} +3 -3
- package/dist/Animated-D-pQ3CYh.cjs +1 -0
- package/dist/{Animated--SNIwznU.cjs → Animated-Dsn1pmhz.cjs} +1 -1
- package/dist/Box-4l6DWG-3.cjs +1 -0
- package/dist/{Box-CoQUaJk2.js → Box-BVyAHr2f.js} +17 -17
- package/dist/Button-CoOYEk1J.js +308 -0
- package/dist/Button-D5aoG3sV.cjs +1 -0
- package/dist/Dialog-JwJQD3xZ.cjs +1 -0
- package/dist/{Dialog-CBDFqieV.js → Dialog-puVY-0Mt.js} +14 -14
- package/dist/Editable-DEbVpi5i.js +201 -0
- package/dist/Editable-DI0-D1K5.cjs +1 -0
- package/dist/Haul-9RVCn3cI.cjs +1 -0
- package/dist/{Haul-Be1j5BU3.js → Haul-Db9j45Fu.js} +53 -49
- package/dist/Items-BCG7kyaR.cjs +4 -0
- package/dist/{Items-mikdEpyC.js → Items-BVKW0udb.js} +276 -214
- package/dist/Menu-BYca9tGe.cjs +1 -0
- package/dist/Menu-CQsrN_mP.js +134 -0
- package/dist/Provider-DBg-Li_7.cjs +5 -0
- package/dist/{Provider-DScd3hYf.js → Provider-DQM7IBoi.js} +182 -177
- package/dist/{Tags-DvPUmH2r.js → Tags-B8l5Dvw-.js} +419 -408
- package/dist/Tags-CQFa3kY-.cjs +1 -0
- package/dist/{Text-BbbqH88W.js → Text-90J6p5Uj.js} +993 -931
- package/dist/Text-DeWvfrdF.cjs +1 -0
- package/dist/{Video-DRSEX8t7.cjs → Video-Bmg4gwom.cjs} +1 -1
- package/dist/{Video-_DrutSeT.js → Video-CLpcYcKf.js} +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-BVgFAmaj.cjs +8 -0
- package/dist/{css-Cn63X_Yv.js → css-bahPRiQI.js} +2057 -1572
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dimensions-SDA3fM2T.cjs +1 -0
- package/dist/{dimensions-Dclfavlh.js → dimensions-qcyzaTKI.js} +5 -5
- package/dist/eraser-Cbfc1frM.cjs +11 -0
- package/dist/{eraser-Bpl4bpBx.js → eraser-Dz6nZuPp.js} +32 -32
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +64 -62
- package/dist/{external-y1Apm7j1.js → external-04ve_X21.js} +105 -112
- package/dist/external-B3b7kdID.cjs +1 -0
- package/dist/{external-CJFfVl_u.cjs → external-Bixqkw5N.cjs} +1 -1
- package/dist/{external-8H4eB7TN.js → external-CB3VxPJp.js} +17 -18
- package/dist/{external-B3jTkhc4.cjs → external-CMs_BCc5.cjs} +5 -5
- package/dist/{external-D6TsHpoG.js → external-CnWQzZlQ.js} +117 -115
- package/dist/{external-6rS2YiWR.js → external-CrXS1qj_.js} +14 -14
- package/dist/{external-DUGcSVbJ.cjs → external-CwYoEhB2.cjs} +1 -1
- package/dist/{external-Caetm5fI.js → external-Cxojc4yT.js} +18 -18
- package/dist/external-D2deiHyL.js +69 -0
- package/dist/{external-CFdDgpzj.cjs → external-D2tzyCDs.cjs} +1 -1
- package/dist/external-DDHknds-.cjs +1 -0
- package/dist/{external-C0_sN1J0.js → external-DJWZ43k0.js} +1 -1
- package/dist/{external-X_eFMRtE.js → external-DP9FiRHq.js} +3 -3
- package/dist/{external-CFZ33YbY.cjs → external-DUVDOJfj.cjs} +1 -1
- package/dist/external-DcMOF1Je.cjs +1 -0
- package/dist/{external-1uZLLxz-.js → external-Hhx8JoAS.js} +712 -713
- package/dist/{external-B8hxM_jw.cjs → external-JpvbclD8.cjs} +2 -2
- package/dist/external-PA6ulZR9.cjs +1 -0
- package/dist/external-RkrrZXG5.cjs +1 -0
- package/dist/external-TI-6Umwm.js +92 -0
- package/dist/external-kwuGKgyL.cjs +1 -0
- package/dist/{external-Bq4gfE5e.js → external-m-0q-0os.js} +12 -12
- package/dist/{external-BOWnCKIe.js → external-xJ67ivgR.js} +3 -3
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-BcSXNOgW.cjs → fontString-62eEvw4b.cjs} +1 -1
- package/dist/{fontString-D7EMGjIw.js → fontString-qfWSw62X.js} +3 -3
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-CRSphXSb.cjs +1 -0
- package/dist/hooks-Dh0v1QWQ.js +73 -0
- package/dist/index.cjs +8 -8
- package/dist/index.js +23420 -22899
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/{provider-B6SgG_sT.js → provider-ClhgBr_F.js} +5007 -4824
- package/dist/provider-DHDqgF1B.cjs +76 -0
- package/dist/src/access/aether/external.d.ts +3 -0
- package/dist/src/access/aether/external.d.ts.map +1 -0
- package/dist/src/access/aether/index.d.ts +2 -0
- package/dist/src/access/aether/index.d.ts.map +1 -0
- package/dist/src/access/external.d.ts +4 -0
- package/dist/src/access/external.d.ts.map +1 -0
- package/dist/src/access/index.d.ts +2 -0
- package/dist/src/access/index.d.ts.map +1 -0
- package/dist/src/access/policy/CreateIcon.d.ts +3 -0
- package/dist/src/access/policy/CreateIcon.d.ts.map +1 -0
- package/dist/src/access/policy/Select.d.ts +12 -0
- package/dist/src/access/policy/Select.d.ts.map +1 -0
- package/dist/src/access/policy/aether/index.d.ts +2 -0
- package/dist/src/access/policy/aether/index.d.ts.map +1 -0
- package/dist/src/access/policy/aether/queries.d.ts +18 -0
- package/dist/src/access/policy/aether/queries.d.ts.map +1 -0
- package/dist/src/access/policy/external.d.ts +5 -0
- package/dist/src/access/policy/external.d.ts.map +1 -0
- package/dist/src/access/policy/index.d.ts +2 -0
- package/dist/src/access/policy/index.d.ts.map +1 -0
- package/dist/src/access/policy/queries.d.ts +102 -0
- package/dist/src/access/policy/queries.d.ts.map +1 -0
- package/dist/src/access/policy/queries.spec.d.ts.map +1 -0
- package/dist/src/access/policy/types.d.ts +2 -0
- package/dist/src/access/policy/types.d.ts.map +1 -0
- package/dist/src/access/queries.d.ts +36 -0
- package/dist/src/access/queries.d.ts.map +1 -0
- package/dist/src/access/queries.spec.d.ts.map +1 -0
- package/dist/src/access/role/CreateIcon.d.ts +3 -0
- package/dist/src/access/role/CreateIcon.d.ts.map +1 -0
- package/dist/src/access/role/Select.d.ts +9 -0
- package/dist/src/access/role/Select.d.ts.map +1 -0
- package/dist/src/access/role/aether/index.d.ts +2 -0
- package/dist/src/access/role/aether/index.d.ts.map +1 -0
- package/dist/src/access/role/aether/queries.d.ts +14 -0
- package/dist/src/access/role/aether/queries.d.ts.map +1 -0
- package/dist/src/access/role/external.d.ts +4 -0
- package/dist/src/access/role/external.d.ts.map +1 -0
- package/dist/src/access/role/index.d.ts +2 -0
- package/dist/src/access/role/index.d.ts.map +1 -0
- package/dist/src/access/role/queries.d.ts +57 -0
- package/dist/src/access/role/queries.d.ts.map +1 -0
- package/dist/src/access/role/queries.spec.d.ts.map +1 -0
- package/dist/src/aether/main.d.ts +0 -1
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/alamos/Provider.d.ts +0 -5
- package/dist/src/alamos/Provider.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts +4 -4
- package/dist/src/arc/queries.d.ts +6 -6
- package/dist/src/arc/queries.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +1 -1
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/channel/queries.d.ts +25 -25
- package/dist/src/channel/queries.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +2 -1
- package/dist/src/color/Provider.d.ts.map +1 -1
- package/dist/src/context/context.d.ts +28 -0
- package/dist/src/context/context.d.ts.map +1 -0
- package/dist/src/context/context.spec.d.ts +2 -0
- package/dist/src/context/context.spec.d.ts.map +1 -0
- package/dist/src/context/index.d.ts +2 -0
- package/dist/src/context/index.d.ts.map +1 -0
- package/dist/src/{hardware/device → device}/Select.d.ts +2 -2
- package/dist/src/device/Select.d.ts.map +1 -0
- package/dist/src/{hardware/device → device}/StatusIndicator.d.ts +1 -1
- package/dist/src/device/StatusIndicator.d.ts.map +1 -0
- package/dist/src/device/external.d.ts.map +1 -0
- package/dist/src/device/index.d.ts.map +1 -0
- package/dist/src/{hardware/device → device}/queries.d.ts +10 -14
- package/dist/src/device/queries.d.ts.map +1 -0
- package/dist/src/device/queries.spec.d.ts +2 -0
- package/dist/src/device/queries.spec.d.ts.map +1 -0
- package/dist/src/dialog/Frame.d.ts +8 -7
- package/dist/src/dialog/Frame.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +4 -4
- package/dist/src/flux/Provider.d.ts.map +1 -1
- package/dist/src/flux/core/client.d.ts.map +1 -1
- package/dist/src/flux/core/store.d.ts +7 -7
- package/dist/src/flux/core/store.d.ts.map +1 -1
- package/dist/src/flux/core/streamer.d.ts +2 -2
- package/dist/src/flux/core/streamer.d.ts.map +1 -1
- package/dist/src/flux/form.d.ts +2 -2
- package/dist/src/flux/form.d.ts.map +1 -1
- package/dist/src/flux/list.d.ts +3 -3
- package/dist/src/flux/list.d.ts.map +1 -1
- package/dist/src/flux/retrieve.d.ts +2 -2
- package/dist/src/flux/retrieve.d.ts.map +1 -1
- package/dist/src/flux/update.d.ts +27 -26
- package/dist/src/flux/update.d.ts.map +1 -1
- package/dist/src/form/Context.d.ts +4 -3
- package/dist/src/form/Context.d.ts.map +1 -1
- package/dist/src/form/Field.d.ts +2 -2
- package/dist/src/form/Field.d.ts.map +1 -1
- package/dist/src/form/use.d.ts.map +1 -1
- package/dist/src/form/useField.d.ts.map +1 -1
- package/dist/src/group/queries.d.ts +3 -3
- package/dist/src/group/queries.d.ts.map +1 -1
- package/dist/src/haul/Haul.d.ts +7 -7
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts +2 -1
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +0 -1
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/useAsyncEffect.d.ts +2 -2
- package/dist/src/hooks/useAsyncEffect.d.ts.map +1 -1
- package/dist/src/hooks/useDestructors.d.ts +2 -2
- package/dist/src/hooks/useDestructors.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +15 -0
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +5 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +1 -1
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/label/queries.d.ts +6 -6
- package/dist/src/label/queries.d.ts.map +1 -1
- package/dist/src/lineplot/Legend.d.ts +2 -2
- package/dist/src/lineplot/Legend.d.ts.map +1 -1
- package/dist/src/lineplot/LinePlot.d.ts +5 -5
- package/dist/src/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/lineplot/aether/LinePlot.d.ts +8 -8
- package/dist/src/lineplot/aether/XAxis.d.ts +26 -26
- package/dist/src/lineplot/aether/YAxis.d.ts +28 -28
- package/dist/src/lineplot/aether/axis.d.ts +13 -13
- package/dist/src/lineplot/queries.d.ts +3 -3
- package/dist/src/lineplot/queries.d.ts.map +1 -1
- package/dist/src/lineplot/range/aether/annotation.d.ts +4 -4
- package/dist/src/lineplot/range/aether/provider.d.ts +2 -2
- package/dist/src/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/lineplot/tooltip/aether/tooltip.d.ts +26 -26
- package/dist/src/list/Frame.d.ts +2 -1
- package/dist/src/list/Frame.d.ts.map +1 -1
- package/dist/src/list/Items.d.ts.map +1 -1
- package/dist/src/log/Log.d.ts +2 -2
- package/dist/src/log/Log.d.ts.map +1 -1
- package/dist/src/log/aether/Log.d.ts +32 -32
- package/dist/src/log/aether/Log.d.ts.map +1 -1
- package/dist/src/log/queries.d.ts +3 -3
- package/dist/src/log/queries.d.ts.map +1 -1
- package/dist/src/menu/Divider.d.ts +3 -0
- package/dist/src/menu/Divider.d.ts.map +1 -0
- package/dist/src/menu/Menu.d.ts +2 -2
- package/dist/src/menu/Menu.d.ts.map +1 -1
- package/dist/src/menu/external.d.ts +1 -0
- package/dist/src/menu/external.d.ts.map +1 -1
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/ontology/queries.d.ts +7 -7
- package/dist/src/ontology/queries.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts +9 -5
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/{hardware/rack → rack}/Select.d.ts +3 -3
- package/dist/src/rack/Select.d.ts.map +1 -0
- package/dist/src/{hardware/rack → rack}/StatusIndicator.d.ts +1 -1
- package/dist/src/rack/StatusIndicator.d.ts.map +1 -0
- package/dist/src/rack/external.d.ts.map +1 -0
- package/dist/src/rack/index.d.ts.map +1 -0
- package/dist/src/{hardware/rack → rack}/queries.d.ts +7 -9
- package/dist/src/rack/queries.d.ts.map +1 -0
- package/dist/src/rack/queries.spec.d.ts +2 -0
- package/dist/src/rack/queries.spec.d.ts.map +1 -0
- package/dist/src/ranger/queries.d.ts +7 -7
- package/dist/src/ranger/queries.d.ts.map +1 -1
- package/dist/src/schematic/queries.d.ts +5 -5
- package/dist/src/schematic/queries.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Primitives.d.ts +2 -2
- package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
- package/dist/src/schematic/symbol/queries.d.ts +8 -8
- package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
- package/dist/src/schematic/symbol/registry.d.ts +2 -2
- package/dist/src/select/Frame.d.ts.map +1 -1
- package/dist/src/select/Static.d.ts +2 -2
- package/dist/src/select/Static.d.ts.map +1 -1
- package/dist/src/select/use.d.ts +2 -2
- package/dist/src/select/use.d.ts.map +1 -1
- package/dist/src/showcase/InputShowcase.d.ts +7 -7
- package/dist/src/showcase/InputShowcase.d.ts.map +1 -1
- package/dist/src/showcase/TagShowcase.d.ts.map +1 -1
- package/dist/src/state/state.d.ts +2 -1
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/state/state.spec.d.ts +2 -0
- package/dist/src/state/state.spec.d.ts.map +1 -0
- package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
- package/dist/src/status/core/Aggregator.d.ts +2 -2
- package/dist/src/status/core/Aggregator.d.ts.map +1 -1
- package/dist/src/status/core/Notification.d.ts.map +1 -1
- package/dist/src/status/queries.d.ts +13 -13
- package/dist/src/status/queries.d.ts.map +1 -1
- package/dist/src/store/store.d.ts +2 -2
- package/dist/src/store/store.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +3 -3
- package/dist/src/table/aether/Table.d.ts +12 -12
- package/dist/src/table/cells/Cells.d.ts +7 -7
- package/dist/src/table/queries.d.ts +3 -3
- package/dist/src/table/queries.d.ts.map +1 -1
- package/dist/src/tabs/useContext.d.ts +4 -4
- package/dist/src/tabs/useContext.d.ts.map +1 -1
- package/dist/src/tag/Tag.d.ts +2 -2
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/task/index.d.ts.map +1 -0
- package/dist/src/{hardware/task → task}/queries.d.ts +14 -33
- package/dist/src/task/queries.d.ts.map +1 -0
- package/dist/src/task/queries.spec.d.ts +2 -0
- package/dist/src/task/queries.spec.d.ts.map +1 -0
- package/dist/src/telem/aether/context.d.ts +2 -2
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts +2 -2
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts +4 -4
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +11 -11
- package/dist/src/telem/aether/telem.d.ts +2 -2
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts +30 -30
- package/dist/src/telem/client/client.d.ts +4 -4
- package/dist/src/telem/client/client.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts +2 -2
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts +2 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +10 -10
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +3 -3
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +13 -13
- package/dist/src/telem/control/aether/legend.d.ts +4 -4
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +3 -3
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/testutil/Synnax.d.ts +0 -5
- package/dist/src/testutil/Synnax.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +2 -1
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts +2 -2
- package/dist/src/theming/Provider.d.ts +2 -1
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +141 -141
- package/dist/src/theming/core/theme.d.ts +135 -135
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/tooltip/Config.d.ts +4 -3
- package/dist/src/tooltip/Config.d.ts.map +1 -1
- package/dist/src/tree/Context.d.ts +2 -12
- package/dist/src/tree/Context.d.ts.map +1 -1
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts +4 -3
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +21 -21
- package/dist/src/user/CreateIcon.d.ts +3 -0
- package/dist/src/user/CreateIcon.d.ts.map +1 -0
- package/dist/src/user/external.d.ts +1 -0
- package/dist/src/user/external.d.ts.map +1 -1
- package/dist/src/user/queries.d.ts +6 -4
- package/dist/src/user/queries.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +1 -1
- package/dist/src/vis/axis/axis.d.ts +5 -5
- package/dist/src/vis/axis/ticks.d.ts +2 -2
- package/dist/src/vis/button/aether/button.d.ts +8 -8
- package/dist/src/vis/canvas/aether/canvas.d.ts +4 -4
- package/dist/src/vis/diagram/Diagram.d.ts +2 -6
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +9 -9
- package/dist/src/vis/diagram/align.d.ts +7 -2
- package/dist/src/vis/diagram/align.d.ts.map +1 -1
- package/dist/src/vis/draw2d/canvas.d.ts +2 -2
- package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +2 -2
- package/dist/src/vis/gauge/aether/gauge.d.ts +60 -60
- package/dist/src/vis/gauge/use.d.ts +18 -18
- package/dist/src/vis/legend/Container.d.ts +3 -29
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Entries.d.ts +2 -2
- package/dist/src/vis/legend/Entries.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +2 -2
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +6 -6
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/line/Line.d.ts +2 -2
- package/dist/src/vis/line/Line.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +5 -5
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +28 -28
- package/dist/src/vis/render/GLProgram.d.ts +2 -2
- package/dist/src/vis/render/GLProgram.d.ts.map +1 -1
- package/dist/src/vis/render/context.d.ts +2 -2
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/render/performance.d.ts +2 -2
- package/dist/src/vis/render/performance.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts +6 -6
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +10 -10
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts +10 -10
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +75 -75
- package/dist/src/vis/value/use.d.ts +23 -23
- package/dist/src/worker/Context.d.ts +2 -0
- package/dist/src/worker/Context.d.ts.map +1 -1
- package/dist/src/workspace/queries.d.ts +10 -8
- package/dist/src/workspace/queries.d.ts.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/types-8-Mr79SF.cjs +1 -0
- package/dist/types-DGaZ_JZb.js +82 -0
- package/dist/{units-cBd5OJg4.js → units-CgMHbHoA.js} +1 -1
- package/dist/units-InoNiVrK.cjs +1 -0
- package/dist/{value-UJNdARAu.js → value-CzFrd9p6.js} +2213 -2186
- package/dist/value-QHhF9WPA.cjs +53 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +8 -8
- package/dist/Animated-TMpTdCqK.cjs +0 -1
- package/dist/Box-Ds_D3xR_.cjs +0 -1
- package/dist/Button-BaMa3eGI.cjs +0 -1
- package/dist/Button-NgDHbsf8.js +0 -306
- package/dist/Dialog-BL8T9CVw.cjs +0 -1
- package/dist/Editable-C7KPD0hC.js +0 -193
- package/dist/Editable-CWt3zqDm.cjs +0 -1
- package/dist/Haul-D1WaI_xE.cjs +0 -1
- package/dist/Items-BYlg9bb-.cjs +0 -4
- package/dist/Menu-CcWs0t21.js +0 -156
- package/dist/Menu-DJoh8bH7.cjs +0 -1
- package/dist/Provider-fx1wTnXk.cjs +0 -5
- package/dist/Tags-KHafaGjR.cjs +0 -1
- package/dist/Text-CZrjPRjJ.cjs +0 -1
- package/dist/css-C_YE-5Xa.cjs +0 -8
- package/dist/debounce-CW9Q-DsR.js +0 -17
- package/dist/debounce-heEWeOqL.cjs +0 -1
- package/dist/deep-7SxmCL0x.cjs +0 -1
- package/dist/deep-szN5DCOH.js +0 -349
- package/dist/dimensions-DFDTcQRG.cjs +0 -1
- package/dist/eraser-Bqibt23a.cjs +0 -11
- package/dist/external-19BIaQc6.cjs +0 -1
- package/dist/external-AInsIJp-.cjs +0 -1
- package/dist/external-Bi-OQCBH.js +0 -45
- package/dist/external-CN15E8ls.cjs +0 -1
- package/dist/external-CfEVFfhL.cjs +0 -1
- package/dist/external-D7WE6Leo.cjs +0 -1
- package/dist/external-DwhfVdFp.js +0 -88
- package/dist/external-pRQzznIG.cjs +0 -1
- package/dist/hooks-BmUn8s1r.js +0 -74
- package/dist/hooks-CutQY1o9.cjs +0 -1
- package/dist/provider-C9Beoajx.cjs +0 -72
- package/dist/src/hardware/device/Select.d.ts.map +0 -1
- package/dist/src/hardware/device/StatusIndicator.d.ts.map +0 -1
- package/dist/src/hardware/device/external.d.ts.map +0 -1
- package/dist/src/hardware/device/index.d.ts.map +0 -1
- package/dist/src/hardware/device/queries.d.ts.map +0 -1
- package/dist/src/hardware/device/queries.spec.d.ts.map +0 -1
- package/dist/src/hardware/rack/Select.d.ts.map +0 -1
- package/dist/src/hardware/rack/StatusIndicator.d.ts.map +0 -1
- package/dist/src/hardware/rack/external.d.ts.map +0 -1
- package/dist/src/hardware/rack/index.d.ts.map +0 -1
- package/dist/src/hardware/rack/queries.d.ts.map +0 -1
- package/dist/src/hardware/rack/queries.spec.d.ts.map +0 -1
- package/dist/src/hardware/task/index.d.ts.map +0 -1
- package/dist/src/hardware/task/queries.d.ts.map +0 -1
- package/dist/src/hardware/task/queries.spec.d.ts.map +0 -1
- package/dist/src/hooks/useRequiredContext.d.ts +0 -2
- package/dist/src/hooks/useRequiredContext.d.ts.map +0 -1
- package/dist/src/hooks/useRequiredContext.spec.d.ts +0 -2
- package/dist/src/hooks/useRequiredContext.spec.d.ts.map +0 -1
- package/dist/types-BNX_Jj6k.js +0 -80
- package/dist/types-D-yz1qsT.cjs +0 -1
- package/dist/units-zxke9Ng2.cjs +0 -1
- package/dist/value-Ce4T858D.cjs +0 -53
- /package/dist/src/{hardware/device → access/policy}/queries.spec.d.ts +0 -0
- /package/dist/src/{hardware/rack → access}/queries.spec.d.ts +0 -0
- /package/dist/src/{hardware/task → access/role}/queries.spec.d.ts +0 -0
- /package/dist/src/{hardware/device → device}/external.d.ts +0 -0
- /package/dist/src/{hardware/device → device}/index.d.ts +0 -0
- /package/dist/src/{hardware/rack → rack}/external.d.ts +0 -0
- /package/dist/src/{hardware/rack → rack}/index.d.ts +0 -0
- /package/dist/src/{hardware/task → task}/index.d.ts +0 -0
package/dist/css-C_YE-5Xa.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("zod"),ar=t=>a.union([a.union([a.null(),a.undefined()]).transform(()=>[]),t.array()]),An=t=>Array.isArray(t)?t:t==null?[]:[t],or=(t,e)=>{if(Array.isArray(e))return e.reduce((i,s)=>or(i,s),t??[]);if(t==null)return[e];const r=t.findIndex(i=>i==e),n=[...t];return r===-1?n.push(e):n[r]=e,n},En=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r)):t.filter(r=>r!=e)}),ur=(t,e)=>{if(Array.isArray(e))return e.reduce((i,s)=>ur(i,s),t??[]);if(t==null)return[e];const r=t.findIndex(i=>i.key===e.key),n=[...t];return r===-1?n.push(e):n[r]=e,n},Un=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r.key)):t.filter(r=>r.key!==e)}),Bn=Object.freeze(Object.defineProperty({__proto__:null,nullableZ:ar,remove:En,removeKeyed:Un,toArray:An,upsert:or,upsertKeyed:ur},Symbol.toStringTag,{value:"Module"})),Cn=t=>{const e=t.replace(/_[a-z]/g,r=>r[1].toUpperCase());return e.length>1&&e[0]===e[0].toUpperCase()&&e[1]===e[1].toUpperCase()||e.length===0?e:e[0].toLowerCase()+e.slice(1)},qe=t=>{const e=(r,n=st)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(o=>e(o,n));if(!_e(r))return r;n=Ln(n);const i={},s=r;return"toJSON"in s&&typeof s.toJSON=="function"?e(s.toJSON(),n):(Object.keys(s).forEach(o=>{let l=s[o];const f=t(o);n.recursive&&(_e(l)?Kt(l)||(l=e(l,n)):n.recursiveInArray&&Jt(l)&&(l=[...l].map(c=>{let d=c;return _e(c)?Kt(d)||(d=e(c,n)):Jt(c)&&(d=e({key:c},n).key),d}))),i[f]=l}),i)};return e},Tt=qe(Cn),jn=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}_${n.toLowerCase()}`),lr=qe(jn),cr=t=>t.length===0?t:t[0].toUpperCase()+t.slice(1),Rn=[Number,String,Uint8Array],st={recursive:!0,recursiveInArray:!0},Ln=(t=st)=>(t.recursive==null?t=st:t.recursiveInArray??=!1,t),Jt=t=>t!=null&&Array.isArray(t),_e=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),Kt=t=>Rn.some(e=>t instanceof e),Dn=t=>t.replace(/[\s_]+/g,"-").replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}-${n.toLowerCase()}`).toLowerCase(),Pn=qe(Dn),kn=t=>{if(t.length===0)return t;let e=t.replace(/[_-]/g," ");return e=e.replace(/([a-z0-9])([A-Z])/g,(r,n,i)=>`${n} ${i}`),e=e.replace(/([A-Z]+)([A-Z][a-z])/g,(r,n,i)=>`${n} ${i}`),e=e.replace(/\s+/g," ").trim(),e=e.replace(/\b\w/g,r=>r.toUpperCase()),e},qn=qe(kn),Zn=Object.freeze(Object.defineProperty({__proto__:null,camelToSnake:lr,capitalize:cr,snakeToCamel:Tt,toKebab:Pn,toProperNoun:qn},Symbol.toStringTag,{value:"Module"}));let Fn=class{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,r){return this.decodeString(this.decoder.decode(e),r)}decodeString(e,r){const n=JSON.parse(e),i=Tt(n);return r!=null?r.parse(i):i}encodeString(e){const r=lr(e);return JSON.stringify(r,(n,i)=>ArrayBuffer.isView(i)?Array.from(i):typeof i=="bigint"?i.toString():i)}};const at=new Fn,ot=t=>[...new Set(t)],Yn=(t,e,r=!0)=>{const n=new Map;return t.forEach(i=>{const s=e(i);if(n.has(s)){if(r)return;n.delete(s)}n.set(s,i)}),Array.from(n.values())},Vn=Object.freeze(Object.defineProperty({__proto__:null,by:Yn,unique:ot},Symbol.toStringTag,{value:"Module"})),E=t=>t!=null&&typeof t=="object"&&"value"in t;let re=class{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const xt=t=>t!=null&&typeof t=="object"&&"toString"in t,hr=t=>{if(xt(t))return t?.toString().length===0;switch(typeof t){case"string":return t.length===0;case"number":return t===0;case"bigint":return t===0n;case"boolean":return!t;case"undefined":return!0;case"object":return t==null;default:return!1}},Wn=t=>!hr(t),Gn=Object.freeze(Object.defineProperty({__proto__:null,ValueExtension:re,isCrudeValueExtension:E,isNonZero:Wn,isStringer:xt,isZero:hr},Symbol.toStringTag,{value:"Module"})),Ze=(t,e=!1)=>{const r=xt(t)?"stringer":typeof t;let n;switch(r){case"string":n=(i,s)=>i.localeCompare(s);break;case"stringer":n=(i,s)=>i.toString().localeCompare(s.toString());break;case"number":n=(i,s)=>Number(i)-Number(s);break;case"bigint":n=(i,s)=>BigInt(i)-BigInt(s)>0n?1:-1;break;case"boolean":n=(i,s)=>Number(i)-Number(s);break;case"undefined":n=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?dr(n):n},Hn=(t,e,r)=>{const n=Ze(e[t],r);return(i,s)=>n(i[t],s[t])},Xn=(t,e)=>t.length!==e.length?t.length-e.length:t.every((r,n)=>r===e[n])?0:-1,fr=(t,e)=>{if(t.length!==e.length)return t.length-e.length;if(t.length===0)return 0;const r=Ze(t[0]),n=[...t].sort(r),i=[...e].sort(r);return n.every((s,o)=>s===i[o])?0:-1},Jn=(t,e)=>{const r=ot(t),n=ot(e);return fr(r,n)},Kn=(t,e)=>t===e?0:t==="first"&&e==="last"?1:-1,dr=t=>(e,r)=>t(r,e),ne=0,k=-1,q=1,gr=t=>t<ne,pr=t=>t>ne,Qn=t=>t>=ne,mr=t=>t===ne,_n=(t,e)=>{const r=/([a-zA-Z]+)|(\d+)/g,n=t.replace(/[\s_.-]+/g,"").match(r),i=e.replace(/[\s_.-]+/g,"").match(r);if(!n||!i)return 0;for(let s=0;s<Math.min(n.length,i.length);s++){const o=n[s],l=i[s];if(isNaN(Number(o))&&isNaN(Number(l))){const f=o.localeCompare(l);if(f!==0)return f}else if(!isNaN(Number(o))&&!isNaN(Number(l))){const f=Number(o)-Number(l);if(f!==0)return f}else return isNaN(Number(o))?-1:1}return n.length-i.length},Fe=a.z.tuple([a.z.number(),a.z.number()]);a.z.tuple([a.z.bigint(),a.z.bigint()]);const St=a.z.object({width:a.z.number(),height:a.z.number()}),ei=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),ti=["width","height"];a.z.enum(ti);const ri=["start","center","end"],ni=["signedWidth","signedHeight"];a.z.enum(ni);const be=a.z.object({x:a.z.number(),y:a.z.number()}),yr=a.z.object({clientX:a.z.number(),clientY:a.z.number()}),Ye=["x","y"],It=a.z.enum(Ye),Nt=["top","right","bottom","left"],ii=a.z.enum(Nt),Ve=["left","right"],Mt=a.z.enum(Ve),We=["top","bottom"],zt=a.z.enum(We),At=["center"],ut=a.z.enum(At),si=[...Nt,...At],Et=a.z.enum(si);a.z.enum(ri);const ai=["first","last"];a.z.enum(ai);const br=a.z.object({lower:a.z.number(),upper:a.z.number()}),oi=a.z.object({lower:a.z.bigint(),upper:a.z.bigint()});a.z.union([br,Fe]);a.z.union([oi,Fe]);const ui=a.z.enum([...It.options,...Et.options]);a.z.enum(["x","left","right"]);a.z.enum(["y","top","bottom"]);const li=a.z.union([It,Et,a.z.instanceof(String)]),oe=t=>(e,r)=>{if(typeof e=="bigint"){if(Le(r))return t(e,BigInt(r));const n=t(Number(e),Number(r));return typeof n=="number"?BigInt(Math.round(n)):n}return t(Number(e),Number(r))},Z=oe((t,e)=>t-e),ue=oe((t,e)=>t+e),ci=(t,e,r=1e-4)=>Math.abs(t-e)<r,lt=(t,e)=>{const r=typeof t=="bigint",n=typeof e=="bigint";return r&&n?t===e:r&&Le(e)?t===BigInt(e):n&&Le(t)?e===BigInt(t):t===e},hi=t=>{const e=10**Math.floor(Math.log10(t));return Math.round(t/e)*e},wr=oe((t,e)=>t<=e?t:e),Le=t=>typeof t=="bigint"?!0:Number.isInteger(t),fi=oe((t,e)=>t>=e?t:e),$r=t=>typeof t=="bigint"?t<0n?-t:t:t<0?-t:t,B=oe((t,e)=>t*e),Te=oe((t,e)=>t/e),w=(t,e,r)=>{const n={};if(typeof e=="object"&&(r=e,e=void 0),r={makeValid:!0,...r},typeof t=="number"||typeof t=="bigint")e!=null?(n.lower=t,n.upper=e):(n.lower=typeof t=="bigint"?0n:0,n.upper=t);else if(Array.isArray(t)){if(t.length!==2)throw new Error("bounds: expected array of length 2");[n.lower,n.upper]=t}else n.lower=t.lower,n.upper=t.upper;return r?.makeValid?Or(n):n},di=Object.freeze({lower:0,upper:0}),gi=Object.freeze({lower:-1/0,upper:1/0}),pi=Object.freeze({lower:0,upper:1}),mi=Object.freeze({lower:-1,upper:1}),yi=(t,e)=>{if(t==null&&e==null)return!0;if(t==null||e==null)return!1;const r=w(t),n=w(e);return r?.lower===n?.lower&&r?.upper===n?.upper},Or=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,ct=(t,e)=>{const r=w(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},C=(t,e)=>{const r=w(t);if(typeof e=="number"||typeof e=="bigint")return e>=r.lower&&e<r.upper;const n=w(e);return n.lower>=r.lower&&n.upper<=r.upper},bi=(t,e)=>{const r=w(t),n=w(e);return r.lower===n.lower?!0:n.upper===r.lower||n.lower===r.upper?!1:C(r,n.upper)||C(r,n.lower)||C(n,r.upper)||C(n,r.lower)},le=t=>{const e=w(t);return e.upper-e.lower},wi=t=>{const e=w(t);return typeof e.lower=="bigint"?e.lower===0n&&e.upper===0n:e.lower===0&&e.upper===0},$i=t=>{const e=le(t);return typeof e=="number"?e===0:e===0n},Oi=t=>{const e=w(t);return typeof e.lower=="bigint"?!0:Number.isFinite(e.lower)&&Number.isFinite(e.upper)},vi=t=>{const e=w(t);return(e.upper+e.lower)/2},vr=t=>({lower:Math.min(...t.map(e=>w(e).lower)),upper:Math.max(...t.map(e=>w(e).upper))}),Ti=t=>({lower:Math.max(...t.map(e=>w(e).lower)),upper:Math.min(...t.map(e=>w(e).upper))}),xi=t=>{const e=w(t),r=typeof e.lower=="bigint";return Array.from({length:Number(le(t))},(n,i)=>r?e.lower+BigInt(i):e.lower+i)},ht=(t,e)=>{const r=t.map(s=>w(s)),n=r.findIndex(s=>C(s,e)||e<s.lower);if(n===-1)return{index:t.length,position:0};const i=r[n];return C(i,e)?{index:n,position:Number(e-i.lower)}:{index:n,position:0}},et={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},Si=(t,e)=>{const r=t.map(c=>w(c)),n=w(e);if(r.length===0)return et;const i=ht(r,n.lower),s=ht(r,n.upper);if(i.index===t.length)return{...et,insertInto:t.length};if(s.index===0)return{...et,removeAfter:s.position};if(i.index===s.index)return i.position!==0&&s.position!==0?null:{removeAfter:s.position,removeBefore:i.position,insertInto:i.index,deleteInBetween:0};let o=s.index-i.index,l=i.index,f=Z(Number(le(r[i.index])),i.position);return i.position!==0?(o-=1,l+=1):f=0,{removeBefore:f,removeAfter:s.position,insertInto:l,deleteInBetween:o}},Tr=(t,e,r)=>{const n=t.map(l=>w(l)),i=r>0?1:r<0?-1:0;if(i===0)return e;let s=r,o=e;for(;lt(s,0)===!1;){const l=n.findIndex(f=>i>0?o>=f.lower&&o<f.upper:o>f.lower&&o<=f.upper);if(l!==-1){const f=n[l];let c;if(i>0?c=Z(f.upper,o):c=Z(o,f.lower),c>0){const d=wr($r(s),c);if(o=ue(o,i>0?d:-d),s=Z(s,i>0?d:-d),lt(s,0))return o;continue}}if(i>0){const f=n.filter(c=>c.lower>o);if(f.length>0)o=f[0].lower;else return o}else{const f=n.filter(c=>c.upper<o);if(f.length>0)o=f[f.length-1].upper;else return o}}return o},xr=(t,e,r)=>{const n=t.map(o=>w(o));if(e===r)return typeof e=="bigint"?0n:0;const i=e<r?w([e,r]):w([r,e]);let s=typeof e=="bigint"?0n:0;for(const o of n){const l=o.lower>i.lower?o.lower:i.lower,f=o.upper<i.upper?o.upper:i.upper;if(l<f){const c=f-l;s=s+c}}return s},Ii=Object.freeze(Object.defineProperty({__proto__:null,CLIP:mi,DECIMAL:pi,INFINITE:gi,ZERO:di,bounds:br,buildInsertionPlan:Si,clamp:ct,construct:w,contains:C,distance:xr,equals:yi,findInsertPosition:ht,isFinite:Oi,isZero:wi,linspace:xi,makeValid:Or,max:vr,mean:vi,min:Ti,overlapsWith:bi,span:le,spanIsZero:$i,traverse:Tr},Symbol.toStringTag,{value:"Module"})),Sr=ui,P=t=>Ye.includes(t)?t:We.includes(t)?"y":"x",Ni=t=>P(t)==="x"?"y":"x",Mi=t=>P(t)==="x"?"width":"height",zi=t=>P(t)==="x"?"left":"top",Ai=t=>Sr.safeParse(t).success,Ei=t=>P(t)==="x"?"signedWidth":"signedHeight",Ui=t=>t==="center"?!1:P(t)==="x",Bi=t=>P(t)==="y",Ir=Object.freeze(Object.defineProperty({__proto__:null,DIRECTIONS:Ye,construct:P,crude:Sr,dimension:Mi,direction:It,isDirection:Ai,isX:Ui,isY:Bi,location:zi,signedDimension:Ei,swap:Ni},Symbol.toStringTag,{value:"Module"})),Ci=Mt,ji=zt,Ri=ut,Li={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},Di={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},Pi=li,X=t=>t instanceof String||!Ye.includes(t)?t:t==="x"?"left":"top",ki=t=>Li[X(t)],qi=t=>Di[X(t)],we=t=>{const e=X(t);return e==="top"||e==="bottom"?"y":"x"},Zi=a.z.object({x:Mt.or(ut),y:zt.or(ut)}),Nr=a.z.object({x:Mt,y:zt}),xe=Object.freeze({x:"left",y:"top"}),Ut=Object.freeze({x:"right",y:"top"}),Ge=Object.freeze({x:"left",y:"bottom"}),Bt=Object.freeze({x:"right",y:"bottom"}),Ct=Object.freeze({x:"center",y:"center"}),jt=Object.freeze({x:"center",y:"top"}),Rt=Object.freeze({x:"center",y:"bottom"}),Lt=Object.freeze({x:"right",y:"center"}),Dt=Object.freeze({x:"left",y:"center"}),Fi=Object.freeze([Dt,Lt,jt,Rt,xe,Ut,Ge,Bt,Ct]),Pt=(t,e)=>t.x===e.x&&t.y===e.y,Yi=(t,e)=>{if(typeof e=="object"){let r=!0;return"x"in e&&(t.x===e.x||(r=!1)),"y"in e&&(t.y===e.y||(r=!1)),r}return t.x===e||t.y===e},Mr=t=>[t.x,t.y],Ee=t=>we(X(t))==="x",Vi=t=>we(X(t))==="y",Wi=t=>`${t.x}${cr(t.y)}`,Gi=(t,e)=>{let r,n;if(typeof t=="object"&&"x"in t?(r=t.x,n=t.y):(r=X(t),n=X(e??t)),we(r)===we(n)&&r!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`);const i={...Ct};return r==="center"?Ee(n)?[i.x,i.y]=[n,r]:[i.x,i.y]=[r,n]:n==="center"?Ee(r)?[i.x,i.y]=[r,n]:[i.x,i.y]=[n,r]:Ee(r)?[i.x,i.y]=[r,n]:[i.x,i.y]=[n,r],i},zr=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:Rt,BOTTOM_LEFT:Ge,BOTTOM_RIGHT:Bt,CENTER:Ct,CENTER_LEFT:Dt,CENTER_LOCATIONS:At,CENTER_RIGHT:Lt,OUTER_LOCATIONS:Nt,TOP_CENTER:jt,TOP_LEFT:xe,TOP_RIGHT:Ut,XY_LOCATIONS:Fi,X_LOCATIONS:Ve,Y_LOCATIONS:We,center:Ri,construct:X,constructXY:Gi,corner:Nr,crude:Pi,direction:we,isX:Ee,isY:Vi,location:Et,outer:ii,rotate90:qi,swap:ki,x:Ci,xy:Zi,xyCouple:Mr,xyEquals:Pt,xyMatches:Yi,xyToString:Wi,y:ji},Symbol.toStringTag,{value:"Module"})),ft=a.z.union([a.z.number(),be,Fe,St,ei,yr]),v=(t,e)=>{if(typeof t=="string"){if(e===void 0)throw new Error("The y coordinate must be given.");return t==="x"?{x:e,y:0}:{x:0,y:e}}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}},D=Object.freeze({x:0,y:0}),Ar=Object.freeze({x:1,y:1}),Hi=Object.freeze({x:1/0,y:1/0}),Xi=Object.freeze({x:NaN,y:NaN}),De=(t,e,r=0)=>{const n=v(t),i=v(e);return r===0?n.x===i.x&&n.y===i.y:Math.abs(n.x-i.x)<=r&&Math.abs(n.y-i.y)<=r},Ji=t=>De(t,D),kt=(t,e,r)=>{const n=v(t),i=v(e,r);return{x:n.x*i.x,y:n.y*i.y}},Er=(t,e)=>{const r=v(t);return{x:r.x+e,y:r.y}},Ur=(t,e)=>{const r=v(t);return{x:r.x,y:r.y+e}},$e=(t,e,r,...n)=>{if(typeof e=="string"){if(typeof r!="number")throw new Error("The value must be a number.");return e==="x"?Er(t,r):Ur(t,r)}if(typeof e=="object"&&"x"in e&&typeof e.x=="string"){const i=v(r),s=v(t);return e.x==="left"?i.x=-i.x:e.x==="center"&&(i.x=0),e.y==="top"?i.y=-i.y:e.y==="center"&&(i.y=0),{x:s.x+i.x,y:s.y+i.y}}return[t,e,r??D,...n].reduce((i,s)=>{const o=v(s);return{x:i.x+o.x,y:i.y+o.y}},D)},Ki=(t,e,r)=>{const n=v(t);return e==="x"?{x:r,y:n.y}:{x:n.x,y:r}},Qi=(t,e)=>{const r=v(t),n=v(e);return Math.sqrt((r.x-n.x)**2+(r.y-n.y)**2)},_i=(t,e)=>{const r=v(t),n=v(e);return{x:n.x-r.x,y:n.y-r.y}},es=t=>{const e=v(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},ts=t=>{const e=v(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},rs=t=>{const e=v(t);return[e.x,e.y]},ns=t=>{const e=v(t);return{left:e.x,top:e.y}},dt=(t,e=0)=>{const r=v(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},he=(t,e)=>{const r=v(t),n=v(e);return{x:r.x-n.x,y:r.y-n.y}},fe=t=>{const e=v(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},Br=t=>{const e=v(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},Cr=(...t)=>{const e=t.reduce((r,n)=>$e(r,n),D);return kt(e,1/t.length)},is=(t,e)=>{const r=[];for(let n=0;n<t.length;n++){const i=t[n];let s,o,l,f;if(n===0){const c=t[n+1],d=he(c,i);o=fe(d),l=o,f=e}else if(n===t.length-1){const c=t[n-1],d=he(i,c);s=fe(d),l=s,f=e}else{const c=t[n-1],d=t[n+1],m=he(i,c),p=he(d,i);s=fe(m),o=fe(p);const N=Math.acos((m.x*p.x+m.y*p.y)/(Math.hypot(m.x,m.y)*Math.hypot(p.x,p.y))),z=Math.sin(N/2);z===0?f=e:f=e/z,l=Br(Cr(s,o))}r.push(kt(l,f))}return r},ss=t=>{const e=v(t);return{x:e.y,y:e.x}},gt=t=>{const e=v(t);return{x:Math.round(e.x),y:Math.round(e.y)}},as=t=>{const e=v(t);return{x:1/e.x,y:1/e.y}},os=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Hi,NAN:Xi,ONE:Ar,ZERO:D,average:Cr,calculateMiters:is,clientXY:yr,construct:v,couple:rs,crudeZ:ft,css:ns,distance:Qi,equals:De,isFinite:ts,isNan:es,isZero:Ji,normal:fe,normalize:Br,reciprocal:as,round:gt,scale:kt,set:Ki,sub:he,swap:ss,translate:$e,translateX:Er,translateY:Ur,translation:_i,truncate:dt,xy:be},Symbol.toStringTag,{value:"Module"})),Ie=a.z.union([a.z.number(),a.z.string()]),us=a.z.object({top:Ie,left:Ie,width:Ie,height:Ie}),ls=a.z.object({left:a.z.number(),top:a.z.number(),right:a.z.number(),bottom:a.z.number()}),cs=a.z.object({one:be,two:be,root:Nr}),jr={one:D,two:D,root:xe},hs={one:D,two:Ar,root:Ge},Rr=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),S=(t,e,r=0,n=0,i)=>{const s={one:{...D},two:{...D},root:i??xe};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return s.one={x:t,y:e},s.two={x:s.one.x+r,y:s.one.y+n},s}return"one"in t&&"two"in t&&"root"in t?{...t,root:i??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(s.one={x:t.left,y:t.top},s.two={x:t.right,y:t.bottom},s):(s.one=t,e==null?s.two={x:s.one.x+r,y:s.one.y+n}:typeof e=="number"?s.two={x:s.one.x+e,y:s.one.y+r}:"width"in e?s.two={x:s.one.x+e.width,y:s.one.y+e.height}:"signedWidth"in e?s.two={x:s.one.x+e.signedWidth,y:s.one.y+e.signedHeight}:s.two=e,s))},fs=(t,e,r)=>{const n=S(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const i=P(e);return S(n.one,void 0,i==="x"?r:J(n),i==="y"?r:K(n),n.root)}return S(n.one,e,void 0,void 0,n.root)},ds=(t,e,r=!0)=>{const n=S(t);let i=(s,o)=>s<o;return r&&(i=(s,o)=>s<=o),"one"in e?i(G(n),G(e))&&i(_(e),_(n))&&i(H(n),H(e))&&i(ee(e),ee(n)):i(G(n),e.x)&&i(e.x,_(n))&&i(H(n),e.y)&&i(e.y,ee(n))},gs=(t,e)=>De(t.one,e.one)&&De(t.two,e.two)&&Pt(t.root,e.root),Lr=t=>({width:J(t),height:K(t)}),ps=t=>({signedWidth:He(t),signedHeight:Xe(t)}),ms=t=>({top:H(t),left:G(t),width:J(t),height:K(t)}),qt=(t,e,r=!1)=>{const n=P(e)==="y"?Xe(t):He(t);return r?n:Math.abs(n)},F=(t,e)=>{const r=S(t);return{x:e.x==="center"?pt(r).x:te(r,e.x),y:e.y==="center"?pt(r).y:te(r,e.y)}},te=(t,e)=>{const r=S(t),n=Mr(r.root).includes(e)?Math.min:Math.max;return Ve.includes(e)?n(r.one.x,r.two.x):n(r.one.y,r.two.y)},ys=t=>kr(t)===0,J=t=>qt(t,"x"),K=t=>qt(t,"y"),He=t=>{const e=S(t);return e.two.x-e.one.x},Xe=t=>{const e=S(t);return e.two.y-e.one.y},Dr=t=>F(t,xe),bs=t=>F(t,jt),ws=t=>F(t,Ut),$s=t=>F(t,Ge),Os=t=>F(t,Rt),vs=t=>F(t,Bt),Ts=t=>F(t,Dt),xs=t=>F(t,Lt),_=t=>te(t,"right"),ee=t=>te(t,"bottom"),G=t=>te(t,"left"),H=t=>te(t,"top"),pt=t=>$e(Dr(t),{x:He(t)/2,y:Xe(t)/2}),Zt=t=>{const e=S(t);return e.root.x==="left"?G(e):_(e)},Ft=t=>{const e=S(t);return e.root.y==="top"?H(e):ee(e)},Ss=t=>({x:Zt(t),y:Ft(t)}),Ue=t=>{const e=S(t);return{lower:e.one.x,upper:e.two.x}},Be=t=>{const e=S(t);return{lower:e.one.y,upper:e.two.y}},Is=(t,e)=>Rr(t,e),Ns=(t,e)=>{const r=S(t),n=Ve.includes(e)?"x":We.includes(e)?"y":null;if(n===null)throw new Error(`Invalid location: ${e}`);const i=e==="top"||e==="left"?Math.min:Math.max,s={...r.one},o={...r.two};return s[n]=i(r.one[n],r.two[n]),o[n]=i(r.one[n],r.two[n]),[s,o]},Ms=(t,e)=>{const r=S(t),n=S(e),i=Zt(n)+(J(n)-J(r))/2,s=Ft(n)+(K(n)-K(r))/2;return S({x:i,y:s},Lr(r))},Pr=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,zs=t=>J(t)/K(t),As=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const i=P(e);e=v(i,r)}const n=S(t);return S($e(n.one,e),$e(n.two,e),void 0,void 0,n.root)},Es=(t,e)=>{const r=Math.max(G(t),G(e)),n=Math.max(H(t),H(e)),i=Math.min(_(t),_(e)),s=Math.min(ee(t),ee(e));return r>i||n>s?jr:S({x:r,y:n},{x:i,y:s},void 0,void 0,t.root)},kr=t=>J(t)*K(t),Us=(t,e)=>{const r=S(t);return S(dt(r.one,e),dt(r.two,e),void 0,void 0,r.root)},Bs=(t,e,r,n,i,s)=>{const o={x:t,y:e},l={x:t+r,y:e+n};return i.x!==s.x&&(i.x==="center"?(o.x-=r/2,l.x-=r/2):(o.x-=r,l.x-=r)),i.y!==s.y&&(i.y==="center"?(o.y-=n/2,l.y-=n/2):(o.y-=n,l.y-=n)),S(o,l,void 0,void 0,s)},Cs=t=>{const e=S(t);return S(gt(e.one),gt(e.two),void 0,void 0,e.root)},js=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:hs,ZERO:jr,area:kr,areaIsZero:ys,aspect:zs,bottom:ee,bottomCenter:Os,bottomLeft:$s,bottomRight:vs,box:cs,center:pt,centerLeft:Ts,centerRight:xs,construct:S,constructWithAlternateRoot:Bs,contains:ds,copy:Rr,css:ms,cssBox:us,dim:qt,dims:Lr,domRect:ls,edgePoints:Ns,equals:gs,height:K,intersection:Es,isBox:Pr,left:G,loc:te,positionInCenter:Ms,reRoot:Is,resize:fs,right:_,root:Ss,round:Cs,signedDims:ps,signedHeight:Xe,signedWidth:He,top:H,topCenter:bs,topLeft:Dr,topRight:ws,translate:As,truncate:Us,width:J,x:Zt,xBounds:Ue,xyLoc:F,y:Ft,yBounds:Be},Symbol.toStringTag,{value:"Module"})),qr=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),Rs=a.z.union([St,qr,be,Fe]),Ls={width:0,height:0},Ds={width:1,height:1},j=(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},Ps=(t,e)=>{if(e==null)return!1;const r=j(t),n=j(e);return r.width===n.width&&r.height===n.height},ks=t=>{const e=j(t);return{width:e.height,height:e.width}},qs=t=>{const e=j(t);return`0 0 ${e.width} ${e.height}`},Zs=t=>{const e=j(t);return[e.width,e.height]},Fs=t=>({width:Math.max(...t.map(e=>j(e).width)),height:Math.max(...t.map(e=>j(e).height))}),Ys=t=>({width:Math.min(...t.map(e=>j(e).width)),height:Math.min(...t.map(e=>j(e).height))}),Vs=(t,e)=>{const r=j(t);return{width:r.width*e,height:r.height*e}},Ws=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:Ds,ZERO:Ls,construct:j,couple:Zs,crude:Rs,dimensions:St,equals:Ps,max:Fs,min:Ys,scale:Vs,signed:qr,svgViewBox:qs,swap:ks},Symbol.toStringTag,{value:"Module"})),Zr=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t,Gs=a.z.object({offset:ft,scale:ft}),Hs=a.z.object({offset:a.z.number(),scale:a.z.number()}),Xs=t=>(e,r,n,i)=>r==="dimension"?[e,n]:[e,i?n-t:n+t],Js=t=>(e,r,n,i)=>[e,i?n/t:n*t],Ks=t=>(e,r,n)=>{if(e===null)return[t,n];const{lower:i,upper:s}=e,{lower:o,upper:l}=t,f=s-i,c=l-o;if(r==="dimension")return[t,n*(c/f)];const d=(n-i)*(c/f)+o;return[t,d]},Qs=t=>(e,r,n)=>[t,n],_s=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:n,upper:i}=t;return[t,i-(r-n)]},ea=t=>(e,r,n)=>{const{lower:i,upper:s}=t;return n=Zr(n,i,s),[e,n]};let mt=class se{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new se().translate(e)}static magnify(e){return new se().magnify(e)}static scale(e,r){return new se().scale(e,r)}translate(e){const r=this.new(),n=Xs(e);return n.type="translate",r.ops.push(n),r}magnify(e){const r=this.new(),n=Js(e);return n.type="magnify",r.ops.push(n),r}scale(e,r){const n=w(e,r),i=this.new(),s=Ks(n);return s.type="scale",i.ops.push(s),i}clamp(e,r){const n=w(e,r),i=this.new(),s=ea(n);return s.type="clamp",i.ops.push(s),i}reBound(e,r){const n=w(e,r),i=this.new(),s=Qs(n);return s.type="re-bound",i.ops.push(s),i}invert(){const e=_s();e.type="invert";const r=this.new();return r.ops.push(e),r}pos(e){return this.exec("position",e)}dim(e){return this.exec("dimension",e)}new(){const e=new se;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([n,i],s)=>s(n,e,i,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((n,i)=>{if(n.type==="scale"||r.some(([o,l])=>i>=o&&i<=l))return;const s=e.ops.findIndex((o,l)=>o.type==="scale"&&l>i);s!==-1&&r.push([i,s])}),r.forEach(([n,i])=>{const s=e.ops.slice(n,i);s.unshift(e.ops[i]),e.ops.splice(n,i-n+1,...s)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new se},ta=class R{x;y;currRoot;constructor(e=new mt,r=new mt,n=null){this.x=e,this.y=r,this.currRoot=n}static translate(e,r){return new R().translate(e,r)}static translateX(e){return new R().translateX(e)}static translateY(e){return new R().translateY(e)}static clamp(e){return new R().clamp(e)}static magnify(e){return new R().magnify(e)}static scale(e){return new R().scale(e)}static reBound(e){return new R().reBound(e)}translate(e,r){const n=v(e,r),i=this.copy();return i.x=this.x.translate(n.x),i.y=this.y.translate(n.y),i}translateX(e){const r=this.copy();return r.x=this.x.translate(e),r}translateY(e){const r=this.copy();return r.y=this.y.translate(e),r}magnify(e){const r=this.copy();return r.x=this.x.magnify(e.x),r.y=this.y.magnify(e.y),r}scale(e){const r=this.copy();if(Pr(e)){const n=this.currRoot;return r.currRoot=e.root,n!=null&&!Pt(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(Ue(e)),r.y=r.y.scale(Be(e)),r}return r.x=r.x.scale(e.width),r.y=r.y.scale(e.height),r}reBound(e){const r=this.copy();return r.x=this.x.reBound(Ue(e)),r.y=this.y.reBound(Be(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp(Ue(e)),r.y=this.y.clamp(Be(e)),r}copy(){const e=new R;return e.currRoot=this.currRoot,e.x=this.x,e.y=this.y,e}reverse(){const e=this.copy();return e.x=this.x.reverse(),e.y=this.y.reverse(),e}pos(e){return{x:this.x.pos(e.x),y:this.y.pos(e.y)}}dim(e){return{x:this.x.dim(e.x),y:this.y.dim(e.y)}}box(e){return S(this.pos(e.one),this.pos(e.two),0,0,this.currRoot??e.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}static IDENTITY=new R};const ra=Object.freeze(Object.defineProperty({__proto__:null,Scale:mt,XY:ta,crudeXYTransform:Gs,transform:Hs},Symbol.toStringTag,{value:"Module"}));let Fr=(t,e=21)=>(r=e)=>{let n="",i=r|0;for(;i--;)n+=t[Math.random()*t.length|0];return n};const Yr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",na=`0123456789${Yr}`,Vr=11,ia=Fr(Yr,1),sa=Fr(na,Vr-1),Yt=()=>`${ia()}${sa()}`,aa=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:Vr,create:Yt},Symbol.toStringTag,{value:"Module"})),oa=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,ua=a.z.enum(["static","dynamic"]),la=2**8-1,ca=2**16-1,ha=2**32-1,fa=2n**64n-1n,da=2**64-1,ga=-128,pa=2**7-1,ma=-32768,ya=2**15-1,ba=-2147483648,wa=2**31-1,$a=-(2n**63n),Pe=2n**63n-1n,Oa=-9223372036854776e3,Wr=2**63-1,Qt=365,Ne=30,va=a.z.union([a.z.tuple([a.z.int()]),a.z.tuple([a.z.int(),a.z.int().min(1).max(12)]),a.z.tuple([a.z.int(),a.z.int().min(1).max(12),a.z.int().min(1).max(31)])]),Gr=(t,e)=>{const r=new O(e);if(![h.DAY,h.HOUR,h.MINUTE,h.SECOND,h.MILLISECOND,h.MICROSECOND,h.NANOSECOND].some(i=>i.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const n=t.valueOf()%r.valueOf();return t instanceof O?new O(n):new h(n)};let O=class g extends re{constructor(e,r="UTC"){if(e==null)super(g.now().valueOf());else if(e instanceof Date)super(BigInt(e.getTime())*g.MILLISECOND.valueOf());else if(typeof e=="string")super(g.parseDateTimeString(e,r).valueOf());else if(Array.isArray(e))super(g.parseDate(e));else{let n=0n;e instanceof Number&&(e=e.valueOf()),r==="local"&&(n=g.utcOffset.valueOf()),typeof e=="number"&&(isFinite(e)?e===Wr?e=Pe:e=Math.trunc(e):(isNaN(e)&&(e=0),e===1/0?e=g.MAX:e=g.MIN)),E(e)&&(e=e.value),super(BigInt(e.valueOf())+n)}}static parseDate([e=1970,r=1,n=1]){const i=new Date(e,r-1,n,0,0,0,0);return new g(BigInt(i.getTime())*g.MILLISECOND.valueOf()).truncate(g.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[n,i,s]=e.split(":");let o="00",l="00";s!=null&&([o,l]=s.split("."));let f=g.hours(parseInt(n??"00")).add(g.minutes(parseInt(i??"00"))).add(g.seconds(parseInt(o??"00"))).add(g.milliseconds(parseInt(l??"00")));return r==="local"&&(f=f.add(g.utcOffset)),f.valueOf()}static parseDateTimeString(e,r="UTC"){if(!e.includes("/")&&!e.includes("-"))return g.parseTimeString(e,r);if(e.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?$/)!=null){let i=e,s=0;if(e.includes(".")){const c=e.split(".");i=c[0];const d=c[1]||"0";s=parseInt(d.padEnd(3,"0").slice(0,3))}const o=r==="local"?new Date(i.replace("T"," ")):new Date(`${i}Z`),l=BigInt(o.getTime())*g.MILLISECOND.valueOf(),f=BigInt(s)*g.MILLISECOND.valueOf();return l+f}const n=new Date(e);return e.includes(":")||n.setUTCHours(0,0,0,0),new g(BigInt(n.getTime())*g.MILLISECOND.valueOf(),r).valueOf()}toISOString(e="UTC"){return e==="UTC"?this.date().toISOString():this.sub(g.utcOffset).date().toISOString()}timeString(e=!1,r="UTC"){const n=this.toISOString(r);return e?n.slice(11,23):n.slice(11,19)}dateString(){const e=this.date(),r=e.toLocaleString("default",{month:"short"}),n=e.toLocaleString("default",{day:"numeric"});return`${r} ${n}`}static get utcOffset(){return new h(BigInt(new Date().getTimezoneOffset())*g.MINUTE.valueOf())}static since(e){return new g().span(e)}date(){return new Date(this.milliseconds)}equals(e){return this.valueOf()===new g(e).valueOf()}span(e){return this.range(e).span}range(e){return new W(this,e).makeValid()}spanRange(e){return this.range(this.add(e)).makeValid()}get isZero(){return this.valueOf()===0n}after(e){return this.valueOf()>new g(e).valueOf()}afterEq(e){return this.valueOf()>=new g(e).valueOf()}before(e){return this.valueOf()<new g(e).valueOf()}beforeEq(e){return this.valueOf()<=new g(e).valueOf()}add(e){return new g(ue(this.valueOf(),new h(e).valueOf()))}sub(e){return new g(Z(this.valueOf(),new h(e).valueOf()))}get hours(){return Number(this.valueOf())/Number(h.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(h.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(h.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(h.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(g.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(g.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(e){const r=this.date();return r.setUTCFullYear(e),new g(r)}get month(){return this.date().getUTCMonth()}setMonth(e){const r=this.date();return r.setUTCMonth(e),new g(r)}get day(){return this.date().getUTCDate()}setDay(e){const r=this.date();return r.setUTCDate(e),new g(r)}get hour(){return this.date().getUTCHours()}get localHour(){return this.date().getHours()}setLocalHour(e){const r=this.date();return r.setHours(e),new g(r)}setHour(e){const r=this.date();return r.setUTCHours(e),new g(r)}get minute(){return this.date().getUTCMinutes()}setMinute(e){const r=this.date();return r.setUTCMinutes(e),new g(r)}get second(){return this.date().getUTCSeconds()}setSecond(e){const r=this.date();return r.setUTCSeconds(e),new g(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(e){const r=this.date();return r.setUTCMilliseconds(e),new g(r)}toString(e="ISO",r="UTC"){switch(e){case"ISODate":return this.toISOString(r).slice(0,10);case"ISOTime":return this.toISOString(r).slice(11,23);case"time":return this.timeString(!1,r);case"preciseTime":return this.timeString(!0,r);case"date":return this.dateString();case"preciseDate":return`${this.dateString()} ${this.timeString(!0,r)}`;case"dateTime":return`${this.dateString()} ${this.timeString(!1,r)}`;default:return this.toISOString(r)}}remainder(e){return Gr(this,e)}get isToday(){return this.truncate(h.DAY).equals(g.now().truncate(h.DAY))}truncate(e){return this.sub(this.remainder(e))}formatBySpan(e){return e.greaterThanOrEqual(h.days(30))?"shortDate":e.greaterThanOrEqual(h.DAY)?"dateTime":e.greaterThanOrEqual(h.HOUR)?"time":e.greaterThanOrEqual(h.SECOND)?"preciseTime":"ISOTime"}static now(){return new g(new Date)}static max(...e){let r=g.MIN;for(const n of e){const i=new g(n);i.after(r)&&(r=i)}return r}static min(...e){let r=g.MAX;for(const n of e){const i=new g(n);i.before(r)&&(r=i)}return r}static nanoseconds(e,r="UTC"){return new g(e,r)}static NANOSECOND=g.nanoseconds(1);static microseconds(e,r="UTC"){return g.nanoseconds(e*1e3,r)}static MICROSECOND=g.microseconds(1);static milliseconds(e,r="UTC"){return g.microseconds(e*1e3,r)}static MILLISECOND=g.milliseconds(1);static seconds(e,r="UTC"){return g.milliseconds(e*1e3,r)}static SECOND=g.seconds(1);static minutes(e,r="UTC"){return g.seconds(e*60,r)}static MINUTE=g.minutes(1);static hours(e,r="UTC"){return g.minutes(e*60,r)}static HOUR=g.hours(1);static days(e,r="UTC"){return g.hours(e*24,r)}static DAY=g.days(1);static MAX=new g(Pe);static MIN=new g(0);static ZERO=new g(0);static z=a.z.union([a.z.instanceof(g),a.z.object({value:a.z.bigint()}).transform(e=>new g(e.value)),a.z.string().transform(e=>new g(BigInt(e))),a.z.number().transform(e=>new g(e)),a.z.bigint().transform(e=>new g(e)),a.z.date().transform(e=>new g(e)),a.z.custom(e=>e instanceof h).transform(e=>new g(e)),va.transform(e=>new g(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}};class h extends re{constructor(e){typeof e=="number"&&(e=Math.trunc(e.valueOf())),E(e)&&(e=e.value),super(BigInt(e.valueOf()))}static fromSeconds(e){return e instanceof h?e:e instanceof A?e.period:e instanceof O?new h(e):(E(e)&&(e=e.value),["number","bigint"].includes(typeof e)?h.seconds(e):new h(e))}static fromMilliseconds(e){return e instanceof h?e:e instanceof A?e.period:e instanceof O?new h(e):(E(e)&&(e=e.value),["number","bigint"].includes(typeof e)?h.milliseconds(e):new h(e))}valueOf(){return this.value}lessThan(e){return this.valueOf()<new h(e).valueOf()}greaterThan(e){return this.valueOf()>new h(e).valueOf()}lessThanOrEqual(e){return this.valueOf()<=new h(e).valueOf()}greaterThanOrEqual(e){return this.valueOf()>=new h(e).valueOf()}remainder(e){return Gr(this,e)}truncate(e){return new h(BigInt(Math.trunc(Number(this.valueOf()/e.valueOf())))*e.valueOf())}toString(e="full"){if(e==="semantic")return this.toSemanticString();const r=this.truncate(h.DAY),n=this.truncate(h.HOUR),i=this.truncate(h.MINUTE),s=this.truncate(h.SECOND),o=this.truncate(h.MILLISECOND),l=this.truncate(h.MICROSECOND),f=this.truncate(h.NANOSECOND),c=r,d=n.sub(r),m=i.sub(n),p=s.sub(i),N=o.sub(s),z=l.sub(o),U=f.sub(l);let $="";return c.isZero||($+=`${c.days}d `),d.isZero||($+=`${d.hours}h `),m.isZero||($+=`${m.minutes}m `),p.isZero||($+=`${p.seconds}s `),N.isZero||($+=`${N.milliseconds}ms `),z.isZero||($+=`${z.microseconds}µs `),U.isZero||($+=`${U.nanoseconds}ns`),$.trim()}toSemanticString(){const e=this.valueOf()<0n?-this.valueOf():this.valueOf(),r=new h(e),n=this.valueOf()<0n;if(r.valueOf()===0n)return"0s";if(r.lessThan(h.SECOND))return"< 1s";const i=r.days,s=r.hours,o=r.minutes,l=r.seconds,f=Math.floor(i/Qt),c=Math.floor(i/Ne),d=Math.floor(i/7),m=Math.floor(i),p=Math.floor(s),N=Math.floor(o),z=Math.floor(l),U=n?"-":"";if(f>=1){let $=`${f}y`;if(f<2){const I=Math.floor(i%Qt/Ne);I>0&&($+=` ${I}mo`)}return U+$}if(d>=1&&i<Ne&&i%7===0){let $=`${d}w`;const I=Math.floor(i%7),Q=Math.floor(s-d*7*24);return d<2&&(I>0?$+=` ${I}d`:Q>0&&Q<24&&($+=` ${Q}h`)),U+$}if(c>=1){let $=`${c}mo`;if(c<3){const I=Math.floor(i%Ne);I>0&&($+=` ${I}d`)}return U+$}if(d>=1){let $=`${d}w`;const I=Math.floor(i%7),Q=Math.floor(s-d*7*24);return d<2&&(I>0?$+=` ${I}d`:Q>0&&Q<24&&($+=` ${Q}h`)),U+$}if(m>=1){let $=`${m}d`;const I=Math.floor(s-m*24);return m<2&&I>0&&($+=` ${I}h`),U+$}if(p>=1){let $=`${p}h`;if(p<3){const I=Math.floor(o-p*60);I>0&&($+=` ${I}m`)}return U+$}if(N>=1){let $=`${N}m`;if(N<5){const I=Math.floor(l-N*60);I>0&&($+=` ${I}s`)}return U+$}return`${U}${z}s`}mult(e){return new h(B(this.valueOf(),e))}div(e){return new h(Te(this.valueOf(),e))}get days(){return Number(this.valueOf())/Number(h.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(h.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(h.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(h.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(h.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(h.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===0n}equals(e){return this.valueOf()===new h(e).valueOf()}add(e){return new h(this.valueOf()+new h(e).valueOf())}sub(e){return new h(this.valueOf()-new h(e).valueOf())}static nanoseconds(e=1){return new h(e)}static NANOSECOND=h.nanoseconds(1);static microseconds(e=1){return h.nanoseconds(B(e,1e3))}static MICROSECOND=h.microseconds(1);static milliseconds(e=1){return h.microseconds(B(e,1e3))}static MILLISECOND=h.milliseconds(1);static seconds(e=1){return h.milliseconds(B(e,1e3))}static SECOND=h.seconds(1);static minutes(e=1){return h.seconds(B(e,60))}static MINUTE=h.minutes(1);static hours(e){return h.minutes(B(e,60))}static HOUR=h.hours(1);static days(e){return h.hours(B(e,24))}static DAY=h.days(1);static MAX=new h(Pe);static MIN=new h(0);static ZERO=new h(0);static z=a.z.union([a.z.object({value:a.z.bigint()}).transform(e=>new h(e.value)),a.z.string().transform(e=>new h(BigInt(e))),a.z.number().transform(e=>new h(e)),a.z.bigint().transform(e=>new h(e)),a.z.instanceof(h),a.z.instanceof(O).transform(e=>new h(e)),a.z.custom(e=>e instanceof A).transform(e=>new h(e))])}class A extends re{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new A(e).valueOf()}get period(){return h.seconds(1/this.valueOf())}sampleCount(e){return new h(e).seconds*this.valueOf()}byteCount(e,r){return this.sampleCount(e)*new b(r).valueOf()}span(e){return h.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/new b(r).valueOf())}add(e){return new A(ue(this.valueOf(),new A(e).valueOf()))}sub(e){return new A(Z(this.valueOf(),new A(e).valueOf()))}mult(e){return new A(B(this.valueOf(),e))}div(e){return new A(Te(this.valueOf(),e))}static hz(e){return new A(e)}static khz(e){return A.hz(e*1e3)}static z=a.z.union([a.z.number().transform(e=>new A(e)),a.z.instanceof(A)])}class b extends re{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new y(e*this.valueOf())}add(e){return new b(ue(this.valueOf(),new b(e).valueOf()))}sub(e){return new b(Z(this.valueOf(),new b(e).valueOf()))}mult(e){return new b(B(this.valueOf(),e))}div(e){return new b(Te(this.valueOf(),e))}static UNKNOWN=new b(0);static BIT128=new b(16);static BIT64=new b(8);static BIT32=new b(4);static BIT16=new b(2);static BIT8=new b(1);static z=a.z.union([a.z.number().transform(e=>new b(e)),a.z.instanceof(b)])}let W=class L{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new O(e.start),this.end=new O(e.end)):(this.start=new O(e),this.end=new O(r))}get span(){return new h(this.end.valueOf()-this.start.valueOf())}get isValid(){return this.start.valueOf()<=this.end.valueOf()}makeValid(){return this.isValid?this:this.swap()}get isZero(){return this.start.isZero&&this.end.isZero}get numeric(){return{start:Number(this.start.valueOf()),end:Number(this.end.valueOf())}}swap(){return new L(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(e,r=h.ZERO){if(r.isZero)return this.start.equals(e.start)&&this.end.equals(e.end);let n=this.start.sub(e.start).valueOf(),i=this.end.sub(e.end).valueOf();return n<0&&(n=-n),i<0&&(i=-i),n<=r.valueOf()&&i<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.toString("preciseDate")} - ${this.span.toString()}`}overlapsWith(e,r=h.ZERO){e=e.makeValid();const n=this.makeValid();if(this.equals(e))return!0;if(e.end.equals(n.start)||n.end.equals(e.start))return!1;const i=O.max(n.start,e.start),s=O.min(n.end,e.end);return s.before(i)?!1:new h(s.sub(i)).greaterThanOrEqual(r)}contains(e){return e instanceof L?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new L(this.start,this.end);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}static max(...e){return new L(O.min(...e.map(r=>r.start)),O.max(...e.map(r=>r.end)))}static MAX=new L(O.MIN,O.MAX);static ZERO=new L(O.ZERO,O.ZERO);static z=a.z.union([a.z.object({start:O.z,end:O.z}).transform(e=>new L(e.start,e.end)),a.z.instanceof(L)]);static sort(e,r){return O.sort(e.start,r.start)||O.sort(e.end,r.end)}static simplify(e){return e.map(r=>r.makeValid()).sort((r,n)=>L.sort(r,n)).reduce((r,n)=>{if(n.span.isZero)return r;if(r.length===0)return r.push(n),r;const i=r[r.length-1];return i.overlapsWith(n)||i.end.equals(n.start)?i.end=O.max(i.end,n.end):r.push(n),r},[])}},x=class u extends re{constructor(e){if(E(e)&&(e=e.value),e instanceof u||typeof e=="string"||typeof e.valueOf()=="string")super(e.valueOf());else{const r=u.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);if(r==null)throw new Error(`unable to find data type for ${e.toString()}`);super(r.valueOf())}}get Array(){const e=u.ARRAY_CONSTRUCTORS.get(this.toString());if(e==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return e}equals(e){return this.valueOf()===e.valueOf()}matches(...e){return e.some(r=>this.equals(r))}toString(e=!1){return e?u.SHORT_STRINGS.get(this.valueOf())??this.valueOf():this.valueOf()}get isVariable(){return this.equals(u.JSON)||this.equals(u.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(u.UUID)}get isInteger(){const e=this.toString();return e.startsWith("int")||e.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const e=u.DENSITIES.get(this.toString());if(e==null)throw new Error(`unable to find density for ${this.valueOf()}`);return e}get isUnsignedInteger(){return this.equals(u.UINT8)||this.equals(u.UINT16)||this.equals(u.UINT32)||this.equals(u.UINT64)}get isSignedInteger(){return this.equals(u.INT8)||this.equals(u.INT16)||this.equals(u.INT32)||this.equals(u.INT64)}canSafelyCastTo(e){return this.equals(e)?!0:!this.isNumeric||!e.isNumeric||this.isVariable||e.isVariable||this.isUnsignedInteger&&e.isSignedInteger?!1:this.isFloat?e.isFloat&&this.density.valueOf()<=e.density.valueOf():this.equals(u.INT32)&&e.equals(u.FLOAT64)||this.equals(u.INT8)&&e.equals(u.FLOAT32)?!0:this.isInteger&&e.isInteger?this.density.valueOf()<=e.density.valueOf()&&this.isUnsignedInteger===e.isUnsignedInteger:!1}canCastTo(e){return this.isNumeric&&e.isNumeric?!0:this.equals(e)}checkArray(e){return e.constructor===this.Array}get usesBigInt(){return u.BIG_INT_TYPES.some(e=>e.equals(this))}static UNKNOWN=new u("unknown");static FLOAT64=new u("float64");static FLOAT32=new u("float32");static INT64=new u("int64");static INT32=new u("int32");static INT16=new u("int16");static INT8=new u("int8");static UINT64=new u("uint64");static UINT32=new u("uint32");static UINT16=new u("uint16");static UINT8=new u("uint8");static BOOLEAN=new u("boolean");static TIMESTAMP=new u("timestamp");static UUID=new u("uuid");static STRING=new u("string");static JSON=new u("json");static ARRAY_CONSTRUCTORS=new Map([[u.UINT8.toString(),Uint8Array],[u.UINT16.toString(),Uint16Array],[u.UINT32.toString(),Uint32Array],[u.UINT64.toString(),BigUint64Array],[u.FLOAT32.toString(),Float32Array],[u.FLOAT64.toString(),Float64Array],[u.INT8.toString(),Int8Array],[u.INT16.toString(),Int16Array],[u.INT32.toString(),Int32Array],[u.INT64.toString(),BigInt64Array],[u.TIMESTAMP.toString(),BigInt64Array],[u.STRING.toString(),Uint8Array],[u.JSON.toString(),Uint8Array],[u.UUID.toString(),Uint8Array]]);static ARRAY_CONSTRUCTOR_DATA_TYPES=new Map([[Uint8Array.name,u.UINT8],[Uint16Array.name,u.UINT16],[Uint32Array.name,u.UINT32],[BigUint64Array.name,u.UINT64],[Float32Array.name,u.FLOAT32],[Float64Array.name,u.FLOAT64],[Int8Array.name,u.INT8],[Int16Array.name,u.INT16],[Int32Array.name,u.INT32],[BigInt64Array.name,u.INT64]]);static DENSITIES=new Map([[u.UINT8.toString(),b.BIT8],[u.UINT16.toString(),b.BIT16],[u.UINT32.toString(),b.BIT32],[u.UINT64.toString(),b.BIT64],[u.FLOAT32.toString(),b.BIT32],[u.FLOAT64.toString(),b.BIT64],[u.INT8.toString(),b.BIT8],[u.INT16.toString(),b.BIT16],[u.INT32.toString(),b.BIT32],[u.INT64.toString(),b.BIT64],[u.TIMESTAMP.toString(),b.BIT64],[u.STRING.toString(),b.UNKNOWN],[u.JSON.toString(),b.UNKNOWN],[u.UUID.toString(),b.BIT128]]);static ALL=[u.UNKNOWN,u.FLOAT64,u.FLOAT32,u.INT64,u.INT32,u.INT16,u.INT8,u.UINT64,u.UINT32,u.UINT16,u.UINT8,u.TIMESTAMP,u.UUID,u.STRING,u.JSON];static SHORT_STRINGS=new Map([[u.UINT8.toString(),"u8"],[u.UINT16.toString(),"u16"],[u.UINT32.toString(),"u32"],[u.UINT64.toString(),"u64"],[u.INT8.toString(),"i8"],[u.INT16.toString(),"i16"],[u.INT32.toString(),"i32"],[u.INT64.toString(),"i64"],[u.FLOAT32.toString(),"f32"],[u.FLOAT64.toString(),"f64"],[u.BOOLEAN.toString(),"bool"],[u.TIMESTAMP.toString(),"ts"],[u.UUID.toString(),"uuid"],[u.STRING.toString(),"str"],[u.JSON.toString(),"json"]]);static BIG_INT_TYPES=[u.INT64,u.UINT64,u.TIMESTAMP];static z=a.z.union([a.z.string().transform(e=>new u(e)),a.z.instanceof(u)])};class y extends re{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}largerThan(e){return E(e)&&(e=e.value),this.valueOf()>e.valueOf()}smallerThan(e){return E(e)&&(e=e.value),this.valueOf()<e.valueOf()}add(e){return E(e)&&(e=e.value),new y(ue(this.valueOf(),e.valueOf()))}sub(e){return E(e)&&(e=e.value),new y(Z(this.valueOf(),e.valueOf()))}mult(e){return new y(B(this.valueOf(),e))}div(e){return new y(Te(this.valueOf(),e))}truncate(e){return new y(Math.trunc(this.valueOf()/new y(e).valueOf())*new y(e).valueOf())}remainder(e){return y.bytes(this.valueOf()%new y(e).valueOf())}get gigabytes(){return this.valueOf()/y.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/y.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/y.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/y.TERABYTE.valueOf()}toString(){const e=this.truncate(y.TERABYTE),r=this.truncate(y.GIGABYTE),n=this.truncate(y.MEGABYTE),i=this.truncate(y.KILOBYTE),s=this.truncate(y.BYTE),o=e,l=r.sub(e),f=n.sub(r),c=i.sub(n),d=s.sub(i);let m="";return o.isZero||(m+=`${o.terabytes}TB `),l.isZero||(m+=`${l.gigabytes}GB `),f.isZero||(m+=`${f.megabytes}MB `),c.isZero||(m+=`${c.kilobytes}KB `),(!d.isZero||m==="")&&(m+=`${d.valueOf()}B`),m.trim()}static bytes(e=1){return new y(e)}static BYTE=new y(1);static kilobytes(e=1){return y.bytes(new y(e).valueOf()*1e3)}static KILOBYTE=y.kilobytes(1);static megabytes(e=1){return y.kilobytes(new y(e).valueOf()*1e3)}static MEGABYTE=y.megabytes(1);static gigabytes(e=1){return y.megabytes(new y(e).valueOf()*1e3)}static GIGABYTE=y.gigabytes(1);static terabytes(e){return y.gigabytes(new y(e).valueOf()*1e3)}static TERABYTE=y.terabytes(1);static ZERO=new y(0);static z=a.z.union([a.z.number().transform(e=>new y(e)),a.z.instanceof(y)]);get isZero(){return this.valueOf()===0}}a.z.object({start:a.z.number(),end:a.z.number()});const Ta=a.z.union([a.z.instanceof(Uint8Array),a.z.instanceof(Uint16Array),a.z.instanceof(Uint32Array),a.z.instanceof(BigUint64Array),a.z.instanceof(Float32Array),a.z.instanceof(Float64Array),a.z.instanceof(Int8Array),a.z.instanceof(Int16Array),a.z.instanceof(Int32Array),a.z.instanceof(BigInt64Array)]),Hr=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof O||t instanceof h||t instanceof Date},xa=(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),Sa="00000000-0000-0000-0000-000000000000",Ia=/^(?:[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;function Na(t){return typeof t=="string"&&Ia.test(t)}const M=[];for(let t=0;t<256;++t)M.push((t+256).toString(16).slice(1));function Xr(t,e=0){return(M[t[e+0]]+M[t[e+1]]+M[t[e+2]]+M[t[e+3]]+"-"+M[t[e+4]]+M[t[e+5]]+"-"+M[t[e+6]]+M[t[e+7]]+"-"+M[t[e+8]]+M[t[e+9]]+"-"+M[t[e+10]]+M[t[e+11]]+M[t[e+12]]+M[t[e+13]]+M[t[e+14]]+M[t[e+15]]).toLowerCase()}function Ma(t,e=0){const r=Xr(t,e);if(!Na(r))throw TypeError("Stringified UUID is invalid");return r}let tt;const za=new Uint8Array(16);function Aa(){if(!tt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tt=crypto.getRandomValues.bind(crypto)}return tt(za)}const Ea=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_t={randomUUID:Ea};function Ua(t,e,r){t=t||{};const n=t.random??t.rng?.()??Aa();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xr(n)}function Ba(t,e,r){return _t.randomUUID&&!t?_t.randomUUID():Ua(t)}const Ca=()=>Ba(),Vt=(t,e)=>Ma(t,e),ja=Sa,Ra=Object.freeze(Object.defineProperty({__proto__:null,ZERO:ja,create:Ca,parse:Vt},Symbol.toStringTag,{value:"Module"})),Y=-1,yt={[Symbol.iterator]:()=>yt,next:()=>({done:!0,value:void 0})},La=a.z.string().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),Da=a.z.union([a.z.null(),a.z.undefined()]).transform(()=>new Uint8Array().buffer),bt=10,Jr=(t,e)=>{if(t==="number"&&!e.isNumeric)throw new Error(`cannot convert series of type ${e.toString()} to number`);if(t==="bigint"&&!e.usesBigInt)throw new Error(`cannot convert series of type ${e.toString()} to bigint`)},Kr="sy_x_telem_series";let Wt=class V{key;discriminator=Kr;dataType;sampleOffset;gl;_data;timeRange=W.ZERO;alignment=0n;alignmentMultiple=1n;cachedMin;cachedMax;writePos=Y;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=a.z.object({timeRange:W.z.optional(),dataType:x.z,alignment:a.z.coerce.bigint().optional(),data:a.z.union([La,Da,a.z.instanceof(ArrayBuffer),a.z.instanceof(Uint8Array)]),glBufferUsage:ua.optional().default("static").optional()});static z=V.crudeZ.transform(e=>new V(e));constructor(e){Pa(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:n,sampleOffset:i=0,glBufferUsage:s="static",alignment:o=0n,alignmentMultiple:l=1n,key:f=Yt(),data:c}=e;if(Qr(c)){const p=c;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;return}const d=Hr(c),m=Array.isArray(c);if(r!=null)this.dataType=new x(r);else{if(c instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(m||d){let p=c;if(!d){if(c.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");p=c[0]}if(typeof p=="string")this.dataType=x.STRING;else if(typeof p=="number")this.dataType=x.FLOAT64;else if(typeof p=="bigint")this.dataType=x.INT64;else if(typeof p=="boolean")this.dataType=x.BOOLEAN;else if(p instanceof O||p instanceof Date||p instanceof O)this.dataType=x.TIMESTAMP;else if(typeof p=="object")this.dataType=x.JSON;else throw new Error(`cannot infer data type of ${typeof p} when constructing a Series from a JS array`)}else this.dataType=new x(c)}if(!m&&!d)this._data=c;else if(m&&c.length===0)this._data=new this.dataType.Array([]).buffer;else{let p=d?[c]:c;const N=p[0];(N instanceof O||N instanceof Date||N instanceof h)&&(p=p.map(z=>new O(z).valueOf())),this.dataType.equals(x.STRING)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`).buffer):this.dataType.equals(x.JSON)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.map(z=>at.encodeString(z)).join(`
|
|
4
|
-
`)}
|
|
5
|
-
`).buffer):this.dataType.usesBigInt&&typeof N=="number"?this._data=new this.dataType.Array(p.map(z=>BigInt(Math.round(z)))).buffer:!this.dataType.usesBigInt&&typeof N=="bigint"?this._data=new this.dataType.Array(p.map(Number)).buffer:this._data=new this.dataType.Array(p).buffer}this.key=f,this.alignment=o,this.alignmentMultiple=l,this.sampleOffset=i??0,this.timeRange=n??W.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:s}}static alloc({capacity:e,dataType:r,...n}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const i=new new x(r).Array(e),s=new V({data:i.buffer,dataType:r,...n});return s.writePos=0,s}get refCount(){return this._refCount}acquire(e){this._refCount++,e!=null&&this.updateGLBuffer(e)}release(){this._refCount--,this.refCount===0&&this.gl.control!=null?this.maybeGarbageCollectGLBuffer(this.gl.control):this.refCount<0&&console.warn("cannot release a series with a negative reference count")}write(e){if(!e.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(e):this.writeFixed(e)}writeVariable(e){if(this.writePos===Y)return 0;const r=this.byteCapacity.valueOf()-this.writePos,n=e.subBytes(0,r);return this.writeToUnderlyingData(n),this.writePos+=n.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=n.length,this.calculateCachedLength()),n.length}writeFixed(e){if(this.writePos===Y)return 0;const r=this.capacity-this.writePos,n=e.sub(0,r);return this.writeToUnderlyingData(n),this.cachedLength=void 0,this.maybeRecomputeMinMax(n),this.writePos+=n.length,n.length}writeToUnderlyingData(e){this.underlyingData.set(e.data,this.writePos)}get buffer(){return typeof this._data=="object"&&"buffer"in this._data?this._data.buffer:this._data}get underlyingData(){return new this.dataType.Array(this._data)}get data(){return this.writePos===Y?this.underlyingData:new this.dataType.Array(this._data,0,this.writePos)}toStrings(){return this.dataType.isVariable?new TextDecoder().decode(this.underlyingData).split(`
|
|
6
|
-
`).slice(0,-1):Array.from(this).map(e=>e.toString())}parseJSON(e){if(!this.dataType.equals(x.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(at.decodeString(r)))}get byteCapacity(){return new y(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===Y?this.byteCapacity:this.dataType.isVariable?new y(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===Y?this.byteCapacity.valueOf()/this.dataType.density.valueOf():this.writePos}calculateCachedLength(){if(!this.dataType.isVariable)throw new Error("cannot calculate length of a non-variable length data type");let e=0;const r=[0];return this.data.forEach((n,i)=>{n===bt&&(e++,r.push(i+1))}),this._cachedIndexes=r,this.cachedLength=e,e}convert(e,r=0){if(this.dataType.equals(e))return this;const n=new e.Array(this.length);for(let i=0;i<this.length;i++)n[i]=xa(this.dataType,e,this.data[i],r);return new V({data:n.buffer,dataType:e,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(x.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMax=e.reduce((r,n)=>r>n?r:n)}else{const e=this.data;this.cachedMax=e.reduce((r,n)=>r>n?r:n)}return this.cachedMax}get max(){return this.calcMax()}calcMax(){if(this.dataType.isVariable)throw new Error("cannot calculate maximum on a variable length data type");return this.writePos===0?-1/0:(this.cachedMax??=this.calcRawMax(),Ce(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(x.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMin=e.reduce((r,n)=>r<n?r:n)}else{const e=this.data;this.cachedMin=e.reduce((r,n)=>r<n?r:n)}return this.cachedMin}get min(){return this.calcMin()}calcMin(){if(this.dataType.isVariable)throw new Error("cannot calculate minimum on a variable length data type");return this.writePos===0?1/0:(this.cachedMin??=this.calcRawMin(),Ce(this.cachedMin,this.sampleOffset))}get bounds(){return w(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(e){if(this.cachedMin!=null){const r=e.cachedMin??e.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=e.cachedMax??e.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(e,r){const n=Number((e-this.alignment)/this.alignmentMultiple);if(n<0||n>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${n}`);return}return this.at(n,r)}at(e,r=!1){if(this.dataType.isVariable)return this.atVariable(e,r??!1);if(this.dataType.equals(x.UUID))return this.atUUID(e,r);e<0&&(e=this.length+e);const n=this.data[e];if(n==null){if(r===!0)throw new Error(`[series] - no value at index ${e}`);return}return Ce(n,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const n=Vt(new Uint8Array(this.buffer,e*this.dataType.density.valueOf()));if(n==null){if(r)throw new Error(`[series] - no value at index ${e}`);return}return n}atVariable(e,r){let n=0,i=0;if(this._cachedIndexes!=null)n=this._cachedIndexes[e],i=this._cachedIndexes[e+1]-1;else{e<0&&(e=this.length+e);for(let o=0;o<this.data.length;o++)if(this.data[o]===bt){if(e===0){i=o;break}n=o+1,e--}if(i===0&&(i=this.data.length),n>=i||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const s=this.data.slice(n,i);return this.dataType.equals(x.STRING)?new TextDecoder().decode(s):Tt(JSON.parse(new TextDecoder().decode(s)))}binarySearch(e){let r=0,n=this.length-1;const i=Ze(e);for(;r<=n;){const s=Math.floor((r+n)/2),o=i(this.at(s,!0),e);if(o===0)return s;o<0?r=s+1:n=s-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(x.FLOAT32)&&!this.dataType.equals(x.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:n,prevBuffer:i}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==i)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==Y){i===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const s=this.dataType.density.size(i).valueOf(),o=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,s,o.buffer),this.gl.prevBuffer=this.writePos}else e.bufferData(e.ARRAY_BUFFER,this.buffer,n==="static"?e.STATIC_DRAW:e.DYNAMIC_DRAW),this.gl.prevBuffer=Y}as(e){return Jr(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:tr(this.alignmentBounds.lower),upper:tr(this.alignmentBounds.upper),multiple:this.alignmentMultiple},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return w(this.alignment,this.alignment+BigInt(this.length)*this.alignmentMultiple)}maybeGarbageCollectGLBuffer(e){this.gl.buffer!=null&&(e.deleteBuffer(this.gl.buffer),this.gl.buffer=null,this.gl.prevBuffer=0,this.gl.control=null)}get glBuffer(){if(this.gl.buffer==null)throw new Error("gl buffer not initialized");return this.gl.prevBuffer!==this.writePos&&console.warn("buffer not updated"),this.gl.buffer}[Symbol.iterator](){if(this.dataType.isVariable){const e=new ka(this);return this.dataType.equals(x.JSON)?new qa(e):e}return this.dataType.equals(x.UUID)?new Za(this):new Fa(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new er(this,e,r??this.length)}subAlignmentIterator(e,r){const n=Math.ceil(Number(e-this.alignment)/Number(this.alignmentMultiple)),i=Math.ceil(Number(r-this.alignment)/Number(this.alignmentMultiple));return new er(this,n,i)}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const n=this.data.subarray(e,r);return new V({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(e)})}sliceSub(e,r,n){if(r<=0&&(n==null||n>=this.length))return this;let i;return e?i=this.data.subarray(r,n):i=this.data.slice(r,n),new V({data:i,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new V({data:this.buffer,dataType:this.dataType,timeRange:W.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:e})}toString(){let e=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)e+=Array.from(this).map(r=>r.toString());else{for(let r=0;r<5;r++)e+=`${this.at(r)?.toString()}`,e+=",";e+="...,";for(let r=-5;r<0;r++)e+=this.at(r)?.toString(),r<-1&&(e+=",")}return e+="])",e}};const Pa=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof Wt?!0:Hr(t),Qr=oa(Kr,Wt);class er{series;end;index;constructor(e,r,n){this.series=e;const i=w(0,e.length+1);this.end=ct(i,n),this.index=ct(i,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}let ka=class{series;index;decoder;constructor(e){if(!e.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=e,this.index=0,this.decoder=new TextDecoder}next(){const e=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==bt;)this.index++;const n=this.index;return e===n?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(e,n))})}},qa=class _r{wrapped;static schema=a.z.record(a.z.string(),a.z.unknown());constructor(e){this.wrapped=e}next(){const e=this.wrapped.next();return e.done===!0?{done:!0,value:void 0}:{done:!1,value:at.decodeString(e.value,_r.schema)}}},Za=class{series;index;data;density;constructor(e){if(!e.dataType.equals(x.UUID))throw new Error("cannot create a UUID series iterator for a non-UUID series");this.series=e,this.index=0,this.data=new Uint8Array(e.buffer),this.density=x.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=Vt(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}},Fa=class{series;index;constructor(e){this.series=e,this.index=0}next(){return this.index>=this.series.length?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}};class Ya{series;constructor(e=[]){if(e.length!==0){const r=e[0].dataType;for(let n=1;n<e.length;n++)if(!e[n].dataType.equals(r))throw new Error("[multi-series] - series must have the same data type")}this.series=e}as(e){return Jr(e,this.dataType),this}get dataType(){return this.series.length===0?x.UNKNOWN:this.series[0].dataType}get timeRange(){return this.series.length===0?W.ZERO:new W(this.series[0].timeRange.start,this.series[this.series.length-1].timeRange.end)}get alignment(){return this.series.length===0?0n:this.series[0].alignment}get alignmentBounds(){return this.series.length===0?w(0n,0n):w(this.series[0].alignmentBounds.lower,this.series[this.series.length-1].alignmentBounds.upper)}push(e){const r=()=>new Error(`cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`),n=e.dataType.equals(this.dataType);if(Qr(e)){if(this.series.length!==0&&!n)throw r();this.series.push(e)}else{if(this.series.length!==0&&e.series.length!==0&&!n)throw r();this.series.push(...e.series)}}get length(){return this.series.reduce((e,r)=>e+r.length,0)}atAlignment(e,r){for(const n of this.series)if(C(n.alignmentBounds,e))return n.atAlignment(e,r);if(r)throw new Error(`[series] - no value at alignment ${e}`)}at(e,r=!1){e<0&&(e=this.length+e);for(const n of this.series){if(e<n.length)return n.at(e,r);e-=n.length}if(r)throw new Error(`[series] - no value at index ${e}`)}subIterator(e,r){return new rt(this,e,r??this.length)}subAlignmentIterator(e,r){if(e>=this.alignmentBounds.upper||r<=this.alignmentBounds.lower)return yt;let n=0;for(let s=0;s<this.series.length;s++){const o=this.series[s];if(e<o.alignment)break;if(e>=o.alignmentBounds.upper)n+=o.length;else if(C(o.alignmentBounds,e)){n+=Math.ceil(Number(e-o.alignment)/Number(o.alignmentMultiple));break}}let i=0;for(let s=0;s<this.series.length;s++){const o=this.series[s];if(r<o.alignment)break;if(r>=o.alignmentBounds.upper)i+=o.length;else if(C(o.alignmentBounds,r)){i+=Math.ceil(Number(r-o.alignment)/Number(o.alignmentMultiple));break}}return new rt(this,n,i)}subAlignmentSpanIterator(e,r){if(e>=this.alignmentBounds.upper)return yt;r=Math.min(r,Number(this.distance(e,this.alignmentBounds.upper)));let n=0;for(let i=0;i<this.series.length;i++){const s=this.series[i];if(e<s.alignment)break;if(e>=s.alignmentBounds.upper)n+=s.length;else if(C(s.alignmentBounds,e)){n+=Number(e-s.alignment);break}}return new rt(this,n,n+r)}updateGLBuffer(e){this.series.forEach(r=>r.updateGLBuffer(e))}get bounds(){return vr(this.series.map(e=>e.bounds))}get byteLength(){return new y(this.series.reduce((e,r)=>e+r.byteLength.valueOf(),0))}get data(){const e=new this.dataType.Array(this.length);let r=0;for(const n of this.series)e.set(n.data,r),r+=n.length;return new this.dataType.Array(e.buffer)}traverseAlignment(e,r){const n=this.series.map(i=>i.alignmentBounds);return Tr(n,e,r)}acquire(e){this.series.forEach(r=>r.acquire(e))}release(){this.series.forEach(e=>e.release())}distance(e,r){const n=this.series.map(i=>i.alignmentBounds);return xr(n,e,r)}parseJSON(e){if(!this.dataType.equals(x.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.series.flatMap(r=>r.parseJSON(e))}[Symbol.iterator](){return this.series.length===0?{next(){return{done:!0,value:void 0}}}:new Va(this.series)}toStrings(){return this.series.flatMap(e=>e.toStrings())}}class Va{series;seriesIndex;internal;constructor(e){this.series=e,this.seriesIndex=0,this.internal=e[0][Symbol.iterator]()}next(){const e=this.internal.next();return e.done===!1?e:this.seriesIndex===this.series.length-1?{done:!0,value:void 0}:(this.internal=this.series[++this.seriesIndex][Symbol.iterator](),this.next())}[Symbol.iterator](){return this}}class rt{series;index;end;constructor(e,r,n){this.series=e,this.end=n,this.index=r}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}[Symbol.iterator](){return this}}const tr=t=>{const e=t>>32n,r=t&0xffffffffn;return{domain:e,sample:r}};a.z.object({key:a.z.string(),value:a.z.string()});const Wa=a.z.record(a.z.union([a.z.number(),a.z.string(),a.z.symbol()]),a.z.unknown()),Gt=t=>Object.entries(t),Ga=(t,e)=>Object.fromEntries(Gt(t).map(([r,n])=>[r,e(n,r)])),Ha=t=>Object.fromEntries(Gt(t).filter(([e,r])=>r!==void 0)),Xa=(t,...e)=>{const r={...t};for(const n of e)delete r[n];return r},Ja=Object.freeze(Object.defineProperty({__proto__:null,entries:Gt,map:Ga,omit:Xa,purgeUndefined:Ha,unknownZ:Wa},Symbol.toStringTag,{value:"Module"})),en=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Ka=en(),tn=["macOS","Windows","Linux"],Qa=["macos","windows","linux"],_a={macos:"macOS",windows:"Windows",linux:"Linux"},eo=a.z.enum(tn).or(a.z.enum(Qa).transform(t=>_a[t])),to=()=>{if(typeof window>"u")return;const t=window.navigator.userAgent.toLowerCase();if(t.includes("mac"))return"macOS";if(t.includes("win"))return"Windows";if(t.includes("linux"))return"Linux"};let nt;const ro=((t={})=>{const{force:e,default:r}=t;return e??nt??(nt=to(),nt??r)}),no=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:tn,RUNTIME:Ka,detect:en,getOS:ro,osZ:eo},Symbol.toStringTag,{value:"Module"})),io=(...t)=>t.map(rn).join(""),rn=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),so=t=>t.endsWith("/")?t.slice(0,-1):t;class je{protocol;host;port;path;constructor({host:e,port:r,protocol:n="",pathPrefix:i=""}){this.protocol=n,this.host=e,this.port=r,this.path=rn(i)}replace(e){return new je({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new je({...this,pathPrefix:io(this.path,e)})}toString(){return so(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new je({host:"unknown",port:0})}const wt=2,$t=3,nn=2,ao=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=le(e);if(r==0)return t;let n;r>=1e3?n=wt:r>=1?n=$t:n=Math.ceil(-Math.log10(r))+nn;const i=10**n;return Math.round(t*i)/i},oo=5,uo=1e-10,lo=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=Math.abs(t);if(r===0)return 0;let n=!1,i=0;if(e!=null){i=le(e);const l=i/r;n=i>0&&l>uo}if(n){let l;i>=1e3?l=wt:i>=1?l=$t:l=Math.ceil(-Math.log10(i))+nn;const f=10**l;return Math.round(t*f)/f}if(r>=1e3){const l=10**wt;return Math.round(t*l)/l}if(r>=1){const l=10**$t;return Math.round(t*l)/l}const s=Math.floor(Math.log10(r)),o=10**(oo-s-1);return Math.round(t*o)/o},co=Object.freeze(Object.defineProperty({__proto__:null,MAX_INT16:ya,MAX_INT32:wa,MAX_INT64:Pe,MAX_INT64_NUMBER:Wr,MAX_INT8:pa,MAX_UINT16:ca,MAX_UINT32:ha,MAX_UINT64:fa,MAX_UINT64_NUMBER:da,MAX_UINT8:la,MIN_INT16:ma,MIN_INT32:ba,MIN_INT64:$a,MIN_INT64_NUMBER:Oa,MIN_INT8:ga,abs:$r,add:ue,closeTo:ci,div:Te,equal:lt,isInteger:Le,max:fi,min:wr,mult:B,roundBySpan:ao,roundToNearestMagnitude:hi,smartRound:lo,sub:Z},Symbol.toStringTag,{value:"Module"}));a.z.object({baseInterval:h.z.optional(),maxRetries:a.z.number().optional(),scale:a.z.number().optional()});const ho=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,ke=a.z.string().regex(ho),ae=a.z.number().min(0).max(255),sn=a.z.number().min(0).max(1),Je=a.z.tuple([ae,ae,ae,sn]),fo=a.z.tuple([ae,ae,ae]),go=a.z.object({rgba255:Je}),po=a.z.number().min(0).max(360),mo=a.z.number().min(0).max(100),yo=a.z.number().min(0).max(100),an=a.z.tuple([po,mo,yo,sn]),Ke=a.z.union([ke,fo,Je,an,go]),Qe=Ke.transform(t=>T(t)),bo=t=>Qe.safeParse(t).success,wo=t=>Je.safeParse(t).success,$o=(t=>{if(t==null)return;const e=Qe.safeParse(t);if(e.success)return un(e.data);if(typeof t=="string")return t;throw e.error}),T=(t,e=1)=>{if(t=Ke.parse(t),typeof t=="string")return Re(t,e);if(Array.isArray(t)){if(t.length<3||t.length>4)throw new Error(`Invalid color: [${t.join(", ")}]`);return t.length===3?[...t,e]:t}return t.rgba255},on=(t,e)=>{if(t==null||e==null)return t==e;const r=T(t),n=T(e);return r.every((i,s)=>i===n[s])},Oo=(t=>{if(t==null)return;const[e,r,n,i]=T(t);return`#${Me(e)}${Me(r)}${Me(n)}${i===1?"":Me(i*255)}`}),un=t=>{const[e,r,n,i]=T(t);return`rgba(${e}, ${r}, ${n}, ${i})`},vo=t=>`rgb(${ln(t)})`,ln=t=>{const[e,r,n]=T(t);return`${e}, ${r}, ${n}`},To=t=>[...Ht(t),ye(t)],Ht=t=>[ge(t)/255,pe(t)/255,me(t)/255],ge=t=>T(t)[0],pe=t=>T(t)[1],me=t=>T(t)[2],ye=t=>T(t)[3],xo=t=>on(Xt,t),So=t=>Co(T(t)),Io=(t,e)=>{const[r,n,i]=T(t);if(e>100)throw new Error(`Color opacity must be between 0 and 100, got ${e}`);return e>1&&(e/=100),[r,n,i,e]},Oe=t=>{const[e,r,n]=Ht(t).map(i=>i<=.03928?i/12.92:((i+.055)/1.055)**2.4);return Number((.2126*e+.7152*r+.0722*n).toFixed(3))},No=t=>{const[e,r,n]=Ht(t);return 1-(Math.max(e,r,n)-Math.min(e,r,n))},Ot=(t,e)=>{const r=T(t),n=T(e),i=Oe(r),s=Oe(n);return(Math.max(i,s)+.5)/(Math.min(i,s)+.5)},Mo=(t,...e)=>{if(e.length===0)throw new Error("[Color.pickByContrast] - must provide at least one color");const r=T(t),[n]=e.sort((i,s)=>Ot(r,s)-Ot(r,i));return T(n)},zo=t=>Oe(t)<.5,Ao=t=>Oe(t)>.5,Re=(t,e=1)=>(t=ke.parse(t),t=Eo(t),[ze(t,0),ze(t,2),ze(t,4),t.length===8?ze(t,6)/255:e]),Xt=[0,0,0,0],Me=t=>Math.floor(t).toString(16).padStart(2,"0"),ze=(t,e)=>parseInt(t.slice(e,e+2),16),Eo=t=>t.startsWith("#")?t.slice(1):t,rr={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00ff00",aqua:"#00ffff",teal:"#008080",navy:"#000080",fuchsia:"#ff00ff",purple:"#800080",orange:"#ffa500",brown:"#a52a2a",tan:"#d2b48c",gold:"#ffd700",indigo:"#4b0082",violet:"#ee82ee",pink:"#ffc0cb",coral:"#ff7f50",salmon:"#fa8072",khaki:"#f0e68c",crimson:"#dc143c",transparent:"transparent"},Uo=t=>{if(!t)return;const e=t.trim().toLowerCase();if(!(e==="transparent"||e==="none")){if(e.startsWith("#")){if(e.length===4){const r=e[1],n=e[2],i=e[3],s=`#${r}${r}${n}${n}${i}${i}`;if(ke.safeParse(s).success)return Re(s)}return(e.length===7||e.length===9)&&ke.safeParse(e).success?Re(e):void 0}if(e.startsWith("rgb")){const r=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);if(r){const[,n,i,s,o]=r;return[parseInt(n),parseInt(i),parseInt(s),o?parseFloat(o):1]}}if(rr[e])return Re(rr[e])}},Bo=t=>{t=an.parse(t);let[e,r,n]=t;const i=t[3];e/=360,r/=100,n/=100;let s,o,l;if(r===0)s=o=l=n;else{const f=n<.5?n*(1+r):n+r-n*r,c=2*n-f;s=it(c,f,e+1/3),o=it(c,f,e),l=it(c,f,e-1/3)}return[Math.round(s*255),Math.round(o*255),Math.round(l*255),i]},it=(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),Co=t=>{t=Je.parse(t);let[e,r,n]=t;const i=t[3];e/=255,r/=255,n/=255;const s=Math.max(e,r,n),o=Math.min(e,r,n);let l,f,c=(s+o)/2;if(s===o)l=f=0;else{const d=s-o;f=c>.5?d/(2-s-o):d/(s+o),s===e?l=(r-n)/d+(r<n?6:0):s===r?l=(n-e)/d+2:l=(e-r)/d+4,l/=6}return l*=360,f*=100,c*=100,[Math.round(l),Math.round(f),Math.round(c),i]},jo=T("#000000"),Ro=T("#ffffff"),cn=a.z.object({key:a.z.string(),color:Ke,position:a.z.number(),switched:a.z.boolean().optional()}),Lo=a.z.array(cn),Do=(t,e)=>{if(t.length===0)return Xt;if(t=t.slice().sort((r,n)=>r.position-n.position),e<=t[0].position)return T(t[0].color);if(e>=t[t.length-1].position)return T(t[t.length-1].color);for(let r=0;r<t.length-1;r++){const n=t[r],i=t[r+1];if(e<n.position||e>i.position)continue;if(e===n.position)return T(n.color);if(e===i.position)return T(i.color);const s=(e-n.position)/(i.position-n.position),o=T(n.color),l=T(i.color),f=Math.round(ge(o)+s*(ge(l)-ge(o))),c=Math.round(pe(o)+s*(pe(l)-pe(o))),d=Math.round(me(o)+s*(me(l)-me(o))),m=ye(o)+s*(ye(l)-ye(o));return T([f,c,d,m])}return T(t[t.length-1].color)},Po=a.z.object({key:a.z.string(),name:a.z.string(),color:Qe}),ko=a.z.object({key:a.z.string(),name:a.z.string(),swatches:a.z.array(Po)}),hn=Object.freeze(Object.defineProperty({__proto__:null,BLACK:jo,WHITE:Ro,ZERO:Xt,aValue:ye,bValue:me,colorZ:Qe,construct:T,contrast:Ot,crudeZ:Ke,cssString:$o,equals:on,fromCSS:Uo,fromGradient:Do,fromHSLA:Bo,gValue:pe,gradientZ:Lo,grayness:No,hex:Oo,hsla:So,isColor:wo,isCrude:bo,isDark:zo,isLight:Ao,isZero:xo,luminance:Oe,paletteZ:ko,pickByContrast:Mo,rValue:ge,rgbCSS:vo,rgbString:ln,rgba1:To,rgbaCSS:un,setAlpha:Io,stopZ:cn},Symbol.toStringTag,{value:"Module"})),fn=a.z.int().min(0).max(255),dn=255,gn=0,qo={lower:gn,upper:dn+1},pn=a.z.object({name:a.z.string(),key:a.z.string()}),ve=t=>a.z.object({subject:pn,resource:t,authority:fn}),Zo=(...t)=>e=>e.filter(r=>{let n=!1;return r.to!=null&&(n=t.includes(r.to.resource)),r.from!=null&&!n&&(n=t.includes(r.from.resource)),n}),mn=t=>a.z.object({from:ve(t),to:a.z.null()}),yn=t=>a.z.object({from:a.z.null(),to:ve(t)}),Fo=t=>a.z.union([mn(t),yn(t),a.z.object({from:ve(t),to:ve(t)})]),Yo=Object.freeze(Object.defineProperty({__proto__:null,ABSOLUTE_AUTHORITY:dn,AUTHORITY_BOUNDS:qo,ZERO_AUTHORITY:gn,acquireZ:yn,authorityZ:fn,filterTransfersByChannelKey:Zo,releaseZ:mn,stateZ:ve,subjectZ:pn,transferZ:Fo},Symbol.toStringTag,{value:"Module"})),Vo=t=>Object.getOwnPropertySymbols(globalThis).includes(t),Wo=(t,e)=>{const r=Symbol.for(t);if(!Vo(r)){const n=e();Object.defineProperty(globalThis,r,{value:n})}return()=>globalThis[r]},bn="sy_x_error",Go=t=>e=>e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type.startsWith(t):e instanceof Error?e.message.startsWith(t):typeof e!="string"?!1:e.startsWith(t),wn=t=>class de extends Error{static discriminator=bn;discriminator=de.discriminator;static TYPE=t;type=de.TYPE;static matches=Go(t);matches=de.matches;constructor(r,n){super(r,n),this.name=de.TYPE}static sub(r){return wn(`${t}.${r}`)}},Ho=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==bn)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},ce="unknown",nr="nil";class Xo{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:nr,data:""};if(Ho(e))for(const r of this.providers){const n=r.encode(e);if(n!=null)return n}if(e instanceof Error)return{type:ce,data:e.message};if(typeof e=="string")return{type:ce,data:e};try{return{type:ce,data:JSON.stringify(e)}}catch{return{type:ce,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===nr)return null;if(e.type===ce)return new ir(e.data);for(const r of this.providers){const n=r.decode(e);if(n!=null)return n}return new ir(e.data)}}Wo("synnax-error-registry",()=>new Xo);class ir extends wn("unknown"){}a.z.object({type:a.z.string(),data:a.z.string()});const Jo=()=>new Promise(t=>setTimeout(t,0)),Ko=a.object({jsonrpc:a.literal("2.0"),method:a.string(),params:a.any().optional(),id:a.union([a.string(),a.number(),a.null()]).optional()}),$n=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number(),a.null()])}),Qo=$n.extend({result:a.json()}),_o=$n.extend({error:a.object({code:a.number().int(),message:a.string().optional(),data:a.json().optional()})}),eu=a.union([Qo,_o]);a.union([Ko,eu]);const tu=a.uuid(),ru=a.object({key:tu,name:a.string().min(1),color:a.string()}),nu=(t,e,r)=>{const n=t.get(e);return n===void 0?(t.set(e,r),r):n},iu=Object.freeze(Object.defineProperty({__proto__:null,getOrSetDefault:nu},Symbol.toStringTag,{value:"Module"})),vt=a.z.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/),su=(t,e)=>{const r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let s=0;s<i;s++){const o=r[s],l=n[s];if(o===void 0)return k;if(l===void 0)return q;const f=/^\d+$/.test(o),c=/^\d+$/.test(l);if(f&&!c)return k;if(!f&&c)return q;if(f&&c){const d=parseInt(o),m=parseInt(l);if(d<m)return k;if(d>m)return q}else{if(o<l)return k;if(o>l)return q}}return ne},Se=((t,e,r={})=>{r.checkMajor??=!0,r.checkMinor??=!0,r.checkPatch??=!0;const n=vt.parse(t),i=vt.parse(e),[s,o]=n.split("-"),[l,f]=i.split("-"),[c,d,m]=s.split(".").map(Number),[p,N,z]=l.split(".").map(Number);if(r.checkMajor){if(c<p)return k;if(c>p)return q}if(r.checkMinor){if(d<N)return k;if(d>N)return q}if(r.checkPatch){if(m<z)return k;if(m>z)return q}return o===void 0&&f===void 0?ne:o===void 0?q:f===void 0?k:su(o,f)}),au=(t,e,r={})=>mr(Se(t,e,r)),On=(t,e,r={})=>pr(Se(t,e,r)),ou=(t,e,r={})=>gr(Se(t,e,r)),uu=({name:t,migrate:e})=>r=>{try{const n=e(r);return console.log(`${t} migrated: ${r.version} -> ${n.version}`),n}catch(n){throw console.log(`${t} failed to migrate from ${r.version}`),console.error(n),n}},lu=({name:t,migrations:e,targetSchema:r,defaultVersion:n,def:i})=>{const s=Object.keys(e).sort(Se).pop();if(s==null)return c=>{if(c.version??=n,c.version!==i.version)return console.log(`${t} version ${c.version} is newer than latest version of ${i.version}.
|
|
7
|
-
Returning default instead.
|
|
8
|
-
`),i;try{return r!=null?r.parse(c):c}catch(d){return console.log(`${t} failed to parse default. Exiting with default`),console.error(d),i}};const o=Object.keys(e).length;let l=!1;const f=c=>{try{if(o===0||On(c.version,s))return console.log(l?`${t} ${c.version} now up to date`:`${t} version ${c.version} is up to date with target version ${i.version}`),c;const d=c.version,m=e[d],p=m(c);return l=!0,f(p)}catch(d){return console.log(`${t} failed to migrate from ${c.version} to ${s}`),console.error(d),i}};return c=>{try{if(c.version==null)if(n!=null)console.log(`${t} version is null. Setting version to default of ${n}`),c.version=n;else return console.log(`${t} version is null and no default version set. Exiting with default`),i;return f(c)}catch(d){return console.log(`${t} failed to parse final result. Exiting with default`),console.error(d),i}}},cu=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:Se,createMigration:uu,migrator:lu,semVerNewer:On,semVerOlder:ou,semVerZ:vt,versionsEqual:au},Symbol.toStringTag,{value:"Module"})),vn=["standard","scientific","engineering"],hu=a.z.enum(vn),fu=(t,e,r)=>{if(Number.isNaN(t))return"NaN";if(t===1/0)return"∞";if(t===-1/0)return"-∞";if(r==="standard")return t.toFixed(e);if(t===0)return e===0?"0ᴇ0":`0.${"0".repeat(e)}ᴇ0`;let n;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}`},du=Object.freeze(Object.defineProperty({__proto__:null,NOTATIONS:vn,notationZ:hu,stringifyNumber:fu},Symbol.toStringTag,{value:"Module"})),gu=t=>Array.isArray(t)?[...t]:typeof t=="object"&&t!==null?{...t}:t,Tn=a.z.enum(["success","info","warning","error","loading","disabled"]),pu=t=>a.z.object({key:a.z.string(),name:a.z.string().default(""),variant:Tn,message:a.z.string(),description:a.z.string().optional(),time:O.z,labels:ar(ru).optional(),details:t??a.z.unknown().optional()}),mu=a.z.object({stack:a.z.string(),error:a.z.instanceof(Error)}),yu=(t,e)=>{if(!(t instanceof Error))throw t;return xn({variant:"error",message:e??t.message,description:e!=null?t.message:void 0,details:{stack:t.stack??"",error:t}})},xn=t=>({key:Yt(),time:O.now(),name:"",...t}),bu=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?t:void 0:e===t?t:void 0},wu=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?void 0:t:e===t?void 0:t},$u=Object.freeze(Object.defineProperty({__proto__:null,create:xn,exceptionDetailsSchema:mu,fromException:yu,keepVariants:bu,removeVariants:wu,statusZ:pu,variantZ:Tn},Symbol.toStringTag,{value:"Module"})),Ou=(t,e)=>{if(!e.has(t))return t;let r=t,n=1,i=t;for(;e.has(i);){const s=i.match(vu);s?(r=i.slice(0,s.index).trim(),n=parseInt(s[1])+1):(r=i,n=1),i=`${r} (${n})`}return i},vu=/\((\d+)\)$/,Tu=(t,e="")=>{if(typeof t=="string")return t;const r=t.length;return r===0?e:r===1?t[0]:r===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[r-1]}`},xu=t=>{const e=t.split(" "),r=new Set,n=e.map(o=>o.charAt(0).toLowerCase()).join("");r.add(n.replace(/-/g,"_")),r.add(n.replace(/(.)(.)/g,"$1_$2").replace(/-/g,"_"));const i=/\d+/g;t.match(i)&&e.forEach((o,l)=>{if(i.test(o)){const f=e.map((c,d)=>d!==l?c.charAt(0).toLowerCase():c).join("");r.add(f.replace(/-/g,"_")),r.add(f.replace(/(.)(.)/g,"$1_$2").replace(/-/g,"_"))}});const s=e.map(o=>(o.length>3?o.substring(0,3):o).toLowerCase());return r.add(s.join("").replace(/-/g,"_")),r.add(s.join("_").replace(/-/g,"_")),Array.from(r).filter(o=>o.length>=2&&o.length<=12&&!/^\d/.test(o))},Su=(t,e)=>t.startsWith(e)?t.slice(e.length):t,Iu=Object.freeze(Object.defineProperty({__proto__:null,createShortIdentifiers:xu,deduplicateFileName:Ou,naturalLanguageJoin:Tu,trimPrefix:Su},Symbol.toStringTag,{value:"Module"})),Nu=new Error("request for lock canceled");var Mu=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(d){try{c(n.next(d))}catch(m){o(m)}}function f(d){try{c(n.throw(d))}catch(m){o(m)}}function c(d){d.done?s(d.value):i(d.value).then(l,f)}c((n=n.apply(t,e||[])).next())})};class zu{constructor(e,r=Nu){this._value=e,this._cancelError=r,this._queue=[],this._weightedWaiters=[]}acquire(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((n,i)=>{const s={resolve:n,reject:i,weight:e,priority:r},o=Sn(this._queue,l=>r<=l.priority);o===-1&&e<=this._value?this._dispatchItem(s):this._queue.splice(o+1,0,s)})}runExclusive(e){return Mu(this,arguments,void 0,function*(r,n=1,i=0){const[s,o]=yield this.acquire(n,i);try{return yield r(s)}finally{o()}})}waitForUnlock(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,r)?Promise.resolve():new Promise(n=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),Au(this._weightedWaiters[e-1],{resolve:n,priority:r})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const r=this._value;this._value-=e.weight,e.resolve([r,this._newReleaser(e.weight)])}_newReleaser(e){let r=!1;return()=>{r||(r=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];r&&(r.forEach(n=>n.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let r=this._value;r>0;r--){const n=this._weightedWaiters[r-1];if(!n)continue;const i=n.findIndex(s=>s.priority<=e);(i===-1?n:n.splice(0,i)).forEach((s=>s.resolve()))}}}_couldLockImmediately(e,r){return(this._queue.length===0||this._queue[0].priority<r)&&e<=this._value}}function Au(t,e){const r=Sn(t,n=>e.priority<=n.priority);t.splice(r+1,0,e)}function Sn(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}var Eu=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(d){try{c(n.next(d))}catch(m){o(m)}}function f(d){try{c(n.throw(d))}catch(m){o(m)}}function c(d){d.done?s(d.value):i(d.value).then(l,f)}c((n=n.apply(t,e||[])).next())})};class Uu{constructor(e){this._semaphore=new zu(1,e)}acquire(){return Eu(this,arguments,void 0,function*(e=0){const[,r]=yield this._semaphore.acquire(1,e);return r})}runExclusive(e,r=0){return this._semaphore.runExclusive(()=>e(),1,r)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}class In extends Uu{constructor(e){super(),Object.assign(this,e)}}const Bu=t=>new In(t),Cu=Object.freeze(Object.defineProperty({__proto__:null,mutex:In,newMutex:Bu},Symbol.toStringTag,{value:"Module"}));function Nn(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Nn(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Mn(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Nn(t))&&(n&&(n+=" "),n+=e);return n}const ju=Mn,ie="-",sr="__",Ae="--",zn=t=>{const e=(...r)=>ju(...r);return e.B=(...r)=>t+ie+r.join(ie),e.E=r=>t+sr+r,e.M=(...r)=>t+Ae+r.join("-"),e.BM=(r,...n)=>e.B(r)+Ae+n.join("-"),e.BE=(r,...n)=>e.B(r)+sr+n.join(ie),e.BEM=(r,n,...i)=>e.BE(r,n)+Ae+i.join(ie),e.var=(...r)=>Ae+t+ie+r.join(ie),e};class Ru{rows=[];columns=[];prefix;constructor(e=""){this.prefix=e}row(e,r,n){const{prefix:i}=this;return this.rows.push({startLabel:i+e,endLabel:i+r,size:n}),this}col(e,r,n){const{prefix:i}=this;return this.columns.push({startLabel:i+e,endLabel:i+r,size:n}),this}build(){return{display:"grid",gridTemplateRows:this.rows.map((e,r)=>{let n=r===0?"[":"";return n+=`${e.startLabel}] ${e.size}${typeof e.size=="number"?"px":""} [${e.endLabel}`,n+=r===this.rows.length-1?"]":"",n}).join(" "),gridTemplateColumns:this.columns.map((e,r)=>{let n=r===0?"[":"";return n+=`${e.startLabel}] ${e.size}${typeof e.size=="number"?"px":""} [${e.endLabel}`,n+=r===this.columns.length-1?"]":"",n}).join(" ")}}}const Lu=(t,e)=>Object.entries(e).forEach(([r,n])=>n!=null&&t.style.setProperty(r,`${n}`)),Du=(t,e)=>Array.from(t.style).forEach(r=>{r.startsWith(e)&&t.style.removeProperty(r)}),Pu=t=>{const e=zn(t);return e.visible=r=>e.M(r?"visible":"hidden"),e.expanded=r=>e.M(r?"expanded":"collapsed"),e.loc=r=>e.M("location",zr.construct(r)),e.disabled=r=>r===!0&&e.M("disabled"),e.align=r=>e.M(r),e.dir=r=>r!=null&&e.M("direction",Ir.construct(r)),e.sharp=r=>r!==!1&&e.M("sharp"),e.rounded=r=>r!==!1&&e.M("rounded"),e.bordered=r=>typeof r=="boolean"?r&&e.M("bordered"):r!=null?e.M(`bordered-${r.toString()}`):e.M("bordered"),e.selected=r=>r&&e.M("selected"),e.altColor=r=>r&&e.M("alt-color"),e.editable=r=>r&&e.M("editable"),e.noSelect=e.M("no-select"),e.applyVars=Lu,e.removeVars=Du,e.newGridBuilder=r=>new Ru(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=>{if(!(r==null||r===!1))return typeof r=="number"?`var(--${t}-gray-l${r})`:hn.cssString(r)},e.levelSizeVar=r=>`var(--${t}-${r}-size)`,e.level=r=>e.M(`level-${r}`),e},ku=Pu("pluto");exports.A=Hn;exports.C=pr;exports.C$1=ra;exports.CSS=ku;exports.E=Xn;exports.F=Qn;exports.H=Ii;exports.Jr=iu;exports.K=zr;exports.Lr=co;exports.M=A;exports.Oe=Ya;exports.P=k;exports.Q=os;exports.Qr=cu;exports.Qt=aa;exports.R=Zr;exports.S=no;exports.T=Jn;exports.T$1=Wt;exports.U=Zn;exports.Vr=Jo;exports.Wr=Yo;exports.Yr=du;exports._=Kn;exports._$1=Ws;exports.a=Bn;exports.a$1=h;exports.c=Vn;exports.c$1=ne;exports.clsx=Mn;exports.d=dr;exports.de=Ta;exports.en=gu;exports.f=Ze;exports.g=b;exports.ge=Ra;exports.h=y;exports.j=mr;exports.jt=js;exports.k=_n;exports.l=Ja;exports.m=W;exports.n=x;exports.newBEM=zn;exports.nn=Cu;exports.p=Ir;exports.p$1=fr;exports.q=q;exports.r=O;exports.rn=Iu;exports.tn=$u;exports.w=gr;exports.y=Gn;exports.zr=hn;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const n = (t, u) => {
|
|
2
|
-
let l = null;
|
|
3
|
-
return u === 0 ? t : (...e) => {
|
|
4
|
-
l !== null && (clearTimeout(l), l = null), l = setTimeout(() => t(...e), u);
|
|
5
|
-
};
|
|
6
|
-
}, r = (t, u) => {
|
|
7
|
-
let l = null;
|
|
8
|
-
return u === 0 ? t : (...e) => {
|
|
9
|
-
l === null && (l = setTimeout(() => {
|
|
10
|
-
t(...e), l = null;
|
|
11
|
-
}, u));
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
n as o,
|
|
16
|
-
r
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=(l,u)=>{let t=null;return u===0?l:(...e)=>{t!==null&&(clearTimeout(t),t=null),t=setTimeout(()=>l(...e),u)}},r=(l,u)=>{let t=null;return u===0?l:(...e)=>{t===null&&(t=setTimeout(()=>{l(...e),t=null},u))}};exports.o=n;exports.r=r;
|
package/dist/deep-7SxmCL0x.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./css-C_YE-5Xa.cjs"),d=r=>r!=null&&typeof r=="object"&&!Array.isArray(r),E=(r,s,o)=>{let e=0,n=r.length;const i=o??a.f(s);for(;e<n;){const t=Math.floor((e+n)/2),l=i(r[t],s);if(l===0)return t;l<0?e=t+1:n=t}return e},T=(r,s,o)=>{const e=E(r,s,o);r.splice(e,0,s)},w=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:a.c$1,GREATER_THAN:a.q,LESS_THAN:a.P,insert:T,isEqualTo:a.j,isGreaterThan:a.C,isGreaterThanEqual:a.F,isLessThan:a.w,newF:a.f,newFieldF:a.A,order:a._,primitiveArrays:a.E,reverseF:a.d,search:E,stringsWithNumbers:a.k,uniqueUnorderedPrimitiveArrays:a.T,unorderedPrimitiveArrays:a.p$1},Symbol.toStringTag,{value:"Module"})),g=".",$=(r,s,o=".")=>{const e=r.split(o);return e.map((n,i)=>{const t=s(n,i,e);return t==null?null:typeof t=="string"?t:t.join(o)}).filter(n=>n!=null).join(o)},p=(r,s)=>{if(!Array.isArray(r))return r[s];const o=r[s];if(o!=null||r.length==0)return o;const e=r[0];if(typeof e=="object"&&"key"in e)return r.find(n=>n.key===s)},S=(r,s)=>{const o=r.split(".");return o.forEach((e,n)=>{s=p(s,e),s!=null&&typeof s=="object"&&"key"in s&&(o[n]=s.key)}),o.join(".")},m=(r,s)=>{const o=r.split(".");return s<0?o[o.length+s]:o[s]},v=(r,s)=>{if(s.length===0)return!0;const o=r.split("."),e=s.split(".");if(e.length>o.length)return!1;for(let n=0;n<e.length;n++){const i=o[n],t=e[n];if(t!=="*"&&i!==t)return!1}return!0},h=r=>{const s=parseInt(r);return isNaN(s)||s<0||s.toString()!==r?null:s},b=(r,s)=>{for(let o=1;o<=s.length;o++){const e=s.slice(0,o).join(".");if(p(r,e)!=null)return[e,o]}return null},k=((r,s,o={optional:!1})=>{const{optional:e,getter:n=p}=o;if(s==="")return r;const i=s.split(".");if(i.length===1){const l=n(r,i[0]);if(l===void 0){if(e)return null;throw new Error(`Path ${s} does not exist. ${i[0]} is undefined`)}return l}const t=(l,f)=>{if(f>=i.length)return l;for(let u=i.length-f;u>=1;u--){const c=i.slice(f,f+u).join("."),y=n(l,c);if(y!==void 0){if(f+u===i.length)return y;if(y===null){if(e)return null;throw new Error(`Path ${s} does not exist. ${c} is null`)}return t(y,f+u)}}if(e)return null;throw new Error(`Path ${s} does not exist. ${i[f]} is undefined`)};return t(r,0)}),P=(r,s)=>k(r,s,{optional:!0})!==null,N=r=>{try{return structuredClone(r)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",r),console.trace(),JSON.parse(JSON.stringify(r))}},_=(r,s,o="")=>{const e={},n=(i,t,l)=>{if(typeof i!=typeof t||i===null||t===null){e[l]=[i,t];return}if(typeof i=="object"&&typeof t=="object")if(Array.isArray(i)&&Array.isArray(t)){if(i.length!==t.length){e[l]=[i,t];return}for(let f=0;f<i.length;f++)n(i[f],t[f],`${l}[${f}]`)}else new Set([...Object.keys(i),...Object.keys(t)]).forEach(f=>{n(i[f],t[f],l!==""?`${l}.${f}`:f)});else i!==t&&(e[l]=[i,t])};return n(r,s,o),e},j=(r,s)=>{const o=Array.isArray(r),e=Array.isArray(s);if(o!==e)return!1;if(o&&e){const t=r,l=s;if(t.length!==l.length)return!1;for(let f=0;f<t.length;f++)if(!j(t[f],l[f]))return!1;return!0}if(r==null||s==null||typeof r!="object"||typeof s!="object")return r===s;if("equals"in r)return r.equals(s);const n=Object.keys(r),i=Object.keys(s);if(n.length!==i.length)return!1;for(const t of n){const l=r[t],f=s[t];if(typeof l=="object"&&typeof f=="object"){if(!j(l,f))return!1}else if(l!==f)return!1}return!0},O=(r,s)=>{if(typeof r!="object"||r==null)return r===s;const o=Object.keys(r),e=Object.keys(s);if(e.length>o.length)return!1;for(const n of e){const i=r[n],t=s[n];if(typeof i=="object"&&typeof t=="object"){if(!O(i,t))return!1}else if(i!==t)return!1}return!0},A=(r,...s)=>{if(s.length===0)return r;const o=s.shift();if(d(r)&&d(o))for(const e in o)try{d(o[e])?(e in r||Object.assign(r,{[e]:{}}),A(r[e],o[e])):Object.assign(r,{[e]:o[e]})}catch(n){throw n instanceof TypeError?new TypeError(`.${e}: ${n.message}`):n}return A(r,...s)},q=(r,s,o)=>{const e=(n,i,t)=>{if(t.def?.type==="union")return t.def.options.reduce((l,f)=>e(l,i,f),n);if(t.def?.type==="intersection"){const l=e(n,i,t.def.left);return e(l,i,t.def.right)}for(const l in i){const f=i[l];let u=t?.shape;if(u!=null)for(;u!=null;){if(u[l]!=null){const c=u[l].safeParse(f);if(c.success){n[l]=c.data;break}}u=u.def?.shape}typeof f=="object"&&!Array.isArray(f)&&f!==null&&t&&t.shape&&t.shape[l]&&(n[l]||={},e(n[l],f,t.shape[l]))}return n};return e({...r},s,o)},x=(r,s)=>{const o=s.split(g);let e=r,n=0;for(;n<o.length;){if(n===o.length-1){const t=o[n];if(Array.isArray(e)){const l=parseInt(t);if(!isNaN(l)&&l<e.length){e.splice(l,1);return}const f=e[0];if(typeof f=="object"&&"key"in f){const u=e.findIndex(c=>c.key===t);if(u!==-1){e.splice(u,1);return}}return}delete e[t];return}let i=!1;if(Array.isArray(e)&&e.length>0){const t=e[0];if(typeof t=="object"&&"key"in t)for(let l=o.length-n;l>=1;l--){const f=o.slice(n,n+l).join(g),u=e.find(c=>c.key===f);if(u!=null){if(n+l===o.length){const c=e.findIndex(y=>y.key===f);c!==-1&&e.splice(c,1);return}e=u,n+=l,i=!0;break}}}if(!i)for(let t=o.length-n;t>=1;t--){const l=o.slice(n,n+t).join(g);if(!Array.isArray(e)&&typeof e=="object"&&e!==null&&l in e){if(n+t===o.length){delete e[l];return}e=e[l],n+=t,i=!0;break}}if(!i){const t=p(e,o[n]);if(t==null)return;e=t,n++}}},I=(r,s,o)=>{const e=s.split(g);let n=r,i=0;for(;i<e.length-1;){const t=b(n,e.slice(i,e.length-1));let l;t!=null?[l,i]=[t[0],i+t[1]]:(l=e[i],i++);let f=p(n,l);if(f==null){const u=e[i];let c=h(u);c==null&&u.startsWith("-")&&h(u.substring(1))!=null&&(c=0),f=c!=null?[]:{},n[l]=f}n=f}try{const t=e[e.length-1];if(Array.isArray(n)){let f=h(t);if(f==null){if(t.startsWith("-")){const u=h(t.substring(1));u!=null&&(f=n.length-u)}if(f==null){if(n.length===0){const c=h(t);if(c!=null){n[c]=o;return}}const u=n[0];if(typeof u=="object"&&"key"in u){const c=n.findIndex(y=>y.key===t);if(c!==-1){n[c]=o;return}}return}}n[f]=o;return}const l=b(n,[t]);if(l!=null){n[l[0]]=o;return}n[t]=o}catch(t){throw console.error("failed to set value",o,"at path",s,"on object",r),t}},F=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:g,copy:N,defaultGetter:p,difference:_,element:m,equal:j,findBestKey:b,get:k,getIndex:h,has:P,override:A,overrideValidItems:q,partialEqual:O,pathsMatch:v,remove:x,resolvePath:S,set:I,transformPath:$},Symbol.toStringTag,{value:"Module"}));exports.T=F;exports.g=$;exports.h=k;exports.q=w;
|
package/dist/deep-szN5DCOH.js
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
import { a as O, T as m, k as T, d as w, E as P, _ as S, A as v, f as A, w as _, F as N, b as q, e as x, P as I, q as F, g as R } from "./css-Cn63X_Yv.js";
|
|
2
|
-
const g = (r) => r != null && typeof r == "object" && !Array.isArray(r), $ = (r, s, o) => {
|
|
3
|
-
let e = 0, n = r.length;
|
|
4
|
-
const i = o ?? A(s);
|
|
5
|
-
for (; e < n; ) {
|
|
6
|
-
const t = Math.floor((e + n) / 2), l = i(r[t], s);
|
|
7
|
-
if (l === 0) return t;
|
|
8
|
-
l < 0 ? e = t + 1 : n = t;
|
|
9
|
-
}
|
|
10
|
-
return e;
|
|
11
|
-
}, G = (r, s, o) => {
|
|
12
|
-
const e = $(r, s, o);
|
|
13
|
-
r.splice(e, 0, s);
|
|
14
|
-
}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15
|
-
__proto__: null,
|
|
16
|
-
EQUAL: R,
|
|
17
|
-
GREATER_THAN: F,
|
|
18
|
-
LESS_THAN: I,
|
|
19
|
-
insert: G,
|
|
20
|
-
isEqualTo: x,
|
|
21
|
-
isGreaterThan: q,
|
|
22
|
-
isGreaterThanEqual: N,
|
|
23
|
-
isLessThan: _,
|
|
24
|
-
newF: A,
|
|
25
|
-
newFieldF: v,
|
|
26
|
-
order: S,
|
|
27
|
-
primitiveArrays: P,
|
|
28
|
-
reverseF: w,
|
|
29
|
-
search: $,
|
|
30
|
-
stringsWithNumbers: T,
|
|
31
|
-
uniqueUnorderedPrimitiveArrays: m,
|
|
32
|
-
unorderedPrimitiveArrays: O
|
|
33
|
-
}, Symbol.toStringTag, { value: "Module" })), p = ".", J = (r, s, o = ".") => {
|
|
34
|
-
const e = r.split(o);
|
|
35
|
-
return e.map((n, i) => {
|
|
36
|
-
const t = s(n, i, e);
|
|
37
|
-
return t == null ? null : typeof t == "string" ? t : t.join(o);
|
|
38
|
-
}).filter((n) => n != null).join(o);
|
|
39
|
-
}, h = (r, s) => {
|
|
40
|
-
if (!Array.isArray(r)) return r[s];
|
|
41
|
-
const o = r[s];
|
|
42
|
-
if (o != null || r.length == 0) return o;
|
|
43
|
-
const e = r[0];
|
|
44
|
-
if (typeof e == "object" && "key" in e)
|
|
45
|
-
return r.find((n) => n.key === s);
|
|
46
|
-
}, L = (r, s) => {
|
|
47
|
-
const o = r.split(".");
|
|
48
|
-
return o.forEach((e, n) => {
|
|
49
|
-
s = h(s, e), s != null && typeof s == "object" && "key" in s && (o[n] = s.key);
|
|
50
|
-
}), o.join(".");
|
|
51
|
-
}, M = (r, s) => {
|
|
52
|
-
const o = r.split(".");
|
|
53
|
-
return s < 0 ? o[o.length + s] : o[s];
|
|
54
|
-
}, W = (r, s) => {
|
|
55
|
-
if (s.length === 0) return !0;
|
|
56
|
-
const o = r.split("."), e = s.split(".");
|
|
57
|
-
if (e.length > o.length) return !1;
|
|
58
|
-
for (let n = 0; n < e.length; n++) {
|
|
59
|
-
const i = o[n], t = e[n];
|
|
60
|
-
if (t !== "*" && i !== t)
|
|
61
|
-
return !1;
|
|
62
|
-
}
|
|
63
|
-
return !0;
|
|
64
|
-
}, y = (r) => {
|
|
65
|
-
const s = parseInt(r);
|
|
66
|
-
return isNaN(s) || s < 0 || s.toString() !== r ? null : s;
|
|
67
|
-
}, d = (r, s) => {
|
|
68
|
-
for (let o = 1; o <= s.length; o++) {
|
|
69
|
-
const e = s.slice(0, o).join(".");
|
|
70
|
-
if (h(r, e) != null) return [e, o];
|
|
71
|
-
}
|
|
72
|
-
return null;
|
|
73
|
-
}, k = ((r, s, o = { optional: !1 }) => {
|
|
74
|
-
const { optional: e, getter: n = h } = o;
|
|
75
|
-
if (s === "") return r;
|
|
76
|
-
const i = s.split(".");
|
|
77
|
-
if (i.length === 1) {
|
|
78
|
-
const l = n(r, i[0]);
|
|
79
|
-
if (l === void 0) {
|
|
80
|
-
if (e) return null;
|
|
81
|
-
throw new Error(`Path ${s} does not exist. ${i[0]} is undefined`);
|
|
82
|
-
}
|
|
83
|
-
return l;
|
|
84
|
-
}
|
|
85
|
-
const t = (l, f) => {
|
|
86
|
-
if (f >= i.length) return l;
|
|
87
|
-
for (let u = i.length - f; u >= 1; u--) {
|
|
88
|
-
const a = i.slice(f, f + u).join("."), c = n(l, a);
|
|
89
|
-
if (c !== void 0) {
|
|
90
|
-
if (f + u === i.length) return c;
|
|
91
|
-
if (c === null) {
|
|
92
|
-
if (e) return null;
|
|
93
|
-
throw new Error(`Path ${s} does not exist. ${a} is null`);
|
|
94
|
-
}
|
|
95
|
-
return t(c, f + u);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (e) return null;
|
|
99
|
-
throw new Error(`Path ${s} does not exist. ${i[f]} is undefined`);
|
|
100
|
-
};
|
|
101
|
-
return t(r, 0);
|
|
102
|
-
}), z = (r, s) => k(r, s, { optional: !0 }) !== null, C = (r) => {
|
|
103
|
-
try {
|
|
104
|
-
return structuredClone(r);
|
|
105
|
-
} catch {
|
|
106
|
-
return console.warn(
|
|
107
|
-
"Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",
|
|
108
|
-
r
|
|
109
|
-
), console.trace(), JSON.parse(JSON.stringify(r));
|
|
110
|
-
}
|
|
111
|
-
}, H = (r, s, o = "") => {
|
|
112
|
-
const e = {}, n = (i, t, l) => {
|
|
113
|
-
if (typeof i != typeof t || i === null || t === null) {
|
|
114
|
-
e[l] = [i, t];
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (typeof i == "object" && typeof t == "object")
|
|
118
|
-
if (Array.isArray(i) && Array.isArray(t)) {
|
|
119
|
-
if (i.length !== t.length) {
|
|
120
|
-
e[l] = [i, t];
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
for (let f = 0; f < i.length; f++) n(i[f], t[f], `${l}[${f}]`);
|
|
124
|
-
} else
|
|
125
|
-
(/* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(t)])).forEach((f) => {
|
|
126
|
-
n(
|
|
127
|
-
i[f],
|
|
128
|
-
t[f],
|
|
129
|
-
l !== "" ? `${l}.${f}` : f
|
|
130
|
-
);
|
|
131
|
-
});
|
|
132
|
-
else i !== t && (e[l] = [i, t]);
|
|
133
|
-
};
|
|
134
|
-
return n(r, s, o), e;
|
|
135
|
-
}, b = (r, s) => {
|
|
136
|
-
const o = Array.isArray(r), e = Array.isArray(s);
|
|
137
|
-
if (o !== e) return !1;
|
|
138
|
-
if (o && e) {
|
|
139
|
-
const t = r, l = s;
|
|
140
|
-
if (t.length !== l.length) return !1;
|
|
141
|
-
for (let f = 0; f < t.length; f++) if (!b(t[f], l[f])) return !1;
|
|
142
|
-
return !0;
|
|
143
|
-
}
|
|
144
|
-
if (r == null || s == null || typeof r != "object" || typeof s != "object")
|
|
145
|
-
return r === s;
|
|
146
|
-
if ("equals" in r) return r.equals(s);
|
|
147
|
-
const n = Object.keys(r), i = Object.keys(s);
|
|
148
|
-
if (n.length !== i.length) return !1;
|
|
149
|
-
for (const t of n) {
|
|
150
|
-
const l = r[t], f = s[t];
|
|
151
|
-
if (typeof l == "object" && typeof f == "object") {
|
|
152
|
-
if (!b(l, f)) return !1;
|
|
153
|
-
} else if (l !== f) return !1;
|
|
154
|
-
}
|
|
155
|
-
return !0;
|
|
156
|
-
}, E = (r, s) => {
|
|
157
|
-
if (typeof r != "object" || r == null) return r === s;
|
|
158
|
-
const o = Object.keys(r), e = Object.keys(s);
|
|
159
|
-
if (e.length > o.length) return !1;
|
|
160
|
-
for (const n of e) {
|
|
161
|
-
const i = r[n], t = s[n];
|
|
162
|
-
if (typeof i == "object" && typeof t == "object") {
|
|
163
|
-
if (!E(i, t)) return !1;
|
|
164
|
-
} else if (i !== t) return !1;
|
|
165
|
-
}
|
|
166
|
-
return !0;
|
|
167
|
-
}, j = (r, ...s) => {
|
|
168
|
-
if (s.length === 0) return r;
|
|
169
|
-
const o = s.shift();
|
|
170
|
-
if (g(r) && g(o))
|
|
171
|
-
for (const e in o)
|
|
172
|
-
try {
|
|
173
|
-
g(o[e]) ? (e in r || Object.assign(r, { [e]: {} }), j(r[e], o[e])) : Object.assign(r, { [e]: o[e] });
|
|
174
|
-
} catch (n) {
|
|
175
|
-
throw n instanceof TypeError ? new TypeError(`.${e}: ${n.message}`) : n;
|
|
176
|
-
}
|
|
177
|
-
return j(r, ...s);
|
|
178
|
-
}, U = (r, s, o) => {
|
|
179
|
-
const e = (n, i, t) => {
|
|
180
|
-
if (t.def?.type === "union")
|
|
181
|
-
return t.def.options.reduce(
|
|
182
|
-
(l, f) => e(l, i, f),
|
|
183
|
-
n
|
|
184
|
-
);
|
|
185
|
-
if (t.def?.type === "intersection") {
|
|
186
|
-
const l = e(n, i, t.def.left);
|
|
187
|
-
return e(l, i, t.def.right);
|
|
188
|
-
}
|
|
189
|
-
for (const l in i) {
|
|
190
|
-
const f = i[l];
|
|
191
|
-
let u = t?.shape;
|
|
192
|
-
if (u != null)
|
|
193
|
-
for (; u != null; ) {
|
|
194
|
-
if (u[l] != null) {
|
|
195
|
-
const a = u[l].safeParse(f);
|
|
196
|
-
if (a.success) {
|
|
197
|
-
n[l] = a.data;
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
u = u.def?.shape;
|
|
202
|
-
}
|
|
203
|
-
typeof f == "object" && !Array.isArray(f) && f !== null && t && t.shape && t.shape[l] && (n[l] ||= {}, e(n[l], f, t.shape[l]));
|
|
204
|
-
}
|
|
205
|
-
return n;
|
|
206
|
-
};
|
|
207
|
-
return e({ ...r }, s, o);
|
|
208
|
-
}, B = (r, s) => {
|
|
209
|
-
const o = s.split(p);
|
|
210
|
-
let e = r, n = 0;
|
|
211
|
-
for (; n < o.length; ) {
|
|
212
|
-
if (n === o.length - 1) {
|
|
213
|
-
const t = o[n];
|
|
214
|
-
if (Array.isArray(e)) {
|
|
215
|
-
const l = parseInt(t);
|
|
216
|
-
if (!isNaN(l) && l < e.length) {
|
|
217
|
-
e.splice(l, 1);
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
const f = e[0];
|
|
221
|
-
if (typeof f == "object" && "key" in f) {
|
|
222
|
-
const u = e.findIndex((a) => a.key === t);
|
|
223
|
-
if (u !== -1) {
|
|
224
|
-
e.splice(u, 1);
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
delete e[t];
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
let i = !1;
|
|
234
|
-
if (Array.isArray(e) && e.length > 0) {
|
|
235
|
-
const t = e[0];
|
|
236
|
-
if (typeof t == "object" && "key" in t)
|
|
237
|
-
for (let l = o.length - n; l >= 1; l--) {
|
|
238
|
-
const f = o.slice(n, n + l).join(p), u = e.find((a) => a.key === f);
|
|
239
|
-
if (u != null) {
|
|
240
|
-
if (n + l === o.length) {
|
|
241
|
-
const a = e.findIndex((c) => c.key === f);
|
|
242
|
-
a !== -1 && e.splice(a, 1);
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
e = u, n += l, i = !0;
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
if (!i)
|
|
251
|
-
for (let t = o.length - n; t >= 1; t--) {
|
|
252
|
-
const l = o.slice(n, n + t).join(p);
|
|
253
|
-
if (!Array.isArray(e) && typeof e == "object" && e !== null && l in e) {
|
|
254
|
-
if (n + t === o.length) {
|
|
255
|
-
delete e[l];
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
e = e[l], n += t, i = !0;
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (!i) {
|
|
263
|
-
const t = h(e, o[n]);
|
|
264
|
-
if (t == null) return;
|
|
265
|
-
e = t, n++;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}, K = (r, s, o) => {
|
|
269
|
-
const e = s.split(p);
|
|
270
|
-
let n = r, i = 0;
|
|
271
|
-
for (; i < e.length - 1; ) {
|
|
272
|
-
const t = d(n, e.slice(i, e.length - 1));
|
|
273
|
-
let l;
|
|
274
|
-
t != null ? [l, i] = [t[0], i + t[1]] : (l = e[i], i++);
|
|
275
|
-
let f = h(n, l);
|
|
276
|
-
if (f == null) {
|
|
277
|
-
const u = e[i];
|
|
278
|
-
let a = y(u);
|
|
279
|
-
a == null && u.startsWith("-") && y(u.substring(1)) != null && (a = 0), f = a != null ? [] : {}, n[l] = f;
|
|
280
|
-
}
|
|
281
|
-
n = f;
|
|
282
|
-
}
|
|
283
|
-
try {
|
|
284
|
-
const t = e[e.length - 1];
|
|
285
|
-
if (Array.isArray(n)) {
|
|
286
|
-
let f = y(t);
|
|
287
|
-
if (f == null) {
|
|
288
|
-
if (t.startsWith("-")) {
|
|
289
|
-
const u = y(t.substring(1));
|
|
290
|
-
u != null && (f = n.length - u);
|
|
291
|
-
}
|
|
292
|
-
if (f == null) {
|
|
293
|
-
if (n.length === 0) {
|
|
294
|
-
const a = y(t);
|
|
295
|
-
if (a != null) {
|
|
296
|
-
n[a] = o;
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
const u = n[0];
|
|
301
|
-
if (typeof u == "object" && "key" in u) {
|
|
302
|
-
const a = n.findIndex((c) => c.key === t);
|
|
303
|
-
if (a !== -1) {
|
|
304
|
-
n[a] = o;
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
n[f] = o;
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
const l = d(n, [t]);
|
|
315
|
-
if (l != null) {
|
|
316
|
-
n[l[0]] = o;
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
n[t] = o;
|
|
320
|
-
} catch (t) {
|
|
321
|
-
throw console.error("failed to set value", o, "at path", s, "on object", r), t;
|
|
322
|
-
}
|
|
323
|
-
}, D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
324
|
-
__proto__: null,
|
|
325
|
-
SEPARATOR: p,
|
|
326
|
-
copy: C,
|
|
327
|
-
defaultGetter: h,
|
|
328
|
-
difference: H,
|
|
329
|
-
element: M,
|
|
330
|
-
equal: b,
|
|
331
|
-
findBestKey: d,
|
|
332
|
-
get: k,
|
|
333
|
-
getIndex: y,
|
|
334
|
-
has: z,
|
|
335
|
-
override: j,
|
|
336
|
-
overrideValidItems: U,
|
|
337
|
-
partialEqual: E,
|
|
338
|
-
pathsMatch: W,
|
|
339
|
-
remove: B,
|
|
340
|
-
resolvePath: L,
|
|
341
|
-
set: K,
|
|
342
|
-
transformPath: J
|
|
343
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
344
|
-
export {
|
|
345
|
-
D as T,
|
|
346
|
-
J as g,
|
|
347
|
-
k as h,
|
|
348
|
-
V as q
|
|
349
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./css-C_YE-5Xa.cjs");let e=null;const u=()=>(e??=document.createElement("canvas"),e),c=(t,a,n)=>{if(i.S.RUNTIME==="node")return{width:0,height:0};n??=u().getContext("2d"),n.font=a;const o=n.measureText(t);return s(o)},s=t=>({width:Math.trunc(Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight)),height:Math.trunc(Math.abs(t.actualBoundingBoxAscent)+Math.abs(t.actualBoundingBoxDescent))});exports.dimensions=c;exports.dimensionsFromMetrics=s;
|