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