@marimo-team/frontend 0.24.3-dev2 → 0.24.3-dev4

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 (94) hide show
  1. package/dist/assets/{CellStatus-LoTwk7fR.js → CellStatus-0QNZS4By.js} +1 -1
  2. package/dist/assets/{JsonOutput-CzIGPEZQ.js → JsonOutput-D2ZWLZs4.js} +7 -7
  3. package/dist/assets/{MarimoErrorOutput-DqpoYOvw.js → MarimoErrorOutput-BlmIJ9WY.js} +2 -2
  4. package/dist/assets/{RenderHTML-DwhMAd9l.js → RenderHTML-DnPB4qpJ.js} +1 -1
  5. package/dist/assets/{RunButton-BlpbweyH.js → RunButton-C7TxE07w.js} +1 -1
  6. package/dist/assets/{add-cell-with-ai-R-3DS79K.js → add-cell-with-ai-OQ4sSXg4.js} +12 -12
  7. package/dist/assets/{add-connection-dialog-BGfpw5lC.js → add-connection-dialog-MTOC2ycO.js} +73 -73
  8. package/dist/assets/{agent-panel-Cgt_K0tD.js → agent-panel-BdEDIHdc.js} +4 -4
  9. package/dist/assets/ai-model-dropdown-CmJEEhSC.js +3 -0
  10. package/dist/assets/app-config-button-W8Pytgb5.js +1 -0
  11. package/dist/assets/{blob-B2d_dHwI.js → blob-BrVH7IJp.js} +1 -1
  12. package/dist/assets/{cell-editor-Dw09J9yD.js → cell-editor-C7IiingQ.js} +8 -8
  13. package/dist/assets/{cell-link-6burT2XF.js → cell-link-CbHXmrt8.js} +1 -1
  14. package/dist/assets/{cells-Cp-G34Rz.js → cells-BBhW3FXj.js} +1 -1
  15. package/dist/assets/{chat-display-Bu405iyc.js → chat-display-CIpYPLlF.js} +1 -1
  16. package/dist/assets/{chat-panel-BlUwNY5j.js → chat-panel-CK3X_KPy.js} +2 -2
  17. package/dist/assets/{chat-ui-DGiVDzNh.js → chat-ui-BJwtx1SR.js} +4 -4
  18. package/dist/assets/{column-preview-riSXbYe_.js → column-preview-Coa5PyHk.js} +1 -1
  19. package/dist/assets/{command-palette-CCVzJcyf.js → command-palette-_xpwMniA.js} +1 -1
  20. package/dist/assets/{common-CHR7w7aQ.js → common-KqtqJsml.js} +1 -1
  21. package/dist/assets/{components-C7mWrmXr.js → components-Cpv2z-yV.js} +1 -1
  22. package/dist/assets/{datasource-DrODSIs0.js → datasource-B3qF2oaW.js} +2 -2
  23. package/dist/assets/{dependency-graph-panel-AY5BEVH2.js → dependency-graph-panel-Av1CMZ61.js} +3 -3
  24. package/dist/assets/{documentation-panel-CaJF7e-j.js → documentation-panel-BEz3Hjfu.js} +1 -1
  25. package/dist/assets/{download-DMxOzI7b.js → download-BgO9EN-W.js} +1 -1
  26. package/dist/assets/edit-page-DslcxB67.js +9 -0
  27. package/dist/assets/error-entries-BFzSRy80.js +5 -0
  28. package/dist/assets/{error-panel-Bhlvt6_H.js → error-panel-BtLTJDUq.js} +1 -1
  29. package/dist/assets/{file-explorer-panel-s0ohSG_L.js → file-explorer-panel-DEyChgqS.js} +1 -1
  30. package/dist/assets/{file-icons-DdGYuADJ.js → file-icons-BhotQqrU.js} +1 -1
  31. package/dist/assets/{file-name-input-K4MKESI_.js → file-name-input-CH-hNP6F.js} +1 -1
  32. package/dist/assets/{floating-outline-DaUHnl_e.js → floating-outline-Cmk3XDJi.js} +1 -1
  33. package/dist/assets/{home-page-BLd6rnbk.js → home-page-CUBuu5Go.js} +1 -1
  34. package/dist/assets/index-C5h1aWhw.js +29 -0
  35. package/dist/assets/{layout-DWnrxIo2.js → layout-CsLuqwD3.js} +5 -5
  36. package/dist/assets/{logs-panel-BGS2v3ba.js → logs-panel-BV4VZ_uH.js} +1 -1
  37. package/dist/assets/{markdown-renderer-BZKlbm2Q.js → markdown-renderer-751VNlrQ.js} +1 -1
  38. package/dist/assets/{name-cell-input-BMCdK-el.js → name-cell-input-DexJ7ZIH.js} +1 -1
  39. package/dist/assets/{outline-panel-Dr5u73V6.js → outline-panel-QU3nj1VW.js} +1 -1
  40. package/dist/assets/packages-panel-D7oDuI6v.js +1 -0
  41. package/dist/assets/panel-accordion-state-Dl0VcB79.js +1 -0
  42. package/dist/assets/panels-nM4QKfEI.js +4 -0
  43. package/dist/assets/process-output-CPUOlFhp.js +1 -0
  44. package/dist/assets/readonly-code-display-DP7DxRA1.js +1 -0
  45. package/dist/assets/{readonly-python-code-DpIyjHqY.js → readonly-python-code-CAYyabaV.js} +1 -1
  46. package/dist/assets/{reveal-component-nZIAapoD.js → reveal-component-D9DygPds.js} +2 -2
  47. package/dist/assets/rotate-cw-CESctpLh.js +1 -0
  48. package/dist/assets/{run-page-9pl8qhQR.js → run-page-CzO-uMUn.js} +1 -1
  49. package/dist/assets/{scratchpad-panel-BleGt2KM.js → scratchpad-panel-7YBL6E95.js} +1 -1
  50. package/dist/assets/session-panel-hnFaUP0Y.js +1 -0
  51. package/dist/assets/share-BZW3tzEX.js +1 -0
  52. package/dist/assets/{skeleton-BKeh8hf3.js → skeleton-CM7HxSva.js} +1 -1
  53. package/dist/assets/{snippets-panel-D5yy7kj0.js → snippets-panel-AdjuR23O.js} +1 -1
  54. package/dist/assets/state-DOrY1Jyf.js +1 -0
  55. package/dist/assets/state-DQHafeTV.js +3 -0
  56. package/dist/assets/{tracing-DNk3gmWv.js → tracing-CUlvXr_H.js} +1 -1
  57. package/dist/assets/{tracing-panel-Yqazr6w_.js → tracing-panel-CjyayE-l.js} +2 -2
  58. package/dist/assets/{tree-actions-CG5g7aUQ.js → tree-actions-mfuAcK1x.js} +1 -1
  59. package/dist/assets/{useAddCell-DdB_uBif.js → useAddCell-BR8kYnb6.js} +1 -1
  60. package/dist/assets/{useCellActionButton-B31neI3m.js → useCellActionButton-BhREXvvn.js} +1 -1
  61. package/dist/assets/{useDeleteCell-Bz49_cFj.js → useDeleteCell-DwaN6KAw.js} +1 -1
  62. package/dist/assets/useDependencyPanelTab-I-7B78cW.js +1 -0
  63. package/dist/assets/useInstallPackage-IUt497GC.js +1 -0
  64. package/dist/assets/useNotebookActions-D5_YLR42.js +10 -0
  65. package/dist/assets/useRunCells-BMQuitYY.js +1 -0
  66. package/dist/assets/{useSplitCell-Dy2_DmJR.js → useSplitCell-B7AvHoya.js} +1 -1
  67. package/dist/index.html +22 -22
  68. package/package.json +1 -1
  69. package/src/__mocks__/requests.ts +7 -2
  70. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +143 -0
  71. package/src/components/editor/chrome/panels/packages-panel.tsx +145 -51
  72. package/src/components/editor/package-alert.tsx +25 -1
  73. package/src/core/packages/__tests__/useInstallPackage.test.tsx +47 -1
  74. package/src/core/packages/toast-components.tsx +26 -0
  75. package/src/core/packages/useInstallPackage.ts +7 -2
  76. package/src/core/wasm/bridge.ts +1 -0
  77. package/dist/assets/ai-model-dropdown-DCmiuk7x.js +0 -3
  78. package/dist/assets/app-config-button-DUJC6b6x.js +0 -1
  79. package/dist/assets/edit-page-xlMlcLnI.js +0 -9
  80. package/dist/assets/error-entries-Cv2m1yhc.js +0 -5
  81. package/dist/assets/index-4n22QjCD.js +0 -29
  82. package/dist/assets/packages-panel-BdpRg9tX.js +0 -1
  83. package/dist/assets/panel-accordion-state-DjUTN7i5.js +0 -1
  84. package/dist/assets/panels-CWn0Yh1D.js +0 -4
  85. package/dist/assets/process-output-Ck7-P_xp.js +0 -1
  86. package/dist/assets/readonly-code-display--S2daDa6.js +0 -1
  87. package/dist/assets/session-panel-DRGPlL5J.js +0 -1
  88. package/dist/assets/share-CPtBiNgr.js +0 -1
  89. package/dist/assets/state-B6AklCzD.js +0 -1
  90. package/dist/assets/state-Di9TbuV9.js +0 -3
  91. package/dist/assets/useDependencyPanelTab-C_ps0r--.js +0 -1
  92. package/dist/assets/useInstallPackage-DsD08SLK.js +0 -1
  93. package/dist/assets/useNotebookActions-CQtbk9CB.js +0 -10
  94. package/dist/assets/useRunCells-CX7oW5zy.js +0 -1
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./reveal-component-nZIAapoD.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-xfs0Sn4r.js","./react-CBDbhulC.js","./compiler-runtime-CYIjoINj.js","./cells-Cp-G34Rz.js","./react-dom-BQrReHnR.js","./schemas-aTUejmFi.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./utils-D5Ywm7-q.js","./_baseMerge-DLqSVasz.js","./isArrayLikeObject-DnwgSs_Z.js","./_initCloneObject-CM3WilQg.js","./useEventListener-92uWqz-P.js","./objects-snlMn4yk.js","./jsx-runtime-B74pBk57.js","./invariant-Ci2dTZ72.js","./config-BlNM0caL.js","./constants-BDbGiS7O.js","./Deferred-CrTnjj37.js","./session-Sz5nSFku.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./fullscreen-BH2jz-F4.js","./dist-DzCQtGkt.js","./menu-items-BSRA2YI9.js","./alert-dialog-CA-2mBs3.js","./button-Dh8EwhsF.js","./select-nLt2y0Sw.js","./check-BoA6XBpj.js","./createLucideIcon-B7HeEoG2.js","./useNumberFormatter-DHJ9s6Vk.js","./context-Do8M9TDF.js","./circle-ByJdIf5p.js","./tooltip-BUtPzKB4.js","./dist-BtC9ym6k.js","./dist-CZNULd6Z.js","./arrays-BqUx5USx.js","./once-Haz_uxEL.js","./capabilities-D8kPgMKr.js","./cjs-C49f7GXV.js","./createReducer-B_XmHROl.js","./dist-DiYjQAhI.js","./marked.esm-B_3iMIUq.js","./strings-CReV1AYG.js","./requests-C6_IaFh7.js","./dist-B8pdsUrS.js","./useLifecycle-BUaJcygz.js","./toDate-hGYJX0Ha.js","./database-zap-CloO6gbw.js","./write-secret-modal-D6zoZgLY.js","./input-DEbY281O.js","./numbers-Bc-r3jsC.js","./useDebounce-DgpSQhrP.js","./uuid-k9DpjH68.js","./use-toast-DpWHUGuF.js","./plus-C4J9gIE1.js","./trash-2-D_HX-0qx.js","./badge-BSgtkC2e.js","./preload-helper-HclGiUj8.js","./dist-Cx4BE7jC.js","./dist-B0RXffUm.js","./dist-DkPPv0FB.js","./dist-Dw9YRsCU.js","./dist-CKUpxYGQ.js","./stex-Dc5bKD4z.js","./paths-zcL04qUW.js","./useTheme-C-ri8BtY.js","./useAsyncData-Buhk-UgR.js","./purify.es-DrVcFY1Q.js","./cells-D-c15Ks-.css","./readonly-python-code-DpIyjHqY.js","./switch-DjXr9Y9D.js","./errors-DzO-nXy-.js","./copy-BMXKNElG.js","./eye-off-CFuPxa9F.js","./copy-DlEomWzI.js","./esm-BHMOvJzM.js","./extends-CvVTau-c.js","./useAddCell-DdB_uBif.js","./JsonOutput-CzIGPEZQ.js","./ErrorBoundary-CDVGFYfr.js","./tabs-Cy1qXLzH.js","./dropdown-menu-C40jM9o4.js","./chevron-right-CKA5zVsM.js","./download-DMxOzI7b.js","./html-to-image-D6GUC5q6.js","./LazyAnyLanguageCodeMirror-LboTfNDv.js","./table-CUK1W5bI.js","./tree-actions-CG5g7aUQ.js","./refresh-cw-Bf-rx_aV.js","./markdown-renderer-BZKlbm2Q.js","./chunk-5FQGJX7Z-CRg4xQWg.js","./micromark-factory-space-D9Dr-k4J.js","./markdown-renderer-B7zTpxjS.css","./ellipsis-Dfik_tuW.js","./external-link-Bp3BxyRA.js","./spinner-Ck-Hgfvj.js","./message-circle-BQB1AIAg.js","./MarimoErrorOutput-DqpoYOvw.js","./config-B-r81uZ6.js","./hat-glasses-C8LSY3HT.js","./package-DPlscLzt.js","./datasource-DrODSIs0.js","./RenderHTML-DwhMAd9l.js","./copy-icon-z8fuTE3w.js","./useRunCells-CX7oW5zy.js","./kbd-Cwh96ZBE.js","./alert-dmKwNsrp.js","./useInstallPackage-DsD08SLK.js","./state-B6AklCzD.js","./cell-link-6burT2XF.js","./VisuallyHidden-CBMDmozt.js","./useDateFormatter-BiqAQ-zI.js","./dates-B58T85Jq.js","./en-US-yTIMUO13.js","./isValid-nQ3Iam8J.js","./tooltip-BG35uS_N.js","./vega-loader.browser-AQmjV9CX.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-Dm4DaIgg.js","./react-icons.esm-hr79-MCS.js","./emotion-is-prop-valid.esm-nLO-SoUf.js","./useIframeCapabilities-C7Di8f2y.js","./error-banner-Dw5YY9wq.js","./utils-49LGK4zG.js","./formats-C6s96nu2.js","./table-DmqOOjfe.js","./react-resizable-panels.browser.esm-BSRAHC4P.js","./JsonOutput-BQtz7-np.css","./code-CF0HKE9K.js","./cell-editor-Dw09J9yD.js","./ai-model-dropdown-DCmiuk7x.js","./get-DjNf4SIX.js","./has-sKqQhP6r.js","./_hasPath-BmRQipI0.js","./triangle-alert-MihykDYG.js","./SelectionIndicator-DPl6HPLh.js","./renderShortcut-X-CJUSM8.js","./azure-Dcn397wY.js","./card-dYXwy2mo.js","./circle-check-CUWv70QX.js","./add-cell-with-ai-R-3DS79K.js","./fileToBase64-NhpNrK5l.js","./semaphore-BjoL5P0h.js","./file-DF8n85RA.js","./image-ab13yGv4.js","./useDeleteCell-Bz49_cFj.js","./blob-B2d_dHwI.js","./icons-CjLa9BiH.js","./process-output-Ck7-P_xp.js","./error-entries-Cv2m1yhc.js","./file-icons-DdGYuADJ.js","./file-headphone-rFCxFRI8.js","./components-DUYCXngU.js","./globe-BQf75qV_.js","./github-YRgb6LMu.js","./save-BybsbOKz.js","./dist-wY2yia-1.js","./requests-S_7PqcSt.js","./formatting-BWZH2nBg.js","./useSplitCell-Dy2_DmJR.js","./panel-accordion-state-DjUTN7i5.js","./loro_wasm_bg-BRA1AbB3.js","./ws-DLVysDhS.js","./Inputs-E85rt2lh.js","./Inputs-C4Oo7q-H.css","./skeleton-BKeh8hf3.js","./useInterval-B4v7_zd0.js","./cell-editor-_cVIHMNI.css","./RunButton-BlpbweyH.js","./square-B58Ib8Ir.js","./CellStatus-LoTwk7fR.js","./ban-CwXfMsC1.js","./workflow-SJ9KZapt.js","./multi-icon-COhkNiC1.js","./multi-icon-CW3_9bja.css","./CellStatus-2Psjnl5F.css","./readonly-code-display--S2daDa6.js","./reveal-component-CsWKDLzV.css","./slides-BQsAdh8K.css"])))=>i.map(i=>d[i]);
2
- import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-B0Z9INg1.js";import{c as a,f as o,l as s,r as c,t as l}from"./useEvent-xfs0Sn4r.js";import{t as u}from"./react-CBDbhulC.js";import{Co as d,D as f,Ha as p,M as m,Po as h,Ua as g,Wa as _,Wn as v,Xi as y,Zi as b,ct as x,dn as S,h as C,ii as w,lt as T,or as E,ot as D,un as O,w as k}from"./cells-Cp-G34Rz.js";import{t as A}from"./react-dom-BQrReHnR.js";import{In as j,Sn as M,Tt as N,Wn as P,kt as F,un as I,vt as L,wt as R}from"./schemas-aTUejmFi.js";import{t as ee}from"./compiler-runtime-CYIjoINj.js";import{t as z,w as te}from"./utils-D5Ywm7-q.js";import{g as B}from"./useEventListener-92uWqz-P.js";import{t as ne}from"./objects-snlMn4yk.js";import{t as V}from"./invariant-Ci2dTZ72.js";import{r as H,t as U}from"./constants-BDbGiS7O.js";import{M as re,N as ie,O as W,T as G,l as K,v as ae}from"./config-BlNM0caL.js";import{o as oe,t as se}from"./switch-DjXr9Y9D.js";import{_ as ce,a as le,f as ue,l as de,s as fe,t as pe,u as me}from"./readonly-python-code-DpIyjHqY.js";import{t as he}from"./ErrorBoundary-CDVGFYfr.js";import{t as q}from"./cn-ldLVeaqm.js";import{t as ge}from"./jsx-runtime-B74pBk57.js";import{i as _e,n as ve,r as ye,t as be}from"./tabs-Cy1qXLzH.js";import{c as xe,d as Se,i as Ce,n as we,s as Te,t as Ee}from"./select-nLt2y0Sw.js";import{a as De,c as Oe,p as ke,r as Ae,t as je}from"./dropdown-menu-C40jM9o4.js";import{A as Me,D as Ne,Nt as Pe,O as Fe,Pt as Ie,T as Le,bt as Re,k as ze,n as Be,r as Ve}from"./JsonOutput-CzIGPEZQ.js";import{a as He,n as Ue,o as We,p as Ge,t as Ke}from"./download-DMxOzI7b.js";import{t as qe}from"./tooltip-BUtPzKB4.js";import{r as Je,t as Ye}from"./button-Dh8EwhsF.js";import{st as Xe}from"./dist-BtC9ym6k.js";import{p as Ze}from"./arrays-BqUx5USx.js";import{i as Qe,t as $e}from"./strings-CReV1AYG.js";import{r as et,t as tt}from"./requests-C6_IaFh7.js";import{t as nt}from"./createLucideIcon-B7HeEoG2.js";import{t as rt}from"./useLifecycle-BUaJcygz.js";import{t as it}from"./check-BoA6XBpj.js";import{r as at}from"./useNumberFormatter-DHJ9s6Vk.js";import{t as ot}from"./chevron-right-CKA5zVsM.js";import{o as st,s as ct}from"./tree-actions-CG5g7aUQ.js";import{f as lt,n as ut,r as dt}from"./markdown-renderer-BZKlbm2Q.js";import{u as ft}from"./toDate-hGYJX0Ha.js";import{t as pt}from"./code-xml-B7x62Eeh.js";import{t as mt}from"./code-CF0HKE9K.js";import{t as ht}from"./eye-off-CFuPxa9F.js";import{t as gt}from"./ellipsis-Dfik_tuW.js";import{t as _t}from"./image-ab13yGv4.js";import{n as vt}from"./spinner-Ck-Hgfvj.js";import{i as yt,t as bt}from"./useDeleteCell-Bz49_cFj.js";import{t as xt}from"./plus-C4J9gIE1.js";import{$ as St,Bt as Ct,M as wt,Mt as Tt,N as Et,ct as Dt,et as Ot,it as kt,jt as At,o as jt,r as Mt,x as Nt}from"./input-DEbY281O.js";import{n as Pt}from"./MarimoErrorOutput-DqpoYOvw.js";import{t as Ft}from"./trash-2-D_HX-0qx.js";import{t as It}from"./trash-DS1-SuM0.js";import{t as Lt}from"./preload-helper-HclGiUj8.js";import{s as Rt}from"./session-Sz5nSFku.js";import{t as zt}from"./SelectionIndicator-DPl6HPLh.js";import{t as Bt}from"./copy-icon-z8fuTE3w.js";import{t as Vt}from"./react-icons.esm-hr79-MCS.js";import{t as Ht}from"./prop-types-Djf4O40e.js";import{t as Ut}from"./esm-BHMOvJzM.js";import{t as Wt}from"./kbd-Cwh96ZBE.js";import{n as Gt,r as Kt,t as qt}from"./alert-dmKwNsrp.js";import{t as Jt}from"./floating-outline-DaUHnl_e.js";import{t as Yt}from"./process-output-Ck7-P_xp.js";import{r as Xt,t as Zt}from"./name-cell-input-BMCdK-el.js";import{t as Qt}from"./esm-DmqQGMel.js";import{t as $t}from"./readonly-code-display--S2daDa6.js";var en=nt(`align-end-vertical`,[[`rect`,{width:`16`,height:`6`,x:`2`,y:`4`,rx:`2`,key:`10wcwx`}],[`rect`,{width:`9`,height:`6`,x:`9`,y:`14`,rx:`2`,key:`4p5bwg`}],[`path`,{d:`M22 22V2`,key:`12ipfv`}]]),tn=nt(`align-horizontal-space-around`,[[`rect`,{width:`6`,height:`10`,x:`9`,y:`7`,rx:`2`,key:`yn7j0q`}],[`path`,{d:`M4 22V2`,key:`tsjzd3`}],[`path`,{d:`M20 22V2`,key:`1bnhr8`}]]),nn=nt(`align-start-vertical`,[[`rect`,{width:`9`,height:`6`,x:`6`,y:`14`,rx:`2`,key:`lpm2y7`}],[`rect`,{width:`16`,height:`6`,x:`6`,y:`4`,rx:`2`,key:`rdj6ps`}],[`path`,{d:`M2 2v20`,key:`1ivd8o`}]]),rn=nt(`cookie`,[[`path`,{d:`M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5`,key:`laymnq`}],[`path`,{d:`M8.5 8.5v.01`,key:`ue8clq`}],[`path`,{d:`M16 15.5v.01`,key:`14dtrp`}],[`path`,{d:`M12 12v.01`,key:`u5ubse`}],[`path`,{d:`M11 17v.01`,key:`1hyl5a`}],[`path`,{d:`M7 14v.01`,key:`uct60s`}]]),an=nt(`folder-down`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`m15 13-3 3-3-3`,key:`6j2sf0`}]]),on=nt(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),sn=nt(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),cn=nt(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),ln=nt(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),un=nt(`rows-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}]]),dn=nt(`scroll`,[[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),fn=nt(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]);function pn(e,t,n){let{isSelected:r}=t,{isPressed:i,buttonProps:a}=Nt({...e,onPress:Ct(t.toggle,e.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:e.isDisabled||!1,buttonProps:Tt(a,{"aria-pressed":r})}}function mn(e,t,n){let r={isSelected:t.selectedKeys.has(e.id),defaultSelected:!1,setSelected(n){t.setSelected(e.id,n)},toggle(){t.toggleKey(e.id)}},{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}=pn({...e,id:void 0,isDisabled:e.isDisabled||t.isDisabled},r,n);return t.selectionMode===`single`&&(s.role=`radio`,s[`aria-checked`]=r.isSelected,delete s[`aria-pressed`]),{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}}var J=e(u(),1);function hn(e={}){let{isReadOnly:t}=e,[n,r]=Dt(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=(0,J.useState)(n);function a(e){t||r(e)}function o(){t||r(!n)}return{isSelected:n,defaultSelected:e.defaultSelected??i,setSelected:a,toggle:o}}var gn=(0,J.createContext)(null),_n=(0,J.createContext)({}),vn=(0,J.forwardRef)(function(e,t){[e,t]=St(e,t,_n);let n=(0,J.useContext)(gn),r=hn(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(t){n.setSelected(e.id,t)}}:e),{buttonProps:i,isPressed:a,isSelected:o,isDisabled:s}=n&&e.id!=null?mn({...e,id:e.id},n,t):pn({...e,id:e.id==null?void 0:String(e.id)},r,t),{focusProps:c,isFocused:l,isFocusVisible:u}=wt(e),{hoverProps:d,isHovered:f}=Et({...e,isDisabled:s}),p=Ot({...e,id:void 0,values:{isHovered:f,isPressed:a,isFocused:l,isSelected:r.isSelected,isFocusVisible:u,isDisabled:s,state:r},defaultClassName:`react-aria-ToggleButton`}),m=At(e,{global:!0});return delete m.id,delete m.onClick,J.createElement(kt.button,{...Tt(m,p,i,c,d),ref:t,slot:e.slot||void 0,"data-focused":l||void 0,"data-disabled":s||void 0,"data-pressed":a||void 0,"data-selected":o||void 0,"data-hovered":f||void 0,"data-focus-visible":u||void 0},J.createElement(zt.Provider,{value:{isSelected:o}},p.children))}),yn=i(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),bn=i(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r)}return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}t.exports=r,t.exports.clsx=r})),xn=i(((e,t)=>{t.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}})),Sn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bottom=l,e.childrenEqual=h,e.cloneLayout=d,e.cloneLayoutItem=m,e.collides=_,e.compact=v,e.compactItem=x,e.compactType=re,e.correctBounds=S,e.fastPositionEqual=g,e.fastRGLPropsEqual=void 0,e.getAllCollisions=T,e.getFirstCollision=w,e.getLayoutItem=C,e.getStatics=E,e.modifyLayout=f,e.moveElement=D,e.moveElementAwayFromCollision=O,e.noop=void 0,e.perc=k,e.resizeItemInDirection=ee,e.setTopLeft=te,e.setTransform=z,e.sortLayoutItems=B,e.sortLayoutItemsByColRow=V,e.sortLayoutItemsByRowCol=ne,e.synchronizeLayoutWithChildren=H,e.validateLayout=U,e.withLayoutItem=p;var t=yn(),n=r(u());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?i(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=c(e,`string`);return typeof t==`symbol`?t:t+``}function c(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function l(e){let t=0,n;for(let r=0,i=e.length;r<i;r++)n=e[r].y+e[r].h,n>t&&(t=n);return t}function d(e){let t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=m(e[n]);return t}function f(e,t){let n=Array(e.length);for(let r=0,i=e.length;r<i;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function p(e,t,n){let r=C(e,t);return r?(r=n(m(r)),e=f(e,r),[e,r]):[e,null]}function m(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function h(e,r){return(0,t.deepEqual)(n.default.Children.map(e,e=>e?.key),n.default.Children.map(r,e=>e?.key))&&(0,t.deepEqual)(n.default.Children.map(e,e=>e?.props[`data-grid`]),n.default.Children.map(r,e=>e?.props[`data-grid`]))}e.fastRGLPropsEqual=xn();function g(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function _(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function v(e,t,n,r){let i=E(e),a=l(i),o=B(e,t),s=Array(e.length);for(let c=0,l=o.length;c<l;c++){let l=m(o[c]);l.static||(l=x(i,l,t,n,o,r,a),a=Math.max(a,l.y+l.h),i.push(l)),s[e.indexOf(o[c])]=l,l.moved=!1}return s}var y={x:`w`,y:`h`};function b(e,t,n,r){let i=y[r];t[r]+=1;let a=e.map(e=>e.i).indexOf(t.i);for(let o=a+1;o<e.length;o++){let a=e[o];if(!a.static){if(a.y>t.y+t.h)break;_(t,a)&&b(e,a,n+t[i],r)}}t[r]=n}function x(e,t,n,r,i,a,o){let s=n===`vertical`,c=n===`horizontal`;if(s)for(t.y=Math.min(typeof o==`number`?o:l(e),t.y);t.y>0&&!w(e,t);)t.y--;else if(c)for(;t.x>0&&!w(e,t);)t.x--;let u;for(;(u=w(e,t))&&!(n===null&&a);)if(c?b(i,t,u.x+u.w,`x`):b(i,t,u.y+u.h,`y`),c&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!w(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function S(e,t){let n=E(e);for(let r=0,i=e.length;r<i;r++){let i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;w(n,i);)i.y++}return e}function C(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function w(e,t){for(let n=0,r=e.length;n<r;n++)if(_(e[n],t))return e[n]}function T(e,t){return e.filter(e=>_(e,t))}function E(e){return e.filter(e=>e.static)}function D(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;`${t.i}${String(n)}${String(r)}${t.x}${t.y}`;let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let f=B(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(f=f.reverse());let p=T(f,t),m=p.length>0;if(m&&c)return d(e);if(m&&a)return`${t.i}`,t.x=l,t.y=u,t.moved=!1,e;for(let n=0,r=p.length;n<r;n++){let r=p[n];`${t.i}${t.x}${t.y}${r.i}${r.x}${r.y}`,!r.moved&&(e=r.static?O(e,r,t,i,o,s):O(e,t,r,i,o,s))}return e}function O(e,t,n,r,i,a){let o=i===`horizontal`,s=i===`vertical`,c=t.static;if(r){r=!1;let l={x:o?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:`-1`},u=w(e,l),d=u&&u.y+u.h>t.y,f=u&&t.x+t.w>u.x;if(!u)return`${n.i}${l.x}${l.y}`,D(e,n,o?l.x:void 0,s?l.y:void 0,r,c,i,a);if(d&&s)return D(e,n,void 0,n.y+1,r,c,i,a);if(d&&i==null)return t.y=n.y,n.y+=n.h,e;if(f&&o)return D(e,t,n.x,void 0,r,c,i,a)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l==null&&u==null?e:D(e,n,o?n.x+1:void 0,s?n.y+1:void 0,r,c,i,a)}function k(e){return e*100+`%`}var A=(e,t,n,r)=>e+n>r?t:n,j=(e,t,n)=>e<0?t:n,M=e=>Math.max(0,e),N=e=>Math.max(0,e),P=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:j(o,e.height,i),top:N(o)}},F=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:A(e.left,e.width,o,n),left:M(i)}},I=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left-(a-e.width);return{height:i,width:o<0?e.width:A(e.left,e.width,a,n),top:N(r),left:M(o)}},L=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:j(r,e.height,a),top:N(r)}},R={n:P,ne:function(){return P(arguments.length<=0?void 0:arguments[0],F(...arguments),arguments.length<=2?void 0:arguments[2])},e:F,se:function(){return L(arguments.length<=0?void 0:arguments[0],F(...arguments),arguments.length<=2?void 0:arguments[2])},s:L,sw:function(){return L(arguments.length<=0?void 0:arguments[0],I(...arguments),arguments.length<=2?void 0:arguments[2])},w:I,nw:function(){return P(arguments.length<=0?void 0:arguments[0],I(...arguments),arguments.length<=2?void 0:arguments[2])}};function ee(e,t,n,r){let i=R[e];return i?i(t,a(a({},t),n),r):n}function z(e){let{top:t,left:n,width:r,height:i}=e,a=`translate(${n}px,${t}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${r}px`,height:`${i}px`,position:`absolute`}}function te(e){let{top:t,left:n,width:r,height:i}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${i}px`,position:`absolute`}}function B(e,t){return t===`horizontal`?V(e):t===`vertical`?ne(e):e}function ne(e){return e.slice(0).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function V(e){return e.slice(0).sort(function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1})}function H(e,t,r,i,o){e||=[];let s=[];n.default.Children.forEach(t,t=>{if(t?.key==null)return;let n=C(e,String(t.key)),r=t.props[`data-grid`];n&&r==null?s.push(m(n)):r?s.push(m(a(a({},r),{},{i:t.key}))):s.push(m({w:1,h:1,x:0,y:l(s),i:String(t.key)}))});let c=S(s,{cols:r});return o?c:v(c,i,r)}function U(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`Layout`,n=[`x`,`y`,`w`,`h`];if(!Array.isArray(e))throw Error(t+` must be an array!`);for(let r=0,i=e.length;r<i;r++){let i=e[r];for(let e=0;e<n.length;e++){let a=n[e],o=i[a];if(typeof o!=`number`||Number.isNaN(o))throw Error(`ReactGridLayout: ${t}[${r}].${a} must be a number! Received: ${o} (${typeof o})`)}if(i.i!==void 0&&typeof i.i!=`string`)throw Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${i.i} (${typeof i.i})`)}}function re(e){let{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}e.noop=()=>{}})),Cn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.calcGridColWidth=t,e.calcGridItemPosition=r,e.calcGridItemWHPx=n,e.calcWH=a,e.calcXY=i,e.clamp=o;function t(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function n(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function r(e,r,i,a,o,s){let{margin:c,containerPadding:l,rowHeight:u}=e,d=t(e),f={};return s&&s.resizing?(f.width=Math.round(s.resizing.width),f.height=Math.round(s.resizing.height)):(f.width=n(a,d,c[0]),f.height=n(o,u,c[1])),s&&s.dragging?(f.top=Math.round(s.dragging.top),f.left=Math.round(s.dragging.left)):s&&s.resizing&&typeof s.resizing.top==`number`&&typeof s.resizing.left==`number`?(f.top=Math.round(s.resizing.top),f.left=Math.round(s.resizing.left)):(f.top=Math.round((u+c[1])*i+l[1]),f.left=Math.round((d+c[0])*r+l[0])),f}function i(e,n,r,i,a){let{margin:s,containerPadding:c,cols:l,rowHeight:u,maxRows:d}=e,f=t(e),p=Math.round((r-c[0])/(f+s[0])),m=Math.round((n-c[1])/(u+s[1]));return p=o(p,0,l-i),m=o(m,0,d-a),{x:p,y:m}}function a(e,n,r,i,a,s){let{margin:c,maxRows:l,cols:u,rowHeight:d}=e,f=t(e),p=Math.round((n+c[0])/(f+c[0])),m=Math.round((r+c[1])/(d+c[1])),h=o(p,0,u-i),g=o(m,0,l-a);return[`sw`,`w`,`nw`].indexOf(s)!==-1&&(h=o(p,0,u)),[`nw`,`n`,`ne`].indexOf(s)!==-1&&(g=o(m,0,l)),{w:h,h:g}}function o(e,t,n){return Math.max(Math.min(e,n),t)}})),wn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dontSetMe=a,e.findInArray=t,e.int=i,e.isFunction=n,e.isNum=r;function t(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function n(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function r(e){return typeof e==`number`&&!isNaN(e)}function i(e){return parseInt(e,10)}function a(e,t,n){if(e[t])return Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}})),Tn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.browserPrefixToKey=r,e.browserPrefixToStyle=i,e.default=void 0,e.getPrefix=n;var t=[`Moz`,`Webkit`,`O`,`ms`];function n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`transform`;if(typeof window>`u`)return``;let n=window.document?.documentElement?.style;if(!n||e in n)return``;for(let i=0;i<t.length;i++)if(r(e,t[i])in n)return t[i];return``}function r(e,t){return t?`${t}${a(e)}`:e}function i(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function a(e){let t=``,n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]===`-`?n=!0:t+=e[r];return t}e.default=n()})),En=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addClassName=S,e.addEvent=s,e.addUserSelectStyles=y,e.createCSSTransform=m,e.createSVGTransform=h,e.getTouch=_,e.getTouchIdentifier=v,e.getTranslation=g,e.innerHeight=d,e.innerWidth=f,e.matchesSelector=a,e.matchesSelectorAndParentsTo=o,e.offsetXYFromParent=p,e.outerHeight=l,e.outerWidth=u,e.removeClassName=C,e.removeEvent=c,e.scheduleRemoveUserSelectStyles=b;var t=wn(),n=r(Tn());function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}var i=``;function a(e,n){return i||=(0,t.findInArray)([`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`],function(n){return(0,t.isFunction)(e[n])}),(0,t.isFunction)(e[i])?e[i](n):!1}function o(e,t,n){let r=e;do{if(a(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function s(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent(`on`+t,n):e[`on`+t]=n}function c(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent(`on`+t,n):e[`on`+t]=null}function l(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderTopWidth),n+=(0,t.int)(r.borderBottomWidth),n}function u(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderLeftWidth),n+=(0,t.int)(r.borderRightWidth),n}function d(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingTop),n-=(0,t.int)(r.paddingBottom),n}function f(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingLeft),n-=(0,t.int)(r.paddingRight),n}function p(e,t,n){let r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}function m(e,t){let r=g(e,t,`px`);return{[(0,n.browserPrefixToKey)(`transform`,n.default)]:r}}function h(e,t){return g(e,t,``)}function g(e,t,n){let{x:r,y:i}=e,a=`translate(${r}${n},${i}${n})`;return t&&(a=`translate(${`${typeof t.x==`string`?t.x:t.x+n}`}, ${`${typeof t.y==`string`?t.y:t.y+n}`})`+a),a}function _(e,n){return e.targetTouches&&(0,t.findInArray)(e.targetTouches,e=>n===e.identifier)||e.changedTouches&&(0,t.findInArray)(e.changedTouches,e=>n===e.identifier)}function v(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function y(e){if(!e)return;let t=e.getElementById(`react-draggable-style-el`);t||(t=e.createElement(`style`),t.type=`text/css`,t.id=`react-draggable-style-el`,t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./reveal-component-D9DygPds.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-xfs0Sn4r.js","./react-CBDbhulC.js","./compiler-runtime-CYIjoINj.js","./cells-BBhW3FXj.js","./react-dom-BQrReHnR.js","./schemas-aTUejmFi.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./utils-D5Ywm7-q.js","./_baseMerge-DLqSVasz.js","./isArrayLikeObject-DnwgSs_Z.js","./_initCloneObject-CM3WilQg.js","./useEventListener-92uWqz-P.js","./objects-snlMn4yk.js","./jsx-runtime-B74pBk57.js","./invariant-Ci2dTZ72.js","./config-BlNM0caL.js","./constants-BDbGiS7O.js","./Deferred-CrTnjj37.js","./session-Sz5nSFku.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./fullscreen-BH2jz-F4.js","./dist-DzCQtGkt.js","./menu-items-BSRA2YI9.js","./alert-dialog-CA-2mBs3.js","./button-Dh8EwhsF.js","./select-nLt2y0Sw.js","./check-BoA6XBpj.js","./createLucideIcon-B7HeEoG2.js","./useNumberFormatter-DHJ9s6Vk.js","./context-Do8M9TDF.js","./circle-ByJdIf5p.js","./tooltip-BUtPzKB4.js","./dist-BtC9ym6k.js","./dist-CZNULd6Z.js","./arrays-BqUx5USx.js","./once-Haz_uxEL.js","./capabilities-D8kPgMKr.js","./cjs-C49f7GXV.js","./createReducer-B_XmHROl.js","./dist-DiYjQAhI.js","./marked.esm-B_3iMIUq.js","./strings-CReV1AYG.js","./requests-C6_IaFh7.js","./dist-B8pdsUrS.js","./useLifecycle-BUaJcygz.js","./toDate-hGYJX0Ha.js","./database-zap-CloO6gbw.js","./write-secret-modal-D6zoZgLY.js","./input-DEbY281O.js","./numbers-Bc-r3jsC.js","./useDebounce-DgpSQhrP.js","./uuid-k9DpjH68.js","./use-toast-DpWHUGuF.js","./plus-C4J9gIE1.js","./trash-2-D_HX-0qx.js","./badge-BSgtkC2e.js","./preload-helper-HclGiUj8.js","./dist-Cx4BE7jC.js","./dist-B0RXffUm.js","./dist-DkPPv0FB.js","./dist-Dw9YRsCU.js","./dist-CKUpxYGQ.js","./stex-Dc5bKD4z.js","./paths-zcL04qUW.js","./useTheme-C-ri8BtY.js","./useAsyncData-Buhk-UgR.js","./purify.es-DrVcFY1Q.js","./cells-D-c15Ks-.css","./readonly-python-code-CAYyabaV.js","./switch-DjXr9Y9D.js","./errors-DzO-nXy-.js","./copy-BMXKNElG.js","./eye-off-CFuPxa9F.js","./copy-DlEomWzI.js","./esm-BHMOvJzM.js","./extends-CvVTau-c.js","./useAddCell-BR8kYnb6.js","./JsonOutput-D2ZWLZs4.js","./ErrorBoundary-CDVGFYfr.js","./tabs-Cy1qXLzH.js","./dropdown-menu-C40jM9o4.js","./chevron-right-CKA5zVsM.js","./download-BgO9EN-W.js","./html-to-image-D6GUC5q6.js","./LazyAnyLanguageCodeMirror-LboTfNDv.js","./table-CUK1W5bI.js","./tree-actions-mfuAcK1x.js","./refresh-cw-Bf-rx_aV.js","./markdown-renderer-751VNlrQ.js","./chunk-5FQGJX7Z-CRg4xQWg.js","./micromark-factory-space-D9Dr-k4J.js","./markdown-renderer-B7zTpxjS.css","./ellipsis-Dfik_tuW.js","./external-link-Bp3BxyRA.js","./spinner-Ck-Hgfvj.js","./message-circle-BQB1AIAg.js","./MarimoErrorOutput-BlmIJ9WY.js","./config-B-r81uZ6.js","./hat-glasses-C8LSY3HT.js","./package-DPlscLzt.js","./datasource-B3qF2oaW.js","./RenderHTML-DnPB4qpJ.js","./copy-icon-z8fuTE3w.js","./useRunCells-BMQuitYY.js","./useInstallPackage-IUt497GC.js","./kbd-Cwh96ZBE.js","./alert-dmKwNsrp.js","./state-DOrY1Jyf.js","./cell-link-CbHXmrt8.js","./VisuallyHidden-CBMDmozt.js","./useDateFormatter-BiqAQ-zI.js","./dates-B58T85Jq.js","./en-US-yTIMUO13.js","./isValid-nQ3Iam8J.js","./tooltip-BG35uS_N.js","./vega-loader.browser-AQmjV9CX.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-Dm4DaIgg.js","./react-icons.esm-hr79-MCS.js","./emotion-is-prop-valid.esm-nLO-SoUf.js","./useIframeCapabilities-C7Di8f2y.js","./error-banner-Dw5YY9wq.js","./utils-49LGK4zG.js","./formats-C6s96nu2.js","./table-DmqOOjfe.js","./react-resizable-panels.browser.esm-BSRAHC4P.js","./JsonOutput-BQtz7-np.css","./code-CF0HKE9K.js","./cell-editor-C7IiingQ.js","./ai-model-dropdown-CmJEEhSC.js","./get-DjNf4SIX.js","./has-sKqQhP6r.js","./_hasPath-BmRQipI0.js","./triangle-alert-MihykDYG.js","./SelectionIndicator-DPl6HPLh.js","./renderShortcut-X-CJUSM8.js","./azure-Dcn397wY.js","./card-dYXwy2mo.js","./circle-check-CUWv70QX.js","./add-cell-with-ai-OQ4sSXg4.js","./fileToBase64-NhpNrK5l.js","./semaphore-BjoL5P0h.js","./file-DF8n85RA.js","./image-ab13yGv4.js","./useDeleteCell-DwaN6KAw.js","./blob-BrVH7IJp.js","./icons-CjLa9BiH.js","./process-output-CPUOlFhp.js","./error-entries-BFzSRy80.js","./file-icons-BhotQqrU.js","./file-headphone-rFCxFRI8.js","./components-DUYCXngU.js","./globe-BQf75qV_.js","./github-YRgb6LMu.js","./save-BybsbOKz.js","./dist-wY2yia-1.js","./requests-S_7PqcSt.js","./formatting-BWZH2nBg.js","./useSplitCell-B7AvHoya.js","./panel-accordion-state-Dl0VcB79.js","./loro_wasm_bg-BRA1AbB3.js","./ws-DLVysDhS.js","./Inputs-E85rt2lh.js","./Inputs-C4Oo7q-H.css","./skeleton-CM7HxSva.js","./useInterval-B4v7_zd0.js","./cell-editor-_cVIHMNI.css","./RunButton-C7TxE07w.js","./square-B58Ib8Ir.js","./CellStatus-0QNZS4By.js","./ban-CwXfMsC1.js","./workflow-SJ9KZapt.js","./multi-icon-COhkNiC1.js","./multi-icon-CW3_9bja.css","./CellStatus-2Psjnl5F.css","./readonly-code-display-DP7DxRA1.js","./reveal-component-CsWKDLzV.css","./slides-BQsAdh8K.css"])))=>i.map(i=>d[i]);
2
+ import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-B0Z9INg1.js";import{c as a,f as o,l as s,r as c,t as l}from"./useEvent-xfs0Sn4r.js";import{t as u}from"./react-CBDbhulC.js";import{D as d,Fo as f,Ga as p,Gn as m,M as h,Qi as g,Ua as _,Wa as v,Zi as y,ai as b,dn as x,fn as S,h as C,lt as w,sr as T,st as E,ut as D,w as O,wo as k}from"./cells-BBhW3FXj.js";import{t as A}from"./react-dom-BQrReHnR.js";import{In as j,Sn as M,Tt as N,Wn as P,kt as F,un as I,vt as L,wt as R}from"./schemas-aTUejmFi.js";import{t as ee}from"./compiler-runtime-CYIjoINj.js";import{t as z,w as te}from"./utils-D5Ywm7-q.js";import{g as B}from"./useEventListener-92uWqz-P.js";import{t as ne}from"./objects-snlMn4yk.js";import{t as V}from"./invariant-Ci2dTZ72.js";import{r as H,t as U}from"./constants-BDbGiS7O.js";import{M as re,N as ie,O as W,T as G,l as K,v as ae}from"./config-BlNM0caL.js";import{o as oe,t as se}from"./switch-DjXr9Y9D.js";import{_ as ce,a as le,f as ue,l as de,s as fe,t as pe,u as me}from"./readonly-python-code-CAYyabaV.js";import{t as he}from"./ErrorBoundary-CDVGFYfr.js";import{t as q}from"./cn-ldLVeaqm.js";import{t as ge}from"./jsx-runtime-B74pBk57.js";import{i as _e,n as ve,r as ye,t as be}from"./tabs-Cy1qXLzH.js";import{c as xe,d as Se,i as Ce,n as we,s as Te,t as Ee}from"./select-nLt2y0Sw.js";import{a as De,c as Oe,p as ke,r as Ae,t as je}from"./dropdown-menu-C40jM9o4.js";import{A as Me,D as Ne,Nt as Pe,O as Fe,Pt as Ie,T as Le,bt as Re,k as ze,n as Be,r as Ve}from"./JsonOutput-D2ZWLZs4.js";import{a as He,n as Ue,o as We,p as Ge,t as Ke}from"./download-BgO9EN-W.js";import{t as qe}from"./tooltip-BUtPzKB4.js";import{r as Je,t as Ye}from"./button-Dh8EwhsF.js";import{st as Xe}from"./dist-BtC9ym6k.js";import{p as Ze}from"./arrays-BqUx5USx.js";import{i as Qe,t as $e}from"./strings-CReV1AYG.js";import{r as et,t as tt}from"./requests-C6_IaFh7.js";import{t as nt}from"./createLucideIcon-B7HeEoG2.js";import{t as rt}from"./useLifecycle-BUaJcygz.js";import{t as it}from"./check-BoA6XBpj.js";import{r as at}from"./useNumberFormatter-DHJ9s6Vk.js";import{t as ot}from"./chevron-right-CKA5zVsM.js";import{o as st,s as ct}from"./tree-actions-mfuAcK1x.js";import{f as lt,n as ut,r as dt}from"./markdown-renderer-751VNlrQ.js";import{u as ft}from"./toDate-hGYJX0Ha.js";import{t as pt}from"./code-xml-B7x62Eeh.js";import{t as mt}from"./code-CF0HKE9K.js";import{t as ht}from"./eye-off-CFuPxa9F.js";import{t as gt}from"./ellipsis-Dfik_tuW.js";import{t as _t}from"./image-ab13yGv4.js";import{n as vt}from"./spinner-Ck-Hgfvj.js";import{i as yt,t as bt}from"./useDeleteCell-DwaN6KAw.js";import{t as xt}from"./plus-C4J9gIE1.js";import{$ as St,Bt as Ct,M as wt,Mt as Tt,N as Et,ct as Dt,et as Ot,it as kt,jt as At,o as jt,r as Mt,x as Nt}from"./input-DEbY281O.js";import{n as Pt}from"./MarimoErrorOutput-BlmIJ9WY.js";import{t as Ft}from"./trash-2-D_HX-0qx.js";import{t as It}from"./trash-DS1-SuM0.js";import{t as Lt}from"./preload-helper-HclGiUj8.js";import{s as Rt}from"./session-Sz5nSFku.js";import{t as zt}from"./SelectionIndicator-DPl6HPLh.js";import{t as Bt}from"./copy-icon-z8fuTE3w.js";import{t as Vt}from"./react-icons.esm-hr79-MCS.js";import{t as Ht}from"./prop-types-Djf4O40e.js";import{t as Ut}from"./esm-BHMOvJzM.js";import{t as Wt}from"./kbd-Cwh96ZBE.js";import{n as Gt,r as Kt,t as qt}from"./alert-dmKwNsrp.js";import{t as Jt}from"./floating-outline-Cmk3XDJi.js";import{t as Yt}from"./process-output-CPUOlFhp.js";import{r as Xt,t as Zt}from"./name-cell-input-DexJ7ZIH.js";import{t as Qt}from"./esm-DmqQGMel.js";import{t as $t}from"./readonly-code-display-DP7DxRA1.js";var en=nt(`align-end-vertical`,[[`rect`,{width:`16`,height:`6`,x:`2`,y:`4`,rx:`2`,key:`10wcwx`}],[`rect`,{width:`9`,height:`6`,x:`9`,y:`14`,rx:`2`,key:`4p5bwg`}],[`path`,{d:`M22 22V2`,key:`12ipfv`}]]),tn=nt(`align-horizontal-space-around`,[[`rect`,{width:`6`,height:`10`,x:`9`,y:`7`,rx:`2`,key:`yn7j0q`}],[`path`,{d:`M4 22V2`,key:`tsjzd3`}],[`path`,{d:`M20 22V2`,key:`1bnhr8`}]]),nn=nt(`align-start-vertical`,[[`rect`,{width:`9`,height:`6`,x:`6`,y:`14`,rx:`2`,key:`lpm2y7`}],[`rect`,{width:`16`,height:`6`,x:`6`,y:`4`,rx:`2`,key:`rdj6ps`}],[`path`,{d:`M2 2v20`,key:`1ivd8o`}]]),rn=nt(`cookie`,[[`path`,{d:`M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5`,key:`laymnq`}],[`path`,{d:`M8.5 8.5v.01`,key:`ue8clq`}],[`path`,{d:`M16 15.5v.01`,key:`14dtrp`}],[`path`,{d:`M12 12v.01`,key:`u5ubse`}],[`path`,{d:`M11 17v.01`,key:`1hyl5a`}],[`path`,{d:`M7 14v.01`,key:`uct60s`}]]),an=nt(`folder-down`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`m15 13-3 3-3-3`,key:`6j2sf0`}]]),on=nt(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),sn=nt(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),cn=nt(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),ln=nt(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),un=nt(`rows-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}]]),dn=nt(`scroll`,[[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),fn=nt(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]);function pn(e,t,n){let{isSelected:r}=t,{isPressed:i,buttonProps:a}=Nt({...e,onPress:Ct(t.toggle,e.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:e.isDisabled||!1,buttonProps:Tt(a,{"aria-pressed":r})}}function mn(e,t,n){let r={isSelected:t.selectedKeys.has(e.id),defaultSelected:!1,setSelected(n){t.setSelected(e.id,n)},toggle(){t.toggleKey(e.id)}},{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}=pn({...e,id:void 0,isDisabled:e.isDisabled||t.isDisabled},r,n);return t.selectionMode===`single`&&(s.role=`radio`,s[`aria-checked`]=r.isSelected,delete s[`aria-pressed`]),{isPressed:i,isSelected:a,isDisabled:o,buttonProps:s}}var J=e(u(),1);function hn(e={}){let{isReadOnly:t}=e,[n,r]=Dt(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=(0,J.useState)(n);function a(e){t||r(e)}function o(){t||r(!n)}return{isSelected:n,defaultSelected:e.defaultSelected??i,setSelected:a,toggle:o}}var gn=(0,J.createContext)(null),_n=(0,J.createContext)({}),vn=(0,J.forwardRef)(function(e,t){[e,t]=St(e,t,_n);let n=(0,J.useContext)(gn),r=hn(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(t){n.setSelected(e.id,t)}}:e),{buttonProps:i,isPressed:a,isSelected:o,isDisabled:s}=n&&e.id!=null?mn({...e,id:e.id},n,t):pn({...e,id:e.id==null?void 0:String(e.id)},r,t),{focusProps:c,isFocused:l,isFocusVisible:u}=wt(e),{hoverProps:d,isHovered:f}=Et({...e,isDisabled:s}),p=Ot({...e,id:void 0,values:{isHovered:f,isPressed:a,isFocused:l,isSelected:r.isSelected,isFocusVisible:u,isDisabled:s,state:r},defaultClassName:`react-aria-ToggleButton`}),m=At(e,{global:!0});return delete m.id,delete m.onClick,J.createElement(kt.button,{...Tt(m,p,i,c,d),ref:t,slot:e.slot||void 0,"data-focused":l||void 0,"data-disabled":s||void 0,"data-pressed":a||void 0,"data-selected":o||void 0,"data-hovered":f||void 0,"data-focus-visible":u||void 0},J.createElement(zt.Provider,{value:{isSelected:o}},p.children))}),yn=i(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),bn=i(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r)}return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}t.exports=r,t.exports.clsx=r})),xn=i(((e,t)=>{t.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}})),Sn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bottom=l,e.childrenEqual=h,e.cloneLayout=d,e.cloneLayoutItem=m,e.collides=_,e.compact=v,e.compactItem=x,e.compactType=re,e.correctBounds=S,e.fastPositionEqual=g,e.fastRGLPropsEqual=void 0,e.getAllCollisions=T,e.getFirstCollision=w,e.getLayoutItem=C,e.getStatics=E,e.modifyLayout=f,e.moveElement=D,e.moveElementAwayFromCollision=O,e.noop=void 0,e.perc=k,e.resizeItemInDirection=ee,e.setTopLeft=te,e.setTransform=z,e.sortLayoutItems=B,e.sortLayoutItemsByColRow=V,e.sortLayoutItemsByRowCol=ne,e.synchronizeLayoutWithChildren=H,e.validateLayout=U,e.withLayoutItem=p;var t=yn(),n=r(u());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?i(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=c(e,`string`);return typeof t==`symbol`?t:t+``}function c(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function l(e){let t=0,n;for(let r=0,i=e.length;r<i;r++)n=e[r].y+e[r].h,n>t&&(t=n);return t}function d(e){let t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=m(e[n]);return t}function f(e,t){let n=Array(e.length);for(let r=0,i=e.length;r<i;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function p(e,t,n){let r=C(e,t);return r?(r=n(m(r)),e=f(e,r),[e,r]):[e,null]}function m(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function h(e,r){return(0,t.deepEqual)(n.default.Children.map(e,e=>e?.key),n.default.Children.map(r,e=>e?.key))&&(0,t.deepEqual)(n.default.Children.map(e,e=>e?.props[`data-grid`]),n.default.Children.map(r,e=>e?.props[`data-grid`]))}e.fastRGLPropsEqual=xn();function g(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function _(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function v(e,t,n,r){let i=E(e),a=l(i),o=B(e,t),s=Array(e.length);for(let c=0,l=o.length;c<l;c++){let l=m(o[c]);l.static||(l=x(i,l,t,n,o,r,a),a=Math.max(a,l.y+l.h),i.push(l)),s[e.indexOf(o[c])]=l,l.moved=!1}return s}var y={x:`w`,y:`h`};function b(e,t,n,r){let i=y[r];t[r]+=1;let a=e.map(e=>e.i).indexOf(t.i);for(let o=a+1;o<e.length;o++){let a=e[o];if(!a.static){if(a.y>t.y+t.h)break;_(t,a)&&b(e,a,n+t[i],r)}}t[r]=n}function x(e,t,n,r,i,a,o){let s=n===`vertical`,c=n===`horizontal`;if(s)for(t.y=Math.min(typeof o==`number`?o:l(e),t.y);t.y>0&&!w(e,t);)t.y--;else if(c)for(;t.x>0&&!w(e,t);)t.x--;let u;for(;(u=w(e,t))&&!(n===null&&a);)if(c?b(i,t,u.x+u.w,`x`):b(i,t,u.y+u.h,`y`),c&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!w(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function S(e,t){let n=E(e);for(let r=0,i=e.length;r<i;r++){let i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;w(n,i);)i.y++}return e}function C(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function w(e,t){for(let n=0,r=e.length;n<r;n++)if(_(e[n],t))return e[n]}function T(e,t){return e.filter(e=>_(e,t))}function E(e){return e.filter(e=>e.static)}function D(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;`${t.i}${String(n)}${String(r)}${t.x}${t.y}`;let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let f=B(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(f=f.reverse());let p=T(f,t),m=p.length>0;if(m&&c)return d(e);if(m&&a)return`${t.i}`,t.x=l,t.y=u,t.moved=!1,e;for(let n=0,r=p.length;n<r;n++){let r=p[n];`${t.i}${t.x}${t.y}${r.i}${r.x}${r.y}`,!r.moved&&(e=r.static?O(e,r,t,i,o,s):O(e,t,r,i,o,s))}return e}function O(e,t,n,r,i,a){let o=i===`horizontal`,s=i===`vertical`,c=t.static;if(r){r=!1;let l={x:o?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:`-1`},u=w(e,l),d=u&&u.y+u.h>t.y,f=u&&t.x+t.w>u.x;if(!u)return`${n.i}${l.x}${l.y}`,D(e,n,o?l.x:void 0,s?l.y:void 0,r,c,i,a);if(d&&s)return D(e,n,void 0,n.y+1,r,c,i,a);if(d&&i==null)return t.y=n.y,n.y+=n.h,e;if(f&&o)return D(e,t,n.x,void 0,r,c,i,a)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l==null&&u==null?e:D(e,n,o?n.x+1:void 0,s?n.y+1:void 0,r,c,i,a)}function k(e){return e*100+`%`}var A=(e,t,n,r)=>e+n>r?t:n,j=(e,t,n)=>e<0?t:n,M=e=>Math.max(0,e),N=e=>Math.max(0,e),P=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:j(o,e.height,i),top:N(o)}},F=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:A(e.left,e.width,o,n),left:M(i)}},I=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left-(a-e.width);return{height:i,width:o<0?e.width:A(e.left,e.width,a,n),top:N(r),left:M(o)}},L=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:j(r,e.height,a),top:N(r)}},R={n:P,ne:function(){return P(arguments.length<=0?void 0:arguments[0],F(...arguments),arguments.length<=2?void 0:arguments[2])},e:F,se:function(){return L(arguments.length<=0?void 0:arguments[0],F(...arguments),arguments.length<=2?void 0:arguments[2])},s:L,sw:function(){return L(arguments.length<=0?void 0:arguments[0],I(...arguments),arguments.length<=2?void 0:arguments[2])},w:I,nw:function(){return P(arguments.length<=0?void 0:arguments[0],I(...arguments),arguments.length<=2?void 0:arguments[2])}};function ee(e,t,n,r){let i=R[e];return i?i(t,a(a({},t),n),r):n}function z(e){let{top:t,left:n,width:r,height:i}=e,a=`translate(${n}px,${t}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${r}px`,height:`${i}px`,position:`absolute`}}function te(e){let{top:t,left:n,width:r,height:i}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${i}px`,position:`absolute`}}function B(e,t){return t===`horizontal`?V(e):t===`vertical`?ne(e):e}function ne(e){return e.slice(0).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function V(e){return e.slice(0).sort(function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1})}function H(e,t,r,i,o){e||=[];let s=[];n.default.Children.forEach(t,t=>{if(t?.key==null)return;let n=C(e,String(t.key)),r=t.props[`data-grid`];n&&r==null?s.push(m(n)):r?s.push(m(a(a({},r),{},{i:t.key}))):s.push(m({w:1,h:1,x:0,y:l(s),i:String(t.key)}))});let c=S(s,{cols:r});return o?c:v(c,i,r)}function U(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`Layout`,n=[`x`,`y`,`w`,`h`];if(!Array.isArray(e))throw Error(t+` must be an array!`);for(let r=0,i=e.length;r<i;r++){let i=e[r];for(let e=0;e<n.length;e++){let a=n[e],o=i[a];if(typeof o!=`number`||Number.isNaN(o))throw Error(`ReactGridLayout: ${t}[${r}].${a} must be a number! Received: ${o} (${typeof o})`)}if(i.i!==void 0&&typeof i.i!=`string`)throw Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${i.i} (${typeof i.i})`)}}function re(e){let{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}e.noop=()=>{}})),Cn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.calcGridColWidth=t,e.calcGridItemPosition=r,e.calcGridItemWHPx=n,e.calcWH=a,e.calcXY=i,e.clamp=o;function t(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function n(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function r(e,r,i,a,o,s){let{margin:c,containerPadding:l,rowHeight:u}=e,d=t(e),f={};return s&&s.resizing?(f.width=Math.round(s.resizing.width),f.height=Math.round(s.resizing.height)):(f.width=n(a,d,c[0]),f.height=n(o,u,c[1])),s&&s.dragging?(f.top=Math.round(s.dragging.top),f.left=Math.round(s.dragging.left)):s&&s.resizing&&typeof s.resizing.top==`number`&&typeof s.resizing.left==`number`?(f.top=Math.round(s.resizing.top),f.left=Math.round(s.resizing.left)):(f.top=Math.round((u+c[1])*i+l[1]),f.left=Math.round((d+c[0])*r+l[0])),f}function i(e,n,r,i,a){let{margin:s,containerPadding:c,cols:l,rowHeight:u,maxRows:d}=e,f=t(e),p=Math.round((r-c[0])/(f+s[0])),m=Math.round((n-c[1])/(u+s[1]));return p=o(p,0,l-i),m=o(m,0,d-a),{x:p,y:m}}function a(e,n,r,i,a,s){let{margin:c,maxRows:l,cols:u,rowHeight:d}=e,f=t(e),p=Math.round((n+c[0])/(f+c[0])),m=Math.round((r+c[1])/(d+c[1])),h=o(p,0,u-i),g=o(m,0,l-a);return[`sw`,`w`,`nw`].indexOf(s)!==-1&&(h=o(p,0,u)),[`nw`,`n`,`ne`].indexOf(s)!==-1&&(g=o(m,0,l)),{w:h,h:g}}function o(e,t,n){return Math.max(Math.min(e,n),t)}})),wn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dontSetMe=a,e.findInArray=t,e.int=i,e.isFunction=n,e.isNum=r;function t(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function n(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function r(e){return typeof e==`number`&&!isNaN(e)}function i(e){return parseInt(e,10)}function a(e,t,n){if(e[t])return Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}})),Tn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.browserPrefixToKey=r,e.browserPrefixToStyle=i,e.default=void 0,e.getPrefix=n;var t=[`Moz`,`Webkit`,`O`,`ms`];function n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`transform`;if(typeof window>`u`)return``;let n=window.document?.documentElement?.style;if(!n||e in n)return``;for(let i=0;i<t.length;i++)if(r(e,t[i])in n)return t[i];return``}function r(e,t){return t?`${t}${a(e)}`:e}function i(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function a(e){let t=``,n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]===`-`?n=!0:t+=e[r];return t}e.default=n()})),En=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addClassName=S,e.addEvent=s,e.addUserSelectStyles=y,e.createCSSTransform=m,e.createSVGTransform=h,e.getTouch=_,e.getTouchIdentifier=v,e.getTranslation=g,e.innerHeight=d,e.innerWidth=f,e.matchesSelector=a,e.matchesSelectorAndParentsTo=o,e.offsetXYFromParent=p,e.outerHeight=l,e.outerWidth=u,e.removeClassName=C,e.removeEvent=c,e.scheduleRemoveUserSelectStyles=b;var t=wn(),n=r(Tn());function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}var i=``;function a(e,n){return i||=(0,t.findInArray)([`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`],function(n){return(0,t.isFunction)(e[n])}),(0,t.isFunction)(e[i])?e[i](n):!1}function o(e,t,n){let r=e;do{if(a(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function s(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent(`on`+t,n):e[`on`+t]=n}function c(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent(`on`+t,n):e[`on`+t]=null}function l(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderTopWidth),n+=(0,t.int)(r.borderBottomWidth),n}function u(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderLeftWidth),n+=(0,t.int)(r.borderRightWidth),n}function d(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingTop),n-=(0,t.int)(r.paddingBottom),n}function f(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingLeft),n-=(0,t.int)(r.paddingRight),n}function p(e,t,n){let r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}function m(e,t){let r=g(e,t,`px`);return{[(0,n.browserPrefixToKey)(`transform`,n.default)]:r}}function h(e,t){return g(e,t,``)}function g(e,t,n){let{x:r,y:i}=e,a=`translate(${r}${n},${i}${n})`;return t&&(a=`translate(${`${typeof t.x==`string`?t.x:t.x+n}`}, ${`${typeof t.y==`string`?t.y:t.y+n}`})`+a),a}function _(e,n){return e.targetTouches&&(0,t.findInArray)(e.targetTouches,e=>n===e.identifier)||e.changedTouches&&(0,t.findInArray)(e.changedTouches,e=>n===e.identifier)}function v(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function y(e){if(!e)return;let t=e.getElementById(`react-draggable-style-el`);t||(t=e.createElement(`style`),t.type=`text/css`,t.id=`react-draggable-style-el`,t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
3
3
  `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
4
- `,e.getElementsByTagName(`head`)[0].appendChild(t)),e.body&&S(e.body,`react-draggable-transparent-selection`)}function b(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{x(e)}):x(e)}function x(e){if(e)try{if(e.body&&C(e.body,`react-draggable-transparent-selection`),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function S(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function C(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}})),Dn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.canDragX=a,e.canDragY=o,e.createCoreData=c,e.createDraggableData=l,e.getBoundPosition=r,e.getControlPosition=s,e.snapToGrid=i;var t=wn(),n=En();function r(e,r,i){if(!e.props.bounds)return[r,i];let{bounds:a}=e.props;a=typeof a==`string`?a:u(a);let o=d(e);if(typeof a==`string`){let{ownerDocument:e}=o,r=e.defaultView,i;if(i=a===`parent`?o.parentNode:o.getRootNode().querySelector(a),!(i instanceof r.HTMLElement))throw Error(`Bounds selector "`+a+`" could not find an element.`);let s=i,c=r.getComputedStyle(o),l=r.getComputedStyle(s);a={left:-o.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(c.marginLeft),top:-o.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(c.marginTop),right:(0,n.innerWidth)(s)-(0,n.outerWidth)(o)-o.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(c.marginRight),bottom:(0,n.innerHeight)(s)-(0,n.outerHeight)(o)-o.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(c.marginBottom)}}return(0,t.isNum)(a.right)&&(r=Math.min(r,a.right)),(0,t.isNum)(a.bottom)&&(i=Math.min(i,a.bottom)),(0,t.isNum)(a.left)&&(r=Math.max(r,a.left)),(0,t.isNum)(a.top)&&(i=Math.max(i,a.top)),[r,i]}function i(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function a(e){return e.props.axis===`both`||e.props.axis===`x`}function o(e){return e.props.axis===`both`||e.props.axis===`y`}function s(e,t,r){let i=typeof t==`number`?(0,n.getTouch)(e,t):null;if(typeof t==`number`&&!i)return null;let a=d(r),o=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,n.offsetXYFromParent)(i||e,o,r.props.scale)}function c(e,n,r){let i=!(0,t.isNum)(e.lastX),a=d(e);return i?{node:a,deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}:{node:a,deltaX:n-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:n,y:r}}function l(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function u(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function d(e){let t=e.findDOMNode();if(!t)throw Error(`<DraggableCore>: Unmounted during event!`);return t}})),On=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){}})),kn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(u()),n=c(Ht()),r=c(A()),i=En(),a=Dn(),o=wn(),s=c(On());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function d(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,`string`);return typeof t==`symbol`?t:t+``}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var m={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},h=m.mouse,g=class extends t.Component{constructor(){super(...arguments),d(this,`dragging`,!1),d(this,`lastX`,NaN),d(this,`lastY`,NaN),d(this,`touchIdentifier`,null),d(this,`mounted`,!1),d(this,`handleDragStart`,e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button==`number`&&e.button!==0)return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(`<DraggableCore> not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;let o=(0,a.getControlPosition)(e,r,this);if(o==null)return;let{x:c,y:l}=o,u=(0,a.createCoreData)(this,c,l);(0,s.default)(`DraggableCore: handleDragStart: %j`,u),(0,s.default)(`calling`,this.props.onStart),this.props.onStart(e,u)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=c,this.lastY=l,(0,i.addEvent)(n,h.move,this.handleDrag),(0,i.addEvent)(n,h.stop,this.handleDragStop))}),d(this,`handleDrag`,e=>{let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,a.createCoreData)(this,n,r);if((0,s.default)(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r}),d(this,`handleDragStop`,e=>{if(!this.dragging)return;let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let o=(0,a.createCoreData)(this,n,r);if(this.props.onStop(e,o)===!1||this.mounted===!1)return!1;let c=this.findDOMNode();c&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(c.ownerDocument),(0,s.default)(`DraggableCore: handleDragStop: %j`,o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,c&&((0,s.default)(`DraggableCore: Removing handlers`),(0,i.removeEvent)(c.ownerDocument,h.move,this.handleDrag),(0,i.removeEvent)(c.ownerDocument,h.stop,this.handleDragStop))}),d(this,`onMouseDown`,e=>(h=m.mouse,this.handleDragStart(e))),d(this,`onMouseUp`,e=>(h=m.mouse,this.handleDragStop(e))),d(this,`onTouchStart`,e=>(h=m.touch,this.handleDragStart(e))),d(this,`onTouchEnd`,e=>(h=m.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&(0,i.addEvent)(e,m.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;(0,i.removeEvent)(t,m.mouse.move,this.handleDrag),(0,i.removeEvent)(t,m.touch.move,this.handleDrag),(0,i.removeEvent)(t,m.mouse.stop,this.handleDragStop),(0,i.removeEvent)(t,m.touch.stop,this.handleDragStop),(0,i.removeEvent)(e,m.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};e.default=g,d(g,`displayName`,`DraggableCore`),d(g,`propTypes`,{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),d(g,`defaultProps`,{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),An=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=f(u()),n=d(Ht()),r=d(A()),i=bn(),a=En(),o=Dn(),s=wn(),c=d(kn()),l=d(On());function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function m(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=g(e,`string`);return typeof t==`symbol`?t:t+``}function g(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _=class extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return n&&(!r||n.x!==r.x||n.y!==r.y)?((0,l.default)(`Draggable: getDerivedStateFromProps %j`,{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(e){super(e),m(this,`onDragStart`,(e,t)=>{if((0,l.default)(`Draggable: onDragStart: %j`,t),this.props.onStart(e,(0,o.createDraggableData)(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),m(this,`onDrag`,(e,t)=>{if(!this.state.dragging)return!1;(0,l.default)(`Draggable: onDrag: %j`,t);let n=(0,o.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=(0,o.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)}),m(this,`onDragStop`,(e,t)=>{if(!this.state.dragging||this.props.onStop(e,(0,o.createDraggableData)(this,t))===!1)return!1;(0,l.default)(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){let{axis:e,bounds:n,children:r,defaultPosition:s,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:f,positionOffset:m,scale:h,...g}=this.props,_={},v=null,y=!f||this.state.dragging,b=f||s,x={x:(0,o.canDragX)(this)&&y?this.state.x:b.x,y:(0,o.canDragY)(this)&&y?this.state.y:b.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(x,m):_=(0,a.createCSSTransform)(x,m);let S=(0,i.clsx)(r.props.className||``,l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:S,style:{...r.props.style,..._},transform:v}))}};e.default=_,m(_,`displayName`,`Draggable`),m(_,`propTypes`,{...c.default.propTypes,axis:n.default.oneOf([`both`,`x`,`y`,`none`]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),m(_,`defaultProps`,{...c.default.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1})})),jn=i(((e,t)=>{var{default:n,DraggableCore:r}=An();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Mn=i((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(u());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return t=o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=s(e,`string`);return typeof t==`symbol`?t:String(t)}function s(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function c(e,n){return n.style&&e.props.style&&(n.style=i(i({},e.props.style),n.style)),n.className&&e.props.className&&(n.className=e.props.className+` `+n.className),t.default.cloneElement(e,n)}})),Nn=i((e=>{e.__esModule=!0,e.resizableProps=void 0;var t=n(Ht());jn();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments],n=e[0];if(n.axis===`both`||n.axis===`y`){var r;return(r=t.default.number).isRequired.apply(r,e)}return t.default.number.apply(t.default,e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments],n=e[0];if(n.axis===`both`||n.axis===`x`){var r;return(r=t.default.number).isRequired.apply(r,e)}return t.default.number.apply(t.default,e)}}})),Pn=i((e=>{e.__esModule=!0,e.default=void 0;var t=s(u()),n=jn(),r=Mn(),i=Nn(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function l(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return t=m(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:String(t)}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var v=function(e){g(i,e);function i(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.handleRefs={},t.lastHandleRect=null,t.slack=null,t}var o=i.prototype;return o.componentWillUnmount=function(){this.resetData()},o.resetData=function(){this.lastHandleRect=this.slack=null},o.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,i=n.maxConstraints,a=n.lockAspectRatio;if(!r&&!i&&!a)return[e,t];if(a){var o=this.props.width/this.props.height,s=e-this.props.width,c=t-this.props.height;Math.abs(s)>Math.abs(c*o)?t=e/o:e=t*o}var l=e,u=t,d=this.slack||[0,0],f=d[0],p=d[1];return e+=f,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[f+(l-e),p+(u-t)],[e,t]},o.resizeHandler=function(e,t){var n=this;return function(r,i){var a=i.node,o=i.deltaX,s=i.deltaY;e===`onResizeStart`&&n.resetData();var c=(n.props.axis===`both`||n.props.axis===`x`)&&t!==`n`&&t!==`s`,l=(n.props.axis===`both`||n.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!(!c&&!l)){var u=t[0],d=t[t.length-1],f=a.getBoundingClientRect();if(n.lastHandleRect!=null){if(d===`w`){var p=f.left-n.lastHandleRect.left;o+=p}if(u===`n`){var m=f.top-n.lastHandleRect.top;s+=m}}n.lastHandleRect=f,d===`w`&&(o=-o),u===`n`&&(s=-s);var h=n.props.width+(c?o/n.props.transformScale:0),g=n.props.height+(l?s/n.props.transformScale:0),_=n.runConstraints(h,g);h=_[0],g=_[1];var v=h!==n.props.width||g!==n.props.height,y=typeof n.props[e]==`function`?n.props[e]:null;y&&!(e===`onResize`&&!v)&&(r.persist==null||r.persist(),y(r,{node:a,size:{width:h,height:g},handle:t})),e===`onResizeStop`&&n.resetData()}}},o.renderResizeHandle=function(e,n){var r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);var i=typeof r.type==`string`,a=f({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)},o.render=function(){var e=this,i=this.props,o=i.children,s=i.className,u=i.draggableOpts;i.width,i.height,i.handle,i.handleSize,i.lockAspectRatio,i.axis,i.minConstraints,i.maxConstraints,i.onResize,i.onResizeStop,i.onResizeStart;var d=i.resizeHandles;i.transformScale;var p=l(i,a);return(0,r.cloneElement)(o,f(f({},p),{},{className:(s?s+` `:``)+`react-resizable`,children:[].concat(o.props.children,d.map(function(r){var i=e.handleRefs[r]??(e.handleRefs[r]=t.createRef());return t.createElement(n.DraggableCore,c({},u,{nodeRef:i,key:`resizableHandle-`+r,onStop:e.resizeHandler(`onResizeStop`,r),onStart:e.resizeHandler(`onResizeStart`,r),onDrag:e.resizeHandler(`onResize`,r)}),e.renderResizeHandle(r,i))}))}))},i}(t.Component);e.default=v,v.propTypes=i.resizableProps,v.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Fn=i((e=>{e.__esModule=!0,e.default=void 0;var t=c(u()),n=o(Ht()),r=o(Pn()),i=Nn(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return t=m(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:String(t)}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var y=function(e){_(n,e);function n(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(e.persist==null||e.persist(),t.setState(r,function(){return t.props.onResize&&t.props.onResize(e,n)})):t.setState(r)},t}n.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null};var i=n.prototype;return i.render=function(){var e=this.props,n=e.handle,i=e.handleSize;e.onResize;var o=e.onResizeStart,s=e.onResizeStop,c=e.draggableOpts,u=e.minConstraints,d=e.maxConstraints,p=e.lockAspectRatio,m=e.axis;e.width,e.height;var h=e.resizeHandles,_=e.style,v=e.transformScale,y=g(e,a);return t.createElement(r.default,{axis:m,draggableOpts:c,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:d,minConstraints:u,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:h,transformScale:v,width:this.state.width},t.createElement(`div`,l({},y,{style:f(f({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))},n}(t.Component);e.default=y,y.propTypes=f(f({},i.resizableProps),{},{children:n.default.element})})),In=i(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Pn().default,t.exports.ResizableBox=Fn().default})),Ln=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resizeHandleType=e.resizeHandleAxesType=e.default=void 0;var t=r(Ht()),n=r(u());function r(e){return e&&e.__esModule?e:{default:e}}var i=e.resizeHandleAxesType=t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),a=e.resizeHandleType=t.default.oneOfType([t.default.node,t.default.func]);e.default={className:t.default.string,style:t.default.object,width:t.default.number,autoSize:t.default.bool,cols:t.default.number,draggableCancel:t.default.string,draggableHandle:t.default.string,verticalCompact:function(e){e.verticalCompact},compactType:t.default.oneOf([`vertical`,`horizontal`]),layout:function(e){var t=e.layout;t!==void 0&&Sn().validateLayout(t,`layout`)},margin:t.default.arrayOf(t.default.number),containerPadding:t.default.arrayOf(t.default.number),rowHeight:t.default.number,maxRows:t.default.number,isBounded:t.default.bool,isDraggable:t.default.bool,isResizable:t.default.bool,allowOverlap:t.default.bool,preventCollision:t.default.bool,useCSSTransforms:t.default.bool,transformScale:t.default.number,isDroppable:t.default.bool,resizeHandles:i,resizeHandle:a,onLayoutChange:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onDragStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,onResizeStop:t.default.func,onDrop:t.default.func,droppingItem:t.default.shape({i:t.default.string.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired}),children:function(e,t){let r=e[t],i={};n.default.Children.forEach(r,function(e){if(e?.key!=null){if(i[e.key])throw Error(`Duplicate child key "`+e.key+`" found! This will cause problems in ReactGridLayout.`);i[e.key]=!0}})},innerRef:t.default.any}})),Rn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=d(u()),n=A(),r=d(Ht()),i=jn(),a=In(),o=Sn(),s=Cn(),c=Ln(),l=d(bn());function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?f(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=g(e,`string`);return typeof t==`symbol`?t:t+``}function g(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _=class extends t.default.Component{constructor(){super(...arguments),m(this,`state`,{resizing:null,dragging:null,className:``}),m(this,`elementRef`,t.default.createRef()),m(this,`onDragStart`,(e,t)=>{let{node:n}=t,{onDragStart:r,transformScale:i}=this.props;if(!r)return;let a={top:0,left:0},{offsetParent:o}=n;if(!o)return;let c=o.getBoundingClientRect(),l=n.getBoundingClientRect(),u=l.left/i,d=c.left/i,f=l.top/i,p=c.top/i;a.left=u-d+o.scrollLeft,a.top=f-p+o.scrollTop,this.setState({dragging:a});let{x:m,y:h}=(0,s.calcXY)(this.getPositionParams(),a.top,a.left,this.props.w,this.props.h);return r.call(this,this.props.i,m,h,{e,node:n,newPosition:a})}),m(this,`onDrag`,(e,t,r)=>{let{node:i,deltaX:a,deltaY:o}=t,{onDrag:c}=this.props;if(!c)return;if(!this.state.dragging)throw Error(`onDrag called before onDragStart.`);let l=this.state.dragging.top+o,u=this.state.dragging.left+a,{isBounded:d,i:f,w:p,h:m,containerWidth:h}=this.props,g=this.getPositionParams();if(d){let{offsetParent:e}=i;if(e){let{margin:t,rowHeight:n}=this.props,r=e.clientHeight-(0,s.calcGridItemWHPx)(m,n,t[1]);l=(0,s.clamp)(l,0,r);let i=(0,s.calcGridColWidth)(g),a=h-(0,s.calcGridItemWHPx)(p,i,t[0]);u=(0,s.clamp)(u,0,a)}}let _={top:l,left:u};r?this.setState({dragging:_}):(0,n.flushSync)(()=>{this.setState({dragging:_})});let{x:v,y}=(0,s.calcXY)(g,l,u,p,m);return c.call(this,f,v,y,{e,node:i,newPosition:_})}),m(this,`onDragStop`,(e,t)=>{let{node:n}=t,{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw Error(`onDragEnd called before onDragStart.`);let{w:i,h:a,i:o}=this.props,{left:c,top:l}=this.state.dragging,u={top:l,left:c};this.setState({dragging:null});let{x:d,y:f}=(0,s.calcXY)(this.getPositionParams(),l,c,i,a);return r.call(this,o,d,f,{e,node:n,newPosition:u})}),m(this,`onResizeStop`,(e,t,n)=>this.onResizeHandler(e,t,n,`onResizeStop`)),m(this,`onResizeStart`,(e,t,n)=>this.onResizeHandler(e,t,n,`onResizeStart`)),m(this,`onResize`,(e,t,n)=>this.onResizeHandler(e,t,n,`onResize`))}shouldComponentUpdate(e,t){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;let n=(0,s.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,s.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,o.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){let{droppingPosition:t}=this.props;if(!t)return;let n=this.elementRef.current;if(!n)return;let r=e.droppingPosition||{left:0,top:0},{dragging:i}=this.state,a=i&&t.left!==r.left||t.top!==r.top;if(!i)this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top});else if(a){let e=t.left-i.left,r=t.top-i.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r},!0)}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){let{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props,i;return r?i=(0,o.setTransform)(e):(i=(0,o.setTopLeft)(e),t&&(i.left=(0,o.perc)(e.left/n),i.width=(0,o.perc)(e.width/n))),i}mixinDraggable(e,n){return t.default.createElement(i.DraggableCore,{disabled:!n,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:`.react-resizable-handle`+(this.props.cancel?`,`+this.props.cancel:``),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(e,n,r){let{cols:i,minW:o,minH:c,maxW:l,maxH:u,transformScale:d,resizeHandles:f,resizeHandle:p}=this.props,m=this.getPositionParams(),h=(0,s.calcGridItemPosition)(m,0,0,i,0).width,g=(0,s.calcGridItemPosition)(m,0,0,o,c),_=(0,s.calcGridItemPosition)(m,0,0,l,u),v=[g.width,g.height],y=[Math.min(_.width,h),Math.min(_.height,1/0)];return t.default.createElement(a.Resizable,{draggableOpts:{disabled:!r},className:r?void 0:`react-resizable-hide`,width:n.width,height:n.height,minConstraints:v,maxConstraints:y,onResizeStop:this.curryResizeHandler(n,this.onResizeStop),onResizeStart:this.curryResizeHandler(n,this.onResizeStart),onResize:this.curryResizeHandler(n,this.onResize),transformScale:d,resizeHandles:f,handle:p},e)}onResizeHandler(e,t,r,i){let{node:a,size:c,handle:l}=t,u=this.props[i];if(!u)return;let{x:d,y:f,i:p,maxH:m,minH:h,containerWidth:g}=this.props,{minW:_,maxW:v}=this.props,y=c;a&&(y=(0,o.resizeItemInDirection)(l,r,c,g),(0,n.flushSync)(()=>{this.setState({resizing:i===`onResizeStop`?null:y})}));let{w:b,h:x}=(0,s.calcWH)(this.getPositionParams(),y.width,y.height,d,f,l);b=(0,s.clamp)(b,Math.max(_,1),v),x=(0,s.clamp)(x,h,m),u.call(this,p,b,x,{e,node:a,size:y,handle:l})}render(){let{x:e,y:n,w:r,h:i,isDraggable:a,isResizable:o,droppingPosition:c,useCSSTransforms:u}=this.props,d=(0,s.calcGridItemPosition)(this.getPositionParams(),e,n,r,i,this.state),f=t.default.Children.only(this.props.children),m=t.default.cloneElement(f,{ref:this.elementRef,className:(0,l.default)(`react-grid-item`,f.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":a,"react-draggable-dragging":!!this.state.dragging,dropping:!!c,cssTransforms:u}),style:p(p(p({},this.props.style),f.props.style),this.createStyle(d))});return m=this.mixinResizable(m,d,o),m=this.mixinDraggable(m,a),m}};e.default=_,m(_,`propTypes`,{children:r.default.element,cols:r.default.number.isRequired,containerWidth:r.default.number.isRequired,rowHeight:r.default.number.isRequired,margin:r.default.array.isRequired,maxRows:r.default.number.isRequired,containerPadding:r.default.array.isRequired,x:r.default.number.isRequired,y:r.default.number.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired,minW:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`minWidth not Number`);if(n>e.w||n>e.maxW)return Error(`minWidth larger than item width/maxWidth`)},maxW:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`maxWidth not Number`);if(n<e.w||n<e.minW)return Error(`maxWidth smaller than item width/minWidth`)},minH:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`minHeight not Number`);if(n>e.h||n>e.maxH)return Error(`minHeight larger than item height/maxHeight`)},maxH:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`maxHeight not Number`);if(n<e.h||n<e.minH)return Error(`maxHeight smaller than item height/minHeight`)},i:r.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onResizeStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,isDraggable:r.default.bool.isRequired,isResizable:r.default.bool.isRequired,isBounded:r.default.bool.isRequired,static:r.default.bool,useCSSTransforms:r.default.bool.isRequired,transformScale:r.default.number,className:r.default.string,handle:r.default.string,cancel:r.default.string,droppingPosition:r.default.shape({e:r.default.object.isRequired,left:r.default.number.isRequired,top:r.default.number.isRequired})}),m(_,`defaultProps`,{className:``,cancel:``,handle:``,minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})})),zn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(u()),n=yn(),r=c(bn()),i=Sn(),a=Cn(),o=c(Rn()),s=c(Ln());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g=`react-grid-layout`,_=!1;try{_=/firefox/i.test(navigator.userAgent)}catch{}var v=class extends t.Component{constructor(){super(...arguments),p(this,`state`,{activeDrag:null,layout:(0,i.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,i.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),p(this,`dragEnterCounter`,0),p(this,`onDragStart`,(e,t,n,r)=>{let{e:a,node:o}=r,{layout:s}=this.state,c=(0,i.getLayoutItem)(s,e);if(!c)return;let l={w:c.w,h:c.h,x:c.x,y:c.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,i.cloneLayoutItem)(c),oldLayout:s,activeDrag:l}),this.props.onDragStart(s,c,c,null,a,o)}),p(this,`onDrag`,(e,t,n,r)=>{let{e:a,node:o}=r,{oldDragItem:s}=this.state,{layout:c}=this.state,{cols:l,allowOverlap:u,preventCollision:d}=this.props,f=(0,i.getLayoutItem)(c,e);if(!f)return;let p={w:f.w,h:f.h,x:f.x,y:f.y,placeholder:!0,i:e};c=(0,i.moveElement)(c,f,t,n,!0,d,(0,i.compactType)(this.props),l,u),this.props.onDrag(c,s,f,p,a,o),this.setState({layout:u?c:(0,i.compact)(c,(0,i.compactType)(this.props),l),activeDrag:p})}),p(this,`onDragStop`,(e,t,n,r)=>{let{e:a,node:o}=r;if(!this.state.activeDrag)return;let{oldDragItem:s}=this.state,{layout:c}=this.state,{cols:l,preventCollision:u,allowOverlap:d}=this.props,f=(0,i.getLayoutItem)(c,e);if(!f)return;c=(0,i.moveElement)(c,f,t,n,!0,u,(0,i.compactType)(this.props),l,d);let p=d?c:(0,i.compact)(c,(0,i.compactType)(this.props),l);this.props.onDragStop(p,s,f,null,a,o);let{oldLayout:m}=this.state;this.setState({activeDrag:null,layout:p,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,m)}),p(this,`onResizeStart`,(e,t,n,r)=>{let{e:a,node:o}=r,{layout:s}=this.state,c=(0,i.getLayoutItem)(s,e);c&&(this.setState({oldResizeItem:(0,i.cloneLayoutItem)(c),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,c,c,null,a,o))}),p(this,`onResize`,(e,t,n,r)=>{let{e:a,node:o,size:s,handle:c}=r,{oldResizeItem:l}=this.state,{layout:u}=this.state,{cols:d,preventCollision:p,allowOverlap:m}=this.props,h=!1,g,_,v,[y,b]=(0,i.withLayoutItem)(u,e,e=>{let r;return _=e.x,v=e.y,[`sw`,`w`,`nw`,`n`,`ne`].indexOf(c)!==-1&&([`sw`,`nw`,`w`].indexOf(c)!==-1&&(_=e.x+(e.w-t),t=e.x!==_&&_<0?e.w:t,_=_<0?0:_),[`ne`,`n`,`nw`].indexOf(c)!==-1&&(v=e.y+(e.h-n),n=e.y!==v&&v<0?e.h:n,v=v<0?0:v),h=!0),p&&!m&&(r=(0,i.getAllCollisions)(u,f(f({},e),{},{w:t,h:n,x:_,y:v})).filter(t=>t.i!==e.i).length>0,r&&(v=e.y,n=e.h,_=e.x,t=e.w,h=!1)),e.w=t,e.h=n,e});if(!b)return;g=y,h&&(g=(0,i.moveElement)(y,b,_,v,!0,this.props.preventCollision,(0,i.compactType)(this.props),d,m));let x={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(g,l,b,x,a,o),this.setState({layout:m?g:(0,i.compact)(g,(0,i.compactType)(this.props),d),activeDrag:x})}),p(this,`onResizeStop`,(e,t,n,r)=>{let{e:a,node:o}=r,{layout:s,oldResizeItem:c}=this.state,{cols:l,allowOverlap:u}=this.props,d=(0,i.getLayoutItem)(s,e),f=u?s:(0,i.compact)(s,(0,i.compactType)(this.props),l);this.props.onResizeStop(f,c,d,null,a,o);let{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(f,p)}),p(this,`onDragOver`,e=>{var n;if(e.preventDefault(),e.stopPropagation(),_&&!((n=e.nativeEvent.target)!=null&&n.classList.contains(g)))return!1;let{droppingItem:r,onDropDragOver:i,margin:o,cols:s,rowHeight:c,maxRows:l,width:u,containerPadding:d,transformScale:p}=this.props,m=i?.(e);if(m===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;let h=f(f({},r),m),{layout:v}=this.state,y=e.currentTarget.getBoundingClientRect(),b=e.clientX-y.left,x=e.clientY-y.top,S={left:b/p,top:x/p,e};if(!this.state.droppingDOMNode){let e={cols:s,margin:o,maxRows:l,rowHeight:c,containerWidth:u,containerPadding:d||o},n=(0,a.calcXY)(e,x,b,h.w,h.h);this.setState({droppingDOMNode:t.createElement(`div`,{key:h.i}),droppingPosition:S,layout:[...v,f(f({},h),{},{x:n.x,y:n.y,static:!1,isDraggable:!0})]})}else if(this.state.droppingPosition){let{left:e,top:t}=this.state.droppingPosition;(e!=b||t!=x)&&this.setState({droppingPosition:S})}}),p(this,`removeDroppingPlaceholder`,()=>{let{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,r=(0,i.compact)(n.filter(t=>t.i!==e.i),(0,i.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:r,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),p(this,`onDragLeave`,e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),p(this,`onDragEnter`,e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++}),p(this,`onDrop`,e=>{e.preventDefault(),e.stopPropagation();let{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find(e=>e.i===t.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,t){let r;return t.activeDrag?null:(!(0,n.deepEqual)(e.layout,t.propsLayout)||e.compactType!==t.compactType?r=e.layout:(0,i.childrenEqual)(e.children,t.children)||(r=t.layout),r?{layout:(0,i.synchronizeLayoutWithChildren)(r,e.children,e.cols,(0,i.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}shouldComponentUpdate(e,t){return this.props.children!==e.children||!(0,i.fastRGLPropsEqual)(this.props,e,n.deepEqual)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){let e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;let e=(0,i.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+t*2+`px`}onLayoutMaybeChanged(e,t){t||=this.state.layout,(0,n.deepEqual)(t,e)||this.props.onLayoutChange(e)}placeholder(){let{activeDrag:e}=this.state;if(!e)return null;let{width:n,cols:r,margin:i,containerPadding:a,rowHeight:s,maxRows:c,useCSSTransforms:l,transformScale:u}=this.props;return t.createElement(o.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:`react-grid-placeholder ${this.state.resizing?`placeholder-resizing`:``}`,containerWidth:n,cols:r,margin:i,containerPadding:a||i,maxRows:c,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:l,transformScale:u},t.createElement(`div`,null))}processGridItem(e,n){if(!e||!e.key)return;let r=(0,i.getLayoutItem)(this.state.layout,String(e.key));if(!r)return null;let{width:a,cols:s,margin:c,containerPadding:l,rowHeight:u,maxRows:d,isDraggable:f,isResizable:p,isBounded:m,useCSSTransforms:h,transformScale:g,draggableCancel:_,draggableHandle:v,resizeHandles:y,resizeHandle:b}=this.props,{mounted:x,droppingPosition:S}=this.state,C=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&f,w=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&p,T=r.resizeHandles||y,E=C&&m&&r.isBounded!==!1;return t.createElement(o.default,{containerWidth:a,cols:s,margin:c,containerPadding:l||c,maxRows:d,rowHeight:u,cancel:_,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:C,isResizable:w,isBounded:E,useCSSTransforms:h&&x,usePercentages:!x,transformScale:g,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:n?S:void 0,resizeHandles:T,resizeHandle:b},e)}render(){let{className:e,style:n,isDroppable:a,innerRef:o}=this.props,s=(0,r.default)(g,e),c=f({height:this.containerHeight()},n);return t.createElement(`div`,{ref:o,className:s,style:c,onDrop:a?this.onDrop:i.noop,onDragLeave:a?this.onDragLeave:i.noop,onDragEnter:a?this.onDragEnter:i.noop,onDragOver:a?this.onDragOver:i.noop},t.Children.map(this.props.children,e=>this.processGridItem(e)),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};e.default=v,p(v,`displayName`,`ReactGridLayout`),p(v,`propTypes`,s.default),p(v,`defaultProps`,{autoSize:!0,cols:12,className:``,style:{},draggableHandle:``,draggableCancel:``,containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:`vertical`,preventCollision:!1,droppingItem:{i:`__dropping-elem__`,h:1,w:1},resizeHandles:[`se`],onLayoutChange:i.noop,onDragStart:i.noop,onDrag:i.noop,onDragStop:i.noop,onResizeStart:i.noop,onResize:i.noop,onResizeStop:i.noop,onDrop:i.noop,onDropDragOver:i.noop})})),Bn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.findOrGenerateResponsiveLayout=i,e.getBreakpointFromWidth=n,e.getColsFromBreakpoint=r,e.sortBreakpoints=a;var t=Sn();function n(e,t){let n=a(e),r=n[0];for(let i=1,a=n.length;i<a;i++){let a=n[i];t>e[a]&&(r=a)}return r}function r(e,t){if(!t[e])throw Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+` is missing!`);return t[e]}function i(e,n,r,i,o,s){if(e[r])return(0,t.cloneLayout)(e[r]);let c=e[i],l=a(n),u=l.slice(l.indexOf(r));for(let t=0,n=u.length;t<n;t++){let n=u[t];if(e[n]){c=e[n];break}}return c=(0,t.cloneLayout)(c||[]),(0,t.compact)((0,t.correctBounds)(c,{cols:o}),s,o)}function a(e){return Object.keys(e).sort(function(t,n){return e[t]-e[n]})}})),Vn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(u()),n=c(Ht()),r=yn(),i=Sn(),a=Bn(),o=c(zn()),s=[`breakpoint`,`breakpoints`,`cols`,`layouts`,`margin`,`containerPadding`,`onBreakpointChange`,`onLayoutChange`,`onWidthChange`];function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(null,arguments)}function f(e,t){if(e==null)return{};var n,r,i=p(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?m(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=v(e,`string`);return typeof t==`symbol`?t:t+``}function v(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var y=e=>Object.prototype.toString.call(e);function b(e,t){return e==null?null:Array.isArray(e)?e:e[t]}var x=class extends t.Component{constructor(){super(...arguments),g(this,`state`,this.generateInitialState()),g(this,`onLayoutChange`,e=>{this.props.onLayoutChange(e,h(h({},this.props.layouts),{},{[this.state.breakpoint]:e}))})}generateInitialState(){let{width:e,breakpoints:t,layouts:n,cols:r}=this.props,i=(0,a.getBreakpointFromWidth)(t,e),o=(0,a.getColsFromBreakpoint)(i,r),s=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,a.findOrGenerateResponsiveLayout)(n,t,i,i,o,s),breakpoint:i,cols:o}}static getDerivedStateFromProps(e,t){if(!(0,r.deepEqual)(e.layouts,t.layouts)){let{breakpoint:n,cols:r}=t;return{layout:(0,a.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){(this.props.width!=e.width||this.props.breakpoint!==e.breakpoint||!(0,r.deepEqual)(this.props.breakpoints,e.breakpoints)||!(0,r.deepEqual)(this.props.cols,e.cols))&&this.onWidthChange(e)}onWidthChange(e){let{breakpoints:t,cols:n,layouts:r,compactType:o}=this.props,s=this.props.breakpoint||(0,a.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),c=this.state.breakpoint,l=(0,a.getColsFromBreakpoint)(s,n),u=h({},r);if(c!==s||e.breakpoints!==t||e.cols!==n){c in u||(u[c]=(0,i.cloneLayout)(this.state.layout));let e=(0,a.findOrGenerateResponsiveLayout)(u,t,s,c,l,o);e=(0,i.synchronizeLayoutWithChildren)(e,this.props.children,l,o,this.props.allowOverlap),u[s]=e,this.props.onBreakpointChange(s,l),this.props.onLayoutChange(e,u),this.setState({breakpoint:s,layout:e,cols:l})}let d=b(this.props.margin,s),f=b(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,d,l,f)}render(){let e=this.props,{breakpoint:n,breakpoints:r,cols:i,layouts:a,margin:c,containerPadding:l,onBreakpointChange:u,onLayoutChange:p,onWidthChange:m}=e,h=f(e,s);return t.createElement(o.default,d({},h,{margin:b(c,this.state.breakpoint),containerPadding:b(l,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};e.default=x,g(x,`propTypes`,{breakpoint:n.default.string,breakpoints:n.default.object,allowOverlap:n.default.bool,cols:n.default.object,margin:n.default.oneOfType([n.default.array,n.default.object]),containerPadding:n.default.oneOfType([n.default.array,n.default.object]),layouts(e,t){if(y(e[t])!==`[object Object]`)throw Error(`Layout property must be an object. Received: `+y(e[t]));Object.keys(e[t]).forEach(t=>{if(!(t in e.breakpoints))throw Error(`Each key in layouts must align with a key in breakpoints.`);(0,i.validateLayout)(e.layouts[t],`layouts.`+t)})},width:n.default.number.isRequired,onBreakpointChange:n.default.func,onLayoutChange:n.default.func,onWidthChange:n.default.func}),g(x,`defaultProps`,{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:i.noop,onLayoutChange:i.noop,onWidthChange:i.noop})})),Hn=r({default:()=>_r});function Un(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){nr(a)}function s(){var e=Date.now();if(n){if(e-i<rr)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}function Wn(e){return parseFloat(e)||0}function Gn(e){return[...arguments].slice(1).reduce(function(t,n){var r=e[`border-`+n+`-width`];return t+Wn(r)},0)}function Kn(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e[`padding-`+a];n[a]=Wn(o)}return n}function qn(e){var t=e.getBBox();return Qn(0,0,t.width,t.height)}function Jn(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return ur;var r=lr(e).getComputedStyle(e),i=Kn(r),a=i.left+i.right,o=i.top+i.bottom,s=Wn(r.width),c=Wn(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=Gn(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=Gn(r,`top`,`bottom`)+o)),!Yn(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return Qn(i.left,i.top,s,c)}function Yn(e){return e===lr(e).document.documentElement}function Xn(e){return er?dr(e)?qn(e):Jn(e):ur}function Zn(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create((typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object).prototype);return cr(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Qn(e,t,n,r){return{x:e,y:t,width:n,height:r}}var $n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr=n((()=>{$n=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),er=typeof window<`u`&&typeof document<`u`&&window.document===document,tr=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),nr=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(tr):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),rr=2,ir=20,ar=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],or=typeof MutationObserver<`u`,sr=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Un(this.refresh.bind(this),ir)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){!er||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),or?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!er||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;ar.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),cr=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),lr=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||tr}),ur=Qn(0,0,0,0),dr=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof lr(e).SVGGraphicsElement}:function(e){return e instanceof lr(e).SVGElement&&typeof e.getBBox==`function`}})(),fr=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Qn(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Xn(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),pr=function(){function e(e,t){var n=Zn(t);cr(this,{target:e,contentRect:n})}return e}(),mr=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new $n,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof lr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new fr(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof lr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new pr(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),hr=typeof WeakMap<`u`?new WeakMap:new $n,gr=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new mr(t,sr.getInstance(),this);hr.set(this,n)}return e}(),[`observe`,`unobserve`,`disconnect`].forEach(function(e){gr.prototype[e]=function(){var t;return(t=hr.get(this))[e].apply(t,arguments)}}),_r=(function(){return tr.ResizeObserver===void 0?gr:tr.ResizeObserver})()})),yr=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var n=c(u()),r=s(Ht()),i=s((vr(),t(Hn))),a=s(bn()),o=[`measureBeforeMount`];function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function d(e,t){if(e==null)return{};var n,r,i=f(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function p(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g=`react-grid-layout`;function _(e){var t;return t=class extends n.Component{constructor(){super(...arguments),p(this,`state`,{width:1280}),p(this,`elementRef`,n.createRef()),p(this,`mounted`,!1),p(this,`resizeObserver`,void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new i.default(e=>{if(this.elementRef.current instanceof HTMLElement){let t=e[0].contentRect.width;this.setState({width:t})}});let e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;let e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){let t=this.props,{measureBeforeMount:r}=t,i=d(t,o);return r&&!this.mounted?n.createElement(`div`,{className:(0,a.default)(this.props.className,g),style:this.props.style,ref:this.elementRef}):n.createElement(e,l({innerRef:this.elementRef},i,this.state))}},p(t,`defaultProps`,{measureBeforeMount:!1}),p(t,`propTypes`,{measureBeforeMount:r.default.bool}),t}})),br=i(((e,t)=>{t.exports=zn().default,t.exports.utils=Sn(),t.exports.calculateUtils=Cn(),t.exports.Responsive=Vn().default,t.exports.Responsive.utils=Bn(),t.exports.WidthProvider=yr().default})),Y=ee(),xr=10;function Sr(){let e=(0,Y.c)(9),[t,n]=(0,J.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={x:0,y:0},e[0]=r):r=e[0];let[i,a]=J.useState(r),[o,s]=J.useState(!1),c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{n(!0),a({x:e.clientX,y:e.clientY})},e[1]=c):c=e[1];let l=c,u;e[2]!==i||e[3]!==t?(u=e=>{if(t){let t=e.clientX-i.x,n=e.clientY-i.y;s(Math.hypot(t,n)>xr)}},e[2]=i,e[3]=t,e[4]=u):u=e[4];let d=u,f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{n(!1),s(!1)},e[5]=f):f=e[5];let p=f,m=t&&o,h;return e[6]!==d||e[7]!==m?(h={isDragging:m,onDragStart:l,onDragMove:d,onDragStop:p},e[6]=d,e[7]=m,e[8]=h):h=e[8],h}var Cr=br(),X=ge(),wr=(0,Cr.WidthProvider)(Cr.Responsive),Tr=[0,0],Er=`grid-drag-handle`,Dr=e=>{let t=(0,Y.c)(161),{layout:n,setLayout:r,cells:i,mode:a}=e,o=a===`read`,s;t[0]===n.cells?s=t[1]:(s=new Set(n.cells.map(Pr)),t[0]=n.cells,t[1]=s);let c=s,[l,u]=(0,J.useState)(null),[d,f]=(0,J.useState)(!1),p;t[2]===n.columns?p=t[3]:(p={lg:n.columns},t[2]=n.columns,t[3]=p);let m=p,h,g;t[4]===n.bordered?(h=t[5],g=t[6]):(h=()=>{let e=document.getElementById(`App`);return n.bordered?e?.classList.add(`grid-bordered`):e?.classList.remove(`grid-bordered`),()=>{e?.classList.remove(`grid-bordered`)}},g=[n.bordered],t[4]=n.bordered,t[5]=h,t[6]=g),(0,J.useEffect)(h,g);let _=Sr(),v,y;t[7]===_?(v=t[8],y=t[9]):({isDragging:y,...v}=_,t[7]=_,t[8]=v,t[9]=y);let b=!o&&!d,x,S,C,w,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,z,te,B,ne,V,H,U,re;if(t[10]!==i||t[11]!==m||t[12]!==v||t[13]!==l||t[14]!==b||t[15]!==c||t[16]!==y||t[17]!==o||t[18]!==n||t[19]!==a||t[20]!==r){let e=st.keyBy(n.cells,Fr),s;t[47]!==n||t[48]!==r?(s=e=>t=>{let i=new Set(n.scrollableCells);t?i.add(e):i.delete(e),r({...n,scrollableCells:i})},t[47]=n,t[48]=r,t[49]=s):s=t[49];let u=s,d;t[50]!==n||t[51]!==r?(d=e=>t=>{let i=new Map(n.cellSide);t===i.get(e)?i.delete(e):i.set(e,t),r({...n,cellSide:i})},t[50]=n,t[51]=r,t[52]=d):d=t[52];let f=d;t[53]!==b||t[54]!==n.columns||t[55]!==n.maxWidth||t[56]!==n.rowHeight?(S={},n.maxWidth&&(S.maxWidth=`${n.maxWidth}px`),b&&(S.backgroundImage=`repeating-linear-gradient(var(--gray-4) 0 1px, transparent 1px 100%), repeating-linear-gradient(90deg, var(--gray-4) 0 1px, transparent 1px 100%)`,S.backgroundSize=`calc((100% / ${n.columns})) ${n.rowHeight}px`),t[53]=b,t[54]=n.columns,t[55]=n.maxWidth,t[56]=n.rowHeight,t[57]=S):S=t[57],x=wr,V=`lg`,t[58]===n.cells?H=t[59]:(H={lg:n.cells},t[58]=n.cells,t[59]=H),U=S,re=m,C=!1;let p=b&&`bg-(--slate-2) border-r`,h=o&&`disable-animation`,g=!n.maxWidth&&`min-w-[800px]`;t[60]!==p||t[61]!==h||t[62]!==g?(w=q(`w-full mx-auto bg-background flex-1 min-h-full`,p,h,g),t[60]=p,t[61]=h,t[62]=g,t[63]=w):w=t[63],t[64]===o?E=t[65]:(E=o?[20,20]:void 0,t[64]=o,t[65]=E),D=Tr,O=!1,k=null,A=!0,j=n.rowHeight,t[66]!==o||t[67]!==n||t[68]!==r?(M=e=>{o||r({...n,cells:e})},t[66]=o,t[67]=n,t[68]=r,t[69]=M):M=t[69],t[70]===l?N=t[71]:(N=l?{i:l.i,w:l.w||2,h:l.h||2}:void 0,t[70]=l,t[71]=N),t[72]!==v||t[73]!==n||t[74]!==r?(P=(e,t,i)=>{v.onDragStop(),t&&r({...n,cells:[...e,t]})},t[72]=v,t[73]=n,t[74]=r,t[75]=P):P=t[75],t[76]===v?(F=t[77],I=t[78],L=t[79]):(F=(e,t,n,r,i)=>{v.onDragStart(i)},I=(e,t,n,r,i)=>{v.onDragMove(i)},L=()=>{v.onDragStop()},t[76]=v,t[77]=F,t[78]=I,t[79]=L),R=Ir,ee=b,z=b,te=b,B=b?`.${Er}`:`noop`;let _;t[80]===c?_=t[81]:(_=e=>c.has(e.id),t[80]=c,t[81]=_),ne=i.filter(_).map(t=>{let i=e.get(t.id),o=n.scrollableCells.has(t.id)??!1,s=n.cellSide.get(t.id),c=(0,X.jsx)(Or,{code:t.code,mode:a,cellId:t.id,output:t.output,status:t.status,stale:T(t,!1),isScrollable:o,side:s,hidden:t.errored||t.interrupted||t.stopped});return b?(0,X.jsx)(Ar,{id:t.id,isDragging:y,side:s,setSide:f(t.id),isScrollable:o,setIsScrollable:u(t.id),display:i?.y===0?`bottom`:`top`,onDelete:()=>{r({...n,cells:n.cells.filter(e=>e.i!==t.id)})},children:c},t.id):(0,X.jsx)(`div`,{children:c},t.id)}),t[10]=i,t[11]=m,t[12]=v,t[13]=l,t[14]=b,t[15]=c,t[16]=y,t[17]=o,t[18]=n,t[19]=a,t[20]=r,t[21]=x,t[22]=S,t[23]=C,t[24]=w,t[25]=E,t[26]=D,t[27]=O,t[28]=k,t[29]=A,t[30]=j,t[31]=M,t[32]=N,t[33]=P,t[34]=F,t[35]=I,t[36]=L,t[37]=R,t[38]=ee,t[39]=z,t[40]=te,t[41]=B,t[42]=ne,t[43]=V,t[44]=H,t[45]=U,t[46]=re}else x=t[21],S=t[22],C=t[23],w=t[24],E=t[25],D=t[26],O=t[27],k=t[28],A=t[29],j=t[30],M=t[31],N=t[32],P=t[33],F=t[34],I=t[35],L=t[36],R=t[37],ee=t[38],z=t[39],te=t[40],B=t[41],ne=t[42],V=t[43],H=t[44],U=t[45],re=t[46];let ie;t[82]!==x||t[83]!==C||t[84]!==w||t[85]!==E||t[86]!==D||t[87]!==O||t[88]!==k||t[89]!==A||t[90]!==j||t[91]!==M||t[92]!==N||t[93]!==P||t[94]!==F||t[95]!==I||t[96]!==L||t[97]!==R||t[98]!==ee||t[99]!==z||t[100]!==te||t[101]!==B||t[102]!==ne||t[103]!==V||t[104]!==H||t[105]!==U||t[106]!==re?(ie=(0,X.jsx)(x,{breakpoint:V,layouts:H,style:U,cols:re,allowOverlap:C,className:w,containerPadding:E,margin:D,isBounded:O,compactType:k,preventCollision:A,rowHeight:j,onLayoutChange:M,droppingItem:N,onDrop:P,onDragStart:F,onDrag:I,onDragStop:L,onResizeStop:R,isDraggable:ee,isDroppable:z,isResizable:te,draggableHandle:B,children:ne}),t[82]=x,t[83]=C,t[84]=w,t[85]=E,t[86]=D,t[87]=O,t[88]=k,t[89]=A,t[90]=j,t[91]=M,t[92]=N,t[93]=P,t[94]=F,t[95]=I,t[96]=L,t[97]=R,t[98]=ee,t[99]=z,t[100]=te,t[101]=B,t[102]=ne,t[103]=V,t[104]=H,t[105]=U,t[106]=re,t[107]=ie):ie=t[107];let W=ie,G,K,ae,oe,se,ce,le;if(t[108]!==i||t[109]!==W||t[110]!==c||t[111]!==d||t[112]!==o||t[113]!==n||t[114]!==a||t[115]!==r||t[116]!==S){le=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[125]===c?e=t[126]:(e=e=>!c.has(e.id),t[125]=c,t[126]=e);let s=i.filter(e);if(o){if(n.bordered){let e;t[127]!==W||t[128]!==S?(e=(0,X.jsx)(`div`,{className:`flex flex-1 flex-col items-center`,children:(0,X.jsx)(`div`,{style:S,className:`bg-background flex-1 border-t border-x rounded-t shadow-sm w-full overflow-hidden`,children:W})}),t[127]=W,t[128]=S,t[129]=e):e=t[129],W=e}let e=s.filter(Lr),r;t[130]===a?r=t[131]:(r=e=>(0,X.jsx)(Or,{code:e.code,mode:a,cellId:e.id,output:e.output,status:e.status,stale:T(e,!1),isScrollable:!1,hidden:!1},e.id),t[130]=a,t[131]=r),le=(0,X.jsxs)(X.Fragment,{children:[W,(0,X.jsx)(`div`,{className:`hidden`,children:e.map(r)})]});break bb0}if(n.bordered){let e;t[132]===W?e=t[133]:(e=(0,X.jsx)(`div`,{className:`h-full overflow-auto`,children:W}),t[132]=W,t[133]=e);let n;t[134]!==S||t[135]!==e?(n=(0,X.jsx)(`div`,{style:S,className:`bg-background border-t border-x rounded-t shadow-sm w-full mx-auto mt-4 h-[calc(100%-1rem)] overflow-hidden`,children:e}),t[134]=S,t[135]=e,t[136]=n):n=t[136],W=n}t[137]!==d||t[138]!==n||t[139]!==r?(ce=(0,X.jsx)(kr,{layout:n,setLayout:r,isLocked:d,setIsLocked:f}),t[137]=d,t[138]=n,t[139]=r,t[140]=ce):ce=t[140];let l;t[141]===Symbol.for(`react.memo_cache_sentinel`)?(oe=q(`relative flex z-10 flex-1 overflow-hidden`),l=q(`grow overflow-auto transparent-when-disconnected`),t[141]=oe,t[142]=l):(oe=t[141],l=t[142]),t[143]===W?se=t[144]:(se=(0,X.jsx)(`div`,{className:l,children:W}),t[143]=W,t[144]=se),G=`flex-none flex flex-col w-[300px] p-2 pb-20 gap-2 overflow-auto bg-(--slate-2) border-t border-x rounded-t shadow-sm transparent-when-disconnected mx-2 mt-4`,t[145]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,X.jsx)(`div`,{className:`text font-bold text-(--slate-20) shrink-0`,children:`Outputs`}),t[145]=K):K=t[145];let p;t[146]!==n.columns||t[147]!==n.rowHeight||t[148]!==a?(p=e=>(0,X.jsx)(`div`,{draggable:!0,unselectable:`on`,"data-cell-id":e.id,onDragStart:t=>{let r=t.currentTarget.offsetHeight;u({i:e.id,w:n.columns/4,h:Math.ceil(r/n.rowHeight)||1}),t.dataTransfer.setData(`text/plain`,``)},className:q(Er,`droppable-element bg-background border-border border overflow-hidden p-2 rounded shrink-0`),children:(0,X.jsx)(Or,{code:e.code,className:`select-none pointer-events-none`,mode:a,cellId:e.id,output:e.output,isScrollable:!1,status:e.status,stale:T(e,!1),hidden:!1})},e.id),t[146]=n.columns,t[147]=n.rowHeight,t[148]=a,t[149]=p):p=t[149],ae=s.map(p)}t[108]=i,t[109]=W,t[110]=c,t[111]=d,t[112]=o,t[113]=n,t[114]=a,t[115]=r,t[116]=S,t[117]=G,t[118]=K,t[119]=ae,t[120]=oe,t[121]=se,t[122]=ce,t[123]=le,t[124]=W}else G=t[117],K=t[118],ae=t[119],oe=t[120],se=t[121],ce=t[122],le=t[123],W=t[124];if(le!==Symbol.for(`react.early_return_sentinel`))return le;let ue;t[150]!==G||t[151]!==K||t[152]!==ae?(ue=(0,X.jsxs)(`div`,{className:G,children:[K,ae]}),t[150]=G,t[151]=K,t[152]=ae,t[153]=ue):ue=t[153];let de;t[154]!==oe||t[155]!==se||t[156]!==ue?(de=(0,X.jsxs)(`div`,{className:oe,children:[se,ue]}),t[154]=oe,t[155]=se,t[156]=ue,t[157]=de):de=t[157];let fe;return t[158]!==ce||t[159]!==de?(fe=(0,X.jsxs)(X.Fragment,{children:[ce,de]}),t[158]=ce,t[159]=de,t[160]=fe):fe=t[160],fe},Or=(0,J.memo)(e=>{let t=(0,Y.c)(21),{output:n,cellId:r,status:i,mode:a,code:o,hidden:s,isScrollable:c,side:l,className:u,stale:d}=e,f;t[0]===i?f=t[1]:(f=x(i),t[0]=i,t[1]=f);let p=f;if((n==null||n.data===``)&&a!==`read`){let e;return t[2]!==u||t[3]!==o?(e=(0,X.jsx)(Xt,{className:u,code:o}),t[2]=u,t[3]=o,t[4]=e):e=t[4],e}let m=s&&`invisible`,h=c?`overflow-y-auto`:`overflow-y-hidden`,g=l===`top`&&`flex items-start`,_=l===`bottom`&&`flex items-end`,v=l===`left`&&`flex justify-start`,y=l===`right`&&`flex justify-end`,b;t[5]!==u||t[6]!==m||t[7]!==h||t[8]!==g||t[9]!==_||t[10]!==v||t[11]!==y?(b=q(u,`h-full w-full p-2 overflow-x-auto`,m,h,g,_,v,y),t[5]=u,t[6]=m,t[7]=h,t[8]=g,t[9]=_,t[10]=v,t[11]=y,t[12]=b):b=t[12];let S;t[13]!==r||t[14]!==p||t[15]!==n||t[16]!==d?(S=(0,X.jsx)(Be,{allowExpand:!1,output:n,cellId:r,stale:d,loading:p}),t[13]=r,t[14]=p,t[15]=n,t[16]=d,t[17]=S):S=t[17];let C;return t[18]!==b||t[19]!==S?(C=(0,X.jsx)(`div`,{className:b,children:S}),t[18]=b,t[19]=S,t[20]=C):C=t[20],C});Or.displayName=`GridCell`;var kr=e=>{let t=(0,Y.c)(38),{layout:n,setLayout:r,isLocked:i,setIsLocked:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Se,{htmlFor:`columns`,children:`Columns`}),t[0]=o):o=t[0];let s;t[1]!==n||t[2]!==r?(s=e=>{r({...n,columns:e})},t[1]=n,t[2]=r,t[3]=s):s=t[3];let c;t[4]!==n.columns||t[5]!==s?(c=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[o,(0,X.jsx)(jt,{"data-testid":`grid-columns-input`,id:`columns`,value:n.columns,className:`w-[60px]`,placeholder:`# of Columns`,minValue:1,onChange:s})]}),t[4]=n.columns,t[5]=s,t[6]=c):c=t[6];let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(Se,{htmlFor:`rowHeight`,children:`Row Height (px)`}),t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r?(u=e=>{r({...n,rowHeight:e})},t[8]=n,t[9]=r,t[10]=u):u=t[10];let d;t[11]!==n.rowHeight||t[12]!==u?(d=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[l,(0,X.jsx)(jt,{"data-testid":`grid-row-height-input`,id:`rowHeight`,value:n.rowHeight,className:`w-[60px]`,placeholder:`Row Height (px)`,minValue:1,onChange:u})]}),t[11]=n.rowHeight,t[12]=u,t[13]=d):d=t[13];let f;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(Se,{htmlFor:`maxWidth`,children:`Max Width (px)`}),t[14]=f):f=t[14];let p;t[15]!==n||t[16]!==r?(p=e=>{r({...n,maxWidth:Number.isNaN(e)?void 0:e})},t[15]=n,t[16]=r,t[17]=p):p=t[17];let m;t[18]!==n.maxWidth||t[19]!==p?(m=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[f,(0,X.jsx)(jt,{"data-testid":`grid-max-width-input`,id:`maxWidth`,value:n.maxWidth,className:`w-[90px]`,step:100,placeholder:`Full`,onChange:p})]}),t[18]=n.maxWidth,t[19]=p,t[20]=m):m=t[20];let h;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsxs)(Se,{className:`flex flex-row items-center gap-1`,htmlFor:`lock`,children:[(0,X.jsx)(Vt,{className:`h-3 w-3`}),`Bordered`]}),t[21]=h):h=t[21];let g;t[22]!==n||t[23]!==r?(g=e=>{r({...n,bordered:e})},t[22]=n,t[23]=r,t[24]=g):g=t[24];let _;t[25]!==n.bordered||t[26]!==g?(_=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[h,(0,X.jsx)(se,{"data-testid":`grid-bordered-switch`,id:`lock`,checked:n.bordered,size:`sm`,onCheckedChange:g})]}),t[25]=n.bordered,t[26]=g,t[27]=_):_=t[27];let v;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsxs)(Se,{className:`flex flex-row items-center gap-1`,htmlFor:`lock`,children:[(0,X.jsx)(ce,{className:`h-3 w-3`}),`Lock Grid`]}),t[28]=v):v=t[28];let y;t[29]!==i||t[30]!==a?(y=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[v,(0,X.jsx)(se,{"data-testid":`grid-lock-switch`,id:`lock`,checked:i,size:`sm`,onCheckedChange:a})]}),t[29]=i,t[30]=a,t[31]=y):y=t[31];let b;return t[32]!==_||t[33]!==y||t[34]!==c||t[35]!==d||t[36]!==m?(b=(0,X.jsxs)(`div`,{className:`flex flex-row absolute pl-5 top-8 gap-4 w-full justify-end pr-[350px] pb-3 border-b z-50`,children:[c,d,m,_,y]}),t[32]=_,t[33]=y,t[34]=c,t[35]=d,t[36]=m,t[37]=b):b=t[37],b},Ar=J.forwardRef((e,t)=>{let n=(0,Y.c)(30),r,i,a,o,s,c,l,u,d,f;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9],f=n[10]):({children:r,isDragging:o,className:i,onDelete:c,isScrollable:s,setIsScrollable:u,side:f,setSide:d,display:a,...l}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d,n[10]=f);let[p,m]=(0,J.useState)(),h=p&&`border-(--sky-8) z-20`,g=!p&&`hover-actions-parent`,_=o&&`bg-(--slate-2) border-border z-20`,v;n[11]!==i||n[12]!==h||n[13]!==g||n[14]!==_?(v=q(i,`relative z-10 hover:z-20`,`bg-background border-transparent hover:border-(--sky-8) border`,h,g,_),n[11]=i,n[12]=h,n[13]=g,n[14]=_,n[15]=v):v=n[15];let y;n[16]!==a||n[17]!==s||n[18]!==c||n[19]!==p||n[20]!==u||n[21]!==d||n[22]!==f?(y=(0,X.jsx)(jr,{onDelete:c,isScrollable:s,setIsScrollable:u,side:f,setSide:d,display:a,setPopoverOpened:m,popoverOpened:p}),n[16]=a,n[17]=s,n[18]=c,n[19]=p,n[20]=u,n[21]=d,n[22]=f,n[23]=y):y=n[23];let b;return n[24]!==r||n[25]!==t||n[26]!==l||n[27]!==v||n[28]!==y?(b=(0,X.jsxs)(`div`,{ref:t,...l,className:v,children:[r,y]}),n[24]=r,n[25]=t,n[26]=l,n[27]=v,n[28]=y,n[29]=b):b=n[29],b});Ar.displayName=`EditableGridCell`;var jr=e=>{let t=(0,Y.c)(43),{display:n,onDelete:r,side:i,setSide:a,isScrollable:o,setIsScrollable:s,popoverOpened:c,setPopoverOpened:l}=e,u=i===`left`?nn:i===`right`?en:void 0,d=!c&&`hover-action`,f=n===`top`&&`-top-6 rounded-t`,p=n===`bottom`&&`-bottom-6 rounded-b`,m;t[0]!==d||t[1]!==f||t[2]!==p?(m=q(`absolute right-0 p-1 bg-(--sky-8) text-white h-6 z-10 flex gap-2`,d,f,p),t[0]=d,t[1]=f,t[2]=p,t[3]=m):m=t[3];let h=c===`side`,g;t[4]===l?g=t[5]:(g=e=>l(e?`side`:void 0),t[4]=l,t[5]=g);let _;t[6]===u?_=t[7]:(_=(0,X.jsx)(ke,{asChild:!0,children:u?(0,X.jsx)(u,{className:`h-4 w-4 opacity-60 hover:opacity-100`}):(0,X.jsx)(tn,{className:`h-4 w-4 opacity-60 hover:opacity-100`})}),t[6]=u,t[7]=_);let v;t[8]!==a||t[9]!==i?(v=ne.entries(Nr).map(e=>{let[t,n]=e;return(0,X.jsxs)(De,{onSelect:()=>a(t),children:[(0,X.jsx)(n,{className:`h-4 w-3 mr-2`}),(0,X.jsx)(`span`,{className:`flex-1`,children:$e.startCase(t)}),t===i&&(0,X.jsx)(it,{className:`h-4 w-4`})]},t)}),t[8]=a,t[9]=i,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,X.jsx)(Ae,{side:`bottom`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==h||t[14]!==g||t[15]!==_||t[16]!==y?(b=(0,X.jsxs)(je,{open:h,onOpenChange:g,children:[_,y]}),t[13]=h,t[14]=g,t[15]=_,t[16]=y,t[17]=b):b=t[17];let x=c===`scroll`,S;t[18]===l?S=t[19]:(S=e=>l(e?`scroll`:void 0),t[18]=l,t[19]=S);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(ke,{asChild:!0,children:(0,X.jsx)(dn,{className:`h-4 w-4 opacity-60 hover:opacity-100`})}),t[20]=C):C=t[20];let w;t[21]!==o||t[22]!==s?(w=()=>s(!o),t[21]=o,t[22]=s,t[23]=w):w=t[23];let T;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(`span`,{className:`flex-1`,children:`Scrollable`}),t[24]=T):T=t[24];let E;t[25]!==o||t[26]!==s?(E=(0,X.jsx)(se,{"data-testid":`grid-scrollable-switch`,checked:o,size:`sm`,onCheckedChange:s}),t[25]=o,t[26]=s,t[27]=E):E=t[27];let D;t[28]!==w||t[29]!==E?(D=(0,X.jsx)(Ae,{side:`bottom`,children:(0,X.jsxs)(De,{onSelect:w,children:[T,E]})}),t[28]=w,t[29]=E,t[30]=D):D=t[30];let O;t[31]!==x||t[32]!==S||t[33]!==D?(O=(0,X.jsxs)(je,{open:x,onOpenChange:S,children:[C,D]}),t[31]=x,t[32]=S,t[33]=D,t[34]=O):O=t[34];let k;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,X.jsx)(Ie,{className:q(Er,`cursor-move`,`h-4 w-4 opacity-60 hover:opacity-100`)}),t[35]=k):k=t[35];let A;t[36]===r?A=t[37]:(A=(0,X.jsx)(at,{className:`h-4 w-4 opacity-60 hover:opacity-100`,onClick:()=>r()}),t[36]=r,t[37]=A);let j;return t[38]!==b||t[39]!==O||t[40]!==A||t[41]!==m?(j=(0,X.jsxs)(`div`,{className:m,children:[b,O,k,A]}),t[38]=b,t[39]=O,t[40]=A,t[41]=m,t[42]=j):j=t[42],j};function Mr(e){return typeof e.output?.data==`string`&&e.output.data.includes(`marimo-sidebar`)}var Nr={left:nn,right:en};function Pr(e){return e.i}function Fr(e){return e.i}function Ir(){window.dispatchEvent(new Event(`resize`))}function Lr(e){return Mr(e)}var Rr={type:`grid`,name:`Grid`,validator:I({columns:M().min(1),rowHeight:M().min(1),maxWidth:M().nullish().transform(e=>e??void 0).catch(void 0),bordered:F().optional().catch(void 0),cells:N(I({position:P([M(),M(),M(),M()]).nullable().catch(null),scrollable:F().optional().catch(void 0),side:L([`top`,`bottom`,`left`,`right`]).optional().catch(void 0)}).catch({position:null}))}),deserializeLayout:(e,t)=>{if(e.cells.length===0)return{columns:e.columns,rowHeight:e.rowHeight,scrollableCells:new Set,cellSide:new Map,cells:[]};e.cells.length!==t.length&&B.warn(`Number of cells in layout does not match number of cells in notebook`);let n=new Set,r=new Map,i=e.cells.flatMap((e,i)=>{let a=e.position;if(!a)return[];let o=t[i];return o?(e.scrollable&&n.add(o.id),e.side&&r.set(o.id,e.side),{i:o.id,x:a[0],y:a[1],w:a[2],h:a[3]}):[]});return{columns:e.columns,rowHeight:e.rowHeight,maxWidth:e.maxWidth,bordered:e.bordered,cells:i,cellSide:r,scrollableCells:n}},serializeLayout:(e,t)=>{let n=st.keyBy(e.cells,e=>e.i),r=t.map(t=>{let r=n.get(t.id);if(!r)return{position:null};let i={position:[r.x,r.y,r.w,r.h]};return e.scrollableCells.has(t.id)&&(i.scrollable=!0),e.cellSide.has(t.id)&&(i.side=e.cellSide.get(t.id)),i});return{columns:e.columns,rowHeight:e.rowHeight,maxWidth:e.maxWidth,bordered:e.bordered,cells:r}},Component:Dr,getInitialLayout:()=>({columns:24,rowHeight:20,maxWidth:1400,bordered:!0,scrollableCells:new Set,cellSide:new Map,cells:[]})};function zr(e){return e.output!=null&&e.output.data!==``}function Br(e,t){let n=[...e],r=new Set,i=new Set,a=new Map,o=null,s=0;for(let[e,c]of n.entries()){let n=t.cells.get(c.id)?.type,l=zr(c);n&&a.set(c.id,n),l||i.add(c.id),n===`skip`||!l?r.add(c.id):o===null&&(o=c,s=e)}return{slideCells:n,skippedIds:r,noOutputIds:i,slideTypes:a,startCellIndex:s}}function Vr(){var e=[...arguments];return(0,J.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Hr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ur(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Wr(e){return`nodeType`in e}function Gr(e){return e?Ur(e)?e:Wr(e)?e.ownerDocument?.defaultView??window:window:window}function Kr(e){let{Document:t}=Gr(e);return e instanceof t}function qr(e){return!Ur(e)&&e instanceof Gr(e).HTMLElement}function Jr(e){return e instanceof Gr(e).SVGElement}function Yr(e){return e?Ur(e)?e.document:Wr(e)?Kr(e)?e:qr(e)||Jr(e)?e.ownerDocument:document:document:document}var Xr=Hr?J.useLayoutEffect:J.useEffect;function Zr(e){let t=(0,J.useRef)(e);return Xr(()=>{t.current=e}),(0,J.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Qr(){let e=(0,J.useRef)(null);return[(0,J.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,J.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function $r(e,t){t===void 0&&(t=[e]);let n=(0,J.useRef)(e);return Xr(()=>{n.current!==e&&(n.current=e)},t),n}function ei(e,t){let n=(0,J.useRef)();return(0,J.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function ti(e){let t=Zr(e),n=(0,J.useRef)(null);return[n,(0,J.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function ni(e){let t=(0,J.useRef)();return(0,J.useEffect)(()=>{t.current=e},[e]),t.current}var ri={};function ii(e,t){return(0,J.useMemo)(()=>{if(t)return t;let n=ri[e]==null?0:ri[e]+1;return ri[e]=n,e+`-`+n},[e,t])}function ai(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var oi=ai(1),si=ai(-1);function ci(e){return`clientX`in e&&`clientY`in e}function li(e){if(!e)return!1;let{KeyboardEvent:t}=Gr(e.target);return t&&e instanceof t}function ui(e){if(!e)return!1;let{TouchEvent:t}=Gr(e.target);return t&&e instanceof t}function di(e){if(ui(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ci(e)?{x:e.clientX,y:e.clientY}:null}var fi=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[fi.Translate.toString(e),fi.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),pi=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function mi(e){return e.matches(pi)?e:e.querySelector(pi)}var hi={display:`none`};function gi(e){let{id:t,value:n}=e;return J.createElement(`div`,{id:t,style:hi},n)}function _i(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return J.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function vi(){let[e,t]=(0,J.useState)(``);return{announce:(0,J.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var yi=e(A()),bi=(0,J.createContext)(null);function xi(e){let t=(0,J.useContext)(bi);(0,J.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Si(){let[e]=(0,J.useState)(()=>new Set),t=(0,J.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,J.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Ci={draggable:`
4
+ `,e.getElementsByTagName(`head`)[0].appendChild(t)),e.body&&S(e.body,`react-draggable-transparent-selection`)}function b(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{x(e)}):x(e)}function x(e){if(e)try{if(e.body&&C(e.body,`react-draggable-transparent-selection`),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function S(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function C(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}})),Dn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.canDragX=a,e.canDragY=o,e.createCoreData=c,e.createDraggableData=l,e.getBoundPosition=r,e.getControlPosition=s,e.snapToGrid=i;var t=wn(),n=En();function r(e,r,i){if(!e.props.bounds)return[r,i];let{bounds:a}=e.props;a=typeof a==`string`?a:u(a);let o=d(e);if(typeof a==`string`){let{ownerDocument:e}=o,r=e.defaultView,i;if(i=a===`parent`?o.parentNode:o.getRootNode().querySelector(a),!(i instanceof r.HTMLElement))throw Error(`Bounds selector "`+a+`" could not find an element.`);let s=i,c=r.getComputedStyle(o),l=r.getComputedStyle(s);a={left:-o.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(c.marginLeft),top:-o.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(c.marginTop),right:(0,n.innerWidth)(s)-(0,n.outerWidth)(o)-o.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(c.marginRight),bottom:(0,n.innerHeight)(s)-(0,n.outerHeight)(o)-o.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(c.marginBottom)}}return(0,t.isNum)(a.right)&&(r=Math.min(r,a.right)),(0,t.isNum)(a.bottom)&&(i=Math.min(i,a.bottom)),(0,t.isNum)(a.left)&&(r=Math.max(r,a.left)),(0,t.isNum)(a.top)&&(i=Math.max(i,a.top)),[r,i]}function i(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function a(e){return e.props.axis===`both`||e.props.axis===`x`}function o(e){return e.props.axis===`both`||e.props.axis===`y`}function s(e,t,r){let i=typeof t==`number`?(0,n.getTouch)(e,t):null;if(typeof t==`number`&&!i)return null;let a=d(r),o=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,n.offsetXYFromParent)(i||e,o,r.props.scale)}function c(e,n,r){let i=!(0,t.isNum)(e.lastX),a=d(e);return i?{node:a,deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}:{node:a,deltaX:n-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:n,y:r}}function l(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function u(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function d(e){let t=e.findDOMNode();if(!t)throw Error(`<DraggableCore>: Unmounted during event!`);return t}})),On=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){}})),kn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(u()),n=c(Ht()),r=c(A()),i=En(),a=Dn(),o=wn(),s=c(On());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function d(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,`string`);return typeof t==`symbol`?t:t+``}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var m={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},h=m.mouse,g=class extends t.Component{constructor(){super(...arguments),d(this,`dragging`,!1),d(this,`lastX`,NaN),d(this,`lastY`,NaN),d(this,`touchIdentifier`,null),d(this,`mounted`,!1),d(this,`handleDragStart`,e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button==`number`&&e.button!==0)return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(`<DraggableCore> not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;let o=(0,a.getControlPosition)(e,r,this);if(o==null)return;let{x:c,y:l}=o,u=(0,a.createCoreData)(this,c,l);(0,s.default)(`DraggableCore: handleDragStart: %j`,u),(0,s.default)(`calling`,this.props.onStart),this.props.onStart(e,u)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=c,this.lastY=l,(0,i.addEvent)(n,h.move,this.handleDrag),(0,i.addEvent)(n,h.stop,this.handleDragStop))}),d(this,`handleDrag`,e=>{let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,a.createCoreData)(this,n,r);if((0,s.default)(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r}),d(this,`handleDragStop`,e=>{if(!this.dragging)return;let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let o=(0,a.createCoreData)(this,n,r);if(this.props.onStop(e,o)===!1||this.mounted===!1)return!1;let c=this.findDOMNode();c&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(c.ownerDocument),(0,s.default)(`DraggableCore: handleDragStop: %j`,o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,c&&((0,s.default)(`DraggableCore: Removing handlers`),(0,i.removeEvent)(c.ownerDocument,h.move,this.handleDrag),(0,i.removeEvent)(c.ownerDocument,h.stop,this.handleDragStop))}),d(this,`onMouseDown`,e=>(h=m.mouse,this.handleDragStart(e))),d(this,`onMouseUp`,e=>(h=m.mouse,this.handleDragStop(e))),d(this,`onTouchStart`,e=>(h=m.touch,this.handleDragStart(e))),d(this,`onTouchEnd`,e=>(h=m.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&(0,i.addEvent)(e,m.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;(0,i.removeEvent)(t,m.mouse.move,this.handleDrag),(0,i.removeEvent)(t,m.touch.move,this.handleDrag),(0,i.removeEvent)(t,m.mouse.stop,this.handleDragStop),(0,i.removeEvent)(t,m.touch.stop,this.handleDragStop),(0,i.removeEvent)(e,m.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};e.default=g,d(g,`displayName`,`DraggableCore`),d(g,`propTypes`,{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),d(g,`defaultProps`,{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),An=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=f(u()),n=d(Ht()),r=d(A()),i=bn(),a=En(),o=Dn(),s=wn(),c=d(kn()),l=d(On());function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(f=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function m(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=g(e,`string`);return typeof t==`symbol`?t:t+``}function g(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _=class extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return n&&(!r||n.x!==r.x||n.y!==r.y)?((0,l.default)(`Draggable: getDerivedStateFromProps %j`,{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(e){super(e),m(this,`onDragStart`,(e,t)=>{if((0,l.default)(`Draggable: onDragStart: %j`,t),this.props.onStart(e,(0,o.createDraggableData)(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),m(this,`onDrag`,(e,t)=>{if(!this.state.dragging)return!1;(0,l.default)(`Draggable: onDrag: %j`,t);let n=(0,o.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=(0,o.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)}),m(this,`onDragStop`,(e,t)=>{if(!this.state.dragging||this.props.onStop(e,(0,o.createDraggableData)(this,t))===!1)return!1;(0,l.default)(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){let{axis:e,bounds:n,children:r,defaultPosition:s,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:f,positionOffset:m,scale:h,...g}=this.props,_={},v=null,y=!f||this.state.dragging,b=f||s,x={x:(0,o.canDragX)(this)&&y?this.state.x:b.x,y:(0,o.canDragY)(this)&&y?this.state.y:b.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(x,m):_=(0,a.createCSSTransform)(x,m);let S=(0,i.clsx)(r.props.className||``,l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:S,style:{...r.props.style,..._},transform:v}))}};e.default=_,m(_,`displayName`,`Draggable`),m(_,`propTypes`,{...c.default.propTypes,axis:n.default.oneOf([`both`,`x`,`y`,`none`]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),m(_,`defaultProps`,{...c.default.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1})})),jn=i(((e,t)=>{var{default:n,DraggableCore:r}=An();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Mn=i((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(u());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return t=o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=s(e,`string`);return typeof t==`symbol`?t:String(t)}function s(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function c(e,n){return n.style&&e.props.style&&(n.style=i(i({},e.props.style),n.style)),n.className&&e.props.className&&(n.className=e.props.className+` `+n.className),t.default.cloneElement(e,n)}})),Nn=i((e=>{e.__esModule=!0,e.resizableProps=void 0;var t=n(Ht());jn();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments],n=e[0];if(n.axis===`both`||n.axis===`y`){var r;return(r=t.default.number).isRequired.apply(r,e)}return t.default.number.apply(t.default,e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments],n=e[0];if(n.axis===`both`||n.axis===`x`){var r;return(r=t.default.number).isRequired.apply(r,e)}return t.default.number.apply(t.default,e)}}})),Pn=i((e=>{e.__esModule=!0,e.default=void 0;var t=s(u()),n=jn(),r=Mn(),i=Nn(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function l(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return t=m(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:String(t)}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var v=function(e){g(i,e);function i(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.handleRefs={},t.lastHandleRect=null,t.slack=null,t}var o=i.prototype;return o.componentWillUnmount=function(){this.resetData()},o.resetData=function(){this.lastHandleRect=this.slack=null},o.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,i=n.maxConstraints,a=n.lockAspectRatio;if(!r&&!i&&!a)return[e,t];if(a){var o=this.props.width/this.props.height,s=e-this.props.width,c=t-this.props.height;Math.abs(s)>Math.abs(c*o)?t=e/o:e=t*o}var l=e,u=t,d=this.slack||[0,0],f=d[0],p=d[1];return e+=f,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[f+(l-e),p+(u-t)],[e,t]},o.resizeHandler=function(e,t){var n=this;return function(r,i){var a=i.node,o=i.deltaX,s=i.deltaY;e===`onResizeStart`&&n.resetData();var c=(n.props.axis===`both`||n.props.axis===`x`)&&t!==`n`&&t!==`s`,l=(n.props.axis===`both`||n.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!(!c&&!l)){var u=t[0],d=t[t.length-1],f=a.getBoundingClientRect();if(n.lastHandleRect!=null){if(d===`w`){var p=f.left-n.lastHandleRect.left;o+=p}if(u===`n`){var m=f.top-n.lastHandleRect.top;s+=m}}n.lastHandleRect=f,d===`w`&&(o=-o),u===`n`&&(s=-s);var h=n.props.width+(c?o/n.props.transformScale:0),g=n.props.height+(l?s/n.props.transformScale:0),_=n.runConstraints(h,g);h=_[0],g=_[1];var v=h!==n.props.width||g!==n.props.height,y=typeof n.props[e]==`function`?n.props[e]:null;y&&!(e===`onResize`&&!v)&&(r.persist==null||r.persist(),y(r,{node:a,size:{width:h,height:g},handle:t})),e===`onResizeStop`&&n.resetData()}}},o.renderResizeHandle=function(e,n){var r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);var i=typeof r.type==`string`,a=f({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)},o.render=function(){var e=this,i=this.props,o=i.children,s=i.className,u=i.draggableOpts;i.width,i.height,i.handle,i.handleSize,i.lockAspectRatio,i.axis,i.minConstraints,i.maxConstraints,i.onResize,i.onResizeStop,i.onResizeStart;var d=i.resizeHandles;i.transformScale;var p=l(i,a);return(0,r.cloneElement)(o,f(f({},p),{},{className:(s?s+` `:``)+`react-resizable`,children:[].concat(o.props.children,d.map(function(r){var i=e.handleRefs[r]??(e.handleRefs[r]=t.createRef());return t.createElement(n.DraggableCore,c({},u,{nodeRef:i,key:`resizableHandle-`+r,onStop:e.resizeHandler(`onResizeStop`,r),onStart:e.resizeHandler(`onResizeStart`,r),onDrag:e.resizeHandler(`onResize`,r)}),e.renderResizeHandle(r,i))}))}))},i}(t.Component);e.default=v,v.propTypes=i.resizableProps,v.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Fn=i((e=>{e.__esModule=!0,e.default=void 0;var t=c(u()),n=o(Ht()),r=o(Pn()),i=Nn(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return t=m(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:String(t)}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var y=function(e){_(n,e);function n(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(e.persist==null||e.persist(),t.setState(r,function(){return t.props.onResize&&t.props.onResize(e,n)})):t.setState(r)},t}n.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null};var i=n.prototype;return i.render=function(){var e=this.props,n=e.handle,i=e.handleSize;e.onResize;var o=e.onResizeStart,s=e.onResizeStop,c=e.draggableOpts,u=e.minConstraints,d=e.maxConstraints,p=e.lockAspectRatio,m=e.axis;e.width,e.height;var h=e.resizeHandles,_=e.style,v=e.transformScale,y=g(e,a);return t.createElement(r.default,{axis:m,draggableOpts:c,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:d,minConstraints:u,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:h,transformScale:v,width:this.state.width},t.createElement(`div`,l({},y,{style:f(f({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))},n}(t.Component);e.default=y,y.propTypes=f(f({},i.resizableProps),{},{children:n.default.element})})),In=i(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Pn().default,t.exports.ResizableBox=Fn().default})),Ln=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resizeHandleType=e.resizeHandleAxesType=e.default=void 0;var t=r(Ht()),n=r(u());function r(e){return e&&e.__esModule?e:{default:e}}var i=e.resizeHandleAxesType=t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),a=e.resizeHandleType=t.default.oneOfType([t.default.node,t.default.func]);e.default={className:t.default.string,style:t.default.object,width:t.default.number,autoSize:t.default.bool,cols:t.default.number,draggableCancel:t.default.string,draggableHandle:t.default.string,verticalCompact:function(e){e.verticalCompact},compactType:t.default.oneOf([`vertical`,`horizontal`]),layout:function(e){var t=e.layout;t!==void 0&&Sn().validateLayout(t,`layout`)},margin:t.default.arrayOf(t.default.number),containerPadding:t.default.arrayOf(t.default.number),rowHeight:t.default.number,maxRows:t.default.number,isBounded:t.default.bool,isDraggable:t.default.bool,isResizable:t.default.bool,allowOverlap:t.default.bool,preventCollision:t.default.bool,useCSSTransforms:t.default.bool,transformScale:t.default.number,isDroppable:t.default.bool,resizeHandles:i,resizeHandle:a,onLayoutChange:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onDragStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,onResizeStop:t.default.func,onDrop:t.default.func,droppingItem:t.default.shape({i:t.default.string.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired}),children:function(e,t){let r=e[t],i={};n.default.Children.forEach(r,function(e){if(e?.key!=null){if(i[e.key])throw Error(`Duplicate child key "`+e.key+`" found! This will cause problems in ReactGridLayout.`);i[e.key]=!0}})},innerRef:t.default.any}})),Rn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=d(u()),n=A(),r=d(Ht()),i=jn(),a=In(),o=Sn(),s=Cn(),c=Ln(),l=d(bn());function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?f(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=g(e,`string`);return typeof t==`symbol`?t:t+``}function g(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _=class extends t.default.Component{constructor(){super(...arguments),m(this,`state`,{resizing:null,dragging:null,className:``}),m(this,`elementRef`,t.default.createRef()),m(this,`onDragStart`,(e,t)=>{let{node:n}=t,{onDragStart:r,transformScale:i}=this.props;if(!r)return;let a={top:0,left:0},{offsetParent:o}=n;if(!o)return;let c=o.getBoundingClientRect(),l=n.getBoundingClientRect(),u=l.left/i,d=c.left/i,f=l.top/i,p=c.top/i;a.left=u-d+o.scrollLeft,a.top=f-p+o.scrollTop,this.setState({dragging:a});let{x:m,y:h}=(0,s.calcXY)(this.getPositionParams(),a.top,a.left,this.props.w,this.props.h);return r.call(this,this.props.i,m,h,{e,node:n,newPosition:a})}),m(this,`onDrag`,(e,t,r)=>{let{node:i,deltaX:a,deltaY:o}=t,{onDrag:c}=this.props;if(!c)return;if(!this.state.dragging)throw Error(`onDrag called before onDragStart.`);let l=this.state.dragging.top+o,u=this.state.dragging.left+a,{isBounded:d,i:f,w:p,h:m,containerWidth:h}=this.props,g=this.getPositionParams();if(d){let{offsetParent:e}=i;if(e){let{margin:t,rowHeight:n}=this.props,r=e.clientHeight-(0,s.calcGridItemWHPx)(m,n,t[1]);l=(0,s.clamp)(l,0,r);let i=(0,s.calcGridColWidth)(g),a=h-(0,s.calcGridItemWHPx)(p,i,t[0]);u=(0,s.clamp)(u,0,a)}}let _={top:l,left:u};r?this.setState({dragging:_}):(0,n.flushSync)(()=>{this.setState({dragging:_})});let{x:v,y}=(0,s.calcXY)(g,l,u,p,m);return c.call(this,f,v,y,{e,node:i,newPosition:_})}),m(this,`onDragStop`,(e,t)=>{let{node:n}=t,{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw Error(`onDragEnd called before onDragStart.`);let{w:i,h:a,i:o}=this.props,{left:c,top:l}=this.state.dragging,u={top:l,left:c};this.setState({dragging:null});let{x:d,y:f}=(0,s.calcXY)(this.getPositionParams(),l,c,i,a);return r.call(this,o,d,f,{e,node:n,newPosition:u})}),m(this,`onResizeStop`,(e,t,n)=>this.onResizeHandler(e,t,n,`onResizeStop`)),m(this,`onResizeStart`,(e,t,n)=>this.onResizeHandler(e,t,n,`onResizeStart`)),m(this,`onResize`,(e,t,n)=>this.onResizeHandler(e,t,n,`onResize`))}shouldComponentUpdate(e,t){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;let n=(0,s.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,s.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,o.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){let{droppingPosition:t}=this.props;if(!t)return;let n=this.elementRef.current;if(!n)return;let r=e.droppingPosition||{left:0,top:0},{dragging:i}=this.state,a=i&&t.left!==r.left||t.top!==r.top;if(!i)this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top});else if(a){let e=t.left-i.left,r=t.top-i.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r},!0)}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){let{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props,i;return r?i=(0,o.setTransform)(e):(i=(0,o.setTopLeft)(e),t&&(i.left=(0,o.perc)(e.left/n),i.width=(0,o.perc)(e.width/n))),i}mixinDraggable(e,n){return t.default.createElement(i.DraggableCore,{disabled:!n,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:`.react-resizable-handle`+(this.props.cancel?`,`+this.props.cancel:``),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(e,n,r){let{cols:i,minW:o,minH:c,maxW:l,maxH:u,transformScale:d,resizeHandles:f,resizeHandle:p}=this.props,m=this.getPositionParams(),h=(0,s.calcGridItemPosition)(m,0,0,i,0).width,g=(0,s.calcGridItemPosition)(m,0,0,o,c),_=(0,s.calcGridItemPosition)(m,0,0,l,u),v=[g.width,g.height],y=[Math.min(_.width,h),Math.min(_.height,1/0)];return t.default.createElement(a.Resizable,{draggableOpts:{disabled:!r},className:r?void 0:`react-resizable-hide`,width:n.width,height:n.height,minConstraints:v,maxConstraints:y,onResizeStop:this.curryResizeHandler(n,this.onResizeStop),onResizeStart:this.curryResizeHandler(n,this.onResizeStart),onResize:this.curryResizeHandler(n,this.onResize),transformScale:d,resizeHandles:f,handle:p},e)}onResizeHandler(e,t,r,i){let{node:a,size:c,handle:l}=t,u=this.props[i];if(!u)return;let{x:d,y:f,i:p,maxH:m,minH:h,containerWidth:g}=this.props,{minW:_,maxW:v}=this.props,y=c;a&&(y=(0,o.resizeItemInDirection)(l,r,c,g),(0,n.flushSync)(()=>{this.setState({resizing:i===`onResizeStop`?null:y})}));let{w:b,h:x}=(0,s.calcWH)(this.getPositionParams(),y.width,y.height,d,f,l);b=(0,s.clamp)(b,Math.max(_,1),v),x=(0,s.clamp)(x,h,m),u.call(this,p,b,x,{e,node:a,size:y,handle:l})}render(){let{x:e,y:n,w:r,h:i,isDraggable:a,isResizable:o,droppingPosition:c,useCSSTransforms:u}=this.props,d=(0,s.calcGridItemPosition)(this.getPositionParams(),e,n,r,i,this.state),f=t.default.Children.only(this.props.children),m=t.default.cloneElement(f,{ref:this.elementRef,className:(0,l.default)(`react-grid-item`,f.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":a,"react-draggable-dragging":!!this.state.dragging,dropping:!!c,cssTransforms:u}),style:p(p(p({},this.props.style),f.props.style),this.createStyle(d))});return m=this.mixinResizable(m,d,o),m=this.mixinDraggable(m,a),m}};e.default=_,m(_,`propTypes`,{children:r.default.element,cols:r.default.number.isRequired,containerWidth:r.default.number.isRequired,rowHeight:r.default.number.isRequired,margin:r.default.array.isRequired,maxRows:r.default.number.isRequired,containerPadding:r.default.array.isRequired,x:r.default.number.isRequired,y:r.default.number.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired,minW:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`minWidth not Number`);if(n>e.w||n>e.maxW)return Error(`minWidth larger than item width/maxWidth`)},maxW:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`maxWidth not Number`);if(n<e.w||n<e.minW)return Error(`maxWidth smaller than item width/minWidth`)},minH:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`minHeight not Number`);if(n>e.h||n>e.maxH)return Error(`minHeight larger than item height/maxHeight`)},maxH:function(e,t){let n=e[t];if(typeof n!=`number`)return Error(`maxHeight not Number`);if(n<e.h||n<e.minH)return Error(`maxHeight smaller than item height/minHeight`)},i:r.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onResizeStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,isDraggable:r.default.bool.isRequired,isResizable:r.default.bool.isRequired,isBounded:r.default.bool.isRequired,static:r.default.bool,useCSSTransforms:r.default.bool.isRequired,transformScale:r.default.number,className:r.default.string,handle:r.default.string,cancel:r.default.string,droppingPosition:r.default.shape({e:r.default.object.isRequired,left:r.default.number.isRequired,top:r.default.number.isRequired})}),m(_,`defaultProps`,{className:``,cancel:``,handle:``,minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})})),zn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(u()),n=yn(),r=c(bn()),i=Sn(),a=Cn(),o=c(Rn()),s=c(Ln());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g=`react-grid-layout`,_=!1;try{_=/firefox/i.test(navigator.userAgent)}catch{}var v=class extends t.Component{constructor(){super(...arguments),p(this,`state`,{activeDrag:null,layout:(0,i.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,i.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),p(this,`dragEnterCounter`,0),p(this,`onDragStart`,(e,t,n,r)=>{let{e:a,node:o}=r,{layout:s}=this.state,c=(0,i.getLayoutItem)(s,e);if(!c)return;let l={w:c.w,h:c.h,x:c.x,y:c.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,i.cloneLayoutItem)(c),oldLayout:s,activeDrag:l}),this.props.onDragStart(s,c,c,null,a,o)}),p(this,`onDrag`,(e,t,n,r)=>{let{e:a,node:o}=r,{oldDragItem:s}=this.state,{layout:c}=this.state,{cols:l,allowOverlap:u,preventCollision:d}=this.props,f=(0,i.getLayoutItem)(c,e);if(!f)return;let p={w:f.w,h:f.h,x:f.x,y:f.y,placeholder:!0,i:e};c=(0,i.moveElement)(c,f,t,n,!0,d,(0,i.compactType)(this.props),l,u),this.props.onDrag(c,s,f,p,a,o),this.setState({layout:u?c:(0,i.compact)(c,(0,i.compactType)(this.props),l),activeDrag:p})}),p(this,`onDragStop`,(e,t,n,r)=>{let{e:a,node:o}=r;if(!this.state.activeDrag)return;let{oldDragItem:s}=this.state,{layout:c}=this.state,{cols:l,preventCollision:u,allowOverlap:d}=this.props,f=(0,i.getLayoutItem)(c,e);if(!f)return;c=(0,i.moveElement)(c,f,t,n,!0,u,(0,i.compactType)(this.props),l,d);let p=d?c:(0,i.compact)(c,(0,i.compactType)(this.props),l);this.props.onDragStop(p,s,f,null,a,o);let{oldLayout:m}=this.state;this.setState({activeDrag:null,layout:p,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,m)}),p(this,`onResizeStart`,(e,t,n,r)=>{let{e:a,node:o}=r,{layout:s}=this.state,c=(0,i.getLayoutItem)(s,e);c&&(this.setState({oldResizeItem:(0,i.cloneLayoutItem)(c),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,c,c,null,a,o))}),p(this,`onResize`,(e,t,n,r)=>{let{e:a,node:o,size:s,handle:c}=r,{oldResizeItem:l}=this.state,{layout:u}=this.state,{cols:d,preventCollision:p,allowOverlap:m}=this.props,h=!1,g,_,v,[y,b]=(0,i.withLayoutItem)(u,e,e=>{let r;return _=e.x,v=e.y,[`sw`,`w`,`nw`,`n`,`ne`].indexOf(c)!==-1&&([`sw`,`nw`,`w`].indexOf(c)!==-1&&(_=e.x+(e.w-t),t=e.x!==_&&_<0?e.w:t,_=_<0?0:_),[`ne`,`n`,`nw`].indexOf(c)!==-1&&(v=e.y+(e.h-n),n=e.y!==v&&v<0?e.h:n,v=v<0?0:v),h=!0),p&&!m&&(r=(0,i.getAllCollisions)(u,f(f({},e),{},{w:t,h:n,x:_,y:v})).filter(t=>t.i!==e.i).length>0,r&&(v=e.y,n=e.h,_=e.x,t=e.w,h=!1)),e.w=t,e.h=n,e});if(!b)return;g=y,h&&(g=(0,i.moveElement)(y,b,_,v,!0,this.props.preventCollision,(0,i.compactType)(this.props),d,m));let x={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(g,l,b,x,a,o),this.setState({layout:m?g:(0,i.compact)(g,(0,i.compactType)(this.props),d),activeDrag:x})}),p(this,`onResizeStop`,(e,t,n,r)=>{let{e:a,node:o}=r,{layout:s,oldResizeItem:c}=this.state,{cols:l,allowOverlap:u}=this.props,d=(0,i.getLayoutItem)(s,e),f=u?s:(0,i.compact)(s,(0,i.compactType)(this.props),l);this.props.onResizeStop(f,c,d,null,a,o);let{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(f,p)}),p(this,`onDragOver`,e=>{var n;if(e.preventDefault(),e.stopPropagation(),_&&!((n=e.nativeEvent.target)!=null&&n.classList.contains(g)))return!1;let{droppingItem:r,onDropDragOver:i,margin:o,cols:s,rowHeight:c,maxRows:l,width:u,containerPadding:d,transformScale:p}=this.props,m=i?.(e);if(m===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;let h=f(f({},r),m),{layout:v}=this.state,y=e.currentTarget.getBoundingClientRect(),b=e.clientX-y.left,x=e.clientY-y.top,S={left:b/p,top:x/p,e};if(!this.state.droppingDOMNode){let e={cols:s,margin:o,maxRows:l,rowHeight:c,containerWidth:u,containerPadding:d||o},n=(0,a.calcXY)(e,x,b,h.w,h.h);this.setState({droppingDOMNode:t.createElement(`div`,{key:h.i}),droppingPosition:S,layout:[...v,f(f({},h),{},{x:n.x,y:n.y,static:!1,isDraggable:!0})]})}else if(this.state.droppingPosition){let{left:e,top:t}=this.state.droppingPosition;(e!=b||t!=x)&&this.setState({droppingPosition:S})}}),p(this,`removeDroppingPlaceholder`,()=>{let{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,r=(0,i.compact)(n.filter(t=>t.i!==e.i),(0,i.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:r,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),p(this,`onDragLeave`,e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),p(this,`onDragEnter`,e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++}),p(this,`onDrop`,e=>{e.preventDefault(),e.stopPropagation();let{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find(e=>e.i===t.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,t){let r;return t.activeDrag?null:(!(0,n.deepEqual)(e.layout,t.propsLayout)||e.compactType!==t.compactType?r=e.layout:(0,i.childrenEqual)(e.children,t.children)||(r=t.layout),r?{layout:(0,i.synchronizeLayoutWithChildren)(r,e.children,e.cols,(0,i.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}shouldComponentUpdate(e,t){return this.props.children!==e.children||!(0,i.fastRGLPropsEqual)(this.props,e,n.deepEqual)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){let e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;let e=(0,i.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+t*2+`px`}onLayoutMaybeChanged(e,t){t||=this.state.layout,(0,n.deepEqual)(t,e)||this.props.onLayoutChange(e)}placeholder(){let{activeDrag:e}=this.state;if(!e)return null;let{width:n,cols:r,margin:i,containerPadding:a,rowHeight:s,maxRows:c,useCSSTransforms:l,transformScale:u}=this.props;return t.createElement(o.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:`react-grid-placeholder ${this.state.resizing?`placeholder-resizing`:``}`,containerWidth:n,cols:r,margin:i,containerPadding:a||i,maxRows:c,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:l,transformScale:u},t.createElement(`div`,null))}processGridItem(e,n){if(!e||!e.key)return;let r=(0,i.getLayoutItem)(this.state.layout,String(e.key));if(!r)return null;let{width:a,cols:s,margin:c,containerPadding:l,rowHeight:u,maxRows:d,isDraggable:f,isResizable:p,isBounded:m,useCSSTransforms:h,transformScale:g,draggableCancel:_,draggableHandle:v,resizeHandles:y,resizeHandle:b}=this.props,{mounted:x,droppingPosition:S}=this.state,C=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&f,w=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&p,T=r.resizeHandles||y,E=C&&m&&r.isBounded!==!1;return t.createElement(o.default,{containerWidth:a,cols:s,margin:c,containerPadding:l||c,maxRows:d,rowHeight:u,cancel:_,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:C,isResizable:w,isBounded:E,useCSSTransforms:h&&x,usePercentages:!x,transformScale:g,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:n?S:void 0,resizeHandles:T,resizeHandle:b},e)}render(){let{className:e,style:n,isDroppable:a,innerRef:o}=this.props,s=(0,r.default)(g,e),c=f({height:this.containerHeight()},n);return t.createElement(`div`,{ref:o,className:s,style:c,onDrop:a?this.onDrop:i.noop,onDragLeave:a?this.onDragLeave:i.noop,onDragEnter:a?this.onDragEnter:i.noop,onDragOver:a?this.onDragOver:i.noop},t.Children.map(this.props.children,e=>this.processGridItem(e)),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};e.default=v,p(v,`displayName`,`ReactGridLayout`),p(v,`propTypes`,s.default),p(v,`defaultProps`,{autoSize:!0,cols:12,className:``,style:{},draggableHandle:``,draggableCancel:``,containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:`vertical`,preventCollision:!1,droppingItem:{i:`__dropping-elem__`,h:1,w:1},resizeHandles:[`se`],onLayoutChange:i.noop,onDragStart:i.noop,onDrag:i.noop,onDragStop:i.noop,onResizeStart:i.noop,onResize:i.noop,onResizeStop:i.noop,onDrop:i.noop,onDropDragOver:i.noop})})),Bn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.findOrGenerateResponsiveLayout=i,e.getBreakpointFromWidth=n,e.getColsFromBreakpoint=r,e.sortBreakpoints=a;var t=Sn();function n(e,t){let n=a(e),r=n[0];for(let i=1,a=n.length;i<a;i++){let a=n[i];t>e[a]&&(r=a)}return r}function r(e,t){if(!t[e])throw Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+` is missing!`);return t[e]}function i(e,n,r,i,o,s){if(e[r])return(0,t.cloneLayout)(e[r]);let c=e[i],l=a(n),u=l.slice(l.indexOf(r));for(let t=0,n=u.length;t<n;t++){let n=u[t];if(e[n]){c=e[n];break}}return c=(0,t.cloneLayout)(c||[]),(0,t.compact)((0,t.correctBounds)(c,{cols:o}),s,o)}function a(e){return Object.keys(e).sort(function(t,n){return e[t]-e[n]})}})),Vn=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=l(u()),n=c(Ht()),r=yn(),i=Sn(),a=Bn(),o=c(zn()),s=[`breakpoint`,`breakpoints`,`cols`,`layouts`,`margin`,`containerPadding`,`onBreakpointChange`,`onLayoutChange`,`onWidthChange`];function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(null,arguments)}function f(e,t){if(e==null)return{};var n,r,i=p(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?m(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=v(e,`string`);return typeof t==`symbol`?t:t+``}function v(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var y=e=>Object.prototype.toString.call(e);function b(e,t){return e==null?null:Array.isArray(e)?e:e[t]}var x=class extends t.Component{constructor(){super(...arguments),g(this,`state`,this.generateInitialState()),g(this,`onLayoutChange`,e=>{this.props.onLayoutChange(e,h(h({},this.props.layouts),{},{[this.state.breakpoint]:e}))})}generateInitialState(){let{width:e,breakpoints:t,layouts:n,cols:r}=this.props,i=(0,a.getBreakpointFromWidth)(t,e),o=(0,a.getColsFromBreakpoint)(i,r),s=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,a.findOrGenerateResponsiveLayout)(n,t,i,i,o,s),breakpoint:i,cols:o}}static getDerivedStateFromProps(e,t){if(!(0,r.deepEqual)(e.layouts,t.layouts)){let{breakpoint:n,cols:r}=t;return{layout:(0,a.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){(this.props.width!=e.width||this.props.breakpoint!==e.breakpoint||!(0,r.deepEqual)(this.props.breakpoints,e.breakpoints)||!(0,r.deepEqual)(this.props.cols,e.cols))&&this.onWidthChange(e)}onWidthChange(e){let{breakpoints:t,cols:n,layouts:r,compactType:o}=this.props,s=this.props.breakpoint||(0,a.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),c=this.state.breakpoint,l=(0,a.getColsFromBreakpoint)(s,n),u=h({},r);if(c!==s||e.breakpoints!==t||e.cols!==n){c in u||(u[c]=(0,i.cloneLayout)(this.state.layout));let e=(0,a.findOrGenerateResponsiveLayout)(u,t,s,c,l,o);e=(0,i.synchronizeLayoutWithChildren)(e,this.props.children,l,o,this.props.allowOverlap),u[s]=e,this.props.onBreakpointChange(s,l),this.props.onLayoutChange(e,u),this.setState({breakpoint:s,layout:e,cols:l})}let d=b(this.props.margin,s),f=b(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,d,l,f)}render(){let e=this.props,{breakpoint:n,breakpoints:r,cols:i,layouts:a,margin:c,containerPadding:l,onBreakpointChange:u,onLayoutChange:p,onWidthChange:m}=e,h=f(e,s);return t.createElement(o.default,d({},h,{margin:b(c,this.state.breakpoint),containerPadding:b(l,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};e.default=x,g(x,`propTypes`,{breakpoint:n.default.string,breakpoints:n.default.object,allowOverlap:n.default.bool,cols:n.default.object,margin:n.default.oneOfType([n.default.array,n.default.object]),containerPadding:n.default.oneOfType([n.default.array,n.default.object]),layouts(e,t){if(y(e[t])!==`[object Object]`)throw Error(`Layout property must be an object. Received: `+y(e[t]));Object.keys(e[t]).forEach(t=>{if(!(t in e.breakpoints))throw Error(`Each key in layouts must align with a key in breakpoints.`);(0,i.validateLayout)(e.layouts[t],`layouts.`+t)})},width:n.default.number.isRequired,onBreakpointChange:n.default.func,onLayoutChange:n.default.func,onWidthChange:n.default.func}),g(x,`defaultProps`,{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:i.noop,onLayoutChange:i.noop,onWidthChange:i.noop})})),Hn=r({default:()=>_r});function Un(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){nr(a)}function s(){var e=Date.now();if(n){if(e-i<rr)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}function Wn(e){return parseFloat(e)||0}function Gn(e){return[...arguments].slice(1).reduce(function(t,n){var r=e[`border-`+n+`-width`];return t+Wn(r)},0)}function Kn(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e[`padding-`+a];n[a]=Wn(o)}return n}function qn(e){var t=e.getBBox();return Qn(0,0,t.width,t.height)}function Jn(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return ur;var r=lr(e).getComputedStyle(e),i=Kn(r),a=i.left+i.right,o=i.top+i.bottom,s=Wn(r.width),c=Wn(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=Gn(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=Gn(r,`top`,`bottom`)+o)),!Yn(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return Qn(i.left,i.top,s,c)}function Yn(e){return e===lr(e).document.documentElement}function Xn(e){return er?dr(e)?qn(e):Jn(e):ur}function Zn(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create((typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object).prototype);return cr(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Qn(e,t,n,r){return{x:e,y:t,width:n,height:r}}var $n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr=n((()=>{$n=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),er=typeof window<`u`&&typeof document<`u`&&window.document===document,tr=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),nr=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(tr):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),rr=2,ir=20,ar=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],or=typeof MutationObserver<`u`,sr=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Un(this.refresh.bind(this),ir)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){!er||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),or?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!er||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;ar.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),cr=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),lr=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||tr}),ur=Qn(0,0,0,0),dr=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof lr(e).SVGGraphicsElement}:function(e){return e instanceof lr(e).SVGElement&&typeof e.getBBox==`function`}})(),fr=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Qn(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Xn(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),pr=function(){function e(e,t){var n=Zn(t);cr(this,{target:e,contentRect:n})}return e}(),mr=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new $n,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof lr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new fr(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof lr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new pr(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),hr=typeof WeakMap<`u`?new WeakMap:new $n,gr=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new mr(t,sr.getInstance(),this);hr.set(this,n)}return e}(),[`observe`,`unobserve`,`disconnect`].forEach(function(e){gr.prototype[e]=function(){var t;return(t=hr.get(this))[e].apply(t,arguments)}}),_r=(function(){return tr.ResizeObserver===void 0?gr:tr.ResizeObserver})()})),yr=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var n=c(u()),r=s(Ht()),i=s((vr(),t(Hn))),a=s(bn()),o=[`measureBeforeMount`];function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function d(e,t){if(e==null)return{};var n,r,i=f(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function p(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g=`react-grid-layout`;function _(e){var t;return t=class extends n.Component{constructor(){super(...arguments),p(this,`state`,{width:1280}),p(this,`elementRef`,n.createRef()),p(this,`mounted`,!1),p(this,`resizeObserver`,void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new i.default(e=>{if(this.elementRef.current instanceof HTMLElement){let t=e[0].contentRect.width;this.setState({width:t})}});let e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;let e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){let t=this.props,{measureBeforeMount:r}=t,i=d(t,o);return r&&!this.mounted?n.createElement(`div`,{className:(0,a.default)(this.props.className,g),style:this.props.style,ref:this.elementRef}):n.createElement(e,l({innerRef:this.elementRef},i,this.state))}},p(t,`defaultProps`,{measureBeforeMount:!1}),p(t,`propTypes`,{measureBeforeMount:r.default.bool}),t}})),br=i(((e,t)=>{t.exports=zn().default,t.exports.utils=Sn(),t.exports.calculateUtils=Cn(),t.exports.Responsive=Vn().default,t.exports.Responsive.utils=Bn(),t.exports.WidthProvider=yr().default})),Y=ee(),xr=10;function Sr(){let e=(0,Y.c)(9),[t,n]=(0,J.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={x:0,y:0},e[0]=r):r=e[0];let[i,a]=J.useState(r),[o,s]=J.useState(!1),c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{n(!0),a({x:e.clientX,y:e.clientY})},e[1]=c):c=e[1];let l=c,u;e[2]!==i||e[3]!==t?(u=e=>{if(t){let t=e.clientX-i.x,n=e.clientY-i.y;s(Math.hypot(t,n)>xr)}},e[2]=i,e[3]=t,e[4]=u):u=e[4];let d=u,f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{n(!1),s(!1)},e[5]=f):f=e[5];let p=f,m=t&&o,h;return e[6]!==d||e[7]!==m?(h={isDragging:m,onDragStart:l,onDragMove:d,onDragStop:p},e[6]=d,e[7]=m,e[8]=h):h=e[8],h}var Cr=br(),X=ge(),wr=(0,Cr.WidthProvider)(Cr.Responsive),Tr=[0,0],Er=`grid-drag-handle`,Dr=e=>{let t=(0,Y.c)(161),{layout:n,setLayout:r,cells:i,mode:a}=e,o=a===`read`,s;t[0]===n.cells?s=t[1]:(s=new Set(n.cells.map(Pr)),t[0]=n.cells,t[1]=s);let c=s,[l,u]=(0,J.useState)(null),[d,f]=(0,J.useState)(!1),p;t[2]===n.columns?p=t[3]:(p={lg:n.columns},t[2]=n.columns,t[3]=p);let m=p,h,g;t[4]===n.bordered?(h=t[5],g=t[6]):(h=()=>{let e=document.getElementById(`App`);return n.bordered?e?.classList.add(`grid-bordered`):e?.classList.remove(`grid-bordered`),()=>{e?.classList.remove(`grid-bordered`)}},g=[n.bordered],t[4]=n.bordered,t[5]=h,t[6]=g),(0,J.useEffect)(h,g);let _=Sr(),v,y;t[7]===_?(v=t[8],y=t[9]):({isDragging:y,...v}=_,t[7]=_,t[8]=v,t[9]=y);let b=!o&&!d,x,S,C,w,T,E,O,k,A,j,M,N,P,F,I,L,R,ee,z,te,B,ne,V,H,U,re;if(t[10]!==i||t[11]!==m||t[12]!==v||t[13]!==l||t[14]!==b||t[15]!==c||t[16]!==y||t[17]!==o||t[18]!==n||t[19]!==a||t[20]!==r){let e=st.keyBy(n.cells,Fr),s;t[47]!==n||t[48]!==r?(s=e=>t=>{let i=new Set(n.scrollableCells);t?i.add(e):i.delete(e),r({...n,scrollableCells:i})},t[47]=n,t[48]=r,t[49]=s):s=t[49];let u=s,d;t[50]!==n||t[51]!==r?(d=e=>t=>{let i=new Map(n.cellSide);t===i.get(e)?i.delete(e):i.set(e,t),r({...n,cellSide:i})},t[50]=n,t[51]=r,t[52]=d):d=t[52];let f=d;t[53]!==b||t[54]!==n.columns||t[55]!==n.maxWidth||t[56]!==n.rowHeight?(S={},n.maxWidth&&(S.maxWidth=`${n.maxWidth}px`),b&&(S.backgroundImage=`repeating-linear-gradient(var(--gray-4) 0 1px, transparent 1px 100%), repeating-linear-gradient(90deg, var(--gray-4) 0 1px, transparent 1px 100%)`,S.backgroundSize=`calc((100% / ${n.columns})) ${n.rowHeight}px`),t[53]=b,t[54]=n.columns,t[55]=n.maxWidth,t[56]=n.rowHeight,t[57]=S):S=t[57],x=wr,V=`lg`,t[58]===n.cells?H=t[59]:(H={lg:n.cells},t[58]=n.cells,t[59]=H),U=S,re=m,C=!1;let p=b&&`bg-(--slate-2) border-r`,h=o&&`disable-animation`,g=!n.maxWidth&&`min-w-[800px]`;t[60]!==p||t[61]!==h||t[62]!==g?(w=q(`w-full mx-auto bg-background flex-1 min-h-full`,p,h,g),t[60]=p,t[61]=h,t[62]=g,t[63]=w):w=t[63],t[64]===o?T=t[65]:(T=o?[20,20]:void 0,t[64]=o,t[65]=T),E=Tr,O=!1,k=null,A=!0,j=n.rowHeight,t[66]!==o||t[67]!==n||t[68]!==r?(M=e=>{o||r({...n,cells:e})},t[66]=o,t[67]=n,t[68]=r,t[69]=M):M=t[69],t[70]===l?N=t[71]:(N=l?{i:l.i,w:l.w||2,h:l.h||2}:void 0,t[70]=l,t[71]=N),t[72]!==v||t[73]!==n||t[74]!==r?(P=(e,t,i)=>{v.onDragStop(),t&&r({...n,cells:[...e,t]})},t[72]=v,t[73]=n,t[74]=r,t[75]=P):P=t[75],t[76]===v?(F=t[77],I=t[78],L=t[79]):(F=(e,t,n,r,i)=>{v.onDragStart(i)},I=(e,t,n,r,i)=>{v.onDragMove(i)},L=()=>{v.onDragStop()},t[76]=v,t[77]=F,t[78]=I,t[79]=L),R=Ir,ee=b,z=b,te=b,B=b?`.${Er}`:`noop`;let _;t[80]===c?_=t[81]:(_=e=>c.has(e.id),t[80]=c,t[81]=_),ne=i.filter(_).map(t=>{let i=e.get(t.id),o=n.scrollableCells.has(t.id)??!1,s=n.cellSide.get(t.id),c=(0,X.jsx)(Or,{code:t.code,mode:a,cellId:t.id,output:t.output,status:t.status,stale:D(t,!1),isScrollable:o,side:s,hidden:t.errored||t.interrupted||t.stopped});return b?(0,X.jsx)(Ar,{id:t.id,isDragging:y,side:s,setSide:f(t.id),isScrollable:o,setIsScrollable:u(t.id),display:i?.y===0?`bottom`:`top`,onDelete:()=>{r({...n,cells:n.cells.filter(e=>e.i!==t.id)})},children:c},t.id):(0,X.jsx)(`div`,{children:c},t.id)}),t[10]=i,t[11]=m,t[12]=v,t[13]=l,t[14]=b,t[15]=c,t[16]=y,t[17]=o,t[18]=n,t[19]=a,t[20]=r,t[21]=x,t[22]=S,t[23]=C,t[24]=w,t[25]=T,t[26]=E,t[27]=O,t[28]=k,t[29]=A,t[30]=j,t[31]=M,t[32]=N,t[33]=P,t[34]=F,t[35]=I,t[36]=L,t[37]=R,t[38]=ee,t[39]=z,t[40]=te,t[41]=B,t[42]=ne,t[43]=V,t[44]=H,t[45]=U,t[46]=re}else x=t[21],S=t[22],C=t[23],w=t[24],T=t[25],E=t[26],O=t[27],k=t[28],A=t[29],j=t[30],M=t[31],N=t[32],P=t[33],F=t[34],I=t[35],L=t[36],R=t[37],ee=t[38],z=t[39],te=t[40],B=t[41],ne=t[42],V=t[43],H=t[44],U=t[45],re=t[46];let ie;t[82]!==x||t[83]!==C||t[84]!==w||t[85]!==T||t[86]!==E||t[87]!==O||t[88]!==k||t[89]!==A||t[90]!==j||t[91]!==M||t[92]!==N||t[93]!==P||t[94]!==F||t[95]!==I||t[96]!==L||t[97]!==R||t[98]!==ee||t[99]!==z||t[100]!==te||t[101]!==B||t[102]!==ne||t[103]!==V||t[104]!==H||t[105]!==U||t[106]!==re?(ie=(0,X.jsx)(x,{breakpoint:V,layouts:H,style:U,cols:re,allowOverlap:C,className:w,containerPadding:T,margin:E,isBounded:O,compactType:k,preventCollision:A,rowHeight:j,onLayoutChange:M,droppingItem:N,onDrop:P,onDragStart:F,onDrag:I,onDragStop:L,onResizeStop:R,isDraggable:ee,isDroppable:z,isResizable:te,draggableHandle:B,children:ne}),t[82]=x,t[83]=C,t[84]=w,t[85]=T,t[86]=E,t[87]=O,t[88]=k,t[89]=A,t[90]=j,t[91]=M,t[92]=N,t[93]=P,t[94]=F,t[95]=I,t[96]=L,t[97]=R,t[98]=ee,t[99]=z,t[100]=te,t[101]=B,t[102]=ne,t[103]=V,t[104]=H,t[105]=U,t[106]=re,t[107]=ie):ie=t[107];let W=ie,G,K,ae,oe,se,ce,le;if(t[108]!==i||t[109]!==W||t[110]!==c||t[111]!==d||t[112]!==o||t[113]!==n||t[114]!==a||t[115]!==r||t[116]!==S){le=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[125]===c?e=t[126]:(e=e=>!c.has(e.id),t[125]=c,t[126]=e);let s=i.filter(e);if(o){if(n.bordered){let e;t[127]!==W||t[128]!==S?(e=(0,X.jsx)(`div`,{className:`flex flex-1 flex-col items-center`,children:(0,X.jsx)(`div`,{style:S,className:`bg-background flex-1 border-t border-x rounded-t shadow-sm w-full overflow-hidden`,children:W})}),t[127]=W,t[128]=S,t[129]=e):e=t[129],W=e}let e=s.filter(Lr),r;t[130]===a?r=t[131]:(r=e=>(0,X.jsx)(Or,{code:e.code,mode:a,cellId:e.id,output:e.output,status:e.status,stale:D(e,!1),isScrollable:!1,hidden:!1},e.id),t[130]=a,t[131]=r),le=(0,X.jsxs)(X.Fragment,{children:[W,(0,X.jsx)(`div`,{className:`hidden`,children:e.map(r)})]});break bb0}if(n.bordered){let e;t[132]===W?e=t[133]:(e=(0,X.jsx)(`div`,{className:`h-full overflow-auto`,children:W}),t[132]=W,t[133]=e);let n;t[134]!==S||t[135]!==e?(n=(0,X.jsx)(`div`,{style:S,className:`bg-background border-t border-x rounded-t shadow-sm w-full mx-auto mt-4 h-[calc(100%-1rem)] overflow-hidden`,children:e}),t[134]=S,t[135]=e,t[136]=n):n=t[136],W=n}t[137]!==d||t[138]!==n||t[139]!==r?(ce=(0,X.jsx)(kr,{layout:n,setLayout:r,isLocked:d,setIsLocked:f}),t[137]=d,t[138]=n,t[139]=r,t[140]=ce):ce=t[140];let l;t[141]===Symbol.for(`react.memo_cache_sentinel`)?(oe=q(`relative flex z-10 flex-1 overflow-hidden`),l=q(`grow overflow-auto transparent-when-disconnected`),t[141]=oe,t[142]=l):(oe=t[141],l=t[142]),t[143]===W?se=t[144]:(se=(0,X.jsx)(`div`,{className:l,children:W}),t[143]=W,t[144]=se),G=`flex-none flex flex-col w-[300px] p-2 pb-20 gap-2 overflow-auto bg-(--slate-2) border-t border-x rounded-t shadow-sm transparent-when-disconnected mx-2 mt-4`,t[145]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,X.jsx)(`div`,{className:`text font-bold text-(--slate-20) shrink-0`,children:`Outputs`}),t[145]=K):K=t[145];let p;t[146]!==n.columns||t[147]!==n.rowHeight||t[148]!==a?(p=e=>(0,X.jsx)(`div`,{draggable:!0,unselectable:`on`,"data-cell-id":e.id,onDragStart:t=>{let r=t.currentTarget.offsetHeight;u({i:e.id,w:n.columns/4,h:Math.ceil(r/n.rowHeight)||1}),t.dataTransfer.setData(`text/plain`,``)},className:q(Er,`droppable-element bg-background border-border border overflow-hidden p-2 rounded shrink-0`),children:(0,X.jsx)(Or,{code:e.code,className:`select-none pointer-events-none`,mode:a,cellId:e.id,output:e.output,isScrollable:!1,status:e.status,stale:D(e,!1),hidden:!1})},e.id),t[146]=n.columns,t[147]=n.rowHeight,t[148]=a,t[149]=p):p=t[149],ae=s.map(p)}t[108]=i,t[109]=W,t[110]=c,t[111]=d,t[112]=o,t[113]=n,t[114]=a,t[115]=r,t[116]=S,t[117]=G,t[118]=K,t[119]=ae,t[120]=oe,t[121]=se,t[122]=ce,t[123]=le,t[124]=W}else G=t[117],K=t[118],ae=t[119],oe=t[120],se=t[121],ce=t[122],le=t[123],W=t[124];if(le!==Symbol.for(`react.early_return_sentinel`))return le;let ue;t[150]!==G||t[151]!==K||t[152]!==ae?(ue=(0,X.jsxs)(`div`,{className:G,children:[K,ae]}),t[150]=G,t[151]=K,t[152]=ae,t[153]=ue):ue=t[153];let de;t[154]!==oe||t[155]!==se||t[156]!==ue?(de=(0,X.jsxs)(`div`,{className:oe,children:[se,ue]}),t[154]=oe,t[155]=se,t[156]=ue,t[157]=de):de=t[157];let fe;return t[158]!==ce||t[159]!==de?(fe=(0,X.jsxs)(X.Fragment,{children:[ce,de]}),t[158]=ce,t[159]=de,t[160]=fe):fe=t[160],fe},Or=(0,J.memo)(e=>{let t=(0,Y.c)(21),{output:n,cellId:r,status:i,mode:a,code:o,hidden:s,isScrollable:c,side:l,className:u,stale:d}=e,f;t[0]===i?f=t[1]:(f=w(i),t[0]=i,t[1]=f);let p=f;if((n==null||n.data===``)&&a!==`read`){let e;return t[2]!==u||t[3]!==o?(e=(0,X.jsx)(Xt,{className:u,code:o}),t[2]=u,t[3]=o,t[4]=e):e=t[4],e}let m=s&&`invisible`,h=c?`overflow-y-auto`:`overflow-y-hidden`,g=l===`top`&&`flex items-start`,_=l===`bottom`&&`flex items-end`,v=l===`left`&&`flex justify-start`,y=l===`right`&&`flex justify-end`,b;t[5]!==u||t[6]!==m||t[7]!==h||t[8]!==g||t[9]!==_||t[10]!==v||t[11]!==y?(b=q(u,`h-full w-full p-2 overflow-x-auto`,m,h,g,_,v,y),t[5]=u,t[6]=m,t[7]=h,t[8]=g,t[9]=_,t[10]=v,t[11]=y,t[12]=b):b=t[12];let x;t[13]!==r||t[14]!==p||t[15]!==n||t[16]!==d?(x=(0,X.jsx)(Be,{allowExpand:!1,output:n,cellId:r,stale:d,loading:p}),t[13]=r,t[14]=p,t[15]=n,t[16]=d,t[17]=x):x=t[17];let S;return t[18]!==b||t[19]!==x?(S=(0,X.jsx)(`div`,{className:b,children:x}),t[18]=b,t[19]=x,t[20]=S):S=t[20],S});Or.displayName=`GridCell`;var kr=e=>{let t=(0,Y.c)(38),{layout:n,setLayout:r,isLocked:i,setIsLocked:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Se,{htmlFor:`columns`,children:`Columns`}),t[0]=o):o=t[0];let s;t[1]!==n||t[2]!==r?(s=e=>{r({...n,columns:e})},t[1]=n,t[2]=r,t[3]=s):s=t[3];let c;t[4]!==n.columns||t[5]!==s?(c=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[o,(0,X.jsx)(jt,{"data-testid":`grid-columns-input`,id:`columns`,value:n.columns,className:`w-[60px]`,placeholder:`# of Columns`,minValue:1,onChange:s})]}),t[4]=n.columns,t[5]=s,t[6]=c):c=t[6];let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(Se,{htmlFor:`rowHeight`,children:`Row Height (px)`}),t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r?(u=e=>{r({...n,rowHeight:e})},t[8]=n,t[9]=r,t[10]=u):u=t[10];let d;t[11]!==n.rowHeight||t[12]!==u?(d=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[l,(0,X.jsx)(jt,{"data-testid":`grid-row-height-input`,id:`rowHeight`,value:n.rowHeight,className:`w-[60px]`,placeholder:`Row Height (px)`,minValue:1,onChange:u})]}),t[11]=n.rowHeight,t[12]=u,t[13]=d):d=t[13];let f;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(Se,{htmlFor:`maxWidth`,children:`Max Width (px)`}),t[14]=f):f=t[14];let p;t[15]!==n||t[16]!==r?(p=e=>{r({...n,maxWidth:Number.isNaN(e)?void 0:e})},t[15]=n,t[16]=r,t[17]=p):p=t[17];let m;t[18]!==n.maxWidth||t[19]!==p?(m=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[f,(0,X.jsx)(jt,{"data-testid":`grid-max-width-input`,id:`maxWidth`,value:n.maxWidth,className:`w-[90px]`,step:100,placeholder:`Full`,onChange:p})]}),t[18]=n.maxWidth,t[19]=p,t[20]=m):m=t[20];let h;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsxs)(Se,{className:`flex flex-row items-center gap-1`,htmlFor:`lock`,children:[(0,X.jsx)(Vt,{className:`h-3 w-3`}),`Bordered`]}),t[21]=h):h=t[21];let g;t[22]!==n||t[23]!==r?(g=e=>{r({...n,bordered:e})},t[22]=n,t[23]=r,t[24]=g):g=t[24];let _;t[25]!==n.bordered||t[26]!==g?(_=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[h,(0,X.jsx)(se,{"data-testid":`grid-bordered-switch`,id:`lock`,checked:n.bordered,size:`sm`,onCheckedChange:g})]}),t[25]=n.bordered,t[26]=g,t[27]=_):_=t[27];let v;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsxs)(Se,{className:`flex flex-row items-center gap-1`,htmlFor:`lock`,children:[(0,X.jsx)(ce,{className:`h-3 w-3`}),`Lock Grid`]}),t[28]=v):v=t[28];let y;t[29]!==i||t[30]!==a?(y=(0,X.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[v,(0,X.jsx)(se,{"data-testid":`grid-lock-switch`,id:`lock`,checked:i,size:`sm`,onCheckedChange:a})]}),t[29]=i,t[30]=a,t[31]=y):y=t[31];let b;return t[32]!==_||t[33]!==y||t[34]!==c||t[35]!==d||t[36]!==m?(b=(0,X.jsxs)(`div`,{className:`flex flex-row absolute pl-5 top-8 gap-4 w-full justify-end pr-[350px] pb-3 border-b z-50`,children:[c,d,m,_,y]}),t[32]=_,t[33]=y,t[34]=c,t[35]=d,t[36]=m,t[37]=b):b=t[37],b},Ar=J.forwardRef((e,t)=>{let n=(0,Y.c)(30),r,i,a,o,s,c,l,u,d,f;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9],f=n[10]):({children:r,isDragging:o,className:i,onDelete:c,isScrollable:s,setIsScrollable:u,side:f,setSide:d,display:a,...l}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d,n[10]=f);let[p,m]=(0,J.useState)(),h=p&&`border-(--sky-8) z-20`,g=!p&&`hover-actions-parent`,_=o&&`bg-(--slate-2) border-border z-20`,v;n[11]!==i||n[12]!==h||n[13]!==g||n[14]!==_?(v=q(i,`relative z-10 hover:z-20`,`bg-background border-transparent hover:border-(--sky-8) border`,h,g,_),n[11]=i,n[12]=h,n[13]=g,n[14]=_,n[15]=v):v=n[15];let y;n[16]!==a||n[17]!==s||n[18]!==c||n[19]!==p||n[20]!==u||n[21]!==d||n[22]!==f?(y=(0,X.jsx)(jr,{onDelete:c,isScrollable:s,setIsScrollable:u,side:f,setSide:d,display:a,setPopoverOpened:m,popoverOpened:p}),n[16]=a,n[17]=s,n[18]=c,n[19]=p,n[20]=u,n[21]=d,n[22]=f,n[23]=y):y=n[23];let b;return n[24]!==r||n[25]!==t||n[26]!==l||n[27]!==v||n[28]!==y?(b=(0,X.jsxs)(`div`,{ref:t,...l,className:v,children:[r,y]}),n[24]=r,n[25]=t,n[26]=l,n[27]=v,n[28]=y,n[29]=b):b=n[29],b});Ar.displayName=`EditableGridCell`;var jr=e=>{let t=(0,Y.c)(43),{display:n,onDelete:r,side:i,setSide:a,isScrollable:o,setIsScrollable:s,popoverOpened:c,setPopoverOpened:l}=e,u=i===`left`?nn:i===`right`?en:void 0,d=!c&&`hover-action`,f=n===`top`&&`-top-6 rounded-t`,p=n===`bottom`&&`-bottom-6 rounded-b`,m;t[0]!==d||t[1]!==f||t[2]!==p?(m=q(`absolute right-0 p-1 bg-(--sky-8) text-white h-6 z-10 flex gap-2`,d,f,p),t[0]=d,t[1]=f,t[2]=p,t[3]=m):m=t[3];let h=c===`side`,g;t[4]===l?g=t[5]:(g=e=>l(e?`side`:void 0),t[4]=l,t[5]=g);let _;t[6]===u?_=t[7]:(_=(0,X.jsx)(ke,{asChild:!0,children:u?(0,X.jsx)(u,{className:`h-4 w-4 opacity-60 hover:opacity-100`}):(0,X.jsx)(tn,{className:`h-4 w-4 opacity-60 hover:opacity-100`})}),t[6]=u,t[7]=_);let v;t[8]!==a||t[9]!==i?(v=ne.entries(Nr).map(e=>{let[t,n]=e;return(0,X.jsxs)(De,{onSelect:()=>a(t),children:[(0,X.jsx)(n,{className:`h-4 w-3 mr-2`}),(0,X.jsx)(`span`,{className:`flex-1`,children:$e.startCase(t)}),t===i&&(0,X.jsx)(it,{className:`h-4 w-4`})]},t)}),t[8]=a,t[9]=i,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,X.jsx)(Ae,{side:`bottom`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==h||t[14]!==g||t[15]!==_||t[16]!==y?(b=(0,X.jsxs)(je,{open:h,onOpenChange:g,children:[_,y]}),t[13]=h,t[14]=g,t[15]=_,t[16]=y,t[17]=b):b=t[17];let x=c===`scroll`,S;t[18]===l?S=t[19]:(S=e=>l(e?`scroll`:void 0),t[18]=l,t[19]=S);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(ke,{asChild:!0,children:(0,X.jsx)(dn,{className:`h-4 w-4 opacity-60 hover:opacity-100`})}),t[20]=C):C=t[20];let w;t[21]!==o||t[22]!==s?(w=()=>s(!o),t[21]=o,t[22]=s,t[23]=w):w=t[23];let T;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(`span`,{className:`flex-1`,children:`Scrollable`}),t[24]=T):T=t[24];let E;t[25]!==o||t[26]!==s?(E=(0,X.jsx)(se,{"data-testid":`grid-scrollable-switch`,checked:o,size:`sm`,onCheckedChange:s}),t[25]=o,t[26]=s,t[27]=E):E=t[27];let D;t[28]!==w||t[29]!==E?(D=(0,X.jsx)(Ae,{side:`bottom`,children:(0,X.jsxs)(De,{onSelect:w,children:[T,E]})}),t[28]=w,t[29]=E,t[30]=D):D=t[30];let O;t[31]!==x||t[32]!==S||t[33]!==D?(O=(0,X.jsxs)(je,{open:x,onOpenChange:S,children:[C,D]}),t[31]=x,t[32]=S,t[33]=D,t[34]=O):O=t[34];let k;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,X.jsx)(Ie,{className:q(Er,`cursor-move`,`h-4 w-4 opacity-60 hover:opacity-100`)}),t[35]=k):k=t[35];let A;t[36]===r?A=t[37]:(A=(0,X.jsx)(at,{className:`h-4 w-4 opacity-60 hover:opacity-100`,onClick:()=>r()}),t[36]=r,t[37]=A);let j;return t[38]!==b||t[39]!==O||t[40]!==A||t[41]!==m?(j=(0,X.jsxs)(`div`,{className:m,children:[b,O,k,A]}),t[38]=b,t[39]=O,t[40]=A,t[41]=m,t[42]=j):j=t[42],j};function Mr(e){return typeof e.output?.data==`string`&&e.output.data.includes(`marimo-sidebar`)}var Nr={left:nn,right:en};function Pr(e){return e.i}function Fr(e){return e.i}function Ir(){window.dispatchEvent(new Event(`resize`))}function Lr(e){return Mr(e)}var Rr={type:`grid`,name:`Grid`,validator:I({columns:M().min(1),rowHeight:M().min(1),maxWidth:M().nullish().transform(e=>e??void 0).catch(void 0),bordered:F().optional().catch(void 0),cells:N(I({position:P([M(),M(),M(),M()]).nullable().catch(null),scrollable:F().optional().catch(void 0),side:L([`top`,`bottom`,`left`,`right`]).optional().catch(void 0)}).catch({position:null}))}),deserializeLayout:(e,t)=>{if(e.cells.length===0)return{columns:e.columns,rowHeight:e.rowHeight,scrollableCells:new Set,cellSide:new Map,cells:[]};e.cells.length!==t.length&&B.warn(`Number of cells in layout does not match number of cells in notebook`);let n=new Set,r=new Map,i=e.cells.flatMap((e,i)=>{let a=e.position;if(!a)return[];let o=t[i];return o?(e.scrollable&&n.add(o.id),e.side&&r.set(o.id,e.side),{i:o.id,x:a[0],y:a[1],w:a[2],h:a[3]}):[]});return{columns:e.columns,rowHeight:e.rowHeight,maxWidth:e.maxWidth,bordered:e.bordered,cells:i,cellSide:r,scrollableCells:n}},serializeLayout:(e,t)=>{let n=st.keyBy(e.cells,e=>e.i),r=t.map(t=>{let r=n.get(t.id);if(!r)return{position:null};let i={position:[r.x,r.y,r.w,r.h]};return e.scrollableCells.has(t.id)&&(i.scrollable=!0),e.cellSide.has(t.id)&&(i.side=e.cellSide.get(t.id)),i});return{columns:e.columns,rowHeight:e.rowHeight,maxWidth:e.maxWidth,bordered:e.bordered,cells:r}},Component:Dr,getInitialLayout:()=>({columns:24,rowHeight:20,maxWidth:1400,bordered:!0,scrollableCells:new Set,cellSide:new Map,cells:[]})};function zr(e){return e.output!=null&&e.output.data!==``}function Br(e,t){let n=[...e],r=new Set,i=new Set,a=new Map,o=null,s=0;for(let[e,c]of n.entries()){let n=t.cells.get(c.id)?.type,l=zr(c);n&&a.set(c.id,n),l||i.add(c.id),n===`skip`||!l?r.add(c.id):o===null&&(o=c,s=e)}return{slideCells:n,skippedIds:r,noOutputIds:i,slideTypes:a,startCellIndex:s}}function Vr(){var e=[...arguments];return(0,J.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Hr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ur(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Wr(e){return`nodeType`in e}function Gr(e){return e?Ur(e)?e:Wr(e)?e.ownerDocument?.defaultView??window:window:window}function Kr(e){let{Document:t}=Gr(e);return e instanceof t}function qr(e){return!Ur(e)&&e instanceof Gr(e).HTMLElement}function Jr(e){return e instanceof Gr(e).SVGElement}function Yr(e){return e?Ur(e)?e.document:Wr(e)?Kr(e)?e:qr(e)||Jr(e)?e.ownerDocument:document:document:document}var Xr=Hr?J.useLayoutEffect:J.useEffect;function Zr(e){let t=(0,J.useRef)(e);return Xr(()=>{t.current=e}),(0,J.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Qr(){let e=(0,J.useRef)(null);return[(0,J.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,J.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function $r(e,t){t===void 0&&(t=[e]);let n=(0,J.useRef)(e);return Xr(()=>{n.current!==e&&(n.current=e)},t),n}function ei(e,t){let n=(0,J.useRef)();return(0,J.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function ti(e){let t=Zr(e),n=(0,J.useRef)(null);return[n,(0,J.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function ni(e){let t=(0,J.useRef)();return(0,J.useEffect)(()=>{t.current=e},[e]),t.current}var ri={};function ii(e,t){return(0,J.useMemo)(()=>{if(t)return t;let n=ri[e]==null?0:ri[e]+1;return ri[e]=n,e+`-`+n},[e,t])}function ai(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var oi=ai(1),si=ai(-1);function ci(e){return`clientX`in e&&`clientY`in e}function li(e){if(!e)return!1;let{KeyboardEvent:t}=Gr(e.target);return t&&e instanceof t}function ui(e){if(!e)return!1;let{TouchEvent:t}=Gr(e.target);return t&&e instanceof t}function di(e){if(ui(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ci(e)?{x:e.clientX,y:e.clientY}:null}var fi=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[fi.Translate.toString(e),fi.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),pi=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function mi(e){return e.matches(pi)?e:e.querySelector(pi)}var hi={display:`none`};function gi(e){let{id:t,value:n}=e;return J.createElement(`div`,{id:t,style:hi},n)}function _i(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return J.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function vi(){let[e,t]=(0,J.useState)(``);return{announce:(0,J.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var yi=e(A()),bi=(0,J.createContext)(null);function xi(e){let t=(0,J.useContext)(bi);(0,J.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Si(){let[e]=(0,J.useState)(()=>new Set),t=(0,J.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,J.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Ci={draggable:`
5
5
  To pick up a draggable item, press the space bar.
6
6
  While dragging, use the arrow keys to move the item.
7
7
  Press space again to drop the item in its new position, or press escape to cancel.
8
- `},wi={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Ti(e){let{announcements:t=wi,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Ci}=e,{announce:a,announcement:o}=vi(),s=ii(`DndLiveRegion`),[c,l]=(0,J.useState)(!1);if((0,J.useEffect)(()=>{l(!0)},[]),xi((0,J.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=J.createElement(J.Fragment,null,J.createElement(gi,{id:r,value:i.draggable}),J.createElement(_i,{id:s,announcement:o}));return n?(0,yi.createPortal)(u,n):u}var Z;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Z||={});function Ei(){}function Di(e,t){return(0,J.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Oi(){var e=[...arguments];return(0,J.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var ki=Object.freeze({x:0,y:0});function Ai(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function ji(e,t){let n=di(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function Mi(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Ni(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Pi(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Fi(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Ii(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Li=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Ii(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Ai(Ii(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Mi)},Ri=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Pi(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Pi(r),o=i.reduce((e,t,r)=>e+Ai(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Mi)};function zi(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Bi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=zi(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Ni)};function Vi(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var Hi=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&Vi(r,a)){let n=Pi(a).reduce((e,t)=>e+Ai(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(Mi)};function Ui(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Wi(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ki}function Gi(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Ki=Gi(1);function qi(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Ji(e,t,n){let r=qi(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Yi={ignoreTransform:!1};function Xi(e,t){t===void 0&&(t=Yi);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Gr(e).getComputedStyle(e);t&&(n=Ji(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function Zi(e){return Xi(e,{ignoreTransform:!0})}function Qi(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function $i(e,t){return t===void 0&&(t=Gr(e).getComputedStyle(e)),t.position===`fixed`}function ea(e,t){t===void 0&&(t=Gr(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function ta(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Kr(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!qr(i)||Jr(i)||n.includes(i))return n;let a=Gr(e).getComputedStyle(i);return i!==e&&ea(i,a)&&n.push(i),$i(i,a)?n:r(i.parentNode)}return e?r(e):n}function na(e){let[t]=ta(e,1);return t??null}function ra(e){return!Hr||!e?null:Ur(e)?e:Wr(e)?Kr(e)||e===Yr(e).scrollingElement?window:qr(e)?e:null:null}function ia(e){return Ur(e)?e.scrollX:e.scrollLeft}function aa(e){return Ur(e)?e.scrollY:e.scrollTop}function oa(e){return{x:ia(e),y:aa(e)}}var Q;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Q||={});function sa(e){return!Hr||!e?!1:e===document.scrollingElement}function ca(e){let t={x:0,y:0},n=sa(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var la={x:.2,y:.2};function ua(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=la);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=ca(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Q.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Q.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Q.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Q.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function da(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function fa(e){return e.reduce((e,t)=>oi(e,oa(t)),ki)}function pa(e){return e.reduce((e,t)=>e+ia(t),0)}function ma(e){return e.reduce((e,t)=>e+aa(t),0)}function ha(e,t){if(t===void 0&&(t=Xi),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);na(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var ga=[[`x`,[`left`,`right`],pa],[`y`,[`top`,`bottom`],ma]],_a=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=ta(t),r=fa(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of ga)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},va=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ya(e){let{EventTarget:t}=Gr(e);return e instanceof t?e:Yr(e)}function ba(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var xa;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(xa||={});function Sa(e){e.preventDefault()}function Ca(e){e.stopPropagation()}var $;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})($||={});var wa={start:[$.Space,$.Enter],cancel:[$.Esc],end:[$.Space,$.Enter,$.Tab]},Ta=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $.Right:return{...n,x:n.x+25};case $.Left:return{...n,x:n.x-25};case $.Down:return{...n,y:n.y+25};case $.Up:return{...n,y:n.y-25}}},Ea=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new va(Yr(t)),this.windowListeners=new va(Gr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xa.Resize,this.handleCancel),this.windowListeners.add(xa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xa.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ha(n),t(ki)}handleKeyDown(e){if(li(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=wa,coordinateGetter:a=Ta,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:ki;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=si(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=ca(n),p=da(n),m={x:Math.min(i===$.Right?p.right-p.width/2:p.right,Math.max(i===$.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===$.Down?p.bottom-p.height/2:p.bottom,Math.max(i===$.Down?p.top:p.top+p.height/2,u.y))},h=i===$.Right&&!s||i===$.Left&&!c,g=i===$.Down&&!l||i===$.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===$.Right&&e<=d.x||i===$.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===$.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===$.Down&&e<=d.y||i===$.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===$.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,oi(si(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Ea.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=wa,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Da(e){return!!(e&&`distance`in e)}function Oa(e){return!!(e&&`delay`in e)}var ka=class{constructor(e,t,n){n===void 0&&(n=ya(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Yr(i),this.documentListeners=new va(this.document),this.listeners=new va(n),this.windowListeners=new va(Gr(i)),this.initialCoordinates=di(r)??ki,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(xa.Resize,this.handleCancel),this.windowListeners.add(xa.DragStart,Sa),this.windowListeners.add(xa.VisibilityChange,this.handleCancel),this.windowListeners.add(xa.ContextMenu,Sa),this.documentListeners.add(xa.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Oa(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Da(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(xa.Click,Ca,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xa.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=di(e)??ki,s=si(n,o);if(!t&&a){if(Da(a)){if(a.tolerance!=null&&ba(s,a.tolerance))return this.handleCancel();if(ba(s,a.distance))return this.handleStart()}if(Oa(a)&&ba(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===$.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Aa={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},ja=class extends ka{constructor(e){let{event:t}=e,n=Yr(t.target);super(e,Aa,n)}};ja.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Ma={move:{name:`mousemove`},end:{name:`mouseup`}},Na;(function(e){e[e.RightClick=2]=`RightClick`})(Na||={});var Pa=class extends ka{constructor(e){super(e,Ma,Yr(e.event.target))}};Pa.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Na.RightClick&&(r?.({event:n}),!0)}}];var Fa={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Ia=class extends ka{constructor(e){super(e,Fa)}static setup(){return window.addEventListener(Fa.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Fa.move.name,e)};function e(){}}};Ia.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var La;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(La||={});var Ra;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Ra||={});function za(e){let{acceleration:t,activator:n=La.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Ra.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Va({delta:d,disabled:!a}),[m,h]=Qr(),g=(0,J.useRef)({x:0,y:0}),_=(0,J.useRef)({x:0,y:0}),v=(0,J.useMemo)(()=>{switch(n){case La.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case La.DraggableRect:return i}},[n,i,c]),y=(0,J.useRef)(null),b=(0,J.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,J.useMemo)(()=>s===Ra.TreeOrder?[...l].reverse():l,[s,l]);(0,J.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=ua(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Ba={x:{[Q.Backward]:!1,[Q.Forward]:!1},y:{[Q.Backward]:!1,[Q.Forward]:!1}};function Va(e){let{delta:t,disabled:n}=e,r=ni(t);return ei(e=>{if(n||!r||!e)return Ba;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Q.Backward]:e.x[Q.Backward]||i.x===-1,[Q.Forward]:e.x[Q.Forward]||i.x===1},y:{[Q.Backward]:e.y[Q.Backward]||i.y===-1,[Q.Forward]:e.y[Q.Forward]||i.y===1}}},[n,t,r])}function Ha(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return ei(e=>t==null?null:r??e??null,[r,t])}function Ua(e,t){return(0,J.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Wa;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Wa||={});var Ga;(function(e){e.Optimized=`optimized`})(Ga||={});var Ka=new Map;function qa(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,J.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,J.useRef)(e),d=g(),f=$r(d),p=(0,J.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,J.useRef)(null),h=ei(t=>{if(d&&!n)return Ka;if(!t||t===Ka||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new _a(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,J.useEffect)(()=>{u.current=e},[e]),(0,J.useEffect)(()=>{d||p()},[n,d]),(0,J.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,J.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Wa.Always:return!1;case Wa.BeforeDragging:return n;default:return!n}}}function Ja(e,t){return ei(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Ya(e,t){return Ja(e,t)}function Xa(e){let{callback:t,disabled:n}=e,r=Zr(t),i=(0,J.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,J.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Za(e){let{callback:t,disabled:n}=e,r=Zr(t),i=(0,J.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,J.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Qa(e){return new _a(Xi(e),e)}function $a(e,t,n){t===void 0&&(t=Qa);let[r,i]=(0,J.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Xa({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Za({callback:a});return Xr(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function eo(e){return Wi(e,Ja(e))}var to=[];function no(e){let t=(0,J.useRef)(e),n=ei(n=>e?n&&n!==to&&e&&t.current&&e.parentNode===t.current.parentNode?n:ta(e):to,[e]);return(0,J.useEffect)(()=>{t.current=e},[e]),n}function ro(e){let[t,n]=(0,J.useState)(null),r=(0,J.useRef)(e),i=(0,J.useCallback)(e=>{let t=ra(e.target);t&&n(e=>e?(e.set(t,oa(t)),new Map(e)):null)},[]);return(0,J.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=ra(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,oa(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{ra(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,J.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>oi(e,t),ki):fa(e):ki,[e,t])}function io(e,t){t===void 0&&(t=[]);let n=(0,J.useRef)(null);return(0,J.useEffect)(()=>{n.current=null},t),(0,J.useEffect)(()=>{let t=e!==ki;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?si(e,n.current):ki}function ao(e){(0,J.useEffect)(()=>{if(!Hr)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function oo(e,t){return(0,J.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function so(e){return(0,J.useMemo)(()=>e?Qi(e):null,[e])}var co=[];function lo(e,t){t===void 0&&(t=Xi);let[n]=e,r=so(n?Gr(n):null),[i,a]=(0,J.useState)(co);function o(){a(()=>e.length?e.map(e=>sa(e)?r:new _a(t(e),e)):co)}let s=Za({callback:o});return Xr(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function uo(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return qr(t)?t:e}function fo(e){let{measure:t}=e,[n,r]=(0,J.useState)(null),i=Za({callback:(0,J.useCallback)(e=>{for(let{target:n}of e)if(qr(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=ti((0,J.useCallback)(e=>{let n=uo(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,J.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var po=[{sensor:ja,options:{}},{sensor:Ea,options:{}}],mo={current:{}},ho={draggable:{measure:Zi},droppable:{measure:Zi,strategy:Wa.WhileDragging,frequency:Ga.Optimized},dragOverlay:{measure:Xi}},go=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},_o={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new go,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ei},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ho,measureDroppableContainers:Ei,windowRect:null,measuringScheduled:!1},vo={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Ei,draggableNodes:new Map,over:null,measureDroppableContainers:Ei},yo=(0,J.createContext)(vo),bo=(0,J.createContext)(_o);function xo(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new go}}}function So(e,t){switch(t.type){case Z.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Z.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Z.DragEnd:case Z.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Z.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new go(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Z.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new go(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Z.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new go(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Co(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,J.useContext)(yo),a=ni(r),o=ni(n?.id);return(0,J.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!li(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=mi(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function wo(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function To(e){return(0,J.useMemo)(()=>({draggable:{...ho.draggable,...e?.draggable},droppable:{...ho.droppable,...e?.droppable},dragOverlay:{...ho.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Eo(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,J.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Xr(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=Wi(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=na(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Do=(0,J.createContext)({...ki,scaleX:1,scaleY:1}),Oo;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Oo||={});var ko=(0,J.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=po,collisionDetection:o=Bi,measuring:s,modifiers:c,...l}=e,[u,d]=(0,J.useReducer)(So,void 0,xo),[f,p]=Si(),[m,h]=(0,J.useState)(Oo.Uninitialized),g=m===Oo.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,J.useRef)({initial:null,translated:null}),C=(0,J.useMemo)(()=>_==null?null:{id:_,data:x?.data??mo,rect:S},[_,x]),w=(0,J.useRef)(null),[T,E]=(0,J.useState)(null),[D,O]=(0,J.useState)(null),k=$r(l,Object.values(l)),A=ii(`DndDescribedBy`,t),j=(0,J.useMemo)(()=>b.getEnabled(),[b]),M=To(s),{droppableRects:N,measureDroppableContainers:P,measuringScheduled:F}=qa(j,{dragging:g,dependencies:[y.x,y.y],config:M.droppable}),I=Ha(v,_),L=(0,J.useMemo)(()=>D?di(D):null,[D]),R=xe(),ee=Ya(I,M.draggable.measure);Eo({activeNode:_==null?null:v.get(_),config:R.layoutShiftCompensation,initialRect:ee,measure:M.draggable.measure});let z=$a(I,M.draggable.measure,ee),te=$a(I?I.parentElement:null),B=(0,J.useRef)({activatorEvent:null,active:null,activeNode:I,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=b.getNodeFor(B.current.over?.id),V=fo({measure:M.dragOverlay.measure}),H=V.nodeRef.current??I,U=g?V.rect??z:null,re=!!(V.nodeRef.current&&V.rect),ie=eo(re?null:z),W=so(H?Gr(H):null),G=no(g?ne??I:null),K=lo(G),ae=wo(c,{transform:{x:y.x-ie.x,y:y.y-ie.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:z,containerNodeRect:te,draggingNodeRect:U,over:B.current.over,overlayNodeRect:V.rect,scrollableAncestors:G,scrollableAncestorRects:K,windowRect:W}),oe=L?oi(L,y):null,se=ro(G),ce=io(se),le=io(se,[z]),ue=oi(ae,ce),de=U?Ki(U,ae):null,fe=C&&de?o({active:C,collisionRect:de,droppableRects:N,droppableContainers:j,pointerCoordinates:oe}):null,pe=Fi(fe,`id`),[me,he]=(0,J.useState)(null),q=Ui(re?ae:oi(ae,le),me?.rect??null,z),ge=(0,J.useRef)(null),_e=(0,J.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:B,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,yi.unstable_batchedUpdates)(()=>{r?.(i),h(Oo.Initializing),d({type:Z.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(ge.current),O(a)})},onMove(e){d({type:Z.DragMove,coordinates:e})},onEnd:s(Z.DragEnd),onCancel:s(Z.DragCancel)});ge.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=B.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Z.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Z.DragCancel)}w.current=null,(0,yi.unstable_batchedUpdates)(()=>{d({type:e}),h(Oo.Uninitialized),he(null),E(null),O(null),ge.current=null;let t=e===Z.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),ve=Ua(a,(0,J.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,_e(n,t))},[v,_e]));ao(a),Xr(()=>{z&&m===Oo.Initializing&&h(Oo.Initialized)},[z,m]),(0,J.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=B.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ue.x,y:ue.y},over:i};(0,yi.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[ue.x,ue.y]),(0,J.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=B.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(pe),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,yi.unstable_batchedUpdates)(()=>{he(s),a?.(c),f({type:`onDragOver`,event:c})})},[pe]),Xr(()=>{B.current={activatorEvent:D,active:C,activeNode:I,collisionRect:de,collisions:fe,droppableRects:N,draggableNodes:v,draggingNode:H,draggingNodeRect:U,droppableContainers:b,over:me,scrollableAncestors:G,scrollAdjustedTranslate:ue},S.current={initial:U,translated:de}},[C,I,fe,de,v,H,U,N,b,me,G,ue]),za({...R,delta:y,draggingRect:de,pointerCoordinates:oe,scrollableAncestors:G,scrollableAncestorRects:K});let ye=(0,J.useMemo)(()=>({active:C,activeNode:I,activeNodeRect:z,activatorEvent:D,collisions:fe,containerNodeRect:te,dragOverlay:V,draggableNodes:v,droppableContainers:b,droppableRects:N,over:me,measureDroppableContainers:P,scrollableAncestors:G,scrollableAncestorRects:K,measuringConfiguration:M,measuringScheduled:F,windowRect:W}),[C,I,z,D,fe,te,V,v,b,N,me,P,G,K,M,F,W]),be=(0,J.useMemo)(()=>({activatorEvent:D,activators:ve,active:C,activeNodeRect:z,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:me,measureDroppableContainers:P}),[D,ve,C,z,d,A,v,me,P]);return J.createElement(bi.Provider,{value:p},J.createElement(yo.Provider,{value:be},J.createElement(bo.Provider,{value:ye},J.createElement(Do.Provider,{value:q},i)),J.createElement(Co,{disabled:n?.restoreFocus===!1})),J.createElement(Ti,{...n,hiddenTextDescribedById:A}));function xe(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Ao=(0,J.createContext)(null),jo=`button`,Mo=`Draggable`;function No(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=ii(Mo),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,J.useContext)(yo),{role:p=jo,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,J.useContext)(g?Do:Ao),[v,y]=ti(),[b,x]=ti(),S=oo(o,t),C=$r(n);return Xr(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,J.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===jo?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function Po(){return(0,J.useContext)(bo)}var Fo=`Droppable`,Io={timeout:25};function Lo(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=ii(Fo),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,J.useContext)(yo),u=(0,J.useRef)({disabled:n}),d=(0,J.useRef)(!1),f=(0,J.useRef)(null),p=(0,J.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Io,...i},_=$r(h??r),v=Za({callback:(0,J.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=ti((0,J.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=$r(t);return(0,J.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,J.useEffect)(()=>(s({type:Z.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Z.UnregisterDroppable,key:a,id:r})),[r]),(0,J.useEffect)(()=>{n!==u.current.disabled&&(s({type:Z.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function Ro(e){let{animation:t,children:n}=e,[r,i]=(0,J.useState)(null),[a,o]=(0,J.useState)(null),s=ni(n);return!n&&!r&&s&&i(s),Xr(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),J.createElement(J.Fragment,null,n,r?(0,J.cloneElement)(r,{ref:o}):null)}var zo={x:0,y:0,scaleX:1,scaleY:1};function Bo(e){let{children:t}=e;return J.createElement(yo.Provider,{value:vo},J.createElement(Do.Provider,{value:zo},t))}var Vo={position:`fixed`,touchAction:`none`},Ho=e=>li(e)?`transform 250ms ease`:void 0,Uo=(0,J.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Ho}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Vo,width:s.width,height:s.height,top:s.top,left:s.left,transform:fi.Transform.toString(d),transformOrigin:i&&r?ji(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return J.createElement(n,{className:o,style:f,ref:t},a)}),Wo={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:fi.Transform.toString(t)},{transform:fi.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function Go(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Zr((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=uo(a);if(!c)return;let{transform:l}=Gr(a).getComputedStyle(a),u=qi(l);if(!u)return;let d=typeof t==`function`?t:Ko(t);return ha(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Ko(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Wo,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var qo=0;function Jo(e){return(0,J.useMemo)(()=>{if(e!=null)return qo++,qo},[e])}var Yo=J.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=Po(),S=(0,J.useContext)(Do),C=Jo(d?.id),w=wo(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=Ja(f),E=Go({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return J.createElement(Bo,null,J.createElement(Ro,{animation:E},d&&C?J.createElement(Uo,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function Xo(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Zo(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function Qo(e){return e!==null&&e>=0}function $o(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function es(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var ts={scaleX:1,scaleY:1},ns=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=rs(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...ts}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...ts}:a<r&&a>=i?{x:o.width+s,y:0,...ts}:{x:0,y:0,...ts}};function rs(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var is=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=Xo(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},as={scaleX:1,scaleY:1},os=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...as}:null}let s=ss(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...as}:r<t&&r>=a?{x:0,y:o.height+s,...as}:{x:0,y:0,...as}};function ss(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var cs=`Sortable`,ls=J.createContext({activeIndex:-1,containerId:cs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:is,disabled:{draggable:!1,droppable:!1}});function us(e){let{children:t,id:n,items:r,strategy:i=is,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=Po(),d=ii(cs,n),f=s.rect!==null,p=(0,J.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,J.useRef)(p),v=!$o(p,_.current),y=g!==-1&&h===-1||v,b=es(a);Xr(()=>{v&&m&&u(p)},[v,p,m,u]),(0,J.useEffect)(()=>{_.current=p},[p]);let x=(0,J.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:Zo(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return J.createElement(ls.Provider,{value:x},t)}var ds=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Xo(n,r,i).indexOf(t)},fs=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},ps={duration:200,easing:`ease`},ms=`transform`,hs=fi.Transition.toString({property:ms,duration:0,easing:`linear`}),gs={roleDescription:`sortable`};function _s(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,J.useState)(null),s=(0,J.useRef)(n);return Xr(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=Xi(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,J.useEffect)(()=>{a&&o(null)},[a]),a}function vs(e){let{animateLayoutChanges:t=fs,attributes:n,disabled:r,data:i,getNewIndex:a=ds,id:o,strategy:s,resizeObserverConfig:c,transition:l=ps}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,J.useContext)(ls),y=ys(r,p),b=u.indexOf(o),x=(0,J.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,J.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=Lo({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:A,setNodeRef:j,listeners:M,isDragging:N,over:P,setActivatorNodeRef:F,transform:I}=No({id:o,data:x,attributes:{...gs,...n},disabled:y.draggable}),L=Vr(E,j),R=!!D,ee=R&&!m&&Qo(f)&&Qo(g),z=!_&&N,te=ee?(z&&ee?I:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,B=Qo(f)&&Qo(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ne=D?.id,V=(0,J.useRef)({activeId:ne,items:u,newIndex:B,containerId:d}),H=u!==V.current.items,U=t({active:D,containerId:d,isDragging:N,isSorting:R,id:o,index:b,items:u,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:l,wasDragging:V.current.activeId!=null}),re=_s({disabled:!U,index:b,node:w,rect:C});return(0,J.useEffect)(()=>{R&&V.current.newIndex!==B&&(V.current.newIndex=B),d!==V.current.containerId&&(V.current.containerId=d),u!==V.current.items&&(V.current.items=u)},[R,B,d,u]),(0,J.useEffect)(()=>{if(ne===V.current.activeId)return;if(ne!=null&&V.current.activeId==null){V.current.activeId=ne;return}let e=setTimeout(()=>{V.current.activeId=ne},50);return()=>clearTimeout(e)},[ne]),{active:D,activeIndex:f,attributes:A,data:x,rect:C,index:b,newIndex:B,items:u,isOver:T,isSorting:R,isDragging:N,listeners:M,node:w,overIndex:g,over:P,setNodeRef:L,setActivatorNodeRef:F,setDroppableNodeRef:E,setDraggableNodeRef:j,transform:re??te,transition:ie()};function ie(){if(re||H&&V.current.newIndex===b)return hs;if(!(z&&!li(O)||!l)&&(R||U))return fi.Transition.toString({...l,property:ms})}}function ys(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function bs(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var xs=[$.Down,$.Right,$.Up,$.Left],Ss=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(xs.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case $.Down:r.top<a.top&&t.push(n);break;case $.Up:r.top>a.top&&t.push(n);break;case $.Left:r.left>a.left&&t.push(n);break;case $.Right:r.left<a.left&&t.push(n)}});let c=Ri({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=Fi(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=ta(c).some((e,t)=>s[t]!==e),i=Cs(e,t),a=ws(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:si(u,l)}}}};function Cs(e,t){return!bs(e)||!bs(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function ws(e,t){return!bs(e)||!bs(t)||!Cs(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Ts=e=>{let{transform:t}=e;return{...t,x:0}},Es=(0,J.memo)(e=>{let t=(0,Y.c)(7),{output:n,cellId:r,status:i,stale:a}=e,o;t[0]===i?o=t[1]:(o=x(i),t[0]=i,t[1]=o);let s=o,c;return t[2]!==r||t[3]!==s||t[4]!==n||t[5]!==a?(c=(0,X.jsx)(Be,{className:`contents`,allowExpand:!1,output:n,cellId:r,stale:a,loading:s}),t[2]=r,t[3]=s,t[4]=n,t[5]=a,t[6]=c):c=t[6],c});Es.displayName=`Slide`;var Ds=`slide`,Os=`slide`,ks=`center`,As=36,js=d(`marimo:slides:config-open`,!0,w,{getOnInit:!0}),Ms=[{value:`slide`,label:`Slide`,description:`A new top-level slide. Advances horizontally with the right arrow.`,Icon:sn},{value:`sub-slide`,label:`Sub-slide`,description:`Stacks vertically under the previous slide. Reached with the down arrow.`,Icon:un},{value:`fragment`,label:`Fragment`,description:`Reveals step-by-step on the current slide without advancing.`,Icon:rn},{value:`skip`,label:`Skip`,description:`Hidden from the presentation. Still visible here in the editor.`,Icon:ht}],Ns=Object.fromEntries(Ms.map(e=>[e.value,e])),Ps=[{value:`none`,label:`None`,description:`No animation between slides.`},{value:`fade`,label:`Fade`,description:`Cross-fade between slides.`},{value:`slide`,label:`Slide`,description:`Slides move horizontally / vertically.`},{value:`convex`,label:`Convex`,description:`Rotate with a convex curve.`},{value:`concave`,label:`Concave`,description:`Rotate with a concave curve.`},{value:`zoom`,label:`Zoom`,description:`Zoom into the next slide.`}],Fs=[{value:`center`,label:`Center`,description:`Vertically center each slide's content.`},{value:`top`,label:`Top`,description:`Align content to the top, like the cell view.`},{value:`bottom`,label:`Bottom`,description:`Align content to the bottom of each slide.`}],Is=e=>{let t=(0,Y.c)(13),{layout:n,setLayout:r,cellId:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsxs)(ye,{className:`grid grid-cols-2`,children:[(0,X.jsx)(_e,{value:`slide`,children:`Slide`}),(0,X.jsx)(_e,{value:`deck`,children:`Deck`})]}),t[0]=a):a=t[0];let o;t[1]!==i||t[2]!==n||t[3]!==r?(o=(0,X.jsx)(ve,{value:`slide`,className:`mt-0 flex-1`,children:(0,X.jsx)(Bs,{layout:n,setLayout:r,cellId:i})}),t[1]=i,t[2]=n,t[3]=r,t[4]=o):o=t[4];let s;t[5]!==n||t[6]!==r?(s=(0,X.jsx)(ve,{value:`deck`,className:`mt-0 flex-1`,children:(0,X.jsx)(Vs,{layout:n,setLayout:r})}),t[5]=n,t[6]=r,t[7]=s):s=t[7];let c,l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(`hr`,{}),l=(0,X.jsx)(zs,{}),t[8]=c,t[9]=l):(c=t[8],l=t[9]);let u;return t[10]!==o||t[11]!==s?(u=(0,X.jsxs)(be,{defaultValue:`slide`,className:`flex flex-col flex-1 p-3 gap-3`,children:[a,o,s,c,l]}),t[10]=o,t[11]=s,t[12]=u):u=t[12],u},Ls=[{keys:[`F`],description:`Enter fullscreen`},{keys:[`C`],description:`Toggle code editor`}],Rs=`https://vlaaad.github.io/reveal/keyboard-shortcuts`,zs=()=>{let e=(0,Y.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 font-medium text-foreground/80`,children:[(0,X.jsx)(on,{className:`h-3.5 w-3.5`}),(0,X.jsx)(`span`,{children:`Shortcuts`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[t,(0,X.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:Ls.map(Ws)}),(0,X.jsx)(`a`,{href:Rs,target:`_blank`,rel:`noopener noreferrer`,className:`text-link hover:underline`,children:`See all shortcuts`})]}),e[1]=n):n=e[1],n},Bs=e=>{let t=(0,Y.c)(29),{layout:n,setLayout:r,cellId:i}=e,a;t[0]!==i||t[1]!==n.cells?(a=n.cells.get(i),t[0]=i,t[1]=n.cells,t[2]=a):a=t[2];let o=a,s=o?.type??`slide`,c=o?.showCode??!1,l;t[3]!==i||t[4]!==o||t[5]!==n||t[6]!==r?(l=e=>{let t=new Map(n.cells);t.set(i,{...o,type:e}),r({...n,cells:t})},t[3]=i,t[4]=o,t[5]=n,t[6]=r,t[7]=l):l=t[7];let u=l,d;t[8]!==i||t[9]!==o||t[10]!==n||t[11]!==r?(d=e=>{let t=new Map(n.cells);t.set(i,{...o,showCode:e}),r({...n,cells:t})},t[8]=i,t[9]=o,t[10]=n,t[11]=r,t[12]=d):d=t[12];let f=d,p;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(`span`,{className:`font-semibold text-sm`,children:`Slide type`}),t[13]=p):p=t[13];let m;t[14]===u?m=t[15]:(m=e=>u(e),t[14]=u,t[15]=m);let h;t[16]===s?h=t[17]:(h=Ms.map(e=>{let{value:t,label:n,description:r,Icon:i}=e,a=s===t;return(0,X.jsx)(S,{value:t,className:q(`group h-auto w-full text-left rounded-md p-2.5 transition-colors shadow-none! border`,`focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,a?`border-primary bg-primary/5`:`border-border bg-background hover:bg-accent/50 hover:border-foreground/30`),children:(0,X.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,X.jsx)(`span`,{className:q(`mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded`,a?`bg-primary/10 text-primary`:`bg-muted text-muted-foreground group-hover:text-foreground`),children:(0,X.jsx)(i,{className:`h-3.5 w-3.5`})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:q(`text-sm font-medium leading-tight`,a?`text-primary`:`text-foreground`),children:n}),(0,X.jsx)(`p`,{className:`mt-0.5 text-xs text-foreground/70`,children:r})]})]})},t)}),t[16]=s,t[17]=h);let g;t[18]!==s||t[19]!==m||t[20]!==h?(g=(0,X.jsx)(O,{"aria-label":`Slide type`,value:s,onValueChange:m,className:`flex flex-col gap-1.5`,children:h}),t[18]=s,t[19]=m,t[20]=h,t[21]=g):g=t[21];let _;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(`label`,{htmlFor:`slide-show-code`,className:`text-sm`,children:`Show code`}),t[22]=_):_=t[22];let v;t[23]!==f||t[24]!==c?(v=(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[_,(0,X.jsx)(se,{id:`slide-show-code`,"aria-label":`Show code`,checked:c,onCheckedChange:f,size:`sm`})]}),t[23]=f,t[24]=c,t[25]=v):v=t[25];let y;return t[26]!==g||t[27]!==v?(y=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[p,g,v]}),t[26]=g,t[27]=v,t[28]=y):y=t[28],y},Vs=e=>{let t=(0,Y.c)(39),{layout:n,setLayout:r}=e,i=n.deck?.transition??`slide`,a;t[0]===i?a=t[1]:(a=Ps.find(e=>e.value===i)?.description,t[0]=i,t[1]=a);let o=a,s=n.deck?.verticalAlign??`center`,c;t[2]===s?c=t[3]:(c=Fs.find(e=>e.value===s)?.description,t[2]=s,t[3]=c);let l=c,u;t[4]!==n||t[5]!==r?(u=e=>{r({...n,deck:{...n.deck,transition:e}})},t[4]=n,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]!==n||t[8]!==r?(f=e=>{r({...n,deck:{...n.deck,verticalAlign:e}})},t[7]=n,t[8]=r,t[9]=f):f=t[9];let p=f,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(`label`,{htmlFor:`deck-transition`,className:`font-semibold text-sm text-foreground`,children:`Transition`}),t[10]=m):m=t[10];let h;t[11]===d?h=t[12]:(h=e=>d(e),t[11]=d,t[12]=h);let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(Te,{id:`deck-transition`,"aria-label":`Slide transition`,children:(0,X.jsx)(xe,{})}),t[13]=g):g=t[13];let _;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(we,{children:Ps.map(Gs)}),t[14]=_):_=t[14];let v;t[15]!==i||t[16]!==h?(v=(0,X.jsxs)(Ee,{value:i,onValueChange:h,children:[g,_]}),t[15]=i,t[16]=h,t[17]=v):v=t[17];let y;t[18]===o?y=t[19]:(y=o&&(0,X.jsx)(`p`,{className:`text-xs text-foreground/70`,children:o}),t[18]=o,t[19]=y);let b;t[20]!==y||t[21]!==v?(b=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[m,v,y]}),t[20]=y,t[21]=v,t[22]=b):b=t[22];let x;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,X.jsx)(`label`,{htmlFor:`deck-vertical-align`,className:`font-semibold text-sm text-foreground`,children:`Vertical alignment`}),t[23]=x):x=t[23];let S;t[24]===p?S=t[25]:(S=e=>p(e),t[24]=p,t[25]=S);let C;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(Te,{id:`deck-vertical-align`,"aria-label":`Vertical alignment`,children:(0,X.jsx)(xe,{})}),t[26]=C):C=t[26];let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(we,{children:Fs.map(Ks)}),t[27]=w):w=t[27];let T;t[28]!==s||t[29]!==S?(T=(0,X.jsxs)(Ee,{value:s,onValueChange:S,children:[C,w]}),t[28]=s,t[29]=S,t[30]=T):T=t[30];let E;t[31]===l?E=t[32]:(E=l&&(0,X.jsx)(`p`,{className:`text-xs text-foreground/70`,children:l}),t[31]=l,t[32]=E);let D;t[33]!==T||t[34]!==E?(D=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[x,T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35];let O;return t[36]!==b||t[37]!==D?(O=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[b,D]}),t[36]=b,t[37]=D,t[38]=O):O=t[38],O},Hs=e=>{let t=(0,Y.c)(30),{configWidth:n,layout:r,setLayout:i,activeConfigCell:o}=e,[s,c]=a(js),l=s?n:As,u;t[0]===l?u=t[1]:(u={width:l},t[0]=l,t[1]=u);let d=s?`justify-between px-2`:`justify-center px-0`,f;t[2]===d?f=t[3]:(f=q(`flex items-center h-9 shrink-0 border-b border-border/60`,d),t[2]=d,t[3]=f);let p;t[4]===s?p=t[5]:(p=s&&(0,X.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground pl-1`,children:`Configuration`}),t[4]=s,t[5]=p);let m=s?`Collapse panel`:`Expand panel`,h;t[6]===c?h=t[7]:(h=()=>c(Js),t[6]=c,t[7]=h);let g;t[8]===s?g=t[9]:(g=s?(0,X.jsx)(cn,{className:`h-4 w-4`}):(0,X.jsx)(ln,{className:`h-4 w-4`}),t[8]=s,t[9]=g);let _;t[10]!==s||t[11]!==h||t[12]!==g?(_=(0,X.jsx)(Ye,{variant:`ghost`,size:`icon`,className:`h-7 w-7 text-muted-foreground hover:text-foreground`,onClick:h,"aria-expanded":s,"aria-controls":`slide-config-panel`,children:g}),t[10]=s,t[11]=h,t[12]=g,t[13]=_):_=t[13];let v;t[14]!==m||t[15]!==_?(v=(0,X.jsx)(qe,{content:m,children:_}),t[14]=m,t[15]=_,t[16]=v):v=t[16];let y;t[17]!==v||t[18]!==f||t[19]!==p?(y=(0,X.jsxs)(`header`,{className:f,children:[p,v]}),t[17]=v,t[18]=f,t[19]=p,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==s||t[23]!==r||t[24]!==i?(b=s&&(0,X.jsx)(`div`,{id:`slide-config-panel`,className:`flex-1 overflow-y-auto overflow-x-hidden`,children:o?(0,X.jsx)(Is,{layout:r,setLayout:i,cellId:o.id}):(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5 p-3 text-xs text-muted-foreground`,children:[(0,X.jsx)(`span`,{className:`font-semibold text-sm text-foreground`,children:`No slides yet`}),(0,X.jsx)(`p`,{children:`Run a cell that produces output to add it to the deck. Slide settings will appear here once a slide is selected.`})]})}),t[21]=o,t[22]=s,t[23]=r,t[24]=i,t[25]=b):b=t[25];let x;return t[26]!==y||t[27]!==b||t[28]!==u?(x=(0,X.jsxs)(`aside`,{className:`h-full flex flex-col border-l border-border/60 bg-muted/20 transition-[width] duration-200 ease-out overflow-hidden`,style:u,"aria-label":`Slide configuration`,onKeyDown:qs,children:[y,b]}),t[26]=y,t[27]=b,t[28]=u,t[29]=x):x=t[29],x};function Us(e){return(0,X.jsx)(Wt,{children:e},e)}function Ws(e){let{keys:t,description:n}=e;return(0,X.jsxs)(`li`,{className:`flex items-center justify-between`,children:[(0,X.jsx)(`span`,{children:n}),(0,X.jsx)(`span`,{className:`flex gap-1`,children:t.map(Us)})]},n)}function Gs(e){let{value:t,label:n}=e;return(0,X.jsx)(Ce,{value:t,children:n},t)}function Ks(e){let{value:t,label:n}=e;return(0,X.jsx)(Ce,{value:t,children:n},t)}function qs(e){return e.stopPropagation()}function Js(e){return!e}function Ys(e){if(!e||e===`slide`)return null;let{label:t,description:n,Icon:r}=Ns[e];return{label:t,description:n,Icon:r}}var Xs={label:`No output`,description:`Hidden because this cell has no output.`},Zs=16/9,Qs=520;function $s(e){return{width:e,height:e/Zs,scale:e/Qs}}var ec={threshold:{x:0,y:.1}},tc=8,nc=`200px 0px`,rc=e=>{let t=Hi(e);return t.length>0?t:Li(e)};function ic(e){let t=(0,Y.c)(3),[n,r]=(0,J.useState)(ac),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{let t=e.current;if(!t)return;let n=new IntersectionObserver(e=>{r(t=>{let n=new Set(t),r=!1;for(let t of e){let e=t.target.dataset.cellId;e&&(t.isIntersecting&&!n.has(e)?(n.add(e),r=!0):!t.isIntersecting&&n.has(e)&&(n.delete(e),r=!0))}return r?n:t})},{root:t,rootMargin:nc}),i=()=>{n.disconnect();for(let e of t.querySelectorAll(`[data-cell-id]`))n.observe(e)};i();let a=new MutationObserver(i);return a.observe(t,{childList:!0}),()=>{n.disconnect(),a.disconnect()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,J.useEffect)(i,a),n}function ac(){return new Set}var oc=({cells:e,thumbnailWidth:t,canReorder:n,activeCellId:r,skippedIds:i,noOutputIds:a,slideTypes:o,onSlideClick:s})=>{let c=m(),{moveCellToIndex:l,createNewCell:u}=f(),d=bt(),p=(0,J.useRef)(null),h=ic(p),[g,_]=(0,J.useState)(null),[v,y]=(0,J.useState)(null),x=$s(t),S=(e,t)=>{u({cellId:e,before:t,code:``,autoFocus:!1})};(0,J.useEffect)(()=>{!r||!p.current||p.current.querySelector(`[data-cell-id="${r}"]`)?.scrollIntoView({block:`nearest`,behavior:`instant`})},[r]);let C=Oi(Di(ja,{activationConstraint:{distance:8}})),w=g?e.find(e=>e.id===g)??null:null,T=()=>{_(null),y(null)},E=e=>{let t=pc(e);y(e=>e?.overId===t?.overId&&e?.position===t?.position?e:t)};return n?(0,X.jsxs)(ko,{autoScroll:ec,collisionDetection:rc,modifiers:[Ts],sensors:C,onDragStart:e=>{y(null);let t=hc(e.active.id);t&&_(t)},onDragMove:E,onDragOver:E,onDragEnd:e=>{try{if(g&&v){let e=mc({cellIds:c,activeId:g,target:v});e&&l(e)}}catch(e){B.warn(`Drop failed`,e)}finally{T()}},onDragCancel:T,children:[(0,X.jsx)(sc,{ref:p,children:(0,X.jsx)(us,{items:e.map(e=>e.id),strategy:os,children:e.map((e,t)=>(0,X.jsx)(cc,{cell:e,dimensions:x,isActive:g===e.id,isActiveSlide:e.id===r,isVisible:h.has(e.id),isNoOutput:a?.has(e.id),slideType:gc({cellId:e.id,slideTypes:o,skippedIds:i}),dropIndicator:v?.overId===e.id&&g!==e.id?v.position:null,onInsertAbove:t===0?()=>S(e.id,!0):void 0,onInsertBelow:()=>S(e.id,!1),onDelete:()=>d({cellId:e.id}),onClick:()=>s(t)},e.id))})}),(0,X.jsx)(Yo,{children:w&&(0,X.jsx)(dc,{cell:w,dimensions:x,isOverlay:!0,isActiveDragSource:!0,isNoOutput:a?.has(w.id)})})]}):(0,X.jsxs)(sc,{ref:p,children:[(0,X.jsxs)(`div`,{className:`text-xs text-gray-500 flex items-center gap-0.5`,children:[(0,X.jsx)(b,{className:`h-3 w-3`}),`Reordering is not supported in multi-column mode`]}),e.map((e,t)=>(0,X.jsx)(lc,{cell:e,dimensions:x,isActiveSlide:e.id===r,isVisible:h.has(e.id),isNoOutput:a?.has(e.id),slideType:gc({cellId:e.id,slideTypes:o,skippedIds:i}),onInsertAbove:t===0?()=>S(e.id,!0):void 0,onInsertBelow:()=>S(e.id,!1),onDelete:()=>d({cellId:e.id}),onClick:()=>s(t)},e.id))]})},sc=e=>{let t=(0,Y.c)(3),{children:n,ref:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,X.jsx)(`div`,{ref:r,className:`h-full overflow-auto flex flex-col scrollbar-thin`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},cc=e=>{let t=(0,Y.c)(18),{cell:n,dimensions:r,dropIndicator:i,isActive:a,isActiveSlide:o,isVisible:s,isNoOutput:c,slideType:l,onInsertAbove:u,onInsertBelow:d,onDelete:f,onClick:p}=e,m;t[0]===n.id?m=t[1]:(m={id:n.id},t[0]=n.id,t[1]=m);let{attributes:h,listeners:g,setNodeRef:_}=vs(m),v;return t[2]!==h||t[3]!==n||t[4]!==r||t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==c||t[9]!==s||t[10]!==g||t[11]!==p||t[12]!==f||t[13]!==u||t[14]!==d||t[15]!==_||t[16]!==l?(v=(0,X.jsx)(lc,{ref:_,cell:n,dimensions:r,dropIndicator:i,isActiveDragSource:a,isActiveSlide:o,isVisible:s,isNoOutput:c,slideType:l,onInsertAbove:u,onInsertBelow:d,onDelete:f,onClick:p,...h,...g}),t[2]=h,t[3]=n,t[4]=r,t[5]=i,t[6]=a,t[7]=o,t[8]=c,t[9]=s,t[10]=g,t[11]=p,t[12]=f,t[13]=u,t[14]=d,t[15]=_,t[16]=l,t[17]=v):v=t[17],v},lc=e=>{let t=(0,Y.c)(59),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16]):({cell:n,dimensions:i,className:r,style:h,dropIndicator:a,isActiveSlide:g,isActiveDragSource:_,isVisible:s,isNoOutput:o,slideType:m,onInsertAbove:u,onInsertBelow:d,onDelete:l,onClick:c,ref:p,...f}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_);let v=g!==void 0&&g,y=_!==void 0&&_,b;t[17]===h?b=t[18]:(b={paddingTop:tc,paddingBottom:tc,...h},t[17]=h,t[18]=b);let x=b,S=_c,C=n.id,w;t[19]===r?w=t[20]:(w=q(`relative shrink-0 appearance-none text-left p-0 bg-transparent outline-hidden`,r),t[19]=r,t[20]=w);let T;t[21]===a?T=t[22]:(T=a&&(0,X.jsx)(`div`,{className:q(`absolute left-2 right-2 h-0.5 rounded-full bg-blue-500 z-20 pointer-events-none`,a===`after`?`bottom-0 translate-y-1/2`:`top-0 -translate-y-1/2`)}),t[21]=a,t[22]=T);let E;t[23]===u?E=t[24]:(E=u&&(0,X.jsx)(uc,{position:`above`,onInsert:u}),t[23]=u,t[24]=E);let D;t[25]!==n||t[26]!==i||t[27]!==y||t[28]!==v||t[29]!==o||t[30]!==s||t[31]!==m?(D=(0,X.jsx)(dc,{cell:n,dimensions:i,isActiveSlide:v,isActiveDragSource:y,isVisible:s,isNoOutput:o,slideType:m}),t[25]=n,t[26]=i,t[27]=y,t[28]=v,t[29]=o,t[30]=s,t[31]=m,t[32]=D):D=t[32];let O;t[33]===d?O=t[34]:(O=d&&(0,X.jsx)(uc,{position:`below`,onInsert:d}),t[33]=d,t[34]=O);let k;t[35]!==n.id||t[36]!==c||t[37]!==f||t[38]!==p||t[39]!==x||t[40]!==w||t[41]!==T||t[42]!==E||t[43]!==D||t[44]!==O?(k=(0,X.jsxs)(`div`,{ref:p,role:`button`,tabIndex:0,"data-cell-id":C,className:w,style:x,onClick:c,onKeyDown:S,...f,children:[T,E,D,O]}),t[35]=n.id,t[36]=c,t[37]=f,t[38]=p,t[39]=x,t[40]=w,t[41]=T,t[42]=E,t[43]=D,t[44]=O,t[45]=k):k=t[45];let A=k;if(!d&&!l)return A;let j;t[46]===A?j=t[47]:(j=(0,X.jsx)(Me,{asChild:!0,children:A}),t[46]=A,t[47]=j);let M;t[48]===d?M=t[49]:(M=d&&(0,X.jsxs)(Fe,{onSelect:d,children:[(0,X.jsx)(xt,{className:`mr-2 h-3.5 w-3.5`}),`Add cell`]}),t[48]=d,t[49]=M);let N;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,X.jsx)(ze,{}),t[50]=N):N=t[50];let P;t[51]===l?P=t[52]:(P=l&&(0,X.jsxs)(Fe,{variant:`danger`,onSelect:l,children:[(0,X.jsx)(Ft,{className:`mr-2 h-3.5 w-3.5`}),`Delete cell`]}),t[51]=l,t[52]=P);let F;t[53]!==M||t[54]!==P?(F=(0,X.jsxs)(Ne,{children:[M,N,P]}),t[53]=M,t[54]=P,t[55]=F):F=t[55];let I;return t[56]!==j||t[57]!==F?(I=(0,X.jsxs)(Le,{children:[j,F]}),t[56]=j,t[57]=F,t[58]=I):I=t[58],I},uc=e=>{let t=(0,Y.c)(10),{position:n,onInsert:r}=e,i=n===`below`?`bottom-0 translate-y-1/2`:`top-0 -translate-y-1/2`,a;t[0]===i?a=t[1]:(a=q(`absolute left-0 right-0 z-30 flex h-3 items-center justify-center`,`opacity-0 transition-opacity hover:opacity-80 focus-visible:opacity-100 focus:outline-hidden`,i),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=Je.stopPropagation(),t[2]=o):o=t[2];let s;t[3]===r?s=t[4]:(s=Je.stopPropagation(r),t[3]=r,t[4]=s);let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(`span`,{className:`absolute left-2 right-2 h-px rounded-full bg-blue-500`}),t[5]=c):c=t[5];let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`span`,{className:`relative flex h-3 w-3 items-center justify-center rounded-full bg-blue-500 text-background shadow-xs`,children:(0,X.jsx)(xt,{className:`h-2 w-2`,strokeWidth:3})}),t[6]=l):l=t[6];let u;return t[7]!==a||t[8]!==s?(u=(0,X.jsx)(qe,{content:`Add Python cell`,children:(0,X.jsxs)(`button`,{type:`button`,"aria-label":`Add Python cell`,"data-testid":`minimap-insert-cell`,className:a,onPointerDown:o,onClick:s,children:[c,l]})}),t[7]=a,t[8]=s,t[9]=u):u=t[9],u},dc=e=>{let t=(0,Y.c)(50),n,r,i,a,o,s,c,l,u,d,f,p;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12]):({cell:n,dimensions:i,className:r,style:c,isActiveSlide:l,isActiveDragSource:u,isOverlay:d,isVisible:f,isNoOutput:p,slideType:s,ref:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p);let m=l!==void 0&&l,h=u!==void 0&&u,g=d!==void 0&&d,_=f!==void 0&&f,v=p!==void 0&&p,{width:y,height:b,scale:x}=i,S;t[13]!==v||t[14]!==s?(S=v?Xs:Ys(s),t[13]=v,t[14]=s,t[15]=S):S=t[15];let C=S,w=v||s===`skip`,E;t[16]!==b||t[17]!==g||t[18]!==y?(E=g?null:{contentVisibility:`auto`,containIntrinsicSize:`${y}px ${b}px`},t[16]=b,t[17]=g,t[18]=y,t[19]=E):E=t[19];let D;t[20]!==b||t[21]!==c||t[22]!==E||t[23]!==y?(D={width:y,height:b,contain:`strict`,...E,...c},t[20]=b,t[21]=c,t[22]=E,t[23]=y,t[24]=D):D=t[24];let O=D,k=_||g,A=m||h||g?`border-blue-500`:`border-border hover:border-blue-500/50`,j=h&&!g&&`opacity-35`,M=g&&`opacity-95 shadow-lg`,N;t[25]!==r||t[26]!==j||t[27]!==M||t[28]!==A?(N=q(`border-2 shrink-0 rounded-md relative select-none bg-background cursor-pointer active:cursor-grabbing overflow-hidden transition-colors`,A,j,M,r),t[25]=r,t[26]=j,t[27]=M,t[28]=A,t[29]=N):N=t[29];let P;t[30]!==n||t[31]!==b||t[32]!==v||t[33]!==x||t[34]!==k||t[35]!==y?(P=k&&(0,X.jsx)(`div`,{className:`flex p-6 box-border pointer-events-none mo-slide-content overflow-hidden`,style:{transform:`scale(${x})`,transformOrigin:`top left`,width:y/x,height:b/x},children:v?(0,X.jsx)(fc,{code:n.code}):(0,X.jsx)(Es,{cellId:n.id,status:n.status,output:n.output,stale:T(n,!1)})}),t[30]=n,t[31]=b,t[32]=v,t[33]=x,t[34]=k,t[35]=y,t[36]=P):P=t[36];let F;t[37]===w?F=t[38]:(F=w&&(0,X.jsx)(`div`,{className:`absolute inset-0 bg-muted/50 pointer-events-none`,"aria-hidden":!0}),t[37]=w,t[38]=F);let I;t[39]!==w||t[40]!==C?(I=C?.Icon&&(0,X.jsx)(qe,{content:(0,X.jsx)(`span`,{className:`text-xs opacity-80`,children:C.description}),children:(0,X.jsx)(`span`,{className:q(`absolute top-1 right-1 flex items-center gap-1 rounded-full border p-0.5 font-medium leading-none shadow-xs cursor-help`,w?`bg-background/90 border-border text-muted-foreground`:`bg-background/95 border-border text-foreground/80`),"aria-label":C.label,children:(0,X.jsx)(C.Icon,{className:`h-3.5 w-3.5`})})}),t[39]=w,t[40]=C,t[41]=I):I=t[41];let L;return t[42]!==O||t[43]!==a||t[44]!==o||t[45]!==N||t[46]!==P||t[47]!==F||t[48]!==I?(L=(0,X.jsxs)(`div`,{ref:o,className:N,style:O,...a,children:[P,F,I]}),t[42]=O,t[43]=a,t[44]=o,t[45]=N,t[46]=P,t[47]=F,t[48]=I,t[49]=L):L=t[49],L},fc=e=>{let t=(0,Y.c)(2),{code:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`pre`,{className:`my-auto w-full overflow-hidden whitespace-pre-wrap wrap-break-word text-lg`,children:n}),t[0]=n,t[1]=r),r};function pc(e){let{active:t,over:n}=e;if(!n)return null;let r=hc(t.id),i=hc(n.id);if(!r||!i||r===i)return null;let a=t.rect.current.translated??t.rect.current.initial;return a?{overId:i,position:a.top+a.height/2<n.rect.top+n.rect.height/2?`before`:`after`}:null}function mc({cellIds:e,activeId:t,target:n}){if(t===n.overId)return null;if(e.colLength!==1)return B.warn(`Multi-column mode is not supported`),null;let r=e.findWithId(n.overId),i=r.indexOfOrThrow(n.overId);return{cellId:t,columnId:r.id,index:n.position===`after`?i+1:i}}function hc(e){return typeof e==`string`?e:null}function gc({cellId:e,slideTypes:t,skippedIds:n}){let r=t?.get(e);if(r&&r!==`slide`)return r;if(n?.has(e))return`skip`}function _c(e){e.target===e.currentTarget&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.click())}function vc(e){let t=new URL(e);return t.hash=``,t.searchParams.set(`kiosk`,`true`),t.searchParams.set(`show-chrome`,`false`),t.toString()}function yc(e,t){return e&&new URLSearchParams(t).has(`receiver`)}function bc(e){return e!==`wasm`}var xc=J.lazy(()=>Lt(()=>import(`./reveal-component-nZIAapoD.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184]),import.meta.url)),Sc=e=>{let t=(0,Y.c)(33),{layout:n,setLayout:r,cells:i,mode:a}=e,o=s(W),c=a===`read`||o,u=s(k)>1,[d,f]=(0,J.useState)(null),p;t[0]!==i||t[1]!==n?(p=Br(i,n),t[0]=i,t[1]=n,t[2]=p):p=t[2];let{slideCells:m,skippedIds:h,noOutputIds:g,slideTypes:_,startCellIndex:v}=p,y;t[3]!==d||t[4]!==m||t[5]!==v?(y=d?m.findIndex(e=>e.id===d):v,t[3]=d,t[4]=m,t[5]=v,t[6]=y):y=t[6];let b=y,x=b===-1?v:b,S=yc(o,window.location.search),C=c&&d==null&&window.location.hash.startsWith(`#/`),w=S||C?void 0:x,T;t[7]===m?T=t[8]:(T=e=>{let t=m[e];t&&f(t.id)},t[7]=m,t[8]=T);let E=l(T),D=S?void 0:E,O=c?`read`:a,A=!c,j;t[9]!==w||t[10]!==n||t[11]!==g||t[12]!==r||t[13]!==m||t[14]!==D||t[15]!==O||t[16]!==A?(j=(0,X.jsx)(xc,{slideCells:m,layout:n,setLayout:r,noOutputIds:g,activeIndex:w,onSlideChange:D,configWidth:280,mode:O,isEditable:A}),t[9]=w,t[10]=n,t[11]=g,t[12]=r,t[13]=m,t[14]=D,t[15]=O,t[16]=A,t[17]=j):j=t[17];let M=j;if(c){if(o){let e;return t[18]===M?e=t[19]:(e=(0,X.jsx)(`div`,{className:`flex h-dvh w-dvw overflow-hidden bg-background`,children:M}),t[18]=M,t[19]=e),e}let e;return t[20]===M?e=t[21]:(e=(0,X.jsx)(`div`,{className:`p-4 flex flex-1 items-center justify-center min-h-0`,children:(0,X.jsx)(`div`,{className:`h-full max-h-[95vh] aspect-video max-w-full flex`,children:M})}),t[20]=M,t[21]=e),e}let N=!u,P=d??m[v]?.id??null,F;t[22]!==E||t[23]!==g||t[24]!==h||t[25]!==m||t[26]!==_||t[27]!==N||t[28]!==P?(F=(0,X.jsx)(oc,{cells:m,thumbnailWidth:220,canReorder:N,activeCellId:P,skippedIds:h,noOutputIds:g,slideTypes:_,onSlideClick:E}),t[22]=E,t[23]=g,t[24]=h,t[25]=m,t[26]=_,t[27]=N,t[28]=P,t[29]=F):F=t[29];let I;return t[30]!==M||t[31]!==F?(I=(0,X.jsxs)(`div`,{className:`flex-1 pr-18 pb-2 flex flex-row gap-2 min-h-0`,children:[F,M]}),t[30]=M,t[31]=F,t[32]=I):I=t[32],I},Cc=L([`slide`,`sub-slide`,`fragment`,`skip`]),wc=I({type:Cc.optional().catch(void 0),speakerNotes:j().optional().catch(void 0),showCode:F().optional().catch(void 0)}).catch({}),Tc=L([`none`,`fade`,`slide`,`convex`,`concave`,`zoom`]),Ec=L([`top`,`center`,`bottom`]),Dc=I({transition:Tc.optional().catch(void 0),verticalAlign:Ec.optional().catch(void 0)}).catch({}),Oc={type:`slides`,name:`Slides`,validator:I({cells:N(wc).optional().catch(void 0),deck:Dc.optional().catch(void 0)}),deserializeLayout:(e,t)=>{let n=e.cells??[],r=e.deck??{};n.length>0&&n.length!==t.length&&B.warn(`Number of cells in layout does not match number of cells in notebook`);let i=new Map;for(let[e,r]of t.entries()){let t=n.at(e);t&&i.set(r.id,t)}return{cells:i,deck:r}},serializeLayout:(e,t)=>({cells:t.map(t=>({...e.cells.get(t.id)})),deck:e.deck}),Component:Sc,getInitialLayout:()=>({cells:new Map,deck:{}})};function kc({value:e,setValue:t}){let[n,r]=J.useState([]),i=J.useRef(-1),a=J.useRef(``),o=J.useRef(n);return o.current=n,{history:n,navigateUp:J.useCallback(()=>{let n=o.current;if(n.length===0)return;let r=i.current;r===-1&&(a.current=e);let s=Math.min(r+1,n.length-1);s!==r&&(i.current=s,t(n[n.length-1-s]))},[e,t]),navigateDown:J.useCallback(()=>{let e=o.current;if(e.length===0)return;let n=i.current;if(n>0){let r=n-1;i.current=r,t(e[e.length-1-r])}else n===0&&(i.current=-1,t(a.current))},[t]),addToHistory:J.useCallback(e=>{r(t=>t.length===0||t[t.length-1]!==e?[...t,e]:t),i.current=-1,a.current=``},[])}}var Ac=(0,J.memo)(e=>{let t=J.useRef({});return(0,X.jsx)(Ut,{minHeight:`200px`,maxHeight:`200px`,ref:t,theme:`dark`,value:e.code,className:`*:outline-hidden [&>.cm-editor]:pr-0 overflow-hidden dark`,readOnly:!0,editable:!1,basicSetup:{lineNumbers:!1},extensions:[Qt.sh(),Xe.updateListener.of(e=>{e.docChanged&&t.current.view?.dispatch({selection:{anchor:e.state.doc.length,head:e.state.doc.length},scrollIntoView:!0})})]})});Ac.displayName=`DebuggerOutput`;var jc=e=>{let t=(0,Y.c)(31),{onSubmit:n,onClear:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=q(`m-0 w-9 h-8 bg-(--slate-2) text-(--slate-11) hover:text-(--blue-11) rounded-none hover:bg-(--sky-3) hover:border-(--blue-8)`,`first:rounded-l-lg first:border-l border-t border-b hover:border`,`last:rounded-r-lg last:border-r`),t[0]=i):i=t[0];let a=i,o;t[1]===n?o=t[2]:(o=()=>n(`n`),t[1]=n,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(fn,{fontSize:36,className:`w-5 h-5`}),t[3]=s):s=t[3];let c;t[4]===o?c=t[5]:(c=(0,X.jsx)(qe,{content:`Next line`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-next-button`,className:a,onClick:o,children:s})}),t[4]=o,t[5]=c);let l;t[6]===n?l=t[7]:(l=()=>n(`c`),t[6]=n,t[7]=l);let u,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=q(a,`text-(--grass-11) hover:text-(--grass-11) hover:bg-(--grass-3) hover:border-(--grass-8)`),d=(0,X.jsx)(yt,{fontSize:36,className:`w-5 h-5`}),t[8]=u,t[9]=d):(u=t[8],d=t[9]);let f;t[10]===l?f=t[11]:(f=(0,X.jsx)(qe,{content:`Continue execution`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-continue-button`,onClick:l,className:u,children:d})}),t[10]=l,t[11]=f);let p;t[12]===n?p=t[13]:(p=()=>n(`bt`),t[12]=n,t[13]=p);let m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(y,{fontSize:36,className:`w-5 h-5`}),t[14]=m):m=t[14];let h;t[15]===p?h=t[16]:(h=(0,X.jsx)(qe,{content:`Print stack trace`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-stack-button`,className:a,onClick:p,children:m})}),t[15]=p,t[16]=h);let g;t[17]===n?g=t[18]:(g=()=>n(`help`),t[17]=n,t[18]=g);let _;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(ft,{fontSize:36,className:`w-5 h-5`}),t[19]=_):_=t[19];let v;t[20]===g?v=t[21]:(v=(0,X.jsx)(qe,{content:`Help`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-help-button`,className:a,onClick:g,children:_})}),t[20]=g,t[21]=v);let b;t[22]!==r||t[23]!==n?(b=r&&(0,X.jsx)(qe,{content:`Quit and clear`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-clear-button`,className:q(a,`text-(--red-11) hover:text-(--red-11) hover:bg-(--red-2) hover:border-(--red-8)`),onClick:()=>{n(`q`),r()},children:(0,X.jsx)(It,{fontSize:36,className:`w-5 h-5`})})}),t[22]=r,t[23]=n,t[24]=b):b=t[24];let x;return t[25]!==h||t[26]!==v||t[27]!==b||t[28]!==c||t[29]!==f?(x=(0,X.jsxs)(`div`,{className:`flex`,children:[c,f,h,v,b]}),t[25]=h,t[26]=v,t[27]=b,t[28]=c,t[29]=f,t[30]=x):x=t[30],x};function Mc(e=!0){return{onKeyDown:t=>{if(!e)return;let n=t.currentTarget;if(!(t.key.toLowerCase()===`a`&&(t.ctrlKey||t.metaKey)))return;t.preventDefault(),t.stopPropagation();let r=window.getSelection();if(!r)return;let i=document.createRange();i.selectNodeContents(n),r.removeAllRanges(),r.addRange(i)}}}var Nc=d(`marimo:console:wrapText`,!1,w);function Pc(){let e=(0,Y.c)(3),[t,n]=a(Nc),r;return e[0]!==n||e[1]!==t?(r={wrapText:t,setWrapText:n},e[0]=n,e[1]=t,e[2]=r):r=e[2],r}function Fc(e){let[t,n]=(0,J.useState)(e),r=(0,J.useRef)(null);return e.length>0&&t!==e&&(r.current!==null&&(clearTimeout(r.current),r.current=null),n(e)),(0,J.useEffect)(()=>(e.length===0&&r.current===null&&(r.current=setTimeout(()=>{r.current=null,n([])},200)),()=>{r.current!==null&&(clearTimeout(r.current),r.current=null)}),[e]),t}var Ic=e=>{let t=(0,Y.c)(2),n;return t[0]===e?n=t[1]:(n=(0,X.jsx)(he,{children:(0,X.jsx)(Lc,{...e})}),t[0]=e,t[1]=n),n},Lc=e=>{let t=(0,Y.c)(63),n=J.useRef(null),{wrapText:r,setWrapText:i}=Pc(),[a,o]=dt(e.cellId),[s,c]=J.useState(``),l;t[0]===s?l=t[1]:(l={value:s,setValue:c},t[0]=s,t[1]=l);let u=kc(l),{consoleOutputs:d,stale:f,interrupted:p,cellName:m,cellId:h,onSubmitDebugger:g,onClear:_,onRefactorWithAI:y,className:b}=e,x=Fc(d),S=x.length>0,C=Mc(S),w=Re(n,S),T;if(t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{let e=n.current;if(!e)return;let t=e.scrollHeight-e.clientHeight;t-e.scrollTop<120&&(e.scrollTop=t)},t[2]=T):T=t[2],(0,J.useLayoutEffect)(T),!S&&v(m))return null;let E,D,O,k,A,j,M,N,P,F;if(t[3]!==h||t[4]!==b||t[5]!==x||t[6]!==S||t[7]!==u||t[8]!==p||t[9]!==a||t[10]!==w||t[11]!==_||t[12]!==y||t[13]!==g||t[14]!==C||t[15]!==o||t[16]!==i||t[17]!==f||t[18]!==s||t[19]!==r){let e=x.toReversed(),l=e.some(Vc),d=e.findIndex(Hc),m;t[30]===x?m=t[31]:(m=()=>x.filter(Uc).map(Wc).join(`
9
- `),t[30]=x,t[31]=m);let v=m;E=`relative group`,t[32]!==v||t[33]!==S||t[34]!==a||t[35]!==w||t[36]!==o||t[37]!==i||t[38]!==r?(D=S&&(0,X.jsxs)(`div`,{className:`absolute top-1 right-4 z-10 opacity-0 group-hover:opacity-100 flex items-center gap-1 print:hidden`,children:[(0,X.jsx)(Bt,{tooltip:`Copy console output`,value:v,className:`h-4 w-4`}),(0,X.jsx)(qe,{content:r?`Disable wrap text`:`Wrap text`,children:(0,X.jsx)(`span`,{children:(0,X.jsx)(vn,{"aria-label":`Toggle text wrapping`,className:`p-1 rounded bg-transparent text-muted-foreground data-hovered:text-foreground data-selected:text-foreground`,isSelected:r,onChange:i,children:(0,X.jsx)(Pe,{className:`h-4 w-4`})})})}),(w||a)&&(0,X.jsx)(Ye,{"aria-label":a?`Collapse output`:`Expand output`,className:`p-0 mb-px`,onClick:()=>o(!a),size:`xs`,variant:null,children:a?(0,X.jsx)(qe,{content:`Collapse output`,children:(0,X.jsx)(ct,{className:`h-4 w-4`})}):(0,X.jsx)(qe,{content:`Expand output`,children:(0,X.jsx)(lt,{className:`h-4 w-4 `})})})]}),t[32]=v,t[33]=S,t[34]=a,t[35]=w,t[36]=o,t[37]=i,t[38]=r,t[39]=D):D=t[39],O=f?`This console output is stale`:void 0,k=`console-output-area`,A=n,j=C,M=0;let T=f&&`marimo-output-stale`,I=S?`p-5`:`p-3`;t[40]!==b||t[41]!==T||t[42]!==I?(N=q(`console-output-area overflow-hidden rounded-b-lg flex flex-col-reverse w-full gap-1 focus:outline-hidden`,T,I,b),t[40]=b,t[41]=T,t[42]=I,t[43]=N):N=t[43],t[44]===a?P=t[45]:(P=a?{maxHeight:`none`}:void 0,t[44]=a,t[45]=P),F=e.map((e,t)=>{if(e.channel===`pdb`)return null;if(e.channel===`stdin`){V(typeof e.data==`string`,`Expected data to be a string`);let n=x.length-t-1,r=e.mimetype===`text/password`;return e.response==null&&d===t?(0,X.jsx)(Rc,{output:e.data,isPdb:l,isPassword:r,onSubmit:e=>g(e,n),onClear:_,value:s,setValue:c,inputHistory:u},t):(0,X.jsx)(zc,{output:e.data,response:e.response,isPassword:r,interrupted:p},t)}return(0,X.jsx)(J.Fragment,{children:(0,X.jsx)(Ve,{cellId:h,onRefactorWithAI:y,message:e,wrapText:r})},t)}),t[3]=h,t[4]=b,t[5]=x,t[6]=S,t[7]=u,t[8]=p,t[9]=a,t[10]=w,t[11]=_,t[12]=y,t[13]=g,t[14]=C,t[15]=o,t[16]=i,t[17]=f,t[18]=s,t[19]=r,t[20]=E,t[21]=D,t[22]=O,t[23]=k,t[24]=A,t[25]=j,t[26]=M,t[27]=N,t[28]=P,t[29]=F}else E=t[20],D=t[21],O=t[22],k=t[23],A=t[24],j=t[25],M=t[26],N=t[27],P=t[28],F=t[29];let I;t[46]!==h||t[47]!==m?(I=(0,X.jsx)(Zt,{value:m,cellId:h,className:`bg-(--slate-4) border-(--slate-4) hover:bg-(--slate-5) dark:border-(--sky-5) dark:bg-(--sky-6) dark:text-(--sky-12) text-(--slate-12) rounded-l rounded-br-lg absolute right-0 bottom-0 text-xs px-1.5 py-0.5 font-mono max-w-[75%] whitespace-nowrap overflow-hidden`}),t[46]=h,t[47]=m,t[48]=I):I=t[48];let L;t[49]!==I||t[50]!==O||t[51]!==k||t[52]!==A||t[53]!==j||t[54]!==M||t[55]!==N||t[56]!==P||t[57]!==F?(L=(0,X.jsxs)(`div`,{title:O,"data-testid":k,ref:A,...j,tabIndex:M,className:N,style:P,children:[F,I]}),t[49]=I,t[50]=O,t[51]=k,t[52]=A,t[53]=j,t[54]=M,t[55]=N,t[56]=P,t[57]=F,t[58]=L):L=t[58];let R;return t[59]!==E||t[60]!==D||t[61]!==L?(R=(0,X.jsxs)(`div`,{className:E,children:[D,L]}),t[59]=E,t[60]=D,t[61]=L,t[62]=R):R=t[62],R},Rc=e=>{let t=(0,Y.c)(25),{value:n,setValue:r,inputHistory:i,output:a,isPassword:o,isPdb:s,onSubmit:c,onClear:l}=e,{navigateUp:u,navigateDown:d,addToHistory:f}=i,p;t[0]===a?p=t[1]:(p=Bc(a),t[0]=a,t[1]=p);let m=o?`password`:`text`,h;t[2]===r?h=t[3]:(h=e=>r(e.target.value),t[2]=r,t[3]=h);let g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(ot,{className:`w-5 h-5`}),t[4]=g):g=t[4];let _;t[5]!==f||t[6]!==d||t[7]!==u||t[8]!==c||t[9]!==r||t[10]!==n?(_=e=>{if(e.key===`ArrowUp`){u(),e.preventDefault();return}if(e.key===`ArrowDown`){d(),e.preventDefault();return}e.key===`Enter`&&!e.shiftKey&&(n&&f(n),c(n),r(``),e.preventDefault(),e.stopPropagation()),e.key===`Enter`&&e.metaKey&&(e.preventDefault(),e.stopPropagation())},t[5]=f,t[6]=d,t[7]=u,t[8]=c,t[9]=r,t[10]=n,t[11]=_):_=t[11];let v;t[12]!==m||t[13]!==h||t[14]!==_||t[15]!==n?(v=(0,X.jsx)(Mt,{"data-testid":`console-input`,"data-stdin-blocking":!0,type:m,autoComplete:`off`,autoFocus:!0,value:n,onChange:h,icon:g,className:`m-0 h-8 focus-visible:shadow-xs-solid`,placeholder:`stdin`,onKeyDownCapture:_}),t[12]=m,t[13]=h,t[14]=_,t[15]=n,t[16]=v):v=t[16];let y;t[17]!==s||t[18]!==l||t[19]!==c?(y=s&&(0,X.jsx)(jc,{onSubmit:c,onClear:l}),t[17]=s,t[18]=l,t[19]=c,t[20]=y):y=t[20];let b;return t[21]!==p||t[22]!==v||t[23]!==y?(b=(0,X.jsxs)(`div`,{className:`flex gap-2 items-center pt-2`,children:[p,v,y]}),t[21]=p,t[22]=v,t[23]=y,t[24]=b):b=t[24],b},zc=e=>{let t=(0,Y.c)(10),{output:n,response:r,isPassword:i,interrupted:a}=e,o=r!=null&&r!==``,s=a&&!o,c;t[0]===n?c=t[1]:(c=Bc(n),t[0]=n,t[1]=c);let l;t[2]!==o||t[3]!==i||t[4]!==r||t[5]!==s?(l=!i&&!s&&(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-(--sky-11)`,"aria-label":`stdin response`,children:[(0,X.jsx)(ot,{className:`w-4 h-4 shrink-0 opacity-70`}),o?r:(0,X.jsx)(`span`,{className:`italic opacity-70`,children:`(empty)`})]}),t[2]=o,t[3]=i,t[4]=r,t[5]=s,t[6]=l):l=t[6];let u;return t[7]!==c||t[8]!==l?(u=(0,X.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[c,l]}),t[7]=c,t[8]=l,t[9]=u):u=t[9],u},Bc=e=>e?(0,X.jsx)(Pt,{text:e}):null;function Vc(e){return typeof e.data==`string`&&e.data.includes(`(Pdb)`)}function Hc(e){return e.channel===`stdin`}function Uc(e){return e.channel!==`pdb`}function Wc(e){return Yt(e)}var Gc={canHealthCheck:!1,canShutdown:!1,canRestart:!1,supportsLsp:!1},Kc={kind:`wasm`,label:`Pyodide`,capabilities:Gc,state:o(e=>{let t=e(de);switch(t.kind){case`loading`:return{kind:`connecting`,progress:{label:t.message}};case`ready`:return{kind:`ready`};case`error`:return{kind:`failed`,error:{message:t.message,errorKind:`init`}}}})},qc={kind:`remote`,label:`Kernel`,capabilities:{canHealthCheck:!0,canShutdown:!0,canRestart:!0,supportsLsp:!0},state:o(e=>{let t=e(ae);switch(t.state){case G.OPEN:return{kind:`ready`};case G.CONNECTING:return{kind:`connecting`,progress:{label:`Connecting…`}};case G.NOT_STARTED:return{kind:`connecting`,progress:{label:`Not connected`}};case G.CLOSING:case G.CLOSED:return{kind:`failed`,error:{message:t.state===G.CLOSED?t.reason:`Disconnecting`,errorKind:`runtime`}}}})},Jc={kind:`static`,label:`Static`,capabilities:Gc,state:o({kind:`ready`})},Yc={kind:`islands`,label:`Islands`,capabilities:Gc,state:o(e=>{let t=e(le);return t===!0?{kind:`ready`}:typeof t==`string`?{kind:`failed`,error:{message:t,errorKind:`init`}}:{kind:`connecting`,progress:{label:`Initializing islands…`}}})};function Xc(){return K()?Jc:z()?Yc:ie()?Kc:qc}var Zc=o(Xc());o(e=>{let t=e(Zc);return e(t.state).kind!==`ready`||t.kind===`static`?!1:t.kind!==`remote`||e(fe).isInstantiated});function Qc(e){let t=(0,Y.c)(2),n=s(W),{mode:r}=s(re),i=s(oe),a=s(Zc).kind;if(n&&a===`remote`)return!0;switch(r){case`edit`:case`present`:return!0;case`home`:case`gallery`:return!1;case`read`:{if(!i||new URLSearchParams(window.location.search).get(H.includeCode)===`false`)return!1;let n;return t[0]===e?n=t[1]:(n=e.some($c),t[0]=e,t[1]=n),n}default:return Qe(r),!1}}function $c(e){return!!e.code}var el=/\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g,tl=class e{static get INSTANCE(){let t=`_marimo_private_VirtualFileTracker`;return window[t]||(window[t]=new e),window[t]}virtualFiles=new Map;constructor(){}track(e){let t=e.output,n=e.cell_id;if(t)switch(t.mimetype){case`application/json`:case`text/html`:{let e=this.virtualFiles.get(n),r=nl(t.data);e?.forEach(e=>r.add(e)),this.virtualFiles.set(n,r);return}default:return}}filenames(){let e=new Set;for(let t of this.virtualFiles.values())t.forEach(t=>e.add(t));return[...e]}removeForCellId(e){this.virtualFiles.delete(e)}};function nl(e){if(!e)return new Set;let t=new Set,n=(typeof e==`string`?e:JSON.stringify(e)).match(el);if(n)for(let e of n)t.add(e);return t}async function rl(e){let t=tt(),{includeCode:n}=e,r=await t.exportAsHTML({download:!0,includeCode:n,files:tl.INSTANCE.filenames(),layout:await Tl()});He(r)}function il(e,t){return{"data-cell-id":e,"data-cell-name":t,id:h.create(e)}}var al=30;function ol(e,t){let n=(0,Y.c)(5),[r,i]=(0,J.useState)(!0),a;n[0]!==t||n[1]!==e?(a=()=>{if(t!==`read`){i(!1);return}let n=Ze((e-1)*al,100,2e3),r=setTimeout(()=>{i(!1)},n);return()=>clearTimeout(r)},n[0]=t,n[1]=e,n[2]=a):a=n[2],rt(a);let o;return n[3]===r?o=n[4]:(o={invisible:r},n[3]=r,n[4]=o),o}function sl({showCodeInRunModePreference:e,kioskMode:t}){if(!e)return!1;let n=new URLSearchParams(window.location.search).get(H.showCode);return n===null?K()||ie()||t:n===`true`}function cl(e){K()&&Rt(t=>{t.set(H.showCode,String(e))})}function ll(e){let t=new Map,n=0;return e.forEach(e=>{let r=e.config.column??n;n=r,t.has(r)||t.set(r,[]),t.get(r)?.push(e)}),[...t.entries()].toSorted(([e],[t])=>e-t)}function ul(e,t){let n=new E().isSupported(e),r=t!==null&&!ut(t);return n&&r||e.trim()===``}var dl=e=>{let t=(0,Y.c)(15),{invisible:n,appConfig:r,className:i,children:a,innerClassName:o}=e,s;t[0]===i?s=t[1]:(s=q(`px-1 sm:px-16 md:px-20 xl:px-24 print:px-0 print:pb-0`,`pb-24 sm:pb-12`,i),t[0]=i,t[1]=s);let c=r.width===`compact`&&`max-w-(--content-width) sm:min-w-[400px]`,l=r.width===`medium`&&`max-w-(--content-width-medium) sm:min-w-[400px]`,u=r.width===`columns`&&`w-fit`,d=r.width===`full`&&`max-w-full`,f=n&&`invisible`,p;t[2]!==o||t[3]!==c||t[4]!==l||t[5]!==u||t[6]!==d||t[7]!==f?(p=q(`m-auto`,`pb-24 sm:pb-12`,c,l,u,d,f,o),t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d,t[7]=f,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==p?(m=(0,X.jsx)(`div`,{className:p,children:a}),t[9]=a,t[10]=p,t[11]=m):m=t[11];let h;return t[12]!==s||t[13]!==m?(h=(0,X.jsx)(`div`,{className:s,children:m}),t[12]=s,t[13]=m,t[14]=h):h=t[14],h},fl=e=>{let t=(0,Y.c)(33),{cells:n,appConfig:r,mode:i}=e,{invisible:a}=ol(n.length,i),o=s(W),c=s(fe),[l]=te(),u=s(oe),d;t[0]!==o||t[1]!==u?(d=()=>sl({showCodeInRunModePreference:u,kioskMode:o}),t[0]=o,t[1]=u,t[2]=d):d=t[2];let[f,p]=(0,J.useState)(d),m=Qc(n),h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{p(gl)},t[3]=h):h=t[3];let g=h,_;t[4]!==m||t[5]!==o||t[6]!==i||t[7]!==f||t[8]!==l?(_=e=>(0,X.jsx)(ml,{cellId:e.id,output:e.output,consoleOutputs:e.consoleOutputs,status:e.status,code:e.code,config:e.config,cellOutputArea:l.display.cell_output,stopped:e.stopped,showCode:f&&m,errored:e.errored,mode:i,runStartTimestamp:e.runStartTimestamp,interrupted:e.interrupted,staleInputs:e.staleInputs,name:e.name,kiosk:o,showErrorTracebacks:l.runtime.show_tracebacks??!1},e.id),t[4]=m,t[5]=o,t[6]=i,t[7]=f,t[8]=l,t[9]=_):_=t[9];let v=_,y;t[10]!==r.width||t[11]!==n||t[12]!==a||t[13]!==c||t[14]!==v?(y=()=>{if(r.width===`columns`){let e=ll(n);return(0,X.jsx)(`div`,{className:`flex flex-row gap-8 w-full`,children:e.map(e=>{let[t,n]=e;return(0,X.jsx)(`div`,{className:`flex-1 flex flex-col gap-2 w-(--content-width)`,children:n.map(v)},t)})})}return n.length===0&&!a?c.isInstantiated?(0,X.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center py-8`,children:(0,X.jsxs)(qt,{variant:`info`,children:[(0,X.jsx)(Kt,{children:`Empty Notebook`}),(0,X.jsx)(Gt,{children:`This notebook has no code or outputs.`})]})}):(0,X.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center py-8`,children:(0,X.jsx)(vt,{className:`w-8 h-8 animate-spin text-muted-foreground`})}):(0,X.jsx)(X.Fragment,{children:n.map(v)})},t[10]=r.width,t[11]=n,t[12]=a,t[13]=c,t[14]=v,t[15]=y):y=t[15];let b=y,x=f&&m&&`gap-5`,S;t[16]===x?S=t[17]:(S=q(`flex flex-col`,x),t[16]=x,t[17]=S);let C;t[18]===b?C=t[19]:(C=b(),t[18]=b,t[19]=C);let w;t[20]!==S||t[21]!==C?(w=(0,X.jsx)(`div`,{className:S,children:C}),t[20]=S,t[21]=C,t[22]=w):w=t[22];let T;t[23]!==m||t[24]!==i||t[25]!==f?(T=i===`read`&&(0,X.jsx)(pl,{canShowCode:m,showCode:f,onToggleShowCode:g}),t[23]=m,t[24]=i,t[25]=f,t[26]=T):T=t[26];let E;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,X.jsx)(Jt,{}),t[27]=E):E=t[27];let D;return t[28]!==r||t[29]!==a||t[30]!==w||t[31]!==T?(D=(0,X.jsxs)(dl,{invisible:a,appConfig:r,children:[w,T,E]}),t[28]=r,t[29]=a,t[30]=w,t[31]=T,t[32]=D):D=t[32],D},pl=e=>{let t=(0,Y.c)(26),{canShowCode:n,showCode:r,onToggleShowCode:i}=e,{readCode:a}=et(),o=_l,s=vl,c;t[0]===a?c=t[1]:(c=async()=>{let e=await a();Ue(new Blob([e.contents],{type:`text/plain`}),Ge.toPY(document.title))},t[0]=a,t[1]=c);let l=c,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=K(),t[2]=u):u=t[2];let d=u,f;if(t[3]!==n||t[4]!==l||t[5]!==i||t[6]!==r){if(f=[],n){let e,n;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(pt,{className:`mr-2`,size:14,strokeWidth:1.5}),n=(0,X.jsx)(`span`,{className:`flex-1`,children:`Show code`}),t[8]=e,t[9]=n):(e=t[8],n=t[9]);let a;t[10]===r?a=t[11]:(a=r&&(0,X.jsx)(it,{className:`h-4 w-4`}),t[10]=r,t[11]=a);let o;t[12]!==i||t[13]!==a?(o=(0,X.jsxs)(De,{onSelect:i,"data-testid":`notebook-action-show-code`,children:[e,n,a]},`show-code`),t[12]=i,t[13]=a,t[14]=o):o=t[14];let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(Oe,{},`show-code-separator`),t[15]=s):s=t[15],f.push(o,s)}if(!d){let e;if(t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsxs)(De,{onSelect:s,"data-testid":`notebook-action-download-html`,children:[(0,X.jsx)(an,{className:`mr-2`,size:14,strokeWidth:1.5}),`Download as HTML`]},`download-html`),t[16]=e):e=t[16],f.push(e),n){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(mt,{className:`mr-2`,size:14,strokeWidth:1.5}),t[17]=e):e=t[17];let n;t[18]===l?n=t[19]:(n=(0,X.jsxs)(De,{onSelect:l,"data-testid":`notebook-action-download-python`,children:[e,`Download notebook source`]},`download-python`),t[18]=l,t[19]=n),f.push(n)}let r;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(Oe,{},`download-separator`),t[20]=r):r=t[20];let i;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsxs)(De,{onSelect:o,"data-testid":`notebook-action-download-png`,children:[(0,X.jsx)(_t,{className:`mr-2`,size:14,strokeWidth:1.5}),`Download as PNG`]},`download-png`),t[21]=i):i=t[21],f.push(r,i)}t[3]=n,t[4]=l,t[5]=i,t[6]=r,t[7]=f}else f=t[7];if(f.length===0)return null;let p;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(p=q(`right-0 top-0 z-50 m-4 print:hidden flex gap-2`,K()?`absolute`:`fixed`),t[22]=p):p=t[22];let m;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(ke,{asChild:!0,children:(0,X.jsx)(Ye,{variant:`secondary`,size:`xs`,children:(0,X.jsx)(gt,{className:`w-4 h-4`})})}),t[23]=m):m=t[23];let h;return t[24]===f?h=t[25]:(h=(0,X.jsx)(`div`,{"data-testid":`notebook-actions-dropdown`,className:p,children:(0,X.jsxs)(je,{modal:!1,children:[m,(0,X.jsx)(Ae,{align:`end`,className:`print:hidden w-[220px]`,children:f})]})}),t[24]=f,t[25]=h),h},ml=(0,J.memo)(e=>{let t=(0,Y.c)(57),{output:n,consoleOutputs:r,cellOutputArea:i,cellId:a,status:o,stopped:s,errored:c,config:l,interrupted:u,staleInputs:d,runStartTimestamp:f,code:p,showCode:m,mode:h,name:v,kiosk:y,showErrorTracebacks:b}=e,S=(0,J.useRef)(null),C;t[0]!==u||t[1]!==n||t[2]!==f||t[3]!==d||t[4]!==o?(C=T({status:o,output:n,interrupted:u,runStartTimestamp:f,staleInputs:d},!1),t[0]=u,t[1]=n,t[2]=f,t[3]=d,t[4]=o,t[5]=C):C=t[5];let w=C,D;t[6]===o?D=t[7]:(D=x(o),t[6]=o,t[7]=D);let O=D,k=y&&h!==`present`,A;if(t[8]!==p||t[9]!==c||t[10]!==k||t[11]!==m||t[12]!==s){let e=new E().isSupported(p);A=q(`marimo-cell`,`hover-actions-parent empty:invisible`,!m&&!k?g({errored:c,stopped:s}):{"has-error":c,stopped:s,borderless:e}),t[8]=p,t[9]=c,t[10]=k,t[11]=m,t[12]=s,t[13]=A}else A=t[13];let j=A;if(h===`read`&&m||k){let e;t[14]!==a||t[15]!==O||t[16]!==n||t[17]!==w?(e=(0,X.jsx)(Be,{allowExpand:!0,output:n,className:U.outputArea,cellId:a,stale:w,loading:O}),t[14]=a,t[15]=O,t[16]=n,t[17]=w,t[18]=e):e=t[18];let o=e,s;t[19]!==p||t[20]!==n?(s=ul(p,n),t[19]=p,t[20]=n,t[21]=s):s=t[21];let c=s,d;t[22]!==p||t[23]!==c?(d=c?null:$t(p),t[22]=p,t[23]=c,t[24]=d):d=t[24];let f=d,m;t[25]!==a||t[26]!==v?(m=il(a,v),t[25]=a,t[26]=v,t[27]=m):m=t[27];let h=i===`above`&&o,g;t[28]!==l||t[29]!==f?(g=f&&(0,X.jsx)(`div`,{className:`tray`,children:(0,X.jsx)(pe,{initiallyHideCode:l.hide_code,code:f.code,language:f.language})}),t[28]=l,t[29]=f,t[30]=g):g=t[30];let _=i===`below`&&o,y;t[31]!==a||t[32]!==r||t[33]!==u||t[34]!==v||t[35]!==w?(y=(0,X.jsx)(Ic,{consoleOutputs:r,stale:w,interrupted:u,cellName:v,onSubmitDebugger:yl,cellId:a,debuggerActive:!1}),t[31]=a,t[32]=r,t[33]=u,t[34]=v,t[35]=w,t[36]=y):y=t[36];let b;return t[37]!==j||t[38]!==_||t[39]!==y||t[40]!==m||t[41]!==h||t[42]!==g?(b=(0,X.jsxs)(`div`,{tabIndex:-1,ref:S,className:j,...m,children:[h,g,_,y]}),t[37]=j,t[38]=_,t[39]=y,t[40]=m,t[41]=h,t[42]=g,t[43]=b):b=t[43],b}if(_({errored:c,interrupted:u,stopped:s,output:n,showErrorTracebacks:b}))return null;let M;t[44]!==a||t[45]!==v?(M=il(a,v),t[44]=a,t[45]=v,t[46]=M):M=t[46];let N=h===`edit`,P;t[47]!==a||t[48]!==O||t[49]!==n||t[50]!==w||t[51]!==N?(P=(0,X.jsx)(Be,{allowExpand:N,output:n,className:U.outputArea,cellId:a,stale:w,loading:O}),t[47]=a,t[48]=O,t[49]=n,t[50]=w,t[51]=N,t[52]=P):P=t[52];let F;return t[53]!==j||t[54]!==M||t[55]!==P?(F=(0,X.jsx)(`div`,{tabIndex:-1,ref:S,className:j,...M,children:P}),t[53]=j,t[54]=M,t[55]=P,t[56]=F):F=t[56],F});ml.displayName=`VerticalCell`;var hl={type:`vertical`,name:`Vertical`,validator:R(),Component:fl,deserializeLayout:e=>e,serializeLayout:e=>e,getInitialLayout:()=>null};function gl(e){let t=!e;return cl(t),t}async function _l(){let e=document.getElementById(`App`);e&&await We({element:e,filename:document.title,prepare:Ke})}async function vl(){document.getElementById(`App`)&&await rl({includeCode:!0})}function yl(){return null}var bl=[Rr,Oc,hl];function xl({type:e,data:t,cells:n}){let r=bl.find(t=>t.type===e);if(r===void 0)throw Error(`Unknown layout type: ${e}`);let i=r.validator.safeParse(t);return i.success?r.deserializeLayout(i.data,n):(B.warn(`Invalid ${e} layout`,i.error),r.getInitialLayout(n))}function Sl(e,t){if(e==null)return me();let n=bl.find(t=>t.type===e.type);return n===void 0?(B.warn(`Unknown layout type: ${e.type}`),me()):{selectedLayout:n.type,layoutData:{[n.type]:xl({type:n.type,data:e.data,cells:t})}}}function Cl({state:e,plugin:t,cells:n}){return e.layoutData[t.type]??(e.pendingLayout?.type===t.type?xl({type:t.type,data:e.pendingLayout.data,cells:n}):t.getInitialLayout(n))}function wl(){let e=C(),t=c.get(ue),{selectedLayout:n}=t;if(n===`vertical`)return null;let r=bl.find(e=>e.type===n);if(r===void 0)return B.error(`Unknown layout type: ${n}`),null;let i=p(e),a=Cl({state:t,plugin:r,cells:i});return{type:n,data:r.serializeLayout(a,i)}}async function Tl(){return await D(),wl()}export{Fi as A,Ss as C,Ea as D,ko as E,fi as F,ni as I,sn as L,Bi as M,Di as N,ja as O,Oi as P,on as R,ns as S,os as T,Ds as _,bl as a,Ts as b,tl as c,Ic as d,vc as f,ks as g,Os as h,Cl as i,Hi as j,Li as k,Qc as l,bc as m,Sl as n,dl as o,yc as p,wl as r,il as s,Tl as t,Zc as u,Hs as v,vs as w,us as x,Es as y,an as z};
8
+ `},wi={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Ti(e){let{announcements:t=wi,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Ci}=e,{announce:a,announcement:o}=vi(),s=ii(`DndLiveRegion`),[c,l]=(0,J.useState)(!1);if((0,J.useEffect)(()=>{l(!0)},[]),xi((0,J.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=J.createElement(J.Fragment,null,J.createElement(gi,{id:r,value:i.draggable}),J.createElement(_i,{id:s,announcement:o}));return n?(0,yi.createPortal)(u,n):u}var Z;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Z||={});function Ei(){}function Di(e,t){return(0,J.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Oi(){var e=[...arguments];return(0,J.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var ki=Object.freeze({x:0,y:0});function Ai(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function ji(e,t){let n=di(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function Mi(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Ni(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Pi(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Fi(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Ii(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Li=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Ii(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Ai(Ii(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Mi)},Ri=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Pi(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Pi(r),o=i.reduce((e,t,r)=>e+Ai(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Mi)};function zi(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Bi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=zi(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Ni)};function Vi(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var Hi=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&Vi(r,a)){let n=Pi(a).reduce((e,t)=>e+Ai(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(Mi)};function Ui(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Wi(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ki}function Gi(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Ki=Gi(1);function qi(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Ji(e,t,n){let r=qi(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Yi={ignoreTransform:!1};function Xi(e,t){t===void 0&&(t=Yi);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Gr(e).getComputedStyle(e);t&&(n=Ji(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function Zi(e){return Xi(e,{ignoreTransform:!0})}function Qi(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function $i(e,t){return t===void 0&&(t=Gr(e).getComputedStyle(e)),t.position===`fixed`}function ea(e,t){t===void 0&&(t=Gr(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function ta(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Kr(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!qr(i)||Jr(i)||n.includes(i))return n;let a=Gr(e).getComputedStyle(i);return i!==e&&ea(i,a)&&n.push(i),$i(i,a)?n:r(i.parentNode)}return e?r(e):n}function na(e){let[t]=ta(e,1);return t??null}function ra(e){return!Hr||!e?null:Ur(e)?e:Wr(e)?Kr(e)||e===Yr(e).scrollingElement?window:qr(e)?e:null:null}function ia(e){return Ur(e)?e.scrollX:e.scrollLeft}function aa(e){return Ur(e)?e.scrollY:e.scrollTop}function oa(e){return{x:ia(e),y:aa(e)}}var Q;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Q||={});function sa(e){return!Hr||!e?!1:e===document.scrollingElement}function ca(e){let t={x:0,y:0},n=sa(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var la={x:.2,y:.2};function ua(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=la);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=ca(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Q.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Q.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Q.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Q.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function da(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function fa(e){return e.reduce((e,t)=>oi(e,oa(t)),ki)}function pa(e){return e.reduce((e,t)=>e+ia(t),0)}function ma(e){return e.reduce((e,t)=>e+aa(t),0)}function ha(e,t){if(t===void 0&&(t=Xi),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);na(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var ga=[[`x`,[`left`,`right`],pa],[`y`,[`top`,`bottom`],ma]],_a=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=ta(t),r=fa(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of ga)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},va=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ya(e){let{EventTarget:t}=Gr(e);return e instanceof t?e:Yr(e)}function ba(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var xa;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(xa||={});function Sa(e){e.preventDefault()}function Ca(e){e.stopPropagation()}var $;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})($||={});var wa={start:[$.Space,$.Enter],cancel:[$.Esc],end:[$.Space,$.Enter,$.Tab]},Ta=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $.Right:return{...n,x:n.x+25};case $.Left:return{...n,x:n.x-25};case $.Down:return{...n,y:n.y+25};case $.Up:return{...n,y:n.y-25}}},Ea=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new va(Yr(t)),this.windowListeners=new va(Gr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xa.Resize,this.handleCancel),this.windowListeners.add(xa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xa.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ha(n),t(ki)}handleKeyDown(e){if(li(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=wa,coordinateGetter:a=Ta,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:ki;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=si(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=ca(n),p=da(n),m={x:Math.min(i===$.Right?p.right-p.width/2:p.right,Math.max(i===$.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===$.Down?p.bottom-p.height/2:p.bottom,Math.max(i===$.Down?p.top:p.top+p.height/2,u.y))},h=i===$.Right&&!s||i===$.Left&&!c,g=i===$.Down&&!l||i===$.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===$.Right&&e<=d.x||i===$.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===$.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===$.Down&&e<=d.y||i===$.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===$.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,oi(si(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Ea.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=wa,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Da(e){return!!(e&&`distance`in e)}function Oa(e){return!!(e&&`delay`in e)}var ka=class{constructor(e,t,n){n===void 0&&(n=ya(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Yr(i),this.documentListeners=new va(this.document),this.listeners=new va(n),this.windowListeners=new va(Gr(i)),this.initialCoordinates=di(r)??ki,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(xa.Resize,this.handleCancel),this.windowListeners.add(xa.DragStart,Sa),this.windowListeners.add(xa.VisibilityChange,this.handleCancel),this.windowListeners.add(xa.ContextMenu,Sa),this.documentListeners.add(xa.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Oa(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Da(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(xa.Click,Ca,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xa.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=di(e)??ki,s=si(n,o);if(!t&&a){if(Da(a)){if(a.tolerance!=null&&ba(s,a.tolerance))return this.handleCancel();if(ba(s,a.distance))return this.handleStart()}if(Oa(a)&&ba(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===$.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Aa={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},ja=class extends ka{constructor(e){let{event:t}=e,n=Yr(t.target);super(e,Aa,n)}};ja.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Ma={move:{name:`mousemove`},end:{name:`mouseup`}},Na;(function(e){e[e.RightClick=2]=`RightClick`})(Na||={});var Pa=class extends ka{constructor(e){super(e,Ma,Yr(e.event.target))}};Pa.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Na.RightClick&&(r?.({event:n}),!0)}}];var Fa={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Ia=class extends ka{constructor(e){super(e,Fa)}static setup(){return window.addEventListener(Fa.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Fa.move.name,e)};function e(){}}};Ia.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var La;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(La||={});var Ra;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Ra||={});function za(e){let{acceleration:t,activator:n=La.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Ra.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Va({delta:d,disabled:!a}),[m,h]=Qr(),g=(0,J.useRef)({x:0,y:0}),_=(0,J.useRef)({x:0,y:0}),v=(0,J.useMemo)(()=>{switch(n){case La.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case La.DraggableRect:return i}},[n,i,c]),y=(0,J.useRef)(null),b=(0,J.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,J.useMemo)(()=>s===Ra.TreeOrder?[...l].reverse():l,[s,l]);(0,J.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=ua(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Ba={x:{[Q.Backward]:!1,[Q.Forward]:!1},y:{[Q.Backward]:!1,[Q.Forward]:!1}};function Va(e){let{delta:t,disabled:n}=e,r=ni(t);return ei(e=>{if(n||!r||!e)return Ba;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Q.Backward]:e.x[Q.Backward]||i.x===-1,[Q.Forward]:e.x[Q.Forward]||i.x===1},y:{[Q.Backward]:e.y[Q.Backward]||i.y===-1,[Q.Forward]:e.y[Q.Forward]||i.y===1}}},[n,t,r])}function Ha(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return ei(e=>t==null?null:r??e??null,[r,t])}function Ua(e,t){return(0,J.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Wa;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Wa||={});var Ga;(function(e){e.Optimized=`optimized`})(Ga||={});var Ka=new Map;function qa(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,J.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,J.useRef)(e),d=g(),f=$r(d),p=(0,J.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,J.useRef)(null),h=ei(t=>{if(d&&!n)return Ka;if(!t||t===Ka||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new _a(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,J.useEffect)(()=>{u.current=e},[e]),(0,J.useEffect)(()=>{d||p()},[n,d]),(0,J.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,J.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Wa.Always:return!1;case Wa.BeforeDragging:return n;default:return!n}}}function Ja(e,t){return ei(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Ya(e,t){return Ja(e,t)}function Xa(e){let{callback:t,disabled:n}=e,r=Zr(t),i=(0,J.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,J.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Za(e){let{callback:t,disabled:n}=e,r=Zr(t),i=(0,J.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,J.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Qa(e){return new _a(Xi(e),e)}function $a(e,t,n){t===void 0&&(t=Qa);let[r,i]=(0,J.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Xa({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Za({callback:a});return Xr(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function eo(e){return Wi(e,Ja(e))}var to=[];function no(e){let t=(0,J.useRef)(e),n=ei(n=>e?n&&n!==to&&e&&t.current&&e.parentNode===t.current.parentNode?n:ta(e):to,[e]);return(0,J.useEffect)(()=>{t.current=e},[e]),n}function ro(e){let[t,n]=(0,J.useState)(null),r=(0,J.useRef)(e),i=(0,J.useCallback)(e=>{let t=ra(e.target);t&&n(e=>e?(e.set(t,oa(t)),new Map(e)):null)},[]);return(0,J.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=ra(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,oa(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{ra(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,J.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>oi(e,t),ki):fa(e):ki,[e,t])}function io(e,t){t===void 0&&(t=[]);let n=(0,J.useRef)(null);return(0,J.useEffect)(()=>{n.current=null},t),(0,J.useEffect)(()=>{let t=e!==ki;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?si(e,n.current):ki}function ao(e){(0,J.useEffect)(()=>{if(!Hr)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function oo(e,t){return(0,J.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function so(e){return(0,J.useMemo)(()=>e?Qi(e):null,[e])}var co=[];function lo(e,t){t===void 0&&(t=Xi);let[n]=e,r=so(n?Gr(n):null),[i,a]=(0,J.useState)(co);function o(){a(()=>e.length?e.map(e=>sa(e)?r:new _a(t(e),e)):co)}let s=Za({callback:o});return Xr(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function uo(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return qr(t)?t:e}function fo(e){let{measure:t}=e,[n,r]=(0,J.useState)(null),i=Za({callback:(0,J.useCallback)(e=>{for(let{target:n}of e)if(qr(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=ti((0,J.useCallback)(e=>{let n=uo(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,J.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var po=[{sensor:ja,options:{}},{sensor:Ea,options:{}}],mo={current:{}},ho={draggable:{measure:Zi},droppable:{measure:Zi,strategy:Wa.WhileDragging,frequency:Ga.Optimized},dragOverlay:{measure:Xi}},go=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},_o={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new go,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ei},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ho,measureDroppableContainers:Ei,windowRect:null,measuringScheduled:!1},vo={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:Ei,draggableNodes:new Map,over:null,measureDroppableContainers:Ei},yo=(0,J.createContext)(vo),bo=(0,J.createContext)(_o);function xo(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new go}}}function So(e,t){switch(t.type){case Z.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Z.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Z.DragEnd:case Z.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Z.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new go(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Z.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new go(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Z.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new go(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Co(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,J.useContext)(yo),a=ni(r),o=ni(n?.id);return(0,J.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!li(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=mi(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function wo(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function To(e){return(0,J.useMemo)(()=>({draggable:{...ho.draggable,...e?.draggable},droppable:{...ho.droppable,...e?.droppable},dragOverlay:{...ho.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Eo(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,J.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Xr(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=Wi(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=na(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Do=(0,J.createContext)({...ki,scaleX:1,scaleY:1}),Oo;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Oo||={});var ko=(0,J.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=po,collisionDetection:o=Bi,measuring:s,modifiers:c,...l}=e,[u,d]=(0,J.useReducer)(So,void 0,xo),[f,p]=Si(),[m,h]=(0,J.useState)(Oo.Uninitialized),g=m===Oo.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,J.useRef)({initial:null,translated:null}),C=(0,J.useMemo)(()=>_==null?null:{id:_,data:x?.data??mo,rect:S},[_,x]),w=(0,J.useRef)(null),[T,E]=(0,J.useState)(null),[D,O]=(0,J.useState)(null),k=$r(l,Object.values(l)),A=ii(`DndDescribedBy`,t),j=(0,J.useMemo)(()=>b.getEnabled(),[b]),M=To(s),{droppableRects:N,measureDroppableContainers:P,measuringScheduled:F}=qa(j,{dragging:g,dependencies:[y.x,y.y],config:M.droppable}),I=Ha(v,_),L=(0,J.useMemo)(()=>D?di(D):null,[D]),R=xe(),ee=Ya(I,M.draggable.measure);Eo({activeNode:_==null?null:v.get(_),config:R.layoutShiftCompensation,initialRect:ee,measure:M.draggable.measure});let z=$a(I,M.draggable.measure,ee),te=$a(I?I.parentElement:null),B=(0,J.useRef)({activatorEvent:null,active:null,activeNode:I,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=b.getNodeFor(B.current.over?.id),V=fo({measure:M.dragOverlay.measure}),H=V.nodeRef.current??I,U=g?V.rect??z:null,re=!!(V.nodeRef.current&&V.rect),ie=eo(re?null:z),W=so(H?Gr(H):null),G=no(g?ne??I:null),K=lo(G),ae=wo(c,{transform:{x:y.x-ie.x,y:y.y-ie.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:z,containerNodeRect:te,draggingNodeRect:U,over:B.current.over,overlayNodeRect:V.rect,scrollableAncestors:G,scrollableAncestorRects:K,windowRect:W}),oe=L?oi(L,y):null,se=ro(G),ce=io(se),le=io(se,[z]),ue=oi(ae,ce),de=U?Ki(U,ae):null,fe=C&&de?o({active:C,collisionRect:de,droppableRects:N,droppableContainers:j,pointerCoordinates:oe}):null,pe=Fi(fe,`id`),[me,he]=(0,J.useState)(null),q=Ui(re?ae:oi(ae,le),me?.rect??null,z),ge=(0,J.useRef)(null),_e=(0,J.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:B,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,yi.unstable_batchedUpdates)(()=>{r?.(i),h(Oo.Initializing),d({type:Z.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(ge.current),O(a)})},onMove(e){d({type:Z.DragMove,coordinates:e})},onEnd:s(Z.DragEnd),onCancel:s(Z.DragCancel)});ge.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=B.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Z.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Z.DragCancel)}w.current=null,(0,yi.unstable_batchedUpdates)(()=>{d({type:e}),h(Oo.Uninitialized),he(null),E(null),O(null),ge.current=null;let t=e===Z.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),ve=Ua(a,(0,J.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,_e(n,t))},[v,_e]));ao(a),Xr(()=>{z&&m===Oo.Initializing&&h(Oo.Initialized)},[z,m]),(0,J.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=B.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ue.x,y:ue.y},over:i};(0,yi.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[ue.x,ue.y]),(0,J.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=B.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(pe),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,yi.unstable_batchedUpdates)(()=>{he(s),a?.(c),f({type:`onDragOver`,event:c})})},[pe]),Xr(()=>{B.current={activatorEvent:D,active:C,activeNode:I,collisionRect:de,collisions:fe,droppableRects:N,draggableNodes:v,draggingNode:H,draggingNodeRect:U,droppableContainers:b,over:me,scrollableAncestors:G,scrollAdjustedTranslate:ue},S.current={initial:U,translated:de}},[C,I,fe,de,v,H,U,N,b,me,G,ue]),za({...R,delta:y,draggingRect:de,pointerCoordinates:oe,scrollableAncestors:G,scrollableAncestorRects:K});let ye=(0,J.useMemo)(()=>({active:C,activeNode:I,activeNodeRect:z,activatorEvent:D,collisions:fe,containerNodeRect:te,dragOverlay:V,draggableNodes:v,droppableContainers:b,droppableRects:N,over:me,measureDroppableContainers:P,scrollableAncestors:G,scrollableAncestorRects:K,measuringConfiguration:M,measuringScheduled:F,windowRect:W}),[C,I,z,D,fe,te,V,v,b,N,me,P,G,K,M,F,W]),be=(0,J.useMemo)(()=>({activatorEvent:D,activators:ve,active:C,activeNodeRect:z,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:me,measureDroppableContainers:P}),[D,ve,C,z,d,A,v,me,P]);return J.createElement(bi.Provider,{value:p},J.createElement(yo.Provider,{value:be},J.createElement(bo.Provider,{value:ye},J.createElement(Do.Provider,{value:q},i)),J.createElement(Co,{disabled:n?.restoreFocus===!1})),J.createElement(Ti,{...n,hiddenTextDescribedById:A}));function xe(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Ao=(0,J.createContext)(null),jo=`button`,Mo=`Draggable`;function No(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=ii(Mo),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,J.useContext)(yo),{role:p=jo,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,J.useContext)(g?Do:Ao),[v,y]=ti(),[b,x]=ti(),S=oo(o,t),C=$r(n);return Xr(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,J.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===jo?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function Po(){return(0,J.useContext)(bo)}var Fo=`Droppable`,Io={timeout:25};function Lo(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=ii(Fo),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,J.useContext)(yo),u=(0,J.useRef)({disabled:n}),d=(0,J.useRef)(!1),f=(0,J.useRef)(null),p=(0,J.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Io,...i},_=$r(h??r),v=Za({callback:(0,J.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=ti((0,J.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=$r(t);return(0,J.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,J.useEffect)(()=>(s({type:Z.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Z.UnregisterDroppable,key:a,id:r})),[r]),(0,J.useEffect)(()=>{n!==u.current.disabled&&(s({type:Z.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function Ro(e){let{animation:t,children:n}=e,[r,i]=(0,J.useState)(null),[a,o]=(0,J.useState)(null),s=ni(n);return!n&&!r&&s&&i(s),Xr(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),J.createElement(J.Fragment,null,n,r?(0,J.cloneElement)(r,{ref:o}):null)}var zo={x:0,y:0,scaleX:1,scaleY:1};function Bo(e){let{children:t}=e;return J.createElement(yo.Provider,{value:vo},J.createElement(Do.Provider,{value:zo},t))}var Vo={position:`fixed`,touchAction:`none`},Ho=e=>li(e)?`transform 250ms ease`:void 0,Uo=(0,J.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Ho}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Vo,width:s.width,height:s.height,top:s.top,left:s.left,transform:fi.Transform.toString(d),transformOrigin:i&&r?ji(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return J.createElement(n,{className:o,style:f,ref:t},a)}),Wo={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:fi.Transform.toString(t)},{transform:fi.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function Go(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Zr((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=uo(a);if(!c)return;let{transform:l}=Gr(a).getComputedStyle(a),u=qi(l);if(!u)return;let d=typeof t==`function`?t:Ko(t);return ha(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Ko(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Wo,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var qo=0;function Jo(e){return(0,J.useMemo)(()=>{if(e!=null)return qo++,qo},[e])}var Yo=J.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=Po(),S=(0,J.useContext)(Do),C=Jo(d?.id),w=wo(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=Ja(f),E=Go({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return J.createElement(Bo,null,J.createElement(Ro,{animation:E},d&&C?J.createElement(Uo,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function Xo(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Zo(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function Qo(e){return e!==null&&e>=0}function $o(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function es(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var ts={scaleX:1,scaleY:1},ns=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=rs(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...ts}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...ts}:a<r&&a>=i?{x:o.width+s,y:0,...ts}:{x:0,y:0,...ts}};function rs(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var is=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=Xo(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},as={scaleX:1,scaleY:1},os=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...as}:null}let s=ss(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...as}:r<t&&r>=a?{x:0,y:o.height+s,...as}:{x:0,y:0,...as}};function ss(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var cs=`Sortable`,ls=J.createContext({activeIndex:-1,containerId:cs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:is,disabled:{draggable:!1,droppable:!1}});function us(e){let{children:t,id:n,items:r,strategy:i=is,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=Po(),d=ii(cs,n),f=s.rect!==null,p=(0,J.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,J.useRef)(p),v=!$o(p,_.current),y=g!==-1&&h===-1||v,b=es(a);Xr(()=>{v&&m&&u(p)},[v,p,m,u]),(0,J.useEffect)(()=>{_.current=p},[p]);let x=(0,J.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:Zo(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return J.createElement(ls.Provider,{value:x},t)}var ds=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Xo(n,r,i).indexOf(t)},fs=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},ps={duration:200,easing:`ease`},ms=`transform`,hs=fi.Transition.toString({property:ms,duration:0,easing:`linear`}),gs={roleDescription:`sortable`};function _s(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,J.useState)(null),s=(0,J.useRef)(n);return Xr(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=Xi(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,J.useEffect)(()=>{a&&o(null)},[a]),a}function vs(e){let{animateLayoutChanges:t=fs,attributes:n,disabled:r,data:i,getNewIndex:a=ds,id:o,strategy:s,resizeObserverConfig:c,transition:l=ps}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,J.useContext)(ls),y=ys(r,p),b=u.indexOf(o),x=(0,J.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,J.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=Lo({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:A,setNodeRef:j,listeners:M,isDragging:N,over:P,setActivatorNodeRef:F,transform:I}=No({id:o,data:x,attributes:{...gs,...n},disabled:y.draggable}),L=Vr(E,j),R=!!D,ee=R&&!m&&Qo(f)&&Qo(g),z=!_&&N,te=ee?(z&&ee?I:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,B=Qo(f)&&Qo(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ne=D?.id,V=(0,J.useRef)({activeId:ne,items:u,newIndex:B,containerId:d}),H=u!==V.current.items,U=t({active:D,containerId:d,isDragging:N,isSorting:R,id:o,index:b,items:u,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:l,wasDragging:V.current.activeId!=null}),re=_s({disabled:!U,index:b,node:w,rect:C});return(0,J.useEffect)(()=>{R&&V.current.newIndex!==B&&(V.current.newIndex=B),d!==V.current.containerId&&(V.current.containerId=d),u!==V.current.items&&(V.current.items=u)},[R,B,d,u]),(0,J.useEffect)(()=>{if(ne===V.current.activeId)return;if(ne!=null&&V.current.activeId==null){V.current.activeId=ne;return}let e=setTimeout(()=>{V.current.activeId=ne},50);return()=>clearTimeout(e)},[ne]),{active:D,activeIndex:f,attributes:A,data:x,rect:C,index:b,newIndex:B,items:u,isOver:T,isSorting:R,isDragging:N,listeners:M,node:w,overIndex:g,over:P,setNodeRef:L,setActivatorNodeRef:F,setDroppableNodeRef:E,setDraggableNodeRef:j,transform:re??te,transition:ie()};function ie(){if(re||H&&V.current.newIndex===b)return hs;if(!(z&&!li(O)||!l)&&(R||U))return fi.Transition.toString({...l,property:ms})}}function ys(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function bs(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var xs=[$.Down,$.Right,$.Up,$.Left],Ss=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(xs.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case $.Down:r.top<a.top&&t.push(n);break;case $.Up:r.top>a.top&&t.push(n);break;case $.Left:r.left>a.left&&t.push(n);break;case $.Right:r.left<a.left&&t.push(n)}});let c=Ri({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=Fi(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=ta(c).some((e,t)=>s[t]!==e),i=Cs(e,t),a=ws(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:si(u,l)}}}};function Cs(e,t){return!bs(e)||!bs(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function ws(e,t){return!bs(e)||!bs(t)||!Cs(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Ts=e=>{let{transform:t}=e;return{...t,x:0}},Es=(0,J.memo)(e=>{let t=(0,Y.c)(7),{output:n,cellId:r,status:i,stale:a}=e,o;t[0]===i?o=t[1]:(o=w(i),t[0]=i,t[1]=o);let s=o,c;return t[2]!==r||t[3]!==s||t[4]!==n||t[5]!==a?(c=(0,X.jsx)(Be,{className:`contents`,allowExpand:!1,output:n,cellId:r,stale:a,loading:s}),t[2]=r,t[3]=s,t[4]=n,t[5]=a,t[6]=c):c=t[6],c});Es.displayName=`Slide`;var Ds=`slide`,Os=`slide`,ks=`center`,As=36,js=k(`marimo:slides:config-open`,!0,b,{getOnInit:!0}),Ms=[{value:`slide`,label:`Slide`,description:`A new top-level slide. Advances horizontally with the right arrow.`,Icon:sn},{value:`sub-slide`,label:`Sub-slide`,description:`Stacks vertically under the previous slide. Reached with the down arrow.`,Icon:un},{value:`fragment`,label:`Fragment`,description:`Reveals step-by-step on the current slide without advancing.`,Icon:rn},{value:`skip`,label:`Skip`,description:`Hidden from the presentation. Still visible here in the editor.`,Icon:ht}],Ns=Object.fromEntries(Ms.map(e=>[e.value,e])),Ps=[{value:`none`,label:`None`,description:`No animation between slides.`},{value:`fade`,label:`Fade`,description:`Cross-fade between slides.`},{value:`slide`,label:`Slide`,description:`Slides move horizontally / vertically.`},{value:`convex`,label:`Convex`,description:`Rotate with a convex curve.`},{value:`concave`,label:`Concave`,description:`Rotate with a concave curve.`},{value:`zoom`,label:`Zoom`,description:`Zoom into the next slide.`}],Fs=[{value:`center`,label:`Center`,description:`Vertically center each slide's content.`},{value:`top`,label:`Top`,description:`Align content to the top, like the cell view.`},{value:`bottom`,label:`Bottom`,description:`Align content to the bottom of each slide.`}],Is=e=>{let t=(0,Y.c)(13),{layout:n,setLayout:r,cellId:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsxs)(ye,{className:`grid grid-cols-2`,children:[(0,X.jsx)(_e,{value:`slide`,children:`Slide`}),(0,X.jsx)(_e,{value:`deck`,children:`Deck`})]}),t[0]=a):a=t[0];let o;t[1]!==i||t[2]!==n||t[3]!==r?(o=(0,X.jsx)(ve,{value:`slide`,className:`mt-0 flex-1`,children:(0,X.jsx)(Bs,{layout:n,setLayout:r,cellId:i})}),t[1]=i,t[2]=n,t[3]=r,t[4]=o):o=t[4];let s;t[5]!==n||t[6]!==r?(s=(0,X.jsx)(ve,{value:`deck`,className:`mt-0 flex-1`,children:(0,X.jsx)(Vs,{layout:n,setLayout:r})}),t[5]=n,t[6]=r,t[7]=s):s=t[7];let c,l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(`hr`,{}),l=(0,X.jsx)(zs,{}),t[8]=c,t[9]=l):(c=t[8],l=t[9]);let u;return t[10]!==o||t[11]!==s?(u=(0,X.jsxs)(be,{defaultValue:`slide`,className:`flex flex-col flex-1 p-3 gap-3`,children:[a,o,s,c,l]}),t[10]=o,t[11]=s,t[12]=u):u=t[12],u},Ls=[{keys:[`F`],description:`Enter fullscreen`},{keys:[`C`],description:`Toggle code editor`}],Rs=`https://vlaaad.github.io/reveal/keyboard-shortcuts`,zs=()=>{let e=(0,Y.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 font-medium text-foreground/80`,children:[(0,X.jsx)(on,{className:`h-3.5 w-3.5`}),(0,X.jsx)(`span`,{children:`Shortcuts`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[t,(0,X.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:Ls.map(Ws)}),(0,X.jsx)(`a`,{href:Rs,target:`_blank`,rel:`noopener noreferrer`,className:`text-link hover:underline`,children:`See all shortcuts`})]}),e[1]=n):n=e[1],n},Bs=e=>{let t=(0,Y.c)(29),{layout:n,setLayout:r,cellId:i}=e,a;t[0]!==i||t[1]!==n.cells?(a=n.cells.get(i),t[0]=i,t[1]=n.cells,t[2]=a):a=t[2];let o=a,s=o?.type??`slide`,c=o?.showCode??!1,l;t[3]!==i||t[4]!==o||t[5]!==n||t[6]!==r?(l=e=>{let t=new Map(n.cells);t.set(i,{...o,type:e}),r({...n,cells:t})},t[3]=i,t[4]=o,t[5]=n,t[6]=r,t[7]=l):l=t[7];let u=l,d;t[8]!==i||t[9]!==o||t[10]!==n||t[11]!==r?(d=e=>{let t=new Map(n.cells);t.set(i,{...o,showCode:e}),r({...n,cells:t})},t[8]=i,t[9]=o,t[10]=n,t[11]=r,t[12]=d):d=t[12];let f=d,p;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(`span`,{className:`font-semibold text-sm`,children:`Slide type`}),t[13]=p):p=t[13];let m;t[14]===u?m=t[15]:(m=e=>u(e),t[14]=u,t[15]=m);let h;t[16]===s?h=t[17]:(h=Ms.map(e=>{let{value:t,label:n,description:r,Icon:i}=e,a=s===t;return(0,X.jsx)(S,{value:t,className:q(`group h-auto w-full text-left rounded-md p-2.5 transition-colors shadow-none! border`,`focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,a?`border-primary bg-primary/5`:`border-border bg-background hover:bg-accent/50 hover:border-foreground/30`),children:(0,X.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,X.jsx)(`span`,{className:q(`mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded`,a?`bg-primary/10 text-primary`:`bg-muted text-muted-foreground group-hover:text-foreground`),children:(0,X.jsx)(i,{className:`h-3.5 w-3.5`})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`p`,{className:q(`text-sm font-medium leading-tight`,a?`text-primary`:`text-foreground`),children:n}),(0,X.jsx)(`p`,{className:`mt-0.5 text-xs text-foreground/70`,children:r})]})]})},t)}),t[16]=s,t[17]=h);let g;t[18]!==s||t[19]!==m||t[20]!==h?(g=(0,X.jsx)(x,{"aria-label":`Slide type`,value:s,onValueChange:m,className:`flex flex-col gap-1.5`,children:h}),t[18]=s,t[19]=m,t[20]=h,t[21]=g):g=t[21];let _;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(`label`,{htmlFor:`slide-show-code`,className:`text-sm`,children:`Show code`}),t[22]=_):_=t[22];let v;t[23]!==f||t[24]!==c?(v=(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[_,(0,X.jsx)(se,{id:`slide-show-code`,"aria-label":`Show code`,checked:c,onCheckedChange:f,size:`sm`})]}),t[23]=f,t[24]=c,t[25]=v):v=t[25];let y;return t[26]!==g||t[27]!==v?(y=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[p,g,v]}),t[26]=g,t[27]=v,t[28]=y):y=t[28],y},Vs=e=>{let t=(0,Y.c)(39),{layout:n,setLayout:r}=e,i=n.deck?.transition??`slide`,a;t[0]===i?a=t[1]:(a=Ps.find(e=>e.value===i)?.description,t[0]=i,t[1]=a);let o=a,s=n.deck?.verticalAlign??`center`,c;t[2]===s?c=t[3]:(c=Fs.find(e=>e.value===s)?.description,t[2]=s,t[3]=c);let l=c,u;t[4]!==n||t[5]!==r?(u=e=>{r({...n,deck:{...n.deck,transition:e}})},t[4]=n,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]!==n||t[8]!==r?(f=e=>{r({...n,deck:{...n.deck,verticalAlign:e}})},t[7]=n,t[8]=r,t[9]=f):f=t[9];let p=f,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(`label`,{htmlFor:`deck-transition`,className:`font-semibold text-sm text-foreground`,children:`Transition`}),t[10]=m):m=t[10];let h;t[11]===d?h=t[12]:(h=e=>d(e),t[11]=d,t[12]=h);let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(Te,{id:`deck-transition`,"aria-label":`Slide transition`,children:(0,X.jsx)(xe,{})}),t[13]=g):g=t[13];let _;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(we,{children:Ps.map(Gs)}),t[14]=_):_=t[14];let v;t[15]!==i||t[16]!==h?(v=(0,X.jsxs)(Ee,{value:i,onValueChange:h,children:[g,_]}),t[15]=i,t[16]=h,t[17]=v):v=t[17];let y;t[18]===o?y=t[19]:(y=o&&(0,X.jsx)(`p`,{className:`text-xs text-foreground/70`,children:o}),t[18]=o,t[19]=y);let b;t[20]!==y||t[21]!==v?(b=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[m,v,y]}),t[20]=y,t[21]=v,t[22]=b):b=t[22];let x;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,X.jsx)(`label`,{htmlFor:`deck-vertical-align`,className:`font-semibold text-sm text-foreground`,children:`Vertical alignment`}),t[23]=x):x=t[23];let S;t[24]===p?S=t[25]:(S=e=>p(e),t[24]=p,t[25]=S);let C;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(Te,{id:`deck-vertical-align`,"aria-label":`Vertical alignment`,children:(0,X.jsx)(xe,{})}),t[26]=C):C=t[26];let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(we,{children:Fs.map(Ks)}),t[27]=w):w=t[27];let T;t[28]!==s||t[29]!==S?(T=(0,X.jsxs)(Ee,{value:s,onValueChange:S,children:[C,w]}),t[28]=s,t[29]=S,t[30]=T):T=t[30];let E;t[31]===l?E=t[32]:(E=l&&(0,X.jsx)(`p`,{className:`text-xs text-foreground/70`,children:l}),t[31]=l,t[32]=E);let D;t[33]!==T||t[34]!==E?(D=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[x,T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35];let O;return t[36]!==b||t[37]!==D?(O=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[b,D]}),t[36]=b,t[37]=D,t[38]=O):O=t[38],O},Hs=e=>{let t=(0,Y.c)(30),{configWidth:n,layout:r,setLayout:i,activeConfigCell:o}=e,[s,c]=a(js),l=s?n:As,u;t[0]===l?u=t[1]:(u={width:l},t[0]=l,t[1]=u);let d=s?`justify-between px-2`:`justify-center px-0`,f;t[2]===d?f=t[3]:(f=q(`flex items-center h-9 shrink-0 border-b border-border/60`,d),t[2]=d,t[3]=f);let p;t[4]===s?p=t[5]:(p=s&&(0,X.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground pl-1`,children:`Configuration`}),t[4]=s,t[5]=p);let m=s?`Collapse panel`:`Expand panel`,h;t[6]===c?h=t[7]:(h=()=>c(Js),t[6]=c,t[7]=h);let g;t[8]===s?g=t[9]:(g=s?(0,X.jsx)(cn,{className:`h-4 w-4`}):(0,X.jsx)(ln,{className:`h-4 w-4`}),t[8]=s,t[9]=g);let _;t[10]!==s||t[11]!==h||t[12]!==g?(_=(0,X.jsx)(Ye,{variant:`ghost`,size:`icon`,className:`h-7 w-7 text-muted-foreground hover:text-foreground`,onClick:h,"aria-expanded":s,"aria-controls":`slide-config-panel`,children:g}),t[10]=s,t[11]=h,t[12]=g,t[13]=_):_=t[13];let v;t[14]!==m||t[15]!==_?(v=(0,X.jsx)(qe,{content:m,children:_}),t[14]=m,t[15]=_,t[16]=v):v=t[16];let y;t[17]!==v||t[18]!==f||t[19]!==p?(y=(0,X.jsxs)(`header`,{className:f,children:[p,v]}),t[17]=v,t[18]=f,t[19]=p,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==s||t[23]!==r||t[24]!==i?(b=s&&(0,X.jsx)(`div`,{id:`slide-config-panel`,className:`flex-1 overflow-y-auto overflow-x-hidden`,children:o?(0,X.jsx)(Is,{layout:r,setLayout:i,cellId:o.id}):(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5 p-3 text-xs text-muted-foreground`,children:[(0,X.jsx)(`span`,{className:`font-semibold text-sm text-foreground`,children:`No slides yet`}),(0,X.jsx)(`p`,{children:`Run a cell that produces output to add it to the deck. Slide settings will appear here once a slide is selected.`})]})}),t[21]=o,t[22]=s,t[23]=r,t[24]=i,t[25]=b):b=t[25];let x;return t[26]!==y||t[27]!==b||t[28]!==u?(x=(0,X.jsxs)(`aside`,{className:`h-full flex flex-col border-l border-border/60 bg-muted/20 transition-[width] duration-200 ease-out overflow-hidden`,style:u,"aria-label":`Slide configuration`,onKeyDown:qs,children:[y,b]}),t[26]=y,t[27]=b,t[28]=u,t[29]=x):x=t[29],x};function Us(e){return(0,X.jsx)(Wt,{children:e},e)}function Ws(e){let{keys:t,description:n}=e;return(0,X.jsxs)(`li`,{className:`flex items-center justify-between`,children:[(0,X.jsx)(`span`,{children:n}),(0,X.jsx)(`span`,{className:`flex gap-1`,children:t.map(Us)})]},n)}function Gs(e){let{value:t,label:n}=e;return(0,X.jsx)(Ce,{value:t,children:n},t)}function Ks(e){let{value:t,label:n}=e;return(0,X.jsx)(Ce,{value:t,children:n},t)}function qs(e){return e.stopPropagation()}function Js(e){return!e}function Ys(e){if(!e||e===`slide`)return null;let{label:t,description:n,Icon:r}=Ns[e];return{label:t,description:n,Icon:r}}var Xs={label:`No output`,description:`Hidden because this cell has no output.`},Zs=16/9,Qs=520;function $s(e){return{width:e,height:e/Zs,scale:e/Qs}}var ec={threshold:{x:0,y:.1}},tc=8,nc=`200px 0px`,rc=e=>{let t=Hi(e);return t.length>0?t:Li(e)};function ic(e){let t=(0,Y.c)(3),[n,r]=(0,J.useState)(ac),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{let t=e.current;if(!t)return;let n=new IntersectionObserver(e=>{r(t=>{let n=new Set(t),r=!1;for(let t of e){let e=t.target.dataset.cellId;e&&(t.isIntersecting&&!n.has(e)?(n.add(e),r=!0):!t.isIntersecting&&n.has(e)&&(n.delete(e),r=!0))}return r?n:t})},{root:t,rootMargin:nc}),i=()=>{n.disconnect();for(let e of t.querySelectorAll(`[data-cell-id]`))n.observe(e)};i();let a=new MutationObserver(i);return a.observe(t,{childList:!0}),()=>{n.disconnect(),a.disconnect()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,J.useEffect)(i,a),n}function ac(){return new Set}var oc=({cells:e,thumbnailWidth:t,canReorder:n,activeCellId:r,skippedIds:i,noOutputIds:a,slideTypes:o,onSlideClick:s})=>{let c=h(),{moveCellToIndex:l,createNewCell:u}=d(),f=bt(),p=(0,J.useRef)(null),m=ic(p),[_,v]=(0,J.useState)(null),[y,b]=(0,J.useState)(null),x=$s(t),S=(e,t)=>{u({cellId:e,before:t,code:``,autoFocus:!1})};(0,J.useEffect)(()=>{!r||!p.current||p.current.querySelector(`[data-cell-id="${r}"]`)?.scrollIntoView({block:`nearest`,behavior:`instant`})},[r]);let C=Oi(Di(ja,{activationConstraint:{distance:8}})),w=_?e.find(e=>e.id===_)??null:null,T=()=>{v(null),b(null)},E=e=>{let t=pc(e);b(e=>e?.overId===t?.overId&&e?.position===t?.position?e:t)};return n?(0,X.jsxs)(ko,{autoScroll:ec,collisionDetection:rc,modifiers:[Ts],sensors:C,onDragStart:e=>{b(null);let t=hc(e.active.id);t&&v(t)},onDragMove:E,onDragOver:E,onDragEnd:e=>{try{if(_&&y){let e=mc({cellIds:c,activeId:_,target:y});e&&l(e)}}catch(e){B.warn(`Drop failed`,e)}finally{T()}},onDragCancel:T,children:[(0,X.jsx)(sc,{ref:p,children:(0,X.jsx)(us,{items:e.map(e=>e.id),strategy:os,children:e.map((e,t)=>(0,X.jsx)(cc,{cell:e,dimensions:x,isActive:_===e.id,isActiveSlide:e.id===r,isVisible:m.has(e.id),isNoOutput:a?.has(e.id),slideType:gc({cellId:e.id,slideTypes:o,skippedIds:i}),dropIndicator:y?.overId===e.id&&_!==e.id?y.position:null,onInsertAbove:t===0?()=>S(e.id,!0):void 0,onInsertBelow:()=>S(e.id,!1),onDelete:()=>f({cellId:e.id}),onClick:()=>s(t)},e.id))})}),(0,X.jsx)(Yo,{children:w&&(0,X.jsx)(dc,{cell:w,dimensions:x,isOverlay:!0,isActiveDragSource:!0,isNoOutput:a?.has(w.id)})})]}):(0,X.jsxs)(sc,{ref:p,children:[(0,X.jsxs)(`div`,{className:`text-xs text-gray-500 flex items-center gap-0.5`,children:[(0,X.jsx)(g,{className:`h-3 w-3`}),`Reordering is not supported in multi-column mode`]}),e.map((e,t)=>(0,X.jsx)(lc,{cell:e,dimensions:x,isActiveSlide:e.id===r,isVisible:m.has(e.id),isNoOutput:a?.has(e.id),slideType:gc({cellId:e.id,slideTypes:o,skippedIds:i}),onInsertAbove:t===0?()=>S(e.id,!0):void 0,onInsertBelow:()=>S(e.id,!1),onDelete:()=>f({cellId:e.id}),onClick:()=>s(t)},e.id))]})},sc=e=>{let t=(0,Y.c)(3),{children:n,ref:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,X.jsx)(`div`,{ref:r,className:`h-full overflow-auto flex flex-col scrollbar-thin`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},cc=e=>{let t=(0,Y.c)(18),{cell:n,dimensions:r,dropIndicator:i,isActive:a,isActiveSlide:o,isVisible:s,isNoOutput:c,slideType:l,onInsertAbove:u,onInsertBelow:d,onDelete:f,onClick:p}=e,m;t[0]===n.id?m=t[1]:(m={id:n.id},t[0]=n.id,t[1]=m);let{attributes:h,listeners:g,setNodeRef:_}=vs(m),v;return t[2]!==h||t[3]!==n||t[4]!==r||t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==c||t[9]!==s||t[10]!==g||t[11]!==p||t[12]!==f||t[13]!==u||t[14]!==d||t[15]!==_||t[16]!==l?(v=(0,X.jsx)(lc,{ref:_,cell:n,dimensions:r,dropIndicator:i,isActiveDragSource:a,isActiveSlide:o,isVisible:s,isNoOutput:c,slideType:l,onInsertAbove:u,onInsertBelow:d,onDelete:f,onClick:p,...h,...g}),t[2]=h,t[3]=n,t[4]=r,t[5]=i,t[6]=a,t[7]=o,t[8]=c,t[9]=s,t[10]=g,t[11]=p,t[12]=f,t[13]=u,t[14]=d,t[15]=_,t[16]=l,t[17]=v):v=t[17],v},lc=e=>{let t=(0,Y.c)(59),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16]):({cell:n,dimensions:i,className:r,style:h,dropIndicator:a,isActiveSlide:g,isActiveDragSource:_,isVisible:s,isNoOutput:o,slideType:m,onInsertAbove:u,onInsertBelow:d,onDelete:l,onClick:c,ref:p,...f}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_);let v=g!==void 0&&g,y=_!==void 0&&_,b;t[17]===h?b=t[18]:(b={paddingTop:tc,paddingBottom:tc,...h},t[17]=h,t[18]=b);let x=b,S=_c,C=n.id,w;t[19]===r?w=t[20]:(w=q(`relative shrink-0 appearance-none text-left p-0 bg-transparent outline-hidden`,r),t[19]=r,t[20]=w);let T;t[21]===a?T=t[22]:(T=a&&(0,X.jsx)(`div`,{className:q(`absolute left-2 right-2 h-0.5 rounded-full bg-blue-500 z-20 pointer-events-none`,a===`after`?`bottom-0 translate-y-1/2`:`top-0 -translate-y-1/2`)}),t[21]=a,t[22]=T);let E;t[23]===u?E=t[24]:(E=u&&(0,X.jsx)(uc,{position:`above`,onInsert:u}),t[23]=u,t[24]=E);let D;t[25]!==n||t[26]!==i||t[27]!==y||t[28]!==v||t[29]!==o||t[30]!==s||t[31]!==m?(D=(0,X.jsx)(dc,{cell:n,dimensions:i,isActiveSlide:v,isActiveDragSource:y,isVisible:s,isNoOutput:o,slideType:m}),t[25]=n,t[26]=i,t[27]=y,t[28]=v,t[29]=o,t[30]=s,t[31]=m,t[32]=D):D=t[32];let O;t[33]===d?O=t[34]:(O=d&&(0,X.jsx)(uc,{position:`below`,onInsert:d}),t[33]=d,t[34]=O);let k;t[35]!==n.id||t[36]!==c||t[37]!==f||t[38]!==p||t[39]!==x||t[40]!==w||t[41]!==T||t[42]!==E||t[43]!==D||t[44]!==O?(k=(0,X.jsxs)(`div`,{ref:p,role:`button`,tabIndex:0,"data-cell-id":C,className:w,style:x,onClick:c,onKeyDown:S,...f,children:[T,E,D,O]}),t[35]=n.id,t[36]=c,t[37]=f,t[38]=p,t[39]=x,t[40]=w,t[41]=T,t[42]=E,t[43]=D,t[44]=O,t[45]=k):k=t[45];let A=k;if(!d&&!l)return A;let j;t[46]===A?j=t[47]:(j=(0,X.jsx)(Me,{asChild:!0,children:A}),t[46]=A,t[47]=j);let M;t[48]===d?M=t[49]:(M=d&&(0,X.jsxs)(Fe,{onSelect:d,children:[(0,X.jsx)(xt,{className:`mr-2 h-3.5 w-3.5`}),`Add cell`]}),t[48]=d,t[49]=M);let N;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,X.jsx)(ze,{}),t[50]=N):N=t[50];let P;t[51]===l?P=t[52]:(P=l&&(0,X.jsxs)(Fe,{variant:`danger`,onSelect:l,children:[(0,X.jsx)(Ft,{className:`mr-2 h-3.5 w-3.5`}),`Delete cell`]}),t[51]=l,t[52]=P);let F;t[53]!==M||t[54]!==P?(F=(0,X.jsxs)(Ne,{children:[M,N,P]}),t[53]=M,t[54]=P,t[55]=F):F=t[55];let I;return t[56]!==j||t[57]!==F?(I=(0,X.jsxs)(Le,{children:[j,F]}),t[56]=j,t[57]=F,t[58]=I):I=t[58],I},uc=e=>{let t=(0,Y.c)(10),{position:n,onInsert:r}=e,i=n===`below`?`bottom-0 translate-y-1/2`:`top-0 -translate-y-1/2`,a;t[0]===i?a=t[1]:(a=q(`absolute left-0 right-0 z-30 flex h-3 items-center justify-center`,`opacity-0 transition-opacity hover:opacity-80 focus-visible:opacity-100 focus:outline-hidden`,i),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=Je.stopPropagation(),t[2]=o):o=t[2];let s;t[3]===r?s=t[4]:(s=Je.stopPropagation(r),t[3]=r,t[4]=s);let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(`span`,{className:`absolute left-2 right-2 h-px rounded-full bg-blue-500`}),t[5]=c):c=t[5];let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`span`,{className:`relative flex h-3 w-3 items-center justify-center rounded-full bg-blue-500 text-background shadow-xs`,children:(0,X.jsx)(xt,{className:`h-2 w-2`,strokeWidth:3})}),t[6]=l):l=t[6];let u;return t[7]!==a||t[8]!==s?(u=(0,X.jsx)(qe,{content:`Add Python cell`,children:(0,X.jsxs)(`button`,{type:`button`,"aria-label":`Add Python cell`,"data-testid":`minimap-insert-cell`,className:a,onPointerDown:o,onClick:s,children:[c,l]})}),t[7]=a,t[8]=s,t[9]=u):u=t[9],u},dc=e=>{let t=(0,Y.c)(50),n,r,i,a,o,s,c,l,u,d,f,p;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12]):({cell:n,dimensions:i,className:r,style:c,isActiveSlide:l,isActiveDragSource:u,isOverlay:d,isVisible:f,isNoOutput:p,slideType:s,ref:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p);let m=l!==void 0&&l,h=u!==void 0&&u,g=d!==void 0&&d,_=f!==void 0&&f,v=p!==void 0&&p,{width:y,height:b,scale:x}=i,S;t[13]!==v||t[14]!==s?(S=v?Xs:Ys(s),t[13]=v,t[14]=s,t[15]=S):S=t[15];let C=S,w=v||s===`skip`,T;t[16]!==b||t[17]!==g||t[18]!==y?(T=g?null:{contentVisibility:`auto`,containIntrinsicSize:`${y}px ${b}px`},t[16]=b,t[17]=g,t[18]=y,t[19]=T):T=t[19];let E;t[20]!==b||t[21]!==c||t[22]!==T||t[23]!==y?(E={width:y,height:b,contain:`strict`,...T,...c},t[20]=b,t[21]=c,t[22]=T,t[23]=y,t[24]=E):E=t[24];let O=E,k=_||g,A=m||h||g?`border-blue-500`:`border-border hover:border-blue-500/50`,j=h&&!g&&`opacity-35`,M=g&&`opacity-95 shadow-lg`,N;t[25]!==r||t[26]!==j||t[27]!==M||t[28]!==A?(N=q(`border-2 shrink-0 rounded-md relative select-none bg-background cursor-pointer active:cursor-grabbing overflow-hidden transition-colors`,A,j,M,r),t[25]=r,t[26]=j,t[27]=M,t[28]=A,t[29]=N):N=t[29];let P;t[30]!==n||t[31]!==b||t[32]!==v||t[33]!==x||t[34]!==k||t[35]!==y?(P=k&&(0,X.jsx)(`div`,{className:`flex p-6 box-border pointer-events-none mo-slide-content overflow-hidden`,style:{transform:`scale(${x})`,transformOrigin:`top left`,width:y/x,height:b/x},children:v?(0,X.jsx)(fc,{code:n.code}):(0,X.jsx)(Es,{cellId:n.id,status:n.status,output:n.output,stale:D(n,!1)})}),t[30]=n,t[31]=b,t[32]=v,t[33]=x,t[34]=k,t[35]=y,t[36]=P):P=t[36];let F;t[37]===w?F=t[38]:(F=w&&(0,X.jsx)(`div`,{className:`absolute inset-0 bg-muted/50 pointer-events-none`,"aria-hidden":!0}),t[37]=w,t[38]=F);let I;t[39]!==w||t[40]!==C?(I=C?.Icon&&(0,X.jsx)(qe,{content:(0,X.jsx)(`span`,{className:`text-xs opacity-80`,children:C.description}),children:(0,X.jsx)(`span`,{className:q(`absolute top-1 right-1 flex items-center gap-1 rounded-full border p-0.5 font-medium leading-none shadow-xs cursor-help`,w?`bg-background/90 border-border text-muted-foreground`:`bg-background/95 border-border text-foreground/80`),"aria-label":C.label,children:(0,X.jsx)(C.Icon,{className:`h-3.5 w-3.5`})})}),t[39]=w,t[40]=C,t[41]=I):I=t[41];let L;return t[42]!==O||t[43]!==a||t[44]!==o||t[45]!==N||t[46]!==P||t[47]!==F||t[48]!==I?(L=(0,X.jsxs)(`div`,{ref:o,className:N,style:O,...a,children:[P,F,I]}),t[42]=O,t[43]=a,t[44]=o,t[45]=N,t[46]=P,t[47]=F,t[48]=I,t[49]=L):L=t[49],L},fc=e=>{let t=(0,Y.c)(2),{code:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`pre`,{className:`my-auto w-full overflow-hidden whitespace-pre-wrap wrap-break-word text-lg`,children:n}),t[0]=n,t[1]=r),r};function pc(e){let{active:t,over:n}=e;if(!n)return null;let r=hc(t.id),i=hc(n.id);if(!r||!i||r===i)return null;let a=t.rect.current.translated??t.rect.current.initial;return a?{overId:i,position:a.top+a.height/2<n.rect.top+n.rect.height/2?`before`:`after`}:null}function mc({cellIds:e,activeId:t,target:n}){if(t===n.overId)return null;if(e.colLength!==1)return B.warn(`Multi-column mode is not supported`),null;let r=e.findWithId(n.overId),i=r.indexOfOrThrow(n.overId);return{cellId:t,columnId:r.id,index:n.position===`after`?i+1:i}}function hc(e){return typeof e==`string`?e:null}function gc({cellId:e,slideTypes:t,skippedIds:n}){let r=t?.get(e);if(r&&r!==`slide`)return r;if(n?.has(e))return`skip`}function _c(e){e.target===e.currentTarget&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.click())}function vc(e){let t=new URL(e);return t.hash=``,t.searchParams.set(`kiosk`,`true`),t.searchParams.set(`show-chrome`,`false`),t.toString()}function yc(e,t){return e&&new URLSearchParams(t).has(`receiver`)}function bc(e){return e!==`wasm`}var xc=J.lazy(()=>Lt(()=>import(`./reveal-component-D9DygPds.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184]),import.meta.url)),Sc=e=>{let t=(0,Y.c)(33),{layout:n,setLayout:r,cells:i,mode:a}=e,o=s(W),c=a===`read`||o,u=s(O)>1,[d,f]=(0,J.useState)(null),p;t[0]!==i||t[1]!==n?(p=Br(i,n),t[0]=i,t[1]=n,t[2]=p):p=t[2];let{slideCells:m,skippedIds:h,noOutputIds:g,slideTypes:_,startCellIndex:v}=p,y;t[3]!==d||t[4]!==m||t[5]!==v?(y=d?m.findIndex(e=>e.id===d):v,t[3]=d,t[4]=m,t[5]=v,t[6]=y):y=t[6];let b=y,x=b===-1?v:b,S=yc(o,window.location.search),C=c&&d==null&&window.location.hash.startsWith(`#/`),w=S||C?void 0:x,T;t[7]===m?T=t[8]:(T=e=>{let t=m[e];t&&f(t.id)},t[7]=m,t[8]=T);let E=l(T),D=S?void 0:E,k=c?`read`:a,A=!c,j;t[9]!==w||t[10]!==n||t[11]!==g||t[12]!==r||t[13]!==m||t[14]!==D||t[15]!==k||t[16]!==A?(j=(0,X.jsx)(xc,{slideCells:m,layout:n,setLayout:r,noOutputIds:g,activeIndex:w,onSlideChange:D,configWidth:280,mode:k,isEditable:A}),t[9]=w,t[10]=n,t[11]=g,t[12]=r,t[13]=m,t[14]=D,t[15]=k,t[16]=A,t[17]=j):j=t[17];let M=j;if(c){if(o){let e;return t[18]===M?e=t[19]:(e=(0,X.jsx)(`div`,{className:`flex h-dvh w-dvw overflow-hidden bg-background`,children:M}),t[18]=M,t[19]=e),e}let e;return t[20]===M?e=t[21]:(e=(0,X.jsx)(`div`,{className:`p-4 flex flex-1 items-center justify-center min-h-0`,children:(0,X.jsx)(`div`,{className:`h-full max-h-[95vh] aspect-video max-w-full flex`,children:M})}),t[20]=M,t[21]=e),e}let N=!u,P=d??m[v]?.id??null,F;t[22]!==E||t[23]!==g||t[24]!==h||t[25]!==m||t[26]!==_||t[27]!==N||t[28]!==P?(F=(0,X.jsx)(oc,{cells:m,thumbnailWidth:220,canReorder:N,activeCellId:P,skippedIds:h,noOutputIds:g,slideTypes:_,onSlideClick:E}),t[22]=E,t[23]=g,t[24]=h,t[25]=m,t[26]=_,t[27]=N,t[28]=P,t[29]=F):F=t[29];let I;return t[30]!==M||t[31]!==F?(I=(0,X.jsxs)(`div`,{className:`flex-1 pr-18 pb-2 flex flex-row gap-2 min-h-0`,children:[F,M]}),t[30]=M,t[31]=F,t[32]=I):I=t[32],I},Cc=L([`slide`,`sub-slide`,`fragment`,`skip`]),wc=I({type:Cc.optional().catch(void 0),speakerNotes:j().optional().catch(void 0),showCode:F().optional().catch(void 0)}).catch({}),Tc=L([`none`,`fade`,`slide`,`convex`,`concave`,`zoom`]),Ec=L([`top`,`center`,`bottom`]),Dc=I({transition:Tc.optional().catch(void 0),verticalAlign:Ec.optional().catch(void 0)}).catch({}),Oc={type:`slides`,name:`Slides`,validator:I({cells:N(wc).optional().catch(void 0),deck:Dc.optional().catch(void 0)}),deserializeLayout:(e,t)=>{let n=e.cells??[],r=e.deck??{};n.length>0&&n.length!==t.length&&B.warn(`Number of cells in layout does not match number of cells in notebook`);let i=new Map;for(let[e,r]of t.entries()){let t=n.at(e);t&&i.set(r.id,t)}return{cells:i,deck:r}},serializeLayout:(e,t)=>({cells:t.map(t=>({...e.cells.get(t.id)})),deck:e.deck}),Component:Sc,getInitialLayout:()=>({cells:new Map,deck:{}})};function kc({value:e,setValue:t}){let[n,r]=J.useState([]),i=J.useRef(-1),a=J.useRef(``),o=J.useRef(n);return o.current=n,{history:n,navigateUp:J.useCallback(()=>{let n=o.current;if(n.length===0)return;let r=i.current;r===-1&&(a.current=e);let s=Math.min(r+1,n.length-1);s!==r&&(i.current=s,t(n[n.length-1-s]))},[e,t]),navigateDown:J.useCallback(()=>{let e=o.current;if(e.length===0)return;let n=i.current;if(n>0){let r=n-1;i.current=r,t(e[e.length-1-r])}else n===0&&(i.current=-1,t(a.current))},[t]),addToHistory:J.useCallback(e=>{r(t=>t.length===0||t[t.length-1]!==e?[...t,e]:t),i.current=-1,a.current=``},[])}}var Ac=(0,J.memo)(e=>{let t=J.useRef({});return(0,X.jsx)(Ut,{minHeight:`200px`,maxHeight:`200px`,ref:t,theme:`dark`,value:e.code,className:`*:outline-hidden [&>.cm-editor]:pr-0 overflow-hidden dark`,readOnly:!0,editable:!1,basicSetup:{lineNumbers:!1},extensions:[Qt.sh(),Xe.updateListener.of(e=>{e.docChanged&&t.current.view?.dispatch({selection:{anchor:e.state.doc.length,head:e.state.doc.length},scrollIntoView:!0})})]})});Ac.displayName=`DebuggerOutput`;var jc=e=>{let t=(0,Y.c)(31),{onSubmit:n,onClear:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=q(`m-0 w-9 h-8 bg-(--slate-2) text-(--slate-11) hover:text-(--blue-11) rounded-none hover:bg-(--sky-3) hover:border-(--blue-8)`,`first:rounded-l-lg first:border-l border-t border-b hover:border`,`last:rounded-r-lg last:border-r`),t[0]=i):i=t[0];let a=i,o;t[1]===n?o=t[2]:(o=()=>n(`n`),t[1]=n,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(fn,{fontSize:36,className:`w-5 h-5`}),t[3]=s):s=t[3];let c;t[4]===o?c=t[5]:(c=(0,X.jsx)(qe,{content:`Next line`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-next-button`,className:a,onClick:o,children:s})}),t[4]=o,t[5]=c);let l;t[6]===n?l=t[7]:(l=()=>n(`c`),t[6]=n,t[7]=l);let u,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=q(a,`text-(--grass-11) hover:text-(--grass-11) hover:bg-(--grass-3) hover:border-(--grass-8)`),d=(0,X.jsx)(yt,{fontSize:36,className:`w-5 h-5`}),t[8]=u,t[9]=d):(u=t[8],d=t[9]);let f;t[10]===l?f=t[11]:(f=(0,X.jsx)(qe,{content:`Continue execution`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-continue-button`,onClick:l,className:u,children:d})}),t[10]=l,t[11]=f);let p;t[12]===n?p=t[13]:(p=()=>n(`bt`),t[12]=n,t[13]=p);let m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(y,{fontSize:36,className:`w-5 h-5`}),t[14]=m):m=t[14];let h;t[15]===p?h=t[16]:(h=(0,X.jsx)(qe,{content:`Print stack trace`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-stack-button`,className:a,onClick:p,children:m})}),t[15]=p,t[16]=h);let g;t[17]===n?g=t[18]:(g=()=>n(`help`),t[17]=n,t[18]=g);let _;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(ft,{fontSize:36,className:`w-5 h-5`}),t[19]=_):_=t[19];let v;t[20]===g?v=t[21]:(v=(0,X.jsx)(qe,{content:`Help`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-help-button`,className:a,onClick:g,children:_})}),t[20]=g,t[21]=v);let b;t[22]!==r||t[23]!==n?(b=r&&(0,X.jsx)(qe,{content:`Quit and clear`,children:(0,X.jsx)(Ye,{variant:`text`,size:`icon`,"data-testid":`debugger-clear-button`,className:q(a,`text-(--red-11) hover:text-(--red-11) hover:bg-(--red-2) hover:border-(--red-8)`),onClick:()=>{n(`q`),r()},children:(0,X.jsx)(It,{fontSize:36,className:`w-5 h-5`})})}),t[22]=r,t[23]=n,t[24]=b):b=t[24];let x;return t[25]!==h||t[26]!==v||t[27]!==b||t[28]!==c||t[29]!==f?(x=(0,X.jsxs)(`div`,{className:`flex`,children:[c,f,h,v,b]}),t[25]=h,t[26]=v,t[27]=b,t[28]=c,t[29]=f,t[30]=x):x=t[30],x};function Mc(e=!0){return{onKeyDown:t=>{if(!e)return;let n=t.currentTarget;if(!(t.key.toLowerCase()===`a`&&(t.ctrlKey||t.metaKey)))return;t.preventDefault(),t.stopPropagation();let r=window.getSelection();if(!r)return;let i=document.createRange();i.selectNodeContents(n),r.removeAllRanges(),r.addRange(i)}}}var Nc=k(`marimo:console:wrapText`,!1,b);function Pc(){let e=(0,Y.c)(3),[t,n]=a(Nc),r;return e[0]!==n||e[1]!==t?(r={wrapText:t,setWrapText:n},e[0]=n,e[1]=t,e[2]=r):r=e[2],r}function Fc(e){let[t,n]=(0,J.useState)(e),r=(0,J.useRef)(null);return e.length>0&&t!==e&&(r.current!==null&&(clearTimeout(r.current),r.current=null),n(e)),(0,J.useEffect)(()=>(e.length===0&&r.current===null&&(r.current=setTimeout(()=>{r.current=null,n([])},200)),()=>{r.current!==null&&(clearTimeout(r.current),r.current=null)}),[e]),t}var Ic=e=>{let t=(0,Y.c)(2),n;return t[0]===e?n=t[1]:(n=(0,X.jsx)(he,{children:(0,X.jsx)(Lc,{...e})}),t[0]=e,t[1]=n),n},Lc=e=>{let t=(0,Y.c)(63),n=J.useRef(null),{wrapText:r,setWrapText:i}=Pc(),[a,o]=dt(e.cellId),[s,c]=J.useState(``),l;t[0]===s?l=t[1]:(l={value:s,setValue:c},t[0]=s,t[1]=l);let u=kc(l),{consoleOutputs:d,stale:f,interrupted:p,cellName:h,cellId:g,onSubmitDebugger:_,onClear:v,onRefactorWithAI:y,className:b}=e,x=Fc(d),S=x.length>0,C=Mc(S),w=Re(n,S),T;if(t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>{let e=n.current;if(!e)return;let t=e.scrollHeight-e.clientHeight;t-e.scrollTop<120&&(e.scrollTop=t)},t[2]=T):T=t[2],(0,J.useLayoutEffect)(T),!S&&m(h))return null;let E,D,O,k,A,j,M,N,P,F;if(t[3]!==g||t[4]!==b||t[5]!==x||t[6]!==S||t[7]!==u||t[8]!==p||t[9]!==a||t[10]!==w||t[11]!==v||t[12]!==y||t[13]!==_||t[14]!==C||t[15]!==o||t[16]!==i||t[17]!==f||t[18]!==s||t[19]!==r){let e=x.toReversed(),l=e.some(Vc),d=e.findIndex(Hc),m;t[30]===x?m=t[31]:(m=()=>x.filter(Uc).map(Wc).join(`
9
+ `),t[30]=x,t[31]=m);let h=m;E=`relative group`,t[32]!==h||t[33]!==S||t[34]!==a||t[35]!==w||t[36]!==o||t[37]!==i||t[38]!==r?(D=S&&(0,X.jsxs)(`div`,{className:`absolute top-1 right-4 z-10 opacity-0 group-hover:opacity-100 flex items-center gap-1 print:hidden`,children:[(0,X.jsx)(Bt,{tooltip:`Copy console output`,value:h,className:`h-4 w-4`}),(0,X.jsx)(qe,{content:r?`Disable wrap text`:`Wrap text`,children:(0,X.jsx)(`span`,{children:(0,X.jsx)(vn,{"aria-label":`Toggle text wrapping`,className:`p-1 rounded bg-transparent text-muted-foreground data-hovered:text-foreground data-selected:text-foreground`,isSelected:r,onChange:i,children:(0,X.jsx)(Pe,{className:`h-4 w-4`})})})}),(w||a)&&(0,X.jsx)(Ye,{"aria-label":a?`Collapse output`:`Expand output`,className:`p-0 mb-px`,onClick:()=>o(!a),size:`xs`,variant:null,children:a?(0,X.jsx)(qe,{content:`Collapse output`,children:(0,X.jsx)(ct,{className:`h-4 w-4`})}):(0,X.jsx)(qe,{content:`Expand output`,children:(0,X.jsx)(lt,{className:`h-4 w-4 `})})})]}),t[32]=h,t[33]=S,t[34]=a,t[35]=w,t[36]=o,t[37]=i,t[38]=r,t[39]=D):D=t[39],O=f?`This console output is stale`:void 0,k=`console-output-area`,A=n,j=C,M=0;let T=f&&`marimo-output-stale`,I=S?`p-5`:`p-3`;t[40]!==b||t[41]!==T||t[42]!==I?(N=q(`console-output-area overflow-hidden rounded-b-lg flex flex-col-reverse w-full gap-1 focus:outline-hidden`,T,I,b),t[40]=b,t[41]=T,t[42]=I,t[43]=N):N=t[43],t[44]===a?P=t[45]:(P=a?{maxHeight:`none`}:void 0,t[44]=a,t[45]=P),F=e.map((e,t)=>{if(e.channel===`pdb`)return null;if(e.channel===`stdin`){V(typeof e.data==`string`,`Expected data to be a string`);let n=x.length-t-1,r=e.mimetype===`text/password`;return e.response==null&&d===t?(0,X.jsx)(Rc,{output:e.data,isPdb:l,isPassword:r,onSubmit:e=>_(e,n),onClear:v,value:s,setValue:c,inputHistory:u},t):(0,X.jsx)(zc,{output:e.data,response:e.response,isPassword:r,interrupted:p},t)}return(0,X.jsx)(J.Fragment,{children:(0,X.jsx)(Ve,{cellId:g,onRefactorWithAI:y,message:e,wrapText:r})},t)}),t[3]=g,t[4]=b,t[5]=x,t[6]=S,t[7]=u,t[8]=p,t[9]=a,t[10]=w,t[11]=v,t[12]=y,t[13]=_,t[14]=C,t[15]=o,t[16]=i,t[17]=f,t[18]=s,t[19]=r,t[20]=E,t[21]=D,t[22]=O,t[23]=k,t[24]=A,t[25]=j,t[26]=M,t[27]=N,t[28]=P,t[29]=F}else E=t[20],D=t[21],O=t[22],k=t[23],A=t[24],j=t[25],M=t[26],N=t[27],P=t[28],F=t[29];let I;t[46]!==g||t[47]!==h?(I=(0,X.jsx)(Zt,{value:h,cellId:g,className:`bg-(--slate-4) border-(--slate-4) hover:bg-(--slate-5) dark:border-(--sky-5) dark:bg-(--sky-6) dark:text-(--sky-12) text-(--slate-12) rounded-l rounded-br-lg absolute right-0 bottom-0 text-xs px-1.5 py-0.5 font-mono max-w-[75%] whitespace-nowrap overflow-hidden`}),t[46]=g,t[47]=h,t[48]=I):I=t[48];let L;t[49]!==I||t[50]!==O||t[51]!==k||t[52]!==A||t[53]!==j||t[54]!==M||t[55]!==N||t[56]!==P||t[57]!==F?(L=(0,X.jsxs)(`div`,{title:O,"data-testid":k,ref:A,...j,tabIndex:M,className:N,style:P,children:[F,I]}),t[49]=I,t[50]=O,t[51]=k,t[52]=A,t[53]=j,t[54]=M,t[55]=N,t[56]=P,t[57]=F,t[58]=L):L=t[58];let R;return t[59]!==E||t[60]!==D||t[61]!==L?(R=(0,X.jsxs)(`div`,{className:E,children:[D,L]}),t[59]=E,t[60]=D,t[61]=L,t[62]=R):R=t[62],R},Rc=e=>{let t=(0,Y.c)(25),{value:n,setValue:r,inputHistory:i,output:a,isPassword:o,isPdb:s,onSubmit:c,onClear:l}=e,{navigateUp:u,navigateDown:d,addToHistory:f}=i,p;t[0]===a?p=t[1]:(p=Bc(a),t[0]=a,t[1]=p);let m=o?`password`:`text`,h;t[2]===r?h=t[3]:(h=e=>r(e.target.value),t[2]=r,t[3]=h);let g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(ot,{className:`w-5 h-5`}),t[4]=g):g=t[4];let _;t[5]!==f||t[6]!==d||t[7]!==u||t[8]!==c||t[9]!==r||t[10]!==n?(_=e=>{if(e.key===`ArrowUp`){u(),e.preventDefault();return}if(e.key===`ArrowDown`){d(),e.preventDefault();return}e.key===`Enter`&&!e.shiftKey&&(n&&f(n),c(n),r(``),e.preventDefault(),e.stopPropagation()),e.key===`Enter`&&e.metaKey&&(e.preventDefault(),e.stopPropagation())},t[5]=f,t[6]=d,t[7]=u,t[8]=c,t[9]=r,t[10]=n,t[11]=_):_=t[11];let v;t[12]!==m||t[13]!==h||t[14]!==_||t[15]!==n?(v=(0,X.jsx)(Mt,{"data-testid":`console-input`,"data-stdin-blocking":!0,type:m,autoComplete:`off`,autoFocus:!0,value:n,onChange:h,icon:g,className:`m-0 h-8 focus-visible:shadow-xs-solid`,placeholder:`stdin`,onKeyDownCapture:_}),t[12]=m,t[13]=h,t[14]=_,t[15]=n,t[16]=v):v=t[16];let y;t[17]!==s||t[18]!==l||t[19]!==c?(y=s&&(0,X.jsx)(jc,{onSubmit:c,onClear:l}),t[17]=s,t[18]=l,t[19]=c,t[20]=y):y=t[20];let b;return t[21]!==p||t[22]!==v||t[23]!==y?(b=(0,X.jsxs)(`div`,{className:`flex gap-2 items-center pt-2`,children:[p,v,y]}),t[21]=p,t[22]=v,t[23]=y,t[24]=b):b=t[24],b},zc=e=>{let t=(0,Y.c)(10),{output:n,response:r,isPassword:i,interrupted:a}=e,o=r!=null&&r!==``,s=a&&!o,c;t[0]===n?c=t[1]:(c=Bc(n),t[0]=n,t[1]=c);let l;t[2]!==o||t[3]!==i||t[4]!==r||t[5]!==s?(l=!i&&!s&&(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-(--sky-11)`,"aria-label":`stdin response`,children:[(0,X.jsx)(ot,{className:`w-4 h-4 shrink-0 opacity-70`}),o?r:(0,X.jsx)(`span`,{className:`italic opacity-70`,children:`(empty)`})]}),t[2]=o,t[3]=i,t[4]=r,t[5]=s,t[6]=l):l=t[6];let u;return t[7]!==c||t[8]!==l?(u=(0,X.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[c,l]}),t[7]=c,t[8]=l,t[9]=u):u=t[9],u},Bc=e=>e?(0,X.jsx)(Pt,{text:e}):null;function Vc(e){return typeof e.data==`string`&&e.data.includes(`(Pdb)`)}function Hc(e){return e.channel===`stdin`}function Uc(e){return e.channel!==`pdb`}function Wc(e){return Yt(e)}var Gc={canHealthCheck:!1,canShutdown:!1,canRestart:!1,supportsLsp:!1},Kc={kind:`wasm`,label:`Pyodide`,capabilities:Gc,state:o(e=>{let t=e(de);switch(t.kind){case`loading`:return{kind:`connecting`,progress:{label:t.message}};case`ready`:return{kind:`ready`};case`error`:return{kind:`failed`,error:{message:t.message,errorKind:`init`}}}})},qc={kind:`remote`,label:`Kernel`,capabilities:{canHealthCheck:!0,canShutdown:!0,canRestart:!0,supportsLsp:!0},state:o(e=>{let t=e(ae);switch(t.state){case G.OPEN:return{kind:`ready`};case G.CONNECTING:return{kind:`connecting`,progress:{label:`Connecting…`}};case G.NOT_STARTED:return{kind:`connecting`,progress:{label:`Not connected`}};case G.CLOSING:case G.CLOSED:return{kind:`failed`,error:{message:t.state===G.CLOSED?t.reason:`Disconnecting`,errorKind:`runtime`}}}})},Jc={kind:`static`,label:`Static`,capabilities:Gc,state:o({kind:`ready`})},Yc={kind:`islands`,label:`Islands`,capabilities:Gc,state:o(e=>{let t=e(le);return t===!0?{kind:`ready`}:typeof t==`string`?{kind:`failed`,error:{message:t,errorKind:`init`}}:{kind:`connecting`,progress:{label:`Initializing islands…`}}})};function Xc(){return K()?Jc:z()?Yc:ie()?Kc:qc}var Zc=o(Xc());o(e=>{let t=e(Zc);return e(t.state).kind!==`ready`||t.kind===`static`?!1:t.kind!==`remote`||e(fe).isInstantiated});function Qc(e){let t=(0,Y.c)(2),n=s(W),{mode:r}=s(re),i=s(oe),a=s(Zc).kind;if(n&&a===`remote`)return!0;switch(r){case`edit`:case`present`:return!0;case`home`:case`gallery`:return!1;case`read`:{if(!i||new URLSearchParams(window.location.search).get(H.includeCode)===`false`)return!1;let n;return t[0]===e?n=t[1]:(n=e.some($c),t[0]=e,t[1]=n),n}default:return Qe(r),!1}}function $c(e){return!!e.code}var el=/\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g,tl=class e{static get INSTANCE(){let t=`_marimo_private_VirtualFileTracker`;return window[t]||(window[t]=new e),window[t]}virtualFiles=new Map;constructor(){}track(e){let t=e.output,n=e.cell_id;if(t)switch(t.mimetype){case`application/json`:case`text/html`:{let e=this.virtualFiles.get(n),r=nl(t.data);e?.forEach(e=>r.add(e)),this.virtualFiles.set(n,r);return}default:return}}filenames(){let e=new Set;for(let t of this.virtualFiles.values())t.forEach(t=>e.add(t));return[...e]}removeForCellId(e){this.virtualFiles.delete(e)}};function nl(e){if(!e)return new Set;let t=new Set,n=(typeof e==`string`?e:JSON.stringify(e)).match(el);if(n)for(let e of n)t.add(e);return t}async function rl(e){let t=tt(),{includeCode:n}=e,r=await t.exportAsHTML({download:!0,includeCode:n,files:tl.INSTANCE.filenames(),layout:await Tl()});He(r)}function il(e,t){return{"data-cell-id":e,"data-cell-name":t,id:f.create(e)}}var al=30;function ol(e,t){let n=(0,Y.c)(5),[r,i]=(0,J.useState)(!0),a;n[0]!==t||n[1]!==e?(a=()=>{if(t!==`read`){i(!1);return}let n=Ze((e-1)*al,100,2e3),r=setTimeout(()=>{i(!1)},n);return()=>clearTimeout(r)},n[0]=t,n[1]=e,n[2]=a):a=n[2],rt(a);let o;return n[3]===r?o=n[4]:(o={invisible:r},n[3]=r,n[4]=o),o}function sl({showCodeInRunModePreference:e,kioskMode:t}){if(!e)return!1;let n=new URLSearchParams(window.location.search).get(H.showCode);return n===null?K()||ie()||t:n===`true`}function cl(e){K()&&Rt(t=>{t.set(H.showCode,String(e))})}function ll(e){let t=new Map,n=0;return e.forEach(e=>{let r=e.config.column??n;n=r,t.has(r)||t.set(r,[]),t.get(r)?.push(e)}),[...t.entries()].toSorted(([e],[t])=>e-t)}function ul(e,t){let n=new T().isSupported(e),r=t!==null&&!ut(t);return n&&r||e.trim()===``}var dl=e=>{let t=(0,Y.c)(15),{invisible:n,appConfig:r,className:i,children:a,innerClassName:o}=e,s;t[0]===i?s=t[1]:(s=q(`px-1 sm:px-16 md:px-20 xl:px-24 print:px-0 print:pb-0`,`pb-24 sm:pb-12`,i),t[0]=i,t[1]=s);let c=r.width===`compact`&&`max-w-(--content-width) sm:min-w-[400px]`,l=r.width===`medium`&&`max-w-(--content-width-medium) sm:min-w-[400px]`,u=r.width===`columns`&&`w-fit`,d=r.width===`full`&&`max-w-full`,f=n&&`invisible`,p;t[2]!==o||t[3]!==c||t[4]!==l||t[5]!==u||t[6]!==d||t[7]!==f?(p=q(`m-auto`,`pb-24 sm:pb-12`,c,l,u,d,f,o),t[2]=o,t[3]=c,t[4]=l,t[5]=u,t[6]=d,t[7]=f,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==p?(m=(0,X.jsx)(`div`,{className:p,children:a}),t[9]=a,t[10]=p,t[11]=m):m=t[11];let h;return t[12]!==s||t[13]!==m?(h=(0,X.jsx)(`div`,{className:s,children:m}),t[12]=s,t[13]=m,t[14]=h):h=t[14],h},fl=e=>{let t=(0,Y.c)(33),{cells:n,appConfig:r,mode:i}=e,{invisible:a}=ol(n.length,i),o=s(W),c=s(fe),[l]=te(),u=s(oe),d;t[0]!==o||t[1]!==u?(d=()=>sl({showCodeInRunModePreference:u,kioskMode:o}),t[0]=o,t[1]=u,t[2]=d):d=t[2];let[f,p]=(0,J.useState)(d),m=Qc(n),h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{p(gl)},t[3]=h):h=t[3];let g=h,_;t[4]!==m||t[5]!==o||t[6]!==i||t[7]!==f||t[8]!==l?(_=e=>(0,X.jsx)(ml,{cellId:e.id,output:e.output,consoleOutputs:e.consoleOutputs,status:e.status,code:e.code,config:e.config,cellOutputArea:l.display.cell_output,stopped:e.stopped,showCode:f&&m,errored:e.errored,mode:i,runStartTimestamp:e.runStartTimestamp,interrupted:e.interrupted,staleInputs:e.staleInputs,name:e.name,kiosk:o,showErrorTracebacks:l.runtime.show_tracebacks??!1},e.id),t[4]=m,t[5]=o,t[6]=i,t[7]=f,t[8]=l,t[9]=_):_=t[9];let v=_,y;t[10]!==r.width||t[11]!==n||t[12]!==a||t[13]!==c||t[14]!==v?(y=()=>{if(r.width===`columns`){let e=ll(n);return(0,X.jsx)(`div`,{className:`flex flex-row gap-8 w-full`,children:e.map(e=>{let[t,n]=e;return(0,X.jsx)(`div`,{className:`flex-1 flex flex-col gap-2 w-(--content-width)`,children:n.map(v)},t)})})}return n.length===0&&!a?c.isInstantiated?(0,X.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center py-8`,children:(0,X.jsxs)(qt,{variant:`info`,children:[(0,X.jsx)(Kt,{children:`Empty Notebook`}),(0,X.jsx)(Gt,{children:`This notebook has no code or outputs.`})]})}):(0,X.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center py-8`,children:(0,X.jsx)(vt,{className:`w-8 h-8 animate-spin text-muted-foreground`})}):(0,X.jsx)(X.Fragment,{children:n.map(v)})},t[10]=r.width,t[11]=n,t[12]=a,t[13]=c,t[14]=v,t[15]=y):y=t[15];let b=y,x=f&&m&&`gap-5`,S;t[16]===x?S=t[17]:(S=q(`flex flex-col`,x),t[16]=x,t[17]=S);let C;t[18]===b?C=t[19]:(C=b(),t[18]=b,t[19]=C);let w;t[20]!==S||t[21]!==C?(w=(0,X.jsx)(`div`,{className:S,children:C}),t[20]=S,t[21]=C,t[22]=w):w=t[22];let T;t[23]!==m||t[24]!==i||t[25]!==f?(T=i===`read`&&(0,X.jsx)(pl,{canShowCode:m,showCode:f,onToggleShowCode:g}),t[23]=m,t[24]=i,t[25]=f,t[26]=T):T=t[26];let E;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,X.jsx)(Jt,{}),t[27]=E):E=t[27];let D;return t[28]!==r||t[29]!==a||t[30]!==w||t[31]!==T?(D=(0,X.jsxs)(dl,{invisible:a,appConfig:r,children:[w,T,E]}),t[28]=r,t[29]=a,t[30]=w,t[31]=T,t[32]=D):D=t[32],D},pl=e=>{let t=(0,Y.c)(26),{canShowCode:n,showCode:r,onToggleShowCode:i}=e,{readCode:a}=et(),o=_l,s=vl,c;t[0]===a?c=t[1]:(c=async()=>{let e=await a();Ue(new Blob([e.contents],{type:`text/plain`}),Ge.toPY(document.title))},t[0]=a,t[1]=c);let l=c,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=K(),t[2]=u):u=t[2];let d=u,f;if(t[3]!==n||t[4]!==l||t[5]!==i||t[6]!==r){if(f=[],n){let e,n;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(pt,{className:`mr-2`,size:14,strokeWidth:1.5}),n=(0,X.jsx)(`span`,{className:`flex-1`,children:`Show code`}),t[8]=e,t[9]=n):(e=t[8],n=t[9]);let a;t[10]===r?a=t[11]:(a=r&&(0,X.jsx)(it,{className:`h-4 w-4`}),t[10]=r,t[11]=a);let o;t[12]!==i||t[13]!==a?(o=(0,X.jsxs)(De,{onSelect:i,"data-testid":`notebook-action-show-code`,children:[e,n,a]},`show-code`),t[12]=i,t[13]=a,t[14]=o):o=t[14];let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(Oe,{},`show-code-separator`),t[15]=s):s=t[15],f.push(o,s)}if(!d){let e;if(t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsxs)(De,{onSelect:s,"data-testid":`notebook-action-download-html`,children:[(0,X.jsx)(an,{className:`mr-2`,size:14,strokeWidth:1.5}),`Download as HTML`]},`download-html`),t[16]=e):e=t[16],f.push(e),n){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(mt,{className:`mr-2`,size:14,strokeWidth:1.5}),t[17]=e):e=t[17];let n;t[18]===l?n=t[19]:(n=(0,X.jsxs)(De,{onSelect:l,"data-testid":`notebook-action-download-python`,children:[e,`Download notebook source`]},`download-python`),t[18]=l,t[19]=n),f.push(n)}let r;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(Oe,{},`download-separator`),t[20]=r):r=t[20];let i;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsxs)(De,{onSelect:o,"data-testid":`notebook-action-download-png`,children:[(0,X.jsx)(_t,{className:`mr-2`,size:14,strokeWidth:1.5}),`Download as PNG`]},`download-png`),t[21]=i):i=t[21],f.push(r,i)}t[3]=n,t[4]=l,t[5]=i,t[6]=r,t[7]=f}else f=t[7];if(f.length===0)return null;let p;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(p=q(`right-0 top-0 z-50 m-4 print:hidden flex gap-2`,K()?`absolute`:`fixed`),t[22]=p):p=t[22];let m;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(ke,{asChild:!0,children:(0,X.jsx)(Ye,{variant:`secondary`,size:`xs`,children:(0,X.jsx)(gt,{className:`w-4 h-4`})})}),t[23]=m):m=t[23];let h;return t[24]===f?h=t[25]:(h=(0,X.jsx)(`div`,{"data-testid":`notebook-actions-dropdown`,className:p,children:(0,X.jsxs)(je,{modal:!1,children:[m,(0,X.jsx)(Ae,{align:`end`,className:`print:hidden w-[220px]`,children:f})]})}),t[24]=f,t[25]=h),h},ml=(0,J.memo)(e=>{let t=(0,Y.c)(57),{output:n,consoleOutputs:r,cellOutputArea:i,cellId:a,status:o,stopped:s,errored:c,config:l,interrupted:u,staleInputs:d,runStartTimestamp:f,code:m,showCode:h,mode:g,name:_,kiosk:y,showErrorTracebacks:b}=e,x=(0,J.useRef)(null),S;t[0]!==u||t[1]!==n||t[2]!==f||t[3]!==d||t[4]!==o?(S=D({status:o,output:n,interrupted:u,runStartTimestamp:f,staleInputs:d},!1),t[0]=u,t[1]=n,t[2]=f,t[3]=d,t[4]=o,t[5]=S):S=t[5];let C=S,E;t[6]===o?E=t[7]:(E=w(o),t[6]=o,t[7]=E);let O=E,k=y&&g!==`present`,A;if(t[8]!==m||t[9]!==c||t[10]!==k||t[11]!==h||t[12]!==s){let e=new T().isSupported(m);A=q(`marimo-cell`,`hover-actions-parent empty:invisible`,!h&&!k?v({errored:c,stopped:s}):{"has-error":c,stopped:s,borderless:e}),t[8]=m,t[9]=c,t[10]=k,t[11]=h,t[12]=s,t[13]=A}else A=t[13];let j=A;if(g===`read`&&h||k){let e;t[14]!==a||t[15]!==O||t[16]!==n||t[17]!==C?(e=(0,X.jsx)(Be,{allowExpand:!0,output:n,className:U.outputArea,cellId:a,stale:C,loading:O}),t[14]=a,t[15]=O,t[16]=n,t[17]=C,t[18]=e):e=t[18];let o=e,s;t[19]!==m||t[20]!==n?(s=ul(m,n),t[19]=m,t[20]=n,t[21]=s):s=t[21];let c=s,d;t[22]!==m||t[23]!==c?(d=c?null:$t(m),t[22]=m,t[23]=c,t[24]=d):d=t[24];let f=d,p;t[25]!==a||t[26]!==_?(p=il(a,_),t[25]=a,t[26]=_,t[27]=p):p=t[27];let h=i===`above`&&o,g;t[28]!==l||t[29]!==f?(g=f&&(0,X.jsx)(`div`,{className:`tray`,children:(0,X.jsx)(pe,{initiallyHideCode:l.hide_code,code:f.code,language:f.language})}),t[28]=l,t[29]=f,t[30]=g):g=t[30];let v=i===`below`&&o,y;t[31]!==a||t[32]!==r||t[33]!==u||t[34]!==_||t[35]!==C?(y=(0,X.jsx)(Ic,{consoleOutputs:r,stale:C,interrupted:u,cellName:_,onSubmitDebugger:yl,cellId:a,debuggerActive:!1}),t[31]=a,t[32]=r,t[33]=u,t[34]=_,t[35]=C,t[36]=y):y=t[36];let b;return t[37]!==j||t[38]!==v||t[39]!==y||t[40]!==p||t[41]!==h||t[42]!==g?(b=(0,X.jsxs)(`div`,{tabIndex:-1,ref:x,className:j,...p,children:[h,g,v,y]}),t[37]=j,t[38]=v,t[39]=y,t[40]=p,t[41]=h,t[42]=g,t[43]=b):b=t[43],b}if(p({errored:c,interrupted:u,stopped:s,output:n,showErrorTracebacks:b}))return null;let M;t[44]!==a||t[45]!==_?(M=il(a,_),t[44]=a,t[45]=_,t[46]=M):M=t[46];let N=g===`edit`,P;t[47]!==a||t[48]!==O||t[49]!==n||t[50]!==C||t[51]!==N?(P=(0,X.jsx)(Be,{allowExpand:N,output:n,className:U.outputArea,cellId:a,stale:C,loading:O}),t[47]=a,t[48]=O,t[49]=n,t[50]=C,t[51]=N,t[52]=P):P=t[52];let F;return t[53]!==j||t[54]!==M||t[55]!==P?(F=(0,X.jsx)(`div`,{tabIndex:-1,ref:x,className:j,...M,children:P}),t[53]=j,t[54]=M,t[55]=P,t[56]=F):F=t[56],F});ml.displayName=`VerticalCell`;var hl={type:`vertical`,name:`Vertical`,validator:R(),Component:fl,deserializeLayout:e=>e,serializeLayout:e=>e,getInitialLayout:()=>null};function gl(e){let t=!e;return cl(t),t}async function _l(){let e=document.getElementById(`App`);e&&await We({element:e,filename:document.title,prepare:Ke})}async function vl(){document.getElementById(`App`)&&await rl({includeCode:!0})}function yl(){return null}var bl=[Rr,Oc,hl];function xl({type:e,data:t,cells:n}){let r=bl.find(t=>t.type===e);if(r===void 0)throw Error(`Unknown layout type: ${e}`);let i=r.validator.safeParse(t);return i.success?r.deserializeLayout(i.data,n):(B.warn(`Invalid ${e} layout`,i.error),r.getInitialLayout(n))}function Sl(e,t){if(e==null)return me();let n=bl.find(t=>t.type===e.type);return n===void 0?(B.warn(`Unknown layout type: ${e.type}`),me()):{selectedLayout:n.type,layoutData:{[n.type]:xl({type:n.type,data:e.data,cells:t})}}}function Cl({state:e,plugin:t,cells:n}){return e.layoutData[t.type]??(e.pendingLayout?.type===t.type?xl({type:t.type,data:e.pendingLayout.data,cells:n}):t.getInitialLayout(n))}function wl(){let e=C(),t=c.get(ue),{selectedLayout:n}=t;if(n===`vertical`)return null;let r=bl.find(e=>e.type===n);if(r===void 0)return B.error(`Unknown layout type: ${n}`),null;let i=_(e),a=Cl({state:t,plugin:r,cells:i});return{type:n,data:r.serializeLayout(a,i)}}async function Tl(){return await E(),wl()}export{Fi as A,Ss as C,Ea as D,ko as E,fi as F,ni as I,sn as L,Bi as M,Di as N,ja as O,Oi as P,on as R,ns as S,os as T,Ds as _,bl as a,Ts as b,tl as c,Ic as d,vc as f,ks as g,Os as h,Cl as i,Hi as j,Li as k,Qc as l,bc as m,Sl as n,dl as o,yc as p,wl as r,il as s,Tl as t,Zc as u,Hs as v,vs as w,us as x,Es as y,an as z};