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