@synnaxlabs/pluto 0.46.7 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animated-Bq6z2XkH.cjs +1 -0
- package/dist/Animated-CEx4LoLs.js +28 -0
- package/dist/Animated-CUFx-eAB.js +356 -0
- package/dist/Animated-NfnNvlbz.cjs +1 -0
- package/dist/Box-BvqALodh.cjs +1 -0
- package/dist/Box-D5Qv__kr.js +95 -0
- package/dist/Button-BMeq9Z2I.cjs +1 -0
- package/dist/Button-CMRdj9Ti.js +305 -0
- package/dist/Dialog-Bi1Sf3oc.js +58 -0
- package/dist/Dialog-BnPvG5WQ.cjs +1 -0
- package/dist/Editable-BXFY3-UW.cjs +1 -0
- package/dist/Editable-CxgdRDPb.js +193 -0
- package/dist/Haul-2Xa_nMgc.cjs +1 -0
- package/dist/Haul-BuI0PZpo.js +128 -0
- package/dist/Items-CHAbP2ZL.cjs +4 -0
- package/dist/Items-Cmc6otoS.js +777 -0
- package/dist/Menu-BImhHf24.cjs +1 -0
- package/dist/Menu-CQ_GMgB9.js +156 -0
- package/dist/Provider-BV7nN39a.cjs +5 -0
- package/dist/Provider-D0P_lzCo.js +434 -0
- package/dist/Tags-6IUFBvU-.js +604 -0
- package/dist/Tags-DtnStTuF.cjs +1 -0
- package/dist/Text-BnUGzpJq.js +1580 -0
- package/dist/Text-DY08sSZe.cjs +1 -0
- package/dist/{Video-CBAgqKPg.js → Video-CITi2j07.js} +1 -1
- package/dist/{Video-DqumxMbz.cjs → Video-VlT7jSYk.cjs} +1 -1
- package/dist/_commonjsHelpers-BH3jXuIh.cjs +1 -0
- package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
- 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-BYwooBtA.js → css-D6ZBcSwh.js} +800 -799
- package/dist/css-HnNQMUzV.cjs +8 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/debounce-CW9Q-DsR.js +17 -0
- package/dist/debounce-heEWeOqL.cjs +1 -0
- package/dist/deep-DRVLw7iw.js +349 -0
- package/dist/deep-DtdcJG4q.cjs +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dimensions-BFCMI7yN.js +19 -0
- package/dist/dimensions-CGLhBwVq.cjs +1 -0
- package/dist/eraser-Dm5Du4PL.cjs +11 -0
- package/dist/eraser-DvzR9kLf.js +955 -0
- package/dist/eslint.config.d.ts +3 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +70 -67
- package/dist/external-6RyUkYAB.js +31 -0
- package/dist/external-6vmyay3h.js +46 -0
- package/dist/external-BSjAne2q.js +88 -0
- package/dist/external-BTlfU938.js +29 -0
- package/dist/external-BcZE443U.cjs +1 -0
- package/dist/external-BhOvtmPt.js +24 -0
- package/dist/external-Bo9Dyf8v.js +80 -0
- package/dist/external-BrQU-ZN8.cjs +1 -0
- package/dist/external-CAcL3DJP.js +130 -0
- package/dist/external-CMBnwYR4.cjs +1 -0
- package/dist/external-CSntN1is.cjs +1 -0
- package/dist/external-CTrkvlmd.cjs +1 -0
- package/dist/external-CTsR6bs9.cjs +46 -0
- package/dist/external-Clec0nDH.cjs +1 -0
- package/dist/external-CtiE4JLk.js +388 -0
- package/dist/external-D7EEjQaR.js +44 -0
- package/dist/external-DDzR-j7b.cjs +1 -0
- package/dist/{main-CEC8k4uE.js → external-DGNBXSAj.js} +16962 -22990
- package/dist/{external-CnSq_bSU.js → external-Daiy-vZ3.js} +29 -19
- package/dist/external-Ddn3rc_Q.cjs +85 -0
- package/dist/external-Dl0l3iHN.cjs +1 -0
- package/dist/external-Eaj0hgzm.cjs +1 -0
- package/dist/external-OLyg-4Ab.cjs +1 -0
- package/dist/{external-CafWN471.js → external-OzDazbiJ.js} +108 -97
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-CVUEOEMw.js → fontString-CGd4NYXa.js} +11 -10
- package/dist/fontString-yPlq8smc.cjs +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-Bvv-S6WC.js +74 -0
- package/dist/hooks-CoF3Fkrn.cjs +1 -0
- package/dist/index.cjs +16 -16
- package/dist/index.js +11182 -10542
- 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-CKYgKu3z.js → provider-C8In649C.js} +4955 -8152
- package/dist/provider-lNhTlIWj.cjs +72 -0
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/arc/external.d.ts +1 -1
- package/dist/src/arc/external.d.ts.map +1 -1
- package/dist/src/arc/functions/Base.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/Constant.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/external.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/index.d.ts.map +1 -0
- package/dist/src/arc/functions/external.d.ts.map +1 -0
- package/dist/src/arc/functions/index.d.ts.map +1 -0
- package/dist/src/arc/functions/operator/Operator.d.ts.map +1 -0
- package/dist/src/arc/functions/operator/external.d.ts.map +1 -0
- package/dist/src/arc/functions/operator/index.d.ts.map +1 -0
- package/dist/src/arc/functions/read/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/read/Read.d.ts.map +1 -0
- package/dist/src/arc/functions/read/external.d.ts.map +1 -0
- package/dist/src/arc/functions/read/index.d.ts.map +1 -0
- package/dist/src/arc/functions/registry.d.ts.map +1 -0
- package/dist/src/arc/functions/select/Select.d.ts.map +1 -0
- package/dist/src/arc/functions/select/external.d.ts.map +1 -0
- package/dist/src/arc/functions/select/index.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/Sink.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/external.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/index.d.ts.map +1 -0
- package/dist/src/arc/functions/source/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/source/Source.d.ts.map +1 -0
- package/dist/src/arc/functions/source/external.d.ts.map +1 -0
- package/dist/src/arc/functions/source/index.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/StableFor.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/external.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/index.d.ts.map +1 -0
- package/dist/src/arc/functions/status/Change.d.ts.map +1 -0
- package/dist/src/arc/functions/status/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/status/external.d.ts.map +1 -0
- package/dist/src/arc/functions/status/index.d.ts.map +1 -0
- package/dist/src/arc/functions/types/index.d.ts.map +1 -0
- package/dist/src/arc/functions/types/spec.d.ts.map +1 -0
- package/dist/src/arc/handle/Core.d.ts.map +1 -1
- package/dist/src/arc/handle/Sink.d.ts.map +1 -1
- package/dist/src/arc/handle/Source.d.ts.map +1 -1
- package/dist/src/arc/handle/external.d.ts.map +1 -1
- package/dist/src/arc/handle/index.d.ts.map +1 -1
- package/dist/src/arc/queries.d.ts +6 -3
- package/dist/src/arc/queries.d.ts.map +1 -1
- package/dist/src/arc/queries.spec.d.ts +2 -0
- package/dist/src/arc/queries.spec.d.ts.map +1 -0
- package/dist/src/button/Button.d.ts +1 -1
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/channel/AliasInput.d.ts +0 -1
- package/dist/src/channel/AliasInput.d.ts.map +1 -1
- package/dist/src/channel/CreateCalculatedIcon.d.ts +3 -0
- package/dist/src/channel/CreateCalculatedIcon.d.ts.map +1 -0
- package/dist/src/channel/LinePlot.d.ts +1 -3
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/channel/external.d.ts +1 -0
- package/dist/src/channel/external.d.ts.map +1 -1
- package/dist/src/channel/queries.d.ts +77 -5
- package/dist/src/channel/queries.d.ts.map +1 -1
- package/dist/src/component/SelectSize.d.ts.map +1 -1
- package/dist/src/css/css.d.ts +1 -2
- package/dist/src/css/css.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +1 -2
- package/dist/src/flex/Box.d.ts.map +1 -1
- package/dist/src/flex/index.d.ts +1 -1
- package/dist/src/flex/index.d.ts.map +1 -1
- package/dist/src/flux/Provider.d.ts.map +1 -1
- package/dist/src/flux/aether/provider.d.ts +1 -1
- package/dist/src/flux/aether/provider.d.ts.map +1 -1
- package/dist/src/flux/core/client.d.ts.map +1 -1
- package/dist/src/flux/core/external.d.ts.map +1 -1
- package/dist/src/flux/core/index.d.ts.map +1 -1
- package/dist/src/flux/list.d.ts +5 -1
- package/dist/src/flux/list.d.ts.map +1 -1
- package/dist/src/group/index.d.ts.map +1 -1
- package/dist/src/hardware/device/Select.d.ts +0 -1
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/hardware/device/queries.d.ts +6 -6
- package/dist/src/hardware/rack/Select.d.ts +0 -1
- package/dist/src/hardware/rack/Select.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Item.d.ts +2 -2
- package/dist/src/input/Item.d.ts.map +1 -1
- package/dist/src/log/aether/Log.d.ts.map +1 -1
- package/dist/src/menu/ContextMenu.d.ts +0 -3
- package/dist/src/menu/ContextMenu.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/menu/types.d.ts +4 -0
- package/dist/src/menu/types.d.ts.map +1 -0
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Forms.d.ts +1 -0
- package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Primitives.d.ts +11 -2
- package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Symbols.d.ts +7 -0
- package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
- package/dist/src/schematic/symbol/registry.d.ts +2 -1
- package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +0 -1
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts +5 -6
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/MultipleTrigger.d.ts +0 -1
- package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
- package/dist/src/select/SearchInput.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts +1 -2
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/select/Static.d.ts +0 -1
- package/dist/src/select/Static.d.ts.map +1 -1
- package/dist/src/select/external.d.ts +1 -0
- package/dist/src/select/external.d.ts.map +1 -1
- package/dist/src/select/flex/Alignment.d.ts +7 -0
- package/dist/src/select/flex/Alignment.d.ts.map +1 -0
- package/dist/src/select/flex/index.d.ts +2 -0
- package/dist/src/select/flex/index.d.ts.map +1 -0
- package/dist/src/select/text/Level.d.ts.map +1 -1
- package/dist/src/select/text/Weight.d.ts.map +1 -1
- package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
- package/dist/src/status/aether/external.d.ts.map +1 -1
- package/dist/src/status/core/external.d.ts +0 -1
- package/dist/src/status/core/external.d.ts.map +1 -1
- package/dist/src/status/core/index.d.ts.map +1 -1
- package/dist/src/status/external.d.ts +1 -0
- package/dist/src/status/external.d.ts.map +1 -1
- package/dist/src/status/index.d.ts.map +1 -1
- package/dist/src/status/queries.d.ts +5 -1
- package/dist/src/status/queries.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/telem/SelectDataType.d.ts.map +1 -1
- package/dist/src/telem/aether/context.d.ts +1 -2
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts +2 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +9 -0
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/client/reader.d.ts +1 -1
- package/dist/src/telem/client/reader.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +0 -1
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/theming/Provider.d.ts +0 -2
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/tooltip/Config.d.ts.map +1 -1
- package/dist/src/tree/Context.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/input/aether/index.d.ts +2 -0
- package/dist/src/vis/input/aether/index.d.ts.map +1 -0
- package/dist/src/vis/input/aether/input.d.ts +40 -0
- package/dist/src/vis/input/aether/input.d.ts.map +1 -0
- package/dist/src/vis/input/index.d.ts +2 -0
- package/dist/src/vis/input/index.d.ts.map +1 -0
- package/dist/src/vis/input/use.d.ts +9 -0
- package/dist/src/vis/input/use.d.ts.map +1 -0
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +1 -2
- package/dist/src/vis/value/aether/value.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/theme.css +11 -0
- 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-BNX_Jj6k.js +80 -0
- package/dist/types-D-yz1qsT.cjs +1 -0
- package/dist/{units-CeCcz4O4.js → units-BqIfn6VX.js} +1 -1
- package/dist/units-DCifOxd9.cjs +1 -0
- package/dist/useStaticData-BTwIe0Il.cjs +1 -0
- package/dist/useStaticData-p8sk2VCJ.js +1051 -0
- package/dist/value-B3LTg1lE.cjs +53 -0
- package/dist/value-ChGMEPP3.js +6508 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +8 -8
- package/dist/Toggle-BSJnQkJM.js +0 -26
- package/dist/Toggle-C0DIo816.cjs +0 -1
- package/dist/css-B0VZnJIa.cjs +0 -8
- package/dist/external-B0_MIms2.js +0 -78
- package/dist/external-B1ETpyFM.js +0 -89
- package/dist/external-B3WxrVX0.js +0 -30
- package/dist/external-BP7GC2X2.cjs +0 -1
- package/dist/external-Bf8170BC.js +0 -380
- package/dist/external-BgNRw5Al.js +0 -23
- package/dist/external-BgSmm_d3.js +0 -84
- package/dist/external-BmxkwvZQ.cjs +0 -1
- package/dist/external-BoVr9B-m.cjs +0 -1
- package/dist/external-BrDpLk_U.js +0 -42
- package/dist/external-CAiETio2.js +0 -10
- package/dist/external-CQpqJGka.cjs +0 -1
- package/dist/external-CmmZWsrB.cjs +0 -1
- package/dist/external-Cutp76YR.cjs +0 -1
- package/dist/external-Cux9mC64.js +0 -69
- package/dist/external-D8EUzT1C.cjs +0 -1
- package/dist/external-DEYDSJ_G.cjs +0 -1
- package/dist/external-DElBi-Q-.js +0 -87
- package/dist/external-DP8Ao5TN.cjs +0 -1
- package/dist/external-DS6CmLLZ.cjs +0 -46
- package/dist/external-DoerTjzk.js +0 -14
- package/dist/external-FJ3vTUtb.cjs +0 -1
- package/dist/external-V3s19XkB.cjs +0 -1
- package/dist/external-Zuxgy86I.cjs +0 -1
- package/dist/fontString-DBgTdlAe.cjs +0 -1
- package/dist/main-Bg0vBNCG.cjs +0 -92
- package/dist/provider-CSa0L57i.js +0 -4673
- package/dist/provider-CWezGpoq.cjs +0 -52
- package/dist/provider-Fw6FIHoE.cjs +0 -83
- package/dist/src/arc/stage/Base.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/Constant.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/external.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/index.d.ts.map +0 -1
- package/dist/src/arc/stage/external.d.ts.map +0 -1
- package/dist/src/arc/stage/index.d.ts.map +0 -1
- package/dist/src/arc/stage/operator/Operator.d.ts.map +0 -1
- package/dist/src/arc/stage/operator/external.d.ts.map +0 -1
- package/dist/src/arc/stage/operator/index.d.ts.map +0 -1
- package/dist/src/arc/stage/read/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/read/Read.d.ts.map +0 -1
- package/dist/src/arc/stage/read/external.d.ts.map +0 -1
- package/dist/src/arc/stage/read/index.d.ts.map +0 -1
- package/dist/src/arc/stage/registry.d.ts.map +0 -1
- package/dist/src/arc/stage/select/Select.d.ts.map +0 -1
- package/dist/src/arc/stage/select/external.d.ts.map +0 -1
- package/dist/src/arc/stage/select/index.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/Sink.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/external.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/index.d.ts.map +0 -1
- package/dist/src/arc/stage/source/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/source/Source.d.ts.map +0 -1
- package/dist/src/arc/stage/source/external.d.ts.map +0 -1
- package/dist/src/arc/stage/source/index.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/StableFor.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/external.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/index.d.ts.map +0 -1
- package/dist/src/arc/stage/status/Change.d.ts.map +0 -1
- package/dist/src/arc/stage/status/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/status/external.d.ts.map +0 -1
- package/dist/src/arc/stage/status/index.d.ts.map +0 -1
- package/dist/src/arc/stage/types/index.d.ts.map +0 -1
- package/dist/src/arc/stage/types/spec.d.ts.map +0 -1
- package/dist/src/flex/Select.d.ts +0 -7
- package/dist/src/flex/Select.d.ts.map +0 -1
- package/dist/src/flex/external.d.ts +0 -3
- package/dist/src/flex/external.d.ts.map +0 -1
- package/dist/src/override/factory.d.ts +0 -3
- package/dist/src/override/factory.d.ts.map +0 -1
- package/dist/src/override/index.d.ts +0 -2
- package/dist/src/override/index.d.ts.map +0 -1
- package/dist/src/status/CreateIcon.d.ts +0 -1
- package/dist/src/status/CreateIcon.d.ts.map +0 -1
- package/dist/src/status/core/SelectVariant.d.ts +0 -7
- package/dist/src/status/core/SelectVariant.d.ts.map +0 -1
- package/dist/units-gFJ6UvpU.cjs +0 -1
- package/dist/useKeysData-DXXVQfXZ.js +0 -18
- package/dist/useKeysData-Do63LaI0.cjs +0 -1
- /package/dist/src/arc/{stage → functions}/Base.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/Constant.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/operator/Operator.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/operator/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/operator/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/Read.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/registry.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/select/Select.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/select/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/select/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/Sink.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/Source.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/StableFor.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/Change.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/types/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/types/spec.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";const a=require("zod"),lr=t=>a.union([a.union([a.null(),a.undefined()]).transform(()=>[]),t.array()]),Bn=t=>Array.isArray(t)?t:t==null?[]:[t],cr=(t,e)=>{if(Array.isArray(e))return e.reduce((s,i)=>cr(s,i),t??[]);if(t==null)return[e];const r=t.findIndex(s=>s==e),n=[...t];return r===-1?n.push(e):n[r]=e,n},Cn=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r)):t.filter(r=>r!=e)}),hr=(t,e)=>{if(Array.isArray(e))return e.reduce((s,i)=>hr(s,i),t??[]);if(t==null)return[e];const r=t.findIndex(s=>s.key===e.key),n=[...t];return r===-1?n.push(e):n[r]=e,n},jn=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r.key)):t.filter(r=>r.key!==e)}),Rn=Object.freeze(Object.defineProperty({__proto__:null,nullableZ:lr,remove:Cn,removeKeyed:jn,toArray:Bn,upsert:cr,upsertKeyed:hr},Symbol.toStringTag,{value:"Module"})),Ln=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)},Ye=t=>{const e=(r,n=ut)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(o=>e(o,n));if(!rt(r))return r;n=kn(n);const s={},i=r;return"toJSON"in i&&typeof i.toJSON=="function"?e(i.toJSON(),n):(Object.keys(i).forEach(o=>{let l=i[o];const f=t(o);n.recursive&&(rt(l)?er(l)||(l=e(l,n)):n.recursiveInArray&&_t(l)&&(l=[...l].map(c=>{let d=c;return rt(c)?er(d)||(d=e(c,n)):_t(c)&&(d=e({key:c},n).key),d}))),s[f]=l}),s)};return e},Nt=Ye(Ln),Dn=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}_${n.toLowerCase()}`),fr=Ye(Dn),dr=t=>t.length===0?t:t[0].toUpperCase()+t.slice(1),Pn=[Number,String,Uint8Array],ut={recursive:!0,recursiveInArray:!0},kn=(t=ut)=>(t.recursive==null?t=ut:t.recursiveInArray??=!1,t),_t=t=>t!=null&&Array.isArray(t),rt=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),er=t=>Pn.some(e=>t instanceof e),qn=t=>t.replace(/[\s_]+/g,"-").replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}-${n.toLowerCase()}`).toLowerCase(),Zn=Ye(qn),Fn=t=>{if(t.length===0)return t;let e=t.replace(/[_-]/g," ");return e=e.replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n} ${s}`),e=e.replace(/([A-Z]+)([A-Z][a-z])/g,(r,n,s)=>`${n} ${s}`),e=e.replace(/\s+/g," ").trim(),e=e.replace(/\b\w/g,r=>r.toUpperCase()),e},Yn=Ye(Fn),Vn=Object.freeze(Object.defineProperty({__proto__:null,camelToSnake:fr,capitalize:dr,snakeToCamel:Nt,toKebab:Zn,toProperNoun:Yn},Symbol.toStringTag,{value:"Module"}));let Wn=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),s=Nt(n);return r!=null?r.parse(s):s}encodeString(e){const r=fr(e);return JSON.stringify(r,(n,s)=>ArrayBuffer.isView(s)?Array.from(s):typeof s=="bigint"?s.toString():s)}};const lt=new Wn,ct=t=>[...new Set(t)],Gn=(t,e,r=!0)=>{const n=new Map;return t.forEach(s=>{const i=e(s);if(n.has(i)){if(r)return;n.delete(i)}n.set(i,s)}),Array.from(n.values())},Hn=Object.freeze(Object.defineProperty({__proto__:null,by:Gn,unique:ct},Symbol.toStringTag,{value:"Module"})),E=t=>t!=null&&typeof t=="object"&&"value"in t;let te=class{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const It=t=>t!=null&&typeof t=="object"&&"toString"in t,gr=t=>{if(It(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}},Xn=t=>!gr(t),Jn=Object.freeze(Object.defineProperty({__proto__:null,ValueExtension:te,isCrudeValueExtension:E,isNonZero:Xn,isStringer:It,isZero:gr},Symbol.toStringTag,{value:"Module"})),Ve=(t,e=!1)=>{const r=It(t)?"stringer":typeof t;let n;switch(r){case"string":n=(s,i)=>s.localeCompare(i);break;case"stringer":n=(s,i)=>s.toString().localeCompare(i.toString());break;case"number":n=(s,i)=>Number(s)-Number(i);break;case"bigint":n=(s,i)=>BigInt(s)-BigInt(i)>0n?1:-1;break;case"boolean":n=(s,i)=>Number(s)-Number(i);break;case"undefined":n=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?mr(n):n},Kn=(t,e,r)=>{const n=Ve(e[t],r);return(s,i)=>n(s[t],i[t])},Qn=(t,e)=>t.length!==e.length?t.length-e.length:t.every((r,n)=>r===e[n])?0:-1,pr=(t,e)=>{if(t.length!==e.length)return t.length-e.length;if(t.length===0)return 0;const r=Ve(t[0]),n=[...t].sort(r),s=[...e].sort(r);return n.every((i,o)=>i===s[o])?0:-1},_n=(t,e)=>{const r=ct(t),n=ct(e);return pr(r,n)},es=(t,e)=>t===e?0:t==="first"&&e==="last"?1:-1,mr=t=>(e,r)=>t(r,e),ie=0,Ee=-1,Ue=1,yr=t=>t<ie,br=t=>t>ie,ts=t=>t>=ie,wr=t=>t===ie,rs=(t,e)=>{const r=/([a-zA-Z]+)|(\d+)/g,n=t.replace(/[\s_.-]+/g,"").match(r),s=e.replace(/[\s_.-]+/g,"").match(r);if(!n||!s)return 0;for(let i=0;i<Math.min(n.length,s.length);i++){const o=n[i],l=s[i];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-s.length},We=a.z.tuple([a.z.number(),a.z.number()]);a.z.tuple([a.z.bigint(),a.z.bigint()]);const Mt=a.z.object({width:a.z.number(),height:a.z.number()}),ns=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),ss=["width","height"];a.z.enum(ss);const is=["start","center","end"],as=["signedWidth","signedHeight"];a.z.enum(as);const ye=a.z.object({x:a.z.number(),y:a.z.number()}),$r=a.z.object({clientX:a.z.number(),clientY:a.z.number()}),Ge=["x","y"],zt=a.z.enum(Ge),At=["top","right","bottom","left"],os=a.z.enum(At),He=["left","right"],Et=a.z.enum(He),Xe=["top","bottom"],Ut=a.z.enum(Xe),Bt=["center"],ht=a.z.enum(Bt),us=[...At,...Bt],Ct=a.z.enum(us);a.z.enum(is);const ls=["first","last"];a.z.enum(ls);const Or=a.z.object({lower:a.z.number(),upper:a.z.number()}),cs=a.z.object({lower:a.z.bigint(),upper:a.z.bigint()});a.z.union([Or,We]);a.z.union([cs,We]);const hs=a.z.enum([...zt.options,...Ct.options]);a.z.enum(["x","left","right"]);a.z.enum(["y","top","bottom"]);const fs=a.z.union([zt,Ct,a.z.instanceof(String)]),ae=t=>(e,r)=>{if(typeof e=="bigint"){if(ke(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))},q=ae((t,e)=>t-e),oe=ae((t,e)=>t+e),ds=(t,e,r=1e-4)=>Math.abs(t-e)<r,ft=(t,e)=>{const r=typeof t=="bigint",n=typeof e=="bigint";return r&&n?t===e:r&&ke(e)?t===BigInt(e):n&&ke(t)?e===BigInt(t):t===e},gs=t=>{const e=10**Math.floor(Math.log10(t));return Math.round(t/e)*e},vr=ae((t,e)=>t<=e?t:e),ke=t=>typeof t=="bigint"?!0:Number.isInteger(t),ps=ae((t,e)=>t>=e?t:e),Tr=t=>typeof t=="bigint"?t<0n?-t:t:t<0?-t:t,C=ae((t,e)=>t*e),Te=ae((t,e)=>t/e),b=(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?xr(n):n},ms=Object.freeze({lower:0,upper:0}),ys=Object.freeze({lower:-1/0,upper:1/0}),bs=Object.freeze({lower:0,upper:1}),ws=Object.freeze({lower:-1,upper:1}),$s=(t,e)=>{if(t==null&&e==null)return!0;if(t==null||e==null)return!1;const r=b(t),n=b(e);return r?.lower===n?.lower&&r?.upper===n?.upper},xr=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,dt=(t,e)=>{const r=b(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},j=(t,e)=>{const r=b(t);if(typeof e=="number"||typeof e=="bigint")return e>=r.lower&&e<r.upper;const n=b(e);return n.lower>=r.lower&&n.upper<=r.upper},Os=(t,e)=>{const r=b(t),n=b(e);return r.lower===n.lower?!0:n.upper===r.lower||n.lower===r.upper?!1:j(r,n.upper)||j(r,n.lower)||j(n,r.upper)||j(n,r.lower)},ue=t=>{const e=b(t);return e.upper-e.lower},vs=t=>{const e=b(t);return typeof e.lower=="bigint"?e.lower===0n&&e.upper===0n:e.lower===0&&e.upper===0},Ts=t=>{const e=ue(t);return typeof e=="number"?e===0:e===0n},xs=t=>{const e=b(t);return typeof e.lower=="bigint"?!0:Number.isFinite(e.lower)&&Number.isFinite(e.upper)},Ss=t=>{const e=b(t);return(e.upper+e.lower)/2},Sr=t=>({lower:Math.min(...t.map(e=>b(e).lower)),upper:Math.max(...t.map(e=>b(e).upper))}),Ns=t=>({lower:Math.max(...t.map(e=>b(e).lower)),upper:Math.min(...t.map(e=>b(e).upper))}),Is=t=>{const e=b(t),r=typeof e.lower=="bigint";return Array.from({length:Number(ue(t))},(n,s)=>r?e.lower+BigInt(s):e.lower+s)},gt=(t,e)=>{const r=t.map(i=>b(i)),n=r.findIndex(i=>j(i,e)||e<i.lower);if(n===-1)return{index:t.length,position:0};const s=r[n];return j(s,e)?{index:n,position:Number(e-s.lower)}:{index:n,position:0}},nt={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},Ms=(t,e)=>{const r=t.map(c=>b(c)),n=b(e);if(r.length===0)return nt;const s=gt(r,n.lower),i=gt(r,n.upper);if(s.index===t.length)return{...nt,insertInto:t.length};if(i.index===0)return{...nt,removeAfter:i.position};if(s.index===i.index)return s.position!==0&&i.position!==0?null:{removeAfter:i.position,removeBefore:s.position,insertInto:s.index,deleteInBetween:0};let o=i.index-s.index,l=s.index,f=q(Number(ue(r[s.index])),s.position);return s.position!==0?(o-=1,l+=1):f=0,{removeBefore:f,removeAfter:i.position,insertInto:l,deleteInBetween:o}},Nr=(t,e,r)=>{const n=t.map(l=>b(l)),s=r>0?1:r<0?-1:0;if(s===0)return e;let i=r,o=e;for(;ft(i,0)===!1;){const l=n.findIndex(f=>s>0?o>=f.lower&&o<f.upper:o>f.lower&&o<=f.upper);if(l!==-1){const f=n[l];let c;if(s>0?c=q(f.upper,o):c=q(o,f.lower),c>0){const d=vr(Tr(i),c);if(o=oe(o,s>0?d:-d),i=q(i,s>0?d:-d),ft(i,0))return o;continue}}if(s>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},Ir=(t,e,r)=>{const n=t.map(o=>b(o));if(e===r)return typeof e=="bigint"?0n:0;const s=e<r?b([e,r]):b([r,e]);let i=typeof e=="bigint"?0n:0;for(const o of n){const l=o.lower>s.lower?o.lower:s.lower,f=o.upper<s.upper?o.upper:s.upper;if(l<f){const c=f-l;i=i+c}}return i},zs=Object.freeze(Object.defineProperty({__proto__:null,CLIP:ws,DECIMAL:bs,INFINITE:ys,ZERO:ms,bounds:Or,buildInsertionPlan:Ms,clamp:dt,construct:b,contains:j,distance:Ir,equals:$s,findInsertPosition:gt,isFinite:xs,isZero:vs,linspace:Is,makeValid:xr,max:Sr,mean:Ss,min:Ns,overlapsWith:Os,span:ue,spanIsZero:Ts,traverse:Nr},Symbol.toStringTag,{value:"Module"})),Mr=hs,k=t=>Ge.includes(t)?t:Xe.includes(t)?"y":"x",As=t=>k(t)==="x"?"y":"x",Es=t=>k(t)==="x"?"width":"height",Us=t=>k(t)==="x"?"left":"top",Bs=t=>Mr.safeParse(t).success,Cs=t=>k(t)==="x"?"signedWidth":"signedHeight",js=t=>t==="center"?!1:k(t)==="x",Rs=t=>k(t)==="y",zr=Object.freeze(Object.defineProperty({__proto__:null,DIRECTIONS:Ge,construct:k,crude:Mr,dimension:Es,direction:zt,isDirection:Bs,isX:js,isY:Rs,location:Us,signedDimension:Cs,swap:As},Symbol.toStringTag,{value:"Module"})),Ls=Et,Ds=Ut,Ps=ht,ks={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},qs={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},Zs=fs,H=t=>t instanceof String||!Ge.includes(t)?t:t==="x"?"left":"top",Fs=t=>ks[H(t)],Ys=t=>qs[H(t)],be=t=>{const e=H(t);return e==="top"||e==="bottom"?"y":"x"},Vs=a.z.object({x:Et.or(ht),y:Ut.or(ht)}),Ar=a.z.object({x:Et,y:Ut}),xe=Object.freeze({x:"left",y:"top"}),jt=Object.freeze({x:"right",y:"top"}),Je=Object.freeze({x:"left",y:"bottom"}),Rt=Object.freeze({x:"right",y:"bottom"}),Lt=Object.freeze({x:"center",y:"center"}),Dt=Object.freeze({x:"center",y:"top"}),Pt=Object.freeze({x:"center",y:"bottom"}),kt=Object.freeze({x:"right",y:"center"}),qt=Object.freeze({x:"left",y:"center"}),Ws=Object.freeze([qt,kt,Dt,Pt,xe,jt,Je,Rt,Lt]),Zt=(t,e)=>t.x===e.x&&t.y===e.y,Gs=(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},Er=t=>[t.x,t.y],Be=t=>be(H(t))==="x",Hs=t=>be(H(t))==="y",Xs=t=>`${t.x}${dr(t.y)}`,Js=(t,e)=>{let r,n;if(typeof t=="object"&&"x"in t?(r=t.x,n=t.y):(r=H(t),n=H(e??t)),be(r)===be(n)&&r!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`);const s={...Lt};return r==="center"?Be(n)?[s.x,s.y]=[n,r]:[s.x,s.y]=[r,n]:n==="center"?Be(r)?[s.x,s.y]=[r,n]:[s.x,s.y]=[n,r]:Be(r)?[s.x,s.y]=[r,n]:[s.x,s.y]=[n,r],s},Ur=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:Pt,BOTTOM_LEFT:Je,BOTTOM_RIGHT:Rt,CENTER:Lt,CENTER_LEFT:qt,CENTER_LOCATIONS:Bt,CENTER_RIGHT:kt,OUTER_LOCATIONS:At,TOP_CENTER:Dt,TOP_LEFT:xe,TOP_RIGHT:jt,XY_LOCATIONS:Ws,X_LOCATIONS:He,Y_LOCATIONS:Xe,center:Ps,construct:H,constructXY:Js,corner:Ar,crude:Zs,direction:be,isX:Be,isY:Hs,location:Ct,outer:os,rotate90:Ys,swap:Fs,x:Ls,xy:Vs,xyCouple:Er,xyEquals:Zt,xyMatches:Gs,xyToString:Xs,y:Ds},Symbol.toStringTag,{value:"Module"})),pt=a.z.union([a.z.number(),ye,We,Mt,ns,$r]),O=(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}},P=Object.freeze({x:0,y:0}),Br=Object.freeze({x:1,y:1}),Ks=Object.freeze({x:1/0,y:1/0}),Qs=Object.freeze({x:NaN,y:NaN}),qe=(t,e,r=0)=>{const n=O(t),s=O(e);return r===0?n.x===s.x&&n.y===s.y:Math.abs(n.x-s.x)<=r&&Math.abs(n.y-s.y)<=r},_s=t=>qe(t,P),Ft=(t,e,r)=>{const n=O(t),s=O(e,r);return{x:n.x*s.x,y:n.y*s.y}},Cr=(t,e)=>{const r=O(t);return{x:r.x+e,y:r.y}},jr=(t,e)=>{const r=O(t);return{x:r.x,y:r.y+e}},we=(t,e,r,...n)=>{if(typeof e=="string"){if(typeof r!="number")throw new Error("The value must be a number.");return e==="x"?Cr(t,r):jr(t,r)}if(typeof e=="object"&&"x"in e&&typeof e.x=="string"){const s=O(r),i=O(t);return e.x==="left"?s.x=-s.x:e.x==="center"&&(s.x=0),e.y==="top"?s.y=-s.y:e.y==="center"&&(s.y=0),{x:i.x+s.x,y:i.y+s.y}}return[t,e,r??P,...n].reduce((s,i)=>{const o=O(i);return{x:s.x+o.x,y:s.y+o.y}},P)},ei=(t,e,r)=>{const n=O(t);return e==="x"?{x:r,y:n.y}:{x:n.x,y:r}},ti=(t,e)=>{const r=O(t),n=O(e);return Math.sqrt((r.x-n.x)**2+(r.y-n.y)**2)},ri=(t,e)=>{const r=O(t),n=O(e);return{x:n.x-r.x,y:n.y-r.y}},ni=t=>{const e=O(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},si=t=>{const e=O(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},ii=t=>{const e=O(t);return[e.x,e.y]},ai=t=>{const e=O(t);return{left:e.x,top:e.y}},mt=(t,e=0)=>{const r=O(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},ce=(t,e)=>{const r=O(t),n=O(e);return{x:r.x-n.x,y:r.y-n.y}},he=t=>{const e=O(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},Rr=t=>{const e=O(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},Lr=(...t)=>{const e=t.reduce((r,n)=>we(r,n),P);return Ft(e,1/t.length)},oi=(t,e)=>{const r=[];for(let n=0;n<t.length;n++){const s=t[n];let i,o,l,f;if(n===0){const c=t[n+1],d=ce(c,s);o=he(d),l=o,f=e}else if(n===t.length-1){const c=t[n-1],d=ce(s,c);i=he(d),l=i,f=e}else{const c=t[n-1],d=t[n+1],m=ce(s,c),p=ce(d,s);i=he(m),o=he(p);const M=Math.acos((m.x*p.x+m.y*p.y)/(Math.hypot(m.x,m.y)*Math.hypot(p.x,p.y))),A=Math.sin(M/2);A===0?f=e:f=e/A,l=Rr(Lr(i,o))}r.push(Ft(l,f))}return r},ui=t=>{const e=O(t);return{x:e.y,y:e.x}},yt=t=>{const e=O(t);return{x:Math.round(e.x),y:Math.round(e.y)}},li=t=>{const e=O(t);return{x:1/e.x,y:1/e.y}},ci=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Ks,NAN:Qs,ONE:Br,ZERO:P,average:Lr,calculateMiters:oi,clientXY:$r,construct:O,couple:ii,crudeZ:pt,css:ai,distance:ti,equals:qe,isFinite:si,isNan:ni,isZero:_s,normal:he,normalize:Rr,reciprocal:li,round:yt,scale:Ft,set:ei,sub:ce,swap:ui,translate:we,translateX:Cr,translateY:jr,translation:ri,truncate:mt,xy:ye},Symbol.toStringTag,{value:"Module"})),Ne=a.z.union([a.z.number(),a.z.string()]),hi=a.z.object({top:Ne,left:Ne,width:Ne,height:Ne}),fi=a.z.object({left:a.z.number(),top:a.z.number(),right:a.z.number(),bottom:a.z.number()}),di=a.z.object({one:ye,two:ye,root:Ar}),Dr={one:P,two:P,root:xe},gi={one:P,two:Br,root:Je},Pr=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),x=(t,e,r=0,n=0,s)=>{const i={one:{...P},two:{...P},root:s??xe};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return i.one={x:t,y:e},i.two={x:i.one.x+r,y:i.one.y+n},i}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(i.one={x:t.left,y:t.top},i.two={x:t.right,y:t.bottom},i):(i.one=t,e==null?i.two={x:i.one.x+r,y:i.one.y+n}:typeof e=="number"?i.two={x:i.one.x+e,y:i.one.y+r}:"width"in e?i.two={x:i.one.x+e.width,y:i.one.y+e.height}:"signedWidth"in e?i.two={x:i.one.x+e.signedWidth,y:i.one.y+e.signedHeight}:i.two=e,i))},pi=(t,e,r)=>{const n=x(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const s=k(e);return x(n.one,void 0,s==="x"?r:X(n),s==="y"?r:J(n),n.root)}return x(n.one,e,void 0,void 0,n.root)},mi=(t,e,r=!0)=>{const n=x(t);let s=(i,o)=>i<o;return r&&(s=(i,o)=>i<=o),"one"in e?s(W(n),W(e))&&s(Q(e),Q(n))&&s(G(n),G(e))&&s(_(e),_(n)):s(W(n),e.x)&&s(e.x,Q(n))&&s(G(n),e.y)&&s(e.y,_(n))},yi=(t,e)=>qe(t.one,e.one)&&qe(t.two,e.two)&&Zt(t.root,e.root),kr=t=>({width:X(t),height:J(t)}),bi=t=>({signedWidth:Ke(t),signedHeight:Qe(t)}),wi=t=>({top:G(t),left:W(t),width:X(t),height:J(t)}),Yt=(t,e,r=!1)=>{const n=k(e)==="y"?Qe(t):Ke(t);return r?n:Math.abs(n)},Z=(t,e)=>{const r=x(t);return{x:e.x==="center"?bt(r).x:ee(r,e.x),y:e.y==="center"?bt(r).y:ee(r,e.y)}},ee=(t,e)=>{const r=x(t),n=Er(r.root).includes(e)?Math.min:Math.max;return He.includes(e)?n(r.one.x,r.two.x):n(r.one.y,r.two.y)},$i=t=>Fr(t)===0,X=t=>Yt(t,"x"),J=t=>Yt(t,"y"),Ke=t=>{const e=x(t);return e.two.x-e.one.x},Qe=t=>{const e=x(t);return e.two.y-e.one.y},qr=t=>Z(t,xe),Oi=t=>Z(t,Dt),vi=t=>Z(t,jt),Ti=t=>Z(t,Je),xi=t=>Z(t,Pt),Si=t=>Z(t,Rt),Ni=t=>Z(t,qt),Ii=t=>Z(t,kt),Q=t=>ee(t,"right"),_=t=>ee(t,"bottom"),W=t=>ee(t,"left"),G=t=>ee(t,"top"),bt=t=>we(qr(t),{x:Ke(t)/2,y:Qe(t)/2}),Vt=t=>{const e=x(t);return e.root.x==="left"?W(e):Q(e)},Wt=t=>{const e=x(t);return e.root.y==="top"?G(e):_(e)},Mi=t=>({x:Vt(t),y:Wt(t)}),Ce=t=>{const e=x(t);return{lower:e.one.x,upper:e.two.x}},je=t=>{const e=x(t);return{lower:e.one.y,upper:e.two.y}},zi=(t,e)=>Pr(t,e),Ai=(t,e)=>{const r=x(t),n=He.includes(e)?"x":Xe.includes(e)?"y":null;if(n===null)throw new Error(`Invalid location: ${e}`);const s=e==="top"||e==="left"?Math.min:Math.max,i={...r.one},o={...r.two};return i[n]=s(r.one[n],r.two[n]),o[n]=s(r.one[n],r.two[n]),[i,o]},Ei=(t,e)=>{const r=x(t),n=x(e),s=Vt(n)+(X(n)-X(r))/2,i=Wt(n)+(J(n)-J(r))/2;return x({x:s,y:i},kr(r))},Zr=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,Ui=t=>X(t)/J(t),Bi=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const s=k(e);e=O(s,r)}const n=x(t);return x(we(n.one,e),we(n.two,e),void 0,void 0,n.root)},Ci=(t,e)=>{const r=Math.max(W(t),W(e)),n=Math.max(G(t),G(e)),s=Math.min(Q(t),Q(e)),i=Math.min(_(t),_(e));return r>s||n>i?Dr:x({x:r,y:n},{x:s,y:i},void 0,void 0,t.root)},Fr=t=>X(t)*J(t),ji=(t,e)=>{const r=x(t);return x(mt(r.one,e),mt(r.two,e),void 0,void 0,r.root)},Ri=(t,e,r,n,s,i)=>{const o={x:t,y:e},l={x:t+r,y:e+n};return s.x!==i.x&&(s.x==="center"?(o.x-=r/2,l.x-=r/2):(o.x-=r,l.x-=r)),s.y!==i.y&&(s.y==="center"?(o.y-=n/2,l.y-=n/2):(o.y-=n,l.y-=n)),x(o,l,void 0,void 0,i)},Li=t=>{const e=x(t);return x(yt(e.one),yt(e.two),void 0,void 0,e.root)},Di=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:gi,ZERO:Dr,area:Fr,areaIsZero:$i,aspect:Ui,bottom:_,bottomCenter:xi,bottomLeft:Ti,bottomRight:Si,box:di,center:bt,centerLeft:Ni,centerRight:Ii,construct:x,constructWithAlternateRoot:Ri,contains:mi,copy:Pr,css:wi,cssBox:hi,dim:Yt,dims:kr,domRect:fi,edgePoints:Ai,equals:yi,height:J,intersection:Ci,isBox:Zr,left:W,loc:ee,positionInCenter:Ei,reRoot:zi,resize:pi,right:Q,root:Mi,round:Li,signedDims:bi,signedHeight:Qe,signedWidth:Ke,top:G,topCenter:Oi,topLeft:qr,topRight:vi,translate:Bi,truncate:ji,width:X,x:Vt,xBounds:Ce,xyLoc:Z,y:Wt,yBounds:je},Symbol.toStringTag,{value:"Module"})),Yr=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),Pi=a.z.union([Mt,Yr,ye,We]),ki={width:0,height:0},qi={width:1,height:1},R=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},Zi=(t,e)=>{if(e==null)return!1;const r=R(t),n=R(e);return r.width===n.width&&r.height===n.height},Fi=t=>{const e=R(t);return{width:e.height,height:e.width}},Yi=t=>{const e=R(t);return`0 0 ${e.width} ${e.height}`},Vi=t=>{const e=R(t);return[e.width,e.height]},Wi=t=>({width:Math.max(...t.map(e=>R(e).width)),height:Math.max(...t.map(e=>R(e).height))}),Gi=t=>({width:Math.min(...t.map(e=>R(e).width)),height:Math.min(...t.map(e=>R(e).height))}),Hi=(t,e)=>{const r=R(t);return{width:r.width*e,height:r.height*e}},Xi=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:qi,ZERO:ki,construct:R,couple:Vi,crude:Pi,dimensions:Mt,equals:Zi,max:Wi,min:Gi,scale:Hi,signed:Yr,svgViewBox:Yi,swap:Fi},Symbol.toStringTag,{value:"Module"})),Vr=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t,Ji=a.z.object({offset:pt,scale:pt}),Ki=a.z.object({offset:a.z.number(),scale:a.z.number()}),Qi=t=>(e,r,n,s)=>r==="dimension"?[e,n]:[e,s?n-t:n+t],_i=t=>(e,r,n,s)=>[e,s?n/t:n*t],ea=t=>(e,r,n)=>{if(e===null)return[t,n];const{lower:s,upper:i}=e,{lower:o,upper:l}=t,f=i-s,c=l-o;if(r==="dimension")return[t,n*(c/f)];const d=(n-s)*(c/f)+o;return[t,d]},ta=t=>(e,r,n)=>[t,n],ra=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:n,upper:s}=t;return[t,s-(r-n)]},na=t=>(e,r,n)=>{const{lower:s,upper:i}=t;return n=Vr(n,s,i),[e,n]};let wt=class ne{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new ne().translate(e)}static magnify(e){return new ne().magnify(e)}static scale(e,r){return new ne().scale(e,r)}translate(e){const r=this.new(),n=Qi(e);return n.type="translate",r.ops.push(n),r}magnify(e){const r=this.new(),n=_i(e);return n.type="magnify",r.ops.push(n),r}scale(e,r){const n=b(e,r),s=this.new(),i=ea(n);return i.type="scale",s.ops.push(i),s}clamp(e,r){const n=b(e,r),s=this.new(),i=na(n);return i.type="clamp",s.ops.push(i),s}reBound(e,r){const n=b(e,r),s=this.new(),i=ta(n);return i.type="re-bound",s.ops.push(i),s}invert(){const e=ra();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 ne;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([n,s],i)=>i(n,e,s,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((n,s)=>{if(n.type==="scale"||r.some(([o,l])=>s>=o&&s<=l))return;const i=e.ops.findIndex((o,l)=>o.type==="scale"&&l>s);i!==-1&&r.push([s,i])}),r.forEach(([n,s])=>{const i=e.ops.slice(n,s);i.unshift(e.ops[s]),e.ops.splice(n,s-n+1,...i)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new ne},sa=class L{x;y;currRoot;constructor(e=new wt,r=new wt,n=null){this.x=e,this.y=r,this.currRoot=n}static translate(e,r){return new L().translate(e,r)}static translateX(e){return new L().translateX(e)}static translateY(e){return new L().translateY(e)}static clamp(e){return new L().clamp(e)}static magnify(e){return new L().magnify(e)}static scale(e){return new L().scale(e)}static reBound(e){return new L().reBound(e)}translate(e,r){const n=O(e,r),s=this.copy();return s.x=this.x.translate(n.x),s.y=this.y.translate(n.y),s}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(Zr(e)){const n=this.currRoot;return r.currRoot=e.root,n!=null&&!Zt(n,e.root)&&(n.x!==e.root.x&&(r.x=r.x.invert()),n.y!==e.root.y&&(r.y=r.y.invert())),r.x=r.x.scale(Ce(e)),r.y=r.y.scale(je(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(Ce(e)),r.y=this.y.reBound(je(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp(Ce(e)),r.y=this.y.clamp(je(e)),r}copy(){const e=new L;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 x(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 L};const ia=Object.freeze(Object.defineProperty({__proto__:null,Scale:wt,XY:sa,crudeXYTransform:Ji,transform:Ki},Symbol.toStringTag,{value:"Module"}));let Wr=(t,e=21)=>(r=e)=>{let n="",s=r|0;for(;s--;)n+=t[Math.random()*t.length|0];return n};const Gr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",aa=`0123456789${Gr}`,Hr=11,oa=Wr(Gr,1),ua=Wr(aa,Hr-1),Gt=()=>`${oa()}${ua()}`,la=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:Hr,create:Gt},Symbol.toStringTag,{value:"Module"})),ca=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,ha=a.z.enum(["static","dynamic"]),fa=2**8-1,da=2**16-1,ga=2**32-1,pa=2n**64n-1n,ma=2**64-1,ya=-128,ba=2**7-1,wa=-32768,$a=2**15-1,Oa=-2147483648,va=2**31-1,Ta=-(2n**63n),Ze=2n**63n-1n,xa=-9223372036854776e3,Xr=2**63-1,tr=365,Ie=30,Sa=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)])]),Jr=(t,e)=>{const r=new $(e);if(![h.DAY,h.HOUR,h.MINUTE,h.SECOND,h.MILLISECOND,h.MICROSECOND,h.NANOSECOND].some(s=>s.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 $?new $(n):new h(n)};let $=class g extends te{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===Xr?e=Ze: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 s=new Date(e,r-1,n,0,0,0,0);return new g(BigInt(s.getTime())*g.MILLISECOND.valueOf()).truncate(g.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[n,s,i]=e.split(":");let o="00",l="00";i!=null&&([o,l]=i.split("."));let f=g.hours(parseInt(n??"00")).add(g.minutes(parseInt(s??"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);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 V(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(oe(this.valueOf(),new h(e).valueOf()))}sub(e){return new g(q(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 Jr(this,e)}get isToday(){return this.truncate(h.DAY).equals(g.now().truncate(h.DAY))}truncate(e){return this.sub(this.remainder(e))}static now(){return new g(new Date)}static max(...e){let r=g.MIN;for(const n of e){const s=new g(n);s.after(r)&&(r=s)}return r}static min(...e){let r=g.MAX;for(const n of e){const s=new g(n);s.before(r)&&(r=s)}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(Ze);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)),Sa.transform(e=>new g(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}};class h extends te{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 Re?e.period:e instanceof $?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 Re?e.period:e instanceof $?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 Jr(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),s=this.truncate(h.MINUTE),i=this.truncate(h.SECOND),o=this.truncate(h.MILLISECOND),l=this.truncate(h.MICROSECOND),f=this.truncate(h.NANOSECOND),c=r,d=n.sub(r),m=s.sub(n),p=i.sub(s),M=o.sub(i),A=l.sub(o),B=f.sub(l);let w="";return c.isZero||(w+=`${c.days}d `),d.isZero||(w+=`${d.hours}h `),m.isZero||(w+=`${m.minutes}m `),p.isZero||(w+=`${p.seconds}s `),M.isZero||(w+=`${M.milliseconds}ms `),A.isZero||(w+=`${A.microseconds}µs `),B.isZero||(w+=`${B.nanoseconds}ns`),w.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 s=r.days,i=r.hours,o=r.minutes,l=r.seconds,f=Math.floor(s/tr),c=Math.floor(s/Ie),d=Math.floor(s/7),m=Math.floor(s),p=Math.floor(i),M=Math.floor(o),A=Math.floor(l),B=n?"-":"";if(f>=1){let w=`${f}y`;if(f<2){const S=Math.floor(s%tr/Ie);S>0&&(w+=` ${S}mo`)}return B+w}if(d>=1&&s<Ie&&s%7===0){let w=`${d}w`;const S=Math.floor(s%7),K=Math.floor(i-d*7*24);return d<2&&(S>0?w+=` ${S}d`:K>0&&K<24&&(w+=` ${K}h`)),B+w}if(c>=1){let w=`${c}mo`;if(c<3){const S=Math.floor(s%Ie);S>0&&(w+=` ${S}d`)}return B+w}if(d>=1){let w=`${d}w`;const S=Math.floor(s%7),K=Math.floor(i-d*7*24);return d<2&&(S>0?w+=` ${S}d`:K>0&&K<24&&(w+=` ${K}h`)),B+w}if(m>=1){let w=`${m}d`;const S=Math.floor(i-m*24);return m<2&&S>0&&(w+=` ${S}h`),B+w}if(p>=1){let w=`${p}h`;if(p<3){const S=Math.floor(o-p*60);S>0&&(w+=` ${S}m`)}return B+w}if(M>=1){let w=`${M}m`;if(M<5){const S=Math.floor(l-M*60);S>0&&(w+=` ${S}s`)}return B+w}return`${B}${A}s`}mult(e){return new h(C(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(C(e,1e3))}static MICROSECOND=h.microseconds(1);static milliseconds(e=1){return h.microseconds(C(e,1e3))}static MILLISECOND=h.milliseconds(1);static seconds(e=1){return h.milliseconds(C(e,1e3))}static SECOND=h.seconds(1);static minutes(e=1){return h.seconds(C(e,60))}static MINUTE=h.minutes(1);static hours(e){return h.minutes(C(e,60))}static HOUR=h.hours(1);static days(e){return h.hours(C(e,24))}static DAY=h.days(1);static MAX=new h(Ze);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($).transform(e=>new h(e)),a.z.custom(e=>e instanceof Re).transform(e=>new h(e))])}let Re=class U extends te{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new U(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 I(r).valueOf()}span(e){return h.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/new I(r).valueOf())}add(e){return new U(oe(this.valueOf(),new U(e).valueOf()))}sub(e){return new U(q(this.valueOf(),new U(e).valueOf()))}mult(e){return new U(C(this.valueOf(),e))}div(e){return new U(Te(this.valueOf(),e))}static hz(e){return new U(e)}static khz(e){return U.hz(e*1e3)}static z=a.z.union([a.z.number().transform(e=>new U(e)),a.z.instanceof(U)])},I=class z extends te{constructor(e){E(e)&&(e=e.value),super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new $e(e*this.valueOf())}add(e){return new z(oe(this.valueOf(),new z(e).valueOf()))}sub(e){return new z(q(this.valueOf(),new z(e).valueOf()))}mult(e){return new z(C(this.valueOf(),e))}div(e){return new z(Te(this.valueOf(),e))}static UNKNOWN=new z(0);static BIT128=new z(16);static BIT64=new z(8);static BIT32=new z(4);static BIT16=new z(2);static BIT8=new z(1);static z=a.z.union([a.z.number().transform(e=>new z(e)),a.z.instanceof(z)])},V=class D{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new $(e.start),this.end=new $(e.end)):(this.start=new $(e),this.end=new $(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 D(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(),s=this.end.sub(e.end).valueOf();return n<0&&(n=-n),s<0&&(s=-s),n<=r.valueOf()&&s<=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 s=$.max(n.start,e.start),i=$.min(n.end,e.end);return i.before(s)?!1:new h(i.sub(s)).greaterThanOrEqual(r)}contains(e){return e instanceof D?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new D(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 D($.min(...e.map(r=>r.start)),$.max(...e.map(r=>r.end)))}static MAX=new D($.MIN,$.MAX);static ZERO=new D($.ZERO,$.ZERO);static z=a.z.union([a.z.object({start:$.z,end:$.z}).transform(e=>new D(e.start,e.end)),a.z.instanceof(D)]);static sort(e,r){return $.sort(e.start,r.start)||$.sort(e.end,r.end)}static simplify(e){return e.map(r=>r.makeValid()).sort((r,n)=>D.sort(r,n)).reduce((r,n)=>{if(n.span.isZero)return r;if(r.length===0)return r.push(n),r;const s=r[r.length-1];return s.overlapsWith(n)||s.end.equals(n.start)?s.end=$.max(s.end,n.end):r.push(n),r},[])}},T=class u extends te{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(),I.BIT8],[u.UINT16.toString(),I.BIT16],[u.UINT32.toString(),I.BIT32],[u.UINT64.toString(),I.BIT64],[u.FLOAT32.toString(),I.BIT32],[u.FLOAT64.toString(),I.BIT64],[u.INT8.toString(),I.BIT8],[u.INT16.toString(),I.BIT16],[u.INT32.toString(),I.BIT32],[u.INT64.toString(),I.BIT64],[u.TIMESTAMP.toString(),I.BIT64],[u.STRING.toString(),I.UNKNOWN],[u.JSON.toString(),I.UNKNOWN],[u.UUID.toString(),I.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)])},$e=class y extends te{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(oe(this.valueOf(),e.valueOf()))}sub(e){return E(e)&&(e=e.value),new y(q(this.valueOf(),e.valueOf()))}mult(e){return new y(C(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),s=this.truncate(y.KILOBYTE),i=this.truncate(y.BYTE),o=e,l=r.sub(e),f=n.sub(r),c=s.sub(n),d=i.sub(s);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 Na=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)]),Kr=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof $||t instanceof h||t instanceof Date},Ia=(t,e,r,n=0)=>t.usesBigInt&&!e.usesBigInt?Number(r)-Number(n):!t.usesBigInt&&e.usesBigInt?BigInt(r.valueOf())-BigInt(n.valueOf()):Le(r,-n),Le=(t,e)=>e==0?t:t==0?e:typeof t=="bigint"&&typeof e=="bigint"||typeof t=="number"&&typeof e=="number"?t+e:Number(t)+Number(e),Ma="00000000-0000-0000-0000-000000000000",za=/^(?:[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 Aa(t){return typeof t=="string"&&za.test(t)}const N=[];for(let t=0;t<256;++t)N.push((t+256).toString(16).slice(1));function Qr(t,e=0){return(N[t[e+0]]+N[t[e+1]]+N[t[e+2]]+N[t[e+3]]+"-"+N[t[e+4]]+N[t[e+5]]+"-"+N[t[e+6]]+N[t[e+7]]+"-"+N[t[e+8]]+N[t[e+9]]+"-"+N[t[e+10]]+N[t[e+11]]+N[t[e+12]]+N[t[e+13]]+N[t[e+14]]+N[t[e+15]]).toLowerCase()}function Ea(t,e=0){const r=Qr(t,e);if(!Aa(r))throw TypeError("Stringified UUID is invalid");return r}let st;const Ua=new Uint8Array(16);function Ba(){if(!st){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");st=crypto.getRandomValues.bind(crypto)}return st(Ua)}const Ca=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),rr={randomUUID:Ca};function ja(t,e,r){t=t||{};const n=t.random??t.rng?.()??Ba();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,Qr(n)}function Ra(t,e,r){return rr.randomUUID&&!t?rr.randomUUID():ja(t)}const La=()=>Ra(),Ht=(t,e)=>Ea(t,e),Da=Ma,Pa=Object.freeze(Object.defineProperty({__proto__:null,ZERO:Da,create:La,parse:Ht},Symbol.toStringTag,{value:"Module"})),F=-1,$t={[Symbol.iterator]:()=>$t,next:()=>({done:!0,value:void 0})},ka=a.z.string().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),qa=a.z.union([a.z.null(),a.z.undefined()]).transform(()=>new Uint8Array().buffer),Ot=10,_r=(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`)},en="sy_x_telem_series";let Xt=class Y{key;discriminator=en;dataType;sampleOffset;gl;_data;timeRange=V.ZERO;alignment=0n;alignmentMultiple=1n;cachedMin;cachedMax;writePos=F;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=a.z.object({timeRange:V.z.optional(),dataType:T.z,alignment:a.z.coerce.bigint().optional(),data:a.z.union([ka,qa,a.z.instanceof(ArrayBuffer),a.z.instanceof(Uint8Array)]),glBufferUsage:ha.optional().default("static").optional()});static z=Y.crudeZ.transform(e=>new Y(e));constructor(e){Za(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:n,sampleOffset:s=0,glBufferUsage:i="static",alignment:o=0n,alignmentMultiple:l=1n,key:f=Gt(),data:c}=e;if(tn(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=Kr(c),m=Array.isArray(c);if(r!=null)this.dataType=new T(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=T.STRING;else if(typeof p=="number")this.dataType=T.FLOAT64;else if(typeof p=="bigint")this.dataType=T.INT64;else if(typeof p=="boolean")this.dataType=T.BOOLEAN;else if(p instanceof $||p instanceof Date||p instanceof $)this.dataType=T.TIMESTAMP;else if(typeof p=="object")this.dataType=T.JSON;else throw new Error(`cannot infer data type of ${typeof p} when constructing a Series from a JS array`)}else this.dataType=new T(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 M=p[0];(M instanceof $||M instanceof Date||M instanceof h)&&(p=p.map(A=>new $(A).valueOf())),this.dataType.equals(T.STRING)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.join(`
|
|
2
|
+
`)}
|
|
3
|
+
`).buffer):this.dataType.equals(T.JSON)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.map(A=>lt.encodeString(A)).join(`
|
|
4
|
+
`)}
|
|
5
|
+
`).buffer):this.dataType.usesBigInt&&typeof M=="number"?this._data=new this.dataType.Array(p.map(A=>BigInt(Math.round(A)))).buffer:!this.dataType.usesBigInt&&typeof M=="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=s??0,this.timeRange=n??V.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:i}}static alloc({capacity:e,dataType:r,...n}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const s=new new T(r).Array(e),i=new Y({data:s.buffer,dataType:r,...n});return i.writePos=0,i}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===F)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===F)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===F?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(T.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(lt.decodeString(r)))}get byteCapacity(){return new $e(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===F?this.byteCapacity:this.dataType.isVariable?new $e(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===F?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,s)=>{n===Ot&&(e++,r.push(s+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 s=0;s<this.length;s++)n[s]=Ia(this.dataType,e,this.data[s],r);return new Y({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(T.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(),Le(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(T.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(),Le(this.cachedMin,this.sampleOffset))}get bounds(){return b(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(T.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 Le(n,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const n=Ht(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,s=0;if(this._cachedIndexes!=null)n=this._cachedIndexes[e],s=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]===Ot){if(e===0){s=o;break}n=o+1,e--}if(s===0&&(s=this.data.length),n>=s||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const i=this.data.slice(n,s);return this.dataType.equals(T.STRING)?new TextDecoder().decode(i):Nt(JSON.parse(new TextDecoder().decode(i)))}binarySearch(e){let r=0,n=this.length-1;const s=Ve(e);for(;r<=n;){const i=Math.floor((r+n)/2),o=s(this.at(i,!0),e);if(o===0)return i;o<0?r=i+1:n=i-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(T.FLOAT32)&&!this.dataType.equals(T.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:n,prevBuffer:s}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==s)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==F){s===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const i=this.dataType.density.size(s).valueOf(),o=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,i,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=F}as(e){return _r(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:sr(this.alignmentBounds.lower),upper:sr(this.alignmentBounds.upper),multiple:this.alignmentMultiple},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return b(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 Fa(this);return this.dataType.equals(T.JSON)?new Ya(e):e}return this.dataType.equals(T.UUID)?new Va(this):new Wa(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new nr(this,e,r??this.length)}subAlignmentIterator(e,r){const n=Math.ceil(Number(e-this.alignment)/Number(this.alignmentMultiple)),s=Math.ceil(Number(r-this.alignment)/Number(this.alignmentMultiple));return new nr(this,n,s)}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const n=this.data.subarray(e,r);return new Y({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 s;return e?s=this.data.subarray(r,n):s=this.data.slice(r,n),new Y({data:s,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new Y({data:this.buffer,dataType:this.dataType,timeRange:V.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 Za=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof Xt?!0:Kr(t),tn=ca(en,Xt);let nr=class{series;end;index;constructor(e,r,n){this.series=e;const s=b(0,e.length+1);this.end=dt(s,n),this.index=dt(s,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}},Fa=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]!==Ot;)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))})}},Ya=class rn{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:lt.decodeString(e.value,rn.schema)}}},Va=class{series;index;data;density;constructor(e){if(!e.dataType.equals(T.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=T.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=Ht(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}},Wa=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 Ga{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 _r(e,this.dataType),this}get dataType(){return this.series.length===0?T.UNKNOWN:this.series[0].dataType}get timeRange(){return this.series.length===0?V.ZERO:new V(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?b(0n,0n):b(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(tn(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(j(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 it(this,e,r??this.length)}subAlignmentIterator(e,r){if(e>=this.alignmentBounds.upper||r<=this.alignmentBounds.lower)return $t;let n=0;for(let i=0;i<this.series.length;i++){const o=this.series[i];if(e<o.alignment)break;if(e>=o.alignmentBounds.upper)n+=o.length;else if(j(o.alignmentBounds,e)){n+=Math.ceil(Number(e-o.alignment)/Number(o.alignmentMultiple));break}}let s=0;for(let i=0;i<this.series.length;i++){const o=this.series[i];if(r<o.alignment)break;if(r>=o.alignmentBounds.upper)s+=o.length;else if(j(o.alignmentBounds,r)){s+=Math.ceil(Number(r-o.alignment)/Number(o.alignmentMultiple));break}}return new it(this,n,s)}subAlignmentSpanIterator(e,r){if(e>=this.alignmentBounds.upper)return $t;r=Math.min(r,Number(this.distance(e,this.alignmentBounds.upper)));let n=0;for(let s=0;s<this.series.length;s++){const i=this.series[s];if(e<i.alignment)break;if(e>=i.alignmentBounds.upper)n+=i.length;else if(j(i.alignmentBounds,e)){n+=Number(e-i.alignment);break}}return new it(this,n,n+r)}updateGLBuffer(e){this.series.forEach(r=>r.updateGLBuffer(e))}get bounds(){return Sr(this.series.map(e=>e.bounds))}get byteLength(){return new $e(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(s=>s.alignmentBounds);return Nr(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(s=>s.alignmentBounds);return Ir(n,e,r)}parseJSON(e){if(!this.dataType.equals(T.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 Ha(this.series)}toStrings(){return this.series.flatMap(e=>e.toStrings())}}class Ha{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 it{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 sr=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 Xa=a.z.record(a.z.union([a.z.number(),a.z.string(),a.z.symbol()]),a.z.unknown()),Jt=t=>Object.entries(t),Ja=(t,e)=>Object.fromEntries(Jt(t).map(([r,n])=>[r,e(n,r)])),Ka=t=>Object.fromEntries(Jt(t).filter(([e,r])=>r!==void 0)),Qa=(t,...e)=>{const r={...t};for(const n of e)delete r[n];return r},_a=Object.freeze(Object.defineProperty({__proto__:null,entries:Jt,map:Ja,omit:Qa,purgeUndefined:Ka,unknownZ:Xa},Symbol.toStringTag,{value:"Module"})),nn=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",eo=nn(),sn=["macOS","Windows","Linux"],to=["macos","windows","linux"],ro={macos:"macOS",windows:"Windows",linux:"Linux"},no=a.z.enum(sn).or(a.z.enum(to).transform(t=>ro[t])),so=()=>{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 at;const io=((t={})=>{const{force:e,default:r}=t;return e??at??(at=so(),at??r)}),ao=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:sn,RUNTIME:eo,detect:nn,getOS:io,osZ:no},Symbol.toStringTag,{value:"Module"})),oo=(...t)=>t.map(an).join(""),an=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),uo=t=>t.endsWith("/")?t.slice(0,-1):t;class De{protocol;host;port;path;constructor({host:e,port:r,protocol:n="",pathPrefix:s=""}){this.protocol=n,this.host=e,this.port=r,this.path=an(s)}replace(e){return new De({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new De({...this,pathPrefix:oo(this.path,e)})}toString(){return uo(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new De({host:"unknown",port:0})}const vt=2,Tt=3,on=2,lo=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=ue(e);if(r==0)return t;let n;r>=1e3?n=vt:r>=1?n=Tt:n=Math.ceil(-Math.log10(r))+on;const s=10**n;return Math.round(t*s)/s},co=5,ho=1e-10,fo=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=Math.abs(t);if(r===0)return 0;let n=!1,s=0;if(e!=null){s=ue(e);const l=s/r;n=s>0&&l>ho}if(n){let l;s>=1e3?l=vt:s>=1?l=Tt:l=Math.ceil(-Math.log10(s))+on;const f=10**l;return Math.round(t*f)/f}if(r>=1e3){const l=10**vt;return Math.round(t*l)/l}if(r>=1){const l=10**Tt;return Math.round(t*l)/l}const i=Math.floor(Math.log10(r)),o=10**(co-i-1);return Math.round(t*o)/o},go=Object.freeze(Object.defineProperty({__proto__:null,MAX_INT16:$a,MAX_INT32:va,MAX_INT64:Ze,MAX_INT64_NUMBER:Xr,MAX_INT8:ba,MAX_UINT16:da,MAX_UINT32:ga,MAX_UINT64:pa,MAX_UINT64_NUMBER:ma,MAX_UINT8:fa,MIN_INT16:wa,MIN_INT32:Oa,MIN_INT64:Ta,MIN_INT64_NUMBER:xa,MIN_INT8:ya,abs:Tr,add:oe,closeTo:ds,div:Te,equal:ft,isInteger:ke,max:ps,min:vr,mult:C,roundBySpan:lo,roundToNearestMagnitude:gs,smartRound:fo,sub:q},Symbol.toStringTag,{value:"Module"}));a.z.object({baseInterval:h.z.optional(),maxRetries:a.z.number().optional(),scale:a.z.number().optional()});const po=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,Fe=a.z.string().regex(po),se=a.z.number().min(0).max(255),un=a.z.number().min(0).max(1),_e=a.z.tuple([se,se,se,un]),mo=a.z.tuple([se,se,se]),yo=a.z.object({rgba255:_e}),bo=a.z.number().min(0).max(360),wo=a.z.number().min(0).max(100),$o=a.z.number().min(0).max(100),ln=a.z.tuple([bo,wo,$o,un]),et=a.z.union([Fe,mo,_e,ln,yo]),tt=et.transform(t=>v(t)),Oo=t=>tt.safeParse(t).success,vo=t=>_e.safeParse(t).success,To=(t=>{if(t==null)return;const e=tt.safeParse(t);if(e.success)return hn(e.data);if(typeof t=="string")return t;throw e.error}),v=(t,e=1)=>{if(t=et.parse(t),typeof t=="string")return Pe(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},cn=(t,e)=>{if(t==null||e==null)return t==e;const r=v(t),n=v(e);return r.every((s,i)=>s===n[i])},xo=(t=>{if(t==null)return;const[e,r,n,s]=v(t);return`#${Me(e)}${Me(r)}${Me(n)}${s===1?"":Me(s*255)}`}),hn=t=>{const[e,r,n,s]=v(t);return`rgba(${e}, ${r}, ${n}, ${s})`},So=t=>`rgb(${fn(t)})`,fn=t=>{const[e,r,n]=v(t);return`${e}, ${r}, ${n}`},No=t=>[...Kt(t),me(t)],Kt=t=>[de(t)/255,ge(t)/255,pe(t)/255],de=t=>v(t)[0],ge=t=>v(t)[1],pe=t=>v(t)[2],me=t=>v(t)[3],Io=t=>cn(Qt,t),Mo=t=>Lo(v(t)),zo=(t,e)=>{const[r,n,s]=v(t);if(e>100)throw new Error(`Color opacity must be between 0 and 100, got ${e}`);return e>1&&(e/=100),[r,n,s,e]},Oe=t=>{const[e,r,n]=Kt(t).map(s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4);return Number((.2126*e+.7152*r+.0722*n).toFixed(3))},Ao=t=>{const[e,r,n]=Kt(t);return 1-(Math.max(e,r,n)-Math.min(e,r,n))},xt=(t,e)=>{const r=v(t),n=v(e),s=Oe(r),i=Oe(n);return(Math.max(s,i)+.5)/(Math.min(s,i)+.5)},Eo=(t,...e)=>{if(e.length===0)throw new Error("[Color.pickByContrast] - must provide at least one color");const r=v(t),[n]=e.sort((s,i)=>xt(r,i)-xt(r,s));return v(n)},Uo=t=>Oe(t)<.5,Bo=t=>Oe(t)>.5,Pe=(t,e=1)=>(t=Fe.parse(t),t=Co(t),[ze(t,0),ze(t,2),ze(t,4),t.length===8?ze(t,6)/255:e]),Qt=[0,0,0,0],Me=t=>Math.floor(t).toString(16).padStart(2,"0"),ze=(t,e)=>parseInt(t.slice(e,e+2),16),Co=t=>t.startsWith("#")?t.slice(1):t,ir={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"},jo=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],s=e[3],i=`#${r}${r}${n}${n}${s}${s}`;if(Fe.safeParse(i).success)return Pe(i)}return(e.length===7||e.length===9)&&Fe.safeParse(e).success?Pe(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,s,i,o]=r;return[parseInt(n),parseInt(s),parseInt(i),o?parseFloat(o):1]}}if(ir[e])return Pe(ir[e])}},Ro=t=>{t=ln.parse(t);let[e,r,n]=t;const s=t[3];e/=360,r/=100,n/=100;let i,o,l;if(r===0)i=o=l=n;else{const f=n<.5?n*(1+r):n+r-n*r,c=2*n-f;i=ot(c,f,e+1/3),o=ot(c,f,e),l=ot(c,f,e-1/3)}return[Math.round(i*255),Math.round(o*255),Math.round(l*255),s]},ot=(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),Lo=t=>{t=_e.parse(t);let[e,r,n]=t;const s=t[3];e/=255,r/=255,n/=255;const i=Math.max(e,r,n),o=Math.min(e,r,n);let l,f,c=(i+o)/2;if(i===o)l=f=0;else{const d=i-o;f=c>.5?d/(2-i-o):d/(i+o),i===e?l=(r-n)/d+(r<n?6:0):i===r?l=(n-e)/d+2:l=(e-r)/d+4,l/=6}return l*=360,f*=100,c*=100,[Math.round(l),Math.round(f),Math.round(c),s]},Do=v("#000000"),Po=v("#ffffff"),dn=a.z.object({key:a.z.string(),color:et,position:a.z.number(),switched:a.z.boolean().optional()}),ko=a.z.array(dn),qo=(t,e)=>{if(t.length===0)return Qt;if(t=t.slice().sort((r,n)=>r.position-n.position),e<=t[0].position)return v(t[0].color);if(e>=t[t.length-1].position)return v(t[t.length-1].color);for(let r=0;r<t.length-1;r++){const n=t[r],s=t[r+1];if(e<n.position||e>s.position)continue;if(e===n.position)return v(n.color);if(e===s.position)return v(s.color);const i=(e-n.position)/(s.position-n.position),o=v(n.color),l=v(s.color),f=Math.round(de(o)+i*(de(l)-de(o))),c=Math.round(ge(o)+i*(ge(l)-ge(o))),d=Math.round(pe(o)+i*(pe(l)-pe(o))),m=me(o)+i*(me(l)-me(o));return v([f,c,d,m])}return v(t[t.length-1].color)},Zo=a.z.object({key:a.z.string(),name:a.z.string(),color:tt}),Fo=a.z.object({key:a.z.string(),name:a.z.string(),swatches:a.z.array(Zo)}),gn=Object.freeze(Object.defineProperty({__proto__:null,BLACK:Do,WHITE:Po,ZERO:Qt,aValue:me,bValue:pe,colorZ:tt,construct:v,contrast:xt,crudeZ:et,cssString:To,equals:cn,fromCSS:jo,fromGradient:qo,fromHSLA:Ro,gValue:ge,gradientZ:ko,grayness:Ao,hex:xo,hsla:Mo,isColor:vo,isCrude:Oo,isDark:Uo,isLight:Bo,isZero:Io,luminance:Oe,paletteZ:Fo,pickByContrast:Eo,rValue:de,rgbCSS:So,rgbString:fn,rgba1:No,rgbaCSS:hn,setAlpha:zo,stopZ:dn},Symbol.toStringTag,{value:"Module"})),pn=a.z.int().min(0).max(255),mn=255,yn=0,Yo={lower:yn,upper:mn+1},bn=a.z.object({name:a.z.string(),key:a.z.string()}),ve=t=>a.z.object({subject:bn,resource:t,authority:pn}),Vo=(...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}),wn=t=>a.z.object({from:ve(t),to:a.z.null()}),$n=t=>a.z.object({from:a.z.null(),to:ve(t)}),Wo=t=>a.z.union([wn(t),$n(t),a.z.object({from:ve(t),to:ve(t)})]),Go=Object.freeze(Object.defineProperty({__proto__:null,ABSOLUTE_AUTHORITY:mn,AUTHORITY_BOUNDS:Yo,ZERO_AUTHORITY:yn,acquireZ:$n,authorityZ:pn,filterTransfersByChannelKey:Vo,releaseZ:wn,stateZ:ve,subjectZ:bn,transferZ:Wo},Symbol.toStringTag,{value:"Module"})),Ho=t=>Object.getOwnPropertySymbols(globalThis).includes(t),Xo=(t,e)=>{const r=Symbol.for(t);if(!Ho(r)){const n=e();Object.defineProperty(globalThis,r,{value:n})}return()=>globalThis[r]},On="sy_x_error",Jo=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),vn=t=>class fe extends Error{static discriminator=On;discriminator=fe.discriminator;static TYPE=t;type=fe.TYPE;static matches=Jo(t);matches=fe.matches;constructor(r,n){super(r,n),this.name=fe.TYPE}static sub(r){return vn(`${t}.${r}`)}},Ko=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==On)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},le="unknown",ar="nil";class Qo{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:ar,data:""};if(Ko(e))for(const r of this.providers){const n=r.encode(e);if(n!=null)return n}if(e instanceof Error)return{type:le,data:e.message};if(typeof e=="string")return{type:le,data:e};try{return{type:le,data:JSON.stringify(e)}}catch{return{type:le,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===ar)return null;if(e.type===le)return new or(e.data);for(const r of this.providers){const n=r.decode(e);if(n!=null)return n}return new or(e.data)}}Xo("synnax-error-registry",()=>new Qo);class or extends vn("unknown"){}a.z.object({type:a.z.string(),data:a.z.string()});const _o=()=>new Promise(t=>setTimeout(t,0)),eu=a.object({jsonrpc:a.literal("2.0"),method:a.string(),params:a.any().optional(),id:a.union([a.string(),a.number(),a.null()]).optional()}),Tn=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number(),a.null()])}),tu=Tn.extend({result:a.json()}),ru=Tn.extend({error:a.object({code:a.number().int(),message:a.string().optional(),data:a.json().optional()})}),nu=a.union([tu,ru]);a.union([eu,nu]);const su=a.uuid(),iu=a.object({key:su,name:a.string().min(1),color:a.string()}),au=(t,e,r)=>{const n=t.get(e);return n===void 0?(t.set(e,r),r):n},ou=Object.freeze(Object.defineProperty({__proto__:null,getOrSetDefault:au},Symbol.toStringTag,{value:"Module"})),St=a.z.string().regex(/^\d+\.\d+\.\d+$/),Se=((t,e,r={})=>{r.checkMajor??=!0,r.checkMinor??=!0,r.checkPatch??=!0;const n=St.parse(t),s=St.parse(e),[i,o,l]=n.split(".").map(Number),[f,c,d]=s.split(".").map(Number);if(r.checkMajor){if(i<f)return Ee;if(i>f)return Ue}if(r.checkMinor){if(o<c)return Ee;if(o>c)return Ue}if(r.checkPatch){if(l<d)return Ee;if(l>d)return Ue}return ie}),uu=(t,e,r={})=>wr(Se(t,e,r)),xn=(t,e,r={})=>br(Se(t,e,r)),lu=(t,e,r={})=>yr(Se(t,e,r)),cu=({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}},hu=({name:t,migrations:e,targetSchema:r,defaultVersion:n,def:s})=>{const i=Object.keys(e).sort(Se).pop();if(i==null)return c=>{if(c.version??=n,c.version!==s.version)return console.log(`${t} version ${c.version} is newer than latest version of ${s.version}.
|
|
7
|
+
Returning default instead.
|
|
8
|
+
`),s;try{return r!=null?r.parse(c):c}catch(d){return console.log(`${t} failed to parse default. Exiting with default`),console.error(d),s}};const o=Object.keys(e).length;let l=!1;const f=c=>{try{if(o===0||xn(c.version,i))return console.log(l?`${t} ${c.version} now up to date`:`${t} version ${c.version} is up to date with target version ${s.version}`),c;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 ${i}`),console.error(d),s}};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`),s;return f(c)}catch(d){return console.log(`${t} failed to parse final result. Exiting with default`),console.error(d),s}}},fu=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:Se,createMigration:cu,migrator:hu,semVerNewer:xn,semVerOlder:lu,semVerZ:St,versionsEqual:uu},Symbol.toStringTag,{value:"Module"})),Sn=["standard","scientific","engineering"],du=a.z.enum(Sn),gu=(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}`},pu=Object.freeze(Object.defineProperty({__proto__:null,NOTATIONS:Sn,notationZ:du,stringifyNumber:gu},Symbol.toStringTag,{value:"Module"})),mu=t=>Array.isArray(t)?[...t]:typeof t=="object"&&t!==null?{...t}:t,Nn=a.z.enum(["success","info","warning","error","loading","disabled"]),yu=t=>a.z.object({key:a.z.string(),name:a.z.string().default(""),variant:Nn,message:a.z.string(),description:a.z.string().optional(),time:$.z,labels:lr(iu).optional(),details:t??a.z.unknown().optional()}),bu=a.z.object({stack:a.z.string(),error:a.z.instanceof(Error)}),wu=(t,e)=>{if(!(t instanceof Error))throw t;return In({variant:"error",message:e??t.message,description:e!=null?t.message:void 0,details:{stack:t.stack??"",error:t}})},In=t=>({key:Gt(),time:$.now(),name:"",...t}),$u=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?t:void 0:e===t?t:void 0},Ou=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?void 0:t:e===t?void 0:t},vu=Object.freeze(Object.defineProperty({__proto__:null,create:In,exceptionDetailsSchema:bu,fromException:wu,keepVariants:$u,removeVariants:Ou,statusZ:yu,variantZ:Nn},Symbol.toStringTag,{value:"Module"})),Tu=(t,e)=>{if(!e.has(t))return t;let r=t,n=1,s=t;for(;e.has(s);){const i=s.match(xu);i?(r=s.slice(0,i.index).trim(),n=parseInt(i[1])+1):(r=s,n=1),s=`${r} (${n})`}return s},xu=/\((\d+)\)$/,Su=(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]}`},Nu=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 s=/\d+/g;t.match(s)&&e.forEach((o,l)=>{if(s.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 i=e.map(o=>(o.length>3?o.substring(0,3):o).toLowerCase());return r.add(i.join("").replace(/-/g,"_")),r.add(i.join("_").replace(/-/g,"_")),Array.from(r).filter(o=>o.length>=2&&o.length<=12&&!/^\d/.test(o))},Iu=(t,e)=>t.startsWith(e)?t.slice(e.length):t,Mu=Object.freeze(Object.defineProperty({__proto__:null,createShortIdentifiers:Nu,deduplicateFileName:Tu,naturalLanguageJoin:Su,trimPrefix:Iu},Symbol.toStringTag,{value:"Module"})),zu=new Error("request for lock canceled");var Au=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,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?i(d.value):s(d.value).then(l,f)}c((n=n.apply(t,e||[])).next())})};class Eu{constructor(e,r=zu){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,s)=>{const i={resolve:n,reject:s,weight:e,priority:r},o=Mn(this._queue,l=>r<=l.priority);o===-1&&e<=this._value?this._dispatchItem(i):this._queue.splice(o+1,0,i)})}runExclusive(e){return Au(this,arguments,void 0,function*(r,n=1,s=0){const[i,o]=yield this.acquire(n,s);try{return yield r(i)}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]=[]),Uu(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 s=n.findIndex(i=>i.priority<=e);(s===-1?n:n.splice(0,s)).forEach((i=>i.resolve()))}}}_couldLockImmediately(e,r){return(this._queue.length===0||this._queue[0].priority<r)&&e<=this._value}}function Uu(t,e){const r=Mn(t,n=>e.priority<=n.priority);t.splice(r+1,0,e)}function Mn(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}var Bu=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,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?i(d.value):s(d.value).then(l,f)}c((n=n.apply(t,e||[])).next())})};class Cu{constructor(e){this._semaphore=new Eu(1,e)}acquire(){return Bu(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 zn extends Cu{constructor(e){super(),Object.assign(this,e)}}const ju=t=>new zn(t),Ru=Object.freeze(Object.defineProperty({__proto__:null,mutex:zn,newMutex:ju},Symbol.toStringTag,{value:"Module"}));function An(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=An(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function En(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=An(t))&&(n&&(n+=" "),n+=e);return n}const Lu=En,re="-",ur="__",Ae="--",Un=t=>{const e=(...r)=>Lu(...r);return e.B=(...r)=>t+re+r.join(re),e.E=r=>t+ur+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)+ur+n.join(re),e.BEM=(r,n,...s)=>e.BE(r,n)+Ae+s.join(re),e.var=(...r)=>Ae+t+re+r.join(re),e};class Du{rows=[];columns=[];prefix;constructor(e=""){this.prefix=e}row(e,r,n){const{prefix:s}=this;return this.rows.push({startLabel:s+e,endLabel:s+r,size:n}),this}col(e,r,n){const{prefix:s}=this;return this.columns.push({startLabel:s+e,endLabel:s+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 Pu=(t,e)=>Object.entries(e).forEach(([r,n])=>n!=null&&t.style.setProperty(r,`${n}`)),ku=(t,e)=>Array.from(t.style).forEach(r=>{r.startsWith(e)&&t.style.removeProperty(r)}),qu=t=>{const e=Un(t);return e.visible=r=>e.M(r?"visible":"hidden"),e.expanded=r=>e.M(r?"expanded":"collapsed"),e.loc=r=>e.M("location",Ur.construct(r)),e.disabled=r=>r===!0&&e.M("disabled"),e.align=r=>e.M(r),e.dir=r=>r!=null&&e.M("direction",zr.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=Pu,e.removeVars=ku,e.newGridBuilder=r=>new Du(r),e.dropRegion=r=>r&&e.B("haul-drop-region"),e.px=r=>`${r}px`,e.inheritDims=(r=!0)=>r&&e.M("inherit-dims"),e.shade=(r=>r!=null&&e.M(`shade-${r}`)),e.colorVar=r=>{if(!(r==null||r===!1))return typeof r=="number"?`var(--${t}-gray-l${r})`:gn.cssString(r)},e.levelSizeVar=r=>`var(--${t}-${r}-size)`,e.level=r=>e.M(`level-${r}`),e},Zu=qu("pluto");exports.A=Kn;exports.C=br;exports.C$1=ia;exports.CSS=Zu;exports.Dr=_o;exports.Dt=la;exports.E=Qn;exports.F=ts;exports.Gr=pu;exports.H=zs;exports.Hr=ou;exports.K=Ur;exports.Kr=Mu;exports.Lr=gn;exports.Oe=Ga;exports.P=Ee;exports.Q=ci;exports.Qr=mu;exports.R=Vr;exports.Rr=go;exports.S=ao;exports.T=_n;exports.U=Vn;exports.Ur=Go;exports.Xr=fu;exports.Yr=vu;exports._=es;exports._$1=Xi;exports.a=Rn;exports.a$1=h;exports.c=Hn;exports.c$1=ie;exports.c$2=$e;exports.clsx=En;exports.d=mr;exports.de=Na;exports.en=Ru;exports.f=Ve;exports.g=I;exports.ge=Pa;exports.j=wr;exports.jt=Di;exports.k=rs;exports.l=_a;exports.m=V;exports.n=T;exports.newBEM=Un;exports.p=zr;exports.p$1=pr;exports.q=Ue;exports.r=$;exports.v=Re;exports.w=yr;exports.x=Xt;exports.y=Jn;
|
package/dist/css.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-HnNQMUzV.cjs"),t=require("./units-DCifOxd9.cjs");exports.CSS=e.CSS;exports.newBEM=e.newBEM;exports.createHexOpacityVariants=t.createHexOpacityVariants;exports.unitProperty=t.unitProperty;
|
package/dist/css.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as e, n as t } from "./css-
|
|
2
|
-
import { c as s, u as n } from "./units-
|
|
1
|
+
import { C as e, n as t } from "./css-D6ZBcSwh.js";
|
|
2
|
+
import { c as s, u as n } from "./units-BqIfn6VX.js";
|
|
3
3
|
export {
|
|
4
4
|
e as CSS,
|
|
5
5
|
s as createHexOpacityVariants,
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,349 @@
|
|
|
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-D6ZBcSwh.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./css-HnNQMUzV.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/dialog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-BcZE443U.cjs");exports.Dialog=e.external;
|
package/dist/dialog.js
CHANGED