@marimo-team/frontend 0.25.2-dev36 → 0.25.2-dev37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{JsonOutput-BYsq-wE-.js → JsonOutput-BdpXVhxV.js} +1 -1
- package/dist/assets/{agent-panel-D8lLZMXc.js → agent-panel-CRzjBUdB.js} +1 -1
- package/dist/assets/{cell-editor-De117Rxz.js → cell-editor-CEABNkmY.js} +1 -1
- package/dist/assets/{column-preview-D85EX1XE.js → column-preview-CZ2TL09N.js} +1 -1
- package/dist/assets/{command-palette-BiQxmhvY.js → command-palette-DaHlZzjG.js} +1 -1
- package/dist/assets/{edit-page-c6SDPEIh.js → edit-page-HpmTxp7Y.js} +4 -4
- package/dist/assets/{file-explorer-panel-sAIMaRBr.js → file-explorer-panel-Dqxfg5xm.js} +1 -1
- package/dist/assets/{hooks-B4hoSKN7.js → hooks-ZWyI6fMV.js} +1 -1
- package/dist/assets/{index-DkUjZGnQ.js → index-BUQP_BOv.js} +2 -2
- package/dist/assets/{layout-BKf7KEPn.js → layout-C8pvkupF.js} +3 -3
- package/dist/assets/{panels-o1nKDdzp.js → panels-HoIP3cDr.js} +1 -1
- package/dist/assets/{reveal-component-1rRxx9pg.js → reveal-component-CICzazBY.js} +1 -1
- package/dist/assets/{run-page-aOAuHEMH.js → run-page-DWUXQLtA.js} +1 -1
- package/dist/assets/{scratchpad-panel-BiIWI3Zz.js → scratchpad-panel-Bju5WCrd.js} +1 -1
- package/dist/assets/{session-panel-XJJ6-NhN.js → session-panel-BhoASF58.js} +1 -1
- package/dist/assets/{useNotebookActions-qN_AUsLn.js → useNotebookActions-D7J_QMJo.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/src/components/data-table/__tests__/pagination.test.tsx +85 -1
- package/src/components/data-table/pagination.tsx +16 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-page-Dnv5d4Ek.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-Dc9HkKI2.js","./react-CUdNIagt.js","./compiler-runtime-BQ9S8nyo.js","./cells-DIjn-wIE.js","./react-dom-CKsE8sC1.js","./schemas-BL-NsLlF.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./config-BdH5RvM0.js","./_baseMerge-CQpUq7ep.js","./isArrayLikeObject-DnwgSs_Z.js","./useEventListener-CUPWI_1X.js","./objects-snlMn4yk.js","./jsx-runtime-B74pBk57.js","./invariant-Ci2dTZ72.js","./utils-B4K466FK.js","./session-ztCnZJHI.js","./config-D7CP5wR5.js","./Deferred-CrTnjj37.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./fullscreen-3wS6IaIC.js","./dist-DFI04FfI.js","./menu-items-D-vbZmqL.js","./use-restore-focus-D0UtBPD6.js","./select-CWHHoM53.js","./button-qFeU84ax.js","./check-Wea4hZ6R.js","./createLucideIcon-rHn2EdoM.js","./useNumberFormatter-C4-_TnkF.js","./context-BFOBKCJB.js","./circle-CzTMKZwz.js","./toast-DXkezxWI.js","./tooltip-CamoSiGF.js","./paths-CzfpItSz.js","./useLifecycle-DKSBdWUf.js","./toDate-BbJ1_N2T.js","./database-zap-CrkOvbyN.js","./write-secret-modal-wFgr-1dA.js","./alert-dialog-BsB0FYEL.js","./input-D4bMj5Nb.js","./numbers-DyJNv6Vk.js","./once-Haz_uxEL.js","./arrays-BqUx5USx.js","./useDebounce-DMbg9X18.js","./use-toast-CC89xOwH.js","./requests-yTHMxhVa.js","./uuid-k9DpjH68.js","./plus-gbN72xHe.js","./trash-2-BJG-7Qob.js","./preload-helper-uBIymjUX.js","./dist-Cny7_yZb.js","./dist-DBMV4gqt.js","./capabilities-BqUNf14U.js","./cjs-C49f7GXV.js","./createReducer-CI8rlZE9.js","./dist-qhAY4L2r.js","./marked.esm-B_3iMIUq.js","./strings-LjhpYwmx.js","./dist-BOfh4hMd.js","./badge-DFf033uX.js","./dist-LSsCJjA3.js","./dist-1tmpVXyz.js","./dist-DtH-7lot.js","./dist-BmExfiwX.js","./dist-DusFODSa.js","./stex-Dc5bKD4z.js","./useTheme-CnWB5G1X.js","./useAsyncData-DucTwMkf.js","./purify.es--06brOip.js","./cells-0PFKL3SH.css","./ErrorBoundary-CHPy195L.js","./copy-icon-DQuttmjH.js","./copy-RyCOE8jo.js","./copy-B--GzTEX.js","./dropdown-menu-Crx6knLg.js","./chevron-right-DOPs2jx8.js","./components-DJ4W2IzC.js","./chart-no-axes-column-B6FT5Xvu.js","./file-mCR_SMtq.js","./youtube-2MBs34oQ.js","./link-BF4dGmOQ.js","./package-BeYhVWvM.js","./react-icons.esm-C6SMwKZH.js","./error-banner-EjYF86IQ.js","./errors-D9vyuMar.js","./icons-CVdkfEA3.js","./github-khsXwCtv.js","./marimo-icons-B_1oPpIE.js","./links-Dz_7YAlE.js","./tree-actions-DpLu3KP0.js","./eye-off-CfkK-QS3.js","./refresh-cw-CEGpOrzd.js","./circle-play-X3K8DkEc.js","./external-link-D2lKwXyB.js","./file-icons-e7tmeyP-.js","./file-headphone-DKocX1z0.js","./image-CTch9x2I.js","./spinner-CGdRKCnw.js","./file-name-input-CUxuxMjv.js","./shim-5li_pJY_.js","./extends-CvVTau-c.js","./pathUtils-BKesuhdv.js","./semaphore-BjoL5P0h.js","./app-config-button-BAQBx4II.js","./ai-model-dropdown-B547mMnB.js","./get-DjNf4SIX.js","./has-sKqQhP6r.js","./_hasPath-BmRQipI0.js","./pair-DrvWpc2_.js","./state-BQjr5g9m.js","./config-2Nts63h2.js","./switch-1_rRTvtc.js","./tabs-Dx9NomUx.js","./triangle-alert-BeRqoThc.js","./shell-BSnvn9t7.js","./api-C5RyTgDk.js","./kbd-BnUiViRu.js","./alert-MrQXRIin.js","./filename-BlDwe-3Z.js","./table-Dg1KxH-q.js","./renderShortcut-BoDtLl9Q.js","./azure-Dcn397wY.js","./card-BYZGhhhx.js","./settings-DlKTeV_0.js","./Inputs-BlygJyl1.js","./Inputs-CV_Lf9-w.css","./dates-Cv2NS8h4.js","./en-US-B4U3zuiu.js","./isValid-BEbe1fFs.js","./useInterval-VrfTcgt8.js","./run-page-aOAuHEMH.js","./JsonOutput-BYsq-wE-.js","./download-DBXnO5qS.js","./html-to-image-D30-tyL0.js","./LazyAnyLanguageCodeMirror-91eGNw7v.js","./list-filter-CTg19675.js","./markdown-renderer-DT34-_9e.js","./chunk-YOKDWASO-84E-_nIR.js","./micromark-factory-space-D9Dr-k4J.js","./markdown-renderer-DjIHoF9Z.css","./ellipsis-CLMWXUqY.js","./message-circle-OTHnVlxO.js","./MarimoErrorOutput-K6C_dFmm.js","./hat-glasses-DVgK5i5l.js","./datasource-Ccdyd-O2.js","./RenderHTML-ClrDrx3F.js","./useRunCells-k0IpRLOw.js","./useInstallPackage-DO1N1lCX.js","./state-OJSVjDAX.js","./cell-link-CEmc-Cr5.js","./useDateFormatter-CjgScv5a.js","./tooltip-BQ9qHrrN.js","./vega-loader.browser-CLRkNgm7.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-D5bOh7g6.js","./objectWithoutPropertiesLoose-Do6ywDBO.js","./useIframeCapabilities-CnQhRi25.js","./utils-CaQYvazl.js","./formats-Bbyf-azh.js","./react-resizable-panels.browser.esm-BL2E7f5c.js","./JsonOutput-B0GmlMnR.css","./arrow-left-DzPJ79ZB.js","./panels-o1nKDdzp.js","./state-0X7um_9u.js","./_baseSet-Bpdo9AvU.js","./state-BsVxWYGT.js","./blob-BKNVs7hM.js","./share-BZW3tzEX.js","./events-CbeVJ6OD.js","./layout-BKf7KEPn.js","./code-xml-CW65k2pN.js","./code-DW4kNwKG.js","./readonly-python-code-CPhK2DqE.js","./esm-3WkPrffD.js","./useAddCell-DCbFUjci.js","./useDeleteCell-BJ6lgiBJ.js","./trash-BKbZYRHl.js","./prop-types-Djf4O40e.js","./floating-outline-yJVtlHMv.js","./process-output-gyG2tEQt.js","./code-visibility-DbW2QNho.js","./name-cell-input-E95KyKqv.js","./name-cell-input-ujOhus_y.css","./esm-CQuf--zt.js","./dist-DDpltFEG.js","./dist-DOsgOC8X.js","./dist-DF6q90J2.js","./dist-CWcX5iL_.js","./dist-COseLvbK.js","./dist-uBfhY3mF.js","./dist-CdpiHIsZ.js","./dist-Ceg_d-nu.js","./dist-C08rfu50.js","./dist-CJ4Ekjf-.js","./dist-C9ULdZil.js","./dist-DmUAWIff.js","./dist-BCteMNTR.js","./apl-CYIAEF37.js","./asciiarmor-CF6FHpQl.js","./asn1-CmtZ6NID.js","./brainfuck-vE42J6oQ.js","./cobol-ttQu-eUm.js","./clike-Bo1_pR8B.js","./clojure-1zb6N0Kd.js","./css-aD3t-znF.js","./cmake-DSEb40G9.js","./coffeescript-CcHmp8ZW.js","./commonlisp-DHrixoxv.js","./cypher-q6-coHOK.js","./python-C4CVWZ7v.js","./crystal-fOwNIMzy.js","./d-Drt6ZXrF.js","./diff-CYBnW6ZU.js","./dtd-DqGG8R4P.js","./dylan-BTCYgsmh.js","./ecl-BPsxRGqR.js","./eiffel-BCguJEP-.js","./elm-DnNeI1M2.js","./erlang-DkHPV6ru.js","./factor-ZZBBZpXK.js","./simple-mode-DXiLM1-G.js","./forth-DUDizG3o.js","./fortran-BarbOvgW.js","./mllike-BKN6OcTc.js","./gas-mybzrfIH.js","./gherkin-BlnXaZZf.js","./groovy-cYuFC_ot.js","./haskell-CuLp9g3a.js","./haxe-CiIUZbdX.js","./idl-BHq7WyPV.js","./javascript-D-FtdkNC.js","./julia-CoYYMTcZ.js","./livescript-C1gEZ5Hk.js","./lua-DXBxhmso.js","./mirc-CTGUd79I.js","./mathematica-CwlrU_TQ.js","./modelica-DZs5SjV_.js","./mumps-BNg2Yq-1.js","./mbox-skR0V6cu.js","./nsis-DWBX_aOH.js","./ntriples-Ck5rp6GE.js","./octave-BRpd3hBF.js","./oz-BUEZmvHT.js","./pascal-DBfxUwpj.js","./perl-v9vsztCj.js","./pig-CrKTIB-m.js","./powershell-89xdb5K_.js","./properties-DaUFoXFR.js","./protobuf-Ci5XvpF4.js","./pug-DPY-Ajan.js","./puppet-Da8ZxG7z.js","./q-BjtI5Irp.js","./r-vSi6pWDr.js","./rpm-Cv5HmAkX.js","./ruby-CKIsIBWn.js","./sas-D3-6PWmJ.js","./scheme-DqTb0ELD.js","./shell-DySzVBqR.js","./sieve-CoBbN2aF.js","./smalltalk-CJJAzHnb.js","./sparql-CjwbV0fX.js","./stylus-uh0Gd-Iz.js","./swift-D5IK5OrP.js","./verilog-DPWRmpYS.js","./tcl-BvqzOD3a.js","./textile--JQHE1pJ.js","./toml-lWmHdWv5.js","./troff-r7W702V9.js","./ttcn-1CwPIugQ.js","./ttcn-cfg-CHYEAF6D.js","./turtle-D_5eCUwg.js","./webidl-CNY2gQL0.js","./vb-Vd6lTutg.js","./vbscript-CcW6E3ma.js","./velocity-CuSicjhq.js","./vhdl-sLYad3YP.js","./xquery-d3Qdoigy.js","./yacas-BjDXhrkW.js","./z80-z4BkVl0y.js","./mscgen-Bo5N9WUj.js","./dist-mPh3sAH5.js","./readonly-code-display-DVP0M5ji.js","./layout-D-WxHzKd.css","./package-data-BwaspaKJ.js","./requests-DFPPfagc.js","./state-D-WJnPU6.js","./ws-BXWY541V.js","./runs-bQecbisg.js","./panels-DuFuRfRM.css","./house-CbkYoQ5W.js","./edit-page-c6SDPEIh.js","./arrow-right-xoNT7eIQ.js","./useBoolean-C44TyhOc.js","./useCellActionButton-Dd3_WkrO.js","./multi-icon-DWzZu-9u.js","./multi-icon-D129IBvu.css","./useSplitCell-AE67LfQn.js","./circle-check-BF80fXZd.js","./useNotebookActions-qN_AUsLn.js","./globe-CmFhHoL1.js","./components-BgOwsosg.js","./square-DvOKKLHZ.js","./markdown-export-DzhB1FrN.js","./feedback-button-Ck0Mp9so.js","./error-entries-BB7FNt10.js","./skeleton-CKpBjoLm.js","./add-connection-dialog-BOV2U067.js","./coerce-CZiN7rQ_.js","./hooks-B4hoSKN7.js","./add-cell-with-ai-sgoMoiI9.js","./fileToBase64-aqhlf6Jj.js","./clipboard-paste-D0gau9Xw.js","./cell-editor-De117Rxz.js","./save-D4cG4pP2.js","./dist-AelfNxj6.js","./formatting-DvWLhH3Q.js","./panel-accordion-state-_r3T-AGo.js","./loro_wasm_bg-oTW3uoGB.js","./cell-editor-C-58hQJU.css","./RunButton-BA02OhJe.js","./rotate-ccw-se3Oa1US.js","./rotate-cw-BcRERxHa.js","./square-function-DyFIOFp5.js","./CellStatus-CRNbTOIs.js","./ban-3HAzm9Fj.js","./workflow-nBi9HGeO.js","./CellStatus-2Psjnl5F.css","./useDependencyPanelTab-CyNU7lXE.js","./panel-context-BPaQeOuV.js","./sandbox-panel-CcKUdNwc.js","./arrow-down-BFFrjzad.js","./kiosk-mode-Cvh6wszH.js","./edit-page-Dstp9NQ5.css","./gallery-page-D70P7AOr.js","./chat-ui-C5Ulv8Sh.js","./bot-message-square-BfGaNy9r.js","./chat-display-Bpl-2umz.js","./isEmpty-BJso7_X0.js","./glide-data-editor-YqrbKh4R.js","./glide-utils-BatnVnxk.js","./data-grid-types-DgHVN_Zz.js","./dist-DoyTOIOd.js","./click-outside-container-CHoodRk9.js","./glide-data-editor-CDvI1PvV.css","./ConnectedDataExplorerComponent-CDPp5q3i.js","./spec-C09S5bT-.js","./react-vega-Jq3Jd7eX.js","./linear-0eij_aAG.js","./init-ZlXS9mIS.js","./cubic-DELhj3Tx.js","./ordinal-BdBDtYTt.js","./time-MgToa8VM.js","./range-EplFIxc7.js","./path-BCdg30Y0.js","./math-Bi_r_ZWc.js","./arc-Yxk2k_uq.js","./array-BifhSqXX.js","./step-CqgdNM3U.js","./line-io_go0HI.js","./colors-Cg5Vh3br.js","./treemap-BfjIY-m6.js","./Plot-CNtRAZBG.js","./vega-component-Bw0srfks.js","./useDeepCompareMemoize-DSlTt6u_.js","./use-vega-container-remeasure-CS3c8wGN.js","./swiper-component-C40kEQTQ.js","./swiper-component-BCzCewjh.css","./slides-BQsAdh8K.css","./ImageComparisonComponent-pCLPT6RA.js","./mermaid-Z_sj5Wqp.js","./chunk-75Z2AOVW-DEp7Wbaj.js","./src-BpnPuKEN.js","./chunk-Y2CYZVJY-DsF7k-Jl.js","./src-Cyu5G-Tr.js","./chunk-DU6HZSFF-CDmPCRkr.js","./dist-CeoU7cfW.js","./chunk-CLGD4ZFX-BxW11Imt.js","./chunk-P2QGCYS3-Bw5LRT6S.js","./chunk-PWAF6VOD-B1mxlptQ.js","./chunk-GMAD6QVW-ahdTJvh0.js","./chunk-4HAMMTFA-DaFOJTOO.js","./rough.esm-Dy-Kn_BL.js","./chunk-GVQU2GXP-CPkYne1h.js","./chunk-L3NEJ4N5-BOK6HmaY.js","./chunk-OSK3NFVY-CEcyPnHo.js","./chunk-2E4U76K2-DqA2CBL0.js","./graphlib-Blky6igo.js","./hasIn-yw4sIeJR.js","./chunk-LNGE3PJU-DWpGwHrW.js","./chunk-TLUHSLCS-DvvqZUl_.js","./katex-CQIbPNPT.js","./katex-DUp2KybH.js","./mhchem-hMh9XtQZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{c as n,l as r,o as i,r as a,s as o,t as s}from"./useEvent-Dc9HkKI2.js";import{t as c}from"./react-CUdNIagt.js";import{$t as l,Aa as u,An as d,Ba as f,Bn as p,Co as m,Di as h,Dn as g,Do as _,Ei as v,En as y,Eo as b,Gt as x,Ht as S,Jt as C,La as w,Lt as T,Na as E,On as D,Ra as O,Rt as k,S as A,Tn as j,To as M,Ut as N,Vt as P,Wa as F,Wt as I,Xa as ee,Xt as L,Y as te,Yt as ne,Zt as re,_n as ie,_o as ae,an as oe,b as se,en as ce,fn as le,gn as ue,go as de,ho as fe,in as pe,io as me,jo as he,kn as ge,lo as _e,lt as ve,mn as ye,mo as be,nn as xe,no as Se,oa as Ce,on as we,qt as Te,rn as Ee,ro as De,sn as Oe,tn as ke,ut as Ae,vn as je,wn as R,wo as Me,xn as Ne,xo as Pe,yn as Fe,yo as Ie,z as Le,za as Re}from"./cells-DIjn-wIE.js";import{t as ze}from"./react-dom-CKsE8sC1.js";import{A as z,C as Be,D as Ve,E as He,F as Ue,I as We,L as Ge,M as Ke,N as qe,O as Je,P as B,S as V,T as Ye,W as Xe,_ as Ze,b as Qe,h as $e,j as H,n as et,u as tt,v as nt,x as U,y as rt,z as it}from"./schemas-BL-NsLlF.js";import{n as at,r as ot,t as st}from"./coerce-CZiN7rQ_.js";import{t as ct}from"./compiler-runtime-BQ9S8nyo.js";import{t as lt}from"./get-DjNf4SIX.js";import{t as ut}from"./pick-DKIID_Mo.js";import{C as dt,E as ft,M as pt,N as mt,P as ht,S as gt,a as _t,u as vt,v as yt}from"./config-BdH5RvM0.js";import{a as bt,c as xt,d as St,f as Ct,h as wt,i as Tt,l as Et,o as Dt,p as Ot,r as kt,s as At,u as jt,v as Mt,y as Nt}from"./state-0X7um_9u.js";import{_ as Pt,a as Ft,g as W,o as It,t as Lt}from"./useEventListener-CUPWI_1X.js";import{t as Rt}from"./objects-snlMn4yk.js";import{t as zt}from"./invariant-Ci2dTZ72.js";import{i as Bt,t as Vt}from"./utils-B4K466FK.js";import{n as Ht,t as Ut}from"./pair-DrvWpc2_.js";import{_ as Wt,d as Gt,l as Kt,p as qt,r as Jt,s as Yt,u as Xt}from"./session-ztCnZJHI.js";import{C as Zt,M as Qt,O as $t,S as en,T as tn,_ as nn,a as rn,i as an,l as on,r as sn,s as cn,t as ln,y as un}from"./config-D7CP5wR5.js";import{n as dn,r as fn,t as pn}from"./state-BQjr5g9m.js";import{a as mn,s as hn,t as gn}from"./state-BsVxWYGT.js";import{n as _n,t as vn}from"./ErrorBoundary-CHPy195L.js";import{n as yn,t as G}from"./cn-ldLVeaqm.js";import{t as bn}from"./jsx-runtime-B74pBk57.js";import{E as xn,S as Sn,T as Cn,_ as wn,b as Tn,h as En,i as Dn,o as On,s as kn,v as An,w as jn,x as Mn,y as Nn}from"./fullscreen-3wS6IaIC.js";import{o as Pn,s as Fn}from"./dist-DFI04FfI.js";import{d as In,u as Ln}from"./menu-items-D-vbZmqL.js";import{a as Rn,c as zn,i as Bn,l as Vn,o as Hn,r as Un,s as Wn,u as Gn}from"./config-2Nts63h2.js";import{a as Kn,c as qn,i as Jn,l as Yn,n as Xn,s as Zn,t as Qn}from"./alert-dialog-BsB0FYEL.js";import{a as $n,c as er,d as tr,f as nr,h as rr,i as ir,l as ar,m as or,n as sr,o as cr,p as lr,r as ur,s as dr,t as fr}from"./select-CWHHoM53.js";import{t as pr}from"./circle-CzTMKZwz.js";import{a as mr,c as hr,i as gr,o as _r,p as vr,r as yr,t as br}from"./dropdown-menu-Crx6knLg.js";import{At as xr,B as Sr,Bt as Cr,C as wr,Ct as Tr,Et as Er,F as Dr,G as Or,H as kr,It as Ar,J as jr,K as Mr,L as Nr,M as Pr,N as Fr,P as Ir,Pt as Lr,Q as Rr,R as zr,Rt as Br,S as Vr,St as Hr,Tt as Ur,V as Wr,X as Gr,Y as Kr,Z as qr,_ as Jr,_t as Yr,b as Xr,c as Zr,ct as Qr,d as $r,et as ei,f as ti,ft as ni,g as ri,gt as ii,h as ai,ht as oi,j as si,jt as ci,lt as li,mt as ui,p as di,pt as fi,q as pi,r as mi,st as hi,t as gi,u as _i,vt as vi,w as yi,wt as bi,x as xi,xt as Si,y as Ci,yt as wi,z as Ti,zt as Ei}from"./JsonOutput-BYsq-wE-.js";import{d as Di,l as Oi,n as ki,p as Ai,r as ji}from"./download-DBXnO5qS.js";import{t as Mi}from"./switch-1_rRTvtc.js";import{i as Ni,n as Pi,r as Fi,t as Ii}from"./tabs-Dx9NomUx.js";import{a as Li,i as Ri,n as zi,o as Bi,r as Vi,t as Hi}from"./tooltip-CamoSiGF.js";import{n as Ui,t as Wi}from"./button-qFeU84ax.js";import{t as Gi}from"./createLucideIcon-rHn2EdoM.js";import{i as Ki,n as qi,t as Ji}from"./paths-CzfpItSz.js";import{D as Yi,E as Xi,S as Zi,T as Qi,_ as $i,a as ea,c as ta,d as na,f as ra,g as ia,h as aa,i as oa,l as sa,m as ca,n as la,o as ua,p as da,r as fa,s as pa,t as ma,u as ha,v as ga,w as _a,x as va,y as ya}from"./spec-C09S5bT-.js";import{n as ba,r as xa,t as Sa}from"./fileToBase64-aqhlf6Jj.js";import{t as Ca}from"./LazyAnyLanguageCodeMirror-91eGNw7v.js";import{i as wa,n as Ta,o as Ea}from"./useLifecycle-DKSBdWUf.js";import{a as Da,n as Oa,o as ka,r as Aa,t as ja}from"./useBoolean-C44TyhOc.js";import{a as Ma,r as Na,t as Pa}from"./useNumberFormatter-C4-_TnkF.js";import{t as Fa}from"./chevron-right-DOPs2jx8.js";import{t as Ia}from"./code-xml-CW65k2pN.js";import{t as La}from"./copy-RyCOE8jo.js";import{t as Ra}from"./eye-off-CfkK-QS3.js";import{n as za}from"./file-headphone-DKocX1z0.js";import{r as Ba,t as Va}from"./file-icons-e7tmeyP-.js";import{t as Ha}from"./globe-CmFhHoL1.js";import{C as Ua,S as Wa,x as Ga,y as Ka}from"./write-secret-modal-wFgr-1dA.js";import{n as qa,t as Ja}from"./spinner-CGdRKCnw.js";import{a as Ya,d as Xa,i as Za,o as Qa,t as $a}from"./readonly-python-code-CPhK2DqE.js";import{a as eo,c as to,i as no,l as ro,r as io}from"./glide-utils-BatnVnxk.js";import{t as ao}from"./plus-gbN72xHe.js";import{t as oo}from"./refresh-cw-CEGpOrzd.js";import{i as so,n as co,o as lo,r as uo,t as fo}from"./input-D4bMj5Nb.js";import{t as po}from"./square-function-DyFIOFp5.js";import{a as mo,i as ho,r as go,t as _o}from"./column-preview-D85EX1XE.js";import{t as vo}from"./square-DvOKKLHZ.js";import{t as yo}from"./trash-2-BJG-7Qob.js";import{t as bo}from"./triangle-alert-BeRqoThc.js";import{n as xo,t as So}from"./es-C4LtxVar.js";import{t as Co}from"./use-toast-CC89xOwH.js";import{t as wo}from"./copy-icon-DQuttmjH.js";import{t as To}from"./preload-helper-uBIymjUX.js";import{st as Eo}from"./dist-Cny7_yZb.js";import{d as Do,o as Oo,p as ko,t as Ao}from"./arrays-BqUx5USx.js";import{n as jo,t as Mo}from"./once-Haz_uxEL.js";import{i as No,n as Po,r as Fo,t as Io}from"./strings-LjhpYwmx.js";import{n as Lo}from"./requests-yTHMxhVa.js";import{r as Ro}from"./useTheme-CnWB5G1X.js";import{n as zo,t as Bo}from"./context-BFOBKCJB.js";import{a as Vo,i as Ho,o as Uo,t as Wo}from"./numbers-DyJNv6Vk.js";import{n as Go,r as Ko}from"./useDebounce-DMbg9X18.js";import{n as qo}from"./useAsyncData-DucTwMkf.js";import{n as Jo,r as Yo,t as Xo}from"./dates-Cv2NS8h4.js";import{t as Zo}from"./RenderHTML-ClrDrx3F.js";import{r as Qo}from"./package-data-BwaspaKJ.js";import{n as $o,t as es}from"./api-C5RyTgDk.js";import{a as ts,i as ns,n as rs,r as is,t as as}from"./errors-D9vyuMar.js";import{n as os}from"./markdown-export-DzhB1FrN.js";import{i as ss,r as cs,t as ls}from"./tooltip-BQ9qHrrN.js";import{a as us}from"./react-icons.esm-C6SMwKZH.js";import{a as ds,i as fs,n as ps,t as ms}from"./events-CbeVJ6OD.js";import{n as hs,r as gs,t as _s}from"./alert-MrQXRIin.js";import{n as vs,t as ys}from"./error-banner-EjYF86IQ.js";import{n as bs,t as xs}from"./utils-CaQYvazl.js";import{a as Ss,i as Cs,n as ws,o as Ts,r as Es,t as Ds}from"./table-Dg1KxH-q.js";import{t as Os}from"./renderShortcut-BoDtLl9Q.js";import{t as ks}from"./bundle.esm-CklCb9AD.js";import{n as As}from"./icons-CVdkfEA3.js";import{t as js}from"./useDeepCompareMemoize-DSlTt6u_.js";import{t as Ms}from"./pathUtils-BKesuhdv.js";import{i as Ns,n as Ps,r as Fs}from"./floating-outline-yJVtlHMv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Is={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Ls;Ls||={};var K=e(c(),1),Rs=e(ze(),1),q=bn(),zs=`NavigationMenu`,[Bs,Vs,Hs]=In(zs),[Us,Ws,Gs]=In(zs),[Ks,qs]=jn(zs,[Hs,Gs]),[Js,Ys]=Ks(zs),[Xs,Zs]=Ks(zs),Qs=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:o=200,skipDelayDuration:s=300,orientation:c=`horizontal`,dir:l,...u}=e,[d,f]=K.useState(null),p=It(t,e=>f(e)),m=Ln(l),h=K.useRef(0),g=K.useRef(0),_=K.useRef(0),[v,y]=K.useState(!0),[b,x]=Tn({prop:r,onChange:e=>{let t=e!==``,n=s>0;t?(window.clearTimeout(_.current),n&&y(!1)):(window.clearTimeout(_.current),_.current=window.setTimeout(()=>y(!0),s)),i?.(e)},defaultProp:a??``,caller:zs}),S=K.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(``),150)},[x]),C=K.useCallback(e=>{window.clearTimeout(g.current),x(e)},[x]),w=K.useCallback(e=>{b===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(e)},o)},[b,x,o]);return K.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(_.current)},[]),(0,q.jsx)(tc,{scope:n,isRootMenu:!0,value:b,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:e=>{window.clearTimeout(h.current),v?w(e):C(e)},onTriggerLeave:()=>{window.clearTimeout(h.current),S()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:S,onItemSelect:e=>{x(t=>t===e?``:e)},onItemDismiss:()=>x(``),children:(0,q.jsx)(Cn.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});Qs.displayName=zs;var $s=`NavigationMenuSub`,ec=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=Ys($s,n),[l,u]=Tn({prop:r,onChange:i,defaultProp:a??``,caller:$s});return(0,q.jsx)(tc,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>u(e),onItemSelect:e=>u(e),onItemDismiss:()=>u(``),children:(0,q.jsx)(Cn.div,{"data-orientation":o,...s,ref:t})})});ec.displayName=$s;var tc=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[m,h]=K.useState(null),[g,_]=K.useState(new Map),[v,y]=K.useState(null);return(0,q.jsx)(Js,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:rr(s),baseId:An(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:wn(u),onTriggerLeave:wn(d),onContentEnter:wn(f),onContentLeave:wn(p),onItemSelect:wn(c),onItemDismiss:wn(l),onViewportContentChange:K.useCallback((e,t)=>{_(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:K.useCallback(e=>{_(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,q.jsx)(Bs.Provider,{scope:t,children:(0,q.jsx)(Xs,{scope:t,items:g,children:o})})})},nc=`NavigationMenuList`,rc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ys(nc,n),a=(0,q.jsx)(Cn.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,q.jsx)(Cn.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,q.jsx)(Bs.Slot,{scope:n,children:i.isRootMenu?(0,q.jsx)(Tc,{asChild:!0,children:a}):a})})});rc.displayName=nc;var ic=`NavigationMenuItem`,[ac,oc]=Ks(ic),sc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=An(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=K.useRef(null),c=K.useRef(null),l=K.useRef(null),u=K.useRef(()=>{}),d=K.useRef(!1),f=K.useCallback((e=`start`)=>{if(s.current){u.current();let t=kc(s.current);t.length&&Ac(e===`start`?t:t.reverse())}},[]),p=K.useCallback(()=>{if(s.current){let e=kc(s.current);e.length&&(u.current=jc(e))}},[]);return(0,q.jsx)(ac,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,q.jsx)(Cn.li,{...i,ref:t})})});sc.displayName=ic;var cc=`NavigationMenuTrigger`,lc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=Ys(cc,e.__scopeNavigationMenu),o=oc(cc,e.__scopeNavigationMenu),s=K.useRef(null),c=It(s,o.triggerRef,t),l=Pc(a.baseId,o.value),u=Fc(a.baseId,o.value),d=K.useRef(!1),f=K.useRef(!1),p=o.value===a.value;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Bs.ItemSlot,{scope:n,value:o.value,children:(0,q.jsx)(Oc,{asChild:!0,children:(0,q.jsx)(Cn.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":Nc(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:Sn(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:Sn(e.onPointerMove,Ic(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:Sn(e.onPointerLeave,Ic(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:Sn(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:Sn(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];p&&e.key===t&&(o.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Fn,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:e=>{let t=o.contentRef.current,n=e.relatedTarget,r=n===s.current,i=t?.contains(n);(r||!i)&&o.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,q.jsx)(`span`,{"aria-owns":u})]})]})});lc.displayName=cc;var uc=`NavigationMenuLink`,dc=`navigationMenu.linkSelect`,fc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,q.jsx)(Oc,{asChild:!0,children:(0,q.jsx)(Cn.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:Sn(e.onClick,e=>{let t=e.target,n=new CustomEvent(dc,{bubbles:!0,cancelable:!0});if(t.addEventListener(dc,e=>i?.(e),{once:!0}),xn(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(yc,{bubbles:!0,cancelable:!0});xn(t,e)}},{checkForDefaultPrevented:!1})})})});fc.displayName=uc;var pc=`NavigationMenuIndicator`,mc=K.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ys(pc,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?Rs.createPortal((0,q.jsx)(Nn,{present:n||a,children:(0,q.jsx)(hc,{...r,ref:t})}),i.indicatorTrack):null});mc.displayName=pc;var hc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ys(pc,n),a=Vs(n),[o,s]=K.useState(null),[c,l]=K.useState(null),u=i.orientation===`horizontal`,d=!!i.value;K.useEffect(()=>{let e=a().find(e=>e.value===i.value)?.ref.current;e&&s(e)},[a,i.value]);let f=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return Mc(o,f),Mc(i.indicatorTrack,f),c?(0,q.jsx)(Cn.div,{"aria-hidden":!0,"data-state":d?`visible`:`hidden`,"data-orientation":i.orientation,...r,ref:t,style:{position:`absolute`,...u?{left:0,width:c.size+`px`,transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+`px`,transform:`translateY(${c.offset}px)`},...r.style}}):null}),gc=`NavigationMenuContent`,_c=K.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ys(gc,e.__scopeNavigationMenu),a=oc(gc,e.__scopeNavigationMenu),o=It(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,q.jsx)(vc,{forceMount:n,...c,ref:o}):(0,q.jsx)(Nn,{present:n||s,children:(0,q.jsx)(bc,{"data-state":Nc(s),...c,ref:o,onPointerEnter:Sn(e.onPointerEnter,i.onContentEnter),onPointerLeave:Sn(e.onPointerLeave,Ic(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});_c.displayName=gc;var vc=K.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=Ys(gc,e.__scopeNavigationMenu);return Mn(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Mn(()=>()=>r(e.value),[e.value,r]),null}),yc=`navigationMenu.rootContentDismiss`,bc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=Ys(gc,n),d=K.useRef(null),f=It(d,t),p=Pc(u.baseId,r),m=Fc(u.baseId,r),h=Vs(n),g=K.useRef(null),{onItemDismiss:_}=u;K.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{_(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(yc,t),()=>e.removeEventListener(yc,t)}},[u.isRootMenu,e.value,i,_,s]);let v=K.useMemo(()=>{let e=h().map(e=>e.value);u.dir===`rtl`&&e.reverse();let t=e.indexOf(u.value),n=e.indexOf(u.previousValue),i=r===u.value,a=n===e.indexOf(r);if(!i&&!a)return g.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return g.current=o,o},[u.previousValue,u.value,u.dir,h,r]);return(0,q.jsx)(Tc,{asChild:!0,children:(0,q.jsx)(En,{id:m,"aria-labelledby":p,"data-motion":v,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(yc,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:Sn(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:Sn(e.onPointerDownOutside,e=>{let t=e.target,n=h().some(e=>e.ref.current?.contains(t)),r=u.isRootMenu&&u.viewport?.contains(t);(n||r||!u.isRootMenu)&&e.preventDefault()}),onKeyDown:Sn(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=kc(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);Ac(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:Sn(e.onEscapeKeyDown,e=>{o.current=!0})})})}),xc=`NavigationMenuViewport`,Sc=K.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!Ys(xc,e.__scopeNavigationMenu).value;return(0,q.jsx)(Nn,{present:n||i,children:(0,q.jsx)(Cc,{...r,ref:t})})});Sc.displayName=xc;var Cc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=Ys(xc,n),o=It(t,a.onViewportChange),s=Zs(gc,e.__scopeNavigationMenu),[c,l]=K.useState(null),[u,d]=K.useState(null),f=c?c?.width+`px`:void 0,p=c?c?.height+`px`:void 0,m=!!a.value,h=m?a.value:a.previousValue;return Mc(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,q.jsx)(Cn.div,{"data-state":Nc(m),"data-orientation":a.orientation,...i,ref:o,style:{pointerEvents:!m&&a.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...i.style},onPointerEnter:Sn(e.onPointerEnter,a.onContentEnter),onPointerLeave:Sn(e.onPointerLeave,Ic(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,q.jsx)(Nn,{present:n||i,children:(0,q.jsx)(bc,{...r,ref:Ft(t,e=>{i&&e&&d(e)})})},e)})})}),wc=`FocusGroup`,Tc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ys(wc,n);return(0,q.jsx)(Us.Provider,{scope:n,children:(0,q.jsx)(Us.Slot,{scope:n,children:(0,q.jsx)(Cn.div,{dir:i.dir,...r,ref:t})})})}),Ec=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],Dc=`FocusGroupItem`,Oc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ws(n),a=Ys(Dc,n);return(0,q.jsx)(Us.ItemSlot,{scope:n,children:(0,q.jsx)(Cn.button,{...r,ref:t,onKeyDown:Sn(e.onKeyDown,e=>{if([`Home`,`End`,...Ec].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),Ec.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>Ac(t)),e.preventDefault()}})})})});function kc(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ac(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function jc(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function Mc(e,t){let n=wn(t);Mn(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function Nc(e){return e?`open`:`closed`}function Pc(e,t){return`${e}-trigger-${t}`}function Fc(e,t){return`${e}-content-${t}`}function Ic(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Lc=Qs,Rc=rc,zc=sc,Bc=lc,Vc=fc,Hc=mc,Uc=_c,Wc=Sc,Gc=[`PageUp`,`PageDown`],Kc=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],qc={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},Jc=`Slider`,[Yc,Xc,Zc]=In(Jc),[Qc,$c]=jn(Jc,[Zc]),[el,tl]=Qc(Jc),nl=K.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=K.useRef(new Set),_=K.useRef(0),v=o===`horizontal`?al:ol,[y=[],b]=Tn({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=K.useRef(y);function S(e){T(e,bl(y,e))}function C(e){T(e,_.current)}function w(){let e=x.current[_.current];y[_.current]!==e&&f(y)}function T(e,t,{commit:n}={commit:!1}){let o=Tl(a),s=El(Math.round((e-r)/a)*a+r,o),l=or(s,[r,i]);b((e=[])=>{let r=_l(e,l,t);if(Cl(r,c*a)){_.current=r.indexOf(l);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e})}return(0,q.jsx)(el,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,q.jsx)(Yc.Provider,{scope:e.__scopeSlider,children:(0,q.jsx)(Yc.Slot,{scope:e.__scopeSlider,children:(0,q.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:Sn(h.onPointerDown,()=>{s||(x.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:S,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:w,onHomeKeyDown:()=>!s&&T(r,0,{commit:!0}),onEndKeyDown:()=>!s&&T(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=Gc.includes(e.key)||e.shiftKey&&Kc.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});nl.displayName=Jc;var[rl,il]=Qc(Jc,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),al=K.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=K.useState(null),p=It(t,e=>f(e)),m=K.useRef(void 0),h=Ln(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=wl([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,q.jsx)(rl,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,q.jsx)(sl,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=qc[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),ol=K.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=K.useRef(null),d=It(t,u),f=K.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=wl([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,q.jsx)(rl,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,q.jsx)(sl,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=qc[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),sl=K.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=tl(Jc,n);return(0,q.jsx)(Cn.span,{...l,ref:t,onKeyDown:Sn(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Gc.concat(Kc).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Sn(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:Sn(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Sn(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),cl=`SliderTrack`,ll=K.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=tl(cl,n);return(0,q.jsx)(Cn.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});ll.displayName=cl;var ul=`SliderRange`,dl=K.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=tl(ul,n),a=il(ul,n),o=K.useRef(null),s=It(t,o),c=i.values.length,l=i.values.map(e=>vl(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,q.jsx)(Cn.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})});dl.displayName=ul;var fl=`SliderThumb`,pl=K.forwardRef((e,t)=>{let n=Xc(e.__scopeSlider),[r,i]=K.useState(null),a=It(t,e=>i(e)),o=K.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,q.jsx)(ml,{...e,ref:a,index:o})}),ml=K.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=tl(fl,n),s=il(fl,n),[c,l]=K.useState(null),u=It(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=Pn(c),p=o.values[r],m=p===void 0?0:vl(p,o.min,o.max),h=yl(r,o.values.length),g=f?.[s.size],_=g?xl(g,m,s.direction):0;return K.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,q.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,q.jsx)(Yc.ItemSlot,{scope:e.__scopeSlider,children:(0,q.jsx)(Cn.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:Sn(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,q.jsx)(gl,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});pl.displayName=fl;var hl=`RadioBubbleInput`,gl=K.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=K.useRef(null),a=It(i,r),o=rr(t);return K.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,q.jsx)(Cn.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});gl.displayName=hl;function _l(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function vl(e,t,n){let r=100/(n-t)*(e-t);return or(r,[0,100])}function yl(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function bl(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function xl(e,t,n){let r=e/2;return(r-wl([0,50],[0,r])(t)*n)*n}function Sl(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Cl(e,t){if(t>0){let n=Sl(e);return Math.min(...n)>=t}return!0}function wl(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Tl(e){return(String(e).split(`.`)[1]||``).length}function El(e,t){let n=10**t;return Math.round(e*n)/n}var Dl=nl,Ol=ll,kl=dl,Al=pl,jl=Gi(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Ml=Gi(`arrow-up-wide-narrow`,[[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 16h7`,key:`uosisv`}],[`path`,{d:`M11 20h4`,key:`1krc32`}]]),Nl=Gi(`binary`,[[`rect`,{x:`14`,y:`14`,width:`4`,height:`6`,rx:`2`,key:`p02svl`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`6`,rx:`2`,key:`xm4xkj`}],[`path`,{d:`M6 20h4`,key:`1i6q5t`}],[`path`,{d:`M14 10h4`,key:`ru81e7`}],[`path`,{d:`M6 14h2v6`,key:`16z9wg`}],[`path`,{d:`M14 4h2v6`,key:`1idq9u`}]]),Pl=Gi(`brackets`,[[`path`,{d:`M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3`,key:`1kt8lf`}],[`path`,{d:`M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3`,key:`gduv9`}]]),Fl=Gi(`combine`,[[`path`,{d:`M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`1l7d7l`}],[`path`,{d:`M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`9955pe`}],[`path`,{d:`m7 15 3 3`,key:`4hkfgk`}],[`path`,{d:`m7 21 3-3H5a2 2 0 0 1-2-2v-2`,key:`1xljwe`}],[`rect`,{x:`14`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1cdgtw`}],[`rect`,{x:`3`,y:`3`,width:`7`,height:`7`,rx:`1`,key:`zi3rio`}]]),Il=Gi(`copy-slash`,[[`line`,{x1:`12`,x2:`18`,y1:`18`,y2:`12`,key:`ebkxgr`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Ll=Gi(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),Rl=Gi(`group`,[[`path`,{d:`M3 7V5c0-1.1.9-2 2-2h2`,key:`adw53z`}],[`path`,{d:`M17 3h2c1.1 0 2 .9 2 2v2`,key:`an4l38`}],[`path`,{d:`M21 17v2c0 1.1-.9 2-2 2h-2`,key:`144t0e`}],[`path`,{d:`M7 21H5c-1.1 0-2-.9-2-2v-2`,key:`rtnfgi`}],[`rect`,{width:`7`,height:`5`,x:`7`,y:`7`,rx:`1`,key:`1eyiv7`}],[`rect`,{width:`7`,height:`5`,x:`10`,y:`12`,rx:`1`,key:`1qlmkx`}]]),zl=Gi(`shuffle`,[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]),Bl=Gi(`square-dashed-mouse-pointer`,[[`path`,{d:`M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z`,key:`xwnzip`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M9 3h1`,key:`1yesri`}],[`path`,{d:`M9 21h2`,key:`1qve2z`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M21 9v2`,key:`p14lih`}],[`path`,{d:`M3 14v1`,key:`vnatye`}]]),Vl=Gi(`square-mouse-pointer`,[[`path`,{d:`M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z`,key:`xwnzip`}],[`path`,{d:`M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6`,key:`14rsvq`}]]),Hl=Gi(`triangle`,[[`path`,{d:`M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`,key:`14u9p9`}]]),Ul=e(he(),1),Wl={INSERT:`insert`,DELETE:`delete`,SUBSTITUTE:`substitute`,MATCH:`match`};function Gl(e,t,n){let r=e.length,i=t.length,a=Array.from({length:r+1},()=>Array.from({length:i+1}).fill(0));for(let e=0;e<=r;e++)a[e][0]=e;for(let e=0;e<=i;e++)a[0][e]=e;for(let o=1;o<=r;o++)for(let r=1;r<=i;r++)a[o][r]=n(e[o-1],t[r-1])?a[o-1][r-1]:1+Math.min(a[o-1][r],a[o][r-1],a[o-1][r-1]);let o=[],s=r,c=i;for(;s>0||c>0;)s>0&&c>0&&n(e[s-1],t[c-1])?(o.unshift({type:Wl.MATCH,position:s-1}),s--,c--):s>0&&c>0&&a[s][c]===a[s-1][c-1]+1?(o.unshift({type:Wl.SUBSTITUTE,position:s-1}),s--,c--):s>0&&a[s][c]===a[s-1][c]+1?(o.unshift({type:Wl.DELETE,position:s-1}),s--):c>0&&a[s][c]===a[s][c-1]+1&&(o.unshift({type:Wl.INSERT,position:s}),c--);return{distance:a[r][i],operations:o}}function Kl(e,t,n){let r=[],i=0;for(let a of t)switch(a.type){case Wl.MATCH:r.push(e[i]),i++;break;case Wl.DELETE:i++;break;case Wl.INSERT:r.push(n);break;case Wl.SUBSTITUTE:r.push(n),i++}return r}function ql(e,t,n,r){let i=Gl(e,t,n);return{merged:Kl(e,i.operations,r),edits:i}}var Jl=0,Yl=``;function Xl(e){return e.id?e.id:e.name===`setup`?m:Ie.create()}function Zl(e,t){let n=new Map,r=new Map;if(!e&&!t)return{cellIds:[],sessionCellData:n,notebookCellData:r};if(!e){let e=t?.cells.map(e=>Xl(e))||[];return{cellIds:e,sessionCellData:new Map(e.map((e,t)=>[e,null])),notebookCellData:new Map(e.map((e,n)=>[e,t?.cells[n]||Ql()]))}}if(!t){let t=e.cells.map(e=>Xl(e));return{cellIds:t,sessionCellData:new Map(t.map((t,n)=>[t,e.cells[n]])),notebookCellData:new Map(t.map(e=>[e,Ql()]))}}let{merged:i,edits:a}=ql(e.cells,t.cells,(e,t)=>{let n=e.code_hash;return n?t.code_hash===n:!1},$l());a.distance>0&&W.warn(`Session and notebook have different cells, attempted merge.`);let o=[];for(let e=0;e<t.cells.length;e++){let a=t.cells[e];if(a){let t=Xl(a);o.push(t);let s=i[e]||$l();s.id=t,n.set(t,s),r.set(t,a)}else W.warn(`Merged notebook cell is null at index`,e)}return{cellIds:o,sessionCellData:n,notebookCellData:r}}function Ql(){return{id:Ie.create(),name:Yl,code:Yl,code_hash:null,config:{column:null,disabled:!1,hide_code:!1,expand_output:!1}}}function $l(){return{id:Ie.create(),code_hash:null,console:[],outputs:[]}}function eu(e,t){return{id:e,name:t.name??Yl,code:t.code??Yl,edited:!1,lastCodeRun:null,lastExecutionTime:null,config:{column:t.config?.column??null,disabled:t.config?.disabled??!1,hide_code:t.config?.hide_code??!1,expand_output:t.config?.expand_output??!1},serializedEditorState:null}}function tu(e){let t=Le();if(!e)return t;let n=e.outputs||[],r=n.find(e=>e.type===`data`)||n.find(e=>e.type===`error`)||n[0];if(r){if(r.type===`error`)t.output={channel:`marimo-error`,data:[{type:`unknown`,msg:r.evalue}],mimetype:`application/vnd.marimo+error`,timestamp:Jl};else if(r.type===`data`){let e=Object.keys(r.data)[0];t.output={channel:`output`,data:Object.values(r.data)[0],mimetype:e,timestamp:Jl}}}let i=e.console||[];return{...t,outline:t.output?ve(t.output):null,consoleOutputs:i.map(e=>e.type===`streamMedia`?{channel:`media`,data:e.data,mimetype:e.mimetype,timestamp:Jl}:{channel:e.name===`stderr`?`stderr`:`stdout`,data:e.text,mimetype:e.mimetype??`text/plain`,timestamp:Jl})}}function nu(e,t){let{cellIds:n,sessionCellData:r,notebookCellData:i}=Zl(e,t);if(n.length===0)return null;let a={},o={};for(let e of n){let t=r.get(e),n=i.get(e);n&&(a[e]=eu(e,n)),o[e]=tu(t)}return{cellIds:u.from([n]),cellData:a,cellRuntime:o,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var J=ct(),ru=Object.freeze({left:0,top:0,width:16,height:16}),iu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),au=Object.freeze({...ru,...iu}),ou=Object.freeze({...au,body:``,hidden:!1}),su=Object.freeze({width:null,height:null}),cu=Object.freeze({...su,...iu});function lu(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var uu=/[\s,]+/;function du(e,t){t.split(uu).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}var fu={...cu,preserveAspectRatio:``};function pu(e){let t={...fu},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=lu(n(`rotate`,``)),du(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function mu(e,t){for(let n in fu)if(e[n]!==t[n])return!0;return!1}var hu=/^[a-z0-9]+(-[a-z0-9]+)*$/,gu=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!_u(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!_u(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!_u(e,n)?null:e}return null},_u=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function vu(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function yu(e,t){let n=vu(e,t);for(let r in ou)r in iu?r in e&&!(r in n)&&(n[r]=iu[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function bu(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function xu(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=yu(r[e]||i[e],a)}return o(t),n.forEach(o),yu(e,a)}function Su(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=bu(e);for(let i in r){let a=r[i];a&&(t(i,xu(e,i,a)),n.push(i))}return n}var Cu={provider:``,aliases:{},not_found:{},...ru};function wu(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Tu(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!wu(e,Cu))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!wu(t,ou))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!wu(t,ou))return null}return t}var Eu=Object.create(null);function Du(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ou(e,t){let n=Eu[e]||(Eu[e]=Object.create(null));return n[t]||(n[t]=Du(e,t))}function ku(e,t){return Tu(t)?Su(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Au(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function ju(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(Eu)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(Eu[e]||{})).forEach(t=>{let r=Ou(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var Mu=!1;function Nu(e){return typeof e==`boolean`&&(Mu=e),Mu}function Pu(e){let t=typeof e==`string`?gu(e,!0,Mu):e;if(t){let e=Ou(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function Fu(e,t){let n=gu(e,!0,Mu);if(!n)return!1;let r=Ou(n.provider,n.prefix);return t?Au(r,n.name,t):(r.missing.add(n.name),!0)}function Iu(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Mu&&!t&&!e.prefix){let t=!1;return Tu(e)&&(e.prefix=``,Su(e,(e,n)=>{Fu(e,n)&&(t=!0)})),t}let n=e.prefix;return _u({provider:t,prefix:n,name:`a`})?!!ku(Ou(t,n),e):!1}function Lu(e){return!!Pu(e)}function Ru(e){let t=Pu(e);return t&&{...au,...t}}function zu(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Ou(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Bu(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Vu(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||Bu([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Hu=0;function Uu(e,t,n){let r=Hu++,i=Bu.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}var Wu=Object.create(null);function Gu(e,t){Wu[e]=t}function Ku(e){return Wu[e]||Wu[``]}function qu(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?gu(e,t,n):e;i&&r.push(i)}),r}var Ju={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Yu(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function Xu(e){let t={...Ju,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Yu(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Zu(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var Qu=Object.create(null),$u=[`https://api.simplesvg.com`,`https://api.unisvg.com`],ed=[];$u.length>0;)$u.length===1||Math.random()>.5?ed.push($u.shift()):ed.push($u.pop());Qu[``]=Zu({resources:[`https://api.iconify.design`].concat(ed)});function td(e,t){let n=Zu(t);return n!==null&&(Qu[e]=n,!0)}function nd(e){return Qu[e]}function rd(){return Object.keys(Qu)}function id(){}var ad=Object.create(null);function od(e){if(!ad[e]){let t=nd(e);if(!t)return;ad[e]={config:t,redundancy:Xu(t)}}return ad[e]}function sd(e,t,n){let r,i;if(typeof e==`string`){let t=Ku(e);if(!t)return n(void 0,424),id;i=t.send;let a=od(e);a&&(r=a.redundancy)}else{let t=Zu(e);if(t){r=Xu(t);let n=Ku(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),id):r.query(t,i,n)().abort}function cd(){}function ld(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Vu(e)}))}function ud(e){let t=[],n=[];return e.forEach(e=>{(e.match(hu)?t:n).push(e)}),{valid:t,invalid:n}}function dd(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!ku(e,n).length){r();return}}catch(e){console.error(e)}r(),ld(e)}function fd(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function pd(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){fd(e.loadIcons(r,n,t),t=>{dd(e,r,t)});return}if(i){r.forEach(r=>{fd(i(r,n,t),t=>{dd(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=ud(r);if(o.length&&dd(e,o,null),!a.length)return;let s=n.match(hu)?Ku(t):null;if(!s){dd(e,a,null);return}s.prepare(t,n,a).forEach(n=>{sd(t,n,t=>{dd(e,n.icons,t)})})}))}var md=(e,t)=>{let n=zu(qu(e,!0,Nu()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,cd)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Ou(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Ou(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&pd(e,t)}),t?Uu(t,n,i):cd},hd=e=>new Promise((t,n)=>{let r=typeof e==`string`?gu(e,!0):e;if(!r){n(e);return}md([r||e],i=>{if(i.length&&r){let e=Pu(r);if(e){t({...au,...e});return}}n(e)})});function gd(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function _d(e,t){if(typeof e==`object`)return{data:gd(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=gd(e);if(t)return{data:t,value:e}}let n=gu(e,!0,!0);if(!n)return{value:e};let r=Pu(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:md([n],()=>t(e,n,Pu(n)))}}var vd=!1;try{vd=navigator.vendor.indexOf(`Apple`)===0}catch{}function yd(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(vd||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var bd=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xd=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Sd(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(bd);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=xd.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Cd(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function wd(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Td(e,t,n){let r=Cd(e);return wd(r.defs,t+r.content+n)}var Ed=e=>e===`unset`||e===`undefined`||e===`none`;function Dd(e,t){let n={...au,...e},r={...cu,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Td(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Sd(d,c/l)):(u=o===`auto`?c:o,d=s===null?Sd(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{Ed(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}function Od(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function kd(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function Ad(e){return`data:image/svg+xml,`+kd(e)}function jd(e){return`url("`+Ad(e)+`")`}var Md=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Nd(e){Md=e}function Pd(){return Md}function Fd(e,t){let n=nd(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Id(e){return e===404}var Ld=(e,t,n)=>{let r=[],i=Fd(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Rd(e){if(typeof e==`string`){let t=nd(e);if(t)return t.path}return`/`}var zd={prepare:Ld,send:(e,t,n)=>{if(!Md){n(`abort`,424);return}let r=Rd(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Md(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Id(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Bd(e,t,n){Ou(n||``,t).loadIcons=e}function Vd(e,t,n){Ou(n||``,t).loadIcon=e}var Hd=`data-style`,Ud=``;function Wd(e){Ud=e}function Gd(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Hd));n||(n=document.createElement(`style`),n.setAttribute(Hd,Hd),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+Ud}function Kd(){Gu(``,zd),Nu(!0);let e;try{e=window}catch{}if(e){if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!Iu(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;td(e,r)||console.error(n)}catch{console.error(n)}}}}return{enableCache:e=>{},disableCache:e=>{},iconLoaded:Lu,iconExists:Lu,getIcon:Ru,listIcons:ju,addIcon:Fu,addCollection:Iu,calculateSize:Sd,buildIcon:Dd,iconToHTML:Od,svgToURL:jd,loadIcons:md,loadIcon:hd,addAPIProvider:td,setCustomIconLoader:Vd,setCustomIconsLoader:Bd,appendCustomStyle:Wd,_api:{getAPIConfig:nd,setAPIModule:Gu,sendAPIQuery:sd,setFetch:Nd,getFetch:Pd,listAPIProviders:rd}}}var qd={"background-color":`currentColor`},Jd={"background-color":`transparent`},Yd={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},Xd={"-webkit-mask":qd,mask:qd,background:Jd};for(let e in Xd){let t=Xd[e];for(let n in Yd)t[e+`-`+n]=Yd[n]}function Zd(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function Qd(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=jd(Od(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:Zd(a.width),height:Zd(a.height),...n?qd:Jd};for(let e in c)s.setProperty(e,c[e]);return r}var $d;function ef(){try{$d=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{$d=null}}function tf(e){return $d===void 0&&ef(),$d?$d.createHTML(e):e}function nf(e){let t=document.createElement(`span`),n=e.attributes,r=``;return n.width||(r=`width: inherit;`),n.height||(r+=`height: inherit;`),r&&(n.style=r),t.innerHTML=tf(Od(e.body,n)),t.firstChild}function rf(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function af(e,t){let n=t.icon.data,r=t.customisations,i=Dd(n,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);let a=t.renderedMode,o;switch(a){case`svg`:o=nf(i);break;default:o=Qd(i,{...au,...n},a===`mask`)}let s=rf(e);s?o.tagName===`SPAN`&&s.tagName===o.tagName?s.setAttribute(`style`,o.getAttribute(`style`)):e.replaceChild(o,s):e.appendChild(o)}function of(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function sf(e=`iconify-icon`){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;let r=t.get(e);if(r)return r;let i=[`icon`,`mode`,`inline`,`noobserver`,`width`,`height`,`rotate`,`flip`],a=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;_connected=!1;_observer=null;_visible=!0;constructor(){super();let e=this._shadowRoot=this.attachShadow({mode:`open`}),t=this.hasAttribute(`inline`);Gd(e,t),this._state=of({value:``},t),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(e){switch(e){case`inline`:{let e=this.hasAttribute(`inline`),t=this._state;e!==t.inline&&(t.inline=e,Gd(this._shadowRoot,e));break}case`noobserver`:this.hasAttribute(`noobserver`)?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let e=this.getAttribute(`icon`);if(e&&e.slice(0,1)===`{`)try{return JSON.parse(e)}catch{}return e}set icon(e){typeof e==`object`&&(e=JSON.stringify(e)),this.setAttribute(`icon`,e)}get inline(){return this.hasAttribute(`inline`)}set inline(e){e?this.setAttribute(`inline`,`true`):this.removeAttribute(`inline`)}get observer(){return this.hasAttribute(`observer`)}set observer(e){e?this.setAttribute(`observer`,`true`):this.removeAttribute(`observer`)}restartAnimation(){let e=this._state;if(e.rendered){let t=this._shadowRoot;if(e.renderedMode===`svg`)try{t.lastChild.setCurrentTime(0);return}catch{}af(t,e)}}get status(){let e=this._state;return e.rendered?`rendered`:e.icon.data===null?`failed`:`loading`}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let e=this._state,t=this.getAttribute(`icon`);if(t!==e.icon.value){this._iconChanged(t);return}if(!e.rendered||!this._visible)return;let n=this.getAttribute(`mode`),r=pu(this);(e.attrMode!==n||mu(e.customisations,r)||!rf(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=_d(e,(e,t,n)=>{let r=this._state;if(r.rendered||this.getAttribute(`icon`)!==e)return;let i={value:e,name:t,data:n};i.data?this._gotIconData(i):r.icon=i});t.data?this._gotIconData(t):this._state=of(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=rf(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,pu(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=yd(e.data.body,n),i=this._state.inline;af(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:t,attrMode:n,renderedMode:r})}startObserver(){if(!this._observer&&!this.hasAttribute(`noobserver`))try{this._observer=new IntersectionObserver(e=>{let t=e.some(e=>e.isIntersecting);t!==this._visible&&(this._visible=t,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(e=>{e in a.prototype||Object.defineProperty(a.prototype,e,{get:function(){return this.getAttribute(e)},set:function(t){t===null?this.removeAttribute(e):this.setAttribute(e,t)}})});let o=Kd();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{enableCache:cf,disableCache:lf,iconLoaded:uf,iconExists:df,getIcon:ff,listIcons:pf,addIcon:mf,addCollection:hf,calculateSize:gf,buildIcon:_f,iconToHTML:vf,svgToURL:yf,loadIcons:bf,loadIcon:xf,setCustomIconLoader:Sf,setCustomIconsLoader:Cf,addAPIProvider:wf,_api:Tf}=sf()||Kd(),Ef=()=>((0,J.c)(1),null),Df=(0,K.memo)(e=>{let t=(0,J.c)(3),{children:n}=e,{theme:r}=Ro(),i,a;return t[0]===r?(i=t[1],a=t[2]):(i=()=>(document.body.classList.add(r,`${r}-theme`),document.body.dataset.theme=r,()=>{document.body.classList.remove(r,`${r}-theme`),delete document.body.dataset.theme}),a=[r],t[0]=r,t[1]=i,t[2]=a),(0,K.useLayoutEffect)(i,a),n});Df.displayName=`ThemeProvider`;var Of=e=>{let t=(0,J.c)(3),{variables:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,q.jsx)(`div`,{className:`contents`,style:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},kf=e=>{let t=(0,J.c)(30),{isOpen:n,onClose:r,traceback:i,errorMessage:a}=e,o;t[0]===i?o=t[1]:(o=async()=>{let e=document.createElement(`div`);e.innerHTML=Ae(i);let t=e.textContent||e.innerText||``;try{await navigator.clipboard.writeText(t),Co({title:`Copied to clipboard`,description:`Traceback has been copied to your clipboard.`})}catch{Co({title:`Failed to copy`,description:`Could not copy to clipboard.`,variant:`danger`})}},t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=e=>!e&&r(),t[2]=r,t[3]=c);let l;t[4]===a?l=t[5]:(l=(0,q.jsx)(Yn,{className:`text-destructive`,children:a}),t[4]=a,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,q.jsx)(Kn,{children:`Click the traceback to select and copy.`}),t[6]=u):u=t[6];let d;t[7]===l?d=t[8]:(d=(0,q.jsxs)(qn,{children:[l,u]}),t[7]=l,t[8]=d);let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,q.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:`Traceback`}),t[9]=f):f=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(La,{className:`h-3 w-3`}),t[10]=p):p=t[10];let m;t[11]===s?m=t[12]:(m=(0,q.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[f,(0,q.jsxs)(Wi,{variant:`outline`,size:`xs`,onClick:s,className:`flex items-center gap-1`,children:[p,`Copy`]})]}),t[11]=s,t[12]=m);let h;t[13]===i?h=t[14]:(h=Zo({html:i}),t[13]=i,t[14]=h);let g;t[15]===h?g=t[16]:(g=(0,q.jsx)(`div`,{className:`font-code text-sm p-4 bg-muted rounded border overflow-auto max-h-[50vh] cursor-text select-text`,children:h}),t[15]=h,t[16]=g);let _;t[17]!==g||t[18]!==m?(_=(0,q.jsxs)(`div`,{className:`my-4 overflow-auto`,children:[m,g]}),t[17]=g,t[18]=m,t[19]=_):_=t[19];let v;t[20]===r?v=t[21]:(v=(0,q.jsx)(Zn,{children:(0,q.jsx)(Xn,{onClick:r,children:`Close`})}),t[20]=r,t[21]=v);let y;t[22]!==_||t[23]!==v||t[24]!==d?(y=(0,q.jsxs)(Jn,{className:`max-w-4xl max-h-[80vh]`,children:[d,_,v]}),t[22]=_,t[23]=v,t[24]=d,t[25]=y):y=t[25];let b;return t[26]!==n||t[27]!==y||t[28]!==c?(b=(0,q.jsx)(Qn,{open:n,onOpenChange:c,children:y}),t[26]=n,t[27]=y,t[28]=c,t[29]=b):b=t[29],b},Af=()=>{let e=(0,J.c)(6),[t,r]=n(te);if(!t)return null;let i;e[0]===r?i=e[1]:(i=()=>r(null),e[0]=r,e[1]=i);let a;return e[2]!==i||e[3]!==t.errorMessage||e[4]!==t.traceback?(a=(0,q.jsx)(kf,{isOpen:!0,onClose:i,traceback:t.traceback,errorMessage:t.errorMessage}),e[2]=i,e[3]=t.errorMessage,e[4]=t.traceback,e[5]=a):a=e[5],a},jf=e=>{let t=(0,J.c)(5),{children:n}=e,i=r(yt),a;t[0]===i?a=t[1]:(a=bi(i),t[0]=i,t[1]=a);let o;return t[2]!==n||t[3]!==a?(o=(0,q.jsx)(zo,{locale:a,children:n}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o},Mf=Da(()=>To(()=>import(`./home-page-Dnv5d4Ek.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]),import.meta.url)),Nf=Da(()=>To(()=>import(`./run-page-aOAuHEMH.js`),__vite__mapDeps([135,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,136,75,76,77,78,79,80,137,89,138,116,117,139,140,94,95,96,141,142,143,144,145,98,102,146,147,115,148,86,149,150,151,152,121,122,153,154,123,155,131,132,133,156,157,158,159,160,87,105,161,162,88,163,164,124,165,166,167,168,169,110,170,171,114,172,120,173,174,175,176,177,101,178,179,180,181,125,182,119,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,92]),import.meta.url)),Pf=Da(()=>To(()=>import(`./edit-page-c6SDPEIh.js`),__vite__mapDeps([296,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,109,110,111,112,113,114,115,104,79,80,116,117,77,102,96,118,78,119,120,89,121,122,123,88,124,125,126,127,171,75,76,136,137,138,139,140,94,95,141,142,143,144,145,98,146,147,148,86,149,150,151,152,153,154,155,131,132,133,156,157,158,159,160,87,105,161,162,163,164,165,166,175,176,177,101,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,167,297,298,299,85,90,300,301,302,303,304,83,305,84,306,91,295,128,307,173,308,309,310,311,312,313,92,93,314,134,315,316,107,172,317,318,99,100,319,320,290,321,322,323,292,129,130,324,325,168,169,170,174,289,291,293,294,108,326,327,328,329,330,331,332,333,334,335,336,337,338]),import.meta.url)),Ff=Da(()=>To(()=>import(`./gallery-page-D70P7AOr.js`),__vite__mapDeps([339,1,3,4,20,2,15,16,17,18,19,75,6,23,24,25,36,26,27,33,32,34,37,30,44,28,45,46,47,48,8,9,10,11,49,76,31,77,78,54,38,81,79,35,80,82,83,84,85,86,50,87,88,43,89,7,90,91,92,93,102,72,127]),import.meta.url));function If(e){switch(e){case`home`:Mf.preload();break;case`gallery`:Ff.preload();break;case`read`:Nf.preload();break;default:Pf.preload()}}var Lf=(0,K.memo)(()=>{let e=(0,J.c)(12),[t]=dt(),[n]=gt(),r;e[0]===t.display.code_editor_font_size?r=e[1]:(r=zf(t.display.code_editor_font_size),e[0]=t.display.code_editor_font_size,e[1]=r);let i=r,a;e[2]!==n||e[3]!==t?(a=()=>{let e=Xt();return e===`home`?(0,q.jsx)(Mf.Component,{}):e===`gallery`?(0,q.jsx)(Ff.Component,{}):e===`read`?(0,q.jsx)(Nf.Component,{appConfig:n}):(0,q.jsx)(Pf.Component,{userConfig:t,appConfig:n})},e[2]=n,e[3]=t,e[4]=a):a=e[4];let o=a,s;e[5]===i?s=e[6]:(s={"--marimo-code-editor-font-size":i},e[5]=i,e[6]=s);let c;e[7]===o?c=e[8]:(c=(0,q.jsx)(jf,{children:o()}),e[7]=o,e[8]=c);let l;return e[9]!==s||e[10]!==c?(l=(0,q.jsx)(Rf,{children:(0,q.jsx)(Of,{variables:s,children:c})}),e[9]=s,e[10]=c,e[11]=l):l=e[11],l});Lf.displayName=`MarimoApp`;var Rf=(0,K.memo)(e=>{let t=(0,J.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsx)(_n,{}),i=(0,q.jsx)(Ef,{}),a=(0,q.jsx)(Af,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,q.jsx)(vn,{children:(0,q.jsx)(K.Suspense,{children:(0,q.jsx)(Ri,{children:(0,q.jsx)(Er,{controller:Tr,children:(0,q.jsx)(jf,{children:(0,q.jsxs)(Ka,{children:[n,r,i,a]})})})})})}),t[3]=n,t[4]=o),o});Rf.displayName=`Providers`;function zf(e){return`${e/16}rem`}function Bf(){Yt(e=>{e.delete(Bt.accessToken)})}var Vf={sendComponentValues:`startConnection`,sendModelValue:`startConnection`,sendInstantiate:`startConnectionWithoutKernel`,sendRun:`startConnection`,sendDeleteCell:`startConnection`,sendRunScratchpad:`startConnection`,saveAppConfig:`startConnection`,saveCellConfig:`startConnection`,discoverDataSources:`startConnection`,exportAsHTML:`startConnection`,exportAsIPYNB:`startConnection`,exportAsMarkdown:`startConnection`,exportAsScript:`startConnection`,exportAsPDF:`startConnection`,readCode:`startConnection`,sendCopy:`throwError`,sendFormat:`throwError`,sendRestart:`throwError`,sendSave:`waitForConnectionOpen`,invokeAiTool:`waitForConnectionOpen`,sendFunctionRequest:`waitForConnectionOpen`,sendRename:`waitForConnectionOpen`,autoExportAsHTML:`waitForConnectionOpen`,autoExportAsMarkdown:`waitForConnectionOpen`,autoExportAsIPYNB:`waitForConnectionOpen`,updateCellOutputs:`waitForConnectionOpen`,listSecretKeys:`throwError`,writeSecret:`throwError`,clearCache:`throwError`,getCacheInfo:`throwError`,saveUserConfig:`throwError`,sendShutdown:`throwError`,getPackageList:`throwError`,getSandbox:`serverOnly`,updateManifest:`serverOnly`,syncSandbox:`serverOnly`,getDependencyTree:`throwError`,addPackage:`throwError`,removePackage:`throwError`,getFileRoots:`startConnection`,sendListFiles:`startConnection`,sendSearchFiles:`startConnection`,sendCreateFileOrFolder:`throwError`,sendDeleteFileOrFolder:`throwError`,sendCopyFileOrFolder:`throwError`,sendRenameFileOrFolder:`throwError`,sendUpdateFile:`throwError`,sendFileDetails:`throwError`,openFile:`throwError`,getEnvironmentInfo:`serverOnly`,getExportAvailability:`serverOnly`,installExportRequirements:`startConnectionWithoutKernel`,getRecentFiles:`startConnection`,getWorkspaceFiles:`startConnection`,getRunningNotebooks:`startConnection`,shutdownSession:`startConnection`,openTutorial:`startConnection`,getUsageStats:`waitForConnectionOpen`,sendStdin:`waitForConnectionOpen`,sendInterrupt:`waitForConnectionOpen`,sendPdb:`waitForConnectionOpen`,sendSetBreakpoints:`waitForConnectionOpen`,sendInstallMissingPackages:`waitForConnectionOpen`,readSnippets:`waitForConnectionOpen`,previewDatasetColumn:`waitForConnectionOpen`,previewSQLTable:`waitForConnectionOpen`,previewSQLTableList:`waitForConnectionOpen`,previewSQLSchemaList:`waitForConnectionOpen`,previewDataSourceConnection:`waitForConnectionOpen`,validateSQL:`waitForConnectionOpen`,listStorageEntries:`waitForConnectionOpen`,downloadStorage:`waitForConnectionOpen`,sendDocumentTransaction:`waitForConnectionOpen`,sendCodeCompletionRequest:`waitForConnectionOpen`};function Hf(e,t){let n=Mo(async e=>{a.set(nn,{state:tn.CONNECTING}),await e.init()});function r(e,r){let i=Vf[r];return(async(...a)=>{let o=t();if(!o.isLazy)return e(...a);switch(i){case`serverOnly`:return e(...a);case`dropRequest`:W.debug(`Dropping request: ${r}, since not connected to a kernel.`);return;case`throwError`:throw new ns;case`waitForConnectionOpen`:return await en(),await mn(),e(...a);case`startConnectionWithoutKernel`:case`startConnection`:return await n(o),await en(),i===`startConnection`&&await mn(),e(...a);default:throw Error(`Unknown action for "${r}"`)}})}return Rt.mapValues(e,(e,t)=>r(e,t))}var Uf=`download`;function Wf(){let e=a.get(Re);if(!e)return;let t=qi.basename(e);return Di.withoutExtension(t)}function Gf(e){let t=Wf();return t?`${t}.${e}`:`${Uf}.${e}`}function Kf(e){let t=os[e??`pymdown`];return Gf(t)}function qf(e){return{body:e,bodySerializer:e=>e}}var{handleExportResponse:Jf,handleResponse:Yf,handleResponseReturnNull:Xf}=es;function Zf(){let e=jo(()=>{let e=sn();return $o(e)}),t=()=>sn().sessionHeaders(),n=()=>({header:t()});return{sendComponentValues:t=>e().POST(`/api/kernel/set_ui_element_value`,{body:t,params:n()}).then(Xf),sendModelValue:t=>e().POST(`/api/kernel/set_model_value`,{body:t,params:n()}).then(Xf),sendRestart:()=>e().POST(`/api/kernel/restart_session`,{params:n()}).then(Xf),sendDocumentTransaction:async t=>(await en(),e().POST(`/api/document/transaction`,{body:t,params:n()}).then(Xf)),sendRename:t=>e().POST(`/api/kernel/rename`,{body:t,params:n()}).then(Xf),sendSave:t=>e().POST(`/api/kernel/save`,{body:t,parseAs:`text`,params:n()}).then(Xf),sendCopy:t=>e().POST(`/api/kernel/copy`,{body:t,parseAs:`text`,params:n()}).then(Xf),sendFormat:t=>e().POST(`/api/kernel/format`,{body:t}).then(Yf),sendInterrupt:()=>e().POST(`/api/kernel/interrupt`,{params:n()}).then(Xf),sendShutdown:()=>e().POST(`/api/kernel/shutdown`).then(Xf),sendRun:async t=>(await en(),e().POST(`/api/kernel/run`,{body:t,params:n()}).then(Xf)),sendRunScratchpad:async t=>(await en(),e().POST(`/api/kernel/scratchpad/run`,{body:t,params:n()}).then(Xf)),sendInstantiate:async t=>(await en(),e().POST(`/api/kernel/instantiate`,{body:t,params:n()}).then(Xf)),sendDeleteCell:t=>e().POST(`/api/kernel/delete`,{body:t,params:n()}).then(Xf),sendCodeCompletionRequest:async t=>(await en(),e().POST(`/api/kernel/code_autocomplete`,{body:t,params:n()}).then(Xf)),saveUserConfig:t=>e().POST(`/api/kernel/save_user_config`,{body:t}).then(Xf),saveAppConfig:t=>e().POST(`/api/kernel/save_app_config`,{body:t,parseAs:`text`,params:n()}).then(Xf),saveCellConfig:t=>e().POST(`/api/kernel/set_cell_config`,{body:t,params:n()}).then(Xf),sendFunctionRequest:t=>e().POST(`/api/kernel/function_call`,{body:t,params:n()}).then(Xf),sendStdin:t=>e().POST(`/api/kernel/stdin`,{body:t,params:n()}).then(Xf),sendInstallMissingPackages:t=>e().POST(`/api/kernel/install_missing_packages`,{body:t,params:n()}).then(Xf),readCode:async()=>(await en(),e().POST(`/api/kernel/read_code`,{params:n()}).then(Yf)),readSnippets:async()=>(await en(),e().GET(`/api/documentation/snippets`,{params:n()}).then(Yf)),previewDatasetColumn:t=>e().POST(`/api/datasources/preview_column`,{body:t,params:n()}).then(Xf),previewSQLTable:t=>e().POST(`/api/datasources/preview_sql_table`,{body:t,params:n()}).then(Xf),previewSQLTableList:t=>e().POST(`/api/datasources/preview_sql_table_list`,{body:t,params:n()}).then(Xf),previewSQLSchemaList:t=>e().POST(`/api/datasources/preview_sql_schema_list`,{body:t,params:n()}).then(Xf),previewDataSourceConnection:t=>e().POST(`/api/datasources/preview_datasource_connection`,{body:t,params:n()}).then(Xf),discoverDataSources:t=>e().POST(`/api/datasources/discover`,{body:t,params:n()}).then(Xf),validateSQL:t=>e().POST(`/api/sql/validate`,{body:t,params:n()}).then(Xf),openFile:async t=>(await en(),await e().POST(`/api/files/open`,{body:t}).then(Xf),null),getUsageStats:async()=>(await en(),e().GET(`/api/usage`).then(Yf)),getEnvironmentInfo:()=>e().GET(`/api/environment`).then(Yf),sendPdb:t=>e().POST(`/api/kernel/pdb/pm`,{body:t,params:n()}).then(Xf),sendSetBreakpoints:t=>e().POST(`/api/kernel/pdb/breakpoints`,{body:t,params:n()}).then(Xf),getFileRoots:async()=>(await en(),e().GET(`/api/files/roots`).then(Yf)),sendListFiles:async t=>(await en(),e().POST(`/api/files/list_files`,{body:t}).then(Yf)),sendSearchFiles:async t=>(await en(),e().POST(`/api/files/search`,{body:t}).then(Yf)),sendCreateFileOrFolder:async t=>{await en();let n=new FormData;return n.append(`path`,t.path),n.append(`type`,t.type),n.append(`name`,t.name),t.file&&n.append(`file`,t.file,t.name),e().POST(`/api/files/create`,qf(n)).then(Yf)},sendDeleteFileOrFolder:async t=>e().POST(`/api/files/delete`,{body:t}).then(Yf),sendCopyFileOrFolder:async t=>e().POST(`/api/files/copy`,{body:t}).then(Yf),sendRenameFileOrFolder:async t=>e().POST(`/api/files/move`,{body:t}).then(Yf),sendUpdateFile:async t=>(await en(),e().POST(`/api/files/update`,{body:t}).then(Yf)),sendFileDetails:async t=>(await en(),e().POST(`/api/files/file_details`,{body:t}).then(Yf)),openTutorial:t=>e().POST(`/api/home/tutorial/open`,{body:t}).then(Yf),getRecentFiles:()=>e().POST(`/api/home/recent_files`).then(Yf),getWorkspaceFiles:t=>e().POST(`/api/home/workspace_files`,{body:t}).then(Yf),getRunningNotebooks:()=>e().POST(`/api/home/running_notebooks`).then(Yf),shutdownSession:t=>e().POST(`/api/home/shutdown_session`,{body:t}).then(Yf),getExportAvailability:()=>e().GET(`/api/export/availability`).then(Yf),installExportRequirements:t=>e().POST(`/api/export/requirements/install`,{body:t,params:n()}).then(Yf),exportAsHTML:async t=>e().POST(`/api/export/html`,{body:Mt(t),parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`html`)})),exportAsMarkdown:async t=>e().POST(`/api/export/markdown`,{body:t,parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Kf(t.flavor)})),exportAsScript:async t=>e().POST(`/api/export/script`,{body:t,parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`script.py`)})),exportAsIPYNB:async t=>e().POST(`/api/export/ipynb`,{body:t,parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`ipynb`)})),exportAsPDF:async t=>e().POST(`/api/export/pdf`,{body:t,parseAs:`blob`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`pdf`)})),autoExportAsHTML:async t=>e().POST(`/api/export/auto_export/html`,{body:t,params:n()}).then(Xf),autoExportAsMarkdown:async t=>e().POST(`/api/export/auto_export/markdown`,{body:t,params:n()}).then(Xf),autoExportAsIPYNB:async t=>e().POST(`/api/export/auto_export/ipynb`,{body:t,params:n()}).then(Xf),updateCellOutputs:async t=>e().POST(`/api/export/update_cell_outputs`,{body:t,params:n()}).then(Xf),getSandbox:t=>e().POST(`/api/packages/sandbox`,{body:t,params:n()}).then(Yf),updateManifest:t=>e().POST(`/api/packages/manifest`,{body:t,params:n()}).then(Yf),syncSandbox:t=>e().POST(`/api/packages/sync`,{body:t,params:n()}).then(Yf),addPackage:t=>e().POST(`/api/packages/add`,{body:t}).then(Yf),removePackage:t=>e().POST(`/api/packages/remove`,{body:t}).then(Yf),getPackageList:async()=>(await Zt(),e().GET(`/api/packages/list`).then(Yf)),getDependencyTree:async()=>(await Zt(),e().GET(`/api/packages/tree`).then(Yf)),listSecretKeys:async t=>(await en(),e().POST(`/api/secrets/keys`,{body:t,params:n()}).then(Xf)),writeSecret:async t=>e().POST(`/api/secrets/create`,{body:t,params:n()}).then(Xf),invokeAiTool:async t=>e().POST(`/api/ai/invoke_tool`,{body:t,params:n()}).then(Yf),clearCache:async()=>e().POST(`/api/cache/clear`,{body:{},params:n()}).then(Xf),getCacheInfo:async()=>e().POST(`/api/cache/info`,{body:{},params:n()}).then(Xf),listStorageEntries:t=>e().POST(`/api/storage/list_entries`,{body:t,params:n()}).then(Xf),downloadStorage:t=>e().POST(`/api/storage/download`,{body:t,params:n()}).then(Xf)}}var Qf=`static-notebook`;function $f(){Co({id:Qf,once:!0,title:`Static notebook`,description:`This notebook is not connected to a kernel. Any interactive elements will not work.`})}function ep(){let e=()=>{throw Error(`Unreachable. Expected to be in run mode`)};return{sendComponentValues:async()=>($f(),W.log(`Updating UI elements is not supported in static mode`),null),sendModelValue:async()=>(W.log(`Updating model values is not supported in static mode`),null),sendInstantiate:async()=>(W.log(`Viewing as static notebook`),null),sendFunctionRequest:async()=>($f(),W.log(`Function requests are not supported in static mode`),null),sendRestart:e,sendDocumentTransaction:e,sendRun:e,sendRunScratchpad:e,sendRename:e,sendSave:e,sendCopy:e,sendInterrupt:e,sendShutdown:e,sendFormat:e,sendDeleteCell:e,sendCodeCompletionRequest:e,saveUserConfig:e,saveAppConfig:e,saveCellConfig:e,sendStdin:e,readCode:e,readSnippets:e,previewDatasetColumn:e,previewSQLTable:e,previewSQLTableList:e,previewSQLSchemaList:e,previewDataSourceConnection:e,discoverDataSources:e,validateSQL:e,openFile:e,getUsageStats:e,getEnvironmentInfo:e,getFileRoots:e,sendListFiles:e,sendSearchFiles:e,sendPdb:e,sendSetBreakpoints:e,sendCreateFileOrFolder:e,sendDeleteFileOrFolder:e,sendCopyFileOrFolder:e,sendRenameFileOrFolder:e,sendUpdateFile:e,sendFileDetails:e,openTutorial:e,sendInstallMissingPackages:e,getRecentFiles:e,getWorkspaceFiles:e,getRunningNotebooks:e,shutdownSession:e,getExportAvailability:e,installExportRequirements:e,exportAsHTML:e,exportAsIPYNB:e,exportAsMarkdown:e,exportAsScript:e,exportAsPDF:e,autoExportAsHTML:e,autoExportAsMarkdown:e,autoExportAsIPYNB:e,updateCellOutputs:e,addPackage:e,removePackage:e,getPackageList:e,getSandbox:e,updateManifest:e,syncSandbox:e,getDependencyTree:e,listSecretKeys:e,writeSecret:e,invokeAiTool:e,clearCache:e,getCacheInfo:e,listStorageEntries:e,downloadStorage:e}}function tp(e){let t={sendComponentValues:`Failed update value`,sendModelValue:`Failed to update model value`,sendInstantiate:`Failed to instantiate`,sendFunctionRequest:`Failed to send function request`,sendRestart:`Failed to restart`,sendDocumentTransaction:`Failed to sync document transaction`,sendRun:`Failed to run`,sendRunScratchpad:`Failed to run scratchpad`,sendRename:`Failed to rename`,sendSave:`Failed to save`,sendCopy:`Failed to copy`,sendInterrupt:`Failed to interrupt`,sendShutdown:`Failed to shutdown`,sendFormat:`Failed to format`,sendDeleteCell:`Failed to delete cell`,sendCodeCompletionRequest:`Failed to complete code`,saveUserConfig:`Failed to save user config`,saveAppConfig:`Failed to save app config`,saveCellConfig:`Failed to save cell config`,sendStdin:`Failed to send stdin`,readCode:`Failed to read code`,readSnippets:`Failed to fetch snippets`,previewDatasetColumn:`Failed to fetch data sources`,previewSQLTable:`Failed to fetch SQL table`,previewSQLTableList:`Failed to fetch SQL table list`,previewSQLSchemaList:`Failed to fetch SQL schema list`,previewDataSourceConnection:`Failed to preview data source connection`,discoverDataSources:`Failed to discover data sources`,validateSQL:`Failed to validate SQL`,openFile:`Failed to open file`,getUsageStats:``,getEnvironmentInfo:``,getFileRoots:``,sendListFiles:`Failed to list files`,sendSearchFiles:``,sendPdb:`Failed to start debug session`,sendSetBreakpoints:``,sendCreateFileOrFolder:`Failed to create file or folder`,sendDeleteFileOrFolder:`Failed to delete file or folder`,sendCopyFileOrFolder:`Failed to duplicate file or folder`,sendRenameFileOrFolder:`Failed to rename file or folder`,sendUpdateFile:`Failed to update file`,sendFileDetails:`Failed to get file details`,openTutorial:`Failed to open tutorial`,sendInstallMissingPackages:`Failed to install missing packages`,getRecentFiles:`Failed to get recent files`,getWorkspaceFiles:`Failed to get workspace files`,getRunningNotebooks:`Failed to get running notebooks`,shutdownSession:`Failed to shutdown session`,getExportAvailability:``,installExportRequirements:`Failed to install export requirements`,exportAsHTML:`Failed to export HTML`,exportAsIPYNB:`Failed to export ipynb`,exportAsMarkdown:`Failed to export Markdown`,exportAsScript:`Failed to export Script`,exportAsPDF:`Failed to export PDF`,autoExportAsHTML:``,autoExportAsMarkdown:``,autoExportAsIPYNB:``,updateCellOutputs:``,addPackage:`Failed to add package`,removePackage:`Failed to remove package`,getPackageList:`Failed to get package list`,getSandbox:``,updateManifest:``,syncSandbox:``,getDependencyTree:`Failed to get dependency tree`,listSecretKeys:`Failed to fetch secrets`,writeSecret:`Failed to write secret`,invokeAiTool:`Failed to invoke AI tool`,clearCache:`Failed to clear cache`,getCacheInfo:``,listStorageEntries:`Failed to list storage entries`,downloadStorage:`Failed to download storage entry`},n={};for(let[r,i]of Object.entries(e)){let e=r;n[e]=async(...n)=>{try{return await i(...n)}catch(n){if(n instanceof ns){if(a.get(un))return;let e=Co({title:`Kernel Not Connected`,description:`You need to connect to a kernel to perform this action.`,variant:`default`,action:(0,q.jsx)(np,{onConnect:()=>e.dismiss()})});throw W.error(`Failed to handle request: ${r}`,n),n}if(n instanceof is&&n.status===403)throw W.warn(`Request refused, connection is read-only: ${r}`),n;let i=t[e],o=ts(n);throw i&&Co({title:i,description:o,variant:`danger`}),W.error(`Failed to handle request: ${r}`,n),n}}}return n}var np=e=>{let t=(0,J.c)(9),{onConnect:n}=e,i=rn(),a=r(un),o;t[0]!==i||t[1]!==n?(o=()=>{i(),setTimeout(()=>{n()},800)},t[0]=i,t[1]=n,t[2]=o):o=t[2];let s;t[3]===a?s=t[4]:(s=a&&(0,q.jsx)(Ja,{size:`small`,className:`mr-1`}),t[3]=a,t[4]=s);let c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,q.jsxs)(Wi,{size:`xs`,onClick:o,disabled:a,children:[s,`Connect`]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c};function rp(){let e;return e=Qt()?Ot.INSTANCE:on()?ep():Hf(Zf(),()=>sn()),Qo(tp(e))}var ip=K.forwardRef((e,t)=>{let n=(0,J.c)(16),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:i,children:r,orientation:a,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=a===`horizontal`&&`max-w-max flex-1 items-center justify-center`,c=a===`vertical`&&``,l;n[5]!==i||n[6]!==s||n[7]!==c?(l=G(s,c,`relative z-10`,i),n[5]=i,n[6]=s,n[7]=c,n[8]=l):l=n[8];let u;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,q.jsx)(fp,{}),n[9]=u):u=n[9];let d;return n[10]!==r||n[11]!==a||n[12]!==o||n[13]!==t||n[14]!==l?(d=(0,q.jsxs)(Lc,{ref:t,className:l,orientation:a,...o,children:[r,u]}),n[10]=r,n[11]=a,n[12]=o,n[13]=t,n[14]=l,n[15]=d):d=n[15],d});ip.displayName=Lc.displayName;var ap=yn(`group flex list-none gap-1`,{variants:{orientation:{horizontal:`flex items-center`,vertical:`flex flex-col`}},defaultVariants:{orientation:`horizontal`}}),op=K.forwardRef((e,t)=>{let n=(0,J.c)(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,orientation:i,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]!==r||n[5]!==i?(o=G(ap({orientation:i}),r),n[4]=r,n[5]=i,n[6]=o):o=n[6];let s;return n[7]!==a||n[8]!==t||n[9]!==o?(s=(0,q.jsx)(Rc,{ref:t,className:o,...a}),n[7]=a,n[8]=t,n[9]=o,n[10]=s):s=n[10],s});op.displayName=Rc.displayName;var sp=zc,cp=yn(`group inline-flex rounded-md bg-background px-4 py-2 text-lg font-medium text-(--slate-12) transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50`,{variants:{orientation:{horizontal:`w-max items-center justify-center`,vertical:`w-full`}},defaultVariants:{orientation:`horizontal`}}),lp=K.forwardRef((e,t)=>{let n=(0,J.c)(12),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:i,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===i?o=n[5]:(o=G(cp(),`group`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,q.jsx)(us,{className:`relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180`,"aria-hidden":`true`}),n[6]=s):s=n[6];let c;return n[7]!==r||n[8]!==a||n[9]!==t||n[10]!==o?(c=(0,q.jsxs)(Bc,{ref:t,className:o,...a,children:[r,` `,s]}),n[7]=r,n[8]=a,n[9]=t,n[10]=o,n[11]=c):c=n[11],c});lp.displayName=Bc.displayName;var up=K.forwardRef((e,t)=>{let n=(0,J.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=G(`left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto `,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,q.jsx)(Uc,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});up.displayName=Uc.displayName;var dp=Vc,fp=K.forwardRef((e,t)=>{let n=(0,J.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=G(`absolute left-0 top-full flex justify-center`),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=G(`origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==t||n[8]!==o?(s=(0,q.jsx)(`div`,{className:a,children:(0,q.jsx)(Wc,{className:o,ref:t,...i})}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});fp.displayName=Wc.displayName;var pp=K.forwardRef((e,t)=>{let n=(0,J.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=G(`top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in`,r),n[3]=r,n[4]=a);let o;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`}),n[5]=o):o=n[5];let s;return n[6]!==i||n[7]!==t||n[8]!==a?(s=(0,q.jsx)(Hc,{ref:t,className:a,...i,children:o}),n[6]=i,n[7]=t,n[8]=a,n[9]=s):s=n[9],s});pp.displayName=Hc.displayName;var mp=e=>{let t=(0,J.c)(23),{item:n,preserveQueryParams:r,target:i}=e,a=K.useRef(null),[o,s]=K.useState(!1),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>s(e!==``),t[0]=c):c=t[0];let l;t[1]===n.label?l=t[2]:(l=Zo({html:n.label}),t[1]=n.label,t[2]=l);let u;t[3]===l?u=t[4]:(u=(0,q.jsx)(lp,{ref:a,children:l}),t[3]=l,t[4]=u);let d;if(t[5]!==n.items||t[6]!==r||t[7]!==i){let e;t[9]!==r||t[10]!==i?(e=e=>(0,q.jsx)(bp,{label:e.label,href:r(e.href),target:i(e.href),children:e.description&&Zo({html:e.description})},e.label),t[9]=r,t[10]=i,t[11]=e):e=t[11],d=n.items.map(e),t[5]=n.items,t[6]=r,t[7]=i,t[8]=d}else d=t[8];let f;t[12]===d?f=t[13]:(f=(0,q.jsx)(up,{className:`w-auto`,children:(0,q.jsx)(`ul`,{className:`grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] `,children:d})}),t[12]=d,t[13]=f);let p;t[14]!==u||t[15]!==f?(p=(0,q.jsx)(op,{children:(0,q.jsxs)(sp,{children:[u,f]})}),t[14]=u,t[15]=f,t[16]=p):p=t[16];let m;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,q.jsx)(fp,{}),t[17]=m):m=t[17];let h;t[18]===o?h=t[19]:(h=(0,q.jsx)(_p,{anchorRef:a,open:o,children:m}),t[18]=o,t[19]=h);let g;return t[20]!==p||t[21]!==h?(g=(0,q.jsxs)(Lc,{className:`relative z-10 max-w-max flex-1 items-center justify-center`,orientation:`horizontal`,onValueChange:c,children:[p,h]}),t[20]=p,t[21]=h,t[22]=g):g=t[22],g},hp=Dn(({container:e,children:t})=>(0,Rs.createPortal)(t,e??document.body)),gp=8,_p=e=>{let t=(0,J.c)(18),{anchorRef:n,open:r,children:i}=e,[a,o]=K.useState(null),s=K.useRef(null),c;t[0]===n?c=t[1]:(c=()=>{if(!n.current)return;let e=n.current.getBoundingClientRect(),t=s.current?.firstElementChild?.scrollWidth??0,r=window.innerWidth-t-gp;o({left:Math.max(gp,Math.min(e.left,r)),top:e.bottom})},t[0]=n,t[1]=c);let l=c,u,d;t[2]!==r||t[3]!==l?(u=()=>{if(l(),r){let e=requestAnimationFrame(l);return()=>cancelAnimationFrame(e)}},d=[r,l],t[2]=r,t[3]=l,t[4]=u,t[5]=d):(u=t[4],d=t[5]),K.useLayoutEffect(u,d);let f;t[6]!==n||t[7]!==l?(f={ref:n,onResize:l},t[6]=n,t[7]=l,t[8]=f):f=t[8],Oa(f);let p,m;if(t[9]===l?(p=t[10],m=t[11]):(p=()=>{if(!(typeof window>`u`))return window.addEventListener(`resize`,l),document.addEventListener(`scroll`,l,{capture:!0}),()=>{window.removeEventListener(`resize`,l),document.removeEventListener(`scroll`,l,{capture:!0})}},m=[l],t[9]=l,t[10]=p,t[11]=m),K.useEffect(p,m),!a||typeof document>`u`)return null;let h;t[12]!==a.left||t[13]!==a.top?(h={left:a.left,top:a.top},t[12]=a.left,t[13]=a.top,t[14]=h):h=t[14];let g;return t[15]!==i||t[16]!==h?(g=(0,q.jsx)(hp,{children:(0,q.jsx)(`div`,{ref:s,className:`fixed z-50`,style:h,children:i})}),t[15]=i,t[16]=h,t[17]=g):g=t[17],g},vp=class{tagName=`marimo-nav-menu`;menuItemValidator=H({label:B(),href:B(),description:B().nullish()});menuItemGroupValidator=H({label:B(),items:U(this.menuItemValidator)});validator=H({items:U(We([this.menuItemValidator,this.menuItemGroupValidator])),orientation:Ze([`horizontal`,`vertical`])});render(e){return(0,q.jsx)(yp,{...e.data})}},yp=e=>{let t=(0,J.c)(13),{items:n,orientation:r}=e,i=xp,a=Sp,o=Cp,s;t[0]===r?s=t[1]:(s=e=>`items`in e?r===`horizontal`?(0,q.jsx)(mp,{item:e,preserveQueryParams:o,target:a},e.label):(0,q.jsxs)(sp,{children:[(0,q.jsx)(`div`,{className:`inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-base font-medium text-muted-foreground/80 tracking-wide font-semibold`,children:Zo({html:e.label})}),(0,q.jsx)(op,{className:`ml-4 auto-collapse-nav`,orientation:r,children:e.items.map(e=>(0,q.jsx)(K.Fragment,{children:i((0,q.jsx)(dp,{href:o(e.href),target:a(e.href),className:cp({orientation:r}),children:Zo({html:e.label})},e.label),e.description)},e.label))})]},e.label):(0,q.jsx)(sp,{children:(0,q.jsx)(dp,{href:o(e.href),target:a(e.href),className:cp({orientation:r}),children:Zo({html:e.label})})},e.label),t[0]=r,t[1]=s);let c=s,l;if(t[2]!==n||t[3]!==c){let e;t[5]===c?e=t[6]:(e=e=>c(e),t[5]=c,t[6]=e),l=n.map(e),t[2]=n,t[3]=c,t[4]=l}else l=t[4];let u;t[7]!==r||t[8]!==l?(u=(0,q.jsx)(op,{className:`auto-collapse-nav`,orientation:r,children:l}),t[7]=r,t[8]=l,t[9]=u):u=t[9];let d;return t[10]!==r||t[11]!==u?(d=(0,q.jsx)(ip,{orientation:r,children:u}),t[10]=r,t[11]=u,t[12]=d):d=t[12],d},bp=K.forwardRef((e,t)=>{let n=(0,J.c)(19),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:i,label:a,children:r,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]===i?s=n[6]:(s=G(`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground`,i),n[5]=i,n[6]=s);let c;n[7]===a?c=n[8]:(c=Zo({html:a}),n[7]=a,n[8]=c);let l;n[9]===c?l=n[10]:(l=(0,q.jsx)(`div`,{className:`text-base font-medium leading-none`,children:c}),n[9]=c,n[10]=l);let u;n[11]===r?u=n[12]:(u=r&&(0,q.jsx)(`p`,{className:`line-clamp-2 text-sm leading-snug text-muted-foreground`,children:r}),n[11]=r,n[12]=u);let d;return n[13]!==o||n[14]!==t||n[15]!==s||n[16]!==l||n[17]!==u?(d=(0,q.jsx)(`li`,{children:(0,q.jsx)(dp,{asChild:!0,children:(0,q.jsxs)(`a`,{ref:t,className:s,...o,children:[l,u]})})}),n[13]=o,n[14]=t,n[15]=s,n[16]=l,n[17]=u,n[18]=d):d=n[18],d});bp.displayName=`ListItem`;function xp(e,t){return t?(0,q.jsx)(Hi,{delayDuration:200,content:Zo({html:t}),children:e}):e}function Sp(e){return e.startsWith(`http`)?`_blank`:`_self`}function Cp(e){let t=new URL(globalThis.location.href);return Jt({href:e,queryParams:t.search,keys:[Bt.filePath]})}function wp(e,t){return e===t?!0:e==null||t==null?!1:Array.isArray(e)&&Array.isArray(t)?Oo(e,t):typeof e==`object`&&typeof t==`object`&&Tp(e,t)}function Tp(e,t){return Object.keys(e).length===Object.keys(t).length&&Rt.keys(e).every(n=>e[n]===t[n])}function Ep(e,t){if(!window?.customElements){W.warn(`Custom elements not supported`);return}if(window.customElements.get(e)){W.warn(`Custom element ${e} already defined`);return}window.customElements.define(e,t)}function Dp(e,t){if(!t)return[];let n=e;if(oi(t))return[{column_id:n,operator:t.operator,type:`condition`,negate:!1}];switch(t.type){case`number`:switch(t.operator){case`between`:return[{column_id:n,operator:`between`,value:{min:t.min,max:t.max},type:`condition`,negate:!1}];case`==`:case`!=`:case`>`:case`>=`:case`<`:case`<=`:return[{column_id:n,operator:t.operator,value:t.value,type:`condition`,negate:!1}];case`in`:case`not_in`:return[{column_id:n,operator:t.operator,value:t.values,type:`condition`,negate:!1}];default:Fo(t)}case`text`:switch(t.operator){case`contains`:case`equals`:case`does_not_equal`:case`regex`:case`starts_with`:case`ends_with`:return[{column_id:n,operator:t.operator,value:t.text,type:`condition`,negate:!1}];case`in`:case`not_in`:return[{column_id:n,operator:t.operator,value:t.values,type:`condition`,negate:!1}];case`is_empty`:return[{column_id:n,operator:`is_empty`,type:`condition`,negate:!1}];default:Fo(t)}case`date`:case`datetime`:case`time`:{let e=t.type===`date`?Xo:t.type===`time`?Yo:Jo;switch(t.operator){case`between`:return[{column_id:n,operator:`between`,value:{min:e(t.min),max:e(t.max)},type:`condition`,negate:!1}];case`==`:case`!=`:case`>`:case`>=`:case`<`:case`<=`:return[{column_id:n,operator:t.operator,value:e(t.value),type:`condition`,negate:!1}];default:Fo(t)}}case`boolean`:return[{column_id:n,operator:t.operator,type:`condition`,negate:!1}];default:Fo(t)}}function Op(e){return{type:`group`,operator:`and`,children:e.flatMap(e=>Dp(e.id,e.value)),negate:!1}}var kp=0,Ap=1,jp=2,Mp=4;function Np(e){return()=>e}function Pp(e){e()}function Fp(e,t){return n=>e(t(n))}function Ip(e,t){return()=>e(t)}function Lp(e,t){return n=>e(t,n)}function Rp(e){return e!==void 0}function zp(...e){return()=>{e.map(Pp)}}function Bp(){}function Vp(e,t){return t(e),e}function Hp(e,t){return t(e)}function Up(...e){return e}function Wp(e,t){return e(Ap,t)}function Gp(e,t){e(kp,t)}function Kp(e){e(jp)}function qp(e){return e(Mp)}function Y(e,t){return Wp(e,Lp(t,kp))}function Jp(e,t){let n=e(Ap,e=>{n(),t(e)});return n}function Yp(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Xp(e,t){return e===t}function Zp(e=Xp){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function X(e){return t=>n=>{e(n)&&t(n)}}function Z(e){return t=>Fp(t,e)}function Qp(e){return t=>()=>{t(e)}}function Q(e,...t){let n=rm(...t);return((t,r)=>{switch(t){case jp:Kp(e);return;case Ap:return Wp(e,n(r))}})}function $p(e,t){return n=>r=>{n(t=e(t,r))}}function em(e){return t=>n=>{e>0?e--:t(n)}}function tm(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function nm(...e){let t=Array.from({length:e.length}),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;Wp(e,e=>{let s=n;n|=o,t[a]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{let o=()=>{e([a].concat(t))};n===i?o():r=o}}function rm(...e){return t=>e.reduceRight(Hp,t)}function im(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case Ap:return a?n===a?void 0:(r(),n=a,t=Wp(e,a),t):(r(),Bp);case jp:r(),n=null;return}}}function $(e){let t=e,n=om();return((e,r)=>{switch(e){case kp:t=r;break;case Ap:r(t);break;case Mp:return t}return n(e,r)})}function am(e,t){return Vp($(t),t=>Y(e,t))}function om(){let e=[];return((t,n)=>{switch(t){case kp:e.slice().forEach(e=>{e(n)});return;case jp:e.splice(0);return;case Ap:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function sm(e){return Vp(om(),t=>Y(e,t))}var cm={singleton:!0};function lm(e,t=[],n=cm){let{singleton:r}=n;return{constructor:e,dependencies:t,id:um(),singleton:r}}var um=()=>Symbol(`id`);function dm(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);let o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}function fm(...e){let t=om(),n=Array.from({length:e.length}),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;Wp(e,e=>{n[a]=e,r|=o,r===i&&Gp(t,n)})}),function(e,a){switch(e){case jp:Kp(t);return;case Ap:return r===i&&a(n),Wp(t,a)}}}function pm(e,t=Xp){return Q(e,Zp(t))}function mm(...e){return function(t,n){switch(t){case jp:return;case Ap:return zp(...e.map(e=>Wp(e,n)))}}}var hm={DEBUG:0,INFO:1,WARN:2,ERROR:3},gm={[hm.DEBUG]:`debug`,[hm.ERROR]:`error`,[hm.INFO]:`log`,[hm.WARN]:`warn`},_m=()=>typeof globalThis>`u`?window:globalThis,vm=lm(()=>{let e=$(hm.ERROR);return{log:$((t,n,r=hm.INFO)=>{r>=(_m().VIRTUOSO_LOG_LEVEL??qp(e))&&console[gm[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0});function ym(e){return`self`in e?e.document.documentElement:e}function bm(e){let t=ym(e);return t.ownerDocument.defaultView.getComputedStyle(t).direction===`rtl`}function xm(e,t){return bm(e)?-t:t}function Sm(e,t){return bm(e)?-t:t}function Cm(e,t,n){return wm(e,t,n).callbackRef}function wm(e,t,n){let r=K.useRef(null),i=e=>{},a=K.useMemo(()=>typeof ResizeObserver<`u`?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;n.offsetParent!==null&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return i=e=>{e&&t?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:i,ref:r}}function Tm(e,t,n,r,i,a,o,s,c){return wm(K.useCallback(n=>{let c=Em(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;l.dataset.virtuosoScroller===void 0;)l=l.parentElement;let u=l.lastElementChild?.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,p=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight,m=o?s?xm(o,o.scrollLeft):o.scrollTop:u?s?xm(d,d.scrollX||d.document.documentElement.scrollLeft):d.scrollY||d.document.documentElement.scrollTop:s?xm(l,l.scrollLeft):l.scrollTop;r({scrollHeight:f,scrollTop:Math.max(m,0),viewportHeight:p}),a?.(s?Dm(`column-gap`,getComputedStyle(n).columnGap,i):Dm(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function Em(e,t,n,r){let i=e.length;if(i===0)return null;let a=[];for(let o=0;o<i;o++){let i=e.item(o);if(i.dataset.index===void 0)continue;let s=parseInt(i.dataset.index,10),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},hm.ERROR),l===c)continue;let u=a[a.length-1];a.length===0||u.size!==l||u.endIndex!==s-1?a.push({endIndex:s,size:l,startIndex:s}):a[a.length-1].endIndex++}return a}function Dm(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,hm.WARN),t===`normal`?0:parseInt(t??`0`,10)}function Om(e,t,n){let r=K.useRef(null),i=K.useCallback(n=>{if(!n?.offsetParent)return;let i=n.getBoundingClientRect(),a=i.width,s,c;if(t){let e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),s=n+t.scrollTop}else{let e=o.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),s=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=wm(i,!0,n),s=K.useCallback(()=>{i(o.current)},[i,o]);return K.useEffect(()=>{if(t){t.addEventListener(`scroll`,s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener(`scroll`,s),e.unobserve(t)}}let e=o.current?.ownerDocument.defaultView;return e?.addEventListener(`scroll`,s),e?.addEventListener(`resize`,s),()=>{e?.removeEventListener(`scroll`,s),e?.removeEventListener(`resize`,s)}},[s,t,o]),a}var km=lm(()=>{let e=om(),t=om(),n=$(0),r=om(),i=$(0),a=om(),o=om(),s=$(0),c=$(0),l=$(0),u=$(0),d=om(),f=om(),p=$(!1),m=$(!1),h=$(!1);return Y(Q(e,Z(({scrollTop:e})=>e)),t),Y(Q(e,Z(({scrollHeight:e})=>e)),o),Y(t,i),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),Am={lvl:0};function jm(e,t){let n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]),a=[];for(let o=1;o<n;o++){let{index:n,value:s}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=s}return a.push({end:1/0,start:r,value:i}),a}function Mm(e){return e===Am}function Nm(e,t){if(!Mm(e))return t===e.k?e.v:t<e.k?Nm(e.l,t):Nm(e.r,t)}function Pm(e,t,n=`k`){if(Mm(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=Pm(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Pm(e.l,t,n)}function Fm(e,t,n){return Mm(e)?Km(t,n,1):t===e.k?Hm(e,{k:t,v:n}):t<e.k?qm(Hm(e,{l:Fm(e.l,t,n)})):qm(Hm(e,{r:Fm(e.r,t,n)}))}function Im(){return Am}function Lm(e,t,n){if(Mm(e))return[];let r=Pm(e,t)[0];return Xm(Bm(e,r,n))}function Rm(e,t){if(Mm(e))return Am;let{k:n,l:r,r:i}=e;if(t===n){if(Mm(r))return i;if(Mm(i))return r;let[t,n]=Gm(r);return Vm(Hm(e,{k:t,l:Um(r),v:n}))}return Vm(t<n?Hm(e,{l:Rm(r,t)}):Hm(e,{r:Rm(i,t)}))}function zm(e){return Mm(e)?[]:[...zm(e.l),{k:e.k,v:e.v},...zm(e.r)]}function Bm(e,t,n){if(Mm(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(Bm(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(Bm(a,t,n))),s}function Vm(e){let{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Wm(t))return Jm(Hm(e,{lvl:n-1}));if(!Mm(t)&&!Mm(t.r))return Hm(t.r,{l:Hm(t,{r:t.r.l}),lvl:n,r:Hm(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(Wm(e))return Ym(Hm(e,{lvl:n-1}));if(!Mm(r)&&!Mm(r.l)){let t=r.l,i=Wm(t)?r.lvl-1:r.lvl;return Hm(t,{l:Hm(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:Ym(Hm(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function Hm(e,t){return Km(t.k===void 0?e.k:t.k,t.v===void 0?e.v:t.v,t.lvl===void 0?e.lvl:t.lvl,t.l===void 0?e.l:t.l,t.r===void 0?e.r:t.r)}function Um(e){return Mm(e.r)?e.l:Vm(Hm(e,{r:Um(e.r)}))}function Wm(e){return Mm(e)||e.lvl>e.r.lvl}function Gm(e){return Mm(e.r)?[e.k,e.v]:Gm(e.r)}function Km(e,t,n,r=Am,i=Am){return{k:e,l:r,lvl:n,r:i,v:t}}function qm(e){return Ym(Jm(e))}function Jm(e){let{l:t}=e;return!Mm(t)&&t.lvl===e.lvl?Hm(t,{r:Hm(e,{l:t.r})}):e}function Ym(e){let{lvl:t,r:n}=e;return!Mm(n)&&!Mm(n.r)&&n.lvl===t&&n.r.lvl===t?Hm(n,{l:Hm(e,{r:n.l}),lvl:t+1}):e}function Xm(e){return jm(e,({k:e,v:t})=>({index:e,value:t}))}function Zm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Qm(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var $m=lm(()=>({recalcInProgress:$(!1)}),[],{singleton:!0});function eh(e,t,n){return e[th(e,t,n)]}function th(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw Error(`Failed binary finding record in array - ${e.join(`,`)}, searched for ${t}`)}function nh(e,t,n,r){let i=th(e,t,r),a=th(e,n,r,i);return e.slice(i,a+1)}function rh(e,t){return Math.round(e.getBoundingClientRect()[t])}function ih(e){return!Mm(e.groupOffsetTree)}function ah({index:e},t){return t===e?0:t<e?-1:1}function oh(){return{groupIndices:[],groupOffsetTree:Im(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Im()}}function sh(e,t){let n=Mm(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),Mm(e)){e=Fm(e,0,i);continue}let o=Lm(e,a-1,t+1);if(o.some(yh(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=Rm(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=Fm(e,t+1,a));c&&(e=Fm(e,a,i))}return[e,n]}function ch(e){return e.groupIndex!==void 0}function lh({offset:e},t){return t===e?0:t<e?-1:1}function uh(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=eh(t,e,ah),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function dh(e,t){if(!ih(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function fh(e,t,n){if(ch(e))return t.groupIndices[e.groupIndex]+1;let r=dh(e.index===`LAST`?n:e.index,t);return r=Math.max(0,Math.min(n,r)),r}function ph(e,t,n,r=0){return r>0&&(t=Math.max(t,eh(e,r,ah).offset)),jm(nh(e,t,n,lh),vh)}function mh(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,hm.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&Mm(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>Fm(Fm(t,n,e),n+1,r),o)}else[o,s]=sh(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=_h(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Fm(e,t,uh(t,d,i)),Im()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function hh(e){return zm(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i===void 0?1/0:i.k-1,size:t,startIndex:e}})}function gh(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function _h(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t===0)i=[];else{c=th(i,t-1,ah),s=i[c].offset;let e=Pm(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===Pm(n,t)[1]&&--c,i=i.slice(0,c+1)}for(let{start:e,value:c}of Lm(n,t,1/0)){let t=e-a,n=t*o+s+t*r;i.push({index:e,offset:n,size:c}),a=e,s=n,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function vh(e){return{index:e.index,value:e}}function yh(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}var bh={offsetHeight:`height`,offsetWidth:`width`},xh=lm(([{log:e},{recalcInProgress:t}])=>{let n=om(),r=om(),i=am(r,0),a=om(),o=om(),s=$(0),c=$([]),l=$(void 0),u=$(void 0),d=$(void 0),f=$(void 0),p=$((e,t)=>rh(e,bh[t])),m=$(void 0),h=$(0),g=oh(),_=am(Q(n,nm(c,e,h),$p(mh,g),Zp()),g),v=am(Q(c,Zp(),$p((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Z(({prev:e})=>e)),[]);Y(Q(c,X(e=>e.length>0),nm(_,h),Z(([e,t,n])=>{let r=e.reduce((e,r,i)=>Fm(e,r,uh(r,t.offsetTree,n)||i),Im());return{...t,groupIndices:e,groupOffsetTree:r}})),_),Y(Q(r,nm(_),X(([e,{lastIndex:t}])=>e<t),Z(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),Y(l,u);let y=am(Q(l,Z(e=>e===void 0)),!0);Y(Q(u,X(e=>e!==void 0&&Mm(qp(_).sizeTree)),Z(e=>{let t=qp(d),n=qp(c).length>0;return t!==void 0&&t!==0?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),Y(Q(f,X(e=>e!==void 0&&e.length>0&&Mm(qp(_).sizeTree)),Z(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),Y(Q(c,nm(d,u),X(([,e,t])=>e!==void 0&&t!==void 0),Z(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),o!==void 0&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);let b=sm(Q(n,nm(_),$p(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),Z(e=>e.changed)));Wp(Q(s,$p((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Z(e=>e.diff)),e=>{let{groupIndices:n}=qp(_);if(e>0)Gp(t,!0),Gp(a,e+gh(e,n));else if(e<0){let t=qp(v);t.length>0&&(e-=gh(-e,t)),Gp(o,e)}}),Wp(Q(s,nm(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},hm.ERROR)});let x=sm(a);Y(Q(a,nm(_),Z(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=Nm(t.sizeTree,0),a=0,o=0;for(;a<e;){let e=t.groupIndices[o],s=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),o++,a+=s+1}let s=zm(t.sizeTree);return a!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return t.prevSize!==0&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return zm(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=sm(Q(o,nm(_,h),Z(([e,{offsetTree:t},n])=>uh(-e,t,n))));return Y(Q(o,nm(_,h),Z(([e,t,n])=>{if(t.groupIndices.length>0){if(Mm(t.sizeTree))return t;let r=Im(),i=qp(v),a=0,o=0,s=0;for(;a<-e;){s=i[o];let e=i[o+1]-s-1;o++,a+=e+1}if(r=zm(t.sizeTree).reduce((t,{k:n,v:r})=>Fm(t,Math.max(0,n+e),r),r),a!==-e){let n=Nm(t.sizeTree,s);r=Fm(r,0,n);let i=Pm(t.sizeTree,-e+1)[1];r=Fm(r,1,i)}return{...t,sizeTree:r,..._h(t.offsetTree,0,r,n)}}let r=zm(t.sizeTree).reduce((t,{k:n,v:r})=>Fm(t,Math.max(0,n+e),r),Im());return{...t,sizeTree:r,..._h(t.offsetTree,0,r,n)}})),_),{beforeUnshiftWith:x,data:m,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,fixedGroupSize:d,gap:h,groupIndices:c,heightEstimates:f,itemSize:p,listRefresh:b,shiftWith:o,shiftWithOffset:S,sizeRanges:n,sizes:_,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:a}},Up(vm,$m),{singleton:!0});function Sh(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var Ch=lm(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=om(),o=om(),s=sm(Q(a,Z(Sh)));return Y(Q(s,Z(e=>e.totalCount)),n),Y(Q(s,Z(e=>e.groupIndices)),e),Y(Q(fm(i,t,r),X(([e,t])=>ih(t)),Z(([e,t,n])=>Pm(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),Zp(),Z(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},Up(xh,km)),wh=lm(([{log:e}])=>{let t=$(!1),n=sm(Q(t,X(e=>e),Zp()));return Wp(t,t=>{t&&qp(e)(`props updated`,{},hm.DEBUG)}),{didMount:n,propsReady:t}},Up(vm),{singleton:!0}),Th=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function Eh(e){let t=typeof e==`number`?{index:e}:{...e};return t.align||=`start`,(!t.behavior||!Th)&&(t.behavior=`auto`),t.offset===void 0&&(t.offset=0),t}var Dh=lm(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{let p=om(),m=om(),h=$(0),g=null,_=null,v=null;function y(){g!==null&&(g(),g=null),v!==null&&(v(),v=null),_&&=(clearTimeout(_),null),Gp(c,!1)}return Y(Q(p,nm(n,d,r,h,s,o,f),nm(e,a,i),Z(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=Eh(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=fh(b,n,w),E=uh(T,n.offsetTree,d)+o;x===`end`?(E+=f+Pm(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+Pm(n.sizeTree,T)[1]-r+h)/2:E-=a,C!==void 0&&C!==0&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},hm.DEBUG),Gp(p,e)):(Gp(m,!0),l(`list did not change, scroll successful`,{},hm.DEBUG))};if(y(),S===`smooth`){let e=!1;v=Wp(t,t=>{e||=t}),g=Jp(u,()=>{D(e)})}else g=Jp(Q(t,Oh(150)),D);return _=setTimeout(()=>{y()},1200),Gp(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},hm.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},Up(xh,km,vm),{singleton:!0});function Oh(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function kh(e,t){e===0?t():requestAnimationFrame(()=>{kh(e-1,t)})}function Ah(e,t){if(e===void 0)return 0;let n=t-1,r=typeof e==`number`?e:e.index===`LAST`?n:e.index;return Math.max(0,Math.min(r,n))}function jh(e){return e===void 0?!0:typeof e==`number`?e===0:e.index===0&&(e.align===void 0||e.align===`start`)&&(e.offset===void 0||e.offset===0)}var Mh=lm(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=$(!0),c=$(0),l=$(!0);return Y(Q(o,nm(c),X(([e,t])=>!jh(t)),Qp(!1)),s),Y(Q(o,nm(c),X(([e,t])=>!jh(t)),Qp(!1)),l),Wp(Q(fm(t,o),nm(s,n,e,l),X(([[,e],t,{sizeTree:n},r,i])=>e&&(!Mm(n)||Rp(r))&&!t&&!i),nm(c)),([,e])=>{if(e===void 0){Gp(s,!0),Gp(l,!0);return}Jp(i,()=>{Gp(l,!0)}),kh(4,()=>{Jp(r,()=>{Gp(s,!0)}),Gp(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},Up(xh,km,Dh,wh),{singleton:!0});function Nh(e,t){return Math.abs(e-t)<1.01}var Ph=`up`,Fh=`down`,Ih=`none`,Lh={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Rh=0,zh=lm(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=$(!1),s=$(!0),c=om(),l=om(),u=$(4),d=$(Rh),f=am(Q(mm(Q(pm(i),em(1),Qp(!0)),Q(pm(i),em(1),Qp(!1),Yp(100))),Zp()),!1),p=am(Q(mm(Q(n,Qp(!0)),Q(n,Qp(!1),Yp(200))),Zp()),!1);Y(Q(fm(pm(i),pm(d)),Z(([e,t])=>e<=t),Zp()),s),Y(Q(s,tm(50)),l);let m=sm(Q(fm(r,pm(a),pm(t),pm(e),pm(u)),$p((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{let s=n+r-t>-o,c={scrollHeight:t,scrollTop:n,viewportHeight:r};if(s){let t,r;return n>e.state.scrollTop?(t=`SCROLLED_DOWN`,r=e.state.scrollTop-n):(t=`SIZE_DECREASED`,r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:c}}let l;return l=c.scrollHeight>e.state.scrollHeight?`SIZE_INCREASED`:r<e.state.viewportHeight?`VIEWPORT_HEIGHT_DECREASING`:n<e.state.scrollTop?`SCROLLING_UPWARDS`:`NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM`,{atBottom:!1,notAtBottomBecause:l,state:c}},Lh),Zp((e,t)=>e!==void 0&&e.atBottom===t.atBottom))),h=am(Q(r,$p((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!Nh(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),X(e=>e.changed),Z(e=>e.jump)),0);Y(Q(m,Z(e=>e.atBottom)),o),Y(Q(o,tm(50)),c);let g=$(Fh);Y(Q(r,Z(({scrollTop:e})=>e),Zp(),$p((e,t)=>qp(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Ph:Fh,prevScrollTop:t},{direction:Fh,prevScrollTop:0}),Z(e=>e.direction)),g),Y(Q(r,tm(50),Qp(Ih)),g);let _=$(0);return Y(Q(f,X(e=>!e),Qp(0)),_),Y(Q(i,tm(100),nm(f),X(([e,t])=>t),$p(([e,t],[n])=>[t,n],[0,0]),Z(([e,t])=>t-e)),_),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:g,scrollVelocity:_}},Up(km)),Bh=`top`,Vh=`bottom`,Hh=`none`;function Uh(e,t,n){return typeof e==`number`?n===Ph&&t===Bh||n===Fh&&t===Vh?e:0:n===Ph?t===Bh?e.main:e.reverse:t===Vh?e.main:e.reverse}function Wh(e,t){return typeof e==`number`?e:e[t]??0}var Gh=lm(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=om(),o=$(0),s=$(0),c=$(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:am(Q(fm(pm(r),pm(i),pm(n),pm(a,Qm),pm(c),pm(o),pm(t),pm(e),pm(s)),Z(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=Hh,m=Wh(l,Bh),h=Wh(l,Vh);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=Ph),i<e-f+t+h&&(p=Fh),p===Hh?null:[Math.max(u-n-Uh(a,Bh,p)-m,0),u-f-s+t+Uh(a,Vh,p)+h]}),X(e=>e!==null),Zp(Qm)),[0,0])}},Up(km),{singleton:!0});function Kh(e,t,n){if(ih(t)){let r=dh(e,t);return[{index:Pm(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}var qh={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Jh(e,t,n,r,i,a){let{lastIndex:o,lastOffset:s,lastSize:c}=i,l=0,u=0;if(e.length>0){l=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let d=n-o,f=s+d*c+(d-1)*r,p=l,m=f-u;return{bottom:u,firstItemIndex:a,items:Xh(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:Xh(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function Yh(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-o>=e)break;o++}let s=e+o,c=Ah(t,s);return Jh(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function Xh(e,t,n){if(e.length===0)return[];if(!ih(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,a=[],o=Lm(t.groupOffsetTree,r,i),s,c=0;for(let r of e){(!s||s.end<r.index)&&(s=o.shift(),c=t.groupIndices.indexOf(s.start));let e;e=r.index===s.start?{index:c,type:`group`}:{groupIndex:c,index:r.index-(c+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function Zh(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var Qh=lm(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:m}])=>{let h=$([]),g=$(0),_=om(),v=$(0);Y(a.topItemsIndexes,h);let y=am(Q(fm(p,m,pm(c,Qm),pm(i),pm(r),pm(l),u,pm(h),pm(t),pm(n),pm(v),e),X(([e,t,,n,,,,,,,,r])=>{let i=r!==void 0&&r.length!==n;return e&&!t&&!i}),Z(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=qp(g);if(n===0)return{...qh,totalCount:n};if(e===0&&t===0)return m===0?{...qh,totalCount:n}:Yh(m,i,r,s,c,u||[]);if(Mm(p))return m>0?null:Jh(Kh(Ah(i,n),d,u),[],n,c,d,s);let h=[];if(o.length>0){let e=o[0],t=o[o.length-1],n=0;for(let r of Lm(p,e,t)){let i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)h.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return Jh([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=ph(f,e,t,_);if(v.length===0)return null;let y=n-1,b=Vp([],n=>{for(let r of v){let i=r.value,a=i.offset,o=r.start,s=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+c)/(s+c));let t=o-r.start;a+=t*s+t*c}o<_&&(a+=(_-o)*s,o=_);let l=Math.min(r.end,y);for(let e=o;e<=l&&!(a>=t);e++)n.push({data:u?.[e],index:e,offset:a,size:s}),a+=s+c}}),x=Zh(l,Bh),S=Zh(l,Vh);if(b.length>0&&(x>0||S>0)){let e=b[0],t=b[b.length-1];if(x>0&&e.index>_){let t=Math.min(x,e.index-_),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=Lm(p,i,i)[0]?.value??e.size;r-=t+c,n.unshift({data:u?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<y){let e=Math.min(S,y-t.index),n=t.offset+t.size+c;for(let r=t.index+1;r<=t.index+e;r++){let e=Lm(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return Jh(b,h,n,c,d,s)}),X(e=>e!==null),Zp()),qh);Y(Q(e,X(Rp),Z(e=>e?.length)),i),Y(Q(y,Z(e=>e.topListHeight)),d),Y(d,s),Y(Q(y,Z(e=>[e.top,e.bottom])),o),Y(Q(y,Z(e=>e.items)),_);let b=sm(Q(y,X(({items:e})=>e.length>0),nm(i,e),X(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Z(([,e,t])=>[e-1,t]),Zp(Qm),Z(([e])=>e))),x=sm(Q(y,tm(200),X(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Z(({items:e})=>e[0].index),Zp()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:sm(Q(y,X(({items:e})=>e.length>0),Z(({items:e})=>{let t=0,n=e.length-1;for(;e[t].type===`group`&&t<n;)t++;for(;e[n].type===`group`&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),Zp(Zm))),startReached:x,topItemsIndexes:h,...f}},Up(xh,Ch,Gh,Mh,Dh,zh,wh,$m),{singleton:!0}),$h=lm(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=om(),o=am(Q(fm(n,e,r,t,i),Z(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return Y(pm(o),a),{totalListHeight:o,totalListHeightChanged:a}},Up(km,Qh),{singleton:!0}),eg=lm(([{viewportHeight:e},{totalListHeight:t}])=>{let n=$(!1);return{alignToBottom:n,paddingTopAddition:am(Q(fm(n,e,t),X(([e])=>e),Z(([,e,t])=>Math.max(0,e-t)),tm(0),Zp()),0)}},Up(km,$h),{singleton:!0}),tg=lm(()=>({context:$(null)})),ng=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,...r===void 0?{}:{behavior:r}}:e>a?{...i,align:n??`end`,...r===void 0?{}:{behavior:r}}:null,rg=lm(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=om();return Y(Q(u,nm(t,c,n,a,i,r,s),nm(e),Z(([[e,t,n,r,i,a,s,c],l])=>{let{calculateViewLocation:u=ng,done:d,...f}=e,p=fh(e,t,r-1),m=uh(p,t.offsetTree,l)+i+a,h=m+Pm(t.sizeTree,p)[1],g=c+a,_=u({itemBottom:h,itemTop:m,locationParams:f,viewportBottom:c+n-s,viewportTop:g});return _===null?d?.():d&&Jp(Q(o,X(e=>!e),em(qp(o)?1:2)),d),_}),X(e=>e!==null)),l),{scrollIntoView:u}},Up(xh,km,Dh,Qh,vm),{singleton:!0});function ig(e){return e===!1?!1:e===`smooth`?`smooth`:`auto`}var ag=(e,t)=>typeof e==`function`?ig(e(t)):t&&ig(e),og=lm(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{let m=$(!1),h=om(),g=null;function _(e){Gp(o,{align:`end`,behavior:e,index:`LAST`})}Wp(Q(fm(Q(pm(t),em(1)),c),nm(pm(m),a,s,d),Z(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=ag(n,r||a),o&&=s!==!1),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),X(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g!==null&&(g(),g=null),qp(n)===void 0?g=Jp(e,()=>{qp(u)(`following output to `,{totalCount:r},hm.DEBUG),_(t),g=null}):requestAnimationFrame(()=>{qp(u)(`following output to `,{totalCount:r},hm.DEBUG),_(t)})});function v(e){let t=Jp(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&g===null&&(qp(u)(`scrolling to bottom due to increased size`,{},hm.DEBUG),_(`auto`))});setTimeout(t,100)}Wp(Q(fm(pm(m),t,l),X(([e,,t])=>e!==!1&&t),$p(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),X(({refreshed:e})=>e),nm(m,t)),([,e])=>{qp(s)&&v(e!==!1)}),Wp(h,()=>{v(qp(m)!==!1)}),Wp(fm(pm(m),i),([e,t])=>{e!==!1&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=$(null),b=om();return Y(mm(Q(pm(r),Z(e=>e?.length??0)),Q(pm(t))),b),Wp(Q(fm(Q(b,em(1)),c),nm(pm(y),s,d,f),Z(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),X(e=>!!e),tm(0)),t=>{g!==null&&(g(),g=null),qp(n)===void 0?g=Jp(e,()=>{qp(u)(`scrolling into view`,{}),Gp(p,t),g=null}):requestAnimationFrame(()=>{qp(u)(`scrolling into view`,{}),Gp(p,t)})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},Up(xh,zh,Dh,Mh,wh,vm,km,tg,rg)),sg=lm(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(Y(Q(s,nm(a),X(([,e])=>e!==0),nm(i,r,t,n,e),Z(([[,e],t,n,r,i,a=[]])=>Yh(e,t,n,r,i,a))),o),{}),Up(xh,Mh,Qh,wh),{singleton:!0}),cg=lm(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=$(0);return Wp(Q(e,nm(r),X(([,e])=>e!==0),Z(([,e])=>({top:e}))),e=>{Jp(Q(n,em(1),X(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{Gp(t,e)})})}),{initialScrollTop:r}},Up(wh,km,Qh),{singleton:!0}),lg=lm(([{scrollVelocity:e}])=>{let t=$(!1),n=om(),r=$(!1);return Y(Q(e,nm(r,t,n),X(([e,t])=>t!==!1&&t!==void 0),Z(([e,t,n,r])=>{let{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),Zp()),t),Wp(Q(fm(t,e,n),nm(r)),([[e,t,n],r])=>{e&&r!==!1&&r!==void 0&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Up(zh),{singleton:!0}),ug=lm(([{scrollContainerState:e,scrollTo:t}])=>{let n=om(),r=om(),i=om(),a=$(!1),o=$(void 0);return Y(Q(fm(n,r),Z(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),Y(Q(t,nm(r),Z(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Up(km)),dg=lm(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=om(),u=$(void 0),d=$(null),f=$(null);return Y(s,d),Y(c,f),Wp(Q(l,nm(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=hh(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),Y(Q(u,X(Rp),Z(fg)),i),Y(Q(a,nm(u),X(([,e])=>e!==void 0),Zp(),Z(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},Up(xh,km,Mh,wh,ug));function fg(e){return{align:`start`,index:0,offset:e.scrollTop}}var pg=lm(([{topItemsIndexes:e}])=>{let t=$(0);return Y(Q(t,X(e=>e>=0),Z(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Up(Qh));function mg(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var hg=mg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),gg=lm(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g},_,v,y,b,{scrollToIndex:x},S,{topItemCount:C},{groupCounts:w},T])=>{let{listState:E,minOverscanItemCount:D,topItemsIndexes:O,rangeChanged:k,...A}=b;return Y(k,T.scrollSeekRangeChanged),Y(Q(fm(T.windowViewportRect,_.headerHeight,_.fixedHeaderHeight),Z(([e,t,n])=>Math.max(t+n+1,e.visibleHeight))),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:w,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:O,totalCount:f,...y,groupIndices:o,itemSize:c,listState:E,minOverscanItemCount:D,scrollToIndex:x,statefulTotalCount:d,trackItemSizes:p,rangeChanged:k,...A,...T,..._,sizes:u,...v}},Up(xh,Mh,km,dg,og,Qh,Dh,lm(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:m}])=>{let h=sm(Q(c,nm(o),$p(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},s])=>{let c=r+a,l=0;return t===o&&e.length>0&&i.length>0&&(i[0].originalIndex===0&&e[0].originalIndex===0||(l=c-n,l!==0&&(l+=s))),[l,i,o,c]},[0,[],0,0]),X(([e])=>e!==0),nm(r,s,n,i,p,m),X(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===Ph),Z(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},hm.DEBUG),e))));function g(n){n>0?(Gp(t,{behavior:`auto`,top:-n}),Gp(e,0)):(Gp(e,0),Gp(t,{behavior:`auto`,top:-n}))}return Wp(Q(h,nm(e,a)),([t,n,r])=>{r&&hg()?Gp(e,n-t):g(-t)}),Wp(Q(fm(am(a,!1),e,m),X(([e,t,n])=>!e&&!n&&t!==0),Z(([e,t])=>t),tm(1)),g),Y(Q(d,Z(e=>({top:-e}))),t),Wp(Q(l,nm(f,u),Z(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);let o=0,s=Nm(r,0),c=0,l=0;for(;c<e;){c++,o+=s;let n=t.length===l+1?1/0:t[l+1]-t[l]-1;c+n>e&&(o-=s,n=e-c+1),c+=n,o+=a(n),l++}return o})),n=>{Gp(e,n),requestAnimationFrame(()=>{Gp(t,{top:n}),requestAnimationFrame(()=>{Gp(e,0),Gp(m,!1)})})}),{deviation:e}},Up(km,zh,Qh,xh,vm,$m)),pg,Ch,lm(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),Up(Gh,sg,wh,lg,$h,cg,eg,ug,rg,vm,tg))));function _g(e,t){let n={},r={},i=0,a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}var vg=typeof document>`u`?K.useEffect:K.useLayoutEffect;function yg(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=K.createContext({});function c(e,n){e.propsReady!==void 0&&Gp(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];Gp(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];Gp(i,n[r])}e.propsReady!==void 0&&Gp(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];Gp(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=im(e[t.events[r]]),n),{})}return{Component:K.forwardRef(function(t,a){let{children:d,...f}=t,[p]=K.useState(()=>Vp(dm(e),e=>{c(e,f)})),[m]=K.useState(Ip(u,p));vg(()=>{for(let e of o)e in f&&Wp(m[e],f[e]);return()=>{Object.values(m).map(Kp)}},[f,m,p]),vg(()=>{c(p,f)}),K.useImperativeHandle(a,Np(l(p)));let h=n;return(0,q.jsx)(s.Provider,{value:p,children:n===void 0?d:(0,q.jsx)(h,{..._g([...r,...i,...o],f),children:d})})}),useEmitter:(e,t)=>{let n=K.useContext(s)[e];vg(()=>Wp(n,t),[t,n])},useEmitterValue:e=>{let t=K.useContext(s)[e],n=K.useCallback(e=>Wp(t,e),[t]);return K.useSyncExternalStore(n,()=>qp(t),()=>qp(t))},usePublisher:e=>{let t=K.useContext(s);return K.useCallback(n=>{Gp(t[e],n)},[t,e])}}}var bg=K.createContext(void 0),xg=K.createContext(void 0),Sg=`-webkit-sticky`,Cg=`sticky`,wg=mg(()=>{if(typeof document>`u`)return Cg;let e=document.createElement(`div`);return e.style.position=Sg,e.style.position===Sg?Sg:Cg}),Tg=typeof document>`u`?K.useEffect:K.useLayoutEffect;function Eg(e){return`self`in e}function Dg(e){return`body`in e}function Og(e,t,n,r=Bp,i,a){let o=K.useRef(null),s=K.useRef(null),c=K.useRef(null),l=K.useCallback(n=>{let r,i,o,l=n.target;if(Dg(l)||Eg(l)){let e=Eg(l)?l:l.defaultView;o=a===!0?xm(e,e.scrollX):e.scrollY,r=a===!0?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a===!0?e.innerWidth:e.innerHeight}else o=a===!0?xm(l,l.scrollLeft):l.scrollTop,r=a===!0?l.scrollWidth:l.scrollHeight,i=a===!0?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync===!0?u():Rs.flushSync(u),s.current!==null&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&=(clearTimeout(c.current),null))},[e,t,a]);K.useEffect(()=>{let e=i??o.current;return r(i??o.current),l({suppressFlushSync:!0,target:e}),e.addEventListener(`scroll`,l,{passive:!0}),()=>{r(null),e.removeEventListener(`scroll`,l)}},[o,l,n,r,i]);function u(n){let r=o.current;if(!r||(a===!0?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;Eg(r)?(u=Math.max(rh(r.document.documentElement,a===!0?`width`:`height`),a===!0?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a===!0?r.innerWidth:r.innerHeight,d=a===!0?xm(r,r.scrollX):r.scrollY):(u=r[a===!0?`scrollWidth`:`scrollHeight`],l=rh(r,a===!0?`width`:`height`),d=a===!0?xm(r,r.scrollLeft):r.scrollTop);let f=u-l;if(n.top===void 0){r.scrollTo(n);return}let p=Math.ceil(Math.max(Math.min(f,n.top),0));if(n.top=p,Nh(l,u)||p===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=p,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a===!0&&(n={...n.behavior===void 0?{}:{behavior:n.behavior},left:Sm(r,p)}),r.scrollTo(n)}function d(e){a===!0&&(e={...e.behavior===void 0?{}:{behavior:e.behavior},...e.top===void 0?{}:{left:Sm(o.current,e.top)}}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}function kg(e){return e}var Ag=lm(([e,t])=>({...e,...t}),Up(gg,lm(()=>{let e=$(e=>`Item ${e}`),t=$(e=>`Group ${e}`),n=$({}),r=$(kg),i=$(`div`),a=$(Bp),o=(e,t=null)=>am(Q(n,Z(t=>t[e]),Zp()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o(`EmptyPlaceholder`),FooterComponent:o(`Footer`),GroupComponent:o(`Group`,`div`),groupContent:t,HeaderComponent:o(`Header`),HeaderFooterTag:i,ItemComponent:o(`Item`,`div`),itemContent:e,ListComponent:o(`List`,`div`),ScrollerComponent:o(`Scroller`,`div`),scrollerRef:a,ScrollSeekPlaceholder:o(`ScrollSeekPlaceholder`),TopItemListComponent:o(`TopItemList`)}}))),jg=({height:e})=>(0,q.jsx)(`div`,{style:{height:e}}),Mg={overflowAnchor:`none`,position:wg(),zIndex:1},Ng={overflowAnchor:`none`},Pg={...Ng,display:`inline-block`,height:`100%`},Fg=K.memo(function({showTopList:e=!1}){let t=Qg(`listState`),n=$g(`sizeRanges`),r=Qg(`useWindowScroll`),i=Qg(`customScrollParent`),a=$g(`windowScrollContainerState`),o=$g(`scrollContainerState`),s=i||r?a:o,c=Qg(`itemContent`),l=Qg(`context`),u=Qg(`groupContent`),d=Qg(`trackItemSizes`),f=Qg(`itemSize`),p=Qg(`log`),m=$g(`gap`),h=Qg(`horizontalDirection`),{callbackRef:g}=Tm(n,f,d,e?Bp:s,p,m,i,h,Qg(`skipAnimationFrameInResizeObserver`)),[_,v]=K.useState(0);Zg(`deviation`,e=>{_!==e&&v(e)});let y=Qg(`EmptyPlaceholder`),b=Qg(`ScrollSeekPlaceholder`)??jg,x=Qg(`ListComponent`),S=Qg(`ItemComponent`),C=Qg(`GroupComponent`),w=Qg(`computeItemKey`),T=Qg(`isSeeking`),E=Qg(`groupIndices`).length>0,D=Qg(`alignToBottom`),O=Qg(`initialItemFinalLocationReached`),k=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginInlineStart:_===0?D?`auto`:0:_,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y!=null?(0,q.jsx)(y,{...Vg(y,l)}):(0,q.jsx)(x,{...Vg(x,l),"data-testid":e?`virtuoso-top-item-list`:`virtuoso-item-list`,ref:g,style:k,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=w(n+t.firstItemIndex,e.data,l);return T?(0,K.createElement)(b,{...Vg(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,K.createElement)(C,{...Vg(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Mg},u(e.index,l)):(0,K.createElement)(S,{...Vg(S,l),...Hg(S,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:h?Pg:Ng},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),Ig={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},Lg={outline:`none`,overflowX:`auto`,position:`relative`},Rg=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:void 0}),zg=(e,t,n=0)=>({...Rg(e),position:t?`relative`:`absolute`,top:t?-n:0}),Bg={position:wg(),top:0,width:`100%`,zIndex:1};function Vg(e,t){if(typeof e!=`string`)return{context:t}}function Hg(e,t){return{item:typeof e==`string`?void 0:t}}var Ug=K.memo(function(){let e=Qg(`HeaderComponent`),t=$g(`headerHeight`),n=Qg(`HeaderFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,Qg(`skipAnimationFrameInResizeObserver`)),i=Qg(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})}),Wg=K.memo(function(){let e=Qg(`FooterComponent`),t=$g(`footerHeight`),n=Qg(`HeaderFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,Qg(`skipAnimationFrameInResizeObserver`)),i=Qg(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})});function Gg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return K.memo(function({children:r,style:i,context:a,...o}){let s=n(`scrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`scrollerRef`),d=t(`horizontalDirection`)||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:m}=Og(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,q.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?Lg:Ig,...i},tabIndex:0,...o,...Vg(c,a),children:r})})}function Kg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return K.memo(function({children:r,style:i,context:a,...o}){let s=n(`windowScrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`totalListHeight`),d=t(`deviation`),f=t(`customScrollParent`),p=K.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=Og(s,l,c,t(`scrollerRef`),f);return Tg(()=>(h.current=f??p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,q.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?void 0:{height:u+d}},...o,...Vg(c,a),children:r})})}var qg=({children:e})=>{let t=K.useContext(bg),n=$g(`viewportHeight`),r=$g(`fixedItemHeight`),i=Qg(`alignToBottom`),a=Qg(`horizontalDirection`),o=Cm(K.useMemo(()=>Fp(n,e=>rh(e,a?`width`:`height`)),[n,a]),!0,Qg(`skipAnimationFrameInResizeObserver`));return K.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:Rg(i),children:e})},Jg=({children:e})=>{let t=K.useContext(bg),n=$g(`windowViewportRect`),r=$g(`fixedItemHeight`),i=Qg(`customScrollParent`),a=Qg(`useWindowScroll`),o=Qg(`topListHeight`),s=Om(n,i,Qg(`skipAnimationFrameInResizeObserver`)),c=Qg(`alignToBottom`);return K.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`window`,ref:s,style:zg(c,a,o),children:e})},Yg=({children:e})=>{let t=Qg(`TopItemListComponent`)??`div`,n=Qg(`headerHeight`),r={...Bg,marginTop:`${n}px`},i=Qg(`context`);return(0,q.jsx)(t,{style:r,...Vg(t,i),children:e})},{Component:Xg,useEmitter:Zg,useEmitterValue:Qg,usePublisher:$g}=yg(Ag,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,scrollIntoViewOnChange:`scrollIntoViewOnChange`,itemContent:`itemContent`,groupContent:`groupContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,groupCounts:`groupCounts`,topItemCount:`topItemCount`,firstItemIndex:`firstItemIndex`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,heightEstimates:`heightEstimates`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`HeaderFooterTag`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,horizontalDirection:`horizontalDirection`,skipAnimationFrameInResizeObserver:`skipAnimationFrameInResizeObserver`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,autoscrollToBottom:`autoscrollToBottom`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},K.memo(function(e){let t=Qg(`useWindowScroll`),n=Qg(`topItemsIndexes`).length>0,r=Qg(`customScrollParent`),i=Qg(`context`);return(0,q.jsxs)(r||t?t_:e_,{...e,context:i,children:[n&&(0,q.jsx)(Yg,{children:(0,q.jsx)(Fg,{showTopList:!0})}),(0,q.jsxs)(r||t?Jg:qg,{children:[(0,q.jsx)(Ug,{}),(0,q.jsx)(Fg,{}),(0,q.jsx)(Wg,{})]})]})})),e_=Gg({useEmitter:Zg,useEmitterValue:Qg,usePublisher:$g}),t_=Kg({useEmitter:Zg,useEmitterValue:Qg,usePublisher:$g}),n_=Xg,r_=lm(([e,t])=>({...e,...t}),Up(gg,lm(()=>{let e=$(e=>(0,q.jsxs)(`td`,{children:[`Item $`,e]})),t=$(null),n=$(e=>(0,q.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=$(null),i=$(null),a=$({}),o=$(kg),s=$(Bp),c=(e,t=null)=>am(Q(a,Z(t=>t[e]),Zp()),t);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c(`EmptyPlaceholder`),FillerRow:c(`FillerRow`),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`),TableBodyComponent:c(`TableBody`,`tbody`),TableComponent:c(`Table`,`table`),TableFooterComponent:c(`TableFoot`,`tfoot`),TableHeadComponent:c(`TableHead`,`thead`),TableRowComponent:c(`TableRow`,`tr`),GroupComponent:c(`Group`,`tr`)}}))),i_=({height:e})=>(0,q.jsx)(`tr`,{children:(0,q.jsx)(`td`,{style:{height:e}})}),a_=({height:e})=>(0,q.jsx)(`tr`,{children:(0,q.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),o_={overflowAnchor:`none`},s_={position:wg(),zIndex:2,overflowAnchor:`none`},c_=K.memo(function({showTopList:e=!1}){let t=m_(`listState`),n=m_(`computeItemKey`),r=m_(`firstItemIndex`),i=m_(`context`),a=m_(`isSeeking`),o=m_(`fixedHeaderHeight`),s=m_(`groupIndices`).length>0,c=m_(`itemContent`),l=m_(`groupContent`),u=m_(`ScrollSeekPlaceholder`)??i_,d=m_(`GroupComponent`),f=m_(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,h=n(m+r,t.data,i),g=e?m===0?0:p[m-1]:0;return a?(0,K.createElement)(u,{...Vg(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,K.createElement)(d,{...Vg(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...s_,top:o}},l(t.index,i)):(0,K.createElement)(f,{...Vg(f,i),...Hg(f,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:h,style:e?{...s_,top:o+g}:o_},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))})}),l_=K.memo(function(){let e=m_(`listState`),t=m_(`topItemsIndexes`).length>0,n=h_(`sizeRanges`),r=m_(`useWindowScroll`),i=m_(`customScrollParent`),a=h_(`windowScrollContainerState`),o=h_(`scrollContainerState`),s=i||r?a:o,c=m_(`trackItemSizes`),{callbackRef:l,ref:u}=Tm(n,m_(`itemSize`),c,s,m_(`log`),void 0,i,!1,m_(`skipAnimationFrameInResizeObserver`)),[d,f]=K.useState(0);p_(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=m_(`EmptyPlaceholder`),m=m_(`FillerRow`)??a_,h=m_(`TableBodyComponent`),g=m_(`paddingTopAddition`),_=m_(`statefulTotalCount`),v=m_(`context`);if(_===0&&p!=null)return(0,q.jsx)(p,{...Vg(p,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),b=e.offsetTop+g+d-y,x=e.offsetBottom,S=b>0?(0,q.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,q.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,q.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...Vg(h,v),children:[S,t&&(0,q.jsx)(c_,{showTopList:!0}),(0,q.jsx)(c_,{}),C]})}),u_=({children:e})=>{let t=K.useContext(bg),n=h_(`viewportHeight`),r=h_(`fixedItemHeight`),i=Cm(K.useMemo(()=>Fp(n,e=>rh(e,`height`)),[n]),!0,m_(`skipAnimationFrameInResizeObserver`));return K.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:Rg(!1),children:e})},d_=({children:e})=>{let t=K.useContext(bg),n=h_(`windowViewportRect`),r=h_(`fixedItemHeight`),i=m_(`customScrollParent`),a=m_(`useWindowScroll`),o=Om(n,i,m_(`skipAnimationFrameInResizeObserver`));return K.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`window`,ref:o,style:zg(!1,a),children:e})},{Component:f_,useEmitter:p_,useEmitterValue:m_,usePublisher:h_}=yg(r_,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,firstItemIndex:`firstItemIndex`,itemContent:`itemContent`,groupContent:`groupContent`,fixedHeaderContent:`fixedHeaderContent`,fixedFooterContent:`fixedFooterContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,topItemCount:`topItemCount`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,groupCounts:`groupCounts`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},K.memo(function(e){let t=m_(`useWindowScroll`),n=m_(`customScrollParent`),r=h_(`fixedHeaderHeight`),i=h_(`fixedFooterHeight`),a=m_(`fixedHeaderContent`),o=m_(`fixedFooterContent`),s=m_(`context`),c=Cm(K.useMemo(()=>Fp(r,e=>rh(e,`height`)),[r]),!0,m_(`skipAnimationFrameInResizeObserver`)),l=Cm(K.useMemo(()=>Fp(i,e=>rh(e,`height`)),[i]),!0,m_(`skipAnimationFrameInResizeObserver`)),u=n||t?__:g_,d=n||t?d_:u_,f=m_(`TableComponent`),p=m_(`TableHeadComponent`),m=m_(`TableFooterComponent`),h=a?(0,q.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...Vg(p,s),children:a()},`TableHead`):null,g=o?(0,q.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...Vg(m,s),children:o()},`TableFoot`):null;return(0,q.jsx)(u,{...e,...Vg(u,s),children:(0,q.jsx)(d,{children:(0,q.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...Vg(f,s),children:[h,(0,q.jsx)(l_,{},`TableBody`),g]})})})})),g_=Gg({useEmitter:p_,useEmitterValue:m_,usePublisher:h_}),__=Kg({useEmitter:p_,useEmitterValue:m_,usePublisher:h_}),v_={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},y_={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:b_,floor:x_,max:S_,min:C_,round:w_}=Math;function T_(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function E_(e){return{...y_,items:e}}function D_(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function O_(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}var k_=lm(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:m,propsReady:h},{customScrollParent:g,useWindowScroll:_,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b},x])=>{let S=$(0),C=$(0),w=$(v_),T=$({height:0,width:0}),E=$({height:0,width:0}),D=om(),O=om(),k=$(0),A=$(null),j=$({column:0,row:0}),M=om(),N=om(),P=$(!1),F=$(0),I=$(!0),ee=$(!1),L=$(!1);Wp(Q(m,nm(F),X(([e,t])=>!jh(t))),()=>{Gp(I,!1)}),Wp(Q(fm(m,I,E,T,F,ee),X(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{if(e===void 0){Gp(I,!0);return}Gp(ee,!0),kh(1,()=>{Gp(D,e)}),Jp(Q(l),()=>{Gp(t,[0,0]),Gp(I,!0)})}),Y(Q(N,X(e=>e!=null&&e.scrollTop>0),Qp(0)),C),Wp(Q(m,nm(N),X(([,e])=>e!=null)),([,e])=>{e&&(Gp(T,e.viewport),Gp(E,e.item),Gp(j,e.gap),e.scrollTop>0&&(Gp(P,!0),Jp(Q(l,em(1)),e=>{Gp(P,!1)}),Gp(c,{top:e.scrollTop})))}),Y(Q(T,Z(({height:e})=>e)),d),Y(Q(fm(pm(T,D_),pm(E,D_),pm(j,(e,t)=>e!==void 0&&e.column===t.column&&e.row===t.row),pm(l)),Z(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),M),Y(Q(fm(pm(S),r,pm(j,O_),pm(E,D_),pm(T,D_),pm(A),pm(C),pm(P),pm(I),pm(F)),X(([,,,,,,,e])=>!e),Z(([e,[t,n],r,i,a,o,s,,c,l])=>{let{column:u,row:d}=r,{height:f,width:p}=i,{width:m}=a;if(s===0&&(e===0||m===0))return v_;if(p===0){let t=Ah(l,e);return E_(T_(t,t+Math.max(s-1,0),o))}let h=A_(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*x_((t+d)/(f+d)),_=h*b_((n+d)/(f+d))-1,_=C_(e-1,S_(_,h-1)),g=C_(_,S_(0,g))):(g=0,_=-1);let v=T_(g,_,o),{bottom:y,top:b}=j_(a,r,i,v),x=b_(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),Y(Q(A,X(e=>e!==null),Z(e=>e.length)),S),Y(Q(fm(T,E,w,j),X(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),Z(([e,t,{items:n},r])=>{let{bottom:i,top:a}=j_(e,r,t,n);return[a,i]}),Zp(Qm)),t);let te=$(!1);Y(Q(l,nm(te),Z(([e,t])=>t||e!==0)),te);let ne=sm(Q(fm(w,S),X(([{items:e}])=>e.length>0),nm(te),X(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&e.offsetBottom===0&&e.items.length===t)&&r}),Z(([[,e]])=>e-1),Zp())),re=sm(Q(pm(w),X(({items:e})=>e.length>0&&e[0].index===0),Qp(0),Zp())),ie=sm(Q(pm(w),nm(P),X(([{items:e},t])=>e.length>0&&!t),Z(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),Zp(Zm),tm(0)));Y(ie,p.scrollSeekRangeChanged),Y(Q(D,nm(T,E,S,j),Z(([e,t,n,r,i])=>{let a=Eh(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=S_(0,l,C_(r-1,l));let u=M_(t,i,n,l);return o===`end`?u=w_(u-t.height+n.height):o===`center`&&(u=w_(u-t.height/2+n.height/2)),c!==void 0&&c!==0&&(u+=c),{behavior:s,top:u}})),c);let ae=am(Q(w,Z(e=>e.offsetBottom+e.bottom)),0);return Y(Q(b,Z(e=>({height:e.visibleHeight,width:e.visibleWidth}))),T),{customScrollParent:g,data:A,deviation:k,footerHeight:i,gap:j,headerHeight:a,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:n,restoreStateFrom:N,scrollBy:o,scrollContainerState:s,scrollHeight:O,scrollTo:c,scrollToIndex:D,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:_,viewportDimensions:T,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b,...p,gridState:w,horizontalDirection:L,initialTopMostItemIndex:F,totalListHeight:ae,...f,endReached:ne,propsReady:h,rangeChanged:ie,startReached:re,stateChanged:M,stateRestoreInProgress:P,...x}},Up(Gh,km,zh,lg,wh,ug,vm));function A_(e,t,n){return S_(1,x_((e+n)/(x_(t)+n)))}function j_(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=M_(e,t,n,r[0].index);return{bottom:M_(e,t,n,r[r.length-1].index)+i,top:a}}function M_(e,t,n,r){let i=x_(r/A_(e.width,n.width,t.column)),a=i*n.height+S_(0,i-1)*t.row;return a>0?a+t.row:a}var N_=lm(([e,t])=>({...e,...t}),Up(k_,lm(()=>{let e=$(e=>`Item ${e}`),t=$({}),n=$(null),r=$(`virtuoso-grid-item`),i=$(`virtuoso-grid-list`),a=$(kg),o=$(`div`),s=$(Bp),c=(e,n=null)=>am(Q(t,Z(t=>t[e]),Zp()),n),l=$(!1),u=$(!1);return Y(pm(u),l),{components:t,computeItemKey:a,context:n,FooterComponent:c(`Footer`),HeaderComponent:c(`Header`),headerFooterTag:o,itemClassName:r,ItemComponent:c(`Item`,`div`),itemContent:e,listClassName:i,ListComponent:c(`List`,`div`),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`,`div`)}}))),P_=K.memo(function(){let e=V_(`gridState`),t=V_(`listClassName`),n=V_(`itemClassName`),r=V_(`itemContent`),i=V_(`computeItemKey`),a=V_(`isSeeking`),o=H_(`scrollHeight`),s=V_(`ItemComponent`),c=V_(`ListComponent`),l=V_(`ScrollSeekPlaceholder`),u=V_(`context`),d=H_(`itemDimensions`),f=H_(`gap`),p=V_(`log`),m=V_(`stateRestoreInProgress`),h=H_(`reportReadyState`),g=Cm(K.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n!==null){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:G_(`column-gap`,getComputedStyle(e).columnGap,p),row:G_(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return Tg(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,q.jsx)(c,{className:t,ref:g,...Vg(c,u),"data-testid":`virtuoso-item-list`,style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let o=i(t.index,t.data,u);return a?(0,q.jsx)(l,{...Vg(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,K.createElement)(s,{...Vg(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),F_=K.memo(function(){let e=V_(`HeaderComponent`),t=H_(`headerHeight`),n=V_(`headerFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,!1),i=V_(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})}),I_=K.memo(function(){let e=V_(`FooterComponent`),t=H_(`footerHeight`),n=V_(`headerFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,!1),i=V_(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})}),L_=({children:e})=>{let t=K.useContext(xg),n=H_(`itemDimensions`),r=H_(`viewportDimensions`),i=Cm(K.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return K.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,q.jsx)(`div`,{ref:i,style:Rg(!1),children:e})},R_=({children:e})=>{let t=K.useContext(xg),n=H_(`windowViewportRect`),r=H_(`itemDimensions`),i=V_(`customScrollParent`),a=V_(`useWindowScroll`),o=Om(n,i,!1);return K.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,q.jsx)(`div`,{ref:o,style:zg(!1,a),children:e})},{Component:z_,useEmitter:B_,useEmitterValue:V_,usePublisher:H_}=yg(N_,{optional:{context:`context`,totalCount:`totalCount`,overscan:`overscan`,itemContent:`itemContent`,components:`components`,computeItemKey:`computeItemKey`,data:`data`,initialItemCount:`initialItemCount`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`headerFooterTag`,listClassName:`listClassName`,itemClassName:`itemClassName`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,restoreStateFrom:`restoreStateFrom`,initialTopMostItemIndex:`initialTopMostItemIndex`,increaseViewportBy:`increaseViewportBy`},methods:{scrollTo:`scrollTo`,scrollBy:`scrollBy`,scrollToIndex:`scrollToIndex`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,stateChanged:`stateChanged`,readyStateChanged:`readyStateChanged`}},K.memo(function({...e}){let t=V_(`useWindowScroll`),n=V_(`customScrollParent`),r=n||t?W_:U_,i=n||t?R_:L_,a=V_(`context`);return(0,q.jsx)(r,{...e,...Vg(r,a),children:(0,q.jsxs)(i,{children:[(0,q.jsx)(F_,{}),(0,q.jsx)(P_,{}),(0,q.jsx)(I_,{})]})})})),U_=Gg({useEmitter:B_,useEmitterValue:V_,usePublisher:H_}),W_=Kg({useEmitter:B_,useEmitterValue:V_,usePublisher:H_});function G_(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,hm.WARN),t===`normal`?0:parseInt(t??`0`,10)}function K_(e){let t=(0,J.c)(9),{option:n,checked:r,renderOption:i}=e,a=r||void 0,o=n.value,s;t[0]!==r||t[1]!==n||t[2]!==i?(s=i?i(n,{checked:r}):n.label,t[0]=r,t[1]=n,t[2]=i,t[3]=s):s=t[3];let c;return t[4]!==n.disabled||t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,q.jsx)(Oe,{"data-slot":`select-option`,"data-checked":a,value:o,disabled:n.disabled,children:s}),t[4]=n.disabled,t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}var q_=K.memo(K_);function J_(e,...t){return typeof e==`function`?e(...t):e}function Y_(e){switch(e.kind){case`select-all`:return`Select all`;case`deselect-all`:return`Deselect all`;case`select-matching`:return`Select ${e.items.length} matching`;case`deselect-matching`:return`Deselect ${e.items.length} matching`}}function X_(e){let t=(0,J.c)(55),{options:n,value:r,onChange:i,multiple:a,maxSelections:o,allowSelectNone:s,pinSelected:c,compactChipTrigger:l,placeholder:u,disabled:d,fullWidth:f,className:p,id:m,renderOption:h,renderEmpty:g,virtualizeThreshold:_,virtualizedHeight:v}=e,y=c!==void 0&&c,b=l!==void 0&&l,x=u===void 0?`Select...`:u,S=d!==void 0&&d,C=f!==void 0&&f,w=g===void 0?`Nothing found.`:g,T=_===void 0?200:_,E=v===void 0?200:v,D;t[0]!==s||t[1]!==o||t[2]!==a||t[3]!==i||t[4]!==n||t[5]!==y||t[6]!==r?(D={options:n,value:r,onChange:i,multiple:a,maxSelections:o,allowSelectNone:s,pinSelected:y},t[0]=s,t[1]=o,t[2]=a,t[3]=i,t[4]=n,t[5]=y,t[6]=r,t[7]=D):D=t[7];let O=Pr(D),k;t[8]!==s||t[9]!==o||t[10]!==a||t[11]!==i?(k=e=>{if(!a){if(e==null&&!s)return;i(e);return}let t=Array.isArray(e)?e:[];o!=null&&t.length>o&&(t=t.slice(-o)),i(t)},t[8]=s,t[9]=o,t[10]=a,t[11]=i,t[12]=k):k=t[12];let A=k,j;if(t[13]!==O.bulkActions){if(j=O.bulkActions.map(Z_),j.length>0){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(Fe,{"data-slot":`select-separator`},`_bulk_separator`),t[15]=e):e=t[15],j.push(e)}t[13]=O.bulkActions,t[14]=j}else j=t[14];let M;t[16]!==O.pinnedCount||t[17]!==O.visibleOptions.length?(M=e=>O.pinnedCount>0&&e===O.pinnedCount&&O.pinnedCount<O.visibleOptions.length?(0,q.jsx)(Fe,{"data-slot":`select-separator`},`_pinned_separator`):null,t[16]=O.pinnedCount,t[17]=O.visibleOptions.length,t[18]=M):M=t[18];let N=M,P;t[19]!==j||t[20]!==O||t[21]!==N||t[22]!==h||t[23]!==T||t[24]!==E?(P=()=>{if(O.visibleOptions.length>T)return(0,q.jsx)(n_,{"data-slot":`select-list`,style:{height:E},totalCount:O.visibleOptions.length,overscan:50,itemContent:e=>{let t=O.visibleOptions[e];return(0,q.jsxs)(q.Fragment,{children:[e===0&&j,N(e),(0,q.jsx)(q_,{option:t,checked:O.isChecked(t.value),renderOption:h})]})}});let e=O.visibleOptions.flatMap((e,t)=>{let n=N(t),r=(0,q.jsx)(q_,{option:e,checked:O.isChecked(e.value),renderOption:h},String(e.value));return n?[n,r]:[r]});return(0,q.jsxs)(q.Fragment,{children:[j,e]})},t[19]=j,t[20]=O,t[21]=N,t[22]=h,t[23]=T,t[24]=E,t[25]=P):P=t[25];let F=P,I;t[26]!==O.labelOf||t[27]!==x?(I=e=>{let t=Array.isArray(e)?e:e==null?[]:[e];return t.length===0?(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:x}):(0,q.jsx)(Fr,{items:t.map(O.labelOf),max:3})},t[26]=O.labelOf,t[27]=x,t[28]=I):I=t[28];let ee=I,L=e[`data-testid`],te;t[29]===O?te=t[30]:(te=e=>O.labelOf(e),t[29]=O,t[30]=te);let ne=b?ee:void 0,re;t[31]!==p||t[32]!==C?(re=G({"w-full":C},p),t[31]=p,t[32]=C,t[33]=re):re=t[33];let ie=O.searchQuery,ae=O.setSearchQuery,oe=O.open,se=O.setOpen,ce;t[34]===w?ce=t[35]:(ce=J_(w),t[34]=w,t[35]=ce);let le;t[36]!==S||t[37]!==m||t[38]!==O.open||t[39]!==O.searchQuery||t[40]!==O.setOpen||t[41]!==O.setSearchQuery||t[42]!==x||t[43]!==L||t[44]!==te||t[45]!==ne||t[46]!==re||t[47]!==ce?(le={"data-slot":`select-root`,"data-testid":L,displayValue:te,renderValue:ne,placeholder:x,className:re,shouldFilter:!1,search:ie,onSearchChange:ae,open:oe,onOpenChange:se,emptyState:ce,disabled:S,id:m},t[36]=S,t[37]=m,t[38]=O.open,t[39]=O.searchQuery,t[40]=O.setOpen,t[41]=O.setSearchQuery,t[42]=x,t[43]=L,t[44]=te,t[45]=ne,t[46]=re,t[47]=ce,t[48]=le):le=t[48];let ue=le,de;return t[49]!==ue||t[50]!==A||t[51]!==a||t[52]!==F||t[53]!==r?(de=a?(0,q.jsx)(we,{...ue,multiple:!0,value:r,onValueChange:A,children:F()}):(0,q.jsx)(we,{...ue,multiple:!1,value:r,onValueChange:A,children:F()}),t[49]=ue,t[50]=A,t[51]=a,t[52]=F,t[53]=r,t[54]=de):de=t[54],de}function Z_(e){let t=`enabled`in e?!e.enabled:e.items.length===0;return(0,q.jsx)(ie,{"data-slot":`select-bulk`,className:`pl-6 m-1 py-1`,value:`__bulk_${e.kind}`,disabled:t,onSelect:()=>{t||e.run()},children:Y_(e)},e.kind)}var Q_=Vn,$_=Wn,ev=zn,tv=Gn,nv=e=>{let t=(0,J.c)(13),{error:n,badData:r}=e;if(n instanceof it){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(gs,{children:`Bad Data`}),t[0]=e):e=t[0];let i;t[1]===n.issues?i=t[2]:(i=n.issues.map(iv),t[1]=n.issues,t[2]=i);let a;t[3]===i?a=t[4]:(a=(0,q.jsx)(`div`,{className:`text-md prose dark:prose-invert`,children:(0,q.jsx)(`ul`,{children:i})}),t[3]=i,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(tv,{className:`py-2 text-[0.84375rem]`,children:`View Data:`}),t[5]=o):o=t[5];let s;t[6]===r?s=t[7]:(s=(0,q.jsx)(Q_,{type:`single`,collapsible:!0,children:(0,q.jsxs)(ev,{value:`item-1`,className:`text-muted-foreground border-muted-foreground-20`,children:[o,(0,q.jsx)($_,{className:`text-[0.84375rem]`,children:(0,q.jsx)(gi,{data:r})})]})}),t[6]=r,t[7]=s);let c;return t[8]!==a||t[9]!==s?(c=(0,q.jsxs)(_s,{variant:`destructive`,children:[e,a,s]}),t[8]=a,t[9]=s,t[10]=c):c=t[10],c}let i;return t[11]===n.message?i=t[12]:(i=(0,q.jsx)(`div`,{children:n.message}),t[11]=n.message,t[12]=i),i};function rv(e,t){return(0,q.jsx)(nv,{error:e,badData:t})}function iv(e){let t=e.path.join(`.`);return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`span`,{className:`font-bold`,children:t}),`: `,e.message]},t)}var av=3,ov=150;function sv({hostElement:e,plugin:t,children:n,getInitialValue:r},i){let[o,c]=(0,K.useState)(n),[l,u]=(0,K.useState)(r()),{theme:d}=Ro(),[f,p]=(0,K.useState)(()=>t.validator.safeParse(de(e))),[m,h]=(0,K.useState)(0);(0,K.useImperativeHandle)(i,()=>({reset:()=>{u(r()),p(t.validator.safeParse(de(e))),h(e=>e+1)},setChildren:e=>{c(e)}})),Lt(e,fs.TYPE,t=>{t.detail.element===e&&u(t.detail.value)}),(0,K.useEffect)(()=>{let n=new MutationObserver(n=>{n.some(e=>e.type===`attributes`&&e.attributeName?.startsWith(`data-`))&&p(t.validator.safeParse(de(e)))});return n.observe(e,{attributes:!0}),()=>{n.disconnect()}},[e,t.validator]);let g=s(t=>{u(n=>{let r=Pt.asUpdater(t)(n);return wp(r,n)||e.dispatchEvent(ds(r,e)),r})}),_=(0,K.useMemo)(()=>{if(!t.functions)return{};let n={};for(let[r,i]of Rt.entries(t.functions)){let{input:t,output:o}=i;n[r]=async(...n)=>{zt(n.length<=1,`Plugin functions only supports a single argument. Called ${r}`);let i=on(),s=Pe.findElementThroughShadowDOMs(e)?.id,c=s?Pe.parse(s):null;if(c&&!i){let e=a.get(se),t=e.cellRuntime[c],n=e.cellData[c];if(Ce({executionTime:t.runElapsedTimeMs??n.lastExecutionTime,status:t.status,errored:t.errored,interrupted:t.interrupted,stopped:t.stopped}))throw new as}else W.warn(`Cell ID ${c} cannot be found`);let l=mv(t,n[0]);for(let t=0;;t++){let n=_v(e);zt(n,`Object ID should exist`);let i=await Tt.request({args:l,functionName:r,namespace:n});if(i.status.code===`ok`)return mv(o,i.return_value);let a=i.found===!1;if(a&&t<av){let e=ov*2**t;await new Promise(t=>setTimeout(t,e));continue}throw W.error(i.status),a?new rs:Error(i.status.message||`Unknown error`)}}}return n},[t.functions,e,m]);return f.success?(0,q.jsx)(kn,{children:(0,q.jsx)(`div`,{className:`contents ${d}`,children:(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(`div`,{}),children:(0,q.jsx)(Ri,{children:t.render({setValue:g,value:l,data:f.data,children:o,host:e,functions:_})})})})}):rv(f.error,Rt.mapValues(e.dataset,e=>typeof e==`string`?fe(e):e))}var cv=K.forwardRef(sv),lv=new Map,uv=`__custom_marimo_element__`;function dv(e){let t=class extends HTMLElement{observer;root;mounted=!1;pluginRef=(0,K.createRef)();__type__=uv;constructor(){super(),this.attachShadow({mode:`open`}),this.copyStyles(),this.observer=new MutationObserver(()=>{this.pluginRef.current?.setChildren(this.getChildren())})}connectedCallback(){this.isLightDOMChildOfMarimoElement()||(this.mounted||(zt(this.shadowRoot,`Shadow root should exist`),this.root&&this.root.unmount(),this.root=Ul.createRoot(this.shadowRoot),this.mountReactComponent()),this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){this.observer.disconnect(),this.root?.unmount(),this.mounted&&=!1}isLightDOMChildOfMarimoElement(){let e=this.parentElement;for(;e;){if(pv(e))return!0;e=e.parentElement}return!1}reset(){this.dispatchEvent(ds(fe(this.dataset.initialValue),this)),this.rerender()}rerender(){this.pluginRef.current?.reset()}getChildren(){return this.children.length===0?null:this.children.length===1?Zo({html:this.innerHTML,alwaysSanitizeHtml:!1}):Array.from(this.children).map((e,t)=>(0,q.jsx)(K.Fragment,{children:Zo({html:e.outerHTML,alwaysSanitizeHtml:!1})},t))}async mountReactComponent(){this.mounted=!0,zt(this.root,`Root must be defined`),this.root.render((0,q.jsx)(o,{store:a,children:(0,q.jsx)(jf,{children:(0,q.jsx)(cv,{hostElement:this,plugin:e,ref:this.pluginRef,getInitialValue:()=>ae(this,bt.INSTANCE),children:this.getChildren()})})}))}async copyStyles(){let t=this.shadowRoot;if(zt(t,`Shadow root should exist`),!this.isAdoptedStyleSheetsSupported()){W.warn(`adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser.`),this.copyStylesFallback();return}let n=Array.from(document.styleSheets).filter(e=>e.ownerNode instanceof HTMLElement&&e.ownerNode.dataset.viteDevId?!0:fv(e));for(let e of n){let t=e.href??(e.ownerNode instanceof HTMLElement?e.ownerNode.dataset.viteDevId:void 0)??e.title;if(t&&!lv.has(t)){let n=new CSSStyleSheet;try{n.replaceSync(Array.from(e.cssRules).map(e=>e.cssText.includes(`@import`)?``:e.cssText).join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-page-Dnv5d4Ek.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-Dc9HkKI2.js","./react-CUdNIagt.js","./compiler-runtime-BQ9S8nyo.js","./cells-DIjn-wIE.js","./react-dom-CKsE8sC1.js","./schemas-BL-NsLlF.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./config-BdH5RvM0.js","./_baseMerge-CQpUq7ep.js","./isArrayLikeObject-DnwgSs_Z.js","./useEventListener-CUPWI_1X.js","./objects-snlMn4yk.js","./jsx-runtime-B74pBk57.js","./invariant-Ci2dTZ72.js","./utils-B4K466FK.js","./session-ztCnZJHI.js","./config-D7CP5wR5.js","./Deferred-CrTnjj37.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./fullscreen-3wS6IaIC.js","./dist-DFI04FfI.js","./menu-items-D-vbZmqL.js","./use-restore-focus-D0UtBPD6.js","./select-CWHHoM53.js","./button-qFeU84ax.js","./check-Wea4hZ6R.js","./createLucideIcon-rHn2EdoM.js","./useNumberFormatter-C4-_TnkF.js","./context-BFOBKCJB.js","./circle-CzTMKZwz.js","./toast-DXkezxWI.js","./tooltip-CamoSiGF.js","./paths-CzfpItSz.js","./useLifecycle-DKSBdWUf.js","./toDate-BbJ1_N2T.js","./database-zap-CrkOvbyN.js","./write-secret-modal-wFgr-1dA.js","./alert-dialog-BsB0FYEL.js","./input-D4bMj5Nb.js","./numbers-DyJNv6Vk.js","./once-Haz_uxEL.js","./arrays-BqUx5USx.js","./useDebounce-DMbg9X18.js","./use-toast-CC89xOwH.js","./requests-yTHMxhVa.js","./uuid-k9DpjH68.js","./plus-gbN72xHe.js","./trash-2-BJG-7Qob.js","./preload-helper-uBIymjUX.js","./dist-Cny7_yZb.js","./dist-DBMV4gqt.js","./capabilities-BqUNf14U.js","./cjs-C49f7GXV.js","./createReducer-CI8rlZE9.js","./dist-qhAY4L2r.js","./marked.esm-B_3iMIUq.js","./strings-LjhpYwmx.js","./dist-BOfh4hMd.js","./badge-DFf033uX.js","./dist-LSsCJjA3.js","./dist-1tmpVXyz.js","./dist-DtH-7lot.js","./dist-BmExfiwX.js","./dist-DusFODSa.js","./stex-Dc5bKD4z.js","./useTheme-CnWB5G1X.js","./useAsyncData-DucTwMkf.js","./purify.es--06brOip.js","./cells-0PFKL3SH.css","./ErrorBoundary-CHPy195L.js","./copy-icon-DQuttmjH.js","./copy-RyCOE8jo.js","./copy-B--GzTEX.js","./dropdown-menu-Crx6knLg.js","./chevron-right-DOPs2jx8.js","./components-DJ4W2IzC.js","./chart-no-axes-column-B6FT5Xvu.js","./file-mCR_SMtq.js","./youtube-2MBs34oQ.js","./link-BF4dGmOQ.js","./package-BeYhVWvM.js","./react-icons.esm-C6SMwKZH.js","./error-banner-EjYF86IQ.js","./errors-D9vyuMar.js","./icons-CVdkfEA3.js","./github-khsXwCtv.js","./marimo-icons-B_1oPpIE.js","./links-Dz_7YAlE.js","./tree-actions-DpLu3KP0.js","./eye-off-CfkK-QS3.js","./refresh-cw-CEGpOrzd.js","./circle-play-X3K8DkEc.js","./external-link-D2lKwXyB.js","./file-icons-e7tmeyP-.js","./file-headphone-DKocX1z0.js","./image-CTch9x2I.js","./spinner-CGdRKCnw.js","./file-name-input-CUxuxMjv.js","./shim-5li_pJY_.js","./extends-CvVTau-c.js","./pathUtils-BKesuhdv.js","./semaphore-BjoL5P0h.js","./app-config-button-BAQBx4II.js","./ai-model-dropdown-B547mMnB.js","./get-DjNf4SIX.js","./has-sKqQhP6r.js","./_hasPath-BmRQipI0.js","./pair-DrvWpc2_.js","./state-BQjr5g9m.js","./config-2Nts63h2.js","./switch-1_rRTvtc.js","./tabs-Dx9NomUx.js","./triangle-alert-BeRqoThc.js","./shell-BSnvn9t7.js","./api-C5RyTgDk.js","./kbd-BnUiViRu.js","./alert-MrQXRIin.js","./filename-BlDwe-3Z.js","./table-Dg1KxH-q.js","./renderShortcut-BoDtLl9Q.js","./azure-Dcn397wY.js","./card-BYZGhhhx.js","./settings-DlKTeV_0.js","./Inputs-BlygJyl1.js","./Inputs-CV_Lf9-w.css","./dates-Cv2NS8h4.js","./en-US-B4U3zuiu.js","./isValid-BEbe1fFs.js","./useInterval-VrfTcgt8.js","./run-page-DWUXQLtA.js","./JsonOutput-BdpXVhxV.js","./download-DBXnO5qS.js","./html-to-image-D30-tyL0.js","./LazyAnyLanguageCodeMirror-91eGNw7v.js","./list-filter-CTg19675.js","./markdown-renderer-DT34-_9e.js","./chunk-YOKDWASO-84E-_nIR.js","./micromark-factory-space-D9Dr-k4J.js","./markdown-renderer-DjIHoF9Z.css","./ellipsis-CLMWXUqY.js","./message-circle-OTHnVlxO.js","./MarimoErrorOutput-K6C_dFmm.js","./hat-glasses-DVgK5i5l.js","./datasource-Ccdyd-O2.js","./RenderHTML-ClrDrx3F.js","./useRunCells-k0IpRLOw.js","./useInstallPackage-DO1N1lCX.js","./state-OJSVjDAX.js","./cell-link-CEmc-Cr5.js","./useDateFormatter-CjgScv5a.js","./tooltip-BQ9qHrrN.js","./vega-loader.browser-CLRkNgm7.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-D5bOh7g6.js","./objectWithoutPropertiesLoose-Do6ywDBO.js","./useIframeCapabilities-CnQhRi25.js","./utils-CaQYvazl.js","./formats-Bbyf-azh.js","./react-resizable-panels.browser.esm-BL2E7f5c.js","./JsonOutput-B0GmlMnR.css","./arrow-left-DzPJ79ZB.js","./panels-HoIP3cDr.js","./state-0X7um_9u.js","./_baseSet-Bpdo9AvU.js","./state-BsVxWYGT.js","./blob-BKNVs7hM.js","./share-BZW3tzEX.js","./events-CbeVJ6OD.js","./layout-C8pvkupF.js","./code-xml-CW65k2pN.js","./code-DW4kNwKG.js","./readonly-python-code-CPhK2DqE.js","./esm-3WkPrffD.js","./useAddCell-DCbFUjci.js","./useDeleteCell-BJ6lgiBJ.js","./trash-BKbZYRHl.js","./prop-types-Djf4O40e.js","./floating-outline-yJVtlHMv.js","./process-output-gyG2tEQt.js","./code-visibility-DbW2QNho.js","./name-cell-input-E95KyKqv.js","./name-cell-input-ujOhus_y.css","./esm-CQuf--zt.js","./dist-DDpltFEG.js","./dist-DOsgOC8X.js","./dist-DF6q90J2.js","./dist-CWcX5iL_.js","./dist-COseLvbK.js","./dist-uBfhY3mF.js","./dist-CdpiHIsZ.js","./dist-Ceg_d-nu.js","./dist-C08rfu50.js","./dist-CJ4Ekjf-.js","./dist-C9ULdZil.js","./dist-DmUAWIff.js","./dist-BCteMNTR.js","./apl-CYIAEF37.js","./asciiarmor-CF6FHpQl.js","./asn1-CmtZ6NID.js","./brainfuck-vE42J6oQ.js","./cobol-ttQu-eUm.js","./clike-Bo1_pR8B.js","./clojure-1zb6N0Kd.js","./css-aD3t-znF.js","./cmake-DSEb40G9.js","./coffeescript-CcHmp8ZW.js","./commonlisp-DHrixoxv.js","./cypher-q6-coHOK.js","./python-C4CVWZ7v.js","./crystal-fOwNIMzy.js","./d-Drt6ZXrF.js","./diff-CYBnW6ZU.js","./dtd-DqGG8R4P.js","./dylan-BTCYgsmh.js","./ecl-BPsxRGqR.js","./eiffel-BCguJEP-.js","./elm-DnNeI1M2.js","./erlang-DkHPV6ru.js","./factor-ZZBBZpXK.js","./simple-mode-DXiLM1-G.js","./forth-DUDizG3o.js","./fortran-BarbOvgW.js","./mllike-BKN6OcTc.js","./gas-mybzrfIH.js","./gherkin-BlnXaZZf.js","./groovy-cYuFC_ot.js","./haskell-CuLp9g3a.js","./haxe-CiIUZbdX.js","./idl-BHq7WyPV.js","./javascript-D-FtdkNC.js","./julia-CoYYMTcZ.js","./livescript-C1gEZ5Hk.js","./lua-DXBxhmso.js","./mirc-CTGUd79I.js","./mathematica-CwlrU_TQ.js","./modelica-DZs5SjV_.js","./mumps-BNg2Yq-1.js","./mbox-skR0V6cu.js","./nsis-DWBX_aOH.js","./ntriples-Ck5rp6GE.js","./octave-BRpd3hBF.js","./oz-BUEZmvHT.js","./pascal-DBfxUwpj.js","./perl-v9vsztCj.js","./pig-CrKTIB-m.js","./powershell-89xdb5K_.js","./properties-DaUFoXFR.js","./protobuf-Ci5XvpF4.js","./pug-DPY-Ajan.js","./puppet-Da8ZxG7z.js","./q-BjtI5Irp.js","./r-vSi6pWDr.js","./rpm-Cv5HmAkX.js","./ruby-CKIsIBWn.js","./sas-D3-6PWmJ.js","./scheme-DqTb0ELD.js","./shell-DySzVBqR.js","./sieve-CoBbN2aF.js","./smalltalk-CJJAzHnb.js","./sparql-CjwbV0fX.js","./stylus-uh0Gd-Iz.js","./swift-D5IK5OrP.js","./verilog-DPWRmpYS.js","./tcl-BvqzOD3a.js","./textile--JQHE1pJ.js","./toml-lWmHdWv5.js","./troff-r7W702V9.js","./ttcn-1CwPIugQ.js","./ttcn-cfg-CHYEAF6D.js","./turtle-D_5eCUwg.js","./webidl-CNY2gQL0.js","./vb-Vd6lTutg.js","./vbscript-CcW6E3ma.js","./velocity-CuSicjhq.js","./vhdl-sLYad3YP.js","./xquery-d3Qdoigy.js","./yacas-BjDXhrkW.js","./z80-z4BkVl0y.js","./mscgen-Bo5N9WUj.js","./dist-mPh3sAH5.js","./readonly-code-display-DVP0M5ji.js","./layout-D-WxHzKd.css","./package-data-BwaspaKJ.js","./requests-DFPPfagc.js","./state-D-WJnPU6.js","./ws-BXWY541V.js","./runs-bQecbisg.js","./panels-DuFuRfRM.css","./house-CbkYoQ5W.js","./edit-page-HpmTxp7Y.js","./arrow-right-xoNT7eIQ.js","./useBoolean-C44TyhOc.js","./useCellActionButton-Dd3_WkrO.js","./multi-icon-DWzZu-9u.js","./multi-icon-D129IBvu.css","./useSplitCell-AE67LfQn.js","./circle-check-BF80fXZd.js","./useNotebookActions-D7J_QMJo.js","./globe-CmFhHoL1.js","./components-BgOwsosg.js","./square-DvOKKLHZ.js","./markdown-export-DzhB1FrN.js","./feedback-button-Ck0Mp9so.js","./error-entries-BB7FNt10.js","./skeleton-CKpBjoLm.js","./add-connection-dialog-BOV2U067.js","./coerce-CZiN7rQ_.js","./hooks-ZWyI6fMV.js","./add-cell-with-ai-sgoMoiI9.js","./fileToBase64-aqhlf6Jj.js","./clipboard-paste-D0gau9Xw.js","./cell-editor-CEABNkmY.js","./save-D4cG4pP2.js","./dist-AelfNxj6.js","./formatting-DvWLhH3Q.js","./panel-accordion-state-_r3T-AGo.js","./loro_wasm_bg-oTW3uoGB.js","./cell-editor-C-58hQJU.css","./RunButton-BA02OhJe.js","./rotate-ccw-se3Oa1US.js","./rotate-cw-BcRERxHa.js","./square-function-DyFIOFp5.js","./CellStatus-CRNbTOIs.js","./ban-3HAzm9Fj.js","./workflow-nBi9HGeO.js","./CellStatus-2Psjnl5F.css","./useDependencyPanelTab-CyNU7lXE.js","./panel-context-BPaQeOuV.js","./sandbox-panel-CcKUdNwc.js","./arrow-down-BFFrjzad.js","./kiosk-mode-Cvh6wszH.js","./edit-page-Dstp9NQ5.css","./gallery-page-D70P7AOr.js","./chat-ui-C5Ulv8Sh.js","./bot-message-square-BfGaNy9r.js","./chat-display-Bpl-2umz.js","./isEmpty-BJso7_X0.js","./glide-data-editor-YqrbKh4R.js","./glide-utils-BatnVnxk.js","./data-grid-types-DgHVN_Zz.js","./dist-DoyTOIOd.js","./click-outside-container-CHoodRk9.js","./glide-data-editor-CDvI1PvV.css","./ConnectedDataExplorerComponent-CDPp5q3i.js","./spec-C09S5bT-.js","./react-vega-Jq3Jd7eX.js","./linear-0eij_aAG.js","./init-ZlXS9mIS.js","./cubic-DELhj3Tx.js","./ordinal-BdBDtYTt.js","./time-MgToa8VM.js","./range-EplFIxc7.js","./path-BCdg30Y0.js","./math-Bi_r_ZWc.js","./arc-Yxk2k_uq.js","./array-BifhSqXX.js","./step-CqgdNM3U.js","./line-io_go0HI.js","./colors-Cg5Vh3br.js","./treemap-BfjIY-m6.js","./Plot-CNtRAZBG.js","./vega-component-Bw0srfks.js","./useDeepCompareMemoize-DSlTt6u_.js","./use-vega-container-remeasure-CS3c8wGN.js","./swiper-component-C40kEQTQ.js","./swiper-component-BCzCewjh.css","./slides-BQsAdh8K.css","./ImageComparisonComponent-pCLPT6RA.js","./mermaid-Z_sj5Wqp.js","./chunk-75Z2AOVW-DEp7Wbaj.js","./src-BpnPuKEN.js","./chunk-Y2CYZVJY-DsF7k-Jl.js","./src-Cyu5G-Tr.js","./chunk-DU6HZSFF-CDmPCRkr.js","./dist-CeoU7cfW.js","./chunk-CLGD4ZFX-BxW11Imt.js","./chunk-P2QGCYS3-Bw5LRT6S.js","./chunk-PWAF6VOD-B1mxlptQ.js","./chunk-GMAD6QVW-ahdTJvh0.js","./chunk-4HAMMTFA-DaFOJTOO.js","./rough.esm-Dy-Kn_BL.js","./chunk-GVQU2GXP-CPkYne1h.js","./chunk-L3NEJ4N5-BOK6HmaY.js","./chunk-OSK3NFVY-CEcyPnHo.js","./chunk-2E4U76K2-DqA2CBL0.js","./graphlib-Blky6igo.js","./hasIn-yw4sIeJR.js","./chunk-LNGE3PJU-DWpGwHrW.js","./chunk-TLUHSLCS-DvvqZUl_.js","./katex-CQIbPNPT.js","./katex-DUp2KybH.js","./mhchem-hMh9XtQZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{c as n,l as r,o as i,r as a,s as o,t as s}from"./useEvent-Dc9HkKI2.js";import{t as c}from"./react-CUdNIagt.js";import{$t as l,Aa as u,An as d,Ba as f,Bn as p,Co as m,Di as h,Dn as g,Do as _,Ei as v,En as y,Eo as b,Gt as x,Ht as S,Jt as C,La as w,Lt as T,Na as E,On as D,Ra as O,Rt as k,S as A,Tn as j,To as M,Ut as N,Vt as P,Wa as F,Wt as I,Xa as ee,Xt as L,Y as te,Yt as ne,Zt as re,_n as ie,_o as ae,an as oe,b as se,en as ce,fn as le,gn as ue,go as de,ho as fe,in as pe,io as me,jo as he,kn as ge,lo as _e,lt as ve,mn as ye,mo as be,nn as xe,no as Se,oa as Ce,on as we,qt as Te,rn as Ee,ro as De,sn as Oe,tn as ke,ut as Ae,vn as je,wn as R,wo as Me,xn as Ne,xo as Pe,yn as Fe,yo as Ie,z as Le,za as Re}from"./cells-DIjn-wIE.js";import{t as ze}from"./react-dom-CKsE8sC1.js";import{A as z,C as Be,D as Ve,E as He,F as Ue,I as We,L as Ge,M as Ke,N as qe,O as Je,P as B,S as V,T as Ye,W as Xe,_ as Ze,b as Qe,h as $e,j as H,n as et,u as tt,v as nt,x as U,y as rt,z as it}from"./schemas-BL-NsLlF.js";import{n as at,r as ot,t as st}from"./coerce-CZiN7rQ_.js";import{t as ct}from"./compiler-runtime-BQ9S8nyo.js";import{t as lt}from"./get-DjNf4SIX.js";import{t as ut}from"./pick-DKIID_Mo.js";import{C as dt,E as ft,M as pt,N as mt,P as ht,S as gt,a as _t,u as vt,v as yt}from"./config-BdH5RvM0.js";import{a as bt,c as xt,d as St,f as Ct,h as wt,i as Tt,l as Et,o as Dt,p as Ot,r as kt,s as At,u as jt,v as Mt,y as Nt}from"./state-0X7um_9u.js";import{_ as Pt,a as Ft,g as W,o as It,t as Lt}from"./useEventListener-CUPWI_1X.js";import{t as Rt}from"./objects-snlMn4yk.js";import{t as zt}from"./invariant-Ci2dTZ72.js";import{i as Bt,t as Vt}from"./utils-B4K466FK.js";import{n as Ht,t as Ut}from"./pair-DrvWpc2_.js";import{_ as Wt,d as Gt,l as Kt,p as qt,r as Jt,s as Yt,u as Xt}from"./session-ztCnZJHI.js";import{C as Zt,M as Qt,O as $t,S as en,T as tn,_ as nn,a as rn,i as an,l as on,r as sn,s as cn,t as ln,y as un}from"./config-D7CP5wR5.js";import{n as dn,r as fn,t as pn}from"./state-BQjr5g9m.js";import{a as mn,s as hn,t as gn}from"./state-BsVxWYGT.js";import{n as _n,t as vn}from"./ErrorBoundary-CHPy195L.js";import{n as yn,t as G}from"./cn-ldLVeaqm.js";import{t as bn}from"./jsx-runtime-B74pBk57.js";import{E as xn,S as Sn,T as Cn,_ as wn,b as Tn,h as En,i as Dn,o as On,s as kn,v as An,w as jn,x as Mn,y as Nn}from"./fullscreen-3wS6IaIC.js";import{o as Pn,s as Fn}from"./dist-DFI04FfI.js";import{d as In,u as Ln}from"./menu-items-D-vbZmqL.js";import{a as Rn,c as zn,i as Bn,l as Vn,o as Hn,r as Un,s as Wn,u as Gn}from"./config-2Nts63h2.js";import{a as Kn,c as qn,i as Jn,l as Yn,n as Xn,s as Zn,t as Qn}from"./alert-dialog-BsB0FYEL.js";import{a as $n,c as er,d as tr,f as nr,h as rr,i as ir,l as ar,m as or,n as sr,o as cr,p as lr,r as ur,s as dr,t as fr}from"./select-CWHHoM53.js";import{t as pr}from"./circle-CzTMKZwz.js";import{a as mr,c as hr,i as gr,o as _r,p as vr,r as yr,t as br}from"./dropdown-menu-Crx6knLg.js";import{At as xr,B as Sr,Bt as Cr,C as wr,Ct as Tr,Et as Er,F as Dr,G as Or,H as kr,It as Ar,J as jr,K as Mr,L as Nr,M as Pr,N as Fr,P as Ir,Pt as Lr,Q as Rr,R as zr,Rt as Br,S as Vr,St as Hr,Tt as Ur,V as Wr,X as Gr,Y as Kr,Z as qr,_ as Jr,_t as Yr,b as Xr,c as Zr,ct as Qr,d as $r,et as ei,f as ti,ft as ni,g as ri,gt as ii,h as ai,ht as oi,j as si,jt as ci,lt as li,mt as ui,p as di,pt as fi,q as pi,r as mi,st as hi,t as gi,u as _i,vt as vi,w as yi,wt as bi,x as xi,xt as Si,y as Ci,yt as wi,z as Ti,zt as Ei}from"./JsonOutput-BdpXVhxV.js";import{d as Di,l as Oi,n as ki,p as Ai,r as ji}from"./download-DBXnO5qS.js";import{t as Mi}from"./switch-1_rRTvtc.js";import{i as Ni,n as Pi,r as Fi,t as Ii}from"./tabs-Dx9NomUx.js";import{a as Li,i as Ri,n as zi,o as Bi,r as Vi,t as Hi}from"./tooltip-CamoSiGF.js";import{n as Ui,t as Wi}from"./button-qFeU84ax.js";import{t as Gi}from"./createLucideIcon-rHn2EdoM.js";import{i as Ki,n as qi,t as Ji}from"./paths-CzfpItSz.js";import{D as Yi,E as Xi,S as Zi,T as Qi,_ as $i,a as ea,c as ta,d as na,f as ra,g as ia,h as aa,i as oa,l as sa,m as ca,n as la,o as ua,p as da,r as fa,s as pa,t as ma,u as ha,v as ga,w as _a,x as va,y as ya}from"./spec-C09S5bT-.js";import{n as ba,r as xa,t as Sa}from"./fileToBase64-aqhlf6Jj.js";import{t as Ca}from"./LazyAnyLanguageCodeMirror-91eGNw7v.js";import{i as wa,n as Ta,o as Ea}from"./useLifecycle-DKSBdWUf.js";import{a as Da,n as Oa,o as ka,r as Aa,t as ja}from"./useBoolean-C44TyhOc.js";import{a as Ma,r as Na,t as Pa}from"./useNumberFormatter-C4-_TnkF.js";import{t as Fa}from"./chevron-right-DOPs2jx8.js";import{t as Ia}from"./code-xml-CW65k2pN.js";import{t as La}from"./copy-RyCOE8jo.js";import{t as Ra}from"./eye-off-CfkK-QS3.js";import{n as za}from"./file-headphone-DKocX1z0.js";import{r as Ba,t as Va}from"./file-icons-e7tmeyP-.js";import{t as Ha}from"./globe-CmFhHoL1.js";import{C as Ua,S as Wa,x as Ga,y as Ka}from"./write-secret-modal-wFgr-1dA.js";import{n as qa,t as Ja}from"./spinner-CGdRKCnw.js";import{a as Ya,d as Xa,i as Za,o as Qa,t as $a}from"./readonly-python-code-CPhK2DqE.js";import{a as eo,c as to,i as no,l as ro,r as io}from"./glide-utils-BatnVnxk.js";import{t as ao}from"./plus-gbN72xHe.js";import{t as oo}from"./refresh-cw-CEGpOrzd.js";import{i as so,n as co,o as lo,r as uo,t as fo}from"./input-D4bMj5Nb.js";import{t as po}from"./square-function-DyFIOFp5.js";import{a as mo,i as ho,r as go,t as _o}from"./column-preview-CZ2TL09N.js";import{t as vo}from"./square-DvOKKLHZ.js";import{t as yo}from"./trash-2-BJG-7Qob.js";import{t as bo}from"./triangle-alert-BeRqoThc.js";import{n as xo,t as So}from"./es-C4LtxVar.js";import{t as Co}from"./use-toast-CC89xOwH.js";import{t as wo}from"./copy-icon-DQuttmjH.js";import{t as To}from"./preload-helper-uBIymjUX.js";import{st as Eo}from"./dist-Cny7_yZb.js";import{d as Do,o as Oo,p as ko,t as Ao}from"./arrays-BqUx5USx.js";import{n as jo,t as Mo}from"./once-Haz_uxEL.js";import{i as No,n as Po,r as Fo,t as Io}from"./strings-LjhpYwmx.js";import{n as Lo}from"./requests-yTHMxhVa.js";import{r as Ro}from"./useTheme-CnWB5G1X.js";import{n as zo,t as Bo}from"./context-BFOBKCJB.js";import{a as Vo,i as Ho,o as Uo,t as Wo}from"./numbers-DyJNv6Vk.js";import{n as Go,r as Ko}from"./useDebounce-DMbg9X18.js";import{n as qo}from"./useAsyncData-DucTwMkf.js";import{n as Jo,r as Yo,t as Xo}from"./dates-Cv2NS8h4.js";import{t as Zo}from"./RenderHTML-ClrDrx3F.js";import{r as Qo}from"./package-data-BwaspaKJ.js";import{n as $o,t as es}from"./api-C5RyTgDk.js";import{a as ts,i as ns,n as rs,r as is,t as as}from"./errors-D9vyuMar.js";import{n as os}from"./markdown-export-DzhB1FrN.js";import{i as ss,r as cs,t as ls}from"./tooltip-BQ9qHrrN.js";import{a as us}from"./react-icons.esm-C6SMwKZH.js";import{a as ds,i as fs,n as ps,t as ms}from"./events-CbeVJ6OD.js";import{n as hs,r as gs,t as _s}from"./alert-MrQXRIin.js";import{n as vs,t as ys}from"./error-banner-EjYF86IQ.js";import{n as bs,t as xs}from"./utils-CaQYvazl.js";import{a as Ss,i as Cs,n as ws,o as Ts,r as Es,t as Ds}from"./table-Dg1KxH-q.js";import{t as Os}from"./renderShortcut-BoDtLl9Q.js";import{t as ks}from"./bundle.esm-CklCb9AD.js";import{n as As}from"./icons-CVdkfEA3.js";import{t as js}from"./useDeepCompareMemoize-DSlTt6u_.js";import{t as Ms}from"./pathUtils-BKesuhdv.js";import{i as Ns,n as Ps,r as Fs}from"./floating-outline-yJVtlHMv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Is={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Ls;Ls||={};var K=e(c(),1),Rs=e(ze(),1),q=bn(),zs=`NavigationMenu`,[Bs,Vs,Hs]=In(zs),[Us,Ws,Gs]=In(zs),[Ks,qs]=jn(zs,[Hs,Gs]),[Js,Ys]=Ks(zs),[Xs,Zs]=Ks(zs),Qs=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:o=200,skipDelayDuration:s=300,orientation:c=`horizontal`,dir:l,...u}=e,[d,f]=K.useState(null),p=It(t,e=>f(e)),m=Ln(l),h=K.useRef(0),g=K.useRef(0),_=K.useRef(0),[v,y]=K.useState(!0),[b,x]=Tn({prop:r,onChange:e=>{let t=e!==``,n=s>0;t?(window.clearTimeout(_.current),n&&y(!1)):(window.clearTimeout(_.current),_.current=window.setTimeout(()=>y(!0),s)),i?.(e)},defaultProp:a??``,caller:zs}),S=K.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(``),150)},[x]),C=K.useCallback(e=>{window.clearTimeout(g.current),x(e)},[x]),w=K.useCallback(e=>{b===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(e)},o)},[b,x,o]);return K.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(_.current)},[]),(0,q.jsx)(tc,{scope:n,isRootMenu:!0,value:b,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:e=>{window.clearTimeout(h.current),v?w(e):C(e)},onTriggerLeave:()=>{window.clearTimeout(h.current),S()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:S,onItemSelect:e=>{x(t=>t===e?``:e)},onItemDismiss:()=>x(``),children:(0,q.jsx)(Cn.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});Qs.displayName=zs;var $s=`NavigationMenuSub`,ec=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=Ys($s,n),[l,u]=Tn({prop:r,onChange:i,defaultProp:a??``,caller:$s});return(0,q.jsx)(tc,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>u(e),onItemSelect:e=>u(e),onItemDismiss:()=>u(``),children:(0,q.jsx)(Cn.div,{"data-orientation":o,...s,ref:t})})});ec.displayName=$s;var tc=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[m,h]=K.useState(null),[g,_]=K.useState(new Map),[v,y]=K.useState(null);return(0,q.jsx)(Js,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:rr(s),baseId:An(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:wn(u),onTriggerLeave:wn(d),onContentEnter:wn(f),onContentLeave:wn(p),onItemSelect:wn(c),onItemDismiss:wn(l),onViewportContentChange:K.useCallback((e,t)=>{_(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:K.useCallback(e=>{_(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,q.jsx)(Bs.Provider,{scope:t,children:(0,q.jsx)(Xs,{scope:t,items:g,children:o})})})},nc=`NavigationMenuList`,rc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ys(nc,n),a=(0,q.jsx)(Cn.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,q.jsx)(Cn.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,q.jsx)(Bs.Slot,{scope:n,children:i.isRootMenu?(0,q.jsx)(Tc,{asChild:!0,children:a}):a})})});rc.displayName=nc;var ic=`NavigationMenuItem`,[ac,oc]=Ks(ic),sc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=An(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=K.useRef(null),c=K.useRef(null),l=K.useRef(null),u=K.useRef(()=>{}),d=K.useRef(!1),f=K.useCallback((e=`start`)=>{if(s.current){u.current();let t=kc(s.current);t.length&&Ac(e===`start`?t:t.reverse())}},[]),p=K.useCallback(()=>{if(s.current){let e=kc(s.current);e.length&&(u.current=jc(e))}},[]);return(0,q.jsx)(ac,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,q.jsx)(Cn.li,{...i,ref:t})})});sc.displayName=ic;var cc=`NavigationMenuTrigger`,lc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=Ys(cc,e.__scopeNavigationMenu),o=oc(cc,e.__scopeNavigationMenu),s=K.useRef(null),c=It(s,o.triggerRef,t),l=Pc(a.baseId,o.value),u=Fc(a.baseId,o.value),d=K.useRef(!1),f=K.useRef(!1),p=o.value===a.value;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Bs.ItemSlot,{scope:n,value:o.value,children:(0,q.jsx)(Oc,{asChild:!0,children:(0,q.jsx)(Cn.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":Nc(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:Sn(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:Sn(e.onPointerMove,Ic(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:Sn(e.onPointerLeave,Ic(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:Sn(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:Sn(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];p&&e.key===t&&(o.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Fn,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:e=>{let t=o.contentRef.current,n=e.relatedTarget,r=n===s.current,i=t?.contains(n);(r||!i)&&o.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,q.jsx)(`span`,{"aria-owns":u})]})]})});lc.displayName=cc;var uc=`NavigationMenuLink`,dc=`navigationMenu.linkSelect`,fc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,q.jsx)(Oc,{asChild:!0,children:(0,q.jsx)(Cn.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:Sn(e.onClick,e=>{let t=e.target,n=new CustomEvent(dc,{bubbles:!0,cancelable:!0});if(t.addEventListener(dc,e=>i?.(e),{once:!0}),xn(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(yc,{bubbles:!0,cancelable:!0});xn(t,e)}},{checkForDefaultPrevented:!1})})})});fc.displayName=uc;var pc=`NavigationMenuIndicator`,mc=K.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ys(pc,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?Rs.createPortal((0,q.jsx)(Nn,{present:n||a,children:(0,q.jsx)(hc,{...r,ref:t})}),i.indicatorTrack):null});mc.displayName=pc;var hc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ys(pc,n),a=Vs(n),[o,s]=K.useState(null),[c,l]=K.useState(null),u=i.orientation===`horizontal`,d=!!i.value;K.useEffect(()=>{let e=a().find(e=>e.value===i.value)?.ref.current;e&&s(e)},[a,i.value]);let f=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return Mc(o,f),Mc(i.indicatorTrack,f),c?(0,q.jsx)(Cn.div,{"aria-hidden":!0,"data-state":d?`visible`:`hidden`,"data-orientation":i.orientation,...r,ref:t,style:{position:`absolute`,...u?{left:0,width:c.size+`px`,transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+`px`,transform:`translateY(${c.offset}px)`},...r.style}}):null}),gc=`NavigationMenuContent`,_c=K.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Ys(gc,e.__scopeNavigationMenu),a=oc(gc,e.__scopeNavigationMenu),o=It(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,q.jsx)(vc,{forceMount:n,...c,ref:o}):(0,q.jsx)(Nn,{present:n||s,children:(0,q.jsx)(bc,{"data-state":Nc(s),...c,ref:o,onPointerEnter:Sn(e.onPointerEnter,i.onContentEnter),onPointerLeave:Sn(e.onPointerLeave,Ic(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});_c.displayName=gc;var vc=K.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=Ys(gc,e.__scopeNavigationMenu);return Mn(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Mn(()=>()=>r(e.value),[e.value,r]),null}),yc=`navigationMenu.rootContentDismiss`,bc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=Ys(gc,n),d=K.useRef(null),f=It(d,t),p=Pc(u.baseId,r),m=Fc(u.baseId,r),h=Vs(n),g=K.useRef(null),{onItemDismiss:_}=u;K.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{_(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(yc,t),()=>e.removeEventListener(yc,t)}},[u.isRootMenu,e.value,i,_,s]);let v=K.useMemo(()=>{let e=h().map(e=>e.value);u.dir===`rtl`&&e.reverse();let t=e.indexOf(u.value),n=e.indexOf(u.previousValue),i=r===u.value,a=n===e.indexOf(r);if(!i&&!a)return g.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return g.current=o,o},[u.previousValue,u.value,u.dir,h,r]);return(0,q.jsx)(Tc,{asChild:!0,children:(0,q.jsx)(En,{id:m,"aria-labelledby":p,"data-motion":v,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(yc,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:Sn(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:Sn(e.onPointerDownOutside,e=>{let t=e.target,n=h().some(e=>e.ref.current?.contains(t)),r=u.isRootMenu&&u.viewport?.contains(t);(n||r||!u.isRootMenu)&&e.preventDefault()}),onKeyDown:Sn(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=kc(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);Ac(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:Sn(e.onEscapeKeyDown,e=>{o.current=!0})})})}),xc=`NavigationMenuViewport`,Sc=K.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!Ys(xc,e.__scopeNavigationMenu).value;return(0,q.jsx)(Nn,{present:n||i,children:(0,q.jsx)(Cc,{...r,ref:t})})});Sc.displayName=xc;var Cc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=Ys(xc,n),o=It(t,a.onViewportChange),s=Zs(gc,e.__scopeNavigationMenu),[c,l]=K.useState(null),[u,d]=K.useState(null),f=c?c?.width+`px`:void 0,p=c?c?.height+`px`:void 0,m=!!a.value,h=m?a.value:a.previousValue;return Mc(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,q.jsx)(Cn.div,{"data-state":Nc(m),"data-orientation":a.orientation,...i,ref:o,style:{pointerEvents:!m&&a.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...i.style},onPointerEnter:Sn(e.onPointerEnter,a.onContentEnter),onPointerLeave:Sn(e.onPointerLeave,Ic(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,q.jsx)(Nn,{present:n||i,children:(0,q.jsx)(bc,{...r,ref:Ft(t,e=>{i&&e&&d(e)})})},e)})})}),wc=`FocusGroup`,Tc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ys(wc,n);return(0,q.jsx)(Us.Provider,{scope:n,children:(0,q.jsx)(Us.Slot,{scope:n,children:(0,q.jsx)(Cn.div,{dir:i.dir,...r,ref:t})})})}),Ec=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],Dc=`FocusGroupItem`,Oc=K.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Ws(n),a=Ys(Dc,n);return(0,q.jsx)(Us.ItemSlot,{scope:n,children:(0,q.jsx)(Cn.button,{...r,ref:t,onKeyDown:Sn(e.onKeyDown,e=>{if([`Home`,`End`,...Ec].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),Ec.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>Ac(t)),e.preventDefault()}})})})});function kc(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ac(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function jc(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function Mc(e,t){let n=wn(t);Mn(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function Nc(e){return e?`open`:`closed`}function Pc(e,t){return`${e}-trigger-${t}`}function Fc(e,t){return`${e}-content-${t}`}function Ic(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Lc=Qs,Rc=rc,zc=sc,Bc=lc,Vc=fc,Hc=mc,Uc=_c,Wc=Sc,Gc=[`PageUp`,`PageDown`],Kc=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],qc={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},Jc=`Slider`,[Yc,Xc,Zc]=In(Jc),[Qc,$c]=jn(Jc,[Zc]),[el,tl]=Qc(Jc),nl=K.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=K.useRef(new Set),_=K.useRef(0),v=o===`horizontal`?al:ol,[y=[],b]=Tn({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=K.useRef(y);function S(e){T(e,bl(y,e))}function C(e){T(e,_.current)}function w(){let e=x.current[_.current];y[_.current]!==e&&f(y)}function T(e,t,{commit:n}={commit:!1}){let o=Tl(a),s=El(Math.round((e-r)/a)*a+r,o),l=or(s,[r,i]);b((e=[])=>{let r=_l(e,l,t);if(Cl(r,c*a)){_.current=r.indexOf(l);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e})}return(0,q.jsx)(el,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,q.jsx)(Yc.Provider,{scope:e.__scopeSlider,children:(0,q.jsx)(Yc.Slot,{scope:e.__scopeSlider,children:(0,q.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:Sn(h.onPointerDown,()=>{s||(x.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:S,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:w,onHomeKeyDown:()=>!s&&T(r,0,{commit:!0}),onEndKeyDown:()=>!s&&T(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=Gc.includes(e.key)||e.shiftKey&&Kc.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});nl.displayName=Jc;var[rl,il]=Qc(Jc,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),al=K.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=K.useState(null),p=It(t,e=>f(e)),m=K.useRef(void 0),h=Ln(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=wl([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,q.jsx)(rl,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,q.jsx)(sl,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=qc[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),ol=K.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=K.useRef(null),d=It(t,u),f=K.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=wl([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,q.jsx)(rl,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,q.jsx)(sl,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=qc[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),sl=K.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=tl(Jc,n);return(0,q.jsx)(Cn.span,{...l,ref:t,onKeyDown:Sn(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Gc.concat(Kc).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Sn(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:Sn(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Sn(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),cl=`SliderTrack`,ll=K.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=tl(cl,n);return(0,q.jsx)(Cn.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});ll.displayName=cl;var ul=`SliderRange`,dl=K.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=tl(ul,n),a=il(ul,n),o=K.useRef(null),s=It(t,o),c=i.values.length,l=i.values.map(e=>vl(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,q.jsx)(Cn.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})});dl.displayName=ul;var fl=`SliderThumb`,pl=K.forwardRef((e,t)=>{let n=Xc(e.__scopeSlider),[r,i]=K.useState(null),a=It(t,e=>i(e)),o=K.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,q.jsx)(ml,{...e,ref:a,index:o})}),ml=K.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=tl(fl,n),s=il(fl,n),[c,l]=K.useState(null),u=It(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=Pn(c),p=o.values[r],m=p===void 0?0:vl(p,o.min,o.max),h=yl(r,o.values.length),g=f?.[s.size],_=g?xl(g,m,s.direction):0;return K.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,q.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,q.jsx)(Yc.ItemSlot,{scope:e.__scopeSlider,children:(0,q.jsx)(Cn.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:Sn(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,q.jsx)(gl,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});pl.displayName=fl;var hl=`RadioBubbleInput`,gl=K.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=K.useRef(null),a=It(i,r),o=rr(t);return K.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,q.jsx)(Cn.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});gl.displayName=hl;function _l(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function vl(e,t,n){let r=100/(n-t)*(e-t);return or(r,[0,100])}function yl(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function bl(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function xl(e,t,n){let r=e/2;return(r-wl([0,50],[0,r])(t)*n)*n}function Sl(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Cl(e,t){if(t>0){let n=Sl(e);return Math.min(...n)>=t}return!0}function wl(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Tl(e){return(String(e).split(`.`)[1]||``).length}function El(e,t){let n=10**t;return Math.round(e*n)/n}var Dl=nl,Ol=ll,kl=dl,Al=pl,jl=Gi(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Ml=Gi(`arrow-up-wide-narrow`,[[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 16h7`,key:`uosisv`}],[`path`,{d:`M11 20h4`,key:`1krc32`}]]),Nl=Gi(`binary`,[[`rect`,{x:`14`,y:`14`,width:`4`,height:`6`,rx:`2`,key:`p02svl`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`6`,rx:`2`,key:`xm4xkj`}],[`path`,{d:`M6 20h4`,key:`1i6q5t`}],[`path`,{d:`M14 10h4`,key:`ru81e7`}],[`path`,{d:`M6 14h2v6`,key:`16z9wg`}],[`path`,{d:`M14 4h2v6`,key:`1idq9u`}]]),Pl=Gi(`brackets`,[[`path`,{d:`M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3`,key:`1kt8lf`}],[`path`,{d:`M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3`,key:`gduv9`}]]),Fl=Gi(`combine`,[[`path`,{d:`M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`1l7d7l`}],[`path`,{d:`M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`9955pe`}],[`path`,{d:`m7 15 3 3`,key:`4hkfgk`}],[`path`,{d:`m7 21 3-3H5a2 2 0 0 1-2-2v-2`,key:`1xljwe`}],[`rect`,{x:`14`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1cdgtw`}],[`rect`,{x:`3`,y:`3`,width:`7`,height:`7`,rx:`1`,key:`zi3rio`}]]),Il=Gi(`copy-slash`,[[`line`,{x1:`12`,x2:`18`,y1:`18`,y2:`12`,key:`ebkxgr`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Ll=Gi(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),Rl=Gi(`group`,[[`path`,{d:`M3 7V5c0-1.1.9-2 2-2h2`,key:`adw53z`}],[`path`,{d:`M17 3h2c1.1 0 2 .9 2 2v2`,key:`an4l38`}],[`path`,{d:`M21 17v2c0 1.1-.9 2-2 2h-2`,key:`144t0e`}],[`path`,{d:`M7 21H5c-1.1 0-2-.9-2-2v-2`,key:`rtnfgi`}],[`rect`,{width:`7`,height:`5`,x:`7`,y:`7`,rx:`1`,key:`1eyiv7`}],[`rect`,{width:`7`,height:`5`,x:`10`,y:`12`,rx:`1`,key:`1qlmkx`}]]),zl=Gi(`shuffle`,[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]),Bl=Gi(`square-dashed-mouse-pointer`,[[`path`,{d:`M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z`,key:`xwnzip`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M9 3h1`,key:`1yesri`}],[`path`,{d:`M9 21h2`,key:`1qve2z`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M21 9v2`,key:`p14lih`}],[`path`,{d:`M3 14v1`,key:`vnatye`}]]),Vl=Gi(`square-mouse-pointer`,[[`path`,{d:`M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z`,key:`xwnzip`}],[`path`,{d:`M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6`,key:`14rsvq`}]]),Hl=Gi(`triangle`,[[`path`,{d:`M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`,key:`14u9p9`}]]),Ul=e(he(),1),Wl={INSERT:`insert`,DELETE:`delete`,SUBSTITUTE:`substitute`,MATCH:`match`};function Gl(e,t,n){let r=e.length,i=t.length,a=Array.from({length:r+1},()=>Array.from({length:i+1}).fill(0));for(let e=0;e<=r;e++)a[e][0]=e;for(let e=0;e<=i;e++)a[0][e]=e;for(let o=1;o<=r;o++)for(let r=1;r<=i;r++)a[o][r]=n(e[o-1],t[r-1])?a[o-1][r-1]:1+Math.min(a[o-1][r],a[o][r-1],a[o-1][r-1]);let o=[],s=r,c=i;for(;s>0||c>0;)s>0&&c>0&&n(e[s-1],t[c-1])?(o.unshift({type:Wl.MATCH,position:s-1}),s--,c--):s>0&&c>0&&a[s][c]===a[s-1][c-1]+1?(o.unshift({type:Wl.SUBSTITUTE,position:s-1}),s--,c--):s>0&&a[s][c]===a[s-1][c]+1?(o.unshift({type:Wl.DELETE,position:s-1}),s--):c>0&&a[s][c]===a[s][c-1]+1&&(o.unshift({type:Wl.INSERT,position:s}),c--);return{distance:a[r][i],operations:o}}function Kl(e,t,n){let r=[],i=0;for(let a of t)switch(a.type){case Wl.MATCH:r.push(e[i]),i++;break;case Wl.DELETE:i++;break;case Wl.INSERT:r.push(n);break;case Wl.SUBSTITUTE:r.push(n),i++}return r}function ql(e,t,n,r){let i=Gl(e,t,n);return{merged:Kl(e,i.operations,r),edits:i}}var Jl=0,Yl=``;function Xl(e){return e.id?e.id:e.name===`setup`?m:Ie.create()}function Zl(e,t){let n=new Map,r=new Map;if(!e&&!t)return{cellIds:[],sessionCellData:n,notebookCellData:r};if(!e){let e=t?.cells.map(e=>Xl(e))||[];return{cellIds:e,sessionCellData:new Map(e.map((e,t)=>[e,null])),notebookCellData:new Map(e.map((e,n)=>[e,t?.cells[n]||Ql()]))}}if(!t){let t=e.cells.map(e=>Xl(e));return{cellIds:t,sessionCellData:new Map(t.map((t,n)=>[t,e.cells[n]])),notebookCellData:new Map(t.map(e=>[e,Ql()]))}}let{merged:i,edits:a}=ql(e.cells,t.cells,(e,t)=>{let n=e.code_hash;return n?t.code_hash===n:!1},$l());a.distance>0&&W.warn(`Session and notebook have different cells, attempted merge.`);let o=[];for(let e=0;e<t.cells.length;e++){let a=t.cells[e];if(a){let t=Xl(a);o.push(t);let s=i[e]||$l();s.id=t,n.set(t,s),r.set(t,a)}else W.warn(`Merged notebook cell is null at index`,e)}return{cellIds:o,sessionCellData:n,notebookCellData:r}}function Ql(){return{id:Ie.create(),name:Yl,code:Yl,code_hash:null,config:{column:null,disabled:!1,hide_code:!1,expand_output:!1}}}function $l(){return{id:Ie.create(),code_hash:null,console:[],outputs:[]}}function eu(e,t){return{id:e,name:t.name??Yl,code:t.code??Yl,edited:!1,lastCodeRun:null,lastExecutionTime:null,config:{column:t.config?.column??null,disabled:t.config?.disabled??!1,hide_code:t.config?.hide_code??!1,expand_output:t.config?.expand_output??!1},serializedEditorState:null}}function tu(e){let t=Le();if(!e)return t;let n=e.outputs||[],r=n.find(e=>e.type===`data`)||n.find(e=>e.type===`error`)||n[0];if(r){if(r.type===`error`)t.output={channel:`marimo-error`,data:[{type:`unknown`,msg:r.evalue}],mimetype:`application/vnd.marimo+error`,timestamp:Jl};else if(r.type===`data`){let e=Object.keys(r.data)[0];t.output={channel:`output`,data:Object.values(r.data)[0],mimetype:e,timestamp:Jl}}}let i=e.console||[];return{...t,outline:t.output?ve(t.output):null,consoleOutputs:i.map(e=>e.type===`streamMedia`?{channel:`media`,data:e.data,mimetype:e.mimetype,timestamp:Jl}:{channel:e.name===`stderr`?`stderr`:`stdout`,data:e.text,mimetype:e.mimetype??`text/plain`,timestamp:Jl})}}function nu(e,t){let{cellIds:n,sessionCellData:r,notebookCellData:i}=Zl(e,t);if(n.length===0)return null;let a={},o={};for(let e of n){let t=r.get(e),n=i.get(e);n&&(a[e]=eu(e,n)),o[e]=tu(t)}return{cellIds:u.from([n]),cellData:a,cellRuntime:o,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var J=ct(),ru=Object.freeze({left:0,top:0,width:16,height:16}),iu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),au=Object.freeze({...ru,...iu}),ou=Object.freeze({...au,body:``,hidden:!1}),su=Object.freeze({width:null,height:null}),cu=Object.freeze({...su,...iu});function lu(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var uu=/[\s,]+/;function du(e,t){t.split(uu).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}var fu={...cu,preserveAspectRatio:``};function pu(e){let t={...fu},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=lu(n(`rotate`,``)),du(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function mu(e,t){for(let n in fu)if(e[n]!==t[n])return!0;return!1}var hu=/^[a-z0-9]+(-[a-z0-9]+)*$/,gu=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!_u(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!_u(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!_u(e,n)?null:e}return null},_u=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function vu(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function yu(e,t){let n=vu(e,t);for(let r in ou)r in iu?r in e&&!(r in n)&&(n[r]=iu[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function bu(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function xu(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=yu(r[e]||i[e],a)}return o(t),n.forEach(o),yu(e,a)}function Su(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=bu(e);for(let i in r){let a=r[i];a&&(t(i,xu(e,i,a)),n.push(i))}return n}var Cu={provider:``,aliases:{},not_found:{},...ru};function wu(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Tu(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!wu(e,Cu))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!wu(t,ou))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!wu(t,ou))return null}return t}var Eu=Object.create(null);function Du(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ou(e,t){let n=Eu[e]||(Eu[e]=Object.create(null));return n[t]||(n[t]=Du(e,t))}function ku(e,t){return Tu(t)?Su(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Au(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function ju(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(Eu)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(Eu[e]||{})).forEach(t=>{let r=Ou(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var Mu=!1;function Nu(e){return typeof e==`boolean`&&(Mu=e),Mu}function Pu(e){let t=typeof e==`string`?gu(e,!0,Mu):e;if(t){let e=Ou(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function Fu(e,t){let n=gu(e,!0,Mu);if(!n)return!1;let r=Ou(n.provider,n.prefix);return t?Au(r,n.name,t):(r.missing.add(n.name),!0)}function Iu(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Mu&&!t&&!e.prefix){let t=!1;return Tu(e)&&(e.prefix=``,Su(e,(e,n)=>{Fu(e,n)&&(t=!0)})),t}let n=e.prefix;return _u({provider:t,prefix:n,name:`a`})?!!ku(Ou(t,n),e):!1}function Lu(e){return!!Pu(e)}function Ru(e){let t=Pu(e);return t&&{...au,...t}}function zu(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Ou(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Bu(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Vu(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||Bu([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Hu=0;function Uu(e,t,n){let r=Hu++,i=Bu.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}var Wu=Object.create(null);function Gu(e,t){Wu[e]=t}function Ku(e){return Wu[e]||Wu[``]}function qu(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?gu(e,t,n):e;i&&r.push(i)}),r}var Ju={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Yu(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function Xu(e){let t={...Ju,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Yu(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Zu(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var Qu=Object.create(null),$u=[`https://api.simplesvg.com`,`https://api.unisvg.com`],ed=[];$u.length>0;)$u.length===1||Math.random()>.5?ed.push($u.shift()):ed.push($u.pop());Qu[``]=Zu({resources:[`https://api.iconify.design`].concat(ed)});function td(e,t){let n=Zu(t);return n!==null&&(Qu[e]=n,!0)}function nd(e){return Qu[e]}function rd(){return Object.keys(Qu)}function id(){}var ad=Object.create(null);function od(e){if(!ad[e]){let t=nd(e);if(!t)return;ad[e]={config:t,redundancy:Xu(t)}}return ad[e]}function sd(e,t,n){let r,i;if(typeof e==`string`){let t=Ku(e);if(!t)return n(void 0,424),id;i=t.send;let a=od(e);a&&(r=a.redundancy)}else{let t=Zu(e);if(t){r=Xu(t);let n=Ku(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),id):r.query(t,i,n)().abort}function cd(){}function ld(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Vu(e)}))}function ud(e){let t=[],n=[];return e.forEach(e=>{(e.match(hu)?t:n).push(e)}),{valid:t,invalid:n}}function dd(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!ku(e,n).length){r();return}}catch(e){console.error(e)}r(),ld(e)}function fd(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function pd(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){fd(e.loadIcons(r,n,t),t=>{dd(e,r,t)});return}if(i){r.forEach(r=>{fd(i(r,n,t),t=>{dd(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=ud(r);if(o.length&&dd(e,o,null),!a.length)return;let s=n.match(hu)?Ku(t):null;if(!s){dd(e,a,null);return}s.prepare(t,n,a).forEach(n=>{sd(t,n,t=>{dd(e,n.icons,t)})})}))}var md=(e,t)=>{let n=zu(qu(e,!0,Nu()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,cd)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Ou(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Ou(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&pd(e,t)}),t?Uu(t,n,i):cd},hd=e=>new Promise((t,n)=>{let r=typeof e==`string`?gu(e,!0):e;if(!r){n(e);return}md([r||e],i=>{if(i.length&&r){let e=Pu(r);if(e){t({...au,...e});return}}n(e)})});function gd(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function _d(e,t){if(typeof e==`object`)return{data:gd(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=gd(e);if(t)return{data:t,value:e}}let n=gu(e,!0,!0);if(!n)return{value:e};let r=Pu(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:md([n],()=>t(e,n,Pu(n)))}}var vd=!1;try{vd=navigator.vendor.indexOf(`Apple`)===0}catch{}function yd(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(vd||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var bd=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xd=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Sd(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(bd);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=xd.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Cd(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function wd(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Td(e,t,n){let r=Cd(e);return wd(r.defs,t+r.content+n)}var Ed=e=>e===`unset`||e===`undefined`||e===`none`;function Dd(e,t){let n={...au,...e},r={...cu,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Td(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Sd(d,c/l)):(u=o===`auto`?c:o,d=s===null?Sd(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{Ed(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}function Od(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function kd(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function Ad(e){return`data:image/svg+xml,`+kd(e)}function jd(e){return`url("`+Ad(e)+`")`}var Md=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Nd(e){Md=e}function Pd(){return Md}function Fd(e,t){let n=nd(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Id(e){return e===404}var Ld=(e,t,n)=>{let r=[],i=Fd(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Rd(e){if(typeof e==`string`){let t=nd(e);if(t)return t.path}return`/`}var zd={prepare:Ld,send:(e,t,n)=>{if(!Md){n(`abort`,424);return}let r=Rd(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Md(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Id(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Bd(e,t,n){Ou(n||``,t).loadIcons=e}function Vd(e,t,n){Ou(n||``,t).loadIcon=e}var Hd=`data-style`,Ud=``;function Wd(e){Ud=e}function Gd(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Hd));n||(n=document.createElement(`style`),n.setAttribute(Hd,Hd),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+Ud}function Kd(){Gu(``,zd),Nu(!0);let e;try{e=window}catch{}if(e){if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!Iu(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;td(e,r)||console.error(n)}catch{console.error(n)}}}}return{enableCache:e=>{},disableCache:e=>{},iconLoaded:Lu,iconExists:Lu,getIcon:Ru,listIcons:ju,addIcon:Fu,addCollection:Iu,calculateSize:Sd,buildIcon:Dd,iconToHTML:Od,svgToURL:jd,loadIcons:md,loadIcon:hd,addAPIProvider:td,setCustomIconLoader:Vd,setCustomIconsLoader:Bd,appendCustomStyle:Wd,_api:{getAPIConfig:nd,setAPIModule:Gu,sendAPIQuery:sd,setFetch:Nd,getFetch:Pd,listAPIProviders:rd}}}var qd={"background-color":`currentColor`},Jd={"background-color":`transparent`},Yd={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},Xd={"-webkit-mask":qd,mask:qd,background:Jd};for(let e in Xd){let t=Xd[e];for(let n in Yd)t[e+`-`+n]=Yd[n]}function Zd(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function Qd(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=jd(Od(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:Zd(a.width),height:Zd(a.height),...n?qd:Jd};for(let e in c)s.setProperty(e,c[e]);return r}var $d;function ef(){try{$d=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{$d=null}}function tf(e){return $d===void 0&&ef(),$d?$d.createHTML(e):e}function nf(e){let t=document.createElement(`span`),n=e.attributes,r=``;return n.width||(r=`width: inherit;`),n.height||(r+=`height: inherit;`),r&&(n.style=r),t.innerHTML=tf(Od(e.body,n)),t.firstChild}function rf(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function af(e,t){let n=t.icon.data,r=t.customisations,i=Dd(n,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);let a=t.renderedMode,o;switch(a){case`svg`:o=nf(i);break;default:o=Qd(i,{...au,...n},a===`mask`)}let s=rf(e);s?o.tagName===`SPAN`&&s.tagName===o.tagName?s.setAttribute(`style`,o.getAttribute(`style`)):e.replaceChild(o,s):e.appendChild(o)}function of(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function sf(e=`iconify-icon`){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;let r=t.get(e);if(r)return r;let i=[`icon`,`mode`,`inline`,`noobserver`,`width`,`height`,`rotate`,`flip`],a=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;_connected=!1;_observer=null;_visible=!0;constructor(){super();let e=this._shadowRoot=this.attachShadow({mode:`open`}),t=this.hasAttribute(`inline`);Gd(e,t),this._state=of({value:``},t),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(e){switch(e){case`inline`:{let e=this.hasAttribute(`inline`),t=this._state;e!==t.inline&&(t.inline=e,Gd(this._shadowRoot,e));break}case`noobserver`:this.hasAttribute(`noobserver`)?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let e=this.getAttribute(`icon`);if(e&&e.slice(0,1)===`{`)try{return JSON.parse(e)}catch{}return e}set icon(e){typeof e==`object`&&(e=JSON.stringify(e)),this.setAttribute(`icon`,e)}get inline(){return this.hasAttribute(`inline`)}set inline(e){e?this.setAttribute(`inline`,`true`):this.removeAttribute(`inline`)}get observer(){return this.hasAttribute(`observer`)}set observer(e){e?this.setAttribute(`observer`,`true`):this.removeAttribute(`observer`)}restartAnimation(){let e=this._state;if(e.rendered){let t=this._shadowRoot;if(e.renderedMode===`svg`)try{t.lastChild.setCurrentTime(0);return}catch{}af(t,e)}}get status(){let e=this._state;return e.rendered?`rendered`:e.icon.data===null?`failed`:`loading`}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let e=this._state,t=this.getAttribute(`icon`);if(t!==e.icon.value){this._iconChanged(t);return}if(!e.rendered||!this._visible)return;let n=this.getAttribute(`mode`),r=pu(this);(e.attrMode!==n||mu(e.customisations,r)||!rf(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=_d(e,(e,t,n)=>{let r=this._state;if(r.rendered||this.getAttribute(`icon`)!==e)return;let i={value:e,name:t,data:n};i.data?this._gotIconData(i):r.icon=i});t.data?this._gotIconData(t):this._state=of(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=rf(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,pu(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=yd(e.data.body,n),i=this._state.inline;af(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:t,attrMode:n,renderedMode:r})}startObserver(){if(!this._observer&&!this.hasAttribute(`noobserver`))try{this._observer=new IntersectionObserver(e=>{let t=e.some(e=>e.isIntersecting);t!==this._visible&&(this._visible=t,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};i.forEach(e=>{e in a.prototype||Object.defineProperty(a.prototype,e,{get:function(){return this.getAttribute(e)},set:function(t){t===null?this.removeAttribute(e):this.setAttribute(e,t)}})});let o=Kd();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{enableCache:cf,disableCache:lf,iconLoaded:uf,iconExists:df,getIcon:ff,listIcons:pf,addIcon:mf,addCollection:hf,calculateSize:gf,buildIcon:_f,iconToHTML:vf,svgToURL:yf,loadIcons:bf,loadIcon:xf,setCustomIconLoader:Sf,setCustomIconsLoader:Cf,addAPIProvider:wf,_api:Tf}=sf()||Kd(),Ef=()=>((0,J.c)(1),null),Df=(0,K.memo)(e=>{let t=(0,J.c)(3),{children:n}=e,{theme:r}=Ro(),i,a;return t[0]===r?(i=t[1],a=t[2]):(i=()=>(document.body.classList.add(r,`${r}-theme`),document.body.dataset.theme=r,()=>{document.body.classList.remove(r,`${r}-theme`),delete document.body.dataset.theme}),a=[r],t[0]=r,t[1]=i,t[2]=a),(0,K.useLayoutEffect)(i,a),n});Df.displayName=`ThemeProvider`;var Of=e=>{let t=(0,J.c)(3),{variables:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,q.jsx)(`div`,{className:`contents`,style:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},kf=e=>{let t=(0,J.c)(30),{isOpen:n,onClose:r,traceback:i,errorMessage:a}=e,o;t[0]===i?o=t[1]:(o=async()=>{let e=document.createElement(`div`);e.innerHTML=Ae(i);let t=e.textContent||e.innerText||``;try{await navigator.clipboard.writeText(t),Co({title:`Copied to clipboard`,description:`Traceback has been copied to your clipboard.`})}catch{Co({title:`Failed to copy`,description:`Could not copy to clipboard.`,variant:`danger`})}},t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=e=>!e&&r(),t[2]=r,t[3]=c);let l;t[4]===a?l=t[5]:(l=(0,q.jsx)(Yn,{className:`text-destructive`,children:a}),t[4]=a,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,q.jsx)(Kn,{children:`Click the traceback to select and copy.`}),t[6]=u):u=t[6];let d;t[7]===l?d=t[8]:(d=(0,q.jsxs)(qn,{children:[l,u]}),t[7]=l,t[8]=d);let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,q.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:`Traceback`}),t[9]=f):f=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(La,{className:`h-3 w-3`}),t[10]=p):p=t[10];let m;t[11]===s?m=t[12]:(m=(0,q.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[f,(0,q.jsxs)(Wi,{variant:`outline`,size:`xs`,onClick:s,className:`flex items-center gap-1`,children:[p,`Copy`]})]}),t[11]=s,t[12]=m);let h;t[13]===i?h=t[14]:(h=Zo({html:i}),t[13]=i,t[14]=h);let g;t[15]===h?g=t[16]:(g=(0,q.jsx)(`div`,{className:`font-code text-sm p-4 bg-muted rounded border overflow-auto max-h-[50vh] cursor-text select-text`,children:h}),t[15]=h,t[16]=g);let _;t[17]!==g||t[18]!==m?(_=(0,q.jsxs)(`div`,{className:`my-4 overflow-auto`,children:[m,g]}),t[17]=g,t[18]=m,t[19]=_):_=t[19];let v;t[20]===r?v=t[21]:(v=(0,q.jsx)(Zn,{children:(0,q.jsx)(Xn,{onClick:r,children:`Close`})}),t[20]=r,t[21]=v);let y;t[22]!==_||t[23]!==v||t[24]!==d?(y=(0,q.jsxs)(Jn,{className:`max-w-4xl max-h-[80vh]`,children:[d,_,v]}),t[22]=_,t[23]=v,t[24]=d,t[25]=y):y=t[25];let b;return t[26]!==n||t[27]!==y||t[28]!==c?(b=(0,q.jsx)(Qn,{open:n,onOpenChange:c,children:y}),t[26]=n,t[27]=y,t[28]=c,t[29]=b):b=t[29],b},Af=()=>{let e=(0,J.c)(6),[t,r]=n(te);if(!t)return null;let i;e[0]===r?i=e[1]:(i=()=>r(null),e[0]=r,e[1]=i);let a;return e[2]!==i||e[3]!==t.errorMessage||e[4]!==t.traceback?(a=(0,q.jsx)(kf,{isOpen:!0,onClose:i,traceback:t.traceback,errorMessage:t.errorMessage}),e[2]=i,e[3]=t.errorMessage,e[4]=t.traceback,e[5]=a):a=e[5],a},jf=e=>{let t=(0,J.c)(5),{children:n}=e,i=r(yt),a;t[0]===i?a=t[1]:(a=bi(i),t[0]=i,t[1]=a);let o;return t[2]!==n||t[3]!==a?(o=(0,q.jsx)(zo,{locale:a,children:n}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o},Mf=Da(()=>To(()=>import(`./home-page-Dnv5d4Ek.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]),import.meta.url)),Nf=Da(()=>To(()=>import(`./run-page-DWUXQLtA.js`),__vite__mapDeps([135,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,136,75,76,77,78,79,80,137,89,138,116,117,139,140,94,95,96,141,142,143,144,145,98,102,146,147,115,148,86,149,150,151,152,121,122,153,154,123,155,131,132,133,156,157,158,159,160,87,105,161,162,88,163,164,124,165,166,167,168,169,110,170,171,114,172,120,173,174,175,176,177,101,178,179,180,181,125,182,119,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,92]),import.meta.url)),Pf=Da(()=>To(()=>import(`./edit-page-HpmTxp7Y.js`),__vite__mapDeps([296,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,109,110,111,112,113,114,115,104,79,80,116,117,77,102,96,118,78,119,120,89,121,122,123,88,124,125,126,127,171,75,76,136,137,138,139,140,94,95,141,142,143,144,145,98,146,147,148,86,149,150,151,152,153,154,155,131,132,133,156,157,158,159,160,87,105,161,162,163,164,165,166,175,176,177,101,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,167,297,298,299,85,90,300,301,302,303,304,83,305,84,306,91,295,128,307,173,308,309,310,311,312,313,92,93,314,134,315,316,107,172,317,318,99,100,319,320,290,321,322,323,292,129,130,324,325,168,169,170,174,289,291,293,294,108,326,327,328,329,330,331,332,333,334,335,336,337,338]),import.meta.url)),Ff=Da(()=>To(()=>import(`./gallery-page-D70P7AOr.js`),__vite__mapDeps([339,1,3,4,20,2,15,16,17,18,19,75,6,23,24,25,36,26,27,33,32,34,37,30,44,28,45,46,47,48,8,9,10,11,49,76,31,77,78,54,38,81,79,35,80,82,83,84,85,86,50,87,88,43,89,7,90,91,92,93,102,72,127]),import.meta.url));function If(e){switch(e){case`home`:Mf.preload();break;case`gallery`:Ff.preload();break;case`read`:Nf.preload();break;default:Pf.preload()}}var Lf=(0,K.memo)(()=>{let e=(0,J.c)(12),[t]=dt(),[n]=gt(),r;e[0]===t.display.code_editor_font_size?r=e[1]:(r=zf(t.display.code_editor_font_size),e[0]=t.display.code_editor_font_size,e[1]=r);let i=r,a;e[2]!==n||e[3]!==t?(a=()=>{let e=Xt();return e===`home`?(0,q.jsx)(Mf.Component,{}):e===`gallery`?(0,q.jsx)(Ff.Component,{}):e===`read`?(0,q.jsx)(Nf.Component,{appConfig:n}):(0,q.jsx)(Pf.Component,{userConfig:t,appConfig:n})},e[2]=n,e[3]=t,e[4]=a):a=e[4];let o=a,s;e[5]===i?s=e[6]:(s={"--marimo-code-editor-font-size":i},e[5]=i,e[6]=s);let c;e[7]===o?c=e[8]:(c=(0,q.jsx)(jf,{children:o()}),e[7]=o,e[8]=c);let l;return e[9]!==s||e[10]!==c?(l=(0,q.jsx)(Rf,{children:(0,q.jsx)(Of,{variables:s,children:c})}),e[9]=s,e[10]=c,e[11]=l):l=e[11],l});Lf.displayName=`MarimoApp`;var Rf=(0,K.memo)(e=>{let t=(0,J.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsx)(_n,{}),i=(0,q.jsx)(Ef,{}),a=(0,q.jsx)(Af,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,q.jsx)(vn,{children:(0,q.jsx)(K.Suspense,{children:(0,q.jsx)(Ri,{children:(0,q.jsx)(Er,{controller:Tr,children:(0,q.jsx)(jf,{children:(0,q.jsxs)(Ka,{children:[n,r,i,a]})})})})})}),t[3]=n,t[4]=o),o});Rf.displayName=`Providers`;function zf(e){return`${e/16}rem`}function Bf(){Yt(e=>{e.delete(Bt.accessToken)})}var Vf={sendComponentValues:`startConnection`,sendModelValue:`startConnection`,sendInstantiate:`startConnectionWithoutKernel`,sendRun:`startConnection`,sendDeleteCell:`startConnection`,sendRunScratchpad:`startConnection`,saveAppConfig:`startConnection`,saveCellConfig:`startConnection`,discoverDataSources:`startConnection`,exportAsHTML:`startConnection`,exportAsIPYNB:`startConnection`,exportAsMarkdown:`startConnection`,exportAsScript:`startConnection`,exportAsPDF:`startConnection`,readCode:`startConnection`,sendCopy:`throwError`,sendFormat:`throwError`,sendRestart:`throwError`,sendSave:`waitForConnectionOpen`,invokeAiTool:`waitForConnectionOpen`,sendFunctionRequest:`waitForConnectionOpen`,sendRename:`waitForConnectionOpen`,autoExportAsHTML:`waitForConnectionOpen`,autoExportAsMarkdown:`waitForConnectionOpen`,autoExportAsIPYNB:`waitForConnectionOpen`,updateCellOutputs:`waitForConnectionOpen`,listSecretKeys:`throwError`,writeSecret:`throwError`,clearCache:`throwError`,getCacheInfo:`throwError`,saveUserConfig:`throwError`,sendShutdown:`throwError`,getPackageList:`throwError`,getSandbox:`serverOnly`,updateManifest:`serverOnly`,syncSandbox:`serverOnly`,getDependencyTree:`throwError`,addPackage:`throwError`,removePackage:`throwError`,getFileRoots:`startConnection`,sendListFiles:`startConnection`,sendSearchFiles:`startConnection`,sendCreateFileOrFolder:`throwError`,sendDeleteFileOrFolder:`throwError`,sendCopyFileOrFolder:`throwError`,sendRenameFileOrFolder:`throwError`,sendUpdateFile:`throwError`,sendFileDetails:`throwError`,openFile:`throwError`,getEnvironmentInfo:`serverOnly`,getExportAvailability:`serverOnly`,installExportRequirements:`startConnectionWithoutKernel`,getRecentFiles:`startConnection`,getWorkspaceFiles:`startConnection`,getRunningNotebooks:`startConnection`,shutdownSession:`startConnection`,openTutorial:`startConnection`,getUsageStats:`waitForConnectionOpen`,sendStdin:`waitForConnectionOpen`,sendInterrupt:`waitForConnectionOpen`,sendPdb:`waitForConnectionOpen`,sendSetBreakpoints:`waitForConnectionOpen`,sendInstallMissingPackages:`waitForConnectionOpen`,readSnippets:`waitForConnectionOpen`,previewDatasetColumn:`waitForConnectionOpen`,previewSQLTable:`waitForConnectionOpen`,previewSQLTableList:`waitForConnectionOpen`,previewSQLSchemaList:`waitForConnectionOpen`,previewDataSourceConnection:`waitForConnectionOpen`,validateSQL:`waitForConnectionOpen`,listStorageEntries:`waitForConnectionOpen`,downloadStorage:`waitForConnectionOpen`,sendDocumentTransaction:`waitForConnectionOpen`,sendCodeCompletionRequest:`waitForConnectionOpen`};function Hf(e,t){let n=Mo(async e=>{a.set(nn,{state:tn.CONNECTING}),await e.init()});function r(e,r){let i=Vf[r];return(async(...a)=>{let o=t();if(!o.isLazy)return e(...a);switch(i){case`serverOnly`:return e(...a);case`dropRequest`:W.debug(`Dropping request: ${r}, since not connected to a kernel.`);return;case`throwError`:throw new ns;case`waitForConnectionOpen`:return await en(),await mn(),e(...a);case`startConnectionWithoutKernel`:case`startConnection`:return await n(o),await en(),i===`startConnection`&&await mn(),e(...a);default:throw Error(`Unknown action for "${r}"`)}})}return Rt.mapValues(e,(e,t)=>r(e,t))}var Uf=`download`;function Wf(){let e=a.get(Re);if(!e)return;let t=qi.basename(e);return Di.withoutExtension(t)}function Gf(e){let t=Wf();return t?`${t}.${e}`:`${Uf}.${e}`}function Kf(e){let t=os[e??`pymdown`];return Gf(t)}function qf(e){return{body:e,bodySerializer:e=>e}}var{handleExportResponse:Jf,handleResponse:Yf,handleResponseReturnNull:Xf}=es;function Zf(){let e=jo(()=>{let e=sn();return $o(e)}),t=()=>sn().sessionHeaders(),n=()=>({header:t()});return{sendComponentValues:t=>e().POST(`/api/kernel/set_ui_element_value`,{body:t,params:n()}).then(Xf),sendModelValue:t=>e().POST(`/api/kernel/set_model_value`,{body:t,params:n()}).then(Xf),sendRestart:()=>e().POST(`/api/kernel/restart_session`,{params:n()}).then(Xf),sendDocumentTransaction:async t=>(await en(),e().POST(`/api/document/transaction`,{body:t,params:n()}).then(Xf)),sendRename:t=>e().POST(`/api/kernel/rename`,{body:t,params:n()}).then(Xf),sendSave:t=>e().POST(`/api/kernel/save`,{body:t,parseAs:`text`,params:n()}).then(Xf),sendCopy:t=>e().POST(`/api/kernel/copy`,{body:t,parseAs:`text`,params:n()}).then(Xf),sendFormat:t=>e().POST(`/api/kernel/format`,{body:t}).then(Yf),sendInterrupt:()=>e().POST(`/api/kernel/interrupt`,{params:n()}).then(Xf),sendShutdown:()=>e().POST(`/api/kernel/shutdown`).then(Xf),sendRun:async t=>(await en(),e().POST(`/api/kernel/run`,{body:t,params:n()}).then(Xf)),sendRunScratchpad:async t=>(await en(),e().POST(`/api/kernel/scratchpad/run`,{body:t,params:n()}).then(Xf)),sendInstantiate:async t=>(await en(),e().POST(`/api/kernel/instantiate`,{body:t,params:n()}).then(Xf)),sendDeleteCell:t=>e().POST(`/api/kernel/delete`,{body:t,params:n()}).then(Xf),sendCodeCompletionRequest:async t=>(await en(),e().POST(`/api/kernel/code_autocomplete`,{body:t,params:n()}).then(Xf)),saveUserConfig:t=>e().POST(`/api/kernel/save_user_config`,{body:t}).then(Xf),saveAppConfig:t=>e().POST(`/api/kernel/save_app_config`,{body:t,parseAs:`text`,params:n()}).then(Xf),saveCellConfig:t=>e().POST(`/api/kernel/set_cell_config`,{body:t,params:n()}).then(Xf),sendFunctionRequest:t=>e().POST(`/api/kernel/function_call`,{body:t,params:n()}).then(Xf),sendStdin:t=>e().POST(`/api/kernel/stdin`,{body:t,params:n()}).then(Xf),sendInstallMissingPackages:t=>e().POST(`/api/kernel/install_missing_packages`,{body:t,params:n()}).then(Xf),readCode:async()=>(await en(),e().POST(`/api/kernel/read_code`,{params:n()}).then(Yf)),readSnippets:async()=>(await en(),e().GET(`/api/documentation/snippets`,{params:n()}).then(Yf)),previewDatasetColumn:t=>e().POST(`/api/datasources/preview_column`,{body:t,params:n()}).then(Xf),previewSQLTable:t=>e().POST(`/api/datasources/preview_sql_table`,{body:t,params:n()}).then(Xf),previewSQLTableList:t=>e().POST(`/api/datasources/preview_sql_table_list`,{body:t,params:n()}).then(Xf),previewSQLSchemaList:t=>e().POST(`/api/datasources/preview_sql_schema_list`,{body:t,params:n()}).then(Xf),previewDataSourceConnection:t=>e().POST(`/api/datasources/preview_datasource_connection`,{body:t,params:n()}).then(Xf),discoverDataSources:t=>e().POST(`/api/datasources/discover`,{body:t,params:n()}).then(Xf),validateSQL:t=>e().POST(`/api/sql/validate`,{body:t,params:n()}).then(Xf),openFile:async t=>(await en(),await e().POST(`/api/files/open`,{body:t}).then(Xf),null),getUsageStats:async()=>(await en(),e().GET(`/api/usage`).then(Yf)),getEnvironmentInfo:()=>e().GET(`/api/environment`).then(Yf),sendPdb:t=>e().POST(`/api/kernel/pdb/pm`,{body:t,params:n()}).then(Xf),sendSetBreakpoints:t=>e().POST(`/api/kernel/pdb/breakpoints`,{body:t,params:n()}).then(Xf),getFileRoots:async()=>(await en(),e().GET(`/api/files/roots`).then(Yf)),sendListFiles:async t=>(await en(),e().POST(`/api/files/list_files`,{body:t}).then(Yf)),sendSearchFiles:async t=>(await en(),e().POST(`/api/files/search`,{body:t}).then(Yf)),sendCreateFileOrFolder:async t=>{await en();let n=new FormData;return n.append(`path`,t.path),n.append(`type`,t.type),n.append(`name`,t.name),t.file&&n.append(`file`,t.file,t.name),e().POST(`/api/files/create`,qf(n)).then(Yf)},sendDeleteFileOrFolder:async t=>e().POST(`/api/files/delete`,{body:t}).then(Yf),sendCopyFileOrFolder:async t=>e().POST(`/api/files/copy`,{body:t}).then(Yf),sendRenameFileOrFolder:async t=>e().POST(`/api/files/move`,{body:t}).then(Yf),sendUpdateFile:async t=>(await en(),e().POST(`/api/files/update`,{body:t}).then(Yf)),sendFileDetails:async t=>(await en(),e().POST(`/api/files/file_details`,{body:t}).then(Yf)),openTutorial:t=>e().POST(`/api/home/tutorial/open`,{body:t}).then(Yf),getRecentFiles:()=>e().POST(`/api/home/recent_files`).then(Yf),getWorkspaceFiles:t=>e().POST(`/api/home/workspace_files`,{body:t}).then(Yf),getRunningNotebooks:()=>e().POST(`/api/home/running_notebooks`).then(Yf),shutdownSession:t=>e().POST(`/api/home/shutdown_session`,{body:t}).then(Yf),getExportAvailability:()=>e().GET(`/api/export/availability`).then(Yf),installExportRequirements:t=>e().POST(`/api/export/requirements/install`,{body:t,params:n()}).then(Yf),exportAsHTML:async t=>e().POST(`/api/export/html`,{body:Mt(t),parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`html`)})),exportAsMarkdown:async t=>e().POST(`/api/export/markdown`,{body:t,parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Kf(t.flavor)})),exportAsScript:async t=>e().POST(`/api/export/script`,{body:t,parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`script.py`)})),exportAsIPYNB:async t=>e().POST(`/api/export/ipynb`,{body:t,parseAs:`text`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`ipynb`)})),exportAsPDF:async t=>e().POST(`/api/export/pdf`,{body:t,parseAs:`blob`,params:n()}).then(e=>Jf(e,{defaultFilename:Gf(`pdf`)})),autoExportAsHTML:async t=>e().POST(`/api/export/auto_export/html`,{body:t,params:n()}).then(Xf),autoExportAsMarkdown:async t=>e().POST(`/api/export/auto_export/markdown`,{body:t,params:n()}).then(Xf),autoExportAsIPYNB:async t=>e().POST(`/api/export/auto_export/ipynb`,{body:t,params:n()}).then(Xf),updateCellOutputs:async t=>e().POST(`/api/export/update_cell_outputs`,{body:t,params:n()}).then(Xf),getSandbox:t=>e().POST(`/api/packages/sandbox`,{body:t,params:n()}).then(Yf),updateManifest:t=>e().POST(`/api/packages/manifest`,{body:t,params:n()}).then(Yf),syncSandbox:t=>e().POST(`/api/packages/sync`,{body:t,params:n()}).then(Yf),addPackage:t=>e().POST(`/api/packages/add`,{body:t}).then(Yf),removePackage:t=>e().POST(`/api/packages/remove`,{body:t}).then(Yf),getPackageList:async()=>(await Zt(),e().GET(`/api/packages/list`).then(Yf)),getDependencyTree:async()=>(await Zt(),e().GET(`/api/packages/tree`).then(Yf)),listSecretKeys:async t=>(await en(),e().POST(`/api/secrets/keys`,{body:t,params:n()}).then(Xf)),writeSecret:async t=>e().POST(`/api/secrets/create`,{body:t,params:n()}).then(Xf),invokeAiTool:async t=>e().POST(`/api/ai/invoke_tool`,{body:t,params:n()}).then(Yf),clearCache:async()=>e().POST(`/api/cache/clear`,{body:{},params:n()}).then(Xf),getCacheInfo:async()=>e().POST(`/api/cache/info`,{body:{},params:n()}).then(Xf),listStorageEntries:t=>e().POST(`/api/storage/list_entries`,{body:t,params:n()}).then(Xf),downloadStorage:t=>e().POST(`/api/storage/download`,{body:t,params:n()}).then(Xf)}}var Qf=`static-notebook`;function $f(){Co({id:Qf,once:!0,title:`Static notebook`,description:`This notebook is not connected to a kernel. Any interactive elements will not work.`})}function ep(){let e=()=>{throw Error(`Unreachable. Expected to be in run mode`)};return{sendComponentValues:async()=>($f(),W.log(`Updating UI elements is not supported in static mode`),null),sendModelValue:async()=>(W.log(`Updating model values is not supported in static mode`),null),sendInstantiate:async()=>(W.log(`Viewing as static notebook`),null),sendFunctionRequest:async()=>($f(),W.log(`Function requests are not supported in static mode`),null),sendRestart:e,sendDocumentTransaction:e,sendRun:e,sendRunScratchpad:e,sendRename:e,sendSave:e,sendCopy:e,sendInterrupt:e,sendShutdown:e,sendFormat:e,sendDeleteCell:e,sendCodeCompletionRequest:e,saveUserConfig:e,saveAppConfig:e,saveCellConfig:e,sendStdin:e,readCode:e,readSnippets:e,previewDatasetColumn:e,previewSQLTable:e,previewSQLTableList:e,previewSQLSchemaList:e,previewDataSourceConnection:e,discoverDataSources:e,validateSQL:e,openFile:e,getUsageStats:e,getEnvironmentInfo:e,getFileRoots:e,sendListFiles:e,sendSearchFiles:e,sendPdb:e,sendSetBreakpoints:e,sendCreateFileOrFolder:e,sendDeleteFileOrFolder:e,sendCopyFileOrFolder:e,sendRenameFileOrFolder:e,sendUpdateFile:e,sendFileDetails:e,openTutorial:e,sendInstallMissingPackages:e,getRecentFiles:e,getWorkspaceFiles:e,getRunningNotebooks:e,shutdownSession:e,getExportAvailability:e,installExportRequirements:e,exportAsHTML:e,exportAsIPYNB:e,exportAsMarkdown:e,exportAsScript:e,exportAsPDF:e,autoExportAsHTML:e,autoExportAsMarkdown:e,autoExportAsIPYNB:e,updateCellOutputs:e,addPackage:e,removePackage:e,getPackageList:e,getSandbox:e,updateManifest:e,syncSandbox:e,getDependencyTree:e,listSecretKeys:e,writeSecret:e,invokeAiTool:e,clearCache:e,getCacheInfo:e,listStorageEntries:e,downloadStorage:e}}function tp(e){let t={sendComponentValues:`Failed update value`,sendModelValue:`Failed to update model value`,sendInstantiate:`Failed to instantiate`,sendFunctionRequest:`Failed to send function request`,sendRestart:`Failed to restart`,sendDocumentTransaction:`Failed to sync document transaction`,sendRun:`Failed to run`,sendRunScratchpad:`Failed to run scratchpad`,sendRename:`Failed to rename`,sendSave:`Failed to save`,sendCopy:`Failed to copy`,sendInterrupt:`Failed to interrupt`,sendShutdown:`Failed to shutdown`,sendFormat:`Failed to format`,sendDeleteCell:`Failed to delete cell`,sendCodeCompletionRequest:`Failed to complete code`,saveUserConfig:`Failed to save user config`,saveAppConfig:`Failed to save app config`,saveCellConfig:`Failed to save cell config`,sendStdin:`Failed to send stdin`,readCode:`Failed to read code`,readSnippets:`Failed to fetch snippets`,previewDatasetColumn:`Failed to fetch data sources`,previewSQLTable:`Failed to fetch SQL table`,previewSQLTableList:`Failed to fetch SQL table list`,previewSQLSchemaList:`Failed to fetch SQL schema list`,previewDataSourceConnection:`Failed to preview data source connection`,discoverDataSources:`Failed to discover data sources`,validateSQL:`Failed to validate SQL`,openFile:`Failed to open file`,getUsageStats:``,getEnvironmentInfo:``,getFileRoots:``,sendListFiles:`Failed to list files`,sendSearchFiles:``,sendPdb:`Failed to start debug session`,sendSetBreakpoints:``,sendCreateFileOrFolder:`Failed to create file or folder`,sendDeleteFileOrFolder:`Failed to delete file or folder`,sendCopyFileOrFolder:`Failed to duplicate file or folder`,sendRenameFileOrFolder:`Failed to rename file or folder`,sendUpdateFile:`Failed to update file`,sendFileDetails:`Failed to get file details`,openTutorial:`Failed to open tutorial`,sendInstallMissingPackages:`Failed to install missing packages`,getRecentFiles:`Failed to get recent files`,getWorkspaceFiles:`Failed to get workspace files`,getRunningNotebooks:`Failed to get running notebooks`,shutdownSession:`Failed to shutdown session`,getExportAvailability:``,installExportRequirements:`Failed to install export requirements`,exportAsHTML:`Failed to export HTML`,exportAsIPYNB:`Failed to export ipynb`,exportAsMarkdown:`Failed to export Markdown`,exportAsScript:`Failed to export Script`,exportAsPDF:`Failed to export PDF`,autoExportAsHTML:``,autoExportAsMarkdown:``,autoExportAsIPYNB:``,updateCellOutputs:``,addPackage:`Failed to add package`,removePackage:`Failed to remove package`,getPackageList:`Failed to get package list`,getSandbox:``,updateManifest:``,syncSandbox:``,getDependencyTree:`Failed to get dependency tree`,listSecretKeys:`Failed to fetch secrets`,writeSecret:`Failed to write secret`,invokeAiTool:`Failed to invoke AI tool`,clearCache:`Failed to clear cache`,getCacheInfo:``,listStorageEntries:`Failed to list storage entries`,downloadStorage:`Failed to download storage entry`},n={};for(let[r,i]of Object.entries(e)){let e=r;n[e]=async(...n)=>{try{return await i(...n)}catch(n){if(n instanceof ns){if(a.get(un))return;let e=Co({title:`Kernel Not Connected`,description:`You need to connect to a kernel to perform this action.`,variant:`default`,action:(0,q.jsx)(np,{onConnect:()=>e.dismiss()})});throw W.error(`Failed to handle request: ${r}`,n),n}if(n instanceof is&&n.status===403)throw W.warn(`Request refused, connection is read-only: ${r}`),n;let i=t[e],o=ts(n);throw i&&Co({title:i,description:o,variant:`danger`}),W.error(`Failed to handle request: ${r}`,n),n}}}return n}var np=e=>{let t=(0,J.c)(9),{onConnect:n}=e,i=rn(),a=r(un),o;t[0]!==i||t[1]!==n?(o=()=>{i(),setTimeout(()=>{n()},800)},t[0]=i,t[1]=n,t[2]=o):o=t[2];let s;t[3]===a?s=t[4]:(s=a&&(0,q.jsx)(Ja,{size:`small`,className:`mr-1`}),t[3]=a,t[4]=s);let c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,q.jsxs)(Wi,{size:`xs`,onClick:o,disabled:a,children:[s,`Connect`]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c};function rp(){let e;return e=Qt()?Ot.INSTANCE:on()?ep():Hf(Zf(),()=>sn()),Qo(tp(e))}var ip=K.forwardRef((e,t)=>{let n=(0,J.c)(16),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:i,children:r,orientation:a,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s=a===`horizontal`&&`max-w-max flex-1 items-center justify-center`,c=a===`vertical`&&``,l;n[5]!==i||n[6]!==s||n[7]!==c?(l=G(s,c,`relative z-10`,i),n[5]=i,n[6]=s,n[7]=c,n[8]=l):l=n[8];let u;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,q.jsx)(fp,{}),n[9]=u):u=n[9];let d;return n[10]!==r||n[11]!==a||n[12]!==o||n[13]!==t||n[14]!==l?(d=(0,q.jsxs)(Lc,{ref:t,className:l,orientation:a,...o,children:[r,u]}),n[10]=r,n[11]=a,n[12]=o,n[13]=t,n[14]=l,n[15]=d):d=n[15],d});ip.displayName=Lc.displayName;var ap=yn(`group flex list-none gap-1`,{variants:{orientation:{horizontal:`flex items-center`,vertical:`flex flex-col`}},defaultVariants:{orientation:`horizontal`}}),op=K.forwardRef((e,t)=>{let n=(0,J.c)(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,orientation:i,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]!==r||n[5]!==i?(o=G(ap({orientation:i}),r),n[4]=r,n[5]=i,n[6]=o):o=n[6];let s;return n[7]!==a||n[8]!==t||n[9]!==o?(s=(0,q.jsx)(Rc,{ref:t,className:o,...a}),n[7]=a,n[8]=t,n[9]=o,n[10]=s):s=n[10],s});op.displayName=Rc.displayName;var sp=zc,cp=yn(`group inline-flex rounded-md bg-background px-4 py-2 text-lg font-medium text-(--slate-12) transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50`,{variants:{orientation:{horizontal:`w-max items-center justify-center`,vertical:`w-full`}},defaultVariants:{orientation:`horizontal`}}),lp=K.forwardRef((e,t)=>{let n=(0,J.c)(12),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:i,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===i?o=n[5]:(o=G(cp(),`group`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,q.jsx)(us,{className:`relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180`,"aria-hidden":`true`}),n[6]=s):s=n[6];let c;return n[7]!==r||n[8]!==a||n[9]!==t||n[10]!==o?(c=(0,q.jsxs)(Bc,{ref:t,className:o,...a,children:[r,` `,s]}),n[7]=r,n[8]=a,n[9]=t,n[10]=o,n[11]=c):c=n[11],c});lp.displayName=Bc.displayName;var up=K.forwardRef((e,t)=>{let n=(0,J.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=G(`left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto `,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,q.jsx)(Uc,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});up.displayName=Uc.displayName;var dp=Vc,fp=K.forwardRef((e,t)=>{let n=(0,J.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=G(`absolute left-0 top-full flex justify-center`),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=G(`origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==t||n[8]!==o?(s=(0,q.jsx)(`div`,{className:a,children:(0,q.jsx)(Wc,{className:o,ref:t,...i})}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});fp.displayName=Wc.displayName;var pp=K.forwardRef((e,t)=>{let n=(0,J.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=G(`top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in`,r),n[3]=r,n[4]=a);let o;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`}),n[5]=o):o=n[5];let s;return n[6]!==i||n[7]!==t||n[8]!==a?(s=(0,q.jsx)(Hc,{ref:t,className:a,...i,children:o}),n[6]=i,n[7]=t,n[8]=a,n[9]=s):s=n[9],s});pp.displayName=Hc.displayName;var mp=e=>{let t=(0,J.c)(23),{item:n,preserveQueryParams:r,target:i}=e,a=K.useRef(null),[o,s]=K.useState(!1),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>s(e!==``),t[0]=c):c=t[0];let l;t[1]===n.label?l=t[2]:(l=Zo({html:n.label}),t[1]=n.label,t[2]=l);let u;t[3]===l?u=t[4]:(u=(0,q.jsx)(lp,{ref:a,children:l}),t[3]=l,t[4]=u);let d;if(t[5]!==n.items||t[6]!==r||t[7]!==i){let e;t[9]!==r||t[10]!==i?(e=e=>(0,q.jsx)(bp,{label:e.label,href:r(e.href),target:i(e.href),children:e.description&&Zo({html:e.description})},e.label),t[9]=r,t[10]=i,t[11]=e):e=t[11],d=n.items.map(e),t[5]=n.items,t[6]=r,t[7]=i,t[8]=d}else d=t[8];let f;t[12]===d?f=t[13]:(f=(0,q.jsx)(up,{className:`w-auto`,children:(0,q.jsx)(`ul`,{className:`grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] `,children:d})}),t[12]=d,t[13]=f);let p;t[14]!==u||t[15]!==f?(p=(0,q.jsx)(op,{children:(0,q.jsxs)(sp,{children:[u,f]})}),t[14]=u,t[15]=f,t[16]=p):p=t[16];let m;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,q.jsx)(fp,{}),t[17]=m):m=t[17];let h;t[18]===o?h=t[19]:(h=(0,q.jsx)(_p,{anchorRef:a,open:o,children:m}),t[18]=o,t[19]=h);let g;return t[20]!==p||t[21]!==h?(g=(0,q.jsxs)(Lc,{className:`relative z-10 max-w-max flex-1 items-center justify-center`,orientation:`horizontal`,onValueChange:c,children:[p,h]}),t[20]=p,t[21]=h,t[22]=g):g=t[22],g},hp=Dn(({container:e,children:t})=>(0,Rs.createPortal)(t,e??document.body)),gp=8,_p=e=>{let t=(0,J.c)(18),{anchorRef:n,open:r,children:i}=e,[a,o]=K.useState(null),s=K.useRef(null),c;t[0]===n?c=t[1]:(c=()=>{if(!n.current)return;let e=n.current.getBoundingClientRect(),t=s.current?.firstElementChild?.scrollWidth??0,r=window.innerWidth-t-gp;o({left:Math.max(gp,Math.min(e.left,r)),top:e.bottom})},t[0]=n,t[1]=c);let l=c,u,d;t[2]!==r||t[3]!==l?(u=()=>{if(l(),r){let e=requestAnimationFrame(l);return()=>cancelAnimationFrame(e)}},d=[r,l],t[2]=r,t[3]=l,t[4]=u,t[5]=d):(u=t[4],d=t[5]),K.useLayoutEffect(u,d);let f;t[6]!==n||t[7]!==l?(f={ref:n,onResize:l},t[6]=n,t[7]=l,t[8]=f):f=t[8],Oa(f);let p,m;if(t[9]===l?(p=t[10],m=t[11]):(p=()=>{if(!(typeof window>`u`))return window.addEventListener(`resize`,l),document.addEventListener(`scroll`,l,{capture:!0}),()=>{window.removeEventListener(`resize`,l),document.removeEventListener(`scroll`,l,{capture:!0})}},m=[l],t[9]=l,t[10]=p,t[11]=m),K.useEffect(p,m),!a||typeof document>`u`)return null;let h;t[12]!==a.left||t[13]!==a.top?(h={left:a.left,top:a.top},t[12]=a.left,t[13]=a.top,t[14]=h):h=t[14];let g;return t[15]!==i||t[16]!==h?(g=(0,q.jsx)(hp,{children:(0,q.jsx)(`div`,{ref:s,className:`fixed z-50`,style:h,children:i})}),t[15]=i,t[16]=h,t[17]=g):g=t[17],g},vp=class{tagName=`marimo-nav-menu`;menuItemValidator=H({label:B(),href:B(),description:B().nullish()});menuItemGroupValidator=H({label:B(),items:U(this.menuItemValidator)});validator=H({items:U(We([this.menuItemValidator,this.menuItemGroupValidator])),orientation:Ze([`horizontal`,`vertical`])});render(e){return(0,q.jsx)(yp,{...e.data})}},yp=e=>{let t=(0,J.c)(13),{items:n,orientation:r}=e,i=xp,a=Sp,o=Cp,s;t[0]===r?s=t[1]:(s=e=>`items`in e?r===`horizontal`?(0,q.jsx)(mp,{item:e,preserveQueryParams:o,target:a},e.label):(0,q.jsxs)(sp,{children:[(0,q.jsx)(`div`,{className:`inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-base font-medium text-muted-foreground/80 tracking-wide font-semibold`,children:Zo({html:e.label})}),(0,q.jsx)(op,{className:`ml-4 auto-collapse-nav`,orientation:r,children:e.items.map(e=>(0,q.jsx)(K.Fragment,{children:i((0,q.jsx)(dp,{href:o(e.href),target:a(e.href),className:cp({orientation:r}),children:Zo({html:e.label})},e.label),e.description)},e.label))})]},e.label):(0,q.jsx)(sp,{children:(0,q.jsx)(dp,{href:o(e.href),target:a(e.href),className:cp({orientation:r}),children:Zo({html:e.label})})},e.label),t[0]=r,t[1]=s);let c=s,l;if(t[2]!==n||t[3]!==c){let e;t[5]===c?e=t[6]:(e=e=>c(e),t[5]=c,t[6]=e),l=n.map(e),t[2]=n,t[3]=c,t[4]=l}else l=t[4];let u;t[7]!==r||t[8]!==l?(u=(0,q.jsx)(op,{className:`auto-collapse-nav`,orientation:r,children:l}),t[7]=r,t[8]=l,t[9]=u):u=t[9];let d;return t[10]!==r||t[11]!==u?(d=(0,q.jsx)(ip,{orientation:r,children:u}),t[10]=r,t[11]=u,t[12]=d):d=t[12],d},bp=K.forwardRef((e,t)=>{let n=(0,J.c)(19),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:i,label:a,children:r,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]===i?s=n[6]:(s=G(`block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground`,i),n[5]=i,n[6]=s);let c;n[7]===a?c=n[8]:(c=Zo({html:a}),n[7]=a,n[8]=c);let l;n[9]===c?l=n[10]:(l=(0,q.jsx)(`div`,{className:`text-base font-medium leading-none`,children:c}),n[9]=c,n[10]=l);let u;n[11]===r?u=n[12]:(u=r&&(0,q.jsx)(`p`,{className:`line-clamp-2 text-sm leading-snug text-muted-foreground`,children:r}),n[11]=r,n[12]=u);let d;return n[13]!==o||n[14]!==t||n[15]!==s||n[16]!==l||n[17]!==u?(d=(0,q.jsx)(`li`,{children:(0,q.jsx)(dp,{asChild:!0,children:(0,q.jsxs)(`a`,{ref:t,className:s,...o,children:[l,u]})})}),n[13]=o,n[14]=t,n[15]=s,n[16]=l,n[17]=u,n[18]=d):d=n[18],d});bp.displayName=`ListItem`;function xp(e,t){return t?(0,q.jsx)(Hi,{delayDuration:200,content:Zo({html:t}),children:e}):e}function Sp(e){return e.startsWith(`http`)?`_blank`:`_self`}function Cp(e){let t=new URL(globalThis.location.href);return Jt({href:e,queryParams:t.search,keys:[Bt.filePath]})}function wp(e,t){return e===t?!0:e==null||t==null?!1:Array.isArray(e)&&Array.isArray(t)?Oo(e,t):typeof e==`object`&&typeof t==`object`&&Tp(e,t)}function Tp(e,t){return Object.keys(e).length===Object.keys(t).length&&Rt.keys(e).every(n=>e[n]===t[n])}function Ep(e,t){if(!window?.customElements){W.warn(`Custom elements not supported`);return}if(window.customElements.get(e)){W.warn(`Custom element ${e} already defined`);return}window.customElements.define(e,t)}function Dp(e,t){if(!t)return[];let n=e;if(oi(t))return[{column_id:n,operator:t.operator,type:`condition`,negate:!1}];switch(t.type){case`number`:switch(t.operator){case`between`:return[{column_id:n,operator:`between`,value:{min:t.min,max:t.max},type:`condition`,negate:!1}];case`==`:case`!=`:case`>`:case`>=`:case`<`:case`<=`:return[{column_id:n,operator:t.operator,value:t.value,type:`condition`,negate:!1}];case`in`:case`not_in`:return[{column_id:n,operator:t.operator,value:t.values,type:`condition`,negate:!1}];default:Fo(t)}case`text`:switch(t.operator){case`contains`:case`equals`:case`does_not_equal`:case`regex`:case`starts_with`:case`ends_with`:return[{column_id:n,operator:t.operator,value:t.text,type:`condition`,negate:!1}];case`in`:case`not_in`:return[{column_id:n,operator:t.operator,value:t.values,type:`condition`,negate:!1}];case`is_empty`:return[{column_id:n,operator:`is_empty`,type:`condition`,negate:!1}];default:Fo(t)}case`date`:case`datetime`:case`time`:{let e=t.type===`date`?Xo:t.type===`time`?Yo:Jo;switch(t.operator){case`between`:return[{column_id:n,operator:`between`,value:{min:e(t.min),max:e(t.max)},type:`condition`,negate:!1}];case`==`:case`!=`:case`>`:case`>=`:case`<`:case`<=`:return[{column_id:n,operator:t.operator,value:e(t.value),type:`condition`,negate:!1}];default:Fo(t)}}case`boolean`:return[{column_id:n,operator:t.operator,type:`condition`,negate:!1}];default:Fo(t)}}function Op(e){return{type:`group`,operator:`and`,children:e.flatMap(e=>Dp(e.id,e.value)),negate:!1}}var kp=0,Ap=1,jp=2,Mp=4;function Np(e){return()=>e}function Pp(e){e()}function Fp(e,t){return n=>e(t(n))}function Ip(e,t){return()=>e(t)}function Lp(e,t){return n=>e(t,n)}function Rp(e){return e!==void 0}function zp(...e){return()=>{e.map(Pp)}}function Bp(){}function Vp(e,t){return t(e),e}function Hp(e,t){return t(e)}function Up(...e){return e}function Wp(e,t){return e(Ap,t)}function Gp(e,t){e(kp,t)}function Kp(e){e(jp)}function qp(e){return e(Mp)}function Y(e,t){return Wp(e,Lp(t,kp))}function Jp(e,t){let n=e(Ap,e=>{n(),t(e)});return n}function Yp(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Xp(e,t){return e===t}function Zp(e=Xp){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function X(e){return t=>n=>{e(n)&&t(n)}}function Z(e){return t=>Fp(t,e)}function Qp(e){return t=>()=>{t(e)}}function Q(e,...t){let n=rm(...t);return((t,r)=>{switch(t){case jp:Kp(e);return;case Ap:return Wp(e,n(r))}})}function $p(e,t){return n=>r=>{n(t=e(t,r))}}function em(e){return t=>n=>{e>0?e--:t(n)}}function tm(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function nm(...e){let t=Array.from({length:e.length}),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;Wp(e,e=>{let s=n;n|=o,t[a]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{let o=()=>{e([a].concat(t))};n===i?o():r=o}}function rm(...e){return t=>e.reduceRight(Hp,t)}function im(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case Ap:return a?n===a?void 0:(r(),n=a,t=Wp(e,a),t):(r(),Bp);case jp:r(),n=null;return}}}function $(e){let t=e,n=om();return((e,r)=>{switch(e){case kp:t=r;break;case Ap:r(t);break;case Mp:return t}return n(e,r)})}function am(e,t){return Vp($(t),t=>Y(e,t))}function om(){let e=[];return((t,n)=>{switch(t){case kp:e.slice().forEach(e=>{e(n)});return;case jp:e.splice(0);return;case Ap:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function sm(e){return Vp(om(),t=>Y(e,t))}var cm={singleton:!0};function lm(e,t=[],n=cm){let{singleton:r}=n;return{constructor:e,dependencies:t,id:um(),singleton:r}}var um=()=>Symbol(`id`);function dm(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);let o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}function fm(...e){let t=om(),n=Array.from({length:e.length}),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;Wp(e,e=>{n[a]=e,r|=o,r===i&&Gp(t,n)})}),function(e,a){switch(e){case jp:Kp(t);return;case Ap:return r===i&&a(n),Wp(t,a)}}}function pm(e,t=Xp){return Q(e,Zp(t))}function mm(...e){return function(t,n){switch(t){case jp:return;case Ap:return zp(...e.map(e=>Wp(e,n)))}}}var hm={DEBUG:0,INFO:1,WARN:2,ERROR:3},gm={[hm.DEBUG]:`debug`,[hm.ERROR]:`error`,[hm.INFO]:`log`,[hm.WARN]:`warn`},_m=()=>typeof globalThis>`u`?window:globalThis,vm=lm(()=>{let e=$(hm.ERROR);return{log:$((t,n,r=hm.INFO)=>{r>=(_m().VIRTUOSO_LOG_LEVEL??qp(e))&&console[gm[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0});function ym(e){return`self`in e?e.document.documentElement:e}function bm(e){let t=ym(e);return t.ownerDocument.defaultView.getComputedStyle(t).direction===`rtl`}function xm(e,t){return bm(e)?-t:t}function Sm(e,t){return bm(e)?-t:t}function Cm(e,t,n){return wm(e,t,n).callbackRef}function wm(e,t,n){let r=K.useRef(null),i=e=>{},a=K.useMemo(()=>typeof ResizeObserver<`u`?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;n.offsetParent!==null&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return i=e=>{e&&t?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:i,ref:r}}function Tm(e,t,n,r,i,a,o,s,c){return wm(K.useCallback(n=>{let c=Em(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;l.dataset.virtuosoScroller===void 0;)l=l.parentElement;let u=l.lastElementChild?.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,p=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight,m=o?s?xm(o,o.scrollLeft):o.scrollTop:u?s?xm(d,d.scrollX||d.document.documentElement.scrollLeft):d.scrollY||d.document.documentElement.scrollTop:s?xm(l,l.scrollLeft):l.scrollTop;r({scrollHeight:f,scrollTop:Math.max(m,0),viewportHeight:p}),a?.(s?Dm(`column-gap`,getComputedStyle(n).columnGap,i):Dm(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function Em(e,t,n,r){let i=e.length;if(i===0)return null;let a=[];for(let o=0;o<i;o++){let i=e.item(o);if(i.dataset.index===void 0)continue;let s=parseInt(i.dataset.index,10),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},hm.ERROR),l===c)continue;let u=a[a.length-1];a.length===0||u.size!==l||u.endIndex!==s-1?a.push({endIndex:s,size:l,startIndex:s}):a[a.length-1].endIndex++}return a}function Dm(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,hm.WARN),t===`normal`?0:parseInt(t??`0`,10)}function Om(e,t,n){let r=K.useRef(null),i=K.useCallback(n=>{if(!n?.offsetParent)return;let i=n.getBoundingClientRect(),a=i.width,s,c;if(t){let e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),s=n+t.scrollTop}else{let e=o.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),s=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=wm(i,!0,n),s=K.useCallback(()=>{i(o.current)},[i,o]);return K.useEffect(()=>{if(t){t.addEventListener(`scroll`,s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener(`scroll`,s),e.unobserve(t)}}let e=o.current?.ownerDocument.defaultView;return e?.addEventListener(`scroll`,s),e?.addEventListener(`resize`,s),()=>{e?.removeEventListener(`scroll`,s),e?.removeEventListener(`resize`,s)}},[s,t,o]),a}var km=lm(()=>{let e=om(),t=om(),n=$(0),r=om(),i=$(0),a=om(),o=om(),s=$(0),c=$(0),l=$(0),u=$(0),d=om(),f=om(),p=$(!1),m=$(!1),h=$(!1);return Y(Q(e,Z(({scrollTop:e})=>e)),t),Y(Q(e,Z(({scrollHeight:e})=>e)),o),Y(t,i),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),Am={lvl:0};function jm(e,t){let n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]),a=[];for(let o=1;o<n;o++){let{index:n,value:s}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=s}return a.push({end:1/0,start:r,value:i}),a}function Mm(e){return e===Am}function Nm(e,t){if(!Mm(e))return t===e.k?e.v:t<e.k?Nm(e.l,t):Nm(e.r,t)}function Pm(e,t,n=`k`){if(Mm(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=Pm(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Pm(e.l,t,n)}function Fm(e,t,n){return Mm(e)?Km(t,n,1):t===e.k?Hm(e,{k:t,v:n}):t<e.k?qm(Hm(e,{l:Fm(e.l,t,n)})):qm(Hm(e,{r:Fm(e.r,t,n)}))}function Im(){return Am}function Lm(e,t,n){if(Mm(e))return[];let r=Pm(e,t)[0];return Xm(Bm(e,r,n))}function Rm(e,t){if(Mm(e))return Am;let{k:n,l:r,r:i}=e;if(t===n){if(Mm(r))return i;if(Mm(i))return r;let[t,n]=Gm(r);return Vm(Hm(e,{k:t,l:Um(r),v:n}))}return Vm(t<n?Hm(e,{l:Rm(r,t)}):Hm(e,{r:Rm(i,t)}))}function zm(e){return Mm(e)?[]:[...zm(e.l),{k:e.k,v:e.v},...zm(e.r)]}function Bm(e,t,n){if(Mm(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(Bm(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(Bm(a,t,n))),s}function Vm(e){let{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Wm(t))return Jm(Hm(e,{lvl:n-1}));if(!Mm(t)&&!Mm(t.r))return Hm(t.r,{l:Hm(t,{r:t.r.l}),lvl:n,r:Hm(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(Wm(e))return Ym(Hm(e,{lvl:n-1}));if(!Mm(r)&&!Mm(r.l)){let t=r.l,i=Wm(t)?r.lvl-1:r.lvl;return Hm(t,{l:Hm(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:Ym(Hm(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function Hm(e,t){return Km(t.k===void 0?e.k:t.k,t.v===void 0?e.v:t.v,t.lvl===void 0?e.lvl:t.lvl,t.l===void 0?e.l:t.l,t.r===void 0?e.r:t.r)}function Um(e){return Mm(e.r)?e.l:Vm(Hm(e,{r:Um(e.r)}))}function Wm(e){return Mm(e)||e.lvl>e.r.lvl}function Gm(e){return Mm(e.r)?[e.k,e.v]:Gm(e.r)}function Km(e,t,n,r=Am,i=Am){return{k:e,l:r,lvl:n,r:i,v:t}}function qm(e){return Ym(Jm(e))}function Jm(e){let{l:t}=e;return!Mm(t)&&t.lvl===e.lvl?Hm(t,{r:Hm(e,{l:t.r})}):e}function Ym(e){let{lvl:t,r:n}=e;return!Mm(n)&&!Mm(n.r)&&n.lvl===t&&n.r.lvl===t?Hm(n,{l:Hm(e,{r:n.l}),lvl:t+1}):e}function Xm(e){return jm(e,({k:e,v:t})=>({index:e,value:t}))}function Zm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Qm(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var $m=lm(()=>({recalcInProgress:$(!1)}),[],{singleton:!0});function eh(e,t,n){return e[th(e,t,n)]}function th(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw Error(`Failed binary finding record in array - ${e.join(`,`)}, searched for ${t}`)}function nh(e,t,n,r){let i=th(e,t,r),a=th(e,n,r,i);return e.slice(i,a+1)}function rh(e,t){return Math.round(e.getBoundingClientRect()[t])}function ih(e){return!Mm(e.groupOffsetTree)}function ah({index:e},t){return t===e?0:t<e?-1:1}function oh(){return{groupIndices:[],groupOffsetTree:Im(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Im()}}function sh(e,t){let n=Mm(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),Mm(e)){e=Fm(e,0,i);continue}let o=Lm(e,a-1,t+1);if(o.some(yh(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=Rm(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=Fm(e,t+1,a));c&&(e=Fm(e,a,i))}return[e,n]}function ch(e){return e.groupIndex!==void 0}function lh({offset:e},t){return t===e?0:t<e?-1:1}function uh(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=eh(t,e,ah),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function dh(e,t){if(!ih(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function fh(e,t,n){if(ch(e))return t.groupIndices[e.groupIndex]+1;let r=dh(e.index===`LAST`?n:e.index,t);return r=Math.max(0,Math.min(n,r)),r}function ph(e,t,n,r=0){return r>0&&(t=Math.max(t,eh(e,r,ah).offset)),jm(nh(e,t,n,lh),vh)}function mh(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,hm.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&Mm(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>Fm(Fm(t,n,e),n+1,r),o)}else[o,s]=sh(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=_h(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Fm(e,t,uh(t,d,i)),Im()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function hh(e){return zm(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i===void 0?1/0:i.k-1,size:t,startIndex:e}})}function gh(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function _h(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t===0)i=[];else{c=th(i,t-1,ah),s=i[c].offset;let e=Pm(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===Pm(n,t)[1]&&--c,i=i.slice(0,c+1)}for(let{start:e,value:c}of Lm(n,t,1/0)){let t=e-a,n=t*o+s+t*r;i.push({index:e,offset:n,size:c}),a=e,s=n,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function vh(e){return{index:e.index,value:e}}function yh(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}var bh={offsetHeight:`height`,offsetWidth:`width`},xh=lm(([{log:e},{recalcInProgress:t}])=>{let n=om(),r=om(),i=am(r,0),a=om(),o=om(),s=$(0),c=$([]),l=$(void 0),u=$(void 0),d=$(void 0),f=$(void 0),p=$((e,t)=>rh(e,bh[t])),m=$(void 0),h=$(0),g=oh(),_=am(Q(n,nm(c,e,h),$p(mh,g),Zp()),g),v=am(Q(c,Zp(),$p((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Z(({prev:e})=>e)),[]);Y(Q(c,X(e=>e.length>0),nm(_,h),Z(([e,t,n])=>{let r=e.reduce((e,r,i)=>Fm(e,r,uh(r,t.offsetTree,n)||i),Im());return{...t,groupIndices:e,groupOffsetTree:r}})),_),Y(Q(r,nm(_),X(([e,{lastIndex:t}])=>e<t),Z(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),Y(l,u);let y=am(Q(l,Z(e=>e===void 0)),!0);Y(Q(u,X(e=>e!==void 0&&Mm(qp(_).sizeTree)),Z(e=>{let t=qp(d),n=qp(c).length>0;return t!==void 0&&t!==0?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),Y(Q(f,X(e=>e!==void 0&&e.length>0&&Mm(qp(_).sizeTree)),Z(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),Y(Q(c,nm(d,u),X(([,e,t])=>e!==void 0&&t!==void 0),Z(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),o!==void 0&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);let b=sm(Q(n,nm(_),$p(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),Z(e=>e.changed)));Wp(Q(s,$p((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Z(e=>e.diff)),e=>{let{groupIndices:n}=qp(_);if(e>0)Gp(t,!0),Gp(a,e+gh(e,n));else if(e<0){let t=qp(v);t.length>0&&(e-=gh(-e,t)),Gp(o,e)}}),Wp(Q(s,nm(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},hm.ERROR)});let x=sm(a);Y(Q(a,nm(_),Z(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=Nm(t.sizeTree,0),a=0,o=0;for(;a<e;){let e=t.groupIndices[o],s=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),o++,a+=s+1}let s=zm(t.sizeTree);return a!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return t.prevSize!==0&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return zm(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=sm(Q(o,nm(_,h),Z(([e,{offsetTree:t},n])=>uh(-e,t,n))));return Y(Q(o,nm(_,h),Z(([e,t,n])=>{if(t.groupIndices.length>0){if(Mm(t.sizeTree))return t;let r=Im(),i=qp(v),a=0,o=0,s=0;for(;a<-e;){s=i[o];let e=i[o+1]-s-1;o++,a+=e+1}if(r=zm(t.sizeTree).reduce((t,{k:n,v:r})=>Fm(t,Math.max(0,n+e),r),r),a!==-e){let n=Nm(t.sizeTree,s);r=Fm(r,0,n);let i=Pm(t.sizeTree,-e+1)[1];r=Fm(r,1,i)}return{...t,sizeTree:r,..._h(t.offsetTree,0,r,n)}}let r=zm(t.sizeTree).reduce((t,{k:n,v:r})=>Fm(t,Math.max(0,n+e),r),Im());return{...t,sizeTree:r,..._h(t.offsetTree,0,r,n)}})),_),{beforeUnshiftWith:x,data:m,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,fixedGroupSize:d,gap:h,groupIndices:c,heightEstimates:f,itemSize:p,listRefresh:b,shiftWith:o,shiftWithOffset:S,sizeRanges:n,sizes:_,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:a}},Up(vm,$m),{singleton:!0});function Sh(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var Ch=lm(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=om(),o=om(),s=sm(Q(a,Z(Sh)));return Y(Q(s,Z(e=>e.totalCount)),n),Y(Q(s,Z(e=>e.groupIndices)),e),Y(Q(fm(i,t,r),X(([e,t])=>ih(t)),Z(([e,t,n])=>Pm(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),Zp(),Z(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},Up(xh,km)),wh=lm(([{log:e}])=>{let t=$(!1),n=sm(Q(t,X(e=>e),Zp()));return Wp(t,t=>{t&&qp(e)(`props updated`,{},hm.DEBUG)}),{didMount:n,propsReady:t}},Up(vm),{singleton:!0}),Th=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function Eh(e){let t=typeof e==`number`?{index:e}:{...e};return t.align||=`start`,(!t.behavior||!Th)&&(t.behavior=`auto`),t.offset===void 0&&(t.offset=0),t}var Dh=lm(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{let p=om(),m=om(),h=$(0),g=null,_=null,v=null;function y(){g!==null&&(g(),g=null),v!==null&&(v(),v=null),_&&=(clearTimeout(_),null),Gp(c,!1)}return Y(Q(p,nm(n,d,r,h,s,o,f),nm(e,a,i),Z(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=Eh(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=fh(b,n,w),E=uh(T,n.offsetTree,d)+o;x===`end`?(E+=f+Pm(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+Pm(n.sizeTree,T)[1]-r+h)/2:E-=a,C!==void 0&&C!==0&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},hm.DEBUG),Gp(p,e)):(Gp(m,!0),l(`list did not change, scroll successful`,{},hm.DEBUG))};if(y(),S===`smooth`){let e=!1;v=Wp(t,t=>{e||=t}),g=Jp(u,()=>{D(e)})}else g=Jp(Q(t,Oh(150)),D);return _=setTimeout(()=>{y()},1200),Gp(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},hm.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},Up(xh,km,vm),{singleton:!0});function Oh(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function kh(e,t){e===0?t():requestAnimationFrame(()=>{kh(e-1,t)})}function Ah(e,t){if(e===void 0)return 0;let n=t-1,r=typeof e==`number`?e:e.index===`LAST`?n:e.index;return Math.max(0,Math.min(r,n))}function jh(e){return e===void 0?!0:typeof e==`number`?e===0:e.index===0&&(e.align===void 0||e.align===`start`)&&(e.offset===void 0||e.offset===0)}var Mh=lm(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=$(!0),c=$(0),l=$(!0);return Y(Q(o,nm(c),X(([e,t])=>!jh(t)),Qp(!1)),s),Y(Q(o,nm(c),X(([e,t])=>!jh(t)),Qp(!1)),l),Wp(Q(fm(t,o),nm(s,n,e,l),X(([[,e],t,{sizeTree:n},r,i])=>e&&(!Mm(n)||Rp(r))&&!t&&!i),nm(c)),([,e])=>{if(e===void 0){Gp(s,!0),Gp(l,!0);return}Jp(i,()=>{Gp(l,!0)}),kh(4,()=>{Jp(r,()=>{Gp(s,!0)}),Gp(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},Up(xh,km,Dh,wh),{singleton:!0});function Nh(e,t){return Math.abs(e-t)<1.01}var Ph=`up`,Fh=`down`,Ih=`none`,Lh={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Rh=0,zh=lm(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=$(!1),s=$(!0),c=om(),l=om(),u=$(4),d=$(Rh),f=am(Q(mm(Q(pm(i),em(1),Qp(!0)),Q(pm(i),em(1),Qp(!1),Yp(100))),Zp()),!1),p=am(Q(mm(Q(n,Qp(!0)),Q(n,Qp(!1),Yp(200))),Zp()),!1);Y(Q(fm(pm(i),pm(d)),Z(([e,t])=>e<=t),Zp()),s),Y(Q(s,tm(50)),l);let m=sm(Q(fm(r,pm(a),pm(t),pm(e),pm(u)),$p((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{let s=n+r-t>-o,c={scrollHeight:t,scrollTop:n,viewportHeight:r};if(s){let t,r;return n>e.state.scrollTop?(t=`SCROLLED_DOWN`,r=e.state.scrollTop-n):(t=`SIZE_DECREASED`,r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:c}}let l;return l=c.scrollHeight>e.state.scrollHeight?`SIZE_INCREASED`:r<e.state.viewportHeight?`VIEWPORT_HEIGHT_DECREASING`:n<e.state.scrollTop?`SCROLLING_UPWARDS`:`NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM`,{atBottom:!1,notAtBottomBecause:l,state:c}},Lh),Zp((e,t)=>e!==void 0&&e.atBottom===t.atBottom))),h=am(Q(r,$p((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!Nh(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),X(e=>e.changed),Z(e=>e.jump)),0);Y(Q(m,Z(e=>e.atBottom)),o),Y(Q(o,tm(50)),c);let g=$(Fh);Y(Q(r,Z(({scrollTop:e})=>e),Zp(),$p((e,t)=>qp(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Ph:Fh,prevScrollTop:t},{direction:Fh,prevScrollTop:0}),Z(e=>e.direction)),g),Y(Q(r,tm(50),Qp(Ih)),g);let _=$(0);return Y(Q(f,X(e=>!e),Qp(0)),_),Y(Q(i,tm(100),nm(f),X(([e,t])=>t),$p(([e,t],[n])=>[t,n],[0,0]),Z(([e,t])=>t-e)),_),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:g,scrollVelocity:_}},Up(km)),Bh=`top`,Vh=`bottom`,Hh=`none`;function Uh(e,t,n){return typeof e==`number`?n===Ph&&t===Bh||n===Fh&&t===Vh?e:0:n===Ph?t===Bh?e.main:e.reverse:t===Vh?e.main:e.reverse}function Wh(e,t){return typeof e==`number`?e:e[t]??0}var Gh=lm(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=om(),o=$(0),s=$(0),c=$(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:am(Q(fm(pm(r),pm(i),pm(n),pm(a,Qm),pm(c),pm(o),pm(t),pm(e),pm(s)),Z(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=Hh,m=Wh(l,Bh),h=Wh(l,Vh);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=Ph),i<e-f+t+h&&(p=Fh),p===Hh?null:[Math.max(u-n-Uh(a,Bh,p)-m,0),u-f-s+t+Uh(a,Vh,p)+h]}),X(e=>e!==null),Zp(Qm)),[0,0])}},Up(km),{singleton:!0});function Kh(e,t,n){if(ih(t)){let r=dh(e,t);return[{index:Pm(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}var qh={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Jh(e,t,n,r,i,a){let{lastIndex:o,lastOffset:s,lastSize:c}=i,l=0,u=0;if(e.length>0){l=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let d=n-o,f=s+d*c+(d-1)*r,p=l,m=f-u;return{bottom:u,firstItemIndex:a,items:Xh(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:Xh(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function Yh(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-o>=e)break;o++}let s=e+o,c=Ah(t,s);return Jh(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function Xh(e,t,n){if(e.length===0)return[];if(!ih(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,a=[],o=Lm(t.groupOffsetTree,r,i),s,c=0;for(let r of e){(!s||s.end<r.index)&&(s=o.shift(),c=t.groupIndices.indexOf(s.start));let e;e=r.index===s.start?{index:c,type:`group`}:{groupIndex:c,index:r.index-(c+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function Zh(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var Qh=lm(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:m}])=>{let h=$([]),g=$(0),_=om(),v=$(0);Y(a.topItemsIndexes,h);let y=am(Q(fm(p,m,pm(c,Qm),pm(i),pm(r),pm(l),u,pm(h),pm(t),pm(n),pm(v),e),X(([e,t,,n,,,,,,,,r])=>{let i=r!==void 0&&r.length!==n;return e&&!t&&!i}),Z(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=qp(g);if(n===0)return{...qh,totalCount:n};if(e===0&&t===0)return m===0?{...qh,totalCount:n}:Yh(m,i,r,s,c,u||[]);if(Mm(p))return m>0?null:Jh(Kh(Ah(i,n),d,u),[],n,c,d,s);let h=[];if(o.length>0){let e=o[0],t=o[o.length-1],n=0;for(let r of Lm(p,e,t)){let i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)h.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return Jh([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=ph(f,e,t,_);if(v.length===0)return null;let y=n-1,b=Vp([],n=>{for(let r of v){let i=r.value,a=i.offset,o=r.start,s=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+c)/(s+c));let t=o-r.start;a+=t*s+t*c}o<_&&(a+=(_-o)*s,o=_);let l=Math.min(r.end,y);for(let e=o;e<=l&&!(a>=t);e++)n.push({data:u?.[e],index:e,offset:a,size:s}),a+=s+c}}),x=Zh(l,Bh),S=Zh(l,Vh);if(b.length>0&&(x>0||S>0)){let e=b[0],t=b[b.length-1];if(x>0&&e.index>_){let t=Math.min(x,e.index-_),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=Lm(p,i,i)[0]?.value??e.size;r-=t+c,n.unshift({data:u?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<y){let e=Math.min(S,y-t.index),n=t.offset+t.size+c;for(let r=t.index+1;r<=t.index+e;r++){let e=Lm(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return Jh(b,h,n,c,d,s)}),X(e=>e!==null),Zp()),qh);Y(Q(e,X(Rp),Z(e=>e?.length)),i),Y(Q(y,Z(e=>e.topListHeight)),d),Y(d,s),Y(Q(y,Z(e=>[e.top,e.bottom])),o),Y(Q(y,Z(e=>e.items)),_);let b=sm(Q(y,X(({items:e})=>e.length>0),nm(i,e),X(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Z(([,e,t])=>[e-1,t]),Zp(Qm),Z(([e])=>e))),x=sm(Q(y,tm(200),X(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Z(({items:e})=>e[0].index),Zp()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:sm(Q(y,X(({items:e})=>e.length>0),Z(({items:e})=>{let t=0,n=e.length-1;for(;e[t].type===`group`&&t<n;)t++;for(;e[n].type===`group`&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),Zp(Zm))),startReached:x,topItemsIndexes:h,...f}},Up(xh,Ch,Gh,Mh,Dh,zh,wh,$m),{singleton:!0}),$h=lm(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=om(),o=am(Q(fm(n,e,r,t,i),Z(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return Y(pm(o),a),{totalListHeight:o,totalListHeightChanged:a}},Up(km,Qh),{singleton:!0}),eg=lm(([{viewportHeight:e},{totalListHeight:t}])=>{let n=$(!1);return{alignToBottom:n,paddingTopAddition:am(Q(fm(n,e,t),X(([e])=>e),Z(([,e,t])=>Math.max(0,e-t)),tm(0),Zp()),0)}},Up(km,$h),{singleton:!0}),tg=lm(()=>({context:$(null)})),ng=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,...r===void 0?{}:{behavior:r}}:e>a?{...i,align:n??`end`,...r===void 0?{}:{behavior:r}}:null,rg=lm(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=om();return Y(Q(u,nm(t,c,n,a,i,r,s),nm(e),Z(([[e,t,n,r,i,a,s,c],l])=>{let{calculateViewLocation:u=ng,done:d,...f}=e,p=fh(e,t,r-1),m=uh(p,t.offsetTree,l)+i+a,h=m+Pm(t.sizeTree,p)[1],g=c+a,_=u({itemBottom:h,itemTop:m,locationParams:f,viewportBottom:c+n-s,viewportTop:g});return _===null?d?.():d&&Jp(Q(o,X(e=>!e),em(qp(o)?1:2)),d),_}),X(e=>e!==null)),l),{scrollIntoView:u}},Up(xh,km,Dh,Qh,vm),{singleton:!0});function ig(e){return e===!1?!1:e===`smooth`?`smooth`:`auto`}var ag=(e,t)=>typeof e==`function`?ig(e(t)):t&&ig(e),og=lm(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{let m=$(!1),h=om(),g=null;function _(e){Gp(o,{align:`end`,behavior:e,index:`LAST`})}Wp(Q(fm(Q(pm(t),em(1)),c),nm(pm(m),a,s,d),Z(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=ag(n,r||a),o&&=s!==!1),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),X(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g!==null&&(g(),g=null),qp(n)===void 0?g=Jp(e,()=>{qp(u)(`following output to `,{totalCount:r},hm.DEBUG),_(t),g=null}):requestAnimationFrame(()=>{qp(u)(`following output to `,{totalCount:r},hm.DEBUG),_(t)})});function v(e){let t=Jp(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&g===null&&(qp(u)(`scrolling to bottom due to increased size`,{},hm.DEBUG),_(`auto`))});setTimeout(t,100)}Wp(Q(fm(pm(m),t,l),X(([e,,t])=>e!==!1&&t),$p(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),X(({refreshed:e})=>e),nm(m,t)),([,e])=>{qp(s)&&v(e!==!1)}),Wp(h,()=>{v(qp(m)!==!1)}),Wp(fm(pm(m),i),([e,t])=>{e!==!1&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=$(null),b=om();return Y(mm(Q(pm(r),Z(e=>e?.length??0)),Q(pm(t))),b),Wp(Q(fm(Q(b,em(1)),c),nm(pm(y),s,d,f),Z(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),X(e=>!!e),tm(0)),t=>{g!==null&&(g(),g=null),qp(n)===void 0?g=Jp(e,()=>{qp(u)(`scrolling into view`,{}),Gp(p,t),g=null}):requestAnimationFrame(()=>{qp(u)(`scrolling into view`,{}),Gp(p,t)})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},Up(xh,zh,Dh,Mh,wh,vm,km,tg,rg)),sg=lm(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(Y(Q(s,nm(a),X(([,e])=>e!==0),nm(i,r,t,n,e),Z(([[,e],t,n,r,i,a=[]])=>Yh(e,t,n,r,i,a))),o),{}),Up(xh,Mh,Qh,wh),{singleton:!0}),cg=lm(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=$(0);return Wp(Q(e,nm(r),X(([,e])=>e!==0),Z(([,e])=>({top:e}))),e=>{Jp(Q(n,em(1),X(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{Gp(t,e)})})}),{initialScrollTop:r}},Up(wh,km,Qh),{singleton:!0}),lg=lm(([{scrollVelocity:e}])=>{let t=$(!1),n=om(),r=$(!1);return Y(Q(e,nm(r,t,n),X(([e,t])=>t!==!1&&t!==void 0),Z(([e,t,n,r])=>{let{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),Zp()),t),Wp(Q(fm(t,e,n),nm(r)),([[e,t,n],r])=>{e&&r!==!1&&r!==void 0&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Up(zh),{singleton:!0}),ug=lm(([{scrollContainerState:e,scrollTo:t}])=>{let n=om(),r=om(),i=om(),a=$(!1),o=$(void 0);return Y(Q(fm(n,r),Z(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),Y(Q(t,nm(r),Z(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Up(km)),dg=lm(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=om(),u=$(void 0),d=$(null),f=$(null);return Y(s,d),Y(c,f),Wp(Q(l,nm(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=hh(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),Y(Q(u,X(Rp),Z(fg)),i),Y(Q(a,nm(u),X(([,e])=>e!==void 0),Zp(),Z(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},Up(xh,km,Mh,wh,ug));function fg(e){return{align:`start`,index:0,offset:e.scrollTop}}var pg=lm(([{topItemsIndexes:e}])=>{let t=$(0);return Y(Q(t,X(e=>e>=0),Z(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Up(Qh));function mg(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var hg=mg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),gg=lm(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g},_,v,y,b,{scrollToIndex:x},S,{topItemCount:C},{groupCounts:w},T])=>{let{listState:E,minOverscanItemCount:D,topItemsIndexes:O,rangeChanged:k,...A}=b;return Y(k,T.scrollSeekRangeChanged),Y(Q(fm(T.windowViewportRect,_.headerHeight,_.fixedHeaderHeight),Z(([e,t,n])=>Math.max(t+n+1,e.visibleHeight))),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:w,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:O,totalCount:f,...y,groupIndices:o,itemSize:c,listState:E,minOverscanItemCount:D,scrollToIndex:x,statefulTotalCount:d,trackItemSizes:p,rangeChanged:k,...A,...T,..._,sizes:u,...v}},Up(xh,Mh,km,dg,og,Qh,Dh,lm(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:m}])=>{let h=sm(Q(c,nm(o),$p(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},s])=>{let c=r+a,l=0;return t===o&&e.length>0&&i.length>0&&(i[0].originalIndex===0&&e[0].originalIndex===0||(l=c-n,l!==0&&(l+=s))),[l,i,o,c]},[0,[],0,0]),X(([e])=>e!==0),nm(r,s,n,i,p,m),X(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===Ph),Z(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},hm.DEBUG),e))));function g(n){n>0?(Gp(t,{behavior:`auto`,top:-n}),Gp(e,0)):(Gp(e,0),Gp(t,{behavior:`auto`,top:-n}))}return Wp(Q(h,nm(e,a)),([t,n,r])=>{r&&hg()?Gp(e,n-t):g(-t)}),Wp(Q(fm(am(a,!1),e,m),X(([e,t,n])=>!e&&!n&&t!==0),Z(([e,t])=>t),tm(1)),g),Y(Q(d,Z(e=>({top:-e}))),t),Wp(Q(l,nm(f,u),Z(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);let o=0,s=Nm(r,0),c=0,l=0;for(;c<e;){c++,o+=s;let n=t.length===l+1?1/0:t[l+1]-t[l]-1;c+n>e&&(o-=s,n=e-c+1),c+=n,o+=a(n),l++}return o})),n=>{Gp(e,n),requestAnimationFrame(()=>{Gp(t,{top:n}),requestAnimationFrame(()=>{Gp(e,0),Gp(m,!1)})})}),{deviation:e}},Up(km,zh,Qh,xh,vm,$m)),pg,Ch,lm(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),Up(Gh,sg,wh,lg,$h,cg,eg,ug,rg,vm,tg))));function _g(e,t){let n={},r={},i=0,a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}var vg=typeof document>`u`?K.useEffect:K.useLayoutEffect;function yg(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=K.createContext({});function c(e,n){e.propsReady!==void 0&&Gp(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];Gp(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];Gp(i,n[r])}e.propsReady!==void 0&&Gp(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];Gp(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=im(e[t.events[r]]),n),{})}return{Component:K.forwardRef(function(t,a){let{children:d,...f}=t,[p]=K.useState(()=>Vp(dm(e),e=>{c(e,f)})),[m]=K.useState(Ip(u,p));vg(()=>{for(let e of o)e in f&&Wp(m[e],f[e]);return()=>{Object.values(m).map(Kp)}},[f,m,p]),vg(()=>{c(p,f)}),K.useImperativeHandle(a,Np(l(p)));let h=n;return(0,q.jsx)(s.Provider,{value:p,children:n===void 0?d:(0,q.jsx)(h,{..._g([...r,...i,...o],f),children:d})})}),useEmitter:(e,t)=>{let n=K.useContext(s)[e];vg(()=>Wp(n,t),[t,n])},useEmitterValue:e=>{let t=K.useContext(s)[e],n=K.useCallback(e=>Wp(t,e),[t]);return K.useSyncExternalStore(n,()=>qp(t),()=>qp(t))},usePublisher:e=>{let t=K.useContext(s);return K.useCallback(n=>{Gp(t[e],n)},[t,e])}}}var bg=K.createContext(void 0),xg=K.createContext(void 0),Sg=`-webkit-sticky`,Cg=`sticky`,wg=mg(()=>{if(typeof document>`u`)return Cg;let e=document.createElement(`div`);return e.style.position=Sg,e.style.position===Sg?Sg:Cg}),Tg=typeof document>`u`?K.useEffect:K.useLayoutEffect;function Eg(e){return`self`in e}function Dg(e){return`body`in e}function Og(e,t,n,r=Bp,i,a){let o=K.useRef(null),s=K.useRef(null),c=K.useRef(null),l=K.useCallback(n=>{let r,i,o,l=n.target;if(Dg(l)||Eg(l)){let e=Eg(l)?l:l.defaultView;o=a===!0?xm(e,e.scrollX):e.scrollY,r=a===!0?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a===!0?e.innerWidth:e.innerHeight}else o=a===!0?xm(l,l.scrollLeft):l.scrollTop,r=a===!0?l.scrollWidth:l.scrollHeight,i=a===!0?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync===!0?u():Rs.flushSync(u),s.current!==null&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&=(clearTimeout(c.current),null))},[e,t,a]);K.useEffect(()=>{let e=i??o.current;return r(i??o.current),l({suppressFlushSync:!0,target:e}),e.addEventListener(`scroll`,l,{passive:!0}),()=>{r(null),e.removeEventListener(`scroll`,l)}},[o,l,n,r,i]);function u(n){let r=o.current;if(!r||(a===!0?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;Eg(r)?(u=Math.max(rh(r.document.documentElement,a===!0?`width`:`height`),a===!0?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a===!0?r.innerWidth:r.innerHeight,d=a===!0?xm(r,r.scrollX):r.scrollY):(u=r[a===!0?`scrollWidth`:`scrollHeight`],l=rh(r,a===!0?`width`:`height`),d=a===!0?xm(r,r.scrollLeft):r.scrollTop);let f=u-l;if(n.top===void 0){r.scrollTo(n);return}let p=Math.ceil(Math.max(Math.min(f,n.top),0));if(n.top=p,Nh(l,u)||p===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=p,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a===!0&&(n={...n.behavior===void 0?{}:{behavior:n.behavior},left:Sm(r,p)}),r.scrollTo(n)}function d(e){a===!0&&(e={...e.behavior===void 0?{}:{behavior:e.behavior},...e.top===void 0?{}:{left:Sm(o.current,e.top)}}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}function kg(e){return e}var Ag=lm(([e,t])=>({...e,...t}),Up(gg,lm(()=>{let e=$(e=>`Item ${e}`),t=$(e=>`Group ${e}`),n=$({}),r=$(kg),i=$(`div`),a=$(Bp),o=(e,t=null)=>am(Q(n,Z(t=>t[e]),Zp()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o(`EmptyPlaceholder`),FooterComponent:o(`Footer`),GroupComponent:o(`Group`,`div`),groupContent:t,HeaderComponent:o(`Header`),HeaderFooterTag:i,ItemComponent:o(`Item`,`div`),itemContent:e,ListComponent:o(`List`,`div`),ScrollerComponent:o(`Scroller`,`div`),scrollerRef:a,ScrollSeekPlaceholder:o(`ScrollSeekPlaceholder`),TopItemListComponent:o(`TopItemList`)}}))),jg=({height:e})=>(0,q.jsx)(`div`,{style:{height:e}}),Mg={overflowAnchor:`none`,position:wg(),zIndex:1},Ng={overflowAnchor:`none`},Pg={...Ng,display:`inline-block`,height:`100%`},Fg=K.memo(function({showTopList:e=!1}){let t=Qg(`listState`),n=$g(`sizeRanges`),r=Qg(`useWindowScroll`),i=Qg(`customScrollParent`),a=$g(`windowScrollContainerState`),o=$g(`scrollContainerState`),s=i||r?a:o,c=Qg(`itemContent`),l=Qg(`context`),u=Qg(`groupContent`),d=Qg(`trackItemSizes`),f=Qg(`itemSize`),p=Qg(`log`),m=$g(`gap`),h=Qg(`horizontalDirection`),{callbackRef:g}=Tm(n,f,d,e?Bp:s,p,m,i,h,Qg(`skipAnimationFrameInResizeObserver`)),[_,v]=K.useState(0);Zg(`deviation`,e=>{_!==e&&v(e)});let y=Qg(`EmptyPlaceholder`),b=Qg(`ScrollSeekPlaceholder`)??jg,x=Qg(`ListComponent`),S=Qg(`ItemComponent`),C=Qg(`GroupComponent`),w=Qg(`computeItemKey`),T=Qg(`isSeeking`),E=Qg(`groupIndices`).length>0,D=Qg(`alignToBottom`),O=Qg(`initialItemFinalLocationReached`),k=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginInlineStart:_===0?D?`auto`:0:_,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y!=null?(0,q.jsx)(y,{...Vg(y,l)}):(0,q.jsx)(x,{...Vg(x,l),"data-testid":e?`virtuoso-top-item-list`:`virtuoso-item-list`,ref:g,style:k,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=w(n+t.firstItemIndex,e.data,l);return T?(0,K.createElement)(b,{...Vg(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,K.createElement)(C,{...Vg(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Mg},u(e.index,l)):(0,K.createElement)(S,{...Vg(S,l),...Hg(S,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:h?Pg:Ng},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),Ig={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},Lg={outline:`none`,overflowX:`auto`,position:`relative`},Rg=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:void 0}),zg=(e,t,n=0)=>({...Rg(e),position:t?`relative`:`absolute`,top:t?-n:0}),Bg={position:wg(),top:0,width:`100%`,zIndex:1};function Vg(e,t){if(typeof e!=`string`)return{context:t}}function Hg(e,t){return{item:typeof e==`string`?void 0:t}}var Ug=K.memo(function(){let e=Qg(`HeaderComponent`),t=$g(`headerHeight`),n=Qg(`HeaderFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,Qg(`skipAnimationFrameInResizeObserver`)),i=Qg(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})}),Wg=K.memo(function(){let e=Qg(`FooterComponent`),t=$g(`footerHeight`),n=Qg(`HeaderFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,Qg(`skipAnimationFrameInResizeObserver`)),i=Qg(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})});function Gg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return K.memo(function({children:r,style:i,context:a,...o}){let s=n(`scrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`scrollerRef`),d=t(`horizontalDirection`)||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:m}=Og(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,q.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?Lg:Ig,...i},tabIndex:0,...o,...Vg(c,a),children:r})})}function Kg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return K.memo(function({children:r,style:i,context:a,...o}){let s=n(`windowScrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`totalListHeight`),d=t(`deviation`),f=t(`customScrollParent`),p=K.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=Og(s,l,c,t(`scrollerRef`),f);return Tg(()=>(h.current=f??p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,q.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?void 0:{height:u+d}},...o,...Vg(c,a),children:r})})}var qg=({children:e})=>{let t=K.useContext(bg),n=$g(`viewportHeight`),r=$g(`fixedItemHeight`),i=Qg(`alignToBottom`),a=Qg(`horizontalDirection`),o=Cm(K.useMemo(()=>Fp(n,e=>rh(e,a?`width`:`height`)),[n,a]),!0,Qg(`skipAnimationFrameInResizeObserver`));return K.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:Rg(i),children:e})},Jg=({children:e})=>{let t=K.useContext(bg),n=$g(`windowViewportRect`),r=$g(`fixedItemHeight`),i=Qg(`customScrollParent`),a=Qg(`useWindowScroll`),o=Qg(`topListHeight`),s=Om(n,i,Qg(`skipAnimationFrameInResizeObserver`)),c=Qg(`alignToBottom`);return K.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`window`,ref:s,style:zg(c,a,o),children:e})},Yg=({children:e})=>{let t=Qg(`TopItemListComponent`)??`div`,n=Qg(`headerHeight`),r={...Bg,marginTop:`${n}px`},i=Qg(`context`);return(0,q.jsx)(t,{style:r,...Vg(t,i),children:e})},{Component:Xg,useEmitter:Zg,useEmitterValue:Qg,usePublisher:$g}=yg(Ag,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,scrollIntoViewOnChange:`scrollIntoViewOnChange`,itemContent:`itemContent`,groupContent:`groupContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,groupCounts:`groupCounts`,topItemCount:`topItemCount`,firstItemIndex:`firstItemIndex`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,heightEstimates:`heightEstimates`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`HeaderFooterTag`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,horizontalDirection:`horizontalDirection`,skipAnimationFrameInResizeObserver:`skipAnimationFrameInResizeObserver`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,autoscrollToBottom:`autoscrollToBottom`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},K.memo(function(e){let t=Qg(`useWindowScroll`),n=Qg(`topItemsIndexes`).length>0,r=Qg(`customScrollParent`),i=Qg(`context`);return(0,q.jsxs)(r||t?t_:e_,{...e,context:i,children:[n&&(0,q.jsx)(Yg,{children:(0,q.jsx)(Fg,{showTopList:!0})}),(0,q.jsxs)(r||t?Jg:qg,{children:[(0,q.jsx)(Ug,{}),(0,q.jsx)(Fg,{}),(0,q.jsx)(Wg,{})]})]})})),e_=Gg({useEmitter:Zg,useEmitterValue:Qg,usePublisher:$g}),t_=Kg({useEmitter:Zg,useEmitterValue:Qg,usePublisher:$g}),n_=Xg,r_=lm(([e,t])=>({...e,...t}),Up(gg,lm(()=>{let e=$(e=>(0,q.jsxs)(`td`,{children:[`Item $`,e]})),t=$(null),n=$(e=>(0,q.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=$(null),i=$(null),a=$({}),o=$(kg),s=$(Bp),c=(e,t=null)=>am(Q(a,Z(t=>t[e]),Zp()),t);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c(`EmptyPlaceholder`),FillerRow:c(`FillerRow`),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`),TableBodyComponent:c(`TableBody`,`tbody`),TableComponent:c(`Table`,`table`),TableFooterComponent:c(`TableFoot`,`tfoot`),TableHeadComponent:c(`TableHead`,`thead`),TableRowComponent:c(`TableRow`,`tr`),GroupComponent:c(`Group`,`tr`)}}))),i_=({height:e})=>(0,q.jsx)(`tr`,{children:(0,q.jsx)(`td`,{style:{height:e}})}),a_=({height:e})=>(0,q.jsx)(`tr`,{children:(0,q.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),o_={overflowAnchor:`none`},s_={position:wg(),zIndex:2,overflowAnchor:`none`},c_=K.memo(function({showTopList:e=!1}){let t=m_(`listState`),n=m_(`computeItemKey`),r=m_(`firstItemIndex`),i=m_(`context`),a=m_(`isSeeking`),o=m_(`fixedHeaderHeight`),s=m_(`groupIndices`).length>0,c=m_(`itemContent`),l=m_(`groupContent`),u=m_(`ScrollSeekPlaceholder`)??i_,d=m_(`GroupComponent`),f=m_(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,h=n(m+r,t.data,i),g=e?m===0?0:p[m-1]:0;return a?(0,K.createElement)(u,{...Vg(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,K.createElement)(d,{...Vg(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...s_,top:o}},l(t.index,i)):(0,K.createElement)(f,{...Vg(f,i),...Hg(f,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:h,style:e?{...s_,top:o+g}:o_},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))})}),l_=K.memo(function(){let e=m_(`listState`),t=m_(`topItemsIndexes`).length>0,n=h_(`sizeRanges`),r=m_(`useWindowScroll`),i=m_(`customScrollParent`),a=h_(`windowScrollContainerState`),o=h_(`scrollContainerState`),s=i||r?a:o,c=m_(`trackItemSizes`),{callbackRef:l,ref:u}=Tm(n,m_(`itemSize`),c,s,m_(`log`),void 0,i,!1,m_(`skipAnimationFrameInResizeObserver`)),[d,f]=K.useState(0);p_(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=m_(`EmptyPlaceholder`),m=m_(`FillerRow`)??a_,h=m_(`TableBodyComponent`),g=m_(`paddingTopAddition`),_=m_(`statefulTotalCount`),v=m_(`context`);if(_===0&&p!=null)return(0,q.jsx)(p,{...Vg(p,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),b=e.offsetTop+g+d-y,x=e.offsetBottom,S=b>0?(0,q.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,q.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,q.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...Vg(h,v),children:[S,t&&(0,q.jsx)(c_,{showTopList:!0}),(0,q.jsx)(c_,{}),C]})}),u_=({children:e})=>{let t=K.useContext(bg),n=h_(`viewportHeight`),r=h_(`fixedItemHeight`),i=Cm(K.useMemo(()=>Fp(n,e=>rh(e,`height`)),[n]),!0,m_(`skipAnimationFrameInResizeObserver`));return K.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:Rg(!1),children:e})},d_=({children:e})=>{let t=K.useContext(bg),n=h_(`windowViewportRect`),r=h_(`fixedItemHeight`),i=m_(`customScrollParent`),a=m_(`useWindowScroll`),o=Om(n,i,m_(`skipAnimationFrameInResizeObserver`));return K.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,q.jsx)(`div`,{"data-viewport-type":`window`,ref:o,style:zg(!1,a),children:e})},{Component:f_,useEmitter:p_,useEmitterValue:m_,usePublisher:h_}=yg(r_,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,firstItemIndex:`firstItemIndex`,itemContent:`itemContent`,groupContent:`groupContent`,fixedHeaderContent:`fixedHeaderContent`,fixedFooterContent:`fixedFooterContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,topItemCount:`topItemCount`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,groupCounts:`groupCounts`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},K.memo(function(e){let t=m_(`useWindowScroll`),n=m_(`customScrollParent`),r=h_(`fixedHeaderHeight`),i=h_(`fixedFooterHeight`),a=m_(`fixedHeaderContent`),o=m_(`fixedFooterContent`),s=m_(`context`),c=Cm(K.useMemo(()=>Fp(r,e=>rh(e,`height`)),[r]),!0,m_(`skipAnimationFrameInResizeObserver`)),l=Cm(K.useMemo(()=>Fp(i,e=>rh(e,`height`)),[i]),!0,m_(`skipAnimationFrameInResizeObserver`)),u=n||t?__:g_,d=n||t?d_:u_,f=m_(`TableComponent`),p=m_(`TableHeadComponent`),m=m_(`TableFooterComponent`),h=a?(0,q.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...Vg(p,s),children:a()},`TableHead`):null,g=o?(0,q.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...Vg(m,s),children:o()},`TableFoot`):null;return(0,q.jsx)(u,{...e,...Vg(u,s),children:(0,q.jsx)(d,{children:(0,q.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...Vg(f,s),children:[h,(0,q.jsx)(l_,{},`TableBody`),g]})})})})),g_=Gg({useEmitter:p_,useEmitterValue:m_,usePublisher:h_}),__=Kg({useEmitter:p_,useEmitterValue:m_,usePublisher:h_}),v_={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},y_={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:b_,floor:x_,max:S_,min:C_,round:w_}=Math;function T_(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function E_(e){return{...y_,items:e}}function D_(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function O_(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}var k_=lm(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:m,propsReady:h},{customScrollParent:g,useWindowScroll:_,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b},x])=>{let S=$(0),C=$(0),w=$(v_),T=$({height:0,width:0}),E=$({height:0,width:0}),D=om(),O=om(),k=$(0),A=$(null),j=$({column:0,row:0}),M=om(),N=om(),P=$(!1),F=$(0),I=$(!0),ee=$(!1),L=$(!1);Wp(Q(m,nm(F),X(([e,t])=>!jh(t))),()=>{Gp(I,!1)}),Wp(Q(fm(m,I,E,T,F,ee),X(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{if(e===void 0){Gp(I,!0);return}Gp(ee,!0),kh(1,()=>{Gp(D,e)}),Jp(Q(l),()=>{Gp(t,[0,0]),Gp(I,!0)})}),Y(Q(N,X(e=>e!=null&&e.scrollTop>0),Qp(0)),C),Wp(Q(m,nm(N),X(([,e])=>e!=null)),([,e])=>{e&&(Gp(T,e.viewport),Gp(E,e.item),Gp(j,e.gap),e.scrollTop>0&&(Gp(P,!0),Jp(Q(l,em(1)),e=>{Gp(P,!1)}),Gp(c,{top:e.scrollTop})))}),Y(Q(T,Z(({height:e})=>e)),d),Y(Q(fm(pm(T,D_),pm(E,D_),pm(j,(e,t)=>e!==void 0&&e.column===t.column&&e.row===t.row),pm(l)),Z(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),M),Y(Q(fm(pm(S),r,pm(j,O_),pm(E,D_),pm(T,D_),pm(A),pm(C),pm(P),pm(I),pm(F)),X(([,,,,,,,e])=>!e),Z(([e,[t,n],r,i,a,o,s,,c,l])=>{let{column:u,row:d}=r,{height:f,width:p}=i,{width:m}=a;if(s===0&&(e===0||m===0))return v_;if(p===0){let t=Ah(l,e);return E_(T_(t,t+Math.max(s-1,0),o))}let h=A_(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*x_((t+d)/(f+d)),_=h*b_((n+d)/(f+d))-1,_=C_(e-1,S_(_,h-1)),g=C_(_,S_(0,g))):(g=0,_=-1);let v=T_(g,_,o),{bottom:y,top:b}=j_(a,r,i,v),x=b_(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),Y(Q(A,X(e=>e!==null),Z(e=>e.length)),S),Y(Q(fm(T,E,w,j),X(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),Z(([e,t,{items:n},r])=>{let{bottom:i,top:a}=j_(e,r,t,n);return[a,i]}),Zp(Qm)),t);let te=$(!1);Y(Q(l,nm(te),Z(([e,t])=>t||e!==0)),te);let ne=sm(Q(fm(w,S),X(([{items:e}])=>e.length>0),nm(te),X(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&e.offsetBottom===0&&e.items.length===t)&&r}),Z(([[,e]])=>e-1),Zp())),re=sm(Q(pm(w),X(({items:e})=>e.length>0&&e[0].index===0),Qp(0),Zp())),ie=sm(Q(pm(w),nm(P),X(([{items:e},t])=>e.length>0&&!t),Z(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),Zp(Zm),tm(0)));Y(ie,p.scrollSeekRangeChanged),Y(Q(D,nm(T,E,S,j),Z(([e,t,n,r,i])=>{let a=Eh(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=S_(0,l,C_(r-1,l));let u=M_(t,i,n,l);return o===`end`?u=w_(u-t.height+n.height):o===`center`&&(u=w_(u-t.height/2+n.height/2)),c!==void 0&&c!==0&&(u+=c),{behavior:s,top:u}})),c);let ae=am(Q(w,Z(e=>e.offsetBottom+e.bottom)),0);return Y(Q(b,Z(e=>({height:e.visibleHeight,width:e.visibleWidth}))),T),{customScrollParent:g,data:A,deviation:k,footerHeight:i,gap:j,headerHeight:a,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:n,restoreStateFrom:N,scrollBy:o,scrollContainerState:s,scrollHeight:O,scrollTo:c,scrollToIndex:D,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:_,viewportDimensions:T,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b,...p,gridState:w,horizontalDirection:L,initialTopMostItemIndex:F,totalListHeight:ae,...f,endReached:ne,propsReady:h,rangeChanged:ie,startReached:re,stateChanged:M,stateRestoreInProgress:P,...x}},Up(Gh,km,zh,lg,wh,ug,vm));function A_(e,t,n){return S_(1,x_((e+n)/(x_(t)+n)))}function j_(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=M_(e,t,n,r[0].index);return{bottom:M_(e,t,n,r[r.length-1].index)+i,top:a}}function M_(e,t,n,r){let i=x_(r/A_(e.width,n.width,t.column)),a=i*n.height+S_(0,i-1)*t.row;return a>0?a+t.row:a}var N_=lm(([e,t])=>({...e,...t}),Up(k_,lm(()=>{let e=$(e=>`Item ${e}`),t=$({}),n=$(null),r=$(`virtuoso-grid-item`),i=$(`virtuoso-grid-list`),a=$(kg),o=$(`div`),s=$(Bp),c=(e,n=null)=>am(Q(t,Z(t=>t[e]),Zp()),n),l=$(!1),u=$(!1);return Y(pm(u),l),{components:t,computeItemKey:a,context:n,FooterComponent:c(`Footer`),HeaderComponent:c(`Header`),headerFooterTag:o,itemClassName:r,ItemComponent:c(`Item`,`div`),itemContent:e,listClassName:i,ListComponent:c(`List`,`div`),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`,`div`)}}))),P_=K.memo(function(){let e=V_(`gridState`),t=V_(`listClassName`),n=V_(`itemClassName`),r=V_(`itemContent`),i=V_(`computeItemKey`),a=V_(`isSeeking`),o=H_(`scrollHeight`),s=V_(`ItemComponent`),c=V_(`ListComponent`),l=V_(`ScrollSeekPlaceholder`),u=V_(`context`),d=H_(`itemDimensions`),f=H_(`gap`),p=V_(`log`),m=V_(`stateRestoreInProgress`),h=H_(`reportReadyState`),g=Cm(K.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n!==null){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:G_(`column-gap`,getComputedStyle(e).columnGap,p),row:G_(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return Tg(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,q.jsx)(c,{className:t,ref:g,...Vg(c,u),"data-testid":`virtuoso-item-list`,style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let o=i(t.index,t.data,u);return a?(0,q.jsx)(l,{...Vg(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,K.createElement)(s,{...Vg(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),F_=K.memo(function(){let e=V_(`HeaderComponent`),t=H_(`headerHeight`),n=V_(`headerFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,!1),i=V_(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})}),I_=K.memo(function(){let e=V_(`FooterComponent`),t=H_(`footerHeight`),n=V_(`headerFooterTag`),r=Cm(K.useMemo(()=>e=>{t(rh(e,`height`))},[t]),!0,!1),i=V_(`context`);return e==null?null:(0,q.jsx)(n,{ref:r,children:(0,q.jsx)(e,{...Vg(e,i)})})}),L_=({children:e})=>{let t=K.useContext(xg),n=H_(`itemDimensions`),r=H_(`viewportDimensions`),i=Cm(K.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return K.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,q.jsx)(`div`,{ref:i,style:Rg(!1),children:e})},R_=({children:e})=>{let t=K.useContext(xg),n=H_(`windowViewportRect`),r=H_(`itemDimensions`),i=V_(`customScrollParent`),a=V_(`useWindowScroll`),o=Om(n,i,!1);return K.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,q.jsx)(`div`,{ref:o,style:zg(!1,a),children:e})},{Component:z_,useEmitter:B_,useEmitterValue:V_,usePublisher:H_}=yg(N_,{optional:{context:`context`,totalCount:`totalCount`,overscan:`overscan`,itemContent:`itemContent`,components:`components`,computeItemKey:`computeItemKey`,data:`data`,initialItemCount:`initialItemCount`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`headerFooterTag`,listClassName:`listClassName`,itemClassName:`itemClassName`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,restoreStateFrom:`restoreStateFrom`,initialTopMostItemIndex:`initialTopMostItemIndex`,increaseViewportBy:`increaseViewportBy`},methods:{scrollTo:`scrollTo`,scrollBy:`scrollBy`,scrollToIndex:`scrollToIndex`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,stateChanged:`stateChanged`,readyStateChanged:`readyStateChanged`}},K.memo(function({...e}){let t=V_(`useWindowScroll`),n=V_(`customScrollParent`),r=n||t?W_:U_,i=n||t?R_:L_,a=V_(`context`);return(0,q.jsx)(r,{...e,...Vg(r,a),children:(0,q.jsxs)(i,{children:[(0,q.jsx)(F_,{}),(0,q.jsx)(P_,{}),(0,q.jsx)(I_,{})]})})})),U_=Gg({useEmitter:B_,useEmitterValue:V_,usePublisher:H_}),W_=Kg({useEmitter:B_,useEmitterValue:V_,usePublisher:H_});function G_(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,hm.WARN),t===`normal`?0:parseInt(t??`0`,10)}function K_(e){let t=(0,J.c)(9),{option:n,checked:r,renderOption:i}=e,a=r||void 0,o=n.value,s;t[0]!==r||t[1]!==n||t[2]!==i?(s=i?i(n,{checked:r}):n.label,t[0]=r,t[1]=n,t[2]=i,t[3]=s):s=t[3];let c;return t[4]!==n.disabled||t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,q.jsx)(Oe,{"data-slot":`select-option`,"data-checked":a,value:o,disabled:n.disabled,children:s}),t[4]=n.disabled,t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}var q_=K.memo(K_);function J_(e,...t){return typeof e==`function`?e(...t):e}function Y_(e){switch(e.kind){case`select-all`:return`Select all`;case`deselect-all`:return`Deselect all`;case`select-matching`:return`Select ${e.items.length} matching`;case`deselect-matching`:return`Deselect ${e.items.length} matching`}}function X_(e){let t=(0,J.c)(55),{options:n,value:r,onChange:i,multiple:a,maxSelections:o,allowSelectNone:s,pinSelected:c,compactChipTrigger:l,placeholder:u,disabled:d,fullWidth:f,className:p,id:m,renderOption:h,renderEmpty:g,virtualizeThreshold:_,virtualizedHeight:v}=e,y=c!==void 0&&c,b=l!==void 0&&l,x=u===void 0?`Select...`:u,S=d!==void 0&&d,C=f!==void 0&&f,w=g===void 0?`Nothing found.`:g,T=_===void 0?200:_,E=v===void 0?200:v,D;t[0]!==s||t[1]!==o||t[2]!==a||t[3]!==i||t[4]!==n||t[5]!==y||t[6]!==r?(D={options:n,value:r,onChange:i,multiple:a,maxSelections:o,allowSelectNone:s,pinSelected:y},t[0]=s,t[1]=o,t[2]=a,t[3]=i,t[4]=n,t[5]=y,t[6]=r,t[7]=D):D=t[7];let O=Pr(D),k;t[8]!==s||t[9]!==o||t[10]!==a||t[11]!==i?(k=e=>{if(!a){if(e==null&&!s)return;i(e);return}let t=Array.isArray(e)?e:[];o!=null&&t.length>o&&(t=t.slice(-o)),i(t)},t[8]=s,t[9]=o,t[10]=a,t[11]=i,t[12]=k):k=t[12];let A=k,j;if(t[13]!==O.bulkActions){if(j=O.bulkActions.map(Z_),j.length>0){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(Fe,{"data-slot":`select-separator`},`_bulk_separator`),t[15]=e):e=t[15],j.push(e)}t[13]=O.bulkActions,t[14]=j}else j=t[14];let M;t[16]!==O.pinnedCount||t[17]!==O.visibleOptions.length?(M=e=>O.pinnedCount>0&&e===O.pinnedCount&&O.pinnedCount<O.visibleOptions.length?(0,q.jsx)(Fe,{"data-slot":`select-separator`},`_pinned_separator`):null,t[16]=O.pinnedCount,t[17]=O.visibleOptions.length,t[18]=M):M=t[18];let N=M,P;t[19]!==j||t[20]!==O||t[21]!==N||t[22]!==h||t[23]!==T||t[24]!==E?(P=()=>{if(O.visibleOptions.length>T)return(0,q.jsx)(n_,{"data-slot":`select-list`,style:{height:E},totalCount:O.visibleOptions.length,overscan:50,itemContent:e=>{let t=O.visibleOptions[e];return(0,q.jsxs)(q.Fragment,{children:[e===0&&j,N(e),(0,q.jsx)(q_,{option:t,checked:O.isChecked(t.value),renderOption:h})]})}});let e=O.visibleOptions.flatMap((e,t)=>{let n=N(t),r=(0,q.jsx)(q_,{option:e,checked:O.isChecked(e.value),renderOption:h},String(e.value));return n?[n,r]:[r]});return(0,q.jsxs)(q.Fragment,{children:[j,e]})},t[19]=j,t[20]=O,t[21]=N,t[22]=h,t[23]=T,t[24]=E,t[25]=P):P=t[25];let F=P,I;t[26]!==O.labelOf||t[27]!==x?(I=e=>{let t=Array.isArray(e)?e:e==null?[]:[e];return t.length===0?(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:x}):(0,q.jsx)(Fr,{items:t.map(O.labelOf),max:3})},t[26]=O.labelOf,t[27]=x,t[28]=I):I=t[28];let ee=I,L=e[`data-testid`],te;t[29]===O?te=t[30]:(te=e=>O.labelOf(e),t[29]=O,t[30]=te);let ne=b?ee:void 0,re;t[31]!==p||t[32]!==C?(re=G({"w-full":C},p),t[31]=p,t[32]=C,t[33]=re):re=t[33];let ie=O.searchQuery,ae=O.setSearchQuery,oe=O.open,se=O.setOpen,ce;t[34]===w?ce=t[35]:(ce=J_(w),t[34]=w,t[35]=ce);let le;t[36]!==S||t[37]!==m||t[38]!==O.open||t[39]!==O.searchQuery||t[40]!==O.setOpen||t[41]!==O.setSearchQuery||t[42]!==x||t[43]!==L||t[44]!==te||t[45]!==ne||t[46]!==re||t[47]!==ce?(le={"data-slot":`select-root`,"data-testid":L,displayValue:te,renderValue:ne,placeholder:x,className:re,shouldFilter:!1,search:ie,onSearchChange:ae,open:oe,onOpenChange:se,emptyState:ce,disabled:S,id:m},t[36]=S,t[37]=m,t[38]=O.open,t[39]=O.searchQuery,t[40]=O.setOpen,t[41]=O.setSearchQuery,t[42]=x,t[43]=L,t[44]=te,t[45]=ne,t[46]=re,t[47]=ce,t[48]=le):le=t[48];let ue=le,de;return t[49]!==ue||t[50]!==A||t[51]!==a||t[52]!==F||t[53]!==r?(de=a?(0,q.jsx)(we,{...ue,multiple:!0,value:r,onValueChange:A,children:F()}):(0,q.jsx)(we,{...ue,multiple:!1,value:r,onValueChange:A,children:F()}),t[49]=ue,t[50]=A,t[51]=a,t[52]=F,t[53]=r,t[54]=de):de=t[54],de}function Z_(e){let t=`enabled`in e?!e.enabled:e.items.length===0;return(0,q.jsx)(ie,{"data-slot":`select-bulk`,className:`pl-6 m-1 py-1`,value:`__bulk_${e.kind}`,disabled:t,onSelect:()=>{t||e.run()},children:Y_(e)},e.kind)}var Q_=Vn,$_=Wn,ev=zn,tv=Gn,nv=e=>{let t=(0,J.c)(13),{error:n,badData:r}=e;if(n instanceof it){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(gs,{children:`Bad Data`}),t[0]=e):e=t[0];let i;t[1]===n.issues?i=t[2]:(i=n.issues.map(iv),t[1]=n.issues,t[2]=i);let a;t[3]===i?a=t[4]:(a=(0,q.jsx)(`div`,{className:`text-md prose dark:prose-invert`,children:(0,q.jsx)(`ul`,{children:i})}),t[3]=i,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(tv,{className:`py-2 text-[0.84375rem]`,children:`View Data:`}),t[5]=o):o=t[5];let s;t[6]===r?s=t[7]:(s=(0,q.jsx)(Q_,{type:`single`,collapsible:!0,children:(0,q.jsxs)(ev,{value:`item-1`,className:`text-muted-foreground border-muted-foreground-20`,children:[o,(0,q.jsx)($_,{className:`text-[0.84375rem]`,children:(0,q.jsx)(gi,{data:r})})]})}),t[6]=r,t[7]=s);let c;return t[8]!==a||t[9]!==s?(c=(0,q.jsxs)(_s,{variant:`destructive`,children:[e,a,s]}),t[8]=a,t[9]=s,t[10]=c):c=t[10],c}let i;return t[11]===n.message?i=t[12]:(i=(0,q.jsx)(`div`,{children:n.message}),t[11]=n.message,t[12]=i),i};function rv(e,t){return(0,q.jsx)(nv,{error:e,badData:t})}function iv(e){let t=e.path.join(`.`);return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`span`,{className:`font-bold`,children:t}),`: `,e.message]},t)}var av=3,ov=150;function sv({hostElement:e,plugin:t,children:n,getInitialValue:r},i){let[o,c]=(0,K.useState)(n),[l,u]=(0,K.useState)(r()),{theme:d}=Ro(),[f,p]=(0,K.useState)(()=>t.validator.safeParse(de(e))),[m,h]=(0,K.useState)(0);(0,K.useImperativeHandle)(i,()=>({reset:()=>{u(r()),p(t.validator.safeParse(de(e))),h(e=>e+1)},setChildren:e=>{c(e)}})),Lt(e,fs.TYPE,t=>{t.detail.element===e&&u(t.detail.value)}),(0,K.useEffect)(()=>{let n=new MutationObserver(n=>{n.some(e=>e.type===`attributes`&&e.attributeName?.startsWith(`data-`))&&p(t.validator.safeParse(de(e)))});return n.observe(e,{attributes:!0}),()=>{n.disconnect()}},[e,t.validator]);let g=s(t=>{u(n=>{let r=Pt.asUpdater(t)(n);return wp(r,n)||e.dispatchEvent(ds(r,e)),r})}),_=(0,K.useMemo)(()=>{if(!t.functions)return{};let n={};for(let[r,i]of Rt.entries(t.functions)){let{input:t,output:o}=i;n[r]=async(...n)=>{zt(n.length<=1,`Plugin functions only supports a single argument. Called ${r}`);let i=on(),s=Pe.findElementThroughShadowDOMs(e)?.id,c=s?Pe.parse(s):null;if(c&&!i){let e=a.get(se),t=e.cellRuntime[c],n=e.cellData[c];if(Ce({executionTime:t.runElapsedTimeMs??n.lastExecutionTime,status:t.status,errored:t.errored,interrupted:t.interrupted,stopped:t.stopped}))throw new as}else W.warn(`Cell ID ${c} cannot be found`);let l=mv(t,n[0]);for(let t=0;;t++){let n=_v(e);zt(n,`Object ID should exist`);let i=await Tt.request({args:l,functionName:r,namespace:n});if(i.status.code===`ok`)return mv(o,i.return_value);let a=i.found===!1;if(a&&t<av){let e=ov*2**t;await new Promise(t=>setTimeout(t,e));continue}throw W.error(i.status),a?new rs:Error(i.status.message||`Unknown error`)}}}return n},[t.functions,e,m]);return f.success?(0,q.jsx)(kn,{children:(0,q.jsx)(`div`,{className:`contents ${d}`,children:(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(`div`,{}),children:(0,q.jsx)(Ri,{children:t.render({setValue:g,value:l,data:f.data,children:o,host:e,functions:_})})})})}):rv(f.error,Rt.mapValues(e.dataset,e=>typeof e==`string`?fe(e):e))}var cv=K.forwardRef(sv),lv=new Map,uv=`__custom_marimo_element__`;function dv(e){let t=class extends HTMLElement{observer;root;mounted=!1;pluginRef=(0,K.createRef)();__type__=uv;constructor(){super(),this.attachShadow({mode:`open`}),this.copyStyles(),this.observer=new MutationObserver(()=>{this.pluginRef.current?.setChildren(this.getChildren())})}connectedCallback(){this.isLightDOMChildOfMarimoElement()||(this.mounted||(zt(this.shadowRoot,`Shadow root should exist`),this.root&&this.root.unmount(),this.root=Ul.createRoot(this.shadowRoot),this.mountReactComponent()),this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){this.observer.disconnect(),this.root?.unmount(),this.mounted&&=!1}isLightDOMChildOfMarimoElement(){let e=this.parentElement;for(;e;){if(pv(e))return!0;e=e.parentElement}return!1}reset(){this.dispatchEvent(ds(fe(this.dataset.initialValue),this)),this.rerender()}rerender(){this.pluginRef.current?.reset()}getChildren(){return this.children.length===0?null:this.children.length===1?Zo({html:this.innerHTML,alwaysSanitizeHtml:!1}):Array.from(this.children).map((e,t)=>(0,q.jsx)(K.Fragment,{children:Zo({html:e.outerHTML,alwaysSanitizeHtml:!1})},t))}async mountReactComponent(){this.mounted=!0,zt(this.root,`Root must be defined`),this.root.render((0,q.jsx)(o,{store:a,children:(0,q.jsx)(jf,{children:(0,q.jsx)(cv,{hostElement:this,plugin:e,ref:this.pluginRef,getInitialValue:()=>ae(this,bt.INSTANCE),children:this.getChildren()})})}))}async copyStyles(){let t=this.shadowRoot;if(zt(t,`Shadow root should exist`),!this.isAdoptedStyleSheetsSupported()){W.warn(`adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser.`),this.copyStylesFallback();return}let n=Array.from(document.styleSheets).filter(e=>e.ownerNode instanceof HTMLElement&&e.ownerNode.dataset.viteDevId?!0:fv(e));for(let e of n){let t=e.href??(e.ownerNode instanceof HTMLElement?e.ownerNode.dataset.viteDevId:void 0)??e.title;if(t&&!lv.has(t)){let n=new CSSStyleSheet;try{n.replaceSync(Array.from(e.cssRules).map(e=>e.cssText.includes(`@import`)?``:e.cssText).join(`
|
|
3
3
|
`))}catch{}lv.set(t,n)}}if(t.adoptedStyleSheets=[...lv.values()],e.cssStyles){let n=new CSSStyleSheet;n.replaceSync(e.cssStyles.join(`
|
|
4
4
|
`)),t.adoptedStyleSheets=[...t.adoptedStyleSheets,n]}}copyStylesFallback(){let t=this.shadowRoot;zt(t,`Shadow root should exist`),W.warn(`adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser.`);let n=Array.from(document.styleSheets).flatMap(e=>{if(!fv(e))return[];let t=document.createElement(`style`);try{t.textContent=Array.from(e.cssRules).map(e=>e.cssText).join(`
|
|
5
5
|
`)}catch{return[]}return[t]});if(t.append(...n),e.cssStyles){let n=document.createElement(`style`);n.textContent=e.cssStyles.join(`
|