@synnaxlabs/pluto 0.38.2 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Center-BjxFDxgi.cjs +1 -0
- package/dist/Center-DoAxDY5V.js +24 -0
- package/dist/ContextMenu-BWGS1vXl.cjs +1 -0
- package/dist/ContextMenu-DX6j7Wwi.js +101 -0
- package/dist/DateTime-DUuYjZr8.cjs +1 -0
- package/dist/DateTime-sO15tvDD.js +17 -0
- package/dist/Divider-C5m3c4pv.js +1428 -0
- package/dist/Divider-MIbyu5ZH.cjs +31 -0
- package/dist/Dropdown-DurKTABg.cjs +1 -0
- package/dist/Dropdown-FSmdakic.js +261 -0
- package/dist/Haul-CoG7Jmz6.cjs +1 -0
- package/dist/Haul-DrdXQaTq.js +125 -0
- package/dist/Item-CZAsnOoO.js +108 -0
- package/dist/Item-Dj7cQJ8t.cjs +1 -0
- package/dist/Keyboard-D4FRdVej.cjs +1 -0
- package/dist/Keyboard-lwCx7plR.js +29 -0
- package/dist/{Link-DO2YbtQM.cjs → Link-BSZ-HrRf.cjs} +1 -1
- package/dist/{Link-BIWA4Kdj.js → Link-lleSh5eG.js} +2 -2
- package/dist/Pack-BbwDtaE6.cjs +1 -0
- package/dist/Pack-CzZzxA2R.cjs +1 -0
- package/dist/Pack-D50qN0Vu.js +13 -0
- package/dist/Pack-Dlj4dZzQ.js +46 -0
- package/dist/Provider-CCZPt2M5.js +436 -0
- package/dist/Provider-YIru1nvE.cjs +1 -0
- package/dist/Space-DBmhvGQL.js +76 -0
- package/dist/Space-NNqCWFbg.cjs +1 -0
- package/dist/Text-B3pNXYhh.js +124 -0
- package/dist/Text-D1GKnp9s.cjs +1 -0
- package/dist/Text-DT2rIwXL.js +1199 -0
- package/dist/Text-DrXyKZwR.cjs +1 -0
- package/dist/Text-Hnsb1fus.cjs +4 -0
- package/dist/Text-g6btwQ6E.js +32 -0
- package/dist/Toggle-BzORI5sE.cjs +1 -0
- package/dist/Toggle-DZMcFiiI.js +356 -0
- package/dist/{Video-usN9Roxq.cjs → Video-BJudMCoc.cjs} +1 -1
- package/dist/{Video-CAbdyjCE.js → Video-DPIAdJ-g.js} +2 -2
- package/dist/WithIcon-C6COgbZq.js +92 -0
- package/dist/WithIcon-CJvuPkSy.cjs +1 -0
- package/dist/aggregator-5XpEdQtr.js +83 -0
- package/dist/aggregator-BAdXZfPY.cjs +1 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-CU7tous7.cjs +1 -0
- package/dist/{css-Bbri4zkj.js → css-rxwBYwM1.js} +136 -136
- 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-BjupBYvk.cjs +1 -0
- package/dist/deep-ChDJVfub.js +105 -0
- package/dist/dimensions-Bt1NqWz6.js +18 -0
- package/dist/dimensions-IEzi7AOM.cjs +1 -0
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/eraser-CnbMvm7W.cjs +11 -0
- package/dist/eraser-DKQ5u3sz.js +823 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +89 -85
- package/dist/external-AOOzgEKd.cjs +1 -0
- package/dist/external-B8Z-4vz2.cjs +46 -0
- package/dist/external-BJulb-Hm.cjs +1 -0
- package/dist/external-BOOtUi1D.js +20 -0
- package/dist/external-BQtPGUNg.cjs +1 -0
- package/dist/external-BTGfIw_K.cjs +1 -0
- package/dist/external-Bxg2-RDn.js +13 -0
- package/dist/{Toggle-DvdBHJvZ.js → external-C710XUvC.js} +17484 -30626
- package/dist/external-C8i1PCpN.js +59 -0
- package/dist/external-CL_RlqOT.cjs +1 -0
- package/dist/external-CNyc2Q9k.cjs +1 -0
- package/dist/{external-CWIwuJks.cjs → external-CRbERCqd.cjs} +1 -1
- package/dist/external-CjZqwgDh.js +1265 -0
- package/dist/external-D18IGHXh.js +77 -0
- package/dist/external-DF0wHYUj.js +8990 -0
- package/dist/external-DK_wU08V.js +19 -0
- package/dist/external-DNC1e6Hi.js +343 -0
- package/dist/external-DYn3iC-U.js +418 -0
- package/dist/external-DhX0dZoF.cjs +1 -0
- package/dist/external-Dmr3e50U.js +15 -0
- package/dist/external-DrwngojV.cjs +1 -0
- package/dist/external-GUQ0NMxY.js +111 -0
- package/dist/external-Vjn4WKwt.cjs +85 -0
- package/dist/external-vVwTqni5.cjs +1 -0
- package/dist/font-CD9W5Tsh.js +15 -0
- package/dist/font-MRTGIokZ.cjs +1 -0
- package/dist/fontString-MM82zgKY.cjs +1 -0
- package/dist/fontString-p8gMjlA1.js +12 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-BKLtEDxx.cjs +1 -0
- package/dist/hooks-CwSxEEAh.js +293 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +7520 -7281
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +98 -98
- package/dist/{jsx-runtime-D8EVjfnb.cjs → jsx-runtime-UYeBbnYT.cjs} +8 -8
- 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-D3MPSb7n.cjs +53 -0
- package/dist/provider-DfVWtUxZ.js +10299 -0
- package/dist/src/accordion/Accordion.d.ts +1 -1
- package/dist/src/accordion/Accordion.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts +8 -9
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/alamos/Provider.d.ts +1 -1
- package/dist/src/alamos/Provider.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
- package/dist/src/align/Center.d.ts +1 -1
- package/dist/src/align/Center.d.ts.map +1 -1
- package/dist/src/align/Pack.d.ts +1 -1
- package/dist/src/align/Pack.d.ts.map +1 -1
- package/dist/src/align/Space.d.ts +1 -1
- package/dist/src/align/Space.d.ts.map +1 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +8 -9
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/Icon.d.ts.map +1 -1
- package/dist/src/button/Link.d.ts +1 -1
- package/dist/src/button/Link.d.ts.map +1 -1
- package/dist/src/button/Toggle.d.ts +2 -2
- package/dist/src/button/Toggle.d.ts.map +1 -1
- package/dist/src/button/color.d.ts +1 -1
- package/dist/src/button/color.d.ts.map +1 -1
- package/dist/src/caret/Animated.d.ts.map +1 -1
- package/dist/src/channel/AliasProvider.d.ts +5 -6
- package/dist/src/channel/AliasProvider.d.ts.map +1 -1
- package/dist/src/channel/LinePlot.d.ts +1 -1
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/channel/Select.d.ts +2 -2
- package/dist/src/channel/Select.d.ts.map +1 -1
- package/dist/src/color/BaseSwatch.d.ts +10 -0
- package/dist/src/color/BaseSwatch.d.ts.map +1 -0
- package/dist/src/color/GradientPicker.d.ts.map +1 -1
- package/dist/src/color/Picker.d.ts +1 -1
- package/dist/src/color/Picker.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +14 -12
- package/dist/src/color/Provider.d.ts.map +1 -1
- package/dist/src/color/Swatch.d.ts +3 -7
- package/dist/src/color/Swatch.d.ts.map +1 -1
- package/dist/src/color/core/color.d.ts.map +1 -1
- package/dist/src/color/core/gradient.d.ts.map +1 -1
- package/dist/src/color/core/transformColorsToHex.d.ts.map +1 -1
- package/dist/src/css/bem.d.ts.map +1 -1
- package/dist/src/css/color.d.ts +3 -4
- package/dist/src/css/color.d.ts.map +1 -1
- package/dist/src/css/units.d.ts.map +1 -1
- package/dist/src/css/vars.d.ts.map +1 -1
- package/dist/src/cursor/cursor.d.ts.map +1 -1
- package/dist/src/dialog/use.d.ts +36 -17
- package/dist/src/dialog/use.d.ts.map +1 -1
- package/dist/src/divider/Divider.d.ts +1 -1
- package/dist/src/divider/Divider.d.ts.map +1 -1
- package/dist/src/dropdown/Dropdown.d.ts +3 -3
- package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/form/Field.d.ts +9 -1
- package/dist/src/form/Field.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +19 -9
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/form/synced.d.ts +1 -1
- package/dist/src/form/synced.d.ts.map +1 -1
- package/dist/src/generic/Generic.d.ts +1 -1
- package/dist/src/generic/Generic.d.ts.map +1 -1
- package/dist/src/hardware/device/Select.d.ts +2 -2
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/hardware/rack/Select.d.ts +7 -0
- package/dist/src/hardware/rack/Select.d.ts.map +1 -0
- package/dist/src/hardware/rack/index.d.ts +2 -0
- package/dist/src/hardware/rack/index.d.ts.map +1 -0
- package/dist/src/haul/Haul.d.ts +13 -5
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/header/Actions.d.ts +3 -2
- package/dist/src/header/Actions.d.ts.map +1 -1
- package/dist/src/header/ButtonTitle.d.ts +1 -1
- package/dist/src/header/ButtonTitle.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts +1 -1
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/header/Title.d.ts +1 -1
- package/dist/src/header/Title.d.ts.map +1 -1
- package/dist/src/hooks/effect.d.ts.map +1 -1
- package/dist/src/hooks/ref.d.ts +3 -2
- package/dist/src/hooks/ref.d.ts.map +1 -1
- package/dist/src/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useCursorDrag.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebKit.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebView.d.ts.map +1 -1
- package/dist/src/hooks/useDebouncedCallback.d.ts.map +1 -1
- package/dist/src/hooks/useDelayedState.d.ts.map +1 -1
- package/dist/src/hooks/useFilter.d.ts.map +1 -1
- package/dist/src/hooks/useRequiredContext.d.ts.map +1 -1
- package/dist/src/hooks/useResize.d.ts.map +1 -1
- package/dist/src/hooks/useTransforms.d.ts.map +1 -1
- package/dist/src/hooks/useUniqueKey.d.ts +2 -2
- package/dist/src/hooks/useUniqueKey.d.ts.map +1 -1
- package/dist/src/icon/Icon.d.ts +1 -1
- package/dist/src/icon/Icon.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Date.d.ts +1 -1
- package/dist/src/input/Date.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts +1 -2
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/DragButton.d.ts +1 -1
- package/dist/src/input/DragButton.d.ts.map +1 -1
- package/dist/src/input/HelpText.d.ts +1 -1
- package/dist/src/input/HelpText.d.ts.map +1 -1
- package/dist/src/input/Item.d.ts +1 -1
- package/dist/src/input/Item.d.ts.map +1 -1
- package/dist/src/input/Label.d.ts +1 -1
- package/dist/src/input/Label.d.ts.map +1 -1
- package/dist/src/input/Numeric.d.ts +1 -1
- package/dist/src/input/Numeric.d.ts.map +1 -1
- package/dist/src/input/Switch.d.ts +1 -1
- package/dist/src/input/Switch.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +2 -2
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/input/TextArea.d.ts +1 -1
- package/dist/src/input/TextArea.d.ts.map +1 -1
- package/dist/src/input/Time.d.ts +1 -1
- package/dist/src/input/Time.d.ts.map +1 -1
- package/dist/src/label/Select.d.ts +3 -3
- package/dist/src/label/Select.d.ts.map +1 -1
- package/dist/src/list/Column.d.ts +4 -7
- package/dist/src/list/Column.d.ts.map +1 -1
- package/dist/src/list/Core.d.ts +3 -3
- package/dist/src/list/Core.d.ts.map +1 -1
- package/dist/src/list/Data.d.ts +2 -2
- package/dist/src/list/Data.d.ts.map +1 -1
- package/dist/src/list/Filter.d.ts +1 -1
- package/dist/src/list/Filter.d.ts.map +1 -1
- package/dist/src/list/Hover.d.ts.map +1 -1
- package/dist/src/list/Infinite.d.ts +2 -2
- package/dist/src/list/Infinite.d.ts.map +1 -1
- package/dist/src/list/Item.d.ts +1 -1
- package/dist/src/list/Item.d.ts.map +1 -1
- package/dist/src/list/List.d.ts.map +1 -1
- package/dist/src/list/Search.d.ts +1 -1
- package/dist/src/list/Search.d.ts.map +1 -1
- package/dist/src/list/Selector.d.ts +2 -2
- package/dist/src/list/Selector.d.ts.map +1 -1
- package/dist/src/list/useSelect.d.ts.map +1 -1
- package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
- package/dist/src/menu/ContextMenu.d.ts +1 -1
- package/dist/src/menu/ContextMenu.d.ts.map +1 -1
- package/dist/src/menu/Menu.d.ts +3 -5
- package/dist/src/menu/Menu.d.ts.map +1 -1
- package/dist/src/modal/Modal.d.ts +2 -2
- package/dist/src/modal/Modal.d.ts.map +1 -1
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/mosaic/tree.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +5 -0
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/mosaic/use.d.ts.map +1 -1
- package/dist/src/nav/Bar.d.ts +1 -1
- package/dist/src/nav/Bar.d.ts.map +1 -1
- package/dist/src/nav/Drawer.d.ts +1 -1
- package/dist/src/nav/Drawer.d.ts.map +1 -1
- package/dist/src/notation/Select.d.ts +1 -1
- package/dist/src/notation/Select.d.ts.map +1 -1
- package/dist/src/notation/notation.d.ts.map +1 -1
- package/dist/src/note/Note.d.ts +1 -1
- package/dist/src/note/Note.d.ts.map +1 -1
- package/dist/src/observe/use.d.ts.map +1 -1
- package/dist/src/os/Controls/Controls.d.ts +1 -1
- package/dist/src/os/Controls/Controls.d.ts.map +1 -1
- package/dist/src/os/Controls/Mac.d.ts +1 -1
- package/dist/src/os/Controls/Mac.d.ts.map +1 -1
- package/dist/src/os/Controls/Windows.d.ts +1 -1
- package/dist/src/os/Controls/Windows.d.ts.map +1 -1
- package/dist/src/override/factory.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/portal/Portal.d.ts.map +1 -1
- package/dist/src/progress/Progress.d.ts.map +1 -1
- package/dist/src/ranger/Select.d.ts +3 -3
- package/dist/src/ranger/Select.d.ts.map +1 -1
- package/dist/src/ranger/SelectLabel.d.ts.map +1 -1
- package/dist/src/ranger/TimeRangeChip.d.ts +1 -1
- package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
- package/dist/src/resize/Core.d.ts +1 -1
- package/dist/src/resize/Core.d.ts.map +1 -1
- package/dist/src/resize/Multiple.d.ts +1 -1
- package/dist/src/resize/Multiple.d.ts.map +1 -1
- package/dist/src/resize/Single.d.ts +1 -1
- package/dist/src/resize/Single.d.ts.map +1 -1
- package/dist/src/select/Alignment.d.ts +1 -1
- package/dist/src/select/Alignment.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +3 -3
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/ClearButton.d.ts.map +1 -1
- package/dist/src/select/ComponentSize.d.ts +1 -1
- package/dist/src/select/ComponentSize.d.ts.map +1 -1
- package/dist/src/select/DataType.d.ts +1 -1
- package/dist/src/select/DataType.d.ts.map +1 -1
- package/dist/src/select/Direction.d.ts +1 -1
- package/dist/src/select/Direction.d.ts.map +1 -1
- package/dist/src/select/List.d.ts +1 -1
- package/dist/src/select/List.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts +2 -2
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts +1 -1
- package/dist/src/select/Single.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/text/Level.d.ts +11 -0
- package/dist/src/select/text/Level.d.ts.map +1 -0
- package/dist/src/select/text/Weight.d.ts +11 -0
- package/dist/src/select/text/Weight.d.ts.map +1 -0
- package/dist/src/select/text/external.d.ts +3 -0
- package/dist/src/select/text/external.d.ts.map +1 -0
- package/dist/src/select/text/index.d.ts +2 -0
- package/dist/src/select/text/index.d.ts.map +1 -0
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Aggregator.d.ts +13 -10
- package/dist/src/status/Aggregator.d.ts.map +1 -1
- package/dist/src/status/Aggregator.spec.d.ts +2 -0
- package/dist/src/status/Aggregator.spec.d.ts.map +1 -0
- package/dist/src/status/Circle.d.ts +1 -1
- package/dist/src/status/Circle.d.ts.map +1 -1
- package/dist/src/status/Notification.d.ts +1 -1
- package/dist/src/status/Notification.d.ts.map +1 -1
- package/dist/src/status/Notification.spec.d.ts +2 -0
- package/dist/src/status/Notification.spec.d.ts.map +1 -0
- package/dist/src/status/Text.d.ts +6 -8
- package/dist/src/status/Text.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts +18 -8
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts +4 -2
- package/dist/src/status/aether/types.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/steps/Steps.d.ts +1 -1
- package/dist/src/steps/Steps.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +30 -30
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/Table.d.ts +3 -3
- package/dist/src/table/Table.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/Forms.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts +1 -1
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +6 -71
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/tabs/external.d.ts +1 -0
- package/dist/src/tabs/external.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +6 -0
- package/dist/src/tabs/types.d.ts.map +1 -1
- package/dist/src/tabs/useContext.d.ts +64 -0
- package/dist/src/tabs/useContext.d.ts.map +1 -0
- package/dist/src/tag/Tag.d.ts +1 -1
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/telem/Provider.d.ts.map +1 -1
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/convertSeries.d.ts.map +1 -1
- package/dist/src/telem/aether/factory.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/client.d.ts.map +1 -1
- package/dist/src/telem/client/types.d.ts.map +1 -1
- package/dist/src/telem/control/Chip.d.ts +1 -1
- package/dist/src/telem/control/Chip.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/Indicator.d.ts.map +1 -1
- package/dist/src/telem/control/Legend.d.ts +1 -1
- package/dist/src/telem/control/Legend.d.ts.map +1 -1
- package/dist/src/telem/control/StateProvider.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +4 -4
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/testutil/dom.d.ts.map +1 -1
- package/dist/src/text/DateTime.d.ts +1 -1
- package/dist/src/text/DateTime.d.ts.map +1 -1
- package/dist/src/text/Editable.d.ts +2 -2
- package/dist/src/text/Editable.d.ts.map +1 -1
- package/dist/src/text/Keyboard.d.ts +1 -1
- package/dist/src/text/Keyboard.d.ts.map +1 -1
- package/dist/src/text/Link.d.ts +1 -1
- package/dist/src/text/Link.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +2 -2
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/WithIcon.d.ts +1 -1
- package/dist/src/text/WithIcon.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts.map +1 -1
- package/dist/src/text/dimensions.d.ts.map +1 -1
- package/dist/src/text/external.d.ts +0 -1
- package/dist/src/text/external.d.ts.map +1 -1
- package/dist/src/theming/Provider.d.ts +3 -4
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/fontString.d.ts.map +1 -1
- package/dist/src/theming/css.d.ts.map +1 -1
- package/dist/src/theming/external.d.ts +0 -1
- package/dist/src/theming/external.d.ts.map +1 -1
- package/dist/src/theming/font.d.ts.map +1 -1
- package/dist/src/theming/index.d.ts.map +1 -1
- package/dist/src/tooltip/Config.d.ts +0 -1
- package/dist/src/tooltip/Config.d.ts.map +1 -1
- package/dist/src/tooltip/Dialog.d.ts.map +1 -1
- package/dist/src/tooltip/wrap.d.ts.map +1 -1
- package/dist/src/tree/Tree.d.ts +4 -3
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts +3 -1
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts +3 -2
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/triggers/Status.d.ts.map +1 -1
- package/dist/src/triggers/Text.d.ts +1 -1
- package/dist/src/triggers/Text.d.ts.map +1 -1
- package/dist/src/triggers/hooks.d.ts +1 -1
- package/dist/src/triggers/hooks.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/triggers/useDrag.d.ts.map +1 -1
- package/dist/src/util/canDisable.d.ts.map +1 -1
- package/dist/src/util/children.d.ts +2 -2
- package/dist/src/util/children.d.ts.map +1 -1
- package/dist/src/util/component.d.ts.map +1 -1
- package/dist/src/util/event.d.ts.map +1 -1
- package/dist/src/util/findParent.d.ts.map +1 -1
- package/dist/src/util/reflow.d.ts.map +1 -1
- package/dist/src/util/removeProps.d.ts.map +1 -1
- package/dist/src/util/renderProp.d.ts +1 -1
- package/dist/src/util/renderProp.d.ts.map +1 -1
- package/dist/src/util/rootElement.d.ts.map +1 -1
- package/dist/src/util/zod.d.ts.map +1 -1
- package/dist/src/video/Video.d.ts +1 -1
- package/dist/src/video/Video.d.ts.map +1 -1
- package/dist/src/viewport/Mask.d.ts +1 -1
- package/dist/src/viewport/Mask.d.ts.map +1 -1
- package/dist/src/viewport/SelectMode.d.ts +1 -1
- package/dist/src/viewport/SelectMode.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/ticks.d.ts +1 -1
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/button/use.d.ts.map +1 -1
- package/dist/src/vis/canvas/Canvas.d.ts +1 -1
- package/dist/src/vis/canvas/Canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts +7 -5
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/diagram/align.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/Edge.d.ts +1 -1
- package/dist/src/vis/diagram/edge/Edge.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/paths.d.ts +1 -1
- package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -1
- package/dist/src/vis/diagram/util.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts +1 -1
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/eraser/use.d.ts.map +1 -1
- package/dist/src/vis/grid/grid.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +1 -1
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +1 -1
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +1 -1
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/light/use.d.ts.map +1 -1
- package/dist/src/vis/line/Line.d.ts +1 -1
- package/dist/src/vis/line/Line.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Legend.d.ts +2 -2
- package/dist/src/vis/lineplot/Legend.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Line.d.ts +1 -1
- package/dist/src/vis/lineplot/Line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +3 -3
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Title.d.ts +1 -1
- package/dist/src/vis/lineplot/Title.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Viewport.d.ts +1 -1
- package/dist/src/vis/lineplot/Viewport.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/src/vis/log/Log.d.ts +1 -1
- package/dist/src/vis/log/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/Measure.d.ts.map +1 -1
- package/dist/src/vis/render/util.d.ts.map +1 -1
- package/dist/src/vis/rule/Rule.d.ts +1 -1
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/Grid.d.ts +1 -1
- package/dist/src/vis/schematic/Grid.d.ts.map +1 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts +1 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +3 -3
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +80 -80
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +1 -2
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/setpoint/use.d.ts.map +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/toggle/use.d.ts.map +1 -1
- package/dist/src/vis/value/Form.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/src/worker/Context.d.ts.map +1 -1
- package/dist/state-BKyv_jWZ.cjs +15 -0
- package/dist/state-w46WTrh-.js +2399 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/toArray-DRKOku1s.cjs +1 -0
- package/dist/toArray-Dvn9FA_3.js +5 -0
- package/dist/{transformColorsToHex-CDwcIPob.cjs → transformColorsToHex-B2Bui-Wf.cjs} +1 -1
- package/dist/{transformColorsToHex-CnZpPlL2.js → transformColorsToHex-B6dG2LA6.js} +1 -1
- 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/{units-BpKy5yTv.cjs → units-CvIf5nF_.cjs} +1 -1
- package/dist/{units-CNGjg1NV.js → units-D7qkgH-s.js} +1 -1
- package/dist/useClickOutside-EJHWO4Q9.cjs +1 -0
- package/dist/useClickOutside-vpv_GiBw.js +107 -0
- package/dist/useDebouncedCallback-CVLx7N1s.cjs +1 -0
- package/dist/useDebouncedCallback-DDLuEZa8.js +7 -0
- package/dist/useMemoCompare-B-Y9Ft2w.js +19 -0
- package/dist/useMemoCompare-ONEAVO05.cjs +1 -0
- package/dist/useVirtualCursorDragWebKit-BLtwRQY7.cjs +1 -0
- package/dist/useVirtualCursorDragWebKit-DFC-XFfl.js +65 -0
- package/dist/value-DQqKhQvt.cjs +57 -0
- package/dist/{LinePlot-tqJ3Um1S.js → value-DbcZ1sQB.js} +1998 -1994
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +27 -25
- package/dist/Animated-BWcO40x5.js +0 -19
- package/dist/Animated-Cxl7iHik.cjs +0 -1
- package/dist/Item-BZvmqn4h.js +0 -109
- package/dist/Item-C4SOBynl.cjs +0 -1
- package/dist/LinePlot-Cys9-mEC.cjs +0 -56
- package/dist/Pack-B7_tAsYd.cjs +0 -1
- package/dist/Pack-Di5J8hmU.js +0 -143
- package/dist/Toggle-BOWYgKry.cjs +0 -163
- package/dist/aggregator-B4RWbN9h.cjs +0 -77
- package/dist/aggregator-Bl15iClv.js +0 -13712
- package/dist/css-DT9dIVAb.cjs +0 -1
- package/dist/external-8OKX45Jc.cjs +0 -1
- package/dist/external-9Q86X8hc.cjs +0 -1
- package/dist/external-B45MvYg8.js +0 -111
- package/dist/external-BP5euc4j.js +0 -34
- package/dist/external-Ba8go3wq.cjs +0 -1
- package/dist/external-C59dex28.js +0 -13
- package/dist/external-CKXRIr4_.cjs +0 -1
- package/dist/external-CML3oqyJ.js +0 -22
- package/dist/external-CW61uh4b.cjs +0 -1
- package/dist/external-CcuRxo0Z.js +0 -323
- package/dist/external-CigHe3w_.cjs +0 -1
- package/dist/external-Cm1kldLr.js +0 -123
- package/dist/external-DNjLBxYA.js +0 -1189
- package/dist/external-DTDBfIqD.js +0 -13
- package/dist/external-DkXE1VK8.cjs +0 -1
- package/dist/external-Dt4ggRt2.cjs +0 -1
- package/dist/external-DuGCS_ZD.js +0 -20
- package/dist/external-DuK5v_sl.js +0 -375
- package/dist/external-SsIgRo40.cjs +0 -1
- package/dist/external-U33eEFR3.js +0 -75
- package/dist/external-bw66TR6V.js +0 -277
- package/dist/external-kZBV4X9L.cjs +0 -1
- package/dist/external-ok_ye4LF.cjs +0 -1
- package/dist/src/telem/Pipeline.d.ts +0 -3
- package/dist/src/telem/Pipeline.d.ts.map +0 -1
- package/dist/src/text/Select.d.ts +0 -19
- package/dist/src/text/Select.d.ts.map +0 -1
|
@@ -0,0 +1,1265 @@
|
|
|
1
|
+
import { a as ce, b as Ye, T, c as We, C as ze, D as He, H as Ve, I as Ue, L as Ge, S as Je, s as Qe, d as Xe, e as Ze, f as qe, g as et, h as tt, i as st, u as rt, j as nt, k as it, l as ut } from "./Text-DT2rIwXL.js";
|
|
2
|
+
import { j as C } from "./jsx-runtime-CYK1ROHF.js";
|
|
3
|
+
import { useCallback as X, useRef as H, useEffect as de } from "react";
|
|
4
|
+
import { S as ct, k as De } from "./state-w46WTrh-.js";
|
|
5
|
+
import { u as Me } from "./useDebouncedCallback-DDLuEZa8.js";
|
|
6
|
+
import { T as Be } from "./Text-B3pNXYhh.js";
|
|
7
|
+
import { f as ot, E as at } from "./Divider-C5m3c4pv.js";
|
|
8
|
+
import "./aggregator-5XpEdQtr.js";
|
|
9
|
+
import "./Pack-D50qN0Vu.js";
|
|
10
|
+
import "./css-rxwBYwM1.js";
|
|
11
|
+
import "./Toggle-DZMcFiiI.js";
|
|
12
|
+
const _e = Symbol(), oe = Symbol(), L = "a", N = "w";
|
|
13
|
+
let lt = (t, e) => new Proxy(t, e);
|
|
14
|
+
const Z = Object.getPrototypeOf, ge = /* @__PURE__ */ new WeakMap(), ae = (t) => t && (ge.has(t) ? ge.get(t) : Z(t) === Object.prototype || Z(t) === Array.prototype), pe = (t) => typeof t == "object" && t !== null, Ae = /* @__PURE__ */ new WeakMap(), Se = (t) => t[oe] || t, xe = (t, e, s) => {
|
|
15
|
+
if (!ae(t)) return t;
|
|
16
|
+
const r = Se(t), n = ((u) => Object.isFrozen(u) || Object.values(Object.getOwnPropertyDescriptors(u)).some((c) => !c.writable))(r);
|
|
17
|
+
let i = s && s.get(r);
|
|
18
|
+
return i && i[1].f === n || (i = ((u, c) => {
|
|
19
|
+
const o = { f: c };
|
|
20
|
+
let a = !1;
|
|
21
|
+
const l = (h, f) => {
|
|
22
|
+
if (!a) {
|
|
23
|
+
let p = o[L].get(u);
|
|
24
|
+
if (p || (p = {}, o[L].set(u, p)), h === N) p[N] = !0;
|
|
25
|
+
else {
|
|
26
|
+
let A = p[h];
|
|
27
|
+
A || (A = /* @__PURE__ */ new Set(), p[h] = A), A.add(f);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, g = { get: (h, f) => f === oe ? u : (l("k", f), xe(Reflect.get(h, f), o[L], o.c)), has: (h, f) => f === _e ? (a = !0, o[L].delete(u), !0) : (l("h", f), Reflect.has(h, f)), getOwnPropertyDescriptor: (h, f) => (l("o", f), Reflect.getOwnPropertyDescriptor(h, f)), ownKeys: (h) => (l(N), Reflect.ownKeys(h)) };
|
|
31
|
+
return c && (g.set = g.deleteProperty = () => !1), [g, o];
|
|
32
|
+
})(r, n), i[1].p = lt(n ? ((u) => {
|
|
33
|
+
let c = Ae.get(u);
|
|
34
|
+
if (!c) {
|
|
35
|
+
if (Array.isArray(u)) c = Array.from(u);
|
|
36
|
+
else {
|
|
37
|
+
const o = Object.getOwnPropertyDescriptors(u);
|
|
38
|
+
Object.values(o).forEach((a) => {
|
|
39
|
+
a.configurable = !0;
|
|
40
|
+
}), c = Object.create(Z(u), o);
|
|
41
|
+
}
|
|
42
|
+
Ae.set(u, c);
|
|
43
|
+
}
|
|
44
|
+
return c;
|
|
45
|
+
})(r) : r, i[0]), s && s.set(r, i)), i[1][L] = e, i[1].c = s, i[1].p;
|
|
46
|
+
}, Re = (t, e, s, r) => {
|
|
47
|
+
if (Object.is(t, e)) return !1;
|
|
48
|
+
if (!pe(t) || !pe(e)) return !0;
|
|
49
|
+
const n = s.get(Se(t));
|
|
50
|
+
if (!n) return !0;
|
|
51
|
+
if (r) {
|
|
52
|
+
const u = r.get(t);
|
|
53
|
+
if (u && u.n === e) return u.g;
|
|
54
|
+
r.set(t, { n: e, g: !1 });
|
|
55
|
+
}
|
|
56
|
+
let i = null;
|
|
57
|
+
try {
|
|
58
|
+
for (const u of n.h || []) if (i = Reflect.has(t, u) !== Reflect.has(e, u), i) return i;
|
|
59
|
+
if (n[N] === !0) {
|
|
60
|
+
if (i = ((u, c) => {
|
|
61
|
+
const o = Reflect.ownKeys(u), a = Reflect.ownKeys(c);
|
|
62
|
+
return o.length !== a.length || o.some((l, g) => l !== a[g]);
|
|
63
|
+
})(t, e), i) return i;
|
|
64
|
+
} else for (const u of n.o || []) if (i = !!Reflect.getOwnPropertyDescriptor(t, u) != !!Reflect.getOwnPropertyDescriptor(e, u), i) return i;
|
|
65
|
+
for (const u of n.k || []) if (i = Re(t[u], e[u], s, r), i) return i;
|
|
66
|
+
return i === null && (i = !0), i;
|
|
67
|
+
} finally {
|
|
68
|
+
r && r.set(t, { n: e, g: i });
|
|
69
|
+
}
|
|
70
|
+
}, ht = (t) => !!ae(t) && _e in t, Oe = (t) => ae(t) && t[oe] || null, ft = "h", dt = "w", gt = "o", pt = "k", q = (t) => typeof t == "object" && t !== null, we = (t, e) => {
|
|
71
|
+
if (!q(t)) return t;
|
|
72
|
+
const s = Oe(t);
|
|
73
|
+
return s !== null ? (ht(t), s) : (e.has(t) || (e.add(t), Object.entries(t).forEach(([r, n]) => {
|
|
74
|
+
const i = we(n, e);
|
|
75
|
+
Object.is(i, n) || (t[r] = i);
|
|
76
|
+
})), t);
|
|
77
|
+
}, ee = (t, e, s) => {
|
|
78
|
+
var r, n, i;
|
|
79
|
+
if (!q(t) || !q(e)) return;
|
|
80
|
+
const u = s.get(Oe(e) || e);
|
|
81
|
+
u && ((r = u[ft]) == null || r.forEach((c) => {
|
|
82
|
+
Reflect.has(t, c);
|
|
83
|
+
}), u[dt] === !0 && Reflect.ownKeys(t), (n = u[gt]) == null || n.forEach((c) => {
|
|
84
|
+
Reflect.getOwnPropertyDescriptor(t, c);
|
|
85
|
+
}), (i = u[pt]) == null || i.forEach((c) => {
|
|
86
|
+
ee(t[c], e[c], s);
|
|
87
|
+
}));
|
|
88
|
+
}, V = "o", U = "r", G = "a";
|
|
89
|
+
function At(t, e) {
|
|
90
|
+
var s;
|
|
91
|
+
let r = 0;
|
|
92
|
+
const n = (s = e == null ? void 0 : e.size) != null ? s : 1, i = [], u = e != null && e.noWeakMap ? null : /* @__PURE__ */ new WeakMap();
|
|
93
|
+
return (o) => {
|
|
94
|
+
const a = u == null ? void 0 : u.get(o);
|
|
95
|
+
if (a)
|
|
96
|
+
return a[U];
|
|
97
|
+
for (let p = 0; p < n; p += 1) {
|
|
98
|
+
const A = i[(r + p) % n];
|
|
99
|
+
if (!A) break;
|
|
100
|
+
if (!Re(A[V], o, A[G], /* @__PURE__ */ new WeakMap()))
|
|
101
|
+
return ee(o, A[V], A[G]), u == null || u.set(o, A), A[U];
|
|
102
|
+
}
|
|
103
|
+
const l = /* @__PURE__ */ new WeakMap(), g = xe(o, l), h = we(t(g), /* @__PURE__ */ new Set());
|
|
104
|
+
ee(o, o, l);
|
|
105
|
+
const f = {
|
|
106
|
+
[V]: o,
|
|
107
|
+
[U]: h,
|
|
108
|
+
[G]: l
|
|
109
|
+
};
|
|
110
|
+
return r = (r - 1 + n) % n, i[r] = f, u == null || u.set(o, f), h;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const Et = (t, e) => ct.RUNTIME === "browser" ? At(t, e) : t;
|
|
114
|
+
function x(t) {
|
|
115
|
+
return Array.isArray ? Array.isArray(t) : ve(t) === "[object Array]";
|
|
116
|
+
}
|
|
117
|
+
function mt(t) {
|
|
118
|
+
if (typeof t == "string")
|
|
119
|
+
return t;
|
|
120
|
+
let e = t + "";
|
|
121
|
+
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
122
|
+
}
|
|
123
|
+
function Ct(t) {
|
|
124
|
+
return t == null ? "" : mt(t);
|
|
125
|
+
}
|
|
126
|
+
function S(t) {
|
|
127
|
+
return typeof t == "string";
|
|
128
|
+
}
|
|
129
|
+
function Ie(t) {
|
|
130
|
+
return typeof t == "number";
|
|
131
|
+
}
|
|
132
|
+
function yt(t) {
|
|
133
|
+
return t === !0 || t === !1 || Ft(t) && ve(t) == "[object Boolean]";
|
|
134
|
+
}
|
|
135
|
+
function be(t) {
|
|
136
|
+
return typeof t == "object";
|
|
137
|
+
}
|
|
138
|
+
function Ft(t) {
|
|
139
|
+
return be(t) && t !== null;
|
|
140
|
+
}
|
|
141
|
+
function D(t) {
|
|
142
|
+
return t != null;
|
|
143
|
+
}
|
|
144
|
+
function J(t) {
|
|
145
|
+
return !t.trim().length;
|
|
146
|
+
}
|
|
147
|
+
function ve(t) {
|
|
148
|
+
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
|
|
149
|
+
}
|
|
150
|
+
const Dt = "Incorrect 'index' type", Mt = (t) => `Invalid value for key ${t}`, Bt = (t) => `Pattern length exceeds max of ${t}.`, _t = (t) => `Missing ${t} property in key`, St = (t) => `Property 'weight' in key '${t}' must be a positive integer`, Ee = Object.prototype.hasOwnProperty;
|
|
151
|
+
class xt {
|
|
152
|
+
constructor(e) {
|
|
153
|
+
this._keys = [], this._keyMap = {};
|
|
154
|
+
let s = 0;
|
|
155
|
+
e.forEach((r) => {
|
|
156
|
+
let n = Pe(r);
|
|
157
|
+
this._keys.push(n), this._keyMap[n.id] = n, s += n.weight;
|
|
158
|
+
}), this._keys.forEach((r) => {
|
|
159
|
+
r.weight /= s;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
get(e) {
|
|
163
|
+
return this._keyMap[e];
|
|
164
|
+
}
|
|
165
|
+
keys() {
|
|
166
|
+
return this._keys;
|
|
167
|
+
}
|
|
168
|
+
toJSON() {
|
|
169
|
+
return JSON.stringify(this._keys);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function Pe(t) {
|
|
173
|
+
let e = null, s = null, r = null, n = 1, i = null;
|
|
174
|
+
if (S(t) || x(t))
|
|
175
|
+
r = t, e = me(t), s = te(t);
|
|
176
|
+
else {
|
|
177
|
+
if (!Ee.call(t, "name"))
|
|
178
|
+
throw new Error(_t("name"));
|
|
179
|
+
const u = t.name;
|
|
180
|
+
if (r = u, Ee.call(t, "weight") && (n = t.weight, n <= 0))
|
|
181
|
+
throw new Error(St(u));
|
|
182
|
+
e = me(u), s = te(u), i = t.getFn;
|
|
183
|
+
}
|
|
184
|
+
return { path: e, id: s, weight: n, src: r, getFn: i };
|
|
185
|
+
}
|
|
186
|
+
function me(t) {
|
|
187
|
+
return x(t) ? t : t.split(".");
|
|
188
|
+
}
|
|
189
|
+
function te(t) {
|
|
190
|
+
return x(t) ? t.join(".") : t;
|
|
191
|
+
}
|
|
192
|
+
function Rt(t, e) {
|
|
193
|
+
let s = [], r = !1;
|
|
194
|
+
const n = (i, u, c) => {
|
|
195
|
+
if (D(i))
|
|
196
|
+
if (!u[c])
|
|
197
|
+
s.push(i);
|
|
198
|
+
else {
|
|
199
|
+
let o = u[c];
|
|
200
|
+
const a = i[o];
|
|
201
|
+
if (!D(a))
|
|
202
|
+
return;
|
|
203
|
+
if (c === u.length - 1 && (S(a) || Ie(a) || yt(a)))
|
|
204
|
+
s.push(Ct(a));
|
|
205
|
+
else if (x(a)) {
|
|
206
|
+
r = !0;
|
|
207
|
+
for (let l = 0, g = a.length; l < g; l += 1)
|
|
208
|
+
n(a[l], u, c + 1);
|
|
209
|
+
} else u.length && n(a, u, c + 1);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
return n(t, S(e) ? e.split(".") : e, 0), r ? s : s[0];
|
|
213
|
+
}
|
|
214
|
+
const Ot = {
|
|
215
|
+
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
216
|
+
// set will include the indices of the matched characters.
|
|
217
|
+
// These can consequently be used for highlighting purposes.
|
|
218
|
+
includeMatches: !1,
|
|
219
|
+
// When `true`, the matching function will continue to the end of a search pattern even if
|
|
220
|
+
// a perfect match has already been located in the string.
|
|
221
|
+
findAllMatches: !1,
|
|
222
|
+
// Minimum number of characters that must be matched before a result is considered a match
|
|
223
|
+
minMatchCharLength: 1
|
|
224
|
+
}, wt = {
|
|
225
|
+
// When `true`, the algorithm continues searching to the end of the input even if a perfect
|
|
226
|
+
// match is found before the end of the same input.
|
|
227
|
+
isCaseSensitive: !1,
|
|
228
|
+
// When `true`, the algorithm will ignore diacritics (accents) in comparisons
|
|
229
|
+
ignoreDiacritics: !1,
|
|
230
|
+
// When true, the matching function will continue to the end of a search pattern even if
|
|
231
|
+
includeScore: !1,
|
|
232
|
+
// List of properties that will be searched. This also supports nested properties.
|
|
233
|
+
keys: [],
|
|
234
|
+
// Whether to sort the result list, by score
|
|
235
|
+
shouldSort: !0,
|
|
236
|
+
// Default sort function: sort by ascending score, ascending index
|
|
237
|
+
sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1
|
|
238
|
+
}, It = {
|
|
239
|
+
// Approximately where in the text is the pattern expected to be found?
|
|
240
|
+
location: 0,
|
|
241
|
+
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
|
|
242
|
+
// (of both letters and location), a threshold of '1.0' would match anything.
|
|
243
|
+
threshold: 0.6,
|
|
244
|
+
// Determines how close the match must be to the fuzzy location (specified above).
|
|
245
|
+
// An exact letter match which is 'distance' characters away from the fuzzy location
|
|
246
|
+
// would score as a complete mismatch. A distance of '0' requires the match be at
|
|
247
|
+
// the exact location specified, a threshold of '1000' would require a perfect match
|
|
248
|
+
// to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
|
|
249
|
+
distance: 100
|
|
250
|
+
}, bt = {
|
|
251
|
+
// When `true`, it enables the use of unix-like search commands
|
|
252
|
+
useExtendedSearch: !1,
|
|
253
|
+
// The get function to use when fetching an object's properties.
|
|
254
|
+
// The default will search nested paths *ie foo.bar.baz*
|
|
255
|
+
getFn: Rt,
|
|
256
|
+
// When `true`, search will ignore `location` and `distance`, so it won't matter
|
|
257
|
+
// where in the string the pattern appears.
|
|
258
|
+
// More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
|
|
259
|
+
ignoreLocation: !1,
|
|
260
|
+
// When `true`, the calculation for the relevance score (used for sorting) will
|
|
261
|
+
// ignore the field-length norm.
|
|
262
|
+
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
|
|
263
|
+
ignoreFieldNorm: !1,
|
|
264
|
+
// The weight to determine how much field length norm effects scoring.
|
|
265
|
+
fieldNormWeight: 1
|
|
266
|
+
};
|
|
267
|
+
var d = {
|
|
268
|
+
...wt,
|
|
269
|
+
...Ot,
|
|
270
|
+
...It,
|
|
271
|
+
...bt
|
|
272
|
+
};
|
|
273
|
+
const vt = /[^ ]+/g;
|
|
274
|
+
function Pt(t = 1, e = 3) {
|
|
275
|
+
const s = /* @__PURE__ */ new Map(), r = Math.pow(10, e);
|
|
276
|
+
return {
|
|
277
|
+
get(n) {
|
|
278
|
+
const i = n.match(vt).length;
|
|
279
|
+
if (s.has(i))
|
|
280
|
+
return s.get(i);
|
|
281
|
+
const u = 1 / Math.pow(i, 0.5 * t), c = parseFloat(Math.round(u * r) / r);
|
|
282
|
+
return s.set(i, c), c;
|
|
283
|
+
},
|
|
284
|
+
clear() {
|
|
285
|
+
s.clear();
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
class le {
|
|
290
|
+
constructor({
|
|
291
|
+
getFn: e = d.getFn,
|
|
292
|
+
fieldNormWeight: s = d.fieldNormWeight
|
|
293
|
+
} = {}) {
|
|
294
|
+
this.norm = Pt(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
295
|
+
}
|
|
296
|
+
setSources(e = []) {
|
|
297
|
+
this.docs = e;
|
|
298
|
+
}
|
|
299
|
+
setIndexRecords(e = []) {
|
|
300
|
+
this.records = e;
|
|
301
|
+
}
|
|
302
|
+
setKeys(e = []) {
|
|
303
|
+
this.keys = e, this._keysMap = {}, e.forEach((s, r) => {
|
|
304
|
+
this._keysMap[s.id] = r;
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
create() {
|
|
308
|
+
this.isCreated || !this.docs.length || (this.isCreated = !0, S(this.docs[0]) ? this.docs.forEach((e, s) => {
|
|
309
|
+
this._addString(e, s);
|
|
310
|
+
}) : this.docs.forEach((e, s) => {
|
|
311
|
+
this._addObject(e, s);
|
|
312
|
+
}), this.norm.clear());
|
|
313
|
+
}
|
|
314
|
+
// Adds a doc to the end of the index
|
|
315
|
+
add(e) {
|
|
316
|
+
const s = this.size();
|
|
317
|
+
S(e) ? this._addString(e, s) : this._addObject(e, s);
|
|
318
|
+
}
|
|
319
|
+
// Removes the doc at the specified index of the index
|
|
320
|
+
removeAt(e) {
|
|
321
|
+
this.records.splice(e, 1);
|
|
322
|
+
for (let s = e, r = this.size(); s < r; s += 1)
|
|
323
|
+
this.records[s].i -= 1;
|
|
324
|
+
}
|
|
325
|
+
getValueForItemAtKeyId(e, s) {
|
|
326
|
+
return e[this._keysMap[s]];
|
|
327
|
+
}
|
|
328
|
+
size() {
|
|
329
|
+
return this.records.length;
|
|
330
|
+
}
|
|
331
|
+
_addString(e, s) {
|
|
332
|
+
if (!D(e) || J(e))
|
|
333
|
+
return;
|
|
334
|
+
let r = {
|
|
335
|
+
v: e,
|
|
336
|
+
i: s,
|
|
337
|
+
n: this.norm.get(e)
|
|
338
|
+
};
|
|
339
|
+
this.records.push(r);
|
|
340
|
+
}
|
|
341
|
+
_addObject(e, s) {
|
|
342
|
+
let r = { i: s, $: {} };
|
|
343
|
+
this.keys.forEach((n, i) => {
|
|
344
|
+
let u = n.getFn ? n.getFn(e) : this.getFn(e, n.path);
|
|
345
|
+
if (D(u)) {
|
|
346
|
+
if (x(u)) {
|
|
347
|
+
let c = [];
|
|
348
|
+
const o = [{ nestedArrIndex: -1, value: u }];
|
|
349
|
+
for (; o.length; ) {
|
|
350
|
+
const { nestedArrIndex: a, value: l } = o.pop();
|
|
351
|
+
if (D(l))
|
|
352
|
+
if (S(l) && !J(l)) {
|
|
353
|
+
let g = {
|
|
354
|
+
v: l,
|
|
355
|
+
i: a,
|
|
356
|
+
n: this.norm.get(l)
|
|
357
|
+
};
|
|
358
|
+
c.push(g);
|
|
359
|
+
} else x(l) && l.forEach((g, h) => {
|
|
360
|
+
o.push({
|
|
361
|
+
nestedArrIndex: h,
|
|
362
|
+
value: g
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
r.$[i] = c;
|
|
367
|
+
} else if (S(u) && !J(u)) {
|
|
368
|
+
let c = {
|
|
369
|
+
v: u,
|
|
370
|
+
n: this.norm.get(u)
|
|
371
|
+
};
|
|
372
|
+
r.$[i] = c;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}), this.records.push(r);
|
|
376
|
+
}
|
|
377
|
+
toJSON() {
|
|
378
|
+
return {
|
|
379
|
+
keys: this.keys,
|
|
380
|
+
records: this.records
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
function ke(t, e, { getFn: s = d.getFn, fieldNormWeight: r = d.fieldNormWeight } = {}) {
|
|
385
|
+
const n = new le({ getFn: s, fieldNormWeight: r });
|
|
386
|
+
return n.setKeys(t.map(Pe)), n.setSources(e), n.create(), n;
|
|
387
|
+
}
|
|
388
|
+
function kt(t, { getFn: e = d.getFn, fieldNormWeight: s = d.fieldNormWeight } = {}) {
|
|
389
|
+
const { keys: r, records: n } = t, i = new le({ getFn: e, fieldNormWeight: s });
|
|
390
|
+
return i.setKeys(r), i.setIndexRecords(n), i;
|
|
391
|
+
}
|
|
392
|
+
function $(t, {
|
|
393
|
+
errors: e = 0,
|
|
394
|
+
currentLocation: s = 0,
|
|
395
|
+
expectedLocation: r = 0,
|
|
396
|
+
distance: n = d.distance,
|
|
397
|
+
ignoreLocation: i = d.ignoreLocation
|
|
398
|
+
} = {}) {
|
|
399
|
+
const u = e / t.length;
|
|
400
|
+
if (i)
|
|
401
|
+
return u;
|
|
402
|
+
const c = Math.abs(r - s);
|
|
403
|
+
return n ? u + c / n : c ? 1 : u;
|
|
404
|
+
}
|
|
405
|
+
function Lt(t = [], e = d.minMatchCharLength) {
|
|
406
|
+
let s = [], r = -1, n = -1, i = 0;
|
|
407
|
+
for (let u = t.length; i < u; i += 1) {
|
|
408
|
+
let c = t[i];
|
|
409
|
+
c && r === -1 ? r = i : !c && r !== -1 && (n = i - 1, n - r + 1 >= e && s.push([r, n]), r = -1);
|
|
410
|
+
}
|
|
411
|
+
return t[i - 1] && i - r >= e && s.push([r, i - 1]), s;
|
|
412
|
+
}
|
|
413
|
+
const v = 32;
|
|
414
|
+
function Tt(t, e, s, {
|
|
415
|
+
location: r = d.location,
|
|
416
|
+
distance: n = d.distance,
|
|
417
|
+
threshold: i = d.threshold,
|
|
418
|
+
findAllMatches: u = d.findAllMatches,
|
|
419
|
+
minMatchCharLength: c = d.minMatchCharLength,
|
|
420
|
+
includeMatches: o = d.includeMatches,
|
|
421
|
+
ignoreLocation: a = d.ignoreLocation
|
|
422
|
+
} = {}) {
|
|
423
|
+
if (e.length > v)
|
|
424
|
+
throw new Error(Bt(v));
|
|
425
|
+
const l = e.length, g = t.length, h = Math.max(0, Math.min(r, g));
|
|
426
|
+
let f = i, p = h;
|
|
427
|
+
const A = c > 1 || o, y = A ? Array(g) : [];
|
|
428
|
+
let F;
|
|
429
|
+
for (; (F = t.indexOf(e, p)) > -1; ) {
|
|
430
|
+
let m = $(e, {
|
|
431
|
+
currentLocation: F,
|
|
432
|
+
expectedLocation: h,
|
|
433
|
+
distance: n,
|
|
434
|
+
ignoreLocation: a
|
|
435
|
+
});
|
|
436
|
+
if (f = Math.min(m, f), p = F + l, A) {
|
|
437
|
+
let O = 0;
|
|
438
|
+
for (; O < l; )
|
|
439
|
+
y[F + O] = 1, O += 1;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
p = -1;
|
|
443
|
+
let M = [], R = 1, E = l + g;
|
|
444
|
+
const b = 1 << l - 1;
|
|
445
|
+
for (let m = 0; m < l; m += 1) {
|
|
446
|
+
let O = 0, w = E;
|
|
447
|
+
for (; O < w; )
|
|
448
|
+
$(e, {
|
|
449
|
+
errors: m,
|
|
450
|
+
currentLocation: h + w,
|
|
451
|
+
expectedLocation: h,
|
|
452
|
+
distance: n,
|
|
453
|
+
ignoreLocation: a
|
|
454
|
+
}) <= f ? O = w : E = w, w = Math.floor((E - O) / 2 + O);
|
|
455
|
+
E = w;
|
|
456
|
+
let he = Math.max(1, h - w + 1), z = u ? g : Math.min(h + w, g) + l, P = Array(z + 2);
|
|
457
|
+
P[z + 1] = (1 << m) - 1;
|
|
458
|
+
for (let _ = z; _ >= he; _ -= 1) {
|
|
459
|
+
let j = _ - 1, fe = s[t.charAt(j)];
|
|
460
|
+
if (A && (y[j] = +!!fe), P[_] = (P[_ + 1] << 1 | 1) & fe, m && (P[_] |= (M[_ + 1] | M[_]) << 1 | 1 | M[_ + 1]), P[_] & b && (R = $(e, {
|
|
461
|
+
errors: m,
|
|
462
|
+
currentLocation: j,
|
|
463
|
+
expectedLocation: h,
|
|
464
|
+
distance: n,
|
|
465
|
+
ignoreLocation: a
|
|
466
|
+
}), R <= f)) {
|
|
467
|
+
if (f = R, p = j, p <= h)
|
|
468
|
+
break;
|
|
469
|
+
he = Math.max(1, 2 * h - p);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
if ($(e, {
|
|
473
|
+
errors: m + 1,
|
|
474
|
+
currentLocation: h,
|
|
475
|
+
expectedLocation: h,
|
|
476
|
+
distance: n,
|
|
477
|
+
ignoreLocation: a
|
|
478
|
+
}) > f)
|
|
479
|
+
break;
|
|
480
|
+
M = P;
|
|
481
|
+
}
|
|
482
|
+
const B = {
|
|
483
|
+
isMatch: p >= 0,
|
|
484
|
+
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
485
|
+
score: Math.max(1e-3, R)
|
|
486
|
+
};
|
|
487
|
+
if (A) {
|
|
488
|
+
const m = Lt(y, c);
|
|
489
|
+
m.length ? o && (B.indices = m) : B.isMatch = !1;
|
|
490
|
+
}
|
|
491
|
+
return B;
|
|
492
|
+
}
|
|
493
|
+
function jt(t) {
|
|
494
|
+
let e = {};
|
|
495
|
+
for (let s = 0, r = t.length; s < r; s += 1) {
|
|
496
|
+
const n = t.charAt(s);
|
|
497
|
+
e[n] = (e[n] || 0) | 1 << r - s - 1;
|
|
498
|
+
}
|
|
499
|
+
return e;
|
|
500
|
+
}
|
|
501
|
+
const K = String.prototype.normalize ? (t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "") : (t) => t;
|
|
502
|
+
class Le {
|
|
503
|
+
constructor(e, {
|
|
504
|
+
location: s = d.location,
|
|
505
|
+
threshold: r = d.threshold,
|
|
506
|
+
distance: n = d.distance,
|
|
507
|
+
includeMatches: i = d.includeMatches,
|
|
508
|
+
findAllMatches: u = d.findAllMatches,
|
|
509
|
+
minMatchCharLength: c = d.minMatchCharLength,
|
|
510
|
+
isCaseSensitive: o = d.isCaseSensitive,
|
|
511
|
+
ignoreDiacritics: a = d.ignoreDiacritics,
|
|
512
|
+
ignoreLocation: l = d.ignoreLocation
|
|
513
|
+
} = {}) {
|
|
514
|
+
if (this.options = {
|
|
515
|
+
location: s,
|
|
516
|
+
threshold: r,
|
|
517
|
+
distance: n,
|
|
518
|
+
includeMatches: i,
|
|
519
|
+
findAllMatches: u,
|
|
520
|
+
minMatchCharLength: c,
|
|
521
|
+
isCaseSensitive: o,
|
|
522
|
+
ignoreDiacritics: a,
|
|
523
|
+
ignoreLocation: l
|
|
524
|
+
}, e = o ? e : e.toLowerCase(), e = a ? K(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
|
|
525
|
+
return;
|
|
526
|
+
const g = (f, p) => {
|
|
527
|
+
this.chunks.push({
|
|
528
|
+
pattern: f,
|
|
529
|
+
alphabet: jt(f),
|
|
530
|
+
startIndex: p
|
|
531
|
+
});
|
|
532
|
+
}, h = this.pattern.length;
|
|
533
|
+
if (h > v) {
|
|
534
|
+
let f = 0;
|
|
535
|
+
const p = h % v, A = h - p;
|
|
536
|
+
for (; f < A; )
|
|
537
|
+
g(this.pattern.substr(f, v), f), f += v;
|
|
538
|
+
if (p) {
|
|
539
|
+
const y = h - v;
|
|
540
|
+
g(this.pattern.substr(y), y);
|
|
541
|
+
}
|
|
542
|
+
} else
|
|
543
|
+
g(this.pattern, 0);
|
|
544
|
+
}
|
|
545
|
+
searchIn(e) {
|
|
546
|
+
const { isCaseSensitive: s, ignoreDiacritics: r, includeMatches: n } = this.options;
|
|
547
|
+
if (e = s ? e : e.toLowerCase(), e = r ? K(e) : e, this.pattern === e) {
|
|
548
|
+
let A = {
|
|
549
|
+
isMatch: !0,
|
|
550
|
+
score: 0
|
|
551
|
+
};
|
|
552
|
+
return n && (A.indices = [[0, e.length - 1]]), A;
|
|
553
|
+
}
|
|
554
|
+
const {
|
|
555
|
+
location: i,
|
|
556
|
+
distance: u,
|
|
557
|
+
threshold: c,
|
|
558
|
+
findAllMatches: o,
|
|
559
|
+
minMatchCharLength: a,
|
|
560
|
+
ignoreLocation: l
|
|
561
|
+
} = this.options;
|
|
562
|
+
let g = [], h = 0, f = !1;
|
|
563
|
+
this.chunks.forEach(({ pattern: A, alphabet: y, startIndex: F }) => {
|
|
564
|
+
const { isMatch: M, score: R, indices: E } = Tt(e, A, y, {
|
|
565
|
+
location: i + F,
|
|
566
|
+
distance: u,
|
|
567
|
+
threshold: c,
|
|
568
|
+
findAllMatches: o,
|
|
569
|
+
minMatchCharLength: a,
|
|
570
|
+
includeMatches: n,
|
|
571
|
+
ignoreLocation: l
|
|
572
|
+
});
|
|
573
|
+
M && (f = !0), h += R, M && E && (g = [...g, ...E]);
|
|
574
|
+
});
|
|
575
|
+
let p = {
|
|
576
|
+
isMatch: f,
|
|
577
|
+
score: f ? h / this.chunks.length : 1
|
|
578
|
+
};
|
|
579
|
+
return f && n && (p.indices = g), p;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
class I {
|
|
583
|
+
constructor(e) {
|
|
584
|
+
this.pattern = e;
|
|
585
|
+
}
|
|
586
|
+
static isMultiMatch(e) {
|
|
587
|
+
return Ce(e, this.multiRegex);
|
|
588
|
+
}
|
|
589
|
+
static isSingleMatch(e) {
|
|
590
|
+
return Ce(e, this.singleRegex);
|
|
591
|
+
}
|
|
592
|
+
search() {
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
function Ce(t, e) {
|
|
596
|
+
const s = t.match(e);
|
|
597
|
+
return s ? s[1] : null;
|
|
598
|
+
}
|
|
599
|
+
class $t extends I {
|
|
600
|
+
constructor(e) {
|
|
601
|
+
super(e);
|
|
602
|
+
}
|
|
603
|
+
static get type() {
|
|
604
|
+
return "exact";
|
|
605
|
+
}
|
|
606
|
+
static get multiRegex() {
|
|
607
|
+
return /^="(.*)"$/;
|
|
608
|
+
}
|
|
609
|
+
static get singleRegex() {
|
|
610
|
+
return /^=(.*)$/;
|
|
611
|
+
}
|
|
612
|
+
search(e) {
|
|
613
|
+
const s = e === this.pattern;
|
|
614
|
+
return {
|
|
615
|
+
isMatch: s,
|
|
616
|
+
score: s ? 0 : 1,
|
|
617
|
+
indices: [0, this.pattern.length - 1]
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
class Nt extends I {
|
|
622
|
+
constructor(e) {
|
|
623
|
+
super(e);
|
|
624
|
+
}
|
|
625
|
+
static get type() {
|
|
626
|
+
return "inverse-exact";
|
|
627
|
+
}
|
|
628
|
+
static get multiRegex() {
|
|
629
|
+
return /^!"(.*)"$/;
|
|
630
|
+
}
|
|
631
|
+
static get singleRegex() {
|
|
632
|
+
return /^!(.*)$/;
|
|
633
|
+
}
|
|
634
|
+
search(e) {
|
|
635
|
+
const r = e.indexOf(this.pattern) === -1;
|
|
636
|
+
return {
|
|
637
|
+
isMatch: r,
|
|
638
|
+
score: r ? 0 : 1,
|
|
639
|
+
indices: [0, e.length - 1]
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
class Kt extends I {
|
|
644
|
+
constructor(e) {
|
|
645
|
+
super(e);
|
|
646
|
+
}
|
|
647
|
+
static get type() {
|
|
648
|
+
return "prefix-exact";
|
|
649
|
+
}
|
|
650
|
+
static get multiRegex() {
|
|
651
|
+
return /^\^"(.*)"$/;
|
|
652
|
+
}
|
|
653
|
+
static get singleRegex() {
|
|
654
|
+
return /^\^(.*)$/;
|
|
655
|
+
}
|
|
656
|
+
search(e) {
|
|
657
|
+
const s = e.startsWith(this.pattern);
|
|
658
|
+
return {
|
|
659
|
+
isMatch: s,
|
|
660
|
+
score: s ? 0 : 1,
|
|
661
|
+
indices: [0, this.pattern.length - 1]
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
class Yt extends I {
|
|
666
|
+
constructor(e) {
|
|
667
|
+
super(e);
|
|
668
|
+
}
|
|
669
|
+
static get type() {
|
|
670
|
+
return "inverse-prefix-exact";
|
|
671
|
+
}
|
|
672
|
+
static get multiRegex() {
|
|
673
|
+
return /^!\^"(.*)"$/;
|
|
674
|
+
}
|
|
675
|
+
static get singleRegex() {
|
|
676
|
+
return /^!\^(.*)$/;
|
|
677
|
+
}
|
|
678
|
+
search(e) {
|
|
679
|
+
const s = !e.startsWith(this.pattern);
|
|
680
|
+
return {
|
|
681
|
+
isMatch: s,
|
|
682
|
+
score: s ? 0 : 1,
|
|
683
|
+
indices: [0, e.length - 1]
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
class Wt extends I {
|
|
688
|
+
constructor(e) {
|
|
689
|
+
super(e);
|
|
690
|
+
}
|
|
691
|
+
static get type() {
|
|
692
|
+
return "suffix-exact";
|
|
693
|
+
}
|
|
694
|
+
static get multiRegex() {
|
|
695
|
+
return /^"(.*)"\$$/;
|
|
696
|
+
}
|
|
697
|
+
static get singleRegex() {
|
|
698
|
+
return /^(.*)\$$/;
|
|
699
|
+
}
|
|
700
|
+
search(e) {
|
|
701
|
+
const s = e.endsWith(this.pattern);
|
|
702
|
+
return {
|
|
703
|
+
isMatch: s,
|
|
704
|
+
score: s ? 0 : 1,
|
|
705
|
+
indices: [e.length - this.pattern.length, e.length - 1]
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
class zt extends I {
|
|
710
|
+
constructor(e) {
|
|
711
|
+
super(e);
|
|
712
|
+
}
|
|
713
|
+
static get type() {
|
|
714
|
+
return "inverse-suffix-exact";
|
|
715
|
+
}
|
|
716
|
+
static get multiRegex() {
|
|
717
|
+
return /^!"(.*)"\$$/;
|
|
718
|
+
}
|
|
719
|
+
static get singleRegex() {
|
|
720
|
+
return /^!(.*)\$$/;
|
|
721
|
+
}
|
|
722
|
+
search(e) {
|
|
723
|
+
const s = !e.endsWith(this.pattern);
|
|
724
|
+
return {
|
|
725
|
+
isMatch: s,
|
|
726
|
+
score: s ? 0 : 1,
|
|
727
|
+
indices: [0, e.length - 1]
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
class Te extends I {
|
|
732
|
+
constructor(e, {
|
|
733
|
+
location: s = d.location,
|
|
734
|
+
threshold: r = d.threshold,
|
|
735
|
+
distance: n = d.distance,
|
|
736
|
+
includeMatches: i = d.includeMatches,
|
|
737
|
+
findAllMatches: u = d.findAllMatches,
|
|
738
|
+
minMatchCharLength: c = d.minMatchCharLength,
|
|
739
|
+
isCaseSensitive: o = d.isCaseSensitive,
|
|
740
|
+
ignoreDiacritics: a = d.ignoreDiacritics,
|
|
741
|
+
ignoreLocation: l = d.ignoreLocation
|
|
742
|
+
} = {}) {
|
|
743
|
+
super(e), this._bitapSearch = new Le(e, {
|
|
744
|
+
location: s,
|
|
745
|
+
threshold: r,
|
|
746
|
+
distance: n,
|
|
747
|
+
includeMatches: i,
|
|
748
|
+
findAllMatches: u,
|
|
749
|
+
minMatchCharLength: c,
|
|
750
|
+
isCaseSensitive: o,
|
|
751
|
+
ignoreDiacritics: a,
|
|
752
|
+
ignoreLocation: l
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
static get type() {
|
|
756
|
+
return "fuzzy";
|
|
757
|
+
}
|
|
758
|
+
static get multiRegex() {
|
|
759
|
+
return /^"(.*)"$/;
|
|
760
|
+
}
|
|
761
|
+
static get singleRegex() {
|
|
762
|
+
return /^(.*)$/;
|
|
763
|
+
}
|
|
764
|
+
search(e) {
|
|
765
|
+
return this._bitapSearch.searchIn(e);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
class je extends I {
|
|
769
|
+
constructor(e) {
|
|
770
|
+
super(e);
|
|
771
|
+
}
|
|
772
|
+
static get type() {
|
|
773
|
+
return "include";
|
|
774
|
+
}
|
|
775
|
+
static get multiRegex() {
|
|
776
|
+
return /^'"(.*)"$/;
|
|
777
|
+
}
|
|
778
|
+
static get singleRegex() {
|
|
779
|
+
return /^'(.*)$/;
|
|
780
|
+
}
|
|
781
|
+
search(e) {
|
|
782
|
+
let s = 0, r;
|
|
783
|
+
const n = [], i = this.pattern.length;
|
|
784
|
+
for (; (r = e.indexOf(this.pattern, s)) > -1; )
|
|
785
|
+
s = r + i, n.push([r, s - 1]);
|
|
786
|
+
const u = !!n.length;
|
|
787
|
+
return {
|
|
788
|
+
isMatch: u,
|
|
789
|
+
score: u ? 0 : 1,
|
|
790
|
+
indices: n
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
const se = [
|
|
795
|
+
$t,
|
|
796
|
+
je,
|
|
797
|
+
Kt,
|
|
798
|
+
Yt,
|
|
799
|
+
zt,
|
|
800
|
+
Wt,
|
|
801
|
+
Nt,
|
|
802
|
+
Te
|
|
803
|
+
], ye = se.length, Ht = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Vt = "|";
|
|
804
|
+
function Ut(t, e = {}) {
|
|
805
|
+
return t.split(Vt).map((s) => {
|
|
806
|
+
let r = s.trim().split(Ht).filter((i) => i && !!i.trim()), n = [];
|
|
807
|
+
for (let i = 0, u = r.length; i < u; i += 1) {
|
|
808
|
+
const c = r[i];
|
|
809
|
+
let o = !1, a = -1;
|
|
810
|
+
for (; !o && ++a < ye; ) {
|
|
811
|
+
const l = se[a];
|
|
812
|
+
let g = l.isMultiMatch(c);
|
|
813
|
+
g && (n.push(new l(g, e)), o = !0);
|
|
814
|
+
}
|
|
815
|
+
if (!o)
|
|
816
|
+
for (a = -1; ++a < ye; ) {
|
|
817
|
+
const l = se[a];
|
|
818
|
+
let g = l.isSingleMatch(c);
|
|
819
|
+
if (g) {
|
|
820
|
+
n.push(new l(g, e));
|
|
821
|
+
break;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
return n;
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
const Gt = /* @__PURE__ */ new Set([Te.type, je.type]);
|
|
829
|
+
class Jt {
|
|
830
|
+
constructor(e, {
|
|
831
|
+
isCaseSensitive: s = d.isCaseSensitive,
|
|
832
|
+
ignoreDiacritics: r = d.ignoreDiacritics,
|
|
833
|
+
includeMatches: n = d.includeMatches,
|
|
834
|
+
minMatchCharLength: i = d.minMatchCharLength,
|
|
835
|
+
ignoreLocation: u = d.ignoreLocation,
|
|
836
|
+
findAllMatches: c = d.findAllMatches,
|
|
837
|
+
location: o = d.location,
|
|
838
|
+
threshold: a = d.threshold,
|
|
839
|
+
distance: l = d.distance
|
|
840
|
+
} = {}) {
|
|
841
|
+
this.query = null, this.options = {
|
|
842
|
+
isCaseSensitive: s,
|
|
843
|
+
ignoreDiacritics: r,
|
|
844
|
+
includeMatches: n,
|
|
845
|
+
minMatchCharLength: i,
|
|
846
|
+
findAllMatches: c,
|
|
847
|
+
ignoreLocation: u,
|
|
848
|
+
location: o,
|
|
849
|
+
threshold: a,
|
|
850
|
+
distance: l
|
|
851
|
+
}, e = s ? e : e.toLowerCase(), e = r ? K(e) : e, this.pattern = e, this.query = Ut(this.pattern, this.options);
|
|
852
|
+
}
|
|
853
|
+
static condition(e, s) {
|
|
854
|
+
return s.useExtendedSearch;
|
|
855
|
+
}
|
|
856
|
+
searchIn(e) {
|
|
857
|
+
const s = this.query;
|
|
858
|
+
if (!s)
|
|
859
|
+
return {
|
|
860
|
+
isMatch: !1,
|
|
861
|
+
score: 1
|
|
862
|
+
};
|
|
863
|
+
const { includeMatches: r, isCaseSensitive: n, ignoreDiacritics: i } = this.options;
|
|
864
|
+
e = n ? e : e.toLowerCase(), e = i ? K(e) : e;
|
|
865
|
+
let u = 0, c = [], o = 0;
|
|
866
|
+
for (let a = 0, l = s.length; a < l; a += 1) {
|
|
867
|
+
const g = s[a];
|
|
868
|
+
c.length = 0, u = 0;
|
|
869
|
+
for (let h = 0, f = g.length; h < f; h += 1) {
|
|
870
|
+
const p = g[h], { isMatch: A, indices: y, score: F } = p.search(e);
|
|
871
|
+
if (A) {
|
|
872
|
+
if (u += 1, o += F, r) {
|
|
873
|
+
const M = p.constructor.type;
|
|
874
|
+
Gt.has(M) ? c = [...c, ...y] : c.push(y);
|
|
875
|
+
}
|
|
876
|
+
} else {
|
|
877
|
+
o = 0, u = 0, c.length = 0;
|
|
878
|
+
break;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
if (u) {
|
|
882
|
+
let h = {
|
|
883
|
+
isMatch: !0,
|
|
884
|
+
score: o / u
|
|
885
|
+
};
|
|
886
|
+
return r && (h.indices = c), h;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
return {
|
|
890
|
+
isMatch: !1,
|
|
891
|
+
score: 1
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
const re = [];
|
|
896
|
+
function Qt(...t) {
|
|
897
|
+
re.push(...t);
|
|
898
|
+
}
|
|
899
|
+
function ne(t, e) {
|
|
900
|
+
for (let s = 0, r = re.length; s < r; s += 1) {
|
|
901
|
+
let n = re[s];
|
|
902
|
+
if (n.condition(t, e))
|
|
903
|
+
return new n(t, e);
|
|
904
|
+
}
|
|
905
|
+
return new Le(t, e);
|
|
906
|
+
}
|
|
907
|
+
const Y = {
|
|
908
|
+
AND: "$and",
|
|
909
|
+
OR: "$or"
|
|
910
|
+
}, ie = {
|
|
911
|
+
PATH: "$path",
|
|
912
|
+
PATTERN: "$val"
|
|
913
|
+
}, ue = (t) => !!(t[Y.AND] || t[Y.OR]), Xt = (t) => !!t[ie.PATH], Zt = (t) => !x(t) && be(t) && !ue(t), Fe = (t) => ({
|
|
914
|
+
[Y.AND]: Object.keys(t).map((e) => ({
|
|
915
|
+
[e]: t[e]
|
|
916
|
+
}))
|
|
917
|
+
});
|
|
918
|
+
function $e(t, e, { auto: s = !0 } = {}) {
|
|
919
|
+
const r = (n) => {
|
|
920
|
+
let i = Object.keys(n);
|
|
921
|
+
const u = Xt(n);
|
|
922
|
+
if (!u && i.length > 1 && !ue(n))
|
|
923
|
+
return r(Fe(n));
|
|
924
|
+
if (Zt(n)) {
|
|
925
|
+
const o = u ? n[ie.PATH] : i[0], a = u ? n[ie.PATTERN] : n[o];
|
|
926
|
+
if (!S(a))
|
|
927
|
+
throw new Error(Mt(o));
|
|
928
|
+
const l = {
|
|
929
|
+
keyId: te(o),
|
|
930
|
+
pattern: a
|
|
931
|
+
};
|
|
932
|
+
return s && (l.searcher = ne(a, e)), l;
|
|
933
|
+
}
|
|
934
|
+
let c = {
|
|
935
|
+
children: [],
|
|
936
|
+
operator: i[0]
|
|
937
|
+
};
|
|
938
|
+
return i.forEach((o) => {
|
|
939
|
+
const a = n[o];
|
|
940
|
+
x(a) && a.forEach((l) => {
|
|
941
|
+
c.children.push(r(l));
|
|
942
|
+
});
|
|
943
|
+
}), c;
|
|
944
|
+
};
|
|
945
|
+
return ue(t) || (t = Fe(t)), r(t);
|
|
946
|
+
}
|
|
947
|
+
function qt(t, { ignoreFieldNorm: e = d.ignoreFieldNorm }) {
|
|
948
|
+
t.forEach((s) => {
|
|
949
|
+
let r = 1;
|
|
950
|
+
s.matches.forEach(({ key: n, norm: i, score: u }) => {
|
|
951
|
+
const c = n ? n.weight : null;
|
|
952
|
+
r *= Math.pow(
|
|
953
|
+
u === 0 && c ? Number.EPSILON : u,
|
|
954
|
+
(c || 1) * (e ? 1 : i)
|
|
955
|
+
);
|
|
956
|
+
}), s.score = r;
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
function es(t, e) {
|
|
960
|
+
const s = t.matches;
|
|
961
|
+
e.matches = [], D(s) && s.forEach((r) => {
|
|
962
|
+
if (!D(r.indices) || !r.indices.length)
|
|
963
|
+
return;
|
|
964
|
+
const { indices: n, value: i } = r;
|
|
965
|
+
let u = {
|
|
966
|
+
indices: n,
|
|
967
|
+
value: i
|
|
968
|
+
};
|
|
969
|
+
r.key && (u.key = r.key.src), r.idx > -1 && (u.refIndex = r.idx), e.matches.push(u);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
function ts(t, e) {
|
|
973
|
+
e.score = t.score;
|
|
974
|
+
}
|
|
975
|
+
function ss(t, e, {
|
|
976
|
+
includeMatches: s = d.includeMatches,
|
|
977
|
+
includeScore: r = d.includeScore
|
|
978
|
+
} = {}) {
|
|
979
|
+
const n = [];
|
|
980
|
+
return s && n.push(es), r && n.push(ts), t.map((i) => {
|
|
981
|
+
const { idx: u } = i, c = {
|
|
982
|
+
item: e[u],
|
|
983
|
+
refIndex: u
|
|
984
|
+
};
|
|
985
|
+
return n.length && n.forEach((o) => {
|
|
986
|
+
o(i, c);
|
|
987
|
+
}), c;
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
class k {
|
|
991
|
+
constructor(e, s = {}, r) {
|
|
992
|
+
this.options = { ...d, ...s }, this.options.useExtendedSearch, this._keyStore = new xt(this.options.keys), this.setCollection(e, r);
|
|
993
|
+
}
|
|
994
|
+
setCollection(e, s) {
|
|
995
|
+
if (this._docs = e, s && !(s instanceof le))
|
|
996
|
+
throw new Error(Dt);
|
|
997
|
+
this._myIndex = s || ke(this.options.keys, this._docs, {
|
|
998
|
+
getFn: this.options.getFn,
|
|
999
|
+
fieldNormWeight: this.options.fieldNormWeight
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
add(e) {
|
|
1003
|
+
D(e) && (this._docs.push(e), this._myIndex.add(e));
|
|
1004
|
+
}
|
|
1005
|
+
remove(e = () => !1) {
|
|
1006
|
+
const s = [];
|
|
1007
|
+
for (let r = 0, n = this._docs.length; r < n; r += 1) {
|
|
1008
|
+
const i = this._docs[r];
|
|
1009
|
+
e(i, r) && (this.removeAt(r), r -= 1, n -= 1, s.push(i));
|
|
1010
|
+
}
|
|
1011
|
+
return s;
|
|
1012
|
+
}
|
|
1013
|
+
removeAt(e) {
|
|
1014
|
+
this._docs.splice(e, 1), this._myIndex.removeAt(e);
|
|
1015
|
+
}
|
|
1016
|
+
getIndex() {
|
|
1017
|
+
return this._myIndex;
|
|
1018
|
+
}
|
|
1019
|
+
search(e, { limit: s = -1 } = {}) {
|
|
1020
|
+
const {
|
|
1021
|
+
includeMatches: r,
|
|
1022
|
+
includeScore: n,
|
|
1023
|
+
shouldSort: i,
|
|
1024
|
+
sortFn: u,
|
|
1025
|
+
ignoreFieldNorm: c
|
|
1026
|
+
} = this.options;
|
|
1027
|
+
let o = S(e) ? S(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
1028
|
+
return qt(o, { ignoreFieldNorm: c }), i && o.sort(u), Ie(s) && s > -1 && (o = o.slice(0, s)), ss(o, this._docs, {
|
|
1029
|
+
includeMatches: r,
|
|
1030
|
+
includeScore: n
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
_searchStringList(e) {
|
|
1034
|
+
const s = ne(e, this.options), { records: r } = this._myIndex, n = [];
|
|
1035
|
+
return r.forEach(({ v: i, i: u, n: c }) => {
|
|
1036
|
+
if (!D(i))
|
|
1037
|
+
return;
|
|
1038
|
+
const { isMatch: o, score: a, indices: l } = s.searchIn(i);
|
|
1039
|
+
o && n.push({
|
|
1040
|
+
item: i,
|
|
1041
|
+
idx: u,
|
|
1042
|
+
matches: [{ score: a, value: i, norm: c, indices: l }]
|
|
1043
|
+
});
|
|
1044
|
+
}), n;
|
|
1045
|
+
}
|
|
1046
|
+
_searchLogical(e) {
|
|
1047
|
+
const s = $e(e, this.options), r = (c, o, a) => {
|
|
1048
|
+
if (!c.children) {
|
|
1049
|
+
const { keyId: g, searcher: h } = c, f = this._findMatches({
|
|
1050
|
+
key: this._keyStore.get(g),
|
|
1051
|
+
value: this._myIndex.getValueForItemAtKeyId(o, g),
|
|
1052
|
+
searcher: h
|
|
1053
|
+
});
|
|
1054
|
+
return f && f.length ? [
|
|
1055
|
+
{
|
|
1056
|
+
idx: a,
|
|
1057
|
+
item: o,
|
|
1058
|
+
matches: f
|
|
1059
|
+
}
|
|
1060
|
+
] : [];
|
|
1061
|
+
}
|
|
1062
|
+
const l = [];
|
|
1063
|
+
for (let g = 0, h = c.children.length; g < h; g += 1) {
|
|
1064
|
+
const f = c.children[g], p = r(f, o, a);
|
|
1065
|
+
if (p.length)
|
|
1066
|
+
l.push(...p);
|
|
1067
|
+
else if (c.operator === Y.AND)
|
|
1068
|
+
return [];
|
|
1069
|
+
}
|
|
1070
|
+
return l;
|
|
1071
|
+
}, n = this._myIndex.records, i = {}, u = [];
|
|
1072
|
+
return n.forEach(({ $: c, i: o }) => {
|
|
1073
|
+
if (D(c)) {
|
|
1074
|
+
let a = r(s, c, o);
|
|
1075
|
+
a.length && (i[o] || (i[o] = { idx: o, item: c, matches: [] }, u.push(i[o])), a.forEach(({ matches: l }) => {
|
|
1076
|
+
i[o].matches.push(...l);
|
|
1077
|
+
}));
|
|
1078
|
+
}
|
|
1079
|
+
}), u;
|
|
1080
|
+
}
|
|
1081
|
+
_searchObjectList(e) {
|
|
1082
|
+
const s = ne(e, this.options), { keys: r, records: n } = this._myIndex, i = [];
|
|
1083
|
+
return n.forEach(({ $: u, i: c }) => {
|
|
1084
|
+
if (!D(u))
|
|
1085
|
+
return;
|
|
1086
|
+
let o = [];
|
|
1087
|
+
r.forEach((a, l) => {
|
|
1088
|
+
o.push(
|
|
1089
|
+
...this._findMatches({
|
|
1090
|
+
key: a,
|
|
1091
|
+
value: u[l],
|
|
1092
|
+
searcher: s
|
|
1093
|
+
})
|
|
1094
|
+
);
|
|
1095
|
+
}), o.length && i.push({
|
|
1096
|
+
idx: c,
|
|
1097
|
+
item: u,
|
|
1098
|
+
matches: o
|
|
1099
|
+
});
|
|
1100
|
+
}), i;
|
|
1101
|
+
}
|
|
1102
|
+
_findMatches({ key: e, value: s, searcher: r }) {
|
|
1103
|
+
if (!D(s))
|
|
1104
|
+
return [];
|
|
1105
|
+
let n = [];
|
|
1106
|
+
if (x(s))
|
|
1107
|
+
s.forEach(({ v: i, i: u, n: c }) => {
|
|
1108
|
+
if (!D(i))
|
|
1109
|
+
return;
|
|
1110
|
+
const { isMatch: o, score: a, indices: l } = r.searchIn(i);
|
|
1111
|
+
o && n.push({
|
|
1112
|
+
score: a,
|
|
1113
|
+
key: e,
|
|
1114
|
+
value: i,
|
|
1115
|
+
idx: u,
|
|
1116
|
+
norm: c,
|
|
1117
|
+
indices: l
|
|
1118
|
+
});
|
|
1119
|
+
});
|
|
1120
|
+
else {
|
|
1121
|
+
const { v: i, n: u } = s, { isMatch: c, score: o, indices: a } = r.searchIn(i);
|
|
1122
|
+
c && n.push({ score: o, key: e, value: i, norm: u, indices: a });
|
|
1123
|
+
}
|
|
1124
|
+
return n;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
k.version = "7.1.0";
|
|
1128
|
+
k.createIndex = ke;
|
|
1129
|
+
k.parseIndex = kt;
|
|
1130
|
+
k.config = d;
|
|
1131
|
+
k.parseQuery = $e;
|
|
1132
|
+
Qt(Jt);
|
|
1133
|
+
const rs = {
|
|
1134
|
+
threshold: 0.3
|
|
1135
|
+
}, ns = (t) => (e) => {
|
|
1136
|
+
const s = new k(e, {
|
|
1137
|
+
keys: Object.keys(e[0]),
|
|
1138
|
+
...rs,
|
|
1139
|
+
...t
|
|
1140
|
+
});
|
|
1141
|
+
return {
|
|
1142
|
+
type: "fuse",
|
|
1143
|
+
page: (r, n) => e.slice(r * n, (r + 1) * n),
|
|
1144
|
+
search: (r) => s.search(r).map(({ item: n }) => n),
|
|
1145
|
+
retrieve: (r) => e.filter((n) => r.includes(n.key))
|
|
1146
|
+
};
|
|
1147
|
+
}, is = ns(), us = ({
|
|
1148
|
+
term: t,
|
|
1149
|
+
searcher: e = is
|
|
1150
|
+
}) => Et(({ data: s }) => typeof e == "function" ? t.length === 0 || (s == null ? void 0 : s.length) === 0 ? { data: s, transformed: !1 } : { data: e(s).search(t), transformed: !0 } : { data: e.search(t), transformed: !0 }), Ne = ({
|
|
1151
|
+
debounce: t = 250,
|
|
1152
|
+
value: e,
|
|
1153
|
+
onChange: s,
|
|
1154
|
+
transformBefore: r
|
|
1155
|
+
}) => {
|
|
1156
|
+
const [n, i] = De({
|
|
1157
|
+
onChange: s,
|
|
1158
|
+
value: e,
|
|
1159
|
+
initial: ""
|
|
1160
|
+
}), { setTransform: u, deleteTransform: c } = ce(), o = Me(u, t, []), a = X(
|
|
1161
|
+
(l) => {
|
|
1162
|
+
i(l), l.length === 0 ? c("filter") : (r != null && (l = r(l)), o("filter", us({ term: l })));
|
|
1163
|
+
},
|
|
1164
|
+
[i, r]
|
|
1165
|
+
);
|
|
1166
|
+
return { value: n, onChange: a };
|
|
1167
|
+
}, cs = ({
|
|
1168
|
+
children: t = (s) => /* @__PURE__ */ C.jsx(Be, { placeholder: "Filter", ...s }),
|
|
1169
|
+
...e
|
|
1170
|
+
}) => t(Ne(e)), W = {
|
|
1171
|
+
height: 150
|
|
1172
|
+
}, Q = () => /* @__PURE__ */ C.jsx(T.Centered, { level: "h4", variant: "disabled", hideIcon: !0, style: W, children: "No Results" }), os = () => /* @__PURE__ */ C.jsx(T.Centered, { level: "h4", variant: "disabled", hideIcon: !0, style: W, children: "Type to search" }), as = () => /* @__PURE__ */ C.jsx(T.Centered, { level: "h2", variant: "disabled", hideIcon: !0, style: W, children: /* @__PURE__ */ C.jsx(at.Loading, {}) }), ls = ({ error: t }) => /* @__PURE__ */ C.jsx(T.Centered, { level: "h4", variant: "error", style: W, children: t.message }), hs = (t) => t, Ke = ({
|
|
1173
|
+
debounce: t = 250,
|
|
1174
|
+
searcher: e,
|
|
1175
|
+
value: s,
|
|
1176
|
+
onChange: r,
|
|
1177
|
+
pageSize: n = 15,
|
|
1178
|
+
filter: i = hs
|
|
1179
|
+
}) => {
|
|
1180
|
+
const [u, c] = De({
|
|
1181
|
+
value: s,
|
|
1182
|
+
onChange: r,
|
|
1183
|
+
initial: ""
|
|
1184
|
+
}), o = ot(u), a = H(!1), l = H(!0), g = H(0), { setSourceData: h, setEmptyContent: f, getDefaultEmptyContent: p } = ce(), { setHasMore: A, setOnFetchMore: y } = Ye();
|
|
1185
|
+
de(() => f(/* @__PURE__ */ C.jsx(os, {})), [f]);
|
|
1186
|
+
const F = X(
|
|
1187
|
+
(E = !1) => {
|
|
1188
|
+
if (o.current.length > 0 || a.current || e == null) return;
|
|
1189
|
+
E && (g.current = 0, l.current = !0, A(!0)), a.current = !0, f(/* @__PURE__ */ C.jsx(as, {})), (async () => {
|
|
1190
|
+
try {
|
|
1191
|
+
let B = await e.page(g.current, n);
|
|
1192
|
+
B = i(B), B.length === 0 && f(p() ?? /* @__PURE__ */ C.jsx(Q, {})), B.length < n && (l.current = !1, A(!1)), g.current += n, h(E ? B : (m) => [...m, ...B]);
|
|
1193
|
+
} catch (B) {
|
|
1194
|
+
a.current = !1, f(/* @__PURE__ */ C.jsx(ls, { error: B }));
|
|
1195
|
+
} finally {
|
|
1196
|
+
a.current = !1;
|
|
1197
|
+
}
|
|
1198
|
+
})();
|
|
1199
|
+
},
|
|
1200
|
+
[e, h, n, i]
|
|
1201
|
+
);
|
|
1202
|
+
de(() => {
|
|
1203
|
+
F(!0), y(F);
|
|
1204
|
+
}, [F]);
|
|
1205
|
+
const M = Me(
|
|
1206
|
+
(E) => {
|
|
1207
|
+
if (E.length === 0) {
|
|
1208
|
+
F(!0);
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
if (e == null) return f(/* @__PURE__ */ C.jsx(Q, {}));
|
|
1212
|
+
e.search(E).then((b) => {
|
|
1213
|
+
b.length === 0 && f(/* @__PURE__ */ C.jsx(Q, {})), h(i(b));
|
|
1214
|
+
}).catch((b) => {
|
|
1215
|
+
f(
|
|
1216
|
+
/* @__PURE__ */ C.jsx(T.Centered, { level: "h4", variant: "error", children: b.message })
|
|
1217
|
+
);
|
|
1218
|
+
});
|
|
1219
|
+
},
|
|
1220
|
+
t,
|
|
1221
|
+
[e, h, f, i]
|
|
1222
|
+
), R = X(
|
|
1223
|
+
(E) => {
|
|
1224
|
+
c(E), M(E);
|
|
1225
|
+
},
|
|
1226
|
+
[c, M]
|
|
1227
|
+
);
|
|
1228
|
+
return { value: u, onChange: R };
|
|
1229
|
+
}, fs = (t) => /* @__PURE__ */ C.jsx(Be, { placeholder: "Search", ...t }), ds = ({
|
|
1230
|
+
children: t = fs,
|
|
1231
|
+
...e
|
|
1232
|
+
}) => t(Ke(e)), Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1233
|
+
__proto__: null,
|
|
1234
|
+
Column: We,
|
|
1235
|
+
Core: ze,
|
|
1236
|
+
DataProvider: He,
|
|
1237
|
+
Filter: cs,
|
|
1238
|
+
Hover: Ve,
|
|
1239
|
+
ItemFrame: Ue,
|
|
1240
|
+
List: Ge,
|
|
1241
|
+
Search: ds,
|
|
1242
|
+
Selector: Je,
|
|
1243
|
+
selectValueIsZero: Qe,
|
|
1244
|
+
useDataContext: Xe,
|
|
1245
|
+
useDataUtils: ce,
|
|
1246
|
+
useFilter: Ne,
|
|
1247
|
+
useGetTransformedData: Ze,
|
|
1248
|
+
useHoverContext: qe,
|
|
1249
|
+
useSearch: Ke,
|
|
1250
|
+
useSelect: et,
|
|
1251
|
+
useSelection: tt,
|
|
1252
|
+
useSelectionContext: st,
|
|
1253
|
+
useSelectionUtils: rt,
|
|
1254
|
+
useSetSourceData: nt,
|
|
1255
|
+
useSourceData: it,
|
|
1256
|
+
useTransformedData: ut
|
|
1257
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1258
|
+
export {
|
|
1259
|
+
cs as F,
|
|
1260
|
+
ds as S,
|
|
1261
|
+
us as c,
|
|
1262
|
+
Ss as e,
|
|
1263
|
+
ns as f,
|
|
1264
|
+
Et as p
|
|
1265
|
+
};
|