@marimo-team/islands 0.22.1-dev4 → 0.22.1-dev41
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/{ConnectedDataExplorerComponent-Dl1grr8z.js → ConnectedDataExplorerComponent-DuD8BVl6.js} +54 -54
- package/dist/{Plot-WhbJAbBh.js → Plot-BxlSHo0G.js} +47 -38
- package/dist/_basePickBy-Sow3pJjS.js +41 -0
- package/dist/{_baseUniq-B4eL5sTC.js → _baseUniq-C87CckHL.js} +15 -54
- package/dist/{any-language-editor-CT_9yBde.js → any-language-editor-BHH_pQ6M.js} +21 -21
- package/dist/architecture-7HQA4BMR-BHdkAMvZ.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-vxgYGIMP.js → architectureDiagram-VXUJARFQ-B3YQo9At.js} +15 -15
- package/dist/{arrays-Du-jRBAy.js → arrays-beUWo8RF.js} +1 -1
- package/dist/assets/__vite-browser-external-WSlCcXn_.js +1 -0
- package/dist/assets/{worker-D10K3OOz.js → worker-DUYMdbtA.js} +2 -2
- package/dist/{blockDiagram-VD42YOAC-C7x6YTH7.js → blockDiagram-VD42YOAC-CpQ3TKEN.js} +7 -7
- package/dist/{button-qsiIHncQ.js → button-DNlNlZY_.js} +82 -84
- package/dist/{c4Diagram-YG6GDRKO-Cx4oseGg.js → c4Diagram-YG6GDRKO-CZSU4uqU.js} +4 -4
- package/dist/{capabilities-26mwv03y.js → capabilities-Coe9eM9T.js} +2 -2
- package/dist/{channel-C_50jIAn.js → channel-X3JKk8gE.js} +1 -1
- package/dist/{chat-ui-CtqUthFR.js → chat-ui-Cel1kBfc.js} +147 -146
- package/dist/{check-D_YwHEgY.js → check-CWUkiHmb.js} +1 -1
- package/dist/{chunk-4F5CHEZ2-Dvo_CFnR.js → chunk-4F5CHEZ2-D5mClyDv.js} +1 -1
- package/dist/{chunk-ABZYJK2D-D5YIs71w.js → chunk-ABZYJK2D-CZYCCtLy.js} +1 -1
- package/dist/{chunk-ATLVNIR6-CyOjzOcf.js → chunk-ATLVNIR6-DaOzLLgN.js} +1 -1
- package/dist/{chunk-B2363JML-BzZqINRO.js → chunk-B2363JML-Br0eA2T3.js} +1 -1
- package/dist/{chunk-B4BG7PRW-ZJeV3KdD.js → chunk-B4BG7PRW-4BjV11Br.js} +4 -4
- package/dist/{chunk-DI55MBZ5-Dx_wwX6l.js → chunk-DI55MBZ5-DITY3EyP.js} +4 -4
- package/dist/{chunk-EXTU4WIE-CgefpSXQ.js → chunk-EXTU4WIE-jUPSAk3i.js} +1 -1
- package/dist/{chunk-FRFDVMJY-Derq8UzY.js → chunk-FRFDVMJY-DnEvEFRR.js} +1 -1
- package/dist/{chunk-JA3XYJ7Z-CcIOIFpc.js → chunk-JA3XYJ7Z-BcPEfxk_.js} +2 -2
- package/dist/{chunk-JZLCHNYA-CgO0GG1p.js → chunk-JZLCHNYA-2bnLL3xL.js} +4 -4
- package/dist/{chunk-N4CR4FBY-2qzGzAxT.js → chunk-N4CR4FBY-CpZSuGSU.js} +5 -5
- package/dist/{chunk-PL6DKKU2-KoG71Zin.js → chunk-PL6DKKU2-DnId6G-x.js} +1 -1
- package/dist/{chunk-QN33PNHL-Dp1qBo28.js → chunk-QN33PNHL-B9p5ojHB.js} +1 -1
- package/dist/{chunk-QXUST7PY-BxmmeIwf.js → chunk-QXUST7PY-Ch6F5Obl.js} +5 -5
- package/dist/{chunk-S3R3BYOJ-D3Rys9ZW.js → chunk-S3R3BYOJ-B0UOFJwq.js} +3 -3
- package/dist/{chunk-SJTYNZTY-Co-DhKAG.js → chunk-SJTYNZTY-BsBZnJUj.js} +1 -1
- package/dist/{chunk-TCCFYFTB-BAhzIqBO.js → chunk-TCCFYFTB-Clbl-fTg.js} +8 -7
- package/dist/{chunk-TQ3KTPDO-DxYI735Z.js → chunk-TQ3KTPDO-CFkSQ30e.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Dxumt0wv.js → chunk-TZMSLE5B-D45397J2.js} +1 -1
- package/dist/{chunk-UMXZTB3W-CuahpKin.js → chunk-UMXZTB3W-D-A834Bq.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CYoFMQKE.js → classDiagram-2ON5EDUG-C8-zE3Zv.js} +10 -10
- package/dist/{classDiagram-2ON5EDUG-DkOvXRlx.js → classDiagram-v2-WZHVMYZB-DrmbGANl.js} +10 -10
- package/dist/{clone-DDndUqI0.js → clone-DZFQCtFJ.js} +1 -1
- package/dist/{constants-D1Am36hX.js → constants-CvyfaCvs.js} +3 -3
- package/dist/{copy-CBo9JcJW.js → copy-B7781WJ3.js} +2 -2
- package/dist/{dagre-6UL2VRFP-BXBaU8PB.js → dagre-6UL2VRFP-OMItEBnY.js} +12 -12
- package/dist/{dagre-D3dlYz-r.js → dagre-QVd-lCXU.js} +13 -23
- package/dist/{data-grid-overlay-editor-nZux6_d2.js → data-grid-overlay-editor-lKF301ME.js} +1 -1
- package/dist/{diagram-PSM6KHXK-CJxjk4LG.js → diagram-PSM6KHXK-CkKbohWI.js} +16 -16
- package/dist/{diagram-QEK2KX5R-IMILPh_p.js → diagram-QEK2KX5R-DjUMpVcx.js} +14 -14
- package/dist/{diagram-S2PKOQOG-6O0g6Boj.js → diagram-S2PKOQOG-b-c0d-wZ.js} +14 -14
- package/dist/{dist-BkXs8bw0.js → dist--6TSlp8H.js} +1 -1
- package/dist/dist-7K5doRvB.js +6 -0
- package/dist/{dist-CQidOwep.js → dist-B43sbpd0.js} +3 -3
- package/dist/dist-B6I_A2-E.js +8 -0
- package/dist/dist-BEQsmaZY.js +5 -0
- package/dist/dist-BasY2RHp.js +8 -0
- package/dist/{dist-BemtTYzN.js → dist-Bfp1XXWt.js} +5 -5
- package/dist/{dist-v-1kgqZ3.js → dist-BjDuO5JW.js} +1 -1
- package/dist/dist-Bosc00dY.js +5 -0
- package/dist/{dist-DLNKBPsk.js → dist-BrxqmS9Q.js} +4 -4
- package/dist/{dist-DBYL08Lu.js → dist-BvhGByxL.js} +4 -4
- package/dist/{dist-CVqlhD3M.js → dist-C4bq5Ioy.js} +2 -2
- package/dist/{dist-DwmxBUOe.js → dist-CFKdzOIu.js} +2 -2
- package/dist/{dist-5nTQE2yt.js → dist-CIB8w0Fl.js} +2 -2
- package/dist/{dist-C-EcLtO9.js → dist-CNF0QBLR.js} +1 -1
- package/dist/dist-CQMZOn-_.js +8 -0
- package/dist/dist-CViQhWZ8.js +5 -0
- package/dist/{dist-Dg65j0em.js → dist-CcMfr7jD.js} +1 -1
- package/dist/{dist-C0XYIHKJ.js → dist-Ci0CXEFt.js} +1 -1
- package/dist/dist-Cz6rLfwY.js +5 -0
- package/dist/dist-D8eq8st3.js +6 -0
- package/dist/{dist-qoCY8giM.js → dist-DAfcmt-d.js} +2 -2
- package/dist/{dist-B6Op2ogv.js → dist-DD_cYHOl.js} +2 -2
- package/dist/{dist-BUSLKXcu.js → dist-DFK94vuS.js} +2 -2
- package/dist/{dist-DBXPlQ0D.js → dist-DGNtjMZu.js} +1 -1
- package/dist/{dist-C9qF7MRB.js → dist-DJ9F1eHs.js} +2 -2
- package/dist/{dist-Ci_jEudG.js → dist-DJKubHDd.js} +1 -1
- package/dist/{dist-CnFp2Kcl.js → dist-DLafRu9s.js} +2 -2
- package/dist/dist-DM1UDXdl.js +5 -0
- package/dist/dist-DNrtWPgS.js +5 -0
- package/dist/dist-D_UjpfOY.js +1381 -0
- package/dist/{dist-DmFS6KZW.js → dist-DbnBiLNH.js} +3 -3
- package/dist/{dist-BiZZAo22.js → dist-DlSUOIm9.js} +1 -1
- package/dist/{dist-DStU8He1.js → dist-Doy0mQDg.js} +2 -2
- package/dist/{dist-CxAX99oC.js → dist-DpkJHKB8.js} +2 -2
- package/dist/{dist-DjaZNkZ7.js → dist-LhQNUe5A.js} +3 -3
- package/dist/dist-V7q2qnpA.js +5 -0
- package/dist/{dist-BJ3fhRYu.js → dist-VqF3W_ue.js} +2 -2
- package/dist/dist-a5_hPgu2.js +8 -0
- package/dist/{dist-B9KLrfoh.js → dist-ej6AQKaS.js} +1 -1
- package/dist/{dist-Brb6VNc4.js → dist-m9tsXsFf.js} +2 -2
- package/dist/{dist-CBwMSFDu.js → dist-tGk0aZ--.js} +2 -2
- package/dist/dist-uVyZcV1-.js +5 -0
- package/dist/{erDiagram-Q2GNP2WA-sho7Cl9f.js → erDiagram-Q2GNP2WA-CDhLaOZ1.js} +10 -10
- package/dist/{error-banner-Bx9kIgrs.js → error-banner-Cjf0RU9I.js} +79 -79
- package/dist/{esm-CMg2ABu6.js → esm-4wmsH2lp.js} +6 -6
- package/dist/{esm-cqK9POGH.js → esm-CD1iby2n.js} +23 -23
- package/dist/{flowDiagram-NV44I4VS-C4nY4Fbz.js → flowDiagram-NV44I4VS-BDi4O4CL.js} +10 -10
- package/dist/{ganttDiagram-JELNMOA3-CtxNcCM2.js → ganttDiagram-JELNMOA3-BpZE6kVp.js} +3 -3
- package/dist/{gitGraph-G5XIXVHT-SL6TDof6.js → gitGraph-G5XIXVHT-B_c6xFJv.js} +3 -3
- package/dist/{gitGraphDiagram-V2S2FVAM-D9885mxd.js → gitGraphDiagram-V2S2FVAM-iQnXzbPM.js} +13 -13
- package/dist/{glide-data-editor-CkVEV-Gk.js → glide-data-editor-BqnvTmDo.js} +1739 -1708
- package/dist/{graphlib-CxWdvYQt.js → graphlib-BV1_gi0C.js} +4 -3
- package/dist/hasIn-DnfJcYpY.js +108 -0
- package/dist/{info-VBDWY6EO-6MXPTSmi.js → info-VBDWY6EO-BTyzxmhr.js} +3 -3
- package/dist/{infoDiagram-HS3SLOUP-Bw2FlRwF.js → infoDiagram-HS3SLOUP-OYrX6uO3.js} +13 -13
- package/dist/{input-BSde8uV4.js → input-CFY9gApZ.js} +5055 -5055
- package/dist/{isEmpty-BQtUinxJ.js → isEmpty-B7FX9wKt.js} +1 -1
- package/dist/{isSymbol-DFp8040B.js → isSymbol-DCbjQG_U.js} +1 -1
- package/dist/{journeyDiagram-XKPGCS4Q-BXlCEth8.js → journeyDiagram-XKPGCS4Q-ClPC94aN.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-CorxzSYm.js → kanban-definition-3W4ZIXB7-DHEAKdZt.js} +7 -7
- package/dist/{label-DTNqw9tv.js → label-DbZGAoCH.js} +538 -569
- package/dist/{loader-3c9hT4kT.js → loader-Bd1kgLn7.js} +19 -16
- package/dist/main.js +3203 -3105
- package/dist/{memoize-CuHciEBb.js → memoize-CSTI9eOX.js} +1 -1
- package/dist/{merge-CA_buyY3.js → merge-CVhG7q_o.js} +1 -1
- package/dist/{mermaid-CEKslOkI.js → mermaid-B2HDLx2g.js} +54 -54
- package/dist/{mermaid-parser.core-cq4YDee-.js → mermaid-parser.core-ntCgyx0x.js} +8 -8
- package/dist/min-Ds3gG0Ff.js +96 -0
- package/dist/{mindmap-definition-VGOIOE7T-DRsT8UaN.js → mindmap-definition-VGOIOE7T-CxEUZZvY.js} +9 -9
- package/dist/{now-CXAdKY5k.js → now-nrrrOr01.js} +1 -1
- package/dist/{once-CZno0h-b.js → once-C_TIu-kR.js} +1 -1
- package/dist/{packet-DYOGHKS2-Dw08gMaZ.js → packet-DYOGHKS2-BhvnpoGi.js} +3 -3
- package/dist/{pie-VRWISCQL-C5SPSvT8.js → pie-VRWISCQL-dILuA3iG.js} +3 -3
- package/dist/{pieDiagram-ADFJNKIX-DhJ1Cx2O.js → pieDiagram-ADFJNKIX-U3LrUqAS.js} +14 -14
- package/dist/{process-output-KyzWazB-.js → process-output-DC1TOnIl.js} +3184 -3207
- package/dist/{quadrantDiagram-AYHSOK5B-DXUFIWlz.js → quadrantDiagram-AYHSOK5B-BVWuq-3R.js} +2 -2
- package/dist/{radar-ZZBFDIW7-BvY0bgSg.js → radar-ZZBFDIW7-DwFrOJDj.js} +3 -3
- package/dist/range-fJeId9Ri.js +30 -0
- package/dist/{requirementDiagram-UZGBJVZJ-DO_gtQIb.js → requirementDiagram-UZGBJVZJ-D0zpQnKC.js} +9 -9
- package/dist/{sankeyDiagram-TZEHDZUN-OZzXEkuG.js → sankeyDiagram-TZEHDZUN-CExy1joT.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-K7nZRifV.js → sequenceDiagram-WL72ISMW-D1BJxLjH.js} +4 -4
- package/dist/{slides-component-CIcSvFh7.js → slides-component-CX2JC-Ws.js} +2 -2
- package/dist/{spec-DYaR1rJh.js → spec-CD7QaCV-.js} +3 -3
- package/dist/{stateDiagram-FKZM4ZOC-DzXJZAq7.js → stateDiagram-FKZM4ZOC-B1S8jGMn.js} +12 -12
- package/dist/{stateDiagram-v2-4FDKWEC3-BZBPUmyF.js → stateDiagram-v2-4FDKWEC3-BH5ozUbc.js} +10 -10
- package/dist/stex-CQDv3aS8.js +4 -0
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-DNoLAh-i.js → timeline-definition-IT6M3QCI-BDT9JAmn.js} +2 -2
- package/dist/{toDate-D6VXexnV.js → toDate-CUqpEbBS.js} +5 -5
- package/dist/{toNumber-xFPoy1OI.js → toNumber-55tjPCWr.js} +2 -2
- package/dist/tooltip-BXEpXV3R.js +404 -0
- package/dist/{treemap-GDKQZRPO-C5OoxpmV.js → treemap-GDKQZRPO-bx2ngsgN.js} +3 -3
- package/dist/{types-CQ-RbYxp.js → types-D_ntCXg0.js} +3 -3
- package/dist/{useAsyncData-Cd4Urlww.js → useAsyncData-rN1nzPaS.js} +2 -2
- package/dist/{useDeepCompareMemoize-X7clcrcQ.js → useDeepCompareMemoize-Ch-7Rk2x.js} +4 -4
- package/dist/{useIframeCapabilities-BVQrlRBd.js → useIframeCapabilities-CqhrVue6.js} +1 -1
- package/dist/useLifecycle-4fA1pHoh.js +177 -0
- package/dist/{useTheme-Dm1WaAGy.js → useTheme-MWfxn4oz.js} +4 -5
- package/dist/{vega-component-A6unyUJS.js → vega-component-CPhNLfZZ.js} +25 -25
- package/dist/{xychartDiagram-PRI3JC2R-ehVeySMW.js → xychartDiagram-PRI3JC2R-CuAZiqHS.js} +5 -5
- package/dist/{Combination-B--d1_LV.js → zod-C6UGQ3fz.js} +8085 -8151
- package/package.json +8 -41
- package/src/__mocks__/common.ts +4 -4
- package/src/__tests__/main.test.tsx +12 -14
- package/src/components/ai/ai-provider-icon.tsx +3 -2
- package/src/components/app-config/user-config-form.tsx +0 -27
- package/src/components/chat/acp/agent-docs.tsx +3 -3
- package/src/components/chat/acp/agent-panel.tsx +71 -24
- package/src/components/chat/acp/agent-selector.tsx +2 -11
- package/src/components/chat/acp/state.ts +15 -3
- package/src/components/chat/chat-history-popover.tsx +1 -1
- package/src/components/chat/chat-panel.tsx +2 -1
- package/src/components/data-table/TableBottomBar.tsx +12 -1
- package/src/components/data-table/TableTopBar.tsx +31 -35
- package/src/components/data-table/__tests__/columns.test.tsx +7 -7
- package/src/components/data-table/cell-hover-template/types.ts +1 -1
- package/src/components/data-table/cell-hover-text/types.ts +1 -1
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +1 -1
- package/src/components/data-table/cell-selection/types.ts +4 -3
- package/src/components/data-table/cell-styling/types.ts +1 -1
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +2 -2
- package/src/components/data-table/charts/charts.tsx +42 -13
- package/src/components/data-table/charts/components/chart-items.tsx +1 -1
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-formatting/types.ts +5 -4
- package/src/components/data-table/column-header.tsx +4 -2
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +1 -1
- package/src/components/data-table/column-wrapping/types.ts +4 -3
- package/src/components/data-table/columns.tsx +4 -1
- package/src/components/data-table/copy-column/types.ts +4 -3
- package/src/components/data-table/data-table.tsx +16 -11
- package/src/components/data-table/focus-row/types.ts +4 -3
- package/src/components/data-table/loading-table.tsx +5 -2
- package/src/components/data-table/pagination.tsx +1 -1
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +13 -13
- package/src/components/data-table/range-focus/__tests__/use-cell-range-selection.test.ts +9 -11
- package/src/components/data-table/range-focus/atoms.ts +2 -2
- package/src/components/data-table/range-focus/cell-selection-stats.tsx +3 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +1 -1
- package/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx +2 -2
- package/src/components/dependency-graph/dependency-graph-tree.tsx +1 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +93 -94
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +1 -1
- package/src/components/editor/actions/name-cell-input.tsx +4 -2
- package/src/components/editor/actions/pair-with-agent-modal.tsx +142 -0
- package/src/components/editor/actions/useCellActionButton.tsx +4 -2
- package/src/components/editor/actions/useNotebookActions.tsx +10 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +2 -1
- package/src/components/editor/ai/ai-completion-editor.tsx +1 -1
- package/src/components/editor/app-container.tsx +1 -1
- package/src/components/editor/cell/CellStatus.tsx +4 -5
- package/src/components/editor/cell/cell-context-menu.tsx +4 -2
- package/src/components/editor/cell/code/cell-editor.tsx +3 -2
- package/src/components/editor/cell/toolbar.tsx +2 -1
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +4 -1
- package/src/components/editor/chrome/components/feedback-button.tsx +4 -1
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/empty-state.tsx +1 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +0 -10
- package/src/components/editor/chrome/panels/snippets-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +1 -1
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +4 -1
- package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +2 -1
- package/src/components/editor/chrome/wrapper/storage.ts +2 -2
- package/src/components/editor/connections/database/as-code.ts +1 -1
- package/src/components/editor/connections/form-renderers.tsx +1 -1
- package/src/components/editor/connections/storage/as-code.ts +1 -1
- package/src/components/editor/controls/keyboard-shortcuts.tsx +1 -1
- package/src/components/editor/header/filename-input.tsx +4 -1
- package/src/components/editor/links/cell-link-list.tsx +1 -1
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1 -1
- package/src/components/editor/navigation/clipboard.ts +1 -1
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +2 -2
- package/src/components/editor/navigation/navigation.ts +3 -3
- package/src/components/editor/notebook-cell.tsx +1 -1
- package/src/components/editor/output/JsonOutput.tsx +6 -6
- package/src/components/editor/output/ansi-reduce.ts +2 -2
- package/src/components/editor/output/console/ConsoleOutput.tsx +2 -2
- package/src/components/editor/renderers/cells-renderer.tsx +1 -1
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +1 -1
- package/src/components/editor/renderers/plugins.ts +1 -1
- package/src/components/editor/renderers/slides-layout/types.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +1 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +12 -13
- package/src/components/find-replace/find-replace.tsx +3 -1
- package/src/components/forms/form.tsx +1 -1
- package/src/components/forms/options.ts +1 -1
- package/src/components/pages/gallery-page.tsx +1 -1
- package/src/components/static-html/static-banner.tsx +2 -2
- package/src/components/storage/__tests__/storage-snippets.test.ts +4 -6
- package/src/components/terminal/terminal.tsx +4 -4
- package/src/components/tracing/tracing.test.tsx +30 -30
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +1 -1
- package/src/components/ui/badge.tsx +2 -1
- package/src/components/ui/button.tsx +5 -4
- package/src/components/ui/calendar.tsx +3 -2
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +2 -1
- package/src/components/ui/command.tsx +5 -2
- package/src/components/ui/context-menu.tsx +1 -1
- package/src/components/ui/date-input.tsx +7 -6
- package/src/components/ui/date-picker.tsx +6 -4
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/draggable-popover.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +2 -1
- package/src/components/ui/field.tsx +1 -2
- package/src/components/ui/form.tsx +4 -5
- package/src/components/ui/fullscreen.tsx +4 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/navigation.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +4 -3
- package/src/components/ui/query-param-preserving-link.tsx +4 -2
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/range-slider.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/sheet.tsx +3 -2
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -2
- package/src/components/ui/toast.tsx +1 -1
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/components/variables/variables-table.tsx +1 -1
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/error.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/variable.test.ts +1 -1
- package/src/core/ai/context/providers/cell-output.ts +1 -2
- package/src/core/ai/context/registry.ts +2 -2
- package/src/core/ai/tools/edit-notebook-tool.ts +4 -3
- package/src/core/ai/tools/registry.ts +1 -1
- package/src/core/ai/tools/run-cells-tool.ts +4 -3
- package/src/core/cells/__tests__/add-missing-import.test.ts +23 -22
- package/src/core/cells/__tests__/cell.test.ts +14 -13
- package/src/core/cells/__tests__/cells.test.ts +2 -2
- package/src/core/cells/__tests__/scrollCellIntoView.test.ts +1 -1
- package/src/core/cells/__tests__/session.test.ts +1 -1
- package/src/core/cells/__tests__/utils.test.ts +1 -1
- package/src/core/cells/cells.ts +2 -2
- package/src/core/cells/ids.ts +1 -1
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/ai/request.ts +1 -1
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +15 -17
- package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +1 -1
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +129 -3
- package/src/core/codemirror/copilot/client.ts +9 -2
- package/src/core/codemirror/copilot/getCodes.ts +1 -1
- package/src/core/codemirror/copilot/language-server.ts +12 -1
- package/src/core/codemirror/copilot/transport.ts +34 -8
- package/src/core/codemirror/copilot/types.ts +1 -1
- package/src/core/codemirror/facet.ts +1 -1
- package/src/core/codemirror/language/__tests__/sql.test.ts +4 -4
- package/src/core/codemirror/language/languages/markdown.ts +1 -3
- package/src/core/codemirror/language/languages/python.ts +4 -0
- package/src/core/codemirror/language/languages/sql/completion-builder.ts +1 -1
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +4 -6
- package/src/core/codemirror/language/languages/sql/sql.ts +1 -3
- package/src/core/codemirror/language/metadata.ts +1 -1
- package/src/core/codemirror/language/panel/sql.tsx +4 -1
- package/src/core/codemirror/language/types.ts +1 -1
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -1
- package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +1 -1
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +28 -42
- package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
- package/src/core/config/__tests__/config-schema.test.ts +2 -6
- package/src/core/config/config-schema.ts +0 -1
- package/src/core/config/feature-flag.tsx +1 -3
- package/src/core/datasets/data-source-connections.ts +4 -2
- package/src/core/datasets/state.ts +1 -1
- package/src/core/dom/__tests__/htmlUtils.test.ts +8 -14
- package/src/core/dom/__tests__/outline.test.ts +2 -3
- package/src/core/dom/outline.ts +1 -1
- package/src/core/edit-app.tsx +4 -1
- package/src/core/export/__tests__/hooks.test.ts +1 -1
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +1 -1
- package/src/core/hotkeys/shortcuts.ts +1 -1
- package/src/core/islands/__tests__/bridge.test.ts +2 -2
- package/src/core/islands/__tests__/parse.test.ts +8 -7
- package/src/core/islands/bridge.ts +2 -2
- package/src/core/islands/components/output-wrapper.tsx +1 -1
- package/src/core/islands/parse.ts +1 -1
- package/src/core/lsp/__tests__/transport.test.ts +1 -1
- package/src/core/network/CachingRequestRegistry.ts +1 -1
- package/src/core/network/DeferredRequestRegistry.ts +1 -1
- package/src/core/network/__tests__/requests-network.test.ts +1 -1
- package/src/core/network/api.ts +2 -2
- package/src/core/network/requests-lazy.ts +1 -1
- package/src/core/network/requests-toasting.tsx +1 -1
- package/src/core/runtime/runtime.ts +1 -0
- package/src/core/saving/__tests__/filename.test.ts +7 -6
- package/src/core/static/__tests__/download-html.test.ts +16 -15
- package/src/core/static/__tests__/files.test.ts +30 -28
- package/src/core/static/files.ts +1 -1
- package/src/core/vscode/vscode-bindings.ts +1 -1
- package/src/core/wasm/bridge.ts +3 -3
- package/src/core/wasm/worker/tracer.ts +1 -1
- package/src/core/websocket/useWebSocket.tsx +5 -3
- package/src/css/app/Cell.css +25 -1
- package/src/css/globals.css +18 -16
- package/src/css/table.css +17 -0
- package/src/custom.d.ts +1 -1
- package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +3 -3
- package/src/hooks/debug.ts +3 -3
- package/src/hooks/useDebounce.ts +1 -1
- package/src/hooks/useEventListener.ts +1 -1
- package/src/hooks/useHotkey.ts +1 -1
- package/src/hooks/useLifecycle.ts +2 -2
- package/src/hooks/useNonce.ts +1 -1
- package/src/hooks/useResizeObserver.ts +2 -2
- package/src/main.tsx +1 -1
- package/src/plugins/core/BadPlugin.tsx +7 -6
- package/src/plugins/core/RenderHTML.tsx +3 -3
- package/src/plugins/core/__test__/registerReactComponent.test.ts +1 -1
- package/src/plugins/core/registerReactComponent.tsx +4 -4
- package/src/plugins/core/rpc.ts +1 -1
- package/src/plugins/impl/CheckboxPlugin.tsx +4 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +8 -3
- package/src/plugins/impl/DataTablePlugin.tsx +6 -2
- package/src/plugins/impl/FileBrowserPlugin.tsx +1 -1
- package/src/plugins/impl/FormPlugin.tsx +2 -3
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +4 -1
- package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +1 -1
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +43 -15
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +3 -12
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +2 -2
- package/src/plugins/impl/anywidget/model.ts +1 -1
- package/src/plugins/impl/anywidget/types.ts +2 -2
- package/src/plugins/impl/anywidget/widget-binding.ts +1 -1
- package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
- package/src/plugins/impl/chat/chat-ui.tsx +5 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +2 -2
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +2 -2
- package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
- package/src/plugins/impl/data-explorer/functions/function.ts +1 -1
- package/src/plugins/impl/data-explorer/queries/types.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +7 -9
- package/src/plugins/impl/data-frames/forms/renderers.tsx +1 -1
- package/src/plugins/impl/data-frames/utils/operators.ts +1 -1
- package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +1 -1
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +1 -1
- package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
- package/src/plugins/impl/plotly/Plot.tsx +3 -3
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +65 -103
- package/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +114 -0
- package/src/plugins/impl/plotly/__tests__/selection.test.ts +199 -0
- package/src/plugins/impl/plotly/selection.ts +333 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +13 -14
- package/src/plugins/impl/vega/__tests__/utils.test.ts +68 -0
- package/src/plugins/impl/vega/batched.ts +1 -1
- package/src/plugins/impl/vega/make-selectable.ts +3 -3
- package/src/plugins/impl/vega/types.ts +1 -1
- package/src/plugins/impl/vega/utils.ts +14 -5
- package/src/plugins/impl/vega/vega.css +2 -1
- package/src/plugins/layout/DownloadPlugin.tsx +1 -1
- package/src/plugins/layout/ImageComparisonPlugin.tsx +1 -3
- package/src/plugins/layout/LazyPlugin.tsx +1 -1
- package/src/plugins/layout/RoutesPlugin.tsx +1 -1
- package/src/plugins/layout/mermaid/mermaid.tsx +1 -1
- package/src/plugins/plugins.ts +1 -1
- package/src/plugins/stateless-plugin.ts +4 -2
- package/src/stories/data-explorer.stories.tsx +1 -1
- package/src/stories/dataframe.stories.tsx +1 -1
- package/src/stories/editor.stories.tsx +1 -1
- package/src/stories/select.stories.tsx +1 -1
- package/src/stories/switchable-multi-select.stories.tsx +1 -1
- package/src/utils/Logger.ts +1 -1
- package/src/utils/__tests__/arrays.test.ts +1 -1
- package/src/utils/__tests__/blob.test.ts +1 -1
- package/src/utils/__tests__/cell-urls.test.ts +24 -21
- package/src/utils/__tests__/dates.test.ts +1 -1
- package/src/utils/__tests__/errors.test.ts +1 -1
- package/src/utils/__tests__/filenames.test.ts +15 -14
- package/src/utils/__tests__/json-parser.test.ts +14 -21
- package/src/utils/__tests__/multi-map.test.ts +3 -3
- package/src/utils/__tests__/objects.test.ts +3 -3
- package/src/utils/__tests__/path.test.ts +34 -31
- package/src/utils/__tests__/urls.test.ts +19 -18
- package/src/utils/__tests__/versions.test.ts +5 -5
- package/src/utils/__tests__/waitForWs.test.ts +1 -1
- package/src/utils/arrays.ts +2 -2
- package/src/utils/assertNever.ts +1 -1
- package/src/utils/batch-requests.ts +2 -2
- package/src/utils/createReducer.ts +2 -2
- package/src/utils/id-tree.tsx +2 -2
- package/src/utils/idle.ts +1 -1
- package/src/utils/invariant.ts +1 -2
- package/src/utils/json/base64.ts +2 -5
- package/src/utils/maps.ts +1 -1
- package/src/utils/math.ts +0 -1
- package/src/utils/mime-types.ts +1 -1
- package/src/utils/multi-map.ts +1 -1
- package/src/utils/objects.ts +1 -1
- package/src/utils/once.ts +2 -2
- package/src/utils/staticImplements.ts +1 -1
- package/src/utils/storage/jotai.ts +1 -1
- package/src/utils/tracer.ts +3 -2
- package/dist/_basePickBy-QjOmBDRE.js +0 -110
- package/dist/_baseSet-xgn1IbGV.js +0 -27
- package/dist/architecture-7HQA4BMR-BRyVh_Za.js +0 -6
- package/dist/assets/__vite-browser-external-Us1ds95c.js +0 -1
- package/dist/dist-B0R_ZM4-.js +0 -6
- package/dist/dist-B4a9_9pj.js +0 -5
- package/dist/dist-BCSUKEwO.js +0 -5
- package/dist/dist-BONIDQq6.js +0 -5
- package/dist/dist-BYeRx2hb.js +0 -5
- package/dist/dist-D2Rk1j4R.js +0 -1381
- package/dist/dist-DZjX5TYv.js +0 -5
- package/dist/dist-Dkw9x6kc.js +0 -5
- package/dist/dist-Ds6UaXGR.js +0 -6
- package/dist/dist-KuEJ1Q53.js +0 -8
- package/dist/dist-S72WNyTZ.js +0 -5
- package/dist/dist-bTG-yssT.js +0 -5
- package/dist/dist-diF0sguc.js +0 -8
- package/dist/dist-mJ84BIgu.js +0 -8
- package/dist/dist-wSIhFWQz.js +0 -8
- package/dist/get-CqrzlV1v.js +0 -68
- package/dist/range-CYz5jI--.js +0 -17
- package/dist/stex-CZyTRGVB.js +0 -4
- package/dist/tooltip-DGHTbHl5.js +0 -404
- package/dist/useLifecycle-Dids8BPm.js +0 -173
- /package/dist/{dist-KZI_BHqV.js → dist-CxZvoNao.js} +0 -0
- /package/dist/{invariant-D4hPsZFI.js → invariant-e8eBgdux.js} +0 -0
- /package/dist/{isArrayLikeObject-C-hFPChh.js → isArrayLikeObject-LXbTYiBa.js} +0 -0
- /package/dist/{main-CvkAPtaq.js → main-XimWhSi_.js} +0 -0
- /package/dist/{purify.es-ukiMXY-F.js → purify.es-hTCfRGdl.js} +0 -0
- /package/dist/{react-dom-BKwCWYPW.js → react-dom-BSUuJjCR.js} +0 -0
- /package/dist/{stex-Ze8D4R_5.js → stex-D887Ylhf.js} +0 -0
|
@@ -0,0 +1,1381 @@
|
|
|
1
|
+
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
|
+
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
|
+
import { m as useComposedRefs } from "./button-DNlNlZY_.js";
|
|
4
|
+
import { t as require_react_dom } from "./react-dom-BSUuJjCR.js";
|
|
5
|
+
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
6
|
+
import { dt as useLayoutEffect2, ht as Primitive, mt as createContextScope, st as useCallbackRef } from "./zod-C6UGQ3fz.js";
|
|
7
|
+
/**
|
|
8
|
+
* @license lucide-react v0.563.0 - ISC
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the ISC license.
|
|
11
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var mergeClasses = (...e) => e.filter((e2, a, o) => !!e2 && e2.trim() !== "" && o.indexOf(e2) === a).join(" ").trim(), toKebabCase = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), toCamelCase = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e2, a, o) => o ? o.toUpperCase() : a.toLowerCase()), toPascalCase = (e) => {
|
|
14
|
+
let a = toCamelCase(e);
|
|
15
|
+
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
16
|
+
}, defaultAttributes = {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
width: 24,
|
|
19
|
+
height: 24,
|
|
20
|
+
viewBox: "0 0 24 24",
|
|
21
|
+
fill: "none",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
strokeWidth: 2,
|
|
24
|
+
strokeLinecap: "round",
|
|
25
|
+
strokeLinejoin: "round"
|
|
26
|
+
}, hasA11yProp = (e) => {
|
|
27
|
+
for (let a in e) if (a.startsWith("aria-") || a === "role" || a === "title") return true;
|
|
28
|
+
return false;
|
|
29
|
+
}, import_react = /* @__PURE__ */ __toESM(require_react()), Icon = (0, import_react.forwardRef)(({ color: e = "currentColor", size: a = 24, strokeWidth: o = 2, absoluteStrokeWidth: s, className: c = "", children: l, iconNode: u, ...d }, f) => (0, import_react.createElement)("svg", {
|
|
30
|
+
ref: f,
|
|
31
|
+
...defaultAttributes,
|
|
32
|
+
width: a,
|
|
33
|
+
height: a,
|
|
34
|
+
stroke: e,
|
|
35
|
+
strokeWidth: s ? Number(o) * 24 / Number(a) : o,
|
|
36
|
+
className: mergeClasses("lucide", c),
|
|
37
|
+
...!l && !hasA11yProp(d) && { "aria-hidden": "true" },
|
|
38
|
+
...d
|
|
39
|
+
}, [...u.map(([e2, a2]) => (0, import_react.createElement)(e2, a2)), ...Array.isArray(l) ? l : [l]])), createLucideIcon = (e, a) => {
|
|
40
|
+
let o = (0, import_react.forwardRef)(({ className: o2, ...s }, c) => (0, import_react.createElement)(Icon, {
|
|
41
|
+
ref: c,
|
|
42
|
+
iconNode: a,
|
|
43
|
+
className: mergeClasses(`lucide-${toKebabCase(toPascalCase(e))}`, `lucide-${e}`, o2),
|
|
44
|
+
...s
|
|
45
|
+
}));
|
|
46
|
+
return o.displayName = toPascalCase(e), o;
|
|
47
|
+
}, import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
48
|
+
position: "absolute",
|
|
49
|
+
border: 0,
|
|
50
|
+
width: 1,
|
|
51
|
+
height: 1,
|
|
52
|
+
padding: 0,
|
|
53
|
+
margin: -1,
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
clip: "rect(0, 0, 0, 0)",
|
|
56
|
+
whiteSpace: "nowrap",
|
|
57
|
+
wordWrap: "normal"
|
|
58
|
+
}), NAME$1 = "VisuallyHidden", VisuallyHidden = import_react.forwardRef((e, a) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.span, {
|
|
59
|
+
...e,
|
|
60
|
+
ref: a,
|
|
61
|
+
style: {
|
|
62
|
+
...VISUALLY_HIDDEN_STYLES,
|
|
63
|
+
...e.style
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
VisuallyHidden.displayName = NAME$1;
|
|
67
|
+
var Root$1 = VisuallyHidden;
|
|
68
|
+
function useSize(e) {
|
|
69
|
+
let [a, o] = import_react.useState(void 0);
|
|
70
|
+
return useLayoutEffect2(() => {
|
|
71
|
+
if (e) {
|
|
72
|
+
o({
|
|
73
|
+
width: e.offsetWidth,
|
|
74
|
+
height: e.offsetHeight
|
|
75
|
+
});
|
|
76
|
+
let a2 = new ResizeObserver((a3) => {
|
|
77
|
+
if (!Array.isArray(a3) || !a3.length) return;
|
|
78
|
+
let s = a3[0], c, l;
|
|
79
|
+
if ("borderBoxSize" in s) {
|
|
80
|
+
let e2 = s.borderBoxSize, a4 = Array.isArray(e2) ? e2[0] : e2;
|
|
81
|
+
c = a4.inlineSize, l = a4.blockSize;
|
|
82
|
+
} else c = e.offsetWidth, l = e.offsetHeight;
|
|
83
|
+
o({
|
|
84
|
+
width: c,
|
|
85
|
+
height: l
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
return a2.observe(e, { box: "border-box" }), () => a2.unobserve(e);
|
|
89
|
+
} else o(void 0);
|
|
90
|
+
}, [e]), a;
|
|
91
|
+
}
|
|
92
|
+
var sides = [
|
|
93
|
+
"top",
|
|
94
|
+
"right",
|
|
95
|
+
"bottom",
|
|
96
|
+
"left"
|
|
97
|
+
], min = Math.min, max = Math.max, round = Math.round, floor = Math.floor, createCoords = (e) => ({
|
|
98
|
+
x: e,
|
|
99
|
+
y: e
|
|
100
|
+
}), oppositeSideMap = {
|
|
101
|
+
left: "right",
|
|
102
|
+
right: "left",
|
|
103
|
+
bottom: "top",
|
|
104
|
+
top: "bottom"
|
|
105
|
+
}, oppositeAlignmentMap = {
|
|
106
|
+
start: "end",
|
|
107
|
+
end: "start"
|
|
108
|
+
};
|
|
109
|
+
function clamp(e, a, o) {
|
|
110
|
+
return max(e, min(a, o));
|
|
111
|
+
}
|
|
112
|
+
function evaluate(e, a) {
|
|
113
|
+
return typeof e == "function" ? e(a) : e;
|
|
114
|
+
}
|
|
115
|
+
function getSide(e) {
|
|
116
|
+
return e.split("-")[0];
|
|
117
|
+
}
|
|
118
|
+
function getAlignment(e) {
|
|
119
|
+
return e.split("-")[1];
|
|
120
|
+
}
|
|
121
|
+
function getOppositeAxis(e) {
|
|
122
|
+
return e === "x" ? "y" : "x";
|
|
123
|
+
}
|
|
124
|
+
function getAxisLength(e) {
|
|
125
|
+
return e === "y" ? "height" : "width";
|
|
126
|
+
}
|
|
127
|
+
var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
128
|
+
function getSideAxis(e) {
|
|
129
|
+
return yAxisSides.has(getSide(e)) ? "y" : "x";
|
|
130
|
+
}
|
|
131
|
+
function getAlignmentAxis(e) {
|
|
132
|
+
return getOppositeAxis(getSideAxis(e));
|
|
133
|
+
}
|
|
134
|
+
function getAlignmentSides(e, a, o) {
|
|
135
|
+
o === void 0 && (o = false);
|
|
136
|
+
let s = getAlignment(e), c = getAlignmentAxis(e), l = getAxisLength(c), u = c === "x" ? s === (o ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
|
|
137
|
+
return a.reference[l] > a.floating[l] && (u = getOppositePlacement(u)), [u, getOppositePlacement(u)];
|
|
138
|
+
}
|
|
139
|
+
function getExpandedPlacements(e) {
|
|
140
|
+
let a = getOppositePlacement(e);
|
|
141
|
+
return [
|
|
142
|
+
getOppositeAlignmentPlacement(e),
|
|
143
|
+
a,
|
|
144
|
+
getOppositeAlignmentPlacement(a)
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
function getOppositeAlignmentPlacement(e) {
|
|
148
|
+
return e.replace(/start|end/g, (e2) => oppositeAlignmentMap[e2]);
|
|
149
|
+
}
|
|
150
|
+
var lrPlacement = ["left", "right"], rlPlacement = ["right", "left"], tbPlacement = ["top", "bottom"], btPlacement = ["bottom", "top"];
|
|
151
|
+
function getSideList(e, a, o) {
|
|
152
|
+
switch (e) {
|
|
153
|
+
case "top":
|
|
154
|
+
case "bottom":
|
|
155
|
+
return o ? a ? rlPlacement : lrPlacement : a ? lrPlacement : rlPlacement;
|
|
156
|
+
case "left":
|
|
157
|
+
case "right":
|
|
158
|
+
return a ? tbPlacement : btPlacement;
|
|
159
|
+
default:
|
|
160
|
+
return [];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function getOppositeAxisPlacements(e, a, o, s) {
|
|
164
|
+
let c = getAlignment(e), l = getSideList(getSide(e), o === "start", s);
|
|
165
|
+
return c && (l = l.map((e2) => e2 + "-" + c), a && (l = l.concat(l.map(getOppositeAlignmentPlacement)))), l;
|
|
166
|
+
}
|
|
167
|
+
function getOppositePlacement(e) {
|
|
168
|
+
return e.replace(/left|right|bottom|top/g, (e2) => oppositeSideMap[e2]);
|
|
169
|
+
}
|
|
170
|
+
function expandPaddingObject(e) {
|
|
171
|
+
return {
|
|
172
|
+
top: 0,
|
|
173
|
+
right: 0,
|
|
174
|
+
bottom: 0,
|
|
175
|
+
left: 0,
|
|
176
|
+
...e
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function getPaddingObject(e) {
|
|
180
|
+
return typeof e == "number" ? {
|
|
181
|
+
top: e,
|
|
182
|
+
right: e,
|
|
183
|
+
bottom: e,
|
|
184
|
+
left: e
|
|
185
|
+
} : expandPaddingObject(e);
|
|
186
|
+
}
|
|
187
|
+
function rectToClientRect(e) {
|
|
188
|
+
let { x: a, y: o, width: s, height: c } = e;
|
|
189
|
+
return {
|
|
190
|
+
width: s,
|
|
191
|
+
height: c,
|
|
192
|
+
top: o,
|
|
193
|
+
left: a,
|
|
194
|
+
right: a + s,
|
|
195
|
+
bottom: o + c,
|
|
196
|
+
x: a,
|
|
197
|
+
y: o
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function computeCoordsFromPlacement(e, a, o) {
|
|
201
|
+
let { reference: s, floating: c } = e, l = getSideAxis(a), u = getAlignmentAxis(a), d = getAxisLength(u), f = getSide(a), p = l === "y", m = s.x + s.width / 2 - c.width / 2, h = s.y + s.height / 2 - c.height / 2, g = s[d] / 2 - c[d] / 2, _;
|
|
202
|
+
switch (f) {
|
|
203
|
+
case "top":
|
|
204
|
+
_ = {
|
|
205
|
+
x: m,
|
|
206
|
+
y: s.y - c.height
|
|
207
|
+
};
|
|
208
|
+
break;
|
|
209
|
+
case "bottom":
|
|
210
|
+
_ = {
|
|
211
|
+
x: m,
|
|
212
|
+
y: s.y + s.height
|
|
213
|
+
};
|
|
214
|
+
break;
|
|
215
|
+
case "right":
|
|
216
|
+
_ = {
|
|
217
|
+
x: s.x + s.width,
|
|
218
|
+
y: h
|
|
219
|
+
};
|
|
220
|
+
break;
|
|
221
|
+
case "left":
|
|
222
|
+
_ = {
|
|
223
|
+
x: s.x - c.width,
|
|
224
|
+
y: h
|
|
225
|
+
};
|
|
226
|
+
break;
|
|
227
|
+
default:
|
|
228
|
+
_ = {
|
|
229
|
+
x: s.x,
|
|
230
|
+
y: s.y
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
switch (getAlignment(a)) {
|
|
234
|
+
case "start":
|
|
235
|
+
_[u] -= g * (o && p ? -1 : 1);
|
|
236
|
+
break;
|
|
237
|
+
case "end":
|
|
238
|
+
_[u] += g * (o && p ? -1 : 1);
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
return _;
|
|
242
|
+
}
|
|
243
|
+
var computePosition$1 = async (e, a, o) => {
|
|
244
|
+
let { placement: s = "bottom", strategy: c = "absolute", middleware: l = [], platform: u } = o, d = l.filter(Boolean), f = await (u.isRTL == null ? void 0 : u.isRTL(a)), p = await u.getElementRects({
|
|
245
|
+
reference: e,
|
|
246
|
+
floating: a,
|
|
247
|
+
strategy: c
|
|
248
|
+
}), { x: m, y: h } = computeCoordsFromPlacement(p, s, f), g = s, _ = {}, v = 0;
|
|
249
|
+
for (let o2 = 0; o2 < d.length; o2++) {
|
|
250
|
+
let { name: l2, fn: y } = d[o2], { x: b, y: x, data: S, reset: C } = await y({
|
|
251
|
+
x: m,
|
|
252
|
+
y: h,
|
|
253
|
+
initialPlacement: s,
|
|
254
|
+
placement: g,
|
|
255
|
+
strategy: c,
|
|
256
|
+
middlewareData: _,
|
|
257
|
+
rects: p,
|
|
258
|
+
platform: u,
|
|
259
|
+
elements: {
|
|
260
|
+
reference: e,
|
|
261
|
+
floating: a
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
m = b ?? m, h = x ?? h, _ = {
|
|
265
|
+
..._,
|
|
266
|
+
[l2]: {
|
|
267
|
+
..._[l2],
|
|
268
|
+
...S
|
|
269
|
+
}
|
|
270
|
+
}, C && v <= 50 && (v++, typeof C == "object" && (C.placement && (g = C.placement), C.rects && (p = C.rects === true ? await u.getElementRects({
|
|
271
|
+
reference: e,
|
|
272
|
+
floating: a,
|
|
273
|
+
strategy: c
|
|
274
|
+
}) : C.rects), { x: m, y: h } = computeCoordsFromPlacement(p, g, f)), o2 = -1);
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
x: m,
|
|
278
|
+
y: h,
|
|
279
|
+
placement: g,
|
|
280
|
+
strategy: c,
|
|
281
|
+
middlewareData: _
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
async function detectOverflow$1(e, a) {
|
|
285
|
+
a === void 0 && (a = {});
|
|
286
|
+
let { x: o, y: s, platform: c, rects: l, elements: u, strategy: d } = e, { boundary: f = "clippingAncestors", rootBoundary: p = "viewport", elementContext: m = "floating", altBoundary: h = false, padding: g = 0 } = evaluate(a, e), _ = getPaddingObject(g), v = u[h ? m === "floating" ? "reference" : "floating" : m], y = rectToClientRect(await c.getClippingRect({
|
|
287
|
+
element: await (c.isElement == null ? void 0 : c.isElement(v)) ?? true ? v : v.contextElement || await (c.getDocumentElement == null ? void 0 : c.getDocumentElement(u.floating)),
|
|
288
|
+
boundary: f,
|
|
289
|
+
rootBoundary: p,
|
|
290
|
+
strategy: d
|
|
291
|
+
})), b = m === "floating" ? {
|
|
292
|
+
x: o,
|
|
293
|
+
y: s,
|
|
294
|
+
width: l.floating.width,
|
|
295
|
+
height: l.floating.height
|
|
296
|
+
} : l.reference, x = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(u.floating)), S = await (c.isElement == null ? void 0 : c.isElement(x)) && await (c.getScale == null ? void 0 : c.getScale(x)) || {
|
|
297
|
+
x: 1,
|
|
298
|
+
y: 1
|
|
299
|
+
}, C = rectToClientRect(c.convertOffsetParentRelativeRectToViewportRelativeRect ? await c.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
300
|
+
elements: u,
|
|
301
|
+
rect: b,
|
|
302
|
+
offsetParent: x,
|
|
303
|
+
strategy: d
|
|
304
|
+
}) : b);
|
|
305
|
+
return {
|
|
306
|
+
top: (y.top - C.top + _.top) / S.y,
|
|
307
|
+
bottom: (C.bottom - y.bottom + _.bottom) / S.y,
|
|
308
|
+
left: (y.left - C.left + _.left) / S.x,
|
|
309
|
+
right: (C.right - y.right + _.right) / S.x
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
var arrow$2 = (e) => ({
|
|
313
|
+
name: "arrow",
|
|
314
|
+
options: e,
|
|
315
|
+
async fn(a) {
|
|
316
|
+
let { x: o, y: s, placement: c, rects: l, platform: u, elements: d, middlewareData: f } = a, { element: p, padding: m = 0 } = evaluate(e, a) || {};
|
|
317
|
+
if (p == null) return {};
|
|
318
|
+
let h = getPaddingObject(m), g = {
|
|
319
|
+
x: o,
|
|
320
|
+
y: s
|
|
321
|
+
}, _ = getAlignmentAxis(c), v = getAxisLength(_), y = await u.getDimensions(p), b = _ === "y", x = b ? "top" : "left", S = b ? "bottom" : "right", C = b ? "clientHeight" : "clientWidth", w = l.reference[v] + l.reference[_] - g[_] - l.floating[v], T = g[_] - l.reference[_], E = await (u.getOffsetParent == null ? void 0 : u.getOffsetParent(p)), D = E ? E[C] : 0;
|
|
322
|
+
(!D || !await (u.isElement == null ? void 0 : u.isElement(E))) && (D = d.floating[C] || l.floating[v]);
|
|
323
|
+
let O = w / 2 - T / 2, A = D / 2 - y[v] / 2 - 1, j = min(h[x], A), M = min(h[S], A), N = j, P = D - y[v] - M, F = D / 2 - y[v] / 2 + O, R = clamp(N, F, P), B = !f.arrow && getAlignment(c) != null && F !== R && l.reference[v] / 2 - (F < N ? j : M) - y[v] / 2 < 0, H = B ? F < N ? F - N : F - P : 0;
|
|
324
|
+
return {
|
|
325
|
+
[_]: g[_] + H,
|
|
326
|
+
data: {
|
|
327
|
+
[_]: R,
|
|
328
|
+
centerOffset: F - R - H,
|
|
329
|
+
...B && { alignmentOffset: H }
|
|
330
|
+
},
|
|
331
|
+
reset: B
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
}), flip$2 = function(e) {
|
|
335
|
+
return e === void 0 && (e = {}), {
|
|
336
|
+
name: "flip",
|
|
337
|
+
options: e,
|
|
338
|
+
async fn(a) {
|
|
339
|
+
var _a, _b, _c, _d;
|
|
340
|
+
var o;
|
|
341
|
+
let { placement: s, middlewareData: c, rects: l, initialPlacement: u, platform: d, elements: f } = a, { mainAxis: p = true, crossAxis: m = true, fallbackPlacements: h, fallbackStrategy: g = "bestFit", fallbackAxisSideDirection: _ = "none", flipAlignment: v = true, ...y } = evaluate(e, a);
|
|
342
|
+
if ((o = c.arrow) != null && o.alignmentOffset) return {};
|
|
343
|
+
let b = getSide(s), x = getSideAxis(u), S = getSide(u) === u, C = await (d.isRTL == null ? void 0 : d.isRTL(f.floating)), w = h || (S || !v ? [getOppositePlacement(u)] : getExpandedPlacements(u)), T = _ !== "none";
|
|
344
|
+
!h && T && w.push(...getOppositeAxisPlacements(u, v, _, C));
|
|
345
|
+
let E = [u, ...w], D = await detectOverflow$1(a, y), O = [], k = ((_a = c.flip) == null ? void 0 : _a.overflows) || [];
|
|
346
|
+
if (p && O.push(D[b]), m) {
|
|
347
|
+
let e2 = getAlignmentSides(s, l, C);
|
|
348
|
+
O.push(D[e2[0]], D[e2[1]]);
|
|
349
|
+
}
|
|
350
|
+
if (k = [...k, {
|
|
351
|
+
placement: s,
|
|
352
|
+
overflows: O
|
|
353
|
+
}], !O.every((e2) => e2 <= 0)) {
|
|
354
|
+
let e2 = (((_b = c.flip) == null ? void 0 : _b.index) || 0) + 1, a2 = E[e2];
|
|
355
|
+
if (a2 && (!(m === "alignment" && x !== getSideAxis(a2)) || k.every((e3) => e3.overflows[0] > 0 && getSideAxis(e3.placement) === x))) return {
|
|
356
|
+
data: {
|
|
357
|
+
index: e2,
|
|
358
|
+
overflows: k
|
|
359
|
+
},
|
|
360
|
+
reset: { placement: a2 }
|
|
361
|
+
};
|
|
362
|
+
let o2 = (_c = k.filter((e3) => e3.overflows[0] <= 0).sort((e3, a3) => e3.overflows[1] - a3.overflows[1])[0]) == null ? void 0 : _c.placement;
|
|
363
|
+
if (!o2) switch (g) {
|
|
364
|
+
case "bestFit": {
|
|
365
|
+
let e3 = (_d = k.filter((e4) => {
|
|
366
|
+
if (T) {
|
|
367
|
+
let a3 = getSideAxis(e4.placement);
|
|
368
|
+
return a3 === x || a3 === "y";
|
|
369
|
+
}
|
|
370
|
+
return true;
|
|
371
|
+
}).map((e4) => [e4.placement, e4.overflows.filter((e5) => e5 > 0).reduce((e5, a3) => e5 + a3, 0)]).sort((e4, a3) => e4[1] - a3[1])[0]) == null ? void 0 : _d[0];
|
|
372
|
+
e3 && (o2 = e3);
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
case "initialPlacement":
|
|
376
|
+
o2 = u;
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
if (s !== o2) return { reset: { placement: o2 } };
|
|
380
|
+
}
|
|
381
|
+
return {};
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
function getSideOffsets(e, a) {
|
|
386
|
+
return {
|
|
387
|
+
top: e.top - a.height,
|
|
388
|
+
right: e.right - a.width,
|
|
389
|
+
bottom: e.bottom - a.height,
|
|
390
|
+
left: e.left - a.width
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function isAnySideFullyClipped(e) {
|
|
394
|
+
return sides.some((a) => e[a] >= 0);
|
|
395
|
+
}
|
|
396
|
+
var hide$2 = function(e) {
|
|
397
|
+
return e === void 0 && (e = {}), {
|
|
398
|
+
name: "hide",
|
|
399
|
+
options: e,
|
|
400
|
+
async fn(a) {
|
|
401
|
+
let { rects: o } = a, { strategy: s = "referenceHidden", ...c } = evaluate(e, a);
|
|
402
|
+
switch (s) {
|
|
403
|
+
case "referenceHidden": {
|
|
404
|
+
let e2 = getSideOffsets(await detectOverflow$1(a, {
|
|
405
|
+
...c,
|
|
406
|
+
elementContext: "reference"
|
|
407
|
+
}), o.reference);
|
|
408
|
+
return { data: {
|
|
409
|
+
referenceHiddenOffsets: e2,
|
|
410
|
+
referenceHidden: isAnySideFullyClipped(e2)
|
|
411
|
+
} };
|
|
412
|
+
}
|
|
413
|
+
case "escaped": {
|
|
414
|
+
let e2 = getSideOffsets(await detectOverflow$1(a, {
|
|
415
|
+
...c,
|
|
416
|
+
altBoundary: true
|
|
417
|
+
}), o.floating);
|
|
418
|
+
return { data: {
|
|
419
|
+
escapedOffsets: e2,
|
|
420
|
+
escaped: isAnySideFullyClipped(e2)
|
|
421
|
+
} };
|
|
422
|
+
}
|
|
423
|
+
default:
|
|
424
|
+
return {};
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}, originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
429
|
+
async function convertValueToCoords(e, a) {
|
|
430
|
+
let { placement: o, platform: s, elements: c } = e, l = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), u = getSide(o), d = getAlignment(o), f = getSideAxis(o) === "y", p = originSides.has(u) ? -1 : 1, m = l && f ? -1 : 1, h = evaluate(a, e), { mainAxis: g, crossAxis: _, alignmentAxis: v } = typeof h == "number" ? {
|
|
431
|
+
mainAxis: h,
|
|
432
|
+
crossAxis: 0,
|
|
433
|
+
alignmentAxis: null
|
|
434
|
+
} : {
|
|
435
|
+
mainAxis: h.mainAxis || 0,
|
|
436
|
+
crossAxis: h.crossAxis || 0,
|
|
437
|
+
alignmentAxis: h.alignmentAxis
|
|
438
|
+
};
|
|
439
|
+
return d && typeof v == "number" && (_ = d === "end" ? v * -1 : v), f ? {
|
|
440
|
+
x: _ * m,
|
|
441
|
+
y: g * p
|
|
442
|
+
} : {
|
|
443
|
+
x: g * p,
|
|
444
|
+
y: _ * m
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
var offset$2 = function(e) {
|
|
448
|
+
return e === void 0 && (e = 0), {
|
|
449
|
+
name: "offset",
|
|
450
|
+
options: e,
|
|
451
|
+
async fn(a) {
|
|
452
|
+
var _a;
|
|
453
|
+
var o;
|
|
454
|
+
let { x: s, y: c, placement: l, middlewareData: u } = a, d = await convertValueToCoords(a, e);
|
|
455
|
+
return l === ((_a = u.offset) == null ? void 0 : _a.placement) && (o = u.arrow) != null && o.alignmentOffset ? {} : {
|
|
456
|
+
x: s + d.x,
|
|
457
|
+
y: c + d.y,
|
|
458
|
+
data: {
|
|
459
|
+
...d,
|
|
460
|
+
placement: l
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
}, shift$2 = function(e) {
|
|
466
|
+
return e === void 0 && (e = {}), {
|
|
467
|
+
name: "shift",
|
|
468
|
+
options: e,
|
|
469
|
+
async fn(a) {
|
|
470
|
+
let { x: o, y: s, placement: c } = a, { mainAxis: l = true, crossAxis: u = false, limiter: d = { fn: (e2) => {
|
|
471
|
+
let { x: a2, y: o2 } = e2;
|
|
472
|
+
return {
|
|
473
|
+
x: a2,
|
|
474
|
+
y: o2
|
|
475
|
+
};
|
|
476
|
+
} }, ...f } = evaluate(e, a), p = {
|
|
477
|
+
x: o,
|
|
478
|
+
y: s
|
|
479
|
+
}, m = await detectOverflow$1(a, f), h = getSideAxis(getSide(c)), g = getOppositeAxis(h), _ = p[g], v = p[h];
|
|
480
|
+
if (l) {
|
|
481
|
+
let e2 = g === "y" ? "top" : "left", a2 = g === "y" ? "bottom" : "right", o2 = _ + m[e2], s2 = _ - m[a2];
|
|
482
|
+
_ = clamp(o2, _, s2);
|
|
483
|
+
}
|
|
484
|
+
if (u) {
|
|
485
|
+
let e2 = h === "y" ? "top" : "left", a2 = h === "y" ? "bottom" : "right", o2 = v + m[e2], s2 = v - m[a2];
|
|
486
|
+
v = clamp(o2, v, s2);
|
|
487
|
+
}
|
|
488
|
+
let y = d.fn({
|
|
489
|
+
...a,
|
|
490
|
+
[g]: _,
|
|
491
|
+
[h]: v
|
|
492
|
+
});
|
|
493
|
+
return {
|
|
494
|
+
...y,
|
|
495
|
+
data: {
|
|
496
|
+
x: y.x - o,
|
|
497
|
+
y: y.y - s,
|
|
498
|
+
enabled: {
|
|
499
|
+
[g]: l,
|
|
500
|
+
[h]: u
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
}, limitShift$2 = function(e) {
|
|
507
|
+
return e === void 0 && (e = {}), {
|
|
508
|
+
options: e,
|
|
509
|
+
fn(a) {
|
|
510
|
+
var _a, _b;
|
|
511
|
+
let { x: o, y: s, placement: c, rects: l, middlewareData: u } = a, { offset: d = 0, mainAxis: f = true, crossAxis: p = true } = evaluate(e, a), m = {
|
|
512
|
+
x: o,
|
|
513
|
+
y: s
|
|
514
|
+
}, h = getSideAxis(c), g = getOppositeAxis(h), _ = m[g], v = m[h], y = evaluate(d, a), b = typeof y == "number" ? {
|
|
515
|
+
mainAxis: y,
|
|
516
|
+
crossAxis: 0
|
|
517
|
+
} : {
|
|
518
|
+
mainAxis: 0,
|
|
519
|
+
crossAxis: 0,
|
|
520
|
+
...y
|
|
521
|
+
};
|
|
522
|
+
if (f) {
|
|
523
|
+
let e2 = g === "y" ? "height" : "width", a2 = l.reference[g] - l.floating[e2] + b.mainAxis, o2 = l.reference[g] + l.reference[e2] - b.mainAxis;
|
|
524
|
+
_ < a2 ? _ = a2 : _ > o2 && (_ = o2);
|
|
525
|
+
}
|
|
526
|
+
if (p) {
|
|
527
|
+
let e2 = g === "y" ? "width" : "height", a2 = originSides.has(getSide(c)), o2 = l.reference[h] - l.floating[e2] + (a2 && ((_a = u.offset) == null ? void 0 : _a[h]) || 0) + (a2 ? 0 : b.crossAxis), s2 = l.reference[h] + l.reference[e2] + (a2 ? 0 : ((_b = u.offset) == null ? void 0 : _b[h]) || 0) - (a2 ? b.crossAxis : 0);
|
|
528
|
+
v < o2 ? v = o2 : v > s2 && (v = s2);
|
|
529
|
+
}
|
|
530
|
+
return {
|
|
531
|
+
[g]: _,
|
|
532
|
+
[h]: v
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
}, size$2 = function(e) {
|
|
537
|
+
return e === void 0 && (e = {}), {
|
|
538
|
+
name: "size",
|
|
539
|
+
options: e,
|
|
540
|
+
async fn(a) {
|
|
541
|
+
var o, s;
|
|
542
|
+
let { placement: c, rects: l, platform: u, elements: d } = a, { apply: f = () => {
|
|
543
|
+
}, ...p } = evaluate(e, a), m = await detectOverflow$1(a, p), h = getSide(c), g = getAlignment(c), _ = getSideAxis(c) === "y", { width: v, height: y } = l.floating, b, x;
|
|
544
|
+
h === "top" || h === "bottom" ? (b = h, x = g === (await (u.isRTL == null ? void 0 : u.isRTL(d.floating)) ? "start" : "end") ? "left" : "right") : (x = h, b = g === "end" ? "top" : "bottom");
|
|
545
|
+
let S = y - m.top - m.bottom, C = v - m.left - m.right, w = min(y - m[b], S), T = min(v - m[x], C), E = !a.middlewareData.shift, D = w, O = T;
|
|
546
|
+
if ((o = a.middlewareData.shift) != null && o.enabled.x && (O = C), (s = a.middlewareData.shift) != null && s.enabled.y && (D = S), E && !g) {
|
|
547
|
+
let e2 = max(m.left, 0), a2 = max(m.right, 0), o2 = max(m.top, 0), s2 = max(m.bottom, 0);
|
|
548
|
+
_ ? O = v - 2 * (e2 !== 0 || a2 !== 0 ? e2 + a2 : max(m.left, m.right)) : D = y - 2 * (o2 !== 0 || s2 !== 0 ? o2 + s2 : max(m.top, m.bottom));
|
|
549
|
+
}
|
|
550
|
+
await f({
|
|
551
|
+
...a,
|
|
552
|
+
availableWidth: O,
|
|
553
|
+
availableHeight: D
|
|
554
|
+
});
|
|
555
|
+
let j = await u.getDimensions(d.floating);
|
|
556
|
+
return v !== j.width || y !== j.height ? { reset: { rects: true } } : {};
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
function hasWindow() {
|
|
561
|
+
return typeof window < "u";
|
|
562
|
+
}
|
|
563
|
+
function getNodeName(e) {
|
|
564
|
+
return isNode(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
565
|
+
}
|
|
566
|
+
function getWindow(e) {
|
|
567
|
+
var a;
|
|
568
|
+
return (e == null || (a = e.ownerDocument) == null ? void 0 : a.defaultView) || window;
|
|
569
|
+
}
|
|
570
|
+
function getDocumentElement(e) {
|
|
571
|
+
var _a;
|
|
572
|
+
return (_a = (isNode(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : _a.documentElement;
|
|
573
|
+
}
|
|
574
|
+
function isNode(e) {
|
|
575
|
+
return hasWindow() ? e instanceof Node || e instanceof getWindow(e).Node : false;
|
|
576
|
+
}
|
|
577
|
+
function isElement(e) {
|
|
578
|
+
return hasWindow() ? e instanceof Element || e instanceof getWindow(e).Element : false;
|
|
579
|
+
}
|
|
580
|
+
function isHTMLElement(e) {
|
|
581
|
+
return hasWindow() ? e instanceof HTMLElement || e instanceof getWindow(e).HTMLElement : false;
|
|
582
|
+
}
|
|
583
|
+
function isShadowRoot(e) {
|
|
584
|
+
return !hasWindow() || typeof ShadowRoot > "u" ? false : e instanceof ShadowRoot || e instanceof getWindow(e).ShadowRoot;
|
|
585
|
+
}
|
|
586
|
+
var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
587
|
+
function isOverflowElement(e) {
|
|
588
|
+
let { overflow: a, overflowX: o, overflowY: s, display: c } = getComputedStyle(e);
|
|
589
|
+
return /auto|scroll|overlay|hidden|clip/.test(a + s + o) && !invalidOverflowDisplayValues.has(c);
|
|
590
|
+
}
|
|
591
|
+
var tableElements = /* @__PURE__ */ new Set([
|
|
592
|
+
"table",
|
|
593
|
+
"td",
|
|
594
|
+
"th"
|
|
595
|
+
]);
|
|
596
|
+
function isTableElement(e) {
|
|
597
|
+
return tableElements.has(getNodeName(e));
|
|
598
|
+
}
|
|
599
|
+
var topLayerSelectors = [":popover-open", ":modal"];
|
|
600
|
+
function isTopLayer(e) {
|
|
601
|
+
return topLayerSelectors.some((a) => {
|
|
602
|
+
try {
|
|
603
|
+
return e.matches(a);
|
|
604
|
+
} catch {
|
|
605
|
+
return false;
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
var transformProperties = [
|
|
610
|
+
"transform",
|
|
611
|
+
"translate",
|
|
612
|
+
"scale",
|
|
613
|
+
"rotate",
|
|
614
|
+
"perspective"
|
|
615
|
+
], willChangeValues = [
|
|
616
|
+
"transform",
|
|
617
|
+
"translate",
|
|
618
|
+
"scale",
|
|
619
|
+
"rotate",
|
|
620
|
+
"perspective",
|
|
621
|
+
"filter"
|
|
622
|
+
], containValues = [
|
|
623
|
+
"paint",
|
|
624
|
+
"layout",
|
|
625
|
+
"strict",
|
|
626
|
+
"content"
|
|
627
|
+
];
|
|
628
|
+
function isContainingBlock(e) {
|
|
629
|
+
let a = isWebKit(), o = isElement(e) ? getComputedStyle(e) : e;
|
|
630
|
+
return transformProperties.some((e2) => o[e2] ? o[e2] !== "none" : false) || (o.containerType ? o.containerType !== "normal" : false) || !a && (o.backdropFilter ? o.backdropFilter !== "none" : false) || !a && (o.filter ? o.filter !== "none" : false) || willChangeValues.some((e2) => (o.willChange || "").includes(e2)) || containValues.some((e2) => (o.contain || "").includes(e2));
|
|
631
|
+
}
|
|
632
|
+
function getContainingBlock(e) {
|
|
633
|
+
let a = getParentNode(e);
|
|
634
|
+
for (; isHTMLElement(a) && !isLastTraversableNode(a); ) {
|
|
635
|
+
if (isContainingBlock(a)) return a;
|
|
636
|
+
if (isTopLayer(a)) return null;
|
|
637
|
+
a = getParentNode(a);
|
|
638
|
+
}
|
|
639
|
+
return null;
|
|
640
|
+
}
|
|
641
|
+
function isWebKit() {
|
|
642
|
+
return typeof CSS > "u" || !CSS.supports ? false : CSS.supports("-webkit-backdrop-filter", "none");
|
|
643
|
+
}
|
|
644
|
+
var lastTraversableNodeNames = /* @__PURE__ */ new Set([
|
|
645
|
+
"html",
|
|
646
|
+
"body",
|
|
647
|
+
"#document"
|
|
648
|
+
]);
|
|
649
|
+
function isLastTraversableNode(e) {
|
|
650
|
+
return lastTraversableNodeNames.has(getNodeName(e));
|
|
651
|
+
}
|
|
652
|
+
function getComputedStyle(e) {
|
|
653
|
+
return getWindow(e).getComputedStyle(e);
|
|
654
|
+
}
|
|
655
|
+
function getNodeScroll(e) {
|
|
656
|
+
return isElement(e) ? {
|
|
657
|
+
scrollLeft: e.scrollLeft,
|
|
658
|
+
scrollTop: e.scrollTop
|
|
659
|
+
} : {
|
|
660
|
+
scrollLeft: e.scrollX,
|
|
661
|
+
scrollTop: e.scrollY
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
function getParentNode(e) {
|
|
665
|
+
if (getNodeName(e) === "html") return e;
|
|
666
|
+
let a = e.assignedSlot || e.parentNode || isShadowRoot(e) && e.host || getDocumentElement(e);
|
|
667
|
+
return isShadowRoot(a) ? a.host : a;
|
|
668
|
+
}
|
|
669
|
+
function getNearestOverflowAncestor(e) {
|
|
670
|
+
let a = getParentNode(e);
|
|
671
|
+
return isLastTraversableNode(a) ? e.ownerDocument ? e.ownerDocument.body : e.body : isHTMLElement(a) && isOverflowElement(a) ? a : getNearestOverflowAncestor(a);
|
|
672
|
+
}
|
|
673
|
+
function getOverflowAncestors(e, a, o) {
|
|
674
|
+
var _a;
|
|
675
|
+
a === void 0 && (a = []), o === void 0 && (o = true);
|
|
676
|
+
let s = getNearestOverflowAncestor(e), c = s === ((_a = e.ownerDocument) == null ? void 0 : _a.body), l = getWindow(s);
|
|
677
|
+
if (c) {
|
|
678
|
+
let e2 = getFrameElement(l);
|
|
679
|
+
return a.concat(l, l.visualViewport || [], isOverflowElement(s) ? s : [], e2 && o ? getOverflowAncestors(e2) : []);
|
|
680
|
+
}
|
|
681
|
+
return a.concat(s, getOverflowAncestors(s, [], o));
|
|
682
|
+
}
|
|
683
|
+
function getFrameElement(e) {
|
|
684
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
685
|
+
}
|
|
686
|
+
function getCssDimensions(e) {
|
|
687
|
+
let a = getComputedStyle(e), o = parseFloat(a.width) || 0, s = parseFloat(a.height) || 0, c = isHTMLElement(e), l = c ? e.offsetWidth : o, u = c ? e.offsetHeight : s, d = round(o) !== l || round(s) !== u;
|
|
688
|
+
return d && (o = l, s = u), {
|
|
689
|
+
width: o,
|
|
690
|
+
height: s,
|
|
691
|
+
$: d
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
function unwrapElement(e) {
|
|
695
|
+
return isElement(e) ? e : e.contextElement;
|
|
696
|
+
}
|
|
697
|
+
function getScale(e) {
|
|
698
|
+
let a = unwrapElement(e);
|
|
699
|
+
if (!isHTMLElement(a)) return createCoords(1);
|
|
700
|
+
let o = a.getBoundingClientRect(), { width: s, height: c, $: l } = getCssDimensions(a), u = (l ? round(o.width) : o.width) / s, d = (l ? round(o.height) : o.height) / c;
|
|
701
|
+
return (!u || !Number.isFinite(u)) && (u = 1), (!d || !Number.isFinite(d)) && (d = 1), {
|
|
702
|
+
x: u,
|
|
703
|
+
y: d
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
var noOffsets = /* @__PURE__ */ createCoords(0);
|
|
707
|
+
function getVisualOffsets(e) {
|
|
708
|
+
let a = getWindow(e);
|
|
709
|
+
return !isWebKit() || !a.visualViewport ? noOffsets : {
|
|
710
|
+
x: a.visualViewport.offsetLeft,
|
|
711
|
+
y: a.visualViewport.offsetTop
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
function shouldAddVisualOffsets(e, a, o) {
|
|
715
|
+
return a === void 0 && (a = false), !o || a && o !== getWindow(e) ? false : a;
|
|
716
|
+
}
|
|
717
|
+
function getBoundingClientRect(e, a, o, s) {
|
|
718
|
+
a === void 0 && (a = false), o === void 0 && (o = false);
|
|
719
|
+
let c = e.getBoundingClientRect(), l = unwrapElement(e), u = createCoords(1);
|
|
720
|
+
a && (s ? isElement(s) && (u = getScale(s)) : u = getScale(e));
|
|
721
|
+
let d = shouldAddVisualOffsets(l, o, s) ? getVisualOffsets(l) : createCoords(0), f = (c.left + d.x) / u.x, p = (c.top + d.y) / u.y, m = c.width / u.x, h = c.height / u.y;
|
|
722
|
+
if (l) {
|
|
723
|
+
let e2 = getWindow(l), a2 = s && isElement(s) ? getWindow(s) : s, o2 = e2, c2 = getFrameElement(o2);
|
|
724
|
+
for (; c2 && s && a2 !== o2; ) {
|
|
725
|
+
let e3 = getScale(c2), a3 = c2.getBoundingClientRect(), s2 = getComputedStyle(c2), l2 = a3.left + (c2.clientLeft + parseFloat(s2.paddingLeft)) * e3.x, u2 = a3.top + (c2.clientTop + parseFloat(s2.paddingTop)) * e3.y;
|
|
726
|
+
f *= e3.x, p *= e3.y, m *= e3.x, h *= e3.y, f += l2, p += u2, o2 = getWindow(c2), c2 = getFrameElement(o2);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
return rectToClientRect({
|
|
730
|
+
width: m,
|
|
731
|
+
height: h,
|
|
732
|
+
x: f,
|
|
733
|
+
y: p
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
function getWindowScrollBarX(e, a) {
|
|
737
|
+
let o = getNodeScroll(e).scrollLeft;
|
|
738
|
+
return a ? a.left + o : getBoundingClientRect(getDocumentElement(e)).left + o;
|
|
739
|
+
}
|
|
740
|
+
function getHTMLOffset(e, a, o) {
|
|
741
|
+
o === void 0 && (o = false);
|
|
742
|
+
let s = e.getBoundingClientRect();
|
|
743
|
+
return {
|
|
744
|
+
x: s.left + a.scrollLeft - (o ? 0 : getWindowScrollBarX(e, s)),
|
|
745
|
+
y: s.top + a.scrollTop
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(e) {
|
|
749
|
+
let { elements: a, rect: o, offsetParent: s, strategy: c } = e, l = c === "fixed", u = getDocumentElement(s), d = a ? isTopLayer(a.floating) : false;
|
|
750
|
+
if (s === u || d && l) return o;
|
|
751
|
+
let f = {
|
|
752
|
+
scrollLeft: 0,
|
|
753
|
+
scrollTop: 0
|
|
754
|
+
}, p = createCoords(1), m = createCoords(0), h = isHTMLElement(s);
|
|
755
|
+
if ((h || !h && !l) && ((getNodeName(s) !== "body" || isOverflowElement(u)) && (f = getNodeScroll(s)), isHTMLElement(s))) {
|
|
756
|
+
let e2 = getBoundingClientRect(s);
|
|
757
|
+
p = getScale(s), m.x = e2.x + s.clientLeft, m.y = e2.y + s.clientTop;
|
|
758
|
+
}
|
|
759
|
+
let g = u && !h && !l ? getHTMLOffset(u, f, true) : createCoords(0);
|
|
760
|
+
return {
|
|
761
|
+
width: o.width * p.x,
|
|
762
|
+
height: o.height * p.y,
|
|
763
|
+
x: o.x * p.x - f.scrollLeft * p.x + m.x + g.x,
|
|
764
|
+
y: o.y * p.y - f.scrollTop * p.y + m.y + g.y
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
function getClientRects(e) {
|
|
768
|
+
return Array.from(e.getClientRects());
|
|
769
|
+
}
|
|
770
|
+
function getDocumentRect(e) {
|
|
771
|
+
let a = getDocumentElement(e), o = getNodeScroll(e), s = e.ownerDocument.body, c = max(a.scrollWidth, a.clientWidth, s.scrollWidth, s.clientWidth), l = max(a.scrollHeight, a.clientHeight, s.scrollHeight, s.clientHeight), u = -o.scrollLeft + getWindowScrollBarX(e), d = -o.scrollTop;
|
|
772
|
+
return getComputedStyle(s).direction === "rtl" && (u += max(a.clientWidth, s.clientWidth) - c), {
|
|
773
|
+
width: c,
|
|
774
|
+
height: l,
|
|
775
|
+
x: u,
|
|
776
|
+
y: d
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
function getViewportRect(e, a) {
|
|
780
|
+
let o = getWindow(e), s = getDocumentElement(e), c = o.visualViewport, l = s.clientWidth, u = s.clientHeight, d = 0, f = 0;
|
|
781
|
+
if (c) {
|
|
782
|
+
l = c.width, u = c.height;
|
|
783
|
+
let e2 = isWebKit();
|
|
784
|
+
(!e2 || e2 && a === "fixed") && (d = c.offsetLeft, f = c.offsetTop);
|
|
785
|
+
}
|
|
786
|
+
return {
|
|
787
|
+
width: l,
|
|
788
|
+
height: u,
|
|
789
|
+
x: d,
|
|
790
|
+
y: f
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
794
|
+
function getInnerBoundingClientRect(e, a) {
|
|
795
|
+
let o = getBoundingClientRect(e, true, a === "fixed"), s = o.top + e.clientTop, c = o.left + e.clientLeft, l = isHTMLElement(e) ? getScale(e) : createCoords(1);
|
|
796
|
+
return {
|
|
797
|
+
width: e.clientWidth * l.x,
|
|
798
|
+
height: e.clientHeight * l.y,
|
|
799
|
+
x: c * l.x,
|
|
800
|
+
y: s * l.y
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
function getClientRectFromClippingAncestor(e, a, o) {
|
|
804
|
+
let s;
|
|
805
|
+
if (a === "viewport") s = getViewportRect(e, o);
|
|
806
|
+
else if (a === "document") s = getDocumentRect(getDocumentElement(e));
|
|
807
|
+
else if (isElement(a)) s = getInnerBoundingClientRect(a, o);
|
|
808
|
+
else {
|
|
809
|
+
let o2 = getVisualOffsets(e);
|
|
810
|
+
s = {
|
|
811
|
+
x: a.x - o2.x,
|
|
812
|
+
y: a.y - o2.y,
|
|
813
|
+
width: a.width,
|
|
814
|
+
height: a.height
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
return rectToClientRect(s);
|
|
818
|
+
}
|
|
819
|
+
function hasFixedPositionAncestor(e, a) {
|
|
820
|
+
let o = getParentNode(e);
|
|
821
|
+
return o === a || !isElement(o) || isLastTraversableNode(o) ? false : getComputedStyle(o).position === "fixed" || hasFixedPositionAncestor(o, a);
|
|
822
|
+
}
|
|
823
|
+
function getClippingElementAncestors(e, a) {
|
|
824
|
+
let o = a.get(e);
|
|
825
|
+
if (o) return o;
|
|
826
|
+
let s = getOverflowAncestors(e, [], false).filter((e2) => isElement(e2) && getNodeName(e2) !== "body"), c = null, l = getComputedStyle(e).position === "fixed", u = l ? getParentNode(e) : e;
|
|
827
|
+
for (; isElement(u) && !isLastTraversableNode(u); ) {
|
|
828
|
+
let a2 = getComputedStyle(u), o2 = isContainingBlock(u);
|
|
829
|
+
!o2 && a2.position === "fixed" && (c = null), (l ? !o2 && !c : !o2 && a2.position === "static" && c && absoluteOrFixed.has(c.position) || isOverflowElement(u) && !o2 && hasFixedPositionAncestor(e, u)) ? s = s.filter((e2) => e2 !== u) : c = a2, u = getParentNode(u);
|
|
830
|
+
}
|
|
831
|
+
return a.set(e, s), s;
|
|
832
|
+
}
|
|
833
|
+
function getClippingRect(e) {
|
|
834
|
+
let { element: a, boundary: o, rootBoundary: s, strategy: c } = e, l = [...o === "clippingAncestors" ? isTopLayer(a) ? [] : getClippingElementAncestors(a, this._c) : [].concat(o), s], u = l[0], d = l.reduce((e2, o2) => {
|
|
835
|
+
let s2 = getClientRectFromClippingAncestor(a, o2, c);
|
|
836
|
+
return e2.top = max(s2.top, e2.top), e2.right = min(s2.right, e2.right), e2.bottom = min(s2.bottom, e2.bottom), e2.left = max(s2.left, e2.left), e2;
|
|
837
|
+
}, getClientRectFromClippingAncestor(a, u, c));
|
|
838
|
+
return {
|
|
839
|
+
width: d.right - d.left,
|
|
840
|
+
height: d.bottom - d.top,
|
|
841
|
+
x: d.left,
|
|
842
|
+
y: d.top
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
function getDimensions(e) {
|
|
846
|
+
let { width: a, height: o } = getCssDimensions(e);
|
|
847
|
+
return {
|
|
848
|
+
width: a,
|
|
849
|
+
height: o
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
function getRectRelativeToOffsetParent(e, a, o) {
|
|
853
|
+
let s = isHTMLElement(a), c = getDocumentElement(a), l = o === "fixed", u = getBoundingClientRect(e, true, l, a), d = {
|
|
854
|
+
scrollLeft: 0,
|
|
855
|
+
scrollTop: 0
|
|
856
|
+
}, f = createCoords(0);
|
|
857
|
+
function p() {
|
|
858
|
+
f.x = getWindowScrollBarX(c);
|
|
859
|
+
}
|
|
860
|
+
if (s || !s && !l) if ((getNodeName(a) !== "body" || isOverflowElement(c)) && (d = getNodeScroll(a)), s) {
|
|
861
|
+
let e2 = getBoundingClientRect(a, true, l, a);
|
|
862
|
+
f.x = e2.x + a.clientLeft, f.y = e2.y + a.clientTop;
|
|
863
|
+
} else c && p();
|
|
864
|
+
l && !s && c && p();
|
|
865
|
+
let m = c && !s && !l ? getHTMLOffset(c, d) : createCoords(0);
|
|
866
|
+
return {
|
|
867
|
+
x: u.left + d.scrollLeft - f.x - m.x,
|
|
868
|
+
y: u.top + d.scrollTop - f.y - m.y,
|
|
869
|
+
width: u.width,
|
|
870
|
+
height: u.height
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
function isStaticPositioned(e) {
|
|
874
|
+
return getComputedStyle(e).position === "static";
|
|
875
|
+
}
|
|
876
|
+
function getTrueOffsetParent(e, a) {
|
|
877
|
+
if (!isHTMLElement(e) || getComputedStyle(e).position === "fixed") return null;
|
|
878
|
+
if (a) return a(e);
|
|
879
|
+
let o = e.offsetParent;
|
|
880
|
+
return getDocumentElement(e) === o && (o = o.ownerDocument.body), o;
|
|
881
|
+
}
|
|
882
|
+
function getOffsetParent(e, a) {
|
|
883
|
+
let o = getWindow(e);
|
|
884
|
+
if (isTopLayer(e)) return o;
|
|
885
|
+
if (!isHTMLElement(e)) {
|
|
886
|
+
let a2 = getParentNode(e);
|
|
887
|
+
for (; a2 && !isLastTraversableNode(a2); ) {
|
|
888
|
+
if (isElement(a2) && !isStaticPositioned(a2)) return a2;
|
|
889
|
+
a2 = getParentNode(a2);
|
|
890
|
+
}
|
|
891
|
+
return o;
|
|
892
|
+
}
|
|
893
|
+
let s = getTrueOffsetParent(e, a);
|
|
894
|
+
for (; s && isTableElement(s) && isStaticPositioned(s); ) s = getTrueOffsetParent(s, a);
|
|
895
|
+
return s && isLastTraversableNode(s) && isStaticPositioned(s) && !isContainingBlock(s) ? o : s || getContainingBlock(e) || o;
|
|
896
|
+
}
|
|
897
|
+
var getElementRects = async function(e) {
|
|
898
|
+
let a = this.getOffsetParent || getOffsetParent, o = this.getDimensions, s = await o(e.floating);
|
|
899
|
+
return {
|
|
900
|
+
reference: getRectRelativeToOffsetParent(e.reference, await a(e.floating), e.strategy),
|
|
901
|
+
floating: {
|
|
902
|
+
x: 0,
|
|
903
|
+
y: 0,
|
|
904
|
+
width: s.width,
|
|
905
|
+
height: s.height
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
function isRTL(e) {
|
|
910
|
+
return getComputedStyle(e).direction === "rtl";
|
|
911
|
+
}
|
|
912
|
+
var platform = {
|
|
913
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
914
|
+
getDocumentElement,
|
|
915
|
+
getClippingRect,
|
|
916
|
+
getOffsetParent,
|
|
917
|
+
getElementRects,
|
|
918
|
+
getClientRects,
|
|
919
|
+
getDimensions,
|
|
920
|
+
getScale,
|
|
921
|
+
isElement,
|
|
922
|
+
isRTL
|
|
923
|
+
};
|
|
924
|
+
function rectsAreEqual(e, a) {
|
|
925
|
+
return e.x === a.x && e.y === a.y && e.width === a.width && e.height === a.height;
|
|
926
|
+
}
|
|
927
|
+
function observeMove(e, a) {
|
|
928
|
+
let o = null, s, c = getDocumentElement(e);
|
|
929
|
+
function l() {
|
|
930
|
+
var e2;
|
|
931
|
+
clearTimeout(s), (e2 = o) == null || e2.disconnect(), o = null;
|
|
932
|
+
}
|
|
933
|
+
function u(d, f) {
|
|
934
|
+
d === void 0 && (d = false), f === void 0 && (f = 1), l();
|
|
935
|
+
let p = e.getBoundingClientRect(), { left: m, top: h, width: g, height: _ } = p;
|
|
936
|
+
if (d || a(), !g || !_) return;
|
|
937
|
+
let v = floor(h), y = floor(c.clientWidth - (m + g)), b = floor(c.clientHeight - (h + _)), x = floor(m), S = {
|
|
938
|
+
rootMargin: -v + "px " + -y + "px " + -b + "px " + -x + "px",
|
|
939
|
+
threshold: max(0, min(1, f)) || 1
|
|
940
|
+
}, C = true;
|
|
941
|
+
function w(a2) {
|
|
942
|
+
let o2 = a2[0].intersectionRatio;
|
|
943
|
+
if (o2 !== f) {
|
|
944
|
+
if (!C) return u();
|
|
945
|
+
o2 ? u(false, o2) : s = setTimeout(() => {
|
|
946
|
+
u(false, 1e-7);
|
|
947
|
+
}, 1e3);
|
|
948
|
+
}
|
|
949
|
+
o2 === 1 && !rectsAreEqual(p, e.getBoundingClientRect()) && u(), C = false;
|
|
950
|
+
}
|
|
951
|
+
try {
|
|
952
|
+
o = new IntersectionObserver(w, {
|
|
953
|
+
...S,
|
|
954
|
+
root: c.ownerDocument
|
|
955
|
+
});
|
|
956
|
+
} catch {
|
|
957
|
+
o = new IntersectionObserver(w, S);
|
|
958
|
+
}
|
|
959
|
+
o.observe(e);
|
|
960
|
+
}
|
|
961
|
+
return u(true), l;
|
|
962
|
+
}
|
|
963
|
+
function autoUpdate(e, a, o, s) {
|
|
964
|
+
s === void 0 && (s = {});
|
|
965
|
+
let { ancestorScroll: c = true, ancestorResize: l = true, elementResize: u = typeof ResizeObserver == "function", layoutShift: d = typeof IntersectionObserver == "function", animationFrame: f = false } = s, p = unwrapElement(e), m = c || l ? [...p ? getOverflowAncestors(p) : [], ...getOverflowAncestors(a)] : [];
|
|
966
|
+
m.forEach((e2) => {
|
|
967
|
+
c && e2.addEventListener("scroll", o, { passive: true }), l && e2.addEventListener("resize", o);
|
|
968
|
+
});
|
|
969
|
+
let h = p && d ? observeMove(p, o) : null, g = -1, _ = null;
|
|
970
|
+
u && (_ = new ResizeObserver((e2) => {
|
|
971
|
+
let [s2] = e2;
|
|
972
|
+
s2 && s2.target === p && _ && (_.unobserve(a), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
973
|
+
var e3;
|
|
974
|
+
(e3 = _) == null || e3.observe(a);
|
|
975
|
+
})), o();
|
|
976
|
+
}), p && !f && _.observe(p), _.observe(a));
|
|
977
|
+
let v, y = f ? getBoundingClientRect(e) : null;
|
|
978
|
+
f && b();
|
|
979
|
+
function b() {
|
|
980
|
+
let a2 = getBoundingClientRect(e);
|
|
981
|
+
y && !rectsAreEqual(y, a2) && o(), y = a2, v = requestAnimationFrame(b);
|
|
982
|
+
}
|
|
983
|
+
return o(), () => {
|
|
984
|
+
var e2;
|
|
985
|
+
m.forEach((e3) => {
|
|
986
|
+
c && e3.removeEventListener("scroll", o), l && e3.removeEventListener("resize", o);
|
|
987
|
+
}), h == null ? void 0 : h(), (e2 = _) == null || e2.disconnect(), _ = null, f && cancelAnimationFrame(v);
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
var offset$1 = offset$2, shift$1 = shift$2, flip$1 = flip$2, size$1 = size$2, hide$1 = hide$2, arrow$1 = arrow$2, limitShift$1 = limitShift$2, computePosition = (e, a, o) => {
|
|
991
|
+
let s = /* @__PURE__ */ new Map(), c = {
|
|
992
|
+
platform,
|
|
993
|
+
...o
|
|
994
|
+
}, l = {
|
|
995
|
+
...c.platform,
|
|
996
|
+
_c: s
|
|
997
|
+
};
|
|
998
|
+
return computePosition$1(e, a, {
|
|
999
|
+
...c,
|
|
1000
|
+
platform: l
|
|
1001
|
+
});
|
|
1002
|
+
}, import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1), index = typeof document < "u" ? import_react.useLayoutEffect : function() {
|
|
1003
|
+
};
|
|
1004
|
+
function deepEqual(e, a) {
|
|
1005
|
+
if (e === a) return true;
|
|
1006
|
+
if (typeof e != typeof a) return false;
|
|
1007
|
+
if (typeof e == "function" && e.toString() === a.toString()) return true;
|
|
1008
|
+
let o, s, c;
|
|
1009
|
+
if (e && a && typeof e == "object") {
|
|
1010
|
+
if (Array.isArray(e)) {
|
|
1011
|
+
if (o = e.length, o !== a.length) return false;
|
|
1012
|
+
for (s = o; s-- !== 0; ) if (!deepEqual(e[s], a[s])) return false;
|
|
1013
|
+
return true;
|
|
1014
|
+
}
|
|
1015
|
+
if (c = Object.keys(e), o = c.length, o !== Object.keys(a).length) return false;
|
|
1016
|
+
for (s = o; s-- !== 0; ) if (!{}.hasOwnProperty.call(a, c[s])) return false;
|
|
1017
|
+
for (s = o; s-- !== 0; ) {
|
|
1018
|
+
let o2 = c[s];
|
|
1019
|
+
if (!(o2 === "_owner" && e.$$typeof) && !deepEqual(e[o2], a[o2])) return false;
|
|
1020
|
+
}
|
|
1021
|
+
return true;
|
|
1022
|
+
}
|
|
1023
|
+
return e !== e && a !== a;
|
|
1024
|
+
}
|
|
1025
|
+
function getDPR(e) {
|
|
1026
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1027
|
+
}
|
|
1028
|
+
function roundByDPR(e, a) {
|
|
1029
|
+
let o = getDPR(e);
|
|
1030
|
+
return Math.round(a * o) / o;
|
|
1031
|
+
}
|
|
1032
|
+
function useLatestRef(e) {
|
|
1033
|
+
let a = import_react.useRef(e);
|
|
1034
|
+
return index(() => {
|
|
1035
|
+
a.current = e;
|
|
1036
|
+
}), a;
|
|
1037
|
+
}
|
|
1038
|
+
function useFloating(e) {
|
|
1039
|
+
e === void 0 && (e = {});
|
|
1040
|
+
let { placement: a = "bottom", strategy: o = "absolute", middleware: s = [], platform: c, elements: { reference: l, floating: u } = {}, transform: d = true, whileElementsMounted: f, open: p } = e, [m, h] = import_react.useState({
|
|
1041
|
+
x: 0,
|
|
1042
|
+
y: 0,
|
|
1043
|
+
strategy: o,
|
|
1044
|
+
placement: a,
|
|
1045
|
+
middlewareData: {},
|
|
1046
|
+
isPositioned: false
|
|
1047
|
+
}), [g, _] = import_react.useState(s);
|
|
1048
|
+
deepEqual(g, s) || _(s);
|
|
1049
|
+
let [v, b] = import_react.useState(null), [x, S] = import_react.useState(null), C = import_react.useCallback((e2) => {
|
|
1050
|
+
e2 !== D.current && (D.current = e2, b(e2));
|
|
1051
|
+
}, []), w = import_react.useCallback((e2) => {
|
|
1052
|
+
e2 !== O.current && (O.current = e2, S(e2));
|
|
1053
|
+
}, []), T = l || v, E = u || x, D = import_react.useRef(null), O = import_react.useRef(null), k = import_react.useRef(m), A = f != null, j = useLatestRef(f), M = useLatestRef(c), N = useLatestRef(p), P = import_react.useCallback(() => {
|
|
1054
|
+
if (!D.current || !O.current) return;
|
|
1055
|
+
let e2 = {
|
|
1056
|
+
placement: a,
|
|
1057
|
+
strategy: o,
|
|
1058
|
+
middleware: g
|
|
1059
|
+
};
|
|
1060
|
+
M.current && (e2.platform = M.current), computePosition(D.current, O.current, e2).then((e3) => {
|
|
1061
|
+
let a2 = {
|
|
1062
|
+
...e3,
|
|
1063
|
+
isPositioned: N.current !== false
|
|
1064
|
+
};
|
|
1065
|
+
F.current && !deepEqual(k.current, a2) && (k.current = a2, import_react_dom.flushSync(() => {
|
|
1066
|
+
h(a2);
|
|
1067
|
+
}));
|
|
1068
|
+
});
|
|
1069
|
+
}, [
|
|
1070
|
+
g,
|
|
1071
|
+
a,
|
|
1072
|
+
o,
|
|
1073
|
+
M,
|
|
1074
|
+
N
|
|
1075
|
+
]);
|
|
1076
|
+
index(() => {
|
|
1077
|
+
p === false && k.current.isPositioned && (k.current.isPositioned = false, h((e2) => ({
|
|
1078
|
+
...e2,
|
|
1079
|
+
isPositioned: false
|
|
1080
|
+
})));
|
|
1081
|
+
}, [p]);
|
|
1082
|
+
let F = import_react.useRef(false);
|
|
1083
|
+
index(() => (F.current = true, () => {
|
|
1084
|
+
F.current = false;
|
|
1085
|
+
}), []), index(() => {
|
|
1086
|
+
if (T && (D.current = T), E && (O.current = E), T && E) {
|
|
1087
|
+
if (j.current) return j.current(T, E, P);
|
|
1088
|
+
P();
|
|
1089
|
+
}
|
|
1090
|
+
}, [
|
|
1091
|
+
T,
|
|
1092
|
+
E,
|
|
1093
|
+
P,
|
|
1094
|
+
j,
|
|
1095
|
+
A
|
|
1096
|
+
]);
|
|
1097
|
+
let I = import_react.useMemo(() => ({
|
|
1098
|
+
reference: D,
|
|
1099
|
+
floating: O,
|
|
1100
|
+
setReference: C,
|
|
1101
|
+
setFloating: w
|
|
1102
|
+
}), [C, w]), L = import_react.useMemo(() => ({
|
|
1103
|
+
reference: T,
|
|
1104
|
+
floating: E
|
|
1105
|
+
}), [T, E]), R = import_react.useMemo(() => {
|
|
1106
|
+
let e2 = {
|
|
1107
|
+
position: o,
|
|
1108
|
+
left: 0,
|
|
1109
|
+
top: 0
|
|
1110
|
+
};
|
|
1111
|
+
if (!L.floating) return e2;
|
|
1112
|
+
let a2 = roundByDPR(L.floating, m.x), s2 = roundByDPR(L.floating, m.y);
|
|
1113
|
+
return d ? {
|
|
1114
|
+
...e2,
|
|
1115
|
+
transform: "translate(" + a2 + "px, " + s2 + "px)",
|
|
1116
|
+
...getDPR(L.floating) >= 1.5 && { willChange: "transform" }
|
|
1117
|
+
} : {
|
|
1118
|
+
position: o,
|
|
1119
|
+
left: a2,
|
|
1120
|
+
top: s2
|
|
1121
|
+
};
|
|
1122
|
+
}, [
|
|
1123
|
+
o,
|
|
1124
|
+
d,
|
|
1125
|
+
L.floating,
|
|
1126
|
+
m.x,
|
|
1127
|
+
m.y
|
|
1128
|
+
]);
|
|
1129
|
+
return import_react.useMemo(() => ({
|
|
1130
|
+
...m,
|
|
1131
|
+
update: P,
|
|
1132
|
+
refs: I,
|
|
1133
|
+
elements: L,
|
|
1134
|
+
floatingStyles: R
|
|
1135
|
+
}), [
|
|
1136
|
+
m,
|
|
1137
|
+
P,
|
|
1138
|
+
I,
|
|
1139
|
+
L,
|
|
1140
|
+
R
|
|
1141
|
+
]);
|
|
1142
|
+
}
|
|
1143
|
+
var arrow$1$1 = (e) => {
|
|
1144
|
+
function a(e2) {
|
|
1145
|
+
return {}.hasOwnProperty.call(e2, "current");
|
|
1146
|
+
}
|
|
1147
|
+
return {
|
|
1148
|
+
name: "arrow",
|
|
1149
|
+
options: e,
|
|
1150
|
+
fn(o) {
|
|
1151
|
+
let { element: s, padding: c } = typeof e == "function" ? e(o) : e;
|
|
1152
|
+
return s && a(s) ? s.current == null ? {} : arrow$1({
|
|
1153
|
+
element: s.current,
|
|
1154
|
+
padding: c
|
|
1155
|
+
}).fn(o) : s ? arrow$1({
|
|
1156
|
+
element: s,
|
|
1157
|
+
padding: c
|
|
1158
|
+
}).fn(o) : {};
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
}, offset = (e, a) => ({
|
|
1162
|
+
...offset$1(e),
|
|
1163
|
+
options: [e, a]
|
|
1164
|
+
}), shift = (e, a) => ({
|
|
1165
|
+
...shift$1(e),
|
|
1166
|
+
options: [e, a]
|
|
1167
|
+
}), limitShift = (e, a) => ({
|
|
1168
|
+
...limitShift$1(e),
|
|
1169
|
+
options: [e, a]
|
|
1170
|
+
}), flip = (e, a) => ({
|
|
1171
|
+
...flip$1(e),
|
|
1172
|
+
options: [e, a]
|
|
1173
|
+
}), size = (e, a) => ({
|
|
1174
|
+
...size$1(e),
|
|
1175
|
+
options: [e, a]
|
|
1176
|
+
}), hide = (e, a) => ({
|
|
1177
|
+
...hide$1(e),
|
|
1178
|
+
options: [e, a]
|
|
1179
|
+
}), arrow = (e, a) => ({
|
|
1180
|
+
...arrow$1$1(e),
|
|
1181
|
+
options: [e, a]
|
|
1182
|
+
}), NAME = "Arrow", Arrow$1 = import_react.forwardRef((e, a) => {
|
|
1183
|
+
let { children: o, width: s = 10, height: c = 5, ...l } = e;
|
|
1184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.svg, {
|
|
1185
|
+
...l,
|
|
1186
|
+
ref: a,
|
|
1187
|
+
width: s,
|
|
1188
|
+
height: c,
|
|
1189
|
+
viewBox: "0 0 30 10",
|
|
1190
|
+
preserveAspectRatio: "none",
|
|
1191
|
+
children: e.asChild ? o : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
|
1192
|
+
});
|
|
1193
|
+
});
|
|
1194
|
+
Arrow$1.displayName = NAME;
|
|
1195
|
+
var Root = Arrow$1, POPPER_NAME = "Popper", [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME), [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME), Popper = (e) => {
|
|
1196
|
+
let { __scopePopper: a, children: o } = e, [s, c] = import_react.useState(null);
|
|
1197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProvider, {
|
|
1198
|
+
scope: a,
|
|
1199
|
+
anchor: s,
|
|
1200
|
+
onAnchorChange: c,
|
|
1201
|
+
children: o
|
|
1202
|
+
});
|
|
1203
|
+
};
|
|
1204
|
+
Popper.displayName = POPPER_NAME;
|
|
1205
|
+
var ANCHOR_NAME = "PopperAnchor", PopperAnchor = import_react.forwardRef((e, a) => {
|
|
1206
|
+
let { __scopePopper: s, virtualRef: c, ...l } = e, d = usePopperContext(ANCHOR_NAME, s), f = import_react.useRef(null), p = useComposedRefs(a, f), m = import_react.useRef(null);
|
|
1207
|
+
return import_react.useEffect(() => {
|
|
1208
|
+
let e2 = m.current;
|
|
1209
|
+
m.current = (c == null ? void 0 : c.current) || f.current, e2 !== m.current && d.onAnchorChange(m.current);
|
|
1210
|
+
}), c ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
|
|
1211
|
+
...l,
|
|
1212
|
+
ref: p
|
|
1213
|
+
});
|
|
1214
|
+
});
|
|
1215
|
+
PopperAnchor.displayName = ANCHOR_NAME;
|
|
1216
|
+
var CONTENT_NAME = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME), PopperContent = import_react.forwardRef((e, a) => {
|
|
1217
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1218
|
+
let { __scopePopper: s, side: c = "bottom", sideOffset: d = 0, align: p = "center", alignOffset: m = 0, arrowPadding: h = 0, avoidCollisions: g = true, collisionBoundary: _ = [], collisionPadding: v = 0, sticky: b = "partial", hideWhenDetached: x = false, updatePositionStrategy: C = "optimized", onPlaced: w, ...T } = e, E = usePopperContext(CONTENT_NAME, s), [O, k] = import_react.useState(null), A = useComposedRefs(a, (e2) => k(e2)), [j, M] = import_react.useState(null), N = useSize(j), P = (N == null ? void 0 : N.width) ?? 0, F = (N == null ? void 0 : N.height) ?? 0, I = c + (p === "center" ? "" : "-" + p), L = typeof v == "number" ? v : {
|
|
1219
|
+
top: 0,
|
|
1220
|
+
right: 0,
|
|
1221
|
+
bottom: 0,
|
|
1222
|
+
left: 0,
|
|
1223
|
+
...v
|
|
1224
|
+
}, R = Array.isArray(_) ? _ : [_], z = R.length > 0, B = {
|
|
1225
|
+
padding: L,
|
|
1226
|
+
boundary: R.filter(isNotNull),
|
|
1227
|
+
altBoundary: z
|
|
1228
|
+
}, { refs: V, floatingStyles: H, placement: U, isPositioned: W, middlewareData: G } = useFloating({
|
|
1229
|
+
strategy: "fixed",
|
|
1230
|
+
placement: I,
|
|
1231
|
+
whileElementsMounted: (...e2) => autoUpdate(...e2, { animationFrame: C === "always" }),
|
|
1232
|
+
elements: { reference: E.anchor },
|
|
1233
|
+
middleware: [
|
|
1234
|
+
offset({
|
|
1235
|
+
mainAxis: d + F,
|
|
1236
|
+
alignmentAxis: m
|
|
1237
|
+
}),
|
|
1238
|
+
g && shift({
|
|
1239
|
+
mainAxis: true,
|
|
1240
|
+
crossAxis: false,
|
|
1241
|
+
limiter: b === "partial" ? limitShift() : void 0,
|
|
1242
|
+
...B
|
|
1243
|
+
}),
|
|
1244
|
+
g && flip({ ...B }),
|
|
1245
|
+
size({
|
|
1246
|
+
...B,
|
|
1247
|
+
apply: ({ elements: e2, rects: a2, availableWidth: o, availableHeight: s2 }) => {
|
|
1248
|
+
let { width: c2, height: l } = a2.reference, u = e2.floating.style;
|
|
1249
|
+
u.setProperty("--radix-popper-available-width", `${o}px`), u.setProperty("--radix-popper-available-height", `${s2}px`), u.setProperty("--radix-popper-anchor-width", `${c2}px`), u.setProperty("--radix-popper-anchor-height", `${l}px`);
|
|
1250
|
+
}
|
|
1251
|
+
}),
|
|
1252
|
+
j && arrow({
|
|
1253
|
+
element: j,
|
|
1254
|
+
padding: h
|
|
1255
|
+
}),
|
|
1256
|
+
transformOrigin({
|
|
1257
|
+
arrowWidth: P,
|
|
1258
|
+
arrowHeight: F
|
|
1259
|
+
}),
|
|
1260
|
+
x && hide({
|
|
1261
|
+
strategy: "referenceHidden",
|
|
1262
|
+
...B
|
|
1263
|
+
})
|
|
1264
|
+
]
|
|
1265
|
+
}), [K, q] = getSideAndAlignFromPlacement(U), J = useCallbackRef(w);
|
|
1266
|
+
useLayoutEffect2(() => {
|
|
1267
|
+
W && (J == null ? void 0 : J());
|
|
1268
|
+
}, [W, J]);
|
|
1269
|
+
let Y = (_a = G.arrow) == null ? void 0 : _a.x, X = (_b = G.arrow) == null ? void 0 : _b.y, Z = ((_c = G.arrow) == null ? void 0 : _c.centerOffset) !== 0, [Q, $] = import_react.useState();
|
|
1270
|
+
return useLayoutEffect2(() => {
|
|
1271
|
+
O && $(window.getComputedStyle(O).zIndex);
|
|
1272
|
+
}, [O]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1273
|
+
ref: V.setFloating,
|
|
1274
|
+
"data-radix-popper-content-wrapper": "",
|
|
1275
|
+
style: {
|
|
1276
|
+
...H,
|
|
1277
|
+
transform: W ? H.transform : "translate(0, -200%)",
|
|
1278
|
+
minWidth: "max-content",
|
|
1279
|
+
zIndex: Q,
|
|
1280
|
+
"--radix-popper-transform-origin": [(_d = G.transformOrigin) == null ? void 0 : _d.x, (_e = G.transformOrigin) == null ? void 0 : _e.y].join(" "),
|
|
1281
|
+
...((_f = G.hide) == null ? void 0 : _f.referenceHidden) && {
|
|
1282
|
+
visibility: "hidden",
|
|
1283
|
+
pointerEvents: "none"
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
dir: e.dir,
|
|
1287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperContentProvider, {
|
|
1288
|
+
scope: s,
|
|
1289
|
+
placedSide: K,
|
|
1290
|
+
onArrowChange: M,
|
|
1291
|
+
arrowX: Y,
|
|
1292
|
+
arrowY: X,
|
|
1293
|
+
shouldHideArrow: Z,
|
|
1294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primitive.div, {
|
|
1295
|
+
"data-side": K,
|
|
1296
|
+
"data-align": q,
|
|
1297
|
+
...T,
|
|
1298
|
+
ref: A,
|
|
1299
|
+
style: {
|
|
1300
|
+
...T.style,
|
|
1301
|
+
animation: W ? void 0 : "none"
|
|
1302
|
+
}
|
|
1303
|
+
})
|
|
1304
|
+
})
|
|
1305
|
+
});
|
|
1306
|
+
});
|
|
1307
|
+
PopperContent.displayName = CONTENT_NAME;
|
|
1308
|
+
var ARROW_NAME = "PopperArrow", OPPOSITE_SIDE = {
|
|
1309
|
+
top: "bottom",
|
|
1310
|
+
right: "left",
|
|
1311
|
+
bottom: "top",
|
|
1312
|
+
left: "right"
|
|
1313
|
+
}, PopperArrow = import_react.forwardRef(function(e, a) {
|
|
1314
|
+
let { __scopePopper: o, ...s } = e, c = useContentContext(ARROW_NAME, o), l = OPPOSITE_SIDE[c.placedSide];
|
|
1315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1316
|
+
ref: c.onArrowChange,
|
|
1317
|
+
style: {
|
|
1318
|
+
position: "absolute",
|
|
1319
|
+
left: c.arrowX,
|
|
1320
|
+
top: c.arrowY,
|
|
1321
|
+
[l]: 0,
|
|
1322
|
+
transformOrigin: {
|
|
1323
|
+
top: "",
|
|
1324
|
+
right: "0 0",
|
|
1325
|
+
bottom: "center 0",
|
|
1326
|
+
left: "100% 0"
|
|
1327
|
+
}[c.placedSide],
|
|
1328
|
+
transform: {
|
|
1329
|
+
top: "translateY(100%)",
|
|
1330
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1331
|
+
bottom: "rotate(180deg)",
|
|
1332
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1333
|
+
}[c.placedSide],
|
|
1334
|
+
visibility: c.shouldHideArrow ? "hidden" : void 0
|
|
1335
|
+
},
|
|
1336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Root, {
|
|
1337
|
+
...s,
|
|
1338
|
+
ref: a,
|
|
1339
|
+
style: {
|
|
1340
|
+
...s.style,
|
|
1341
|
+
display: "block"
|
|
1342
|
+
}
|
|
1343
|
+
})
|
|
1344
|
+
});
|
|
1345
|
+
});
|
|
1346
|
+
PopperArrow.displayName = ARROW_NAME;
|
|
1347
|
+
function isNotNull(e) {
|
|
1348
|
+
return e !== null;
|
|
1349
|
+
}
|
|
1350
|
+
var transformOrigin = (e) => ({
|
|
1351
|
+
name: "transformOrigin",
|
|
1352
|
+
options: e,
|
|
1353
|
+
fn(a) {
|
|
1354
|
+
var _a, _b, _c;
|
|
1355
|
+
let { placement: o, rects: s, middlewareData: c } = a, l = ((_a = c.arrow) == null ? void 0 : _a.centerOffset) !== 0, u = l ? 0 : e.arrowWidth, d = l ? 0 : e.arrowHeight, [f, p] = getSideAndAlignFromPlacement(o), m = {
|
|
1356
|
+
start: "0%",
|
|
1357
|
+
center: "50%",
|
|
1358
|
+
end: "100%"
|
|
1359
|
+
}[p], h = (((_b = c.arrow) == null ? void 0 : _b.x) ?? 0) + u / 2, g = (((_c = c.arrow) == null ? void 0 : _c.y) ?? 0) + d / 2, _ = "", v = "";
|
|
1360
|
+
return f === "bottom" ? (_ = l ? m : `${h}px`, v = `${-d}px`) : f === "top" ? (_ = l ? m : `${h}px`, v = `${s.floating.height + d}px`) : f === "right" ? (_ = `${-d}px`, v = l ? m : `${g}px`) : f === "left" && (_ = `${s.floating.width + d}px`, v = l ? m : `${g}px`), { data: {
|
|
1361
|
+
x: _,
|
|
1362
|
+
y: v
|
|
1363
|
+
} };
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
function getSideAndAlignFromPlacement(e) {
|
|
1367
|
+
let [a, o = "center"] = e.split("-");
|
|
1368
|
+
return [a, o];
|
|
1369
|
+
}
|
|
1370
|
+
var Root2 = Popper, Anchor = PopperAnchor, Content = PopperContent, Arrow = PopperArrow;
|
|
1371
|
+
export {
|
|
1372
|
+
createPopperScope as a,
|
|
1373
|
+
VISUALLY_HIDDEN_STYLES as c,
|
|
1374
|
+
Root2 as i,
|
|
1375
|
+
createLucideIcon as l,
|
|
1376
|
+
Arrow as n,
|
|
1377
|
+
useSize as o,
|
|
1378
|
+
Content as r,
|
|
1379
|
+
Root$1 as s,
|
|
1380
|
+
Anchor as t
|
|
1381
|
+
};
|