@marimo-team/frontend 0.24.2-dev2 → 0.24.2-dev6
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/{edit-page-Vqd9NedM.js → edit-page-xlMlcLnI.js} +2 -2
- package/dist/assets/file-explorer-panel-s0ohSG_L.js +1 -0
- package/dist/assets/{index-ipFYAeCF.js → index-4n22QjCD.js} +2 -2
- package/dist/assets/{index-BGT7have.css → index-C7yAojRA.css} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/components/storage/storage-inspector.tsx +2 -2
- package/src/css/markdown-typography.css +0 -5
- package/dist/assets/file-explorer-panel-6HvNfCrJ.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-page-BLd6rnbk.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-xfs0Sn4r.js","./react-CBDbhulC.js","./compiler-runtime-CYIjoINj.js","./cells-Cp-G34Rz.js","./react-dom-BQrReHnR.js","./schemas-aTUejmFi.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./utils-D5Ywm7-q.js","./_baseMerge-DLqSVasz.js","./isArrayLikeObject-DnwgSs_Z.js","./_initCloneObject-CM3WilQg.js","./useEventListener-92uWqz-P.js","./objects-snlMn4yk.js","./jsx-runtime-B74pBk57.js","./invariant-Ci2dTZ72.js","./config-BlNM0caL.js","./constants-BDbGiS7O.js","./Deferred-CrTnjj37.js","./session-Sz5nSFku.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./fullscreen-BH2jz-F4.js","./dist-DzCQtGkt.js","./menu-items-BSRA2YI9.js","./alert-dialog-CA-2mBs3.js","./button-Dh8EwhsF.js","./select-nLt2y0Sw.js","./check-BoA6XBpj.js","./createLucideIcon-B7HeEoG2.js","./useNumberFormatter-DHJ9s6Vk.js","./context-Do8M9TDF.js","./circle-ByJdIf5p.js","./tooltip-BUtPzKB4.js","./dist-BtC9ym6k.js","./dist-CZNULd6Z.js","./arrays-BqUx5USx.js","./once-Haz_uxEL.js","./capabilities-D8kPgMKr.js","./cjs-C49f7GXV.js","./createReducer-B_XmHROl.js","./dist-DiYjQAhI.js","./marked.esm-B_3iMIUq.js","./strings-CReV1AYG.js","./requests-C6_IaFh7.js","./dist-B8pdsUrS.js","./useLifecycle-BUaJcygz.js","./toDate-hGYJX0Ha.js","./database-zap-CloO6gbw.js","./write-secret-modal-D6zoZgLY.js","./input-DEbY281O.js","./numbers-Bc-r3jsC.js","./useDebounce-DgpSQhrP.js","./uuid-k9DpjH68.js","./use-toast-DpWHUGuF.js","./plus-C4J9gIE1.js","./trash-2-D_HX-0qx.js","./badge-BSgtkC2e.js","./preload-helper-HclGiUj8.js","./dist-Cx4BE7jC.js","./dist-B0RXffUm.js","./dist-DkPPv0FB.js","./dist-Dw9YRsCU.js","./dist-CKUpxYGQ.js","./stex-Dc5bKD4z.js","./paths-zcL04qUW.js","./useTheme-C-ri8BtY.js","./useAsyncData-Buhk-UgR.js","./purify.es-DrVcFY1Q.js","./cells-D-c15Ks-.css","./ErrorBoundary-CDVGFYfr.js","./dropdown-menu-C40jM9o4.js","./chevron-right-CKA5zVsM.js","./chart-no-axes-column-ChZdjJhj.js","./tree-actions-CG5g7aUQ.js","./eye-off-CFuPxa9F.js","./refresh-cw-Bf-rx_aV.js","./circle-play-CQiat61_.js","./external-link-Bp3BxyRA.js","./file-icons-DdGYuADJ.js","./file-headphone-rFCxFRI8.js","./file-DF8n85RA.js","./image-ab13yGv4.js","./youtube-DCJ-ihUU.js","./link-Cap-MZiw.js","./spinner-Ck-Hgfvj.js","./package-DPlscLzt.js","./file-name-input-K4MKESI_.js","./tabs-Cy1qXLzH.js","./copy-BMXKNElG.js","./errors-DzO-nXy-.js","./extends-CvVTau-c.js","./pathUtils-Cryrlpma.js","./semaphore-BjoL5P0h.js","./app-config-button-DUJC6b6x.js","./ai-model-dropdown-DCmiuk7x.js","./get-DjNf4SIX.js","./has-sKqQhP6r.js","./_hasPath-BmRQipI0.js","./switch-DjXr9Y9D.js","./config-B-r81uZ6.js","./triangle-alert-MihykDYG.js","./VisuallyHidden-CBMDmozt.js","./SelectionIndicator-DPl6HPLh.js","./copy-DlEomWzI.js","./kbd-Cwh96ZBE.js","./alert-dmKwNsrp.js","./error-banner-Dw5YY9wq.js","./table-DmqOOjfe.js","./renderShortcut-X-CJUSM8.js","./azure-Dcn397wY.js","./card-dYXwy2mo.js","./settings-C-cYas75.js","./Inputs-E85rt2lh.js","./Inputs-C4Oo7q-H.css","./dates-B58T85Jq.js","./en-US-yTIMUO13.js","./isValid-nQ3Iam8J.js","./react-icons.esm-hr79-MCS.js","./icons-CjLa9BiH.js","./github-YRgb6LMu.js","./marimo-icons-C3KxMV9A.js","./links-DLvOXyO_.js","./useInterval-B4v7_zd0.js","./run-page-9pl8qhQR.js","./readonly-python-code-DpIyjHqY.js","./esm-BHMOvJzM.js","./useAddCell-DdB_uBif.js","./JsonOutput-CzIGPEZQ.js","./download-DMxOzI7b.js","./html-to-image-D6GUC5q6.js","./LazyAnyLanguageCodeMirror-LboTfNDv.js","./table-CUK1W5bI.js","./markdown-renderer-BZKlbm2Q.js","./chunk-5FQGJX7Z-CRg4xQWg.js","./micromark-factory-space-D9Dr-k4J.js","./markdown-renderer-B7zTpxjS.css","./ellipsis-Dfik_tuW.js","./message-circle-BQB1AIAg.js","./MarimoErrorOutput-DqpoYOvw.js","./hat-glasses-C8LSY3HT.js","./datasource-DrODSIs0.js","./RenderHTML-DwhMAd9l.js","./copy-icon-z8fuTE3w.js","./useRunCells-CX7oW5zy.js","./useInstallPackage-DsD08SLK.js","./state-B6AklCzD.js","./cell-link-6burT2XF.js","./useDateFormatter-BiqAQ-zI.js","./tooltip-BG35uS_N.js","./vega-loader.browser-AQmjV9CX.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-Dm4DaIgg.js","./emotion-is-prop-valid.esm-nLO-SoUf.js","./useIframeCapabilities-C7Di8f2y.js","./utils-49LGK4zG.js","./formats-C6s96nu2.js","./react-resizable-panels.browser.esm-BSRAHC4P.js","./JsonOutput-BQtz7-np.css","./layout-DWnrxIo2.js","./code-xml-B7x62Eeh.js","./code-CF0HKE9K.js","./useDeleteCell-Bz49_cFj.js","./trash-DS1-SuM0.js","./prop-types-Djf4O40e.js","./floating-outline-DaUHnl_e.js","./process-output-Ck7-P_xp.js","./name-cell-input-BMCdK-el.js","./name-cell-input-ujOhus_y.css","./esm-DmqQGMel.js","./dist-BF7Lrekv.js","./dist-BaRNSaca.js","./dist-qvk3g06H.js","./dist-C--ZICxQ.js","./dist-DmGtPaVM.js","./dist-CmImLjus.js","./dist-DPoYlxSC.js","./dist-DJOWOALB.js","./dist-Db-HC93w.js","./dist-kaLvV_d4.js","./dist-gELFCfHH.js","./dist-Cq8NOszX.js","./dist-Bsu3h9O7.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-8kQdxo7f.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-UyKn0rKt.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-Bv0S1RlZ.js","./readonly-code-display--S2daDa6.js","./layout-D-WxHzKd.css","./arrow-left-DrqK6gPp.js","./panels-CWn0Yh1D.js","./state-Di9TbuV9.js","./_baseSet-gX6o3Pih.js","./blob-B2d_dHwI.js","./share-CPtBiNgr.js","./events-CbeVJ6OD.js","./requests-S_7PqcSt.js","./ws-DLVysDhS.js","./runs-euHSzlw_.js","./panels-DDsRoC3H.css","./shell-DLpUCctE.js","./edit-page-
|
|
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-xfs0Sn4r.js";import{t as c}from"./react-CBDbhulC.js";import{$ as l,$i as u,$t as d,An as f,Ao as p,Ba as m,Bo as h,Cn as g,Co as _,Dn as v,Do as y,Fn as b,Gi as x,Go as S,In as C,Io as w,Jo as T,Jt as E,Kn as D,Ko as O,Lo as k,Mi as A,Mn as j,Mo as M,Ni as N,Nn as P,Oo as F,Pn as I,Po as ee,Q as te,Ro as ne,S as re,Sn as ie,Tn as ae,Ut as oe,Wo as se,Wt as ce,X as le,Xt as ue,Y as de,Yo as fe,Yt as pe,Z as me,Zi as he,Zt as ge,_o as _e,an as L,b as ve,bn as ye,bo as be,cn as xe,dn as Se,ea as Ce,en as we,et as Te,fn as Ee,gt as De,ht as Oe,jn as ke,ko as Ae,ln as je,nn as Me,oa as Ne,on as Pe,pn as Fe,po as Ie,qo as Le,qt as Re,ra as ze,rn as Be,sn as Ve,ta as He,tn as Ue,tt as We,un as Ge,uo as Ke,vn as qe,vo as Je,wn as Ye,yo as Xe,z as Ze,zi as Qe,zo as $e}from"./cells-Cp-G34Rz.js";import{t as et}from"./react-dom-BQrReHnR.js";import{Cn as R,In as z,It as tt,Jn as nt,Sn as B,Tt as V,W as rt,Wn as it,Yn as at,at as ot,bt as st,cn as ct,hn as lt,hr as ut,jn as dt,kt as H,lc as ft,ln as pt,n as mt,un as ht,vt as gt,wn as _t,wt as vt,xt as yt}from"./schemas-aTUejmFi.js";import{t as bt}from"./compiler-runtime-CYIjoINj.js";import{t as xt}from"./get-DjNf4SIX.js";import{t as St}from"./pick-Bs4cJfJU.js";import{C as Ct,D as wt,F as Tt,N as Et,P as Dt,d as Ot,o as kt,t as At,w as jt,y as Mt}from"./utils-D5Ywm7-q.js";import{a as Nt,c as Pt,d as Ft,f as It,h as Lt,i as Rt,l as zt,o as Bt,p as Vt,r as Ht,s as Ut,u as Wt,v as Gt,x as Kt}from"./state-Di9TbuV9.js";import{_ as qt,a as Jt,g as U,o as Yt,t as Xt}from"./useEventListener-92uWqz-P.js";import{t as Zt}from"./objects-snlMn4yk.js";import{t as Qt}from"./invariant-Ci2dTZ72.js";import{r as $t}from"./constants-BDbGiS7O.js";import{C as en,D as tn,E as nn,M as rn,N as an,O as on,S as sn,T as cn,a as ln,b as un,i as dn,l as fn,r as pn,s as mn,t as hn,v as gn}from"./config-BlNM0caL.js";import{a as _n,i as vn,n as yn,o as bn,r as xn,t as Sn}from"./switch-DjXr9Y9D.js";import{_ as Cn,c as wn,d as Tn,f as En,i as Dn,t as On,u as kn,v as An}from"./readonly-python-code-DpIyjHqY.js";import{t as jn}from"./ErrorBoundary-CDVGFYfr.js";import{n as Mn,t as W}from"./cn-ldLVeaqm.js";import{t as Nn}from"./jsx-runtime-B74pBk57.js";import{E as Pn,S as Fn,T as In,_ as Ln,b as Rn,h as zn,i as Bn,o as Vn,s as Hn,v as Un,w as Wn,x as Gn,y as Kn}from"./fullscreen-BH2jz-F4.js";import{o as qn,s as Jn}from"./dist-DzCQtGkt.js";import{d as Yn,u as Xn}from"./menu-items-BSRA2YI9.js";import{a as Zn,c as Qn,i as $n,l as er,o as tr,r as nr,s as rr,u as ir}from"./config-B-r81uZ6.js";import{a as ar,c as or,i as sr,l as cr,n as lr,s as ur,t as dr}from"./alert-dialog-CA-2mBs3.js";import{i as fr,n as pr,r as mr,t as hr}from"./tabs-Cy1qXLzH.js";import{a as gr,c as _r,d as vr,f as yr,h as br,i as xr,l as Sr,m as Cr,n as wr,o as Tr,p as Er,r as Dr,s as Or,t as kr}from"./select-nLt2y0Sw.js";import{t as Ar}from"./circle-ByJdIf5p.js";import{a as jr,c as Mr,i as Nr,o as Pr,p as Fr,r as Ir,t as Lr}from"./dropdown-menu-C40jM9o4.js";import{B as Rr,Bt as zr,C as Br,Ct as Vr,Dt as Hr,Et as Ur,F as Wr,Ft as Gr,G as Kr,H as qr,J as Jr,K as Yr,L as Xr,Lt as Zr,M as Qr,Mt as $r,N as ei,P as ti,Q as ni,R as ri,Rt as ii,S as ai,St as oi,Tt as si,V as ci,X as li,Y as ui,Z as di,_ as fi,_t as pi,b as mi,c as hi,ct as gi,d as _i,et as vi,f as yi,ft as bi,g as xi,gt as Si,h as Ci,ht as wi,j as Ti,jt as Ei,lt as Di,mt as Oi,p as ki,pt as Ai,q as ji,r as Mi,st as Ni,t as Pi,u as Fi,vt as Ii,w as Li,wt as Ri,x as zi,xt as Bi,y as Vi,yt as Hi,z as Ui,zt as Wi}from"./JsonOutput-CzIGPEZQ.js";import{h as Gi,l as Ki,n as qi,p as Ji,r as Yi}from"./download-DMxOzI7b.js";import{a as Xi,i as Zi,n as Qi,o as $i,r as ea,t as ta}from"./tooltip-BUtPzKB4.js";import{n as na,t as ra}from"./button-Dh8EwhsF.js";import{st as ia}from"./dist-BtC9ym6k.js";import{d as aa,o as oa,p as sa,t as ca}from"./arrays-BqUx5USx.js";import{n as la,t as ua}from"./once-Haz_uxEL.js";import{i as da,n as fa,r as pa,t as ma}from"./strings-CReV1AYG.js";import{n as ha}from"./requests-C6_IaFh7.js";import{t as ga}from"./createLucideIcon-B7HeEoG2.js";import{D as _a,E as va,S as ya,T as ba,_ as xa,a as Sa,c as Ca,d as wa,f as Ta,g as Ea,h as Da,i as Oa,l as ka,m as Aa,n as ja,o as Ma,p as Na,r as Pa,s as Fa,t as Ia,u as La,v as Ra,w as za,x as Ba,y as Va}from"./spec-DKsAmLTi.js";import{n as Ha,r as Ua,t as Wa}from"./fileToBase64-NhpNrK5l.js";import{t as Ga}from"./LazyAnyLanguageCodeMirror-LboTfNDv.js";import{i as Ka,n as qa,o as Ja}from"./useLifecycle-BUaJcygz.js";import{a as Ya,n as Xa,o as Za,r as Qa,t as $a}from"./useBoolean-BXC4CItZ.js";import{a as eo,r as to,t as no}from"./useNumberFormatter-DHJ9s6Vk.js";import{t as ro}from"./chevron-right-CKA5zVsM.js";import{t as io}from"./code-xml-B7x62Eeh.js";import{t as ao}from"./copy-BMXKNElG.js";import{t as oo}from"./eye-off-CFuPxa9F.js";import{n as so}from"./file-headphone-rFCxFRI8.js";import{r as co,t as lo}from"./file-icons-DdGYuADJ.js";import{t as uo}from"./globe-BQf75qV_.js";import{i as fo,n as po}from"./markdown-export-0rLbaq8b.js";import{C as mo,S as ho,x as go,y as _o}from"./write-secret-modal-D6zoZgLY.js";import{n as vo,t as yo}from"./spinner-Ck-Hgfvj.js";import{a as bo,c as xo,i as So,l as Co,r as wo}from"./glide-utils-UGsrRHYj.js";import{t as To}from"./plus-C4J9gIE1.js";import{t as Eo}from"./refresh-cw-Bf-rx_aV.js";import{i as Do,n as Oo,o as ko,r as Ao,t as jo}from"./input-DEbY281O.js";import{t as Mo}from"./square-function-DkZweMAs.js";import{a as No,i as Po,r as Fo,t as Io}from"./column-preview-riSXbYe_.js";import{t as Lo}from"./square-B58Ib8Ir.js";import{t as Ro}from"./trash-2-D_HX-0qx.js";import{t as zo}from"./triangle-alert-MihykDYG.js";import{n as Bo,t as Vo}from"./es-CrFhA96G.js";import{t as Ho}from"./preload-helper-HclGiUj8.js";import{n as Uo,t as Wo}from"./use-toast-DpWHUGuF.js";import{n as Go,t as Ko}from"./paths-zcL04qUW.js";import{l as qo,r as Jo,s as Yo}from"./session-Sz5nSFku.js";import{r as Xo}from"./useTheme-C-ri8BtY.js";import{n as Zo,t as Qo}from"./context-Do8M9TDF.js";import{a as $o,i as es,o as ts,t as ns}from"./numbers-Bc-r3jsC.js";import{n as rs,r as is}from"./useDebounce-DgpSQhrP.js";import{n as as}from"./useAsyncData-Buhk-UgR.js";import{n as os,r as ss,t as cs}from"./dates-B58T85Jq.js";import{t as ls}from"./copy-icon-z8fuTE3w.js";import{t as us}from"./RenderHTML-DwhMAd9l.js";import{a as ds,i as fs,n as ps,r as ms,t as hs}from"./errors-DzO-nXy-.js";import{i as gs,r as _s,t as vs}from"./tooltip-BG35uS_N.js";import{a as ys}from"./react-icons.esm-hr79-MCS.js";import{a as bs,i as xs,n as Ss,t as Cs}from"./events-CbeVJ6OD.js";import{n as ws,r as Ts,t as Es}from"./alert-dmKwNsrp.js";import{n as Ds,t as Os}from"./error-banner-Dw5YY9wq.js";import{n as ks,t as As}from"./utils-49LGK4zG.js";import{a as js,i as Ms,n as Ns,o as Ps,r as Fs,t as Is}from"./table-DmqOOjfe.js";import{t as Ls}from"./renderShortcut-X-CJUSM8.js";import{t as Rs}from"./bundle.esm-DzY74mzC.js";import{n as zs}from"./icons-CjLa9BiH.js";import{t as Bs}from"./useDeepCompareMemoize-CLytDdMl.js";import{t as Vs}from"./pathUtils-Cryrlpma.js";import{i as Hs,n as Us,r as Ws}from"./floating-outline-DaUHnl_e.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 G=e(c(),1),Gs=e(et(),1),K=Nn(),Ks=`NavigationMenu`,[qs,Js,Ys]=Yn(Ks),[Xs,Zs,Qs]=Yn(Ks),[$s,ec]=Wn(Ks,[Ys,Qs]),[tc,nc]=$s(Ks),[rc,ic]=$s(Ks),ac=G.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]=G.useState(null),p=Yt(t,e=>f(e)),m=Xn(l),h=G.useRef(0),g=G.useRef(0),_=G.useRef(0),[v,y]=G.useState(!0),[b,x]=Rn({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:Ks}),S=G.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(``),150)},[x]),C=G.useCallback(e=>{window.clearTimeout(g.current),x(e)},[x]),w=G.useCallback(e=>{b===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(e)},o)},[b,x,o]);return G.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(_.current)},[]),(0,K.jsx)(cc,{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,K.jsx)(In.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});ac.displayName=Ks;var oc=`NavigationMenuSub`,sc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=nc(oc,n),[l,u]=Rn({prop:r,onChange:i,defaultProp:a??``,caller:oc});return(0,K.jsx)(cc,{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,K.jsx)(In.div,{"data-orientation":o,...s,ref:t})})});sc.displayName=oc;var cc=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]=G.useState(null),[g,_]=G.useState(new Map),[v,y]=G.useState(null);return(0,K.jsx)(tc,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:br(s),baseId:Un(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:Ln(u),onTriggerLeave:Ln(d),onContentEnter:Ln(f),onContentLeave:Ln(p),onItemSelect:Ln(c),onItemDismiss:Ln(l),onViewportContentChange:G.useCallback((e,t)=>{_(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:G.useCallback(e=>{_(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,K.jsx)(qs.Provider,{scope:t,children:(0,K.jsx)(rc,{scope:t,items:g,children:o})})})},lc=`NavigationMenuList`,uc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=nc(lc,n),a=(0,K.jsx)(In.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,K.jsx)(In.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,K.jsx)(qs.Slot,{scope:n,children:i.isRootMenu?(0,K.jsx)(Mc,{asChild:!0,children:a}):a})})});uc.displayName=lc;var dc=`NavigationMenuItem`,[fc,pc]=$s(dc),mc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=Un(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=G.useRef(null),c=G.useRef(null),l=G.useRef(null),u=G.useRef(()=>{}),d=G.useRef(!1),f=G.useCallback((e=`start`)=>{if(s.current){u.current();let t=Ic(s.current);t.length&&Lc(e===`start`?t:t.reverse())}},[]),p=G.useCallback(()=>{if(s.current){let e=Ic(s.current);e.length&&(u.current=Rc(e))}},[]);return(0,K.jsx)(fc,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,K.jsx)(In.li,{...i,ref:t})})});mc.displayName=dc;var hc=`NavigationMenuTrigger`,gc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=nc(hc,e.__scopeNavigationMenu),o=pc(hc,e.__scopeNavigationMenu),s=G.useRef(null),c=Yt(s,o.triggerRef,t),l=Vc(a.baseId,o.value),u=Hc(a.baseId,o.value),d=G.useRef(!1),f=G.useRef(!1),p=o.value===a.value;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(qs.ItemSlot,{scope:n,value:o.value,children:(0,K.jsx)(Fc,{asChild:!0,children:(0,K.jsx)(In.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":Bc(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:Fn(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:Fn(e.onPointerMove,Uc(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:Fn(e.onPointerLeave,Uc(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:Fn(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:Fn(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,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Jn,{"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,K.jsx)(`span`,{"aria-owns":u})]})]})});gc.displayName=hc;var _c=`NavigationMenuLink`,vc=`navigationMenu.linkSelect`,yc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,K.jsx)(Fc,{asChild:!0,children:(0,K.jsx)(In.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:Fn(e.onClick,e=>{let t=e.target,n=new CustomEvent(vc,{bubbles:!0,cancelable:!0});if(t.addEventListener(vc,e=>i?.(e),{once:!0}),Pn(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(Ec,{bubbles:!0,cancelable:!0});Pn(t,e)}},{checkForDefaultPrevented:!1})})})});yc.displayName=_c;var bc=`NavigationMenuIndicator`,xc=G.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=nc(bc,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?Gs.createPortal((0,K.jsx)(Kn,{present:n||a,children:(0,K.jsx)(Sc,{...r,ref:t})}),i.indicatorTrack):null});xc.displayName=bc;var Sc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=nc(bc,n),a=Js(n),[o,s]=G.useState(null),[c,l]=G.useState(null),u=i.orientation===`horizontal`,d=!!i.value;G.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 zc(o,f),zc(i.indicatorTrack,f),c?(0,K.jsx)(In.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}),Cc=`NavigationMenuContent`,wc=G.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=nc(Cc,e.__scopeNavigationMenu),a=pc(Cc,e.__scopeNavigationMenu),o=Yt(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,K.jsx)(Tc,{forceMount:n,...c,ref:o}):(0,K.jsx)(Kn,{present:n||s,children:(0,K.jsx)(Dc,{"data-state":Bc(s),...c,ref:o,onPointerEnter:Fn(e.onPointerEnter,i.onContentEnter),onPointerLeave:Fn(e.onPointerLeave,Uc(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});wc.displayName=Cc;var Tc=G.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=nc(Cc,e.__scopeNavigationMenu);return Gn(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Gn(()=>()=>r(e.value),[e.value,r]),null}),Ec=`navigationMenu.rootContentDismiss`,Dc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=nc(Cc,n),d=G.useRef(null),f=Yt(d,t),p=Vc(u.baseId,r),m=Hc(u.baseId,r),h=Js(n),g=G.useRef(null),{onItemDismiss:_}=u;G.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{_(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(Ec,t),()=>e.removeEventListener(Ec,t)}},[u.isRootMenu,e.value,i,_,s]);let v=G.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,K.jsx)(Mc,{asChild:!0,children:(0,K.jsx)(zn,{id:m,"aria-labelledby":p,"data-motion":v,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(Ec,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:Fn(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:Fn(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:Fn(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=Ic(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);Lc(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:Fn(e.onEscapeKeyDown,e=>{o.current=!0})})})}),Oc=`NavigationMenuViewport`,kc=G.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!nc(Oc,e.__scopeNavigationMenu).value;return(0,K.jsx)(Kn,{present:n||i,children:(0,K.jsx)(Ac,{...r,ref:t})})});kc.displayName=Oc;var Ac=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=nc(Oc,n),o=Yt(t,a.onViewportChange),s=ic(Cc,e.__scopeNavigationMenu),[c,l]=G.useState(null),[u,d]=G.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 zc(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,K.jsx)(In.div,{"data-state":Bc(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:Fn(e.onPointerEnter,a.onContentEnter),onPointerLeave:Fn(e.onPointerLeave,Uc(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,K.jsx)(Kn,{present:n||i,children:(0,K.jsx)(Dc,{...r,ref:Jt(t,e=>{i&&e&&d(e)})})},e)})})}),jc=`FocusGroup`,Mc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=nc(jc,n);return(0,K.jsx)(Xs.Provider,{scope:n,children:(0,K.jsx)(Xs.Slot,{scope:n,children:(0,K.jsx)(In.div,{dir:i.dir,...r,ref:t})})})}),Nc=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],Pc=`FocusGroupItem`,Fc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Zs(n),a=nc(Pc,n);return(0,K.jsx)(Xs.ItemSlot,{scope:n,children:(0,K.jsx)(In.button,{...r,ref:t,onKeyDown:Fn(e.onKeyDown,e=>{if([`Home`,`End`,...Nc].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),Nc.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>Lc(t)),e.preventDefault()}})})})});function Ic(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 Lc(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function Rc(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 zc(e,t){let n=Ln(t);Gn(()=>{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 Bc(e){return e?`open`:`closed`}function Vc(e,t){return`${e}-trigger-${t}`}function Hc(e,t){return`${e}-content-${t}`}function Uc(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Wc=ac,Gc=uc,Kc=mc,qc=gc,Jc=yc,Yc=xc,Xc=wc,Zc=kc,Qc=[`PageUp`,`PageDown`],$c=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],el={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},tl=`Slider`,[nl,rl,il]=Yn(tl),[al,ol]=Wn(tl,[il]),[sl,cl]=al(tl),ll=G.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=G.useRef(new Set),_=G.useRef(0),v=o===`horizontal`?fl:pl,[y=[],b]=Rn({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=G.useRef(y);function S(e){T(e,Dl(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=Ml(a),s=Nl(Math.round((e-r)/a)*a+r,o),l=Cr(s,[r,i]);b((e=[])=>{let r=wl(e,l,t);if(Al(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,K.jsx)(sl,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,K.jsx)(nl.Provider,{scope:e.__scopeSlider,children:(0,K.jsx)(nl.Slot,{scope:e.__scopeSlider,children:(0,K.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:Fn(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=Qc.includes(e.key)||e.shiftKey&&$c.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});ll.displayName=tl;var[ul,dl]=al(tl,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),fl=G.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=G.useState(null),p=Yt(t,e=>f(e)),m=G.useRef(void 0),h=Xn(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=jl([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,K.jsx)(ul,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,K.jsx)(ml,{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=el[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),pl=G.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=G.useRef(null),d=Yt(t,u),f=G.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=jl([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,K.jsx)(ul,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,K.jsx)(ml,{"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=el[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),ml=G.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=cl(tl,n);return(0,K.jsx)(In.span,{...l,ref:t,onKeyDown:Fn(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Qc.concat($c).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Fn(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:Fn(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Fn(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),hl=`SliderTrack`,gl=G.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=cl(hl,n);return(0,K.jsx)(In.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});gl.displayName=hl;var _l=`SliderRange`,vl=G.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=cl(_l,n),a=dl(_l,n),o=G.useRef(null),s=Yt(t,o),c=i.values.length,l=i.values.map(e=>Tl(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,K.jsx)(In.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})});vl.displayName=_l;var yl=`SliderThumb`,bl=G.forwardRef((e,t)=>{let n=rl(e.__scopeSlider),[r,i]=G.useState(null),a=Yt(t,e=>i(e)),o=G.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,K.jsx)(xl,{...e,ref:a,index:o})}),xl=G.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=cl(yl,n),s=dl(yl,n),[c,l]=G.useState(null),u=Yt(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=qn(c),p=o.values[r],m=p===void 0?0:Tl(p,o.min,o.max),h=El(r,o.values.length),g=f?.[s.size],_=g?Ol(g,m,s.direction):0;return G.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,K.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,K.jsx)(nl.ItemSlot,{scope:e.__scopeSlider,children:(0,K.jsx)(In.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:Fn(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,K.jsx)(Cl,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});bl.displayName=yl;var Sl=`RadioBubbleInput`,Cl=G.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=G.useRef(null),a=Yt(i,r),o=br(t);return G.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,K.jsx)(In.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});Cl.displayName=Sl;function wl(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Tl(e,t,n){let r=100/(n-t)*(e-t);return Cr(r,[0,100])}function El(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Dl(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 Ol(e,t,n){let r=e/2;return(r-jl([0,50],[0,r])(t)*n)*n}function kl(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Al(e,t){if(t>0){let n=kl(e);return Math.min(...n)>=t}return!0}function jl(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 Ml(e){return(String(e).split(`.`)[1]||``).length}function Nl(e,t){let n=10**t;return Math.round(e*n)/n}var Pl=ll,Fl=gl,Il=vl,Ll=bl,Rl=ga(`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`}]]),zl=ga(`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`}]]),Bl=ga(`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`}]]),Vl=ga(`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`}]]),Hl=ga(`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`}]]),Ul=ga(`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`}]]),Wl=ga(`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`}]]),Gl=ga(`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`}]]),Kl=ga(`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`}]]),ql=ga(`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`}]]),Jl=ga(`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`}]]),Yl=ga(`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`}]]),Xl=e(fe(),1),Zl={INSERT:`insert`,DELETE:`delete`,SUBSTITUTE:`substitute`,MATCH:`match`};function Ql(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:Zl.MATCH,position:s-1}),s--,c--):s>0&&c>0&&a[s][c]===a[s-1][c-1]+1?(o.unshift({type:Zl.SUBSTITUTE,position:s-1}),s--,c--):s>0&&a[s][c]===a[s-1][c]+1?(o.unshift({type:Zl.DELETE,position:s-1}),s--):c>0&&a[s][c]===a[s][c-1]+1&&(o.unshift({type:Zl.INSERT,position:s}),c--);return{distance:a[r][i],operations:o}}function $l(e,t,n){let r=[],i=0;for(let a of t)switch(a.type){case Zl.MATCH:r.push(e[i]),i++;break;case Zl.DELETE:i++;break;case Zl.INSERT:r.push(n);break;case Zl.SUBSTITUTE:r.push(n),i++}return r}function eu(e,t,n,r){let i=Ql(e,t,n);return{merged:$l(e,i.operations,r),edits:i}}var tu=0,nu=``;function ru(e){return e.id?e.id:e.name===`setup`?w:M.create()}function iu(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=>ru(e))||[];return{cellIds:e,sessionCellData:new Map(e.map((e,t)=>[e,null])),notebookCellData:new Map(e.map((e,n)=>[e,t?.cells[n]||au()]))}}if(!t){let t=e.cells.map(e=>ru(e));return{cellIds:t,sessionCellData:new Map(t.map((t,n)=>[t,e.cells[n]])),notebookCellData:new Map(t.map(e=>[e,au()]))}}let{merged:i,edits:a}=eu(e.cells,t.cells,(e,t)=>{let n=e.code_hash;return n?t.code_hash===n:!1},ou());a.distance>0&&U.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=ru(a);o.push(t);let s=i[e]||ou();s.id=t,n.set(t,s),r.set(t,a)}else U.warn(`Merged notebook cell is null at index`,e)}return{cellIds:o,sessionCellData:n,notebookCellData:r}}function au(){return{id:M.create(),name:nu,code:nu,code_hash:null,config:{column:null,disabled:!1,hide_code:!1}}}function ou(){return{id:M.create(),code_hash:null,console:[],outputs:[]}}function su(e,t){return{id:e,name:t.name??nu,code:t.code??nu,edited:!1,lastCodeRun:null,lastExecutionTime:null,config:{column:t.config?.column??null,disabled:t.config?.disabled??!1,hide_code:t.config?.hide_code??!1},serializedEditorState:null}}function cu(e){let t=Ze();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:tu};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:tu}}}let i=e.console||[];return{...t,outline:t.output?Oe(t.output):null,consoleOutputs:i.map(e=>e.type===`streamMedia`?{channel:`media`,data:e.data,mimetype:e.mimetype,timestamp:tu}:{channel:e.name===`stderr`?`stderr`:`stdout`,data:e.text,mimetype:e.mimetype??`text/plain`,timestamp:tu})}}function lu(e,t){let{cellIds:n,sessionCellData:r,notebookCellData:i}=iu(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]=su(e,n)),o[e]=cu(t)}return{cellIds:Ke.from([n]),cellData:a,cellRuntime:o,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var q=bt(),uu=Object.freeze({left:0,top:0,width:16,height:16}),du=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fu=Object.freeze({...uu,...du}),pu=Object.freeze({...fu,body:``,hidden:!1}),mu=Object.freeze({width:null,height:null}),hu=Object.freeze({...mu,...du});function gu(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 _u=/[\s,]+/;function vu(e,t){t.split(_u).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}var yu={...hu,preserveAspectRatio:``};function bu(e){let t={...yu},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=gu(n(`rotate`,``)),vu(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function xu(e,t){for(let n in yu)if(e[n]!==t[n])return!0;return!1}var Su=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cu=(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&&!wu(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&&!wu(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!wu(e,n)?null:e}return null},wu=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function Tu(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 Eu(e,t){let n=Tu(e,t);for(let r in pu)r in du?r in e&&!(r in n)&&(n[r]=du[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Du(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 Ou(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Eu(r[e]||i[e],a)}return o(t),n.forEach(o),Eu(e,a)}function ku(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=Du(e);for(let i in r){let a=r[i];a&&(t(i,Ou(e,i,a)),n.push(i))}return n}var Au={provider:``,aliases:{},not_found:{},...uu};function ju(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Mu(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!ju(e,Au))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!ju(t,pu))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]||!ju(t,pu))return null}return t}var Nu=Object.create(null);function Pu(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Fu(e,t){let n=Nu[e]||(Nu[e]=Object.create(null));return n[t]||(n[t]=Pu(e,t))}function Iu(e,t){return Mu(t)?ku(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Lu(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function Ru(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(Nu)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(Nu[e]||{})).forEach(t=>{let r=Fu(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var zu=!1;function Bu(e){return typeof e==`boolean`&&(zu=e),zu}function Vu(e){let t=typeof e==`string`?Cu(e,!0,zu):e;if(t){let e=Fu(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function Hu(e,t){let n=Cu(e,!0,zu);if(!n)return!1;let r=Fu(n.provider,n.prefix);return t?Lu(r,n.name,t):(r.missing.add(n.name),!0)}function Uu(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),zu&&!t&&!e.prefix){let t=!1;return Mu(e)&&(e.prefix=``,ku(e,(e,n)=>{Hu(e,n)&&(t=!0)})),t}let n=e.prefix;return wu({provider:t,prefix:n,name:`a`})?!!Iu(Fu(t,n),e):!1}function Wu(e){return!!Vu(e)}function Gu(e){let t=Vu(e);return t&&{...fu,...t}}function Ku(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]=Fu(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 qu(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Ju(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||qu([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Yu=0;function Xu(e,t,n){let r=Yu++,i=qu.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 Zu=Object.create(null);function Qu(e,t){Zu[e]=t}function $u(e){return Zu[e]||Zu[``]}function ed(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Cu(e,t,n):e;i&&r.push(i)}),r}var td={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nd(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 rd(e){let t={...td,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=nd(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 id(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 ad=Object.create(null),od=[`https://api.simplesvg.com`,`https://api.unisvg.com`],sd=[];od.length>0;)od.length===1||Math.random()>.5?sd.push(od.shift()):sd.push(od.pop());ad[``]=id({resources:[`https://api.iconify.design`].concat(sd)});function cd(e,t){let n=id(t);return n!==null&&(ad[e]=n,!0)}function ld(e){return ad[e]}function ud(){return Object.keys(ad)}function dd(){}var fd=Object.create(null);function pd(e){if(!fd[e]){let t=ld(e);if(!t)return;fd[e]={config:t,redundancy:rd(t)}}return fd[e]}function md(e,t,n){let r,i;if(typeof e==`string`){let t=$u(e);if(!t)return n(void 0,424),dd;i=t.send;let a=pd(e);a&&(r=a.redundancy)}else{let t=id(e);if(t){r=rd(t);let n=$u(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),dd):r.query(t,i,n)().abort}function hd(){}function gd(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ju(e)}))}function _d(e){let t=[],n=[];return e.forEach(e=>{(e.match(Su)?t:n).push(e)}),{valid:t,invalid:n}}function vd(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(!Iu(e,n).length){r();return}}catch(e){console.error(e)}r(),gd(e)}function yd(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function bd(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)){yd(e.loadIcons(r,n,t),t=>{vd(e,r,t)});return}if(i){r.forEach(r=>{yd(i(r,n,t),t=>{vd(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=_d(r);if(o.length&&vd(e,o,null),!a.length)return;let s=n.match(Su)?$u(t):null;if(!s){vd(e,a,null);return}s.prepare(t,n,a).forEach(n=>{md(t,n,t=>{vd(e,n.icons,t)})})}))}var xd=(e,t)=>{let n=Ku(ed(e,!0,Bu()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,hd)}),()=>{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(Fu(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=Fu(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&&bd(e,t)}),t?Xu(t,n,i):hd},Sd=e=>new Promise((t,n)=>{let r=typeof e==`string`?Cu(e,!0):e;if(!r){n(e);return}xd([r||e],i=>{if(i.length&&r){let e=Vu(r);if(e){t({...fu,...e});return}}n(e)})});function Cd(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function wd(e,t){if(typeof e==`object`)return{data:Cd(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=Cd(e);if(t)return{data:t,value:e}}let n=Cu(e,!0,!0);if(!n)return{value:e};let r=Vu(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:xd([n],()=>t(e,n,Vu(n)))}}var Td=!1;try{Td=navigator.vendor.indexOf(`Apple`)===0}catch{}function Ed(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(Td||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var Dd=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Od=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kd(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(Dd);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Od.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 Ad(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 jd(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Md(e,t,n){let r=Ad(e);return jd(r.defs,t+r.content+n)}var Nd=e=>e===`unset`||e===`undefined`||e===`none`;function Pd(e,t){let n={...fu,...e},r={...hu,...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=Md(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=kd(d,c/l)):(u=o===`auto`?c:o,d=s===null?kd(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{Nd(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 Fd(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 Id(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function Ld(e){return`data:image/svg+xml,`+Id(e)}function Rd(e){return`url("`+Ld(e)+`")`}var zd=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Bd(e){zd=e}function Vd(){return zd}function Hd(e,t){let n=ld(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 Ud(e){return e===404}var Wd=(e,t,n)=>{let r=[],i=Hd(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 Gd(e){if(typeof e==`string`){let t=ld(e);if(t)return t.path}return`/`}var Kd={prepare:Wd,send:(e,t,n)=>{if(!zd){n(`abort`,424);return}let r=Gd(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;zd(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Ud(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 qd(e,t,n){Fu(n||``,t).loadIcons=e}function Jd(e,t,n){Fu(n||``,t).loadIcon=e}var Yd=`data-style`,Xd=``;function Zd(e){Xd=e}function Qd(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Yd));n||(n=document.createElement(`style`),n.setAttribute(Yd,Yd),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+Xd}function $d(){Qu(``,Kd),Bu(!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`||!Uu(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;cd(e,r)||console.error(n)}catch{console.error(n)}}}}return{enableCache:e=>{},disableCache:e=>{},iconLoaded:Wu,iconExists:Wu,getIcon:Gu,listIcons:Ru,addIcon:Hu,addCollection:Uu,calculateSize:kd,buildIcon:Pd,iconToHTML:Fd,svgToURL:Rd,loadIcons:xd,loadIcon:Sd,addAPIProvider:cd,setCustomIconLoader:Jd,setCustomIconsLoader:qd,appendCustomStyle:Zd,_api:{getAPIConfig:ld,setAPIModule:Qu,sendAPIQuery:md,setFetch:Bd,getFetch:Vd,listAPIProviders:ud}}}var ef={"background-color":`currentColor`},tf={"background-color":`transparent`},nf={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},rf={"-webkit-mask":ef,mask:ef,background:tf};for(let e in rf){let t=rf[e];for(let n in nf)t[e+`-`+n]=nf[n]}function af(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function of(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=Rd(Fd(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:af(a.width),height:af(a.height),...n?ef:tf};for(let e in c)s.setProperty(e,c[e]);return r}var sf;function cf(){try{sf=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{sf=null}}function lf(e){return sf===void 0&&cf(),sf?sf.createHTML(e):e}function uf(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=lf(Fd(e.body,n)),t.firstChild}function df(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function ff(e,t){let n=t.icon.data,r=t.customisations,i=Pd(n,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);let a=t.renderedMode,o;switch(a){case`svg`:o=uf(i);break;default:o=of(i,{...fu,...n},a===`mask`)}let s=df(e);s?o.tagName===`SPAN`&&s.tagName===o.tagName?s.setAttribute(`style`,o.getAttribute(`style`)):e.replaceChild(o,s):e.appendChild(o)}function pf(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function mf(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`);Qd(e,t),this._state=pf({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,Qd(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{}ff(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=bu(this);(e.attrMode!==n||xu(e.customisations,r)||!df(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=wd(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=pf(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=df(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,bu(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=Ed(e.data.body,n),i=this._state.inline;ff(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=$d();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{enableCache:hf,disableCache:gf,iconLoaded:_f,iconExists:vf,getIcon:yf,listIcons:bf,addIcon:xf,addCollection:Sf,calculateSize:Cf,buildIcon:wf,iconToHTML:Tf,svgToURL:Ef,loadIcons:Df,loadIcon:Of,setCustomIconLoader:kf,setCustomIconsLoader:Af,addAPIProvider:jf,_api:Mf}=mf()||$d(),Nf=()=>((0,q.c)(1),null),Pf=(0,G.memo)(e=>{let t=(0,q.c)(3),{children:n}=e,{theme:r}=Xo(),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,G.useLayoutEffect)(i,a),n});Pf.displayName=`ThemeProvider`;var Ff=e=>{let t=(0,q.c)(3),{variables:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,K.jsx)(`div`,{className:`contents`,style:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},If=()=>{let e=(0,q.c)(25),[t,r]=n(Gt);if(t===null)return null;let i;e[0]===t?i=e[1]:(i=async()=>{try{await navigator.clipboard.writeText(t),Wo({title:`Copied to clipboard`,description:`Error details have been copied to your clipboard.`})}catch{Wo({title:`Failed to copy`,description:`Could not copy to clipboard.`,variant:`danger`})}},e[0]=t,e[1]=i);let a=i,o;e[2]===r?o=e[3]:(o=()=>{r(null)},e[2]=r,e[3]=o);let s=o,c=Lf,l;e[4]===s?l=e[5]:(l=e=>!e&&s(),e[4]=s,e[5]=l);let u;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsxs)(or,{children:[(0,K.jsxs)(cr,{className:`flex items-center gap-2 text-destructive`,children:[(0,K.jsx)(ze,{className:`h-5 w-5`}),`Kernel Startup Failed`]}),(0,K.jsx)(ar,{children:`The kernel failed to start. This usually happens when the package manager can't install your notebook's dependencies.`})]}),e[6]=u):u=e[6];let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:`Error Details`}),e[7]=d):d=e[7];let f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(ao,{className:`h-3 w-3`}),e[8]=f):f=e[8];let p;e[9]===a?p=e[10]:(p=(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[d,(0,K.jsxs)(ra,{variant:`outline`,size:`xs`,onClick:a,className:`flex items-center gap-1`,children:[f,`Copy`]})]}),e[9]=a,e[10]=p);let m;e[11]===t?m=e[12]:(m=(0,K.jsx)(`pre`,{className:`bg-muted p-4 rounded-md text-sm font-mono overflow-auto max-h-80`,children:t}),e[11]=t,e[12]=m);let h;e[13]!==p||e[14]!==m?(h=(0,K.jsxs)(`div`,{className:`my-4 overflow-hidden`,children:[p,m]}),e[13]=p,e[14]=m,e[15]=h):h=e[15];let g;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,K.jsxs)(ra,{variant:`outline`,onClick:c,className:`flex items-center gap-2`,children:[(0,K.jsx)(fo,{className:`h-4 w-4`}),`Return to Home`]}),e[16]=g):g=e[16];let _;e[17]===s?_=e[18]:(_=(0,K.jsxs)(ur,{children:[g,(0,K.jsx)(lr,{onClick:s,children:`Dismiss`})]}),e[17]=s,e[18]=_);let v;e[19]!==_||e[20]!==h?(v=(0,K.jsxs)(sr,{className:`max-w-2xl`,children:[u,h,_]}),e[19]=_,e[20]=h,e[21]=v):v=e[21];let y;return e[22]!==v||e[23]!==l?(y=(0,K.jsx)(dr,{open:!0,onOpenChange:l,children:v}),e[22]=v,e[23]=l,e[24]=y):y=e[24],y};function Lf(){let e=document.baseURI.split(`?`)[0];window.open(e,`_self`)}var Rf=e=>{let t=(0,q.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=De(i);let t=e.textContent||e.innerText||``;try{await navigator.clipboard.writeText(t),Wo({title:`Copied to clipboard`,description:`Traceback has been copied to your clipboard.`})}catch{Wo({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,K.jsx)(cr,{className:`text-destructive`,children:a}),t[4]=a,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsx)(ar,{children:`Click the traceback to select and copy.`}),t[6]=u):u=t[6];let d;t[7]===l?d=t[8]:(d=(0,K.jsxs)(or,{children:[l,u]}),t[7]=l,t[8]=d);let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.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,K.jsx)(ao,{className:`h-3 w-3`}),t[10]=p):p=t[10];let m;t[11]===s?m=t[12]:(m=(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[f,(0,K.jsxs)(ra,{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=us({html:i}),t[13]=i,t[14]=h);let g;t[15]===h?g=t[16]:(g=(0,K.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,K.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,K.jsx)(ur,{children:(0,K.jsx)(lr,{onClick:r,children:`Close`})}),t[20]=r,t[21]=v);let y;t[22]!==_||t[23]!==v||t[24]!==d?(y=(0,K.jsxs)(sr,{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,K.jsx)(dr,{open:n,onOpenChange:c,children:y}),t[26]=n,t[27]=y,t[28]=c,t[29]=b):b=t[29],b},zf=()=>{let e=(0,q.c)(6),[t,r]=n(We);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,K.jsx)(Rf,{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},Bf=()=>{let e=(0,q.c)(5),{toasts:t}=Uo(),n;e[0]===t?n=e[1]:(n=t.map(Uf),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(Vf,{}),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,K.jsxs)(te,{children:[n,r]}),e[3]=n,e[4]=i),i},Vf=Bn(({container:e})=>(0,Gs.createPortal)((0,K.jsx)(Hn,{children:(0,K.jsx)(Te,{})}),e??document.body)),Hf=e=>{let t=(0,q.c)(23),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({toastTitle:a,toastDescription:i,action:n,variant:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=(0,G.useRef)(null),c=!!i&&!n&&o===`danger`,u;t[6]===a?u=t[7]:(u=a&&(0,K.jsx)(l,{children:a}),t[6]=a,t[7]=u);let d;t[8]===i?d=t[9]:(d=i&&(0,K.jsx)(me,{ref:s,children:i}),t[8]=i,t[9]=d);let f;t[10]!==u||t[11]!==d?(f=(0,K.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-1`,children:[u,d]}),t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==c||t[14]!==i?(p=c&&(0,K.jsx)(ls,{tooltip:`Copy error`,ariaLabel:`Copy error`,className:`h-4 w-4`,buttonClassName:W(`absolute right-8 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity`,`hover:text-foreground focus:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group-hover:opacity-100`,`group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus-visible:group-[.destructive]:ring-red-400 focus-visible:group-[.destructive]:ring-offset-red-600`),value:()=>s.current?.innerText??(typeof i==`string`?i:``)}),t[13]=c,t[14]=i,t[15]=p):p=t[15];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,K.jsx)(le,{}),t[16]=m):m=t[16];let h;return t[17]!==n||t[18]!==r||t[19]!==f||t[20]!==p||t[21]!==o?(h=(0,K.jsxs)(de,{variant:o,...r,children:[f,n,p,m]}),t[17]=n,t[18]=r,t[19]=f,t[20]=p,t[21]=o,t[22]=h):h=t[22],h};function Uf(e){let{id:t,title:n,description:r,action:i,variant:a,...o}=e;return(0,K.jsx)(Hf,{toastTitle:n,toastDescription:r,action:i,variant:a,...o},t)}var Wf=e=>{let t=(0,q.c)(5),{children:n}=e,i=r(Mt),a;t[0]===i?a=t[1]:(a=si(i),t[0]=i,t[1]=a);let o;return t[2]!==n||t[3]!==a?(o=(0,K.jsx)(Zo,{locale:a,children:n}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o},Gf=Ya(()=>Ho(()=>import(`./home-page-BLd6rnbk.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]),import.meta.url)),Kf=Ya(()=>Ho(()=>import(`./run-page-9pl8qhQR.js`),__vite__mapDeps([128,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,129,103,94,93,79,108,130,95,131,92,132,74,75,76,133,134,135,136,78,80,137,138,139,140,141,82,89,142,143,104,144,90,145,146,147,148,109,110,149,150,151,106,152,119,120,121,153,154,155,156,157,122,158,159,111,160,161,112,162,163,164,165,166,86,167,113,168,107,169,170,171,172,173,174,175,176,177,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,100,277,278,279,280,281,282,283,284,285,125]),import.meta.url)),qf=Ya(()=>Ho(()=>import(`./edit-page-Vqd9NedM.js`),__vite__mapDeps([286,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,276,100,277,103,94,129,93,79,108,130,95,131,137,135,138,139,140,146,147,148,278,279,280,99,101,102,104,92,75,76,89,80,105,106,107,109,110,111,112,113,114,115,74,132,133,134,136,78,141,82,142,143,144,90,145,149,150,151,152,119,120,121,153,154,155,156,157,122,158,159,160,161,162,163,164,165,166,86,167,168,169,170,171,172,173,174,175,176,177,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,287,288,289,88,123,290,291,292,293,294,85,295,87,296,124,297,116,298,299,285,300,301,125,126,302,127,303,304,97,305,306,83,84,307,308,281,309,310,311,282,117,118,312,313,275,283,284,98,314,315,316,317,318,319,320,321,322,323]),import.meta.url)),Jf=Ya(()=>Ho(()=>import(`./gallery-page-C3pBpHlY.js`),__vite__mapDeps([324,1,3,4,74,21,18,30,16,17,24,25,48,2,19,89,33,54,6,26,34,35,55,41,40,56,8,9,10,11,69,23,71,94,7,111,29,115]),import.meta.url));function Yf(e){switch(e){case`home`:Gf.preload();break;case`gallery`:Jf.preload();break;case`read`:Kf.preload();break;default:qf.preload()}}var Xf=(0,G.memo)(()=>{let e=(0,q.c)(12),[t]=jt(),[n]=Ct(),r;e[0]===t.display.code_editor_font_size?r=e[1]:(r=Qf(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=nn();return e===`home`?(0,K.jsx)(Gf.Component,{}):e===`gallery`?(0,K.jsx)(Jf.Component,{}):e===`read`?(0,K.jsx)(Kf.Component,{appConfig:n}):(0,K.jsx)(qf.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,K.jsx)(Wf,{children:o()}),e[7]=o,e[8]=c);let l;return e[9]!==s||e[10]!==c?(l=(0,K.jsx)(Zf,{children:(0,K.jsx)(Ff,{variables:s,children:c})}),e[9]=s,e[10]=c,e[11]=l):l=e[11],l});Xf.displayName=`MarimoApp`;var Zf=(0,G.memo)(e=>{let t=(0,q.c)(6),{children:n}=e,r,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(Bf,{}),i=(0,K.jsx)(Nf,{}),a=(0,K.jsx)(If,{}),o=(0,K.jsx)(zf,{}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):(r=t[0],i=t[1],a=t[2],o=t[3]);let s;return t[4]===n?s=t[5]:(s=(0,K.jsx)(jn,{children:(0,K.jsx)(G.Suspense,{children:(0,K.jsx)(Zi,{children:(0,K.jsx)(Hr,{controller:Ri,children:(0,K.jsx)(Wf,{children:(0,K.jsxs)(_o,{children:[n,r,i,a,o]})})})})})}),t[4]=n,t[5]=s),s});Zf.displayName=`Providers`;function Qf(e){return`${e/16}rem`}function $f(){Yo(e=>{e.delete($t.accessToken)})}var ep={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`,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 tp(e,t){let n=ua(async e=>{a.set(gn,{state:cn.CONNECTING}),await e.init()});function r(e,r){let i=ep[r];return(async(...a)=>{let o=t();if(!o.isLazy)return e(...a);switch(i){case`serverOnly`:return e(...a);case`dropRequest`:U.debug(`Dropping request: ${r}, since not connected to a kernel.`);return;case`throwError`:throw new fs;case`waitForConnectionOpen`:return await sn(),await wn(),e(...a);case`startConnectionWithoutKernel`:case`startConnection`:return await n(o),await sn(),i===`startConnection`&&await wn(),e(...a);default:throw Error(`Unknown action for "${r}"`)}})}return Zt.mapValues(e,(e,t)=>r(e,t))}var np=`download`;function rp(){let e=a.get(Xe);if(!e)return;let t=Go.basename(e);return Ji.withoutExtension(t)}function ip(e){let t=rp();return t?`${t}.${e}`:`${np}.${e}`}function ap(e){let t=po[e??`pymdown`];return ip(t)}function op(e){return{body:e,bodySerializer:e=>e}}var{handleExportResponse:sp,handleResponse:cp,handleResponseReturnNull:lp}=yn;function up(){let e=la(()=>{let e=pn();return xn(e)}),t=()=>pn().sessionHeaders(),n=()=>({header:t()});return{sendComponentValues:t=>e().POST(`/api/kernel/set_ui_element_value`,{body:t,params:n()}).then(lp),sendModelValue:t=>e().POST(`/api/kernel/set_model_value`,{body:t,params:n()}).then(lp),sendRestart:()=>e().POST(`/api/kernel/restart_session`,{params:n()}).then(lp),sendDocumentTransaction:async t=>(await sn(),e().POST(`/api/document/transaction`,{body:t,params:n()}).then(lp)),sendRename:t=>e().POST(`/api/kernel/rename`,{body:t,params:n()}).then(lp),sendSave:t=>e().POST(`/api/kernel/save`,{body:t,parseAs:`text`,params:n()}).then(lp),sendCopy:t=>e().POST(`/api/kernel/copy`,{body:t,parseAs:`text`,params:n()}).then(lp),sendFormat:t=>e().POST(`/api/kernel/format`,{body:t}).then(cp),sendInterrupt:()=>e().POST(`/api/kernel/interrupt`,{params:n()}).then(lp),sendShutdown:()=>e().POST(`/api/kernel/shutdown`).then(lp),sendRun:async t=>(await sn(),e().POST(`/api/kernel/run`,{body:t,params:n()}).then(lp)),sendRunScratchpad:async t=>(await sn(),e().POST(`/api/kernel/scratchpad/run`,{body:t,params:n()}).then(lp)),sendInstantiate:async t=>(await sn(),e().POST(`/api/kernel/instantiate`,{body:t,params:n()}).then(lp)),sendDeleteCell:t=>e().POST(`/api/kernel/delete`,{body:t,params:n()}).then(lp),sendCodeCompletionRequest:async t=>(await sn(),e().POST(`/api/kernel/code_autocomplete`,{body:t,params:n()}).then(lp)),saveUserConfig:t=>e().POST(`/api/kernel/save_user_config`,{body:t}).then(lp),saveAppConfig:t=>e().POST(`/api/kernel/save_app_config`,{body:t,parseAs:`text`,params:n()}).then(lp),saveCellConfig:t=>e().POST(`/api/kernel/set_cell_config`,{body:t,params:n()}).then(lp),sendFunctionRequest:t=>e().POST(`/api/kernel/function_call`,{body:t,params:n()}).then(lp),sendStdin:t=>e().POST(`/api/kernel/stdin`,{body:t,params:n()}).then(lp),sendInstallMissingPackages:t=>e().POST(`/api/kernel/install_missing_packages`,{body:t,params:n()}).then(lp),readCode:async()=>(await sn(),e().POST(`/api/kernel/read_code`,{params:n()}).then(cp)),readSnippets:async()=>(await sn(),e().GET(`/api/documentation/snippets`,{params:n()}).then(cp)),previewDatasetColumn:t=>e().POST(`/api/datasources/preview_column`,{body:t,params:n()}).then(lp),previewSQLTable:t=>e().POST(`/api/datasources/preview_sql_table`,{body:t,params:n()}).then(lp),previewSQLTableList:t=>e().POST(`/api/datasources/preview_sql_table_list`,{body:t,params:n()}).then(lp),previewSQLSchemaList:t=>e().POST(`/api/datasources/preview_sql_schema_list`,{body:t,params:n()}).then(lp),previewDataSourceConnection:t=>e().POST(`/api/datasources/preview_datasource_connection`,{body:t,params:n()}).then(lp),discoverDataSources:t=>e().POST(`/api/datasources/discover`,{body:t,params:n()}).then(lp),validateSQL:t=>e().POST(`/api/sql/validate`,{body:t,params:n()}).then(lp),openFile:async t=>(await sn(),await e().POST(`/api/files/open`,{body:t}).then(lp),null),getUsageStats:async()=>(await sn(),e().GET(`/api/usage`).then(cp)),getEnvironmentInfo:()=>e().GET(`/api/environment`).then(cp),sendPdb:t=>e().POST(`/api/kernel/pdb/pm`,{body:t,params:n()}).then(lp),sendSetBreakpoints:t=>e().POST(`/api/kernel/pdb/breakpoints`,{body:t,params:n()}).then(lp),getFileRoots:async()=>(await sn(),e().GET(`/api/files/roots`).then(cp)),sendListFiles:async t=>(await sn(),e().POST(`/api/files/list_files`,{body:t}).then(cp)),sendSearchFiles:async t=>(await sn(),e().POST(`/api/files/search`,{body:t}).then(cp)),sendCreateFileOrFolder:async t=>{await sn();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`,op(n)).then(cp)},sendDeleteFileOrFolder:async t=>e().POST(`/api/files/delete`,{body:t}).then(cp),sendCopyFileOrFolder:async t=>e().POST(`/api/files/copy`,{body:t}).then(cp),sendRenameFileOrFolder:async t=>e().POST(`/api/files/move`,{body:t}).then(cp),sendUpdateFile:async t=>(await sn(),e().POST(`/api/files/update`,{body:t}).then(cp)),sendFileDetails:async t=>(await sn(),e().POST(`/api/files/file_details`,{body:t}).then(cp)),openTutorial:t=>e().POST(`/api/home/tutorial/open`,{body:t}).then(cp),getRecentFiles:()=>e().POST(`/api/home/recent_files`).then(cp),getWorkspaceFiles:t=>e().POST(`/api/home/workspace_files`,{body:t}).then(cp),getRunningNotebooks:()=>e().POST(`/api/home/running_notebooks`).then(cp),shutdownSession:t=>e().POST(`/api/home/shutdown_session`,{body:t}).then(cp),getExportAvailability:()=>e().GET(`/api/export/availability`).then(cp),installExportRequirements:t=>e().POST(`/api/export/requirements/install`,{body:t,params:n()}).then(cp),exportAsHTML:async t=>e().POST(`/api/export/html`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`html`)})),exportAsMarkdown:async t=>e().POST(`/api/export/markdown`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ap(t.flavor)})),exportAsScript:async t=>e().POST(`/api/export/script`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`script.py`)})),exportAsIPYNB:async t=>e().POST(`/api/export/ipynb`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`ipynb`)})),exportAsPDF:async t=>e().POST(`/api/export/pdf`,{body:t,parseAs:`blob`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`pdf`)})),autoExportAsHTML:async t=>e().POST(`/api/export/auto_export/html`,{body:t,params:n()}).then(lp),autoExportAsMarkdown:async t=>e().POST(`/api/export/auto_export/markdown`,{body:t,params:n()}).then(lp),autoExportAsIPYNB:async t=>e().POST(`/api/export/auto_export/ipynb`,{body:t,params:n()}).then(lp),updateCellOutputs:async t=>e().POST(`/api/export/update_cell_outputs`,{body:t,params:n()}).then(lp),addPackage:t=>e().POST(`/api/packages/add`,{body:t}).then(cp),removePackage:t=>e().POST(`/api/packages/remove`,{body:t}).then(cp),getPackageList:async()=>(await en(),e().GET(`/api/packages/list`).then(cp)),getDependencyTree:async()=>(await en(),e().GET(`/api/packages/tree`).then(cp)),listSecretKeys:async t=>(await sn(),e().POST(`/api/secrets/keys`,{body:t,params:n()}).then(lp)),writeSecret:async t=>e().POST(`/api/secrets/create`,{body:t,params:n()}).then(lp),invokeAiTool:async t=>e().POST(`/api/ai/invoke_tool`,{body:t,params:n()}).then(cp),clearCache:async()=>e().POST(`/api/cache/clear`,{body:{},params:n()}).then(lp),getCacheInfo:async()=>e().POST(`/api/cache/info`,{body:{},params:n()}).then(lp),listStorageEntries:t=>e().POST(`/api/storage/list_entries`,{body:t,params:n()}).then(lp),downloadStorage:t=>e().POST(`/api/storage/download`,{body:t,params:n()}).then(lp)}}var dp=`static-notebook`;function fp(){Wo({id:dp,once:!0,title:`Static notebook`,description:`This notebook is not connected to a kernel. Any interactive elements will not work.`})}function pp(){let e=()=>{throw Error(`Unreachable. Expected to be in run mode`)};return{sendComponentValues:async()=>(fp(),U.log(`Updating UI elements is not supported in static mode`),null),sendModelValue:async()=>(U.log(`Updating model values is not supported in static mode`),null),sendInstantiate:async()=>(U.log(`Viewing as static notebook`),null),sendFunctionRequest:async()=>(fp(),U.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,getDependencyTree:e,listSecretKeys:e,writeSecret:e,invokeAiTool:e,clearCache:e,getCacheInfo:e,listStorageEntries:e,downloadStorage:e}}function mp(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`,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 fs){if(a.get(un))return;let e=Wo({title:`Kernel Not Connected`,description:`You need to connect to a kernel to perform this action.`,variant:`default`,action:(0,K.jsx)(hp,{onConnect:()=>e.dismiss()})});throw U.error(`Failed to handle request: ${r}`,n),n}if(n instanceof ms&&n.status===403)throw U.warn(`Request refused, connection is read-only: ${r}`),n;let i=t[e],o=ds(n);throw i&&Wo({title:i,description:o,variant:`danger`}),U.error(`Failed to handle request: ${r}`,n),n}}}return n}var hp=e=>{let t=(0,q.c)(9),{onConnect:n}=e,i=ln(),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,K.jsx)(yo,{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,K.jsxs)(ra,{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 gp(){let e;return e=an()?Vt.INSTANCE:fn()?pp():tp(up(),()=>pn()),mp(e)}var _p=G.forwardRef((e,t)=>{let n=(0,q.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=W(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,K.jsx)(Tp,{}),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,K.jsxs)(Wc,{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});_p.displayName=Wc.displayName;var vp=Mn(`group flex list-none gap-1`,{variants:{orientation:{horizontal:`flex items-center`,vertical:`flex flex-col`}},defaultVariants:{orientation:`horizontal`}}),yp=G.forwardRef((e,t)=>{let n=(0,q.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=W(vp({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,K.jsx)(Gc,{ref:t,className:o,...a}),n[7]=a,n[8]=t,n[9]=o,n[10]=s):s=n[10],s});yp.displayName=Gc.displayName;var bp=Kc,xp=Mn(`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`}}),Sp=G.forwardRef((e,t)=>{let n=(0,q.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=W(xp(),`group`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(ys,{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,K.jsxs)(qc,{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});Sp.displayName=qc.displayName;var Cp=G.forwardRef((e,t)=>{let n=(0,q.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=W(`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,K.jsx)(Xc,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});Cp.displayName=Xc.displayName;var wp=Jc,Tp=G.forwardRef((e,t)=>{let n=(0,q.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=W(`absolute left-0 top-full flex justify-center`),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=W(`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,K.jsx)(`div`,{className:a,children:(0,K.jsx)(Zc,{className:o,ref:t,...i})}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});Tp.displayName=Zc.displayName;var Ep=G.forwardRef((e,t)=>{let n=(0,q.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=W(`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,K.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,K.jsx)(Yc,{ref:t,className:a,...i,children:o}),n[6]=i,n[7]=t,n[8]=a,n[9]=s):s=n[9],s});Ep.displayName=Yc.displayName;var Dp=e=>{let t=(0,q.c)(23),{item:n,preserveQueryParams:r,target:i}=e,a=G.useRef(null),[o,s]=G.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=us({html:n.label}),t[1]=n.label,t[2]=l);let u;t[3]===l?u=t[4]:(u=(0,K.jsx)(Sp,{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,K.jsx)(Np,{label:e.label,href:r(e.href),target:i(e.href),children:e.description&&us({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,K.jsx)(Cp,{className:`w-auto`,children:(0,K.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,K.jsx)(yp,{children:(0,K.jsxs)(bp,{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,K.jsx)(Tp,{}),t[17]=m):m=t[17];let h;t[18]===o?h=t[19]:(h=(0,K.jsx)(Ap,{anchorRef:a,open:o,children:m}),t[18]=o,t[19]=h);let g;return t[20]!==p||t[21]!==h?(g=(0,K.jsxs)(Wc,{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},Op=Bn(({container:e,children:t})=>(0,Gs.createPortal)(t,e??document.body)),kp=8,Ap=e=>{let t=(0,q.c)(18),{anchorRef:n,open:r,children:i}=e,[a,o]=G.useState(null),s=G.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-kp;o({left:Math.max(kp,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]),G.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],Xa(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),G.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,K.jsx)(Op,{children:(0,K.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},jp=class{tagName=`marimo-nav-menu`;menuItemValidator=R({label:z(),href:z(),description:z().nullish()});menuItemGroupValidator=R({label:z(),items:V(this.menuItemValidator)});validator=R({items:V(nt([this.menuItemValidator,this.menuItemGroupValidator])),orientation:gt([`horizontal`,`vertical`])});render(e){return(0,K.jsx)(Mp,{...e.data})}},Mp=e=>{let t=(0,q.c)(13),{items:n,orientation:r}=e,i=Pp,a=Fp,o=Ip,s;t[0]===r?s=t[1]:(s=e=>`items`in e?r===`horizontal`?(0,K.jsx)(Dp,{item:e,preserveQueryParams:o,target:a},e.label):(0,K.jsxs)(bp,{children:[(0,K.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:us({html:e.label})}),(0,K.jsx)(yp,{className:`ml-4 auto-collapse-nav`,orientation:r,children:e.items.map(e=>(0,K.jsx)(G.Fragment,{children:i((0,K.jsx)(wp,{href:o(e.href),target:a(e.href),className:xp({orientation:r}),children:us({html:e.label})},e.label),e.description)},e.label))})]},e.label):(0,K.jsx)(bp,{children:(0,K.jsx)(wp,{href:o(e.href),target:a(e.href),className:xp({orientation:r}),children:us({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,K.jsx)(yp,{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,K.jsx)(_p,{orientation:r,children:u}),t[10]=r,t[11]=u,t[12]=d):d=t[12],d},Np=G.forwardRef((e,t)=>{let n=(0,q.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=W(`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=us({html:a}),n[7]=a,n[8]=c);let l;n[9]===c?l=n[10]:(l=(0,K.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,K.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,K.jsx)(`li`,{children:(0,K.jsx)(wp,{asChild:!0,children:(0,K.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});Np.displayName=`ListItem`;function Pp(e,t){return t?(0,K.jsx)(ta,{delayDuration:200,content:us({html:t}),children:e}):e}function Fp(e){return e.startsWith(`http`)?`_blank`:`_self`}function Ip(e){let t=new URL(globalThis.location.href);return Jo({href:e,queryParams:t.search,keys:[$t.filePath]})}function Lp(e,t){return e===t?!0:e==null||t==null?!1:Array.isArray(e)&&Array.isArray(t)?oa(e,t):typeof e==`object`&&typeof t==`object`&&Rp(e,t)}function Rp(e,t){return Object.keys(e).length===Object.keys(t).length&&Zt.keys(e).every(n=>e[n]===t[n])}function zp(e,t){if(!window?.customElements){U.warn(`Custom elements not supported`);return}if(window.customElements.get(e)){U.warn(`Custom element ${e} already defined`);return}window.customElements.define(e,t)}function Bp(e,t){if(!t)return[];let n=e;if(wi(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:pa(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:pa(t)}case`date`:case`datetime`:case`time`:{let e=t.type===`date`?cs:t.type===`time`?ss:os;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:pa(t)}}case`boolean`:return[{column_id:n,operator:t.operator,type:`condition`,negate:!1}];default:pa(t)}}function Vp(e){return{type:`group`,operator:`and`,children:e.flatMap(e=>Bp(e.id,e.value)),negate:!1}}var Hp=0,Up=1,Wp=2,Gp=4;function Kp(e){return()=>e}function qp(e){e()}function Jp(e,t){return n=>e(t(n))}function Yp(e,t){return()=>e(t)}function Xp(e,t){return n=>e(t,n)}function Zp(e){return e!==void 0}function Qp(...e){return()=>{e.map(qp)}}function $p(){}function em(e,t){return t(e),e}function tm(e,t){return t(e)}function nm(...e){return e}function rm(e,t){return e(Up,t)}function im(e,t){e(Hp,t)}function am(e){e(Wp)}function om(e){return e(Gp)}function J(e,t){return rm(e,Xp(t,Hp))}function sm(e,t){let n=e(Up,e=>{n(),t(e)});return n}function cm(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function lm(e,t){return e===t}function um(e=lm){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Y(e){return t=>n=>{e(n)&&t(n)}}function X(e){return t=>Jp(t,e)}function dm(e){return t=>()=>{t(e)}}function Z(e,...t){let n=gm(...t);return((t,r)=>{switch(t){case Wp:am(e);return;case Up:return rm(e,n(r))}})}function fm(e,t){return n=>r=>{n(t=e(t,r))}}function pm(e){return t=>n=>{e>0?e--:t(n)}}function mm(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function hm(...e){let t=Array(e.length),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;rm(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 gm(...e){return t=>e.reduceRight(tm,t)}function _m(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case Up:return a?n===a?void 0:(r(),n=a,t=rm(e,a),t):(r(),$p);case Wp:r(),n=null;return}}}function Q(e){let t=e,n=ym();return((e,r)=>{switch(e){case Hp:t=r;break;case Up:r(t);break;case Gp:return t}return n(e,r)})}function vm(e,t){return em(Q(t),t=>J(e,t))}function ym(){let e=[];return((t,n)=>{switch(t){case Hp:e.slice().forEach(e=>{e(n)});return;case Wp:e.splice(0,e.length);return;case Up:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function bm(e){return em(ym(),t=>J(e,t))}function xm(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Sm(),singleton:n}}var Sm=()=>Symbol();function Cm(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 wm(...e){let t=ym(),n=Array(e.length),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;rm(e,e=>{n[a]=e,r|=o,r===i&&im(t,n)})}),function(e,a){switch(e){case Wp:am(t);return;case Up:return r===i&&a(n),rm(t,a)}}}function $(e,t=lm){return Z(e,um(t))}function Tm(...e){return function(t,n){switch(t){case Wp:return;case Up:return Qp(...e.map(e=>rm(e,n)))}}}var Em=(e=>(e[e.DEBUG=0]=`DEBUG`,e[e.INFO=1]=`INFO`,e[e.WARN=2]=`WARN`,e[e.ERROR=3]=`ERROR`,e))(Em||{}),Dm={0:`debug`,3:`error`,1:`log`,2:`warn`},Om=()=>typeof globalThis>`u`?window:globalThis,km=xm(()=>{let e=Q(3);return{log:Q((t,n,r=1)=>{r>=(Om().VIRTUOSO_LOG_LEVEL??om(e))&&console[Dm[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0});function Am(e,t,n){return jm(e,t,n).callbackRef}function jm(e,t,n){let r=G.useRef(null),i=e=>{},a=G.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 Mm(e,t,n,r,i,a,o,s,c){return jm(G.useCallback(n=>{let c=Nm(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;!l.dataset.virtuosoScroller;)l=l.parentElement;let u=l.lastElementChild.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollLeft:o.scrollTop:u?s?d.scrollX||d.document.documentElement.scrollLeft:d.scrollY||d.document.documentElement.scrollTop:s?l.scrollLeft:l.scrollTop,p=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,m=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(f,0),viewportHeight:m}),a?.(s?Pm(`column-gap`,getComputedStyle(n).columnGap,i):Pm(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function Nm(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),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},Em.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 Pm(e,t,n){return t!==`normal`&&!(t!=null&&t.endsWith(`px`))&&n(`${e} was not resolved to pixel value correctly`,t,Em.WARN),t===`normal`?0:parseInt(t??`0`,10)}function Fm(e,t,n){let r=G.useRef(null),i=G.useCallback(n=>{if(!(n!=null&&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={offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=jm(i,!0,n),s=G.useCallback(()=>{i(o.current)},[i,o]);return G.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 Im=xm(()=>{let e=ym(),t=ym(),n=Q(0),r=ym(),i=Q(0),a=ym(),o=ym(),s=Q(0),c=Q(0),l=Q(0),u=Q(0),d=ym(),f=ym(),p=Q(!1),m=Q(!1),h=Q(!1);return J(Z(e,X(({scrollTop:e})=>e)),t),J(Z(e,X(({scrollHeight:e})=>e)),o),J(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}),Lm={lvl:0};function Rm(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 zm(e){return e===Lm}function Bm(e,t){if(!zm(e))return t===e.k?e.v:t<e.k?Bm(e.l,t):Bm(e.r,t)}function Vm(e,t,n=`k`){if(zm(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=Vm(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Vm(e.l,t,n)}function Hm(e,t,n){return zm(e)?$m(t,n,1):t===e.k?Ym(e,{k:t,v:n}):t<e.k?eh(Ym(e,{l:Hm(e.l,t,n)})):eh(Ym(e,{r:Hm(e.r,t,n)}))}function Um(){return Lm}function Wm(e,t,n){if(zm(e))return[];let r=Vm(e,t)[0];return rh(qm(e,r,n))}function Gm(e,t){if(zm(e))return Lm;let{k:n,l:r,r:i}=e;if(t===n){if(zm(r))return i;if(zm(i))return r;{let[t,n]=Qm(r);return Jm(Ym(e,{k:t,l:Xm(r),v:n}))}}return Jm(t<n?Ym(e,{l:Gm(r,t)}):Ym(e,{r:Gm(i,t)}))}function Km(e){return zm(e)?[]:[...Km(e.l),{k:e.k,v:e.v},...Km(e.r)]}function qm(e,t,n){if(zm(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(qm(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(qm(a,t,n))),s}function Jm(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(Zm(t))return th(Ym(e,{lvl:n-1}));if(!zm(t)&&!zm(t.r))return Ym(t.r,{l:Ym(t,{r:t.r.l}),lvl:n,r:Ym(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(Zm(e))return nh(Ym(e,{lvl:n-1}));if(!zm(r)&&!zm(r.l)){let t=r.l,i=Zm(t)?r.lvl-1:r.lvl;return Ym(t,{l:Ym(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:nh(Ym(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function Ym(e,t){return $m(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 Xm(e){return zm(e.r)?e.l:Jm(Ym(e,{r:Xm(e.r)}))}function Zm(e){return zm(e)||e.lvl>e.r.lvl}function Qm(e){return zm(e.r)?[e.k,e.v]:Qm(e.r)}function $m(e,t,n,r=Lm,i=Lm){return{k:e,l:r,lvl:n,r:i,v:t}}function eh(e){return nh(th(e))}function th(e){let{l:t}=e;return!zm(t)&&t.lvl===e.lvl?Ym(t,{r:Ym(e,{l:t.r})}):e}function nh(e){let{lvl:t,r:n}=e;return!zm(n)&&!zm(n.r)&&n.lvl===t&&n.r.lvl===t?Ym(n,{l:Ym(e,{r:n.l}),lvl:t+1}):e}function rh(e){return Rm(e,({k:e,v:t})=>({index:e,value:t}))}function ih(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ah(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var oh=xm(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function sh(e,t,n){return e[ch(e,t,n)]}function ch(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 lh(e,t,n,r){let i=ch(e,t,r),a=ch(e,n,r,i);return e.slice(i,a+1)}function uh(e,t){return Math.round(e.getBoundingClientRect()[t])}function dh(e){return!zm(e.groupOffsetTree)}function fh({index:e},t){return t===e?0:t<e?-1:1}function ph(){return{groupIndices:[],groupOffsetTree:Um(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Um()}}function mh(e,t){let n=zm(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),zm(e)){e=Hm(e,0,i);continue}let o=Wm(e,a-1,t+1);if(o.some(Eh(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=Gm(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=Hm(e,t+1,a));c&&(e=Hm(e,a,i))}return[e,n]}function hh(e){return typeof e.groupIndex<`u`}function gh({offset:e},t){return t===e?0:t<e?-1:1}function _h(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=sh(t,e,fh),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function vh(e,t){if(!dh(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function yh(e,t,n){if(hh(e))return t.groupIndices[e.groupIndex]+1;{let r=vh(e.index===`LAST`?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function bh(e,t,n,r=0){return r>0&&(t=Math.max(t,sh(e,r,fh).offset)),Rm(lh(e,t,n,gh),Th)}function xh(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,Em.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&zm(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>Hm(Hm(t,n,e),n+1,r),o)}else[o,s]=mh(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=wh(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Hm(e,t,_h(t,d,i)),Um()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function Sh(e){return Km(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i?i.k-1:1/0,size:t,startIndex:e}})}function Ch(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 wh(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t!==0){c=ch(i,t-1,fh),s=i[c].offset;let e=Vm(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===Vm(n,t)[1]&&--c,i=i.slice(0,c+1)}else i=[];for(let{start:e,value:c}of Wm(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 Th(e){return{index:e.index,value:e}}function Eh(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 Dh={offsetHeight:`height`,offsetWidth:`width`},Oh=xm(([{log:e},{recalcInProgress:t}])=>{let n=ym(),r=ym(),i=vm(r,0),a=ym(),o=ym(),s=Q(0),c=Q([]),l=Q(void 0),u=Q(void 0),d=Q(void 0),f=Q(void 0),p=Q((e,t)=>uh(e,Dh[t])),m=Q(void 0),h=Q(0),g=ph(),_=vm(Z(n,hm(c,e,h),fm(xh,g),um()),g),v=vm(Z(c,um(),fm((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),X(({prev:e})=>e)),[]);J(Z(c,Y(e=>e.length>0),hm(_,h),X(([e,t,n])=>{let r=e.reduce((e,r,i)=>Hm(e,r,_h(r,t.offsetTree,n)||i),Um());return{...t,groupIndices:e,groupOffsetTree:r}})),_),J(Z(r,hm(_),Y(([e,{lastIndex:t}])=>e<t),X(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),J(l,u);let y=vm(Z(l,X(e=>e===void 0)),!0);J(Z(u,Y(e=>e!==void 0&&zm(om(_).sizeTree)),X(e=>{let t=om(d),n=om(c).length>0;return t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),J(Z(f,Y(e=>e!==void 0&&e.length>0&&zm(om(_).sizeTree)),X(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),J(Z(c,hm(d,u),Y(([,e,t])=>e!==void 0&&t!==void 0),X(([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=bm(Z(n,hm(_),fm(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),X(e=>e.changed)));rm(Z(s,fm((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),X(e=>e.diff)),e=>{let{groupIndices:n}=om(_);if(e>0)im(t,!0),im(a,e+Ch(e,n));else if(e<0){let t=om(v);t.length>0&&(e-=Ch(-e,t)),im(o,e)}}),rm(Z(s,hm(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},Em.ERROR)});let x=bm(a);J(Z(a,hm(_),X(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=Bm(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=Km(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 Km(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=bm(Z(o,hm(_,h),X(([e,{offsetTree:t},n])=>_h(-e,t,n))));return J(Z(o,hm(_,h),X(([e,t,n])=>{if(t.groupIndices.length>0){if(zm(t.sizeTree))return t;let r=Um(),i=om(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=Km(t.sizeTree).reduce((t,{k:n,v:r})=>Hm(t,Math.max(0,n+e),r),r),a!==-e){let n=Bm(t.sizeTree,s);r=Hm(r,0,n);let i=Vm(t.sizeTree,-e+1)[1];r=Hm(r,1,i)}return{...t,sizeTree:r,...wh(t.offsetTree,0,r,n)}}{let r=Km(t.sizeTree).reduce((t,{k:n,v:r})=>Hm(t,Math.max(0,n+e),r),Um());return{...t,sizeTree:r,...wh(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}},nm(km,oh),{singleton:!0});function kh(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var Ah=xm(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=ym(),o=ym(),s=bm(Z(a,X(kh)));return J(Z(s,X(e=>e.totalCount)),n),J(Z(s,X(e=>e.groupIndices)),e),J(Z(wm(i,t,r),Y(([e,t])=>dh(t)),X(([e,t,n])=>Vm(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),um(),X(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},nm(Oh,Im)),jh=xm(([{log:e}])=>{let t=Q(!1),n=bm(Z(t,Y(e=>e),um()));return rm(t,t=>{t&&om(e)(`props updated`,{},Em.DEBUG)}),{didMount:n,propsReady:t}},nm(km),{singleton:!0}),Mh=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function Nh(e){let t=typeof e==`number`?{index:e}:e;return t.align||=`start`,(!t.behavior||!Mh)&&(t.behavior=`auto`),t.offset||=0,t}var Ph=xm(([{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=ym(),m=ym(),h=Q(0),g=null,_=null,v=null;function y(){g&&=(g(),null),v&&=(v(),null),_&&=(clearTimeout(_),null),im(c,!1)}return J(Z(p,hm(n,d,r,h,s,o,f),hm(e,a,i),X(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=Nh(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=yh(b,n,w),E=_h(T,n.offsetTree,d)+o;x===`end`?(E+=f+Vm(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+Vm(n.sizeTree,T)[1]-r+h)/2:E-=a,C&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},Em.DEBUG),im(p,e)):(im(m,!0),l(`list did not change, scroll successful`,{},Em.DEBUG))};if(y(),S===`smooth`){let e=!1;v=rm(t,t=>{e||=t}),g=sm(u,()=>{D(e)})}else g=sm(Z(t,Fh(150)),D);return _=setTimeout(()=>{y()},1200),im(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},Em.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},nm(Oh,Im,km),{singleton:!0});function Fh(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function Ih(e,t){e==0?t():requestAnimationFrame(()=>{Ih(e-1,t)})}function Lh(e,t){let n=t-1;return typeof e==`number`?e:e.index===`LAST`?n:e.index}var Rh=xm(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=Q(!0),c=Q(0),l=Q(!0);return J(Z(o,hm(c),Y(([e,t])=>!!t),dm(!1)),s),J(Z(o,hm(c),Y(([e,t])=>!!t),dm(!1)),l),rm(Z(wm(t,o),hm(s,n,e,l),Y(([[,e],t,{sizeTree:n},r,i])=>e&&(!zm(n)||Zp(r))&&!t&&!i),hm(c)),([,e])=>{sm(i,()=>{im(l,!0)}),Ih(4,()=>{sm(r,()=>{im(s,!0)}),im(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},nm(Oh,Im,Ph,jh),{singleton:!0});function zh(e,t){return Math.abs(e-t)<1.01}var Bh=`up`,Vh=`down`,Hh=`none`,Uh={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Wh=0,Gh=xm(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=Q(!1),s=Q(!0),c=ym(),l=ym(),u=Q(4),d=Q(Wh),f=vm(Z(Tm(Z($(i),pm(1),dm(!0)),Z($(i),pm(1),dm(!1),cm(100))),um()),!1),p=vm(Z(Tm(Z(n,dm(!0)),Z(n,dm(!1),cm(200))),um()),!1);J(Z(wm($(i),$(d)),X(([e,t])=>e<=t),um()),s),J(Z(s,mm(50)),l);let m=bm(Z(wm(r,$(a),$(t),$(e),$(u)),fm((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}},Uh),um((e,t)=>e&&e.atBottom===t.atBottom))),h=vm(Z(r,fm((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(zh(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{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}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Y(e=>e.changed),X(e=>e.jump)),0);J(Z(m,X(e=>e.atBottom)),o),J(Z(o,mm(50)),c);let g=Q(Vh);J(Z(r,X(({scrollTop:e})=>e),um(),fm((e,t)=>om(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Bh:Vh,prevScrollTop:t},{direction:Vh,prevScrollTop:0}),X(e=>e.direction)),g),J(Z(r,mm(50),dm(Hh)),g);let _=Q(0);return J(Z(f,Y(e=>!e),dm(0)),_),J(Z(i,mm(100),hm(f),Y(([e,t])=>t),fm(([e,t],[n])=>[t,n],[0,0]),X(([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:_}},nm(Im)),Kh=`top`,qh=`bottom`,Jh=`none`;function Yh(e,t,n){return typeof e==`number`?n===Bh&&t===Kh||n===Vh&&t===qh?e:0:n===Bh?t===Kh?e.main:e.reverse:t===qh?e.main:e.reverse}function Xh(e,t){return typeof e==`number`?e:e[t]??0}var Zh=xm(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=ym(),o=Q(0),s=Q(0),c=Q(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:vm(Z(wm($(r),$(i),$(n),$(a,ah),$(c),$(o),$(t),$(e),$(s)),X(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=Jh,m=Xh(l,Kh),h=Xh(l,qh);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=Bh),i<e-f+t+h&&(p=Vh),p===Jh?null:[Math.max(u-n-Yh(a,Kh,p)-m,0),u-f-s+t+Yh(a,qh,p)+h]}),Y(e=>e!=null),um(ah)),[0,0])}},nm(Im),{singleton:!0});function Qh(e,t,n){if(dh(t)){let r=vh(e,t);return[{index:Vm(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 $h={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function eg(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:ng(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:ng(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function tg(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=Lh(t,s);return eg(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function ng(e,t,n){if(e.length===0)return[];if(!dh(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=Wm(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 rg(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var ig=xm(([{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=Q([]),g=Q(0),_=ym(),v=Q(0);J(a.topItemsIndexes,h);let y=vm(Z(wm(p,m,$(c,ah),$(i),$(r),$(l),u,$(h),$(t),$(n),$(v),e),Y(([e,t,,n,,,,,,,,r])=>{let i=r&&r.length!==n;return e&&!t&&!i}),X(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=om(g);if(n===0)return{...$h,totalCount:n};if(e===0&&t===0)return m===0?{...$h,totalCount:n}:tg(m,i,r,s,c,u||[]);if(zm(p))return m>0?null:eg(Qh(Lh(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 Wm(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 eg([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=bh(f,e,t,_);if(v.length===0)return null;let y=n-1,b=em([],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=rg(l,Kh),S=rg(l,qh);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=Wm(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=Wm(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return eg(b,h,n,c,d,s)}),Y(e=>e!==null),um()),$h);J(Z(e,Y(Zp),X(e=>e?.length)),i),J(Z(y,X(e=>e.topListHeight)),d),J(d,s),J(Z(y,X(e=>[e.top,e.bottom])),o),J(Z(y,X(e=>e.items)),_);let b=bm(Z(y,Y(({items:e})=>e.length>0),hm(i,e),Y(([{items:e},t])=>e[e.length-1].originalIndex===t-1),X(([,e,t])=>[e-1,t]),um(ah),X(([e])=>e))),x=bm(Z(y,mm(200),Y(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),X(({items:e})=>e[0].index),um()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:bm(Z(y,Y(({items:e})=>e.length>0),X(({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}}),um(ih))),startReached:x,topItemsIndexes:h,...f}},nm(Oh,Ah,Zh,Rh,Ph,Gh,jh,oh),{singleton:!0}),ag=xm(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=ym(),o=vm(Z(wm(n,e,r,t,i),X(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return J($(o),a),{totalListHeight:o,totalListHeightChanged:a}},nm(Im,ig),{singleton:!0}),og=xm(([{viewportHeight:e},{totalListHeight:t}])=>{let n=Q(!1);return{alignToBottom:n,paddingTopAddition:vm(Z(wm(n,e,t),Y(([e])=>e),X(([,e,t])=>Math.max(0,e-t)),mm(0),um()),0)}},nm(Im,ag),{singleton:!0}),sg=xm(()=>({context:Q(null)})),cg=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,behavior:r}:e>a?{...i,align:n??`end`,behavior:r}:null,lg=xm(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=ym();return J(Z(u,hm(t,c,n,a,i,r,s),hm(e),X(([[e,t,n,r,i,a,s,c],l])=>{let{align:u,behavior:d,calculateViewLocation:f=cg,done:p,...m}=e,h=yh(e,t,r-1),g=_h(h,t.offsetTree,l)+i+a,_=g+Vm(t.sizeTree,h)[1],v=c+a,y=c+n-s,b=f({itemBottom:_,itemTop:g,locationParams:{align:u,behavior:d,...m},viewportBottom:y,viewportTop:v});return b?p&&sm(Z(o,Y(e=>!e),pm(om(o)?1:2)),p):p?.(),b}),Y(e=>e!==null)),l),{scrollIntoView:u}},nm(Oh,Im,Ph,ig,km),{singleton:!0});function ug(e){return e?e===`smooth`?`smooth`:`auto`:!1}var dg=(e,t)=>typeof e==`function`?ug(e(t)):t&&ug(e),fg=xm(([{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=Q(!1),h=ym(),g=null;function _(e){im(o,{align:`end`,behavior:e,index:`LAST`})}rm(Z(wm(Z($(t),pm(1)),c),hm($(m),a,s,d),X(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=dg(n,r||a),o&&=!!s),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),Y(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g&&=(g(),null),om(n)?requestAnimationFrame(()=>{om(u)(`following output to `,{totalCount:r},Em.DEBUG),_(t)}):g=sm(e,()=>{om(u)(`following output to `,{totalCount:r},Em.DEBUG),_(t),g=null})});function v(e){let t=sm(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&!g&&(om(u)(`scrolling to bottom due to increased size`,{},Em.DEBUG),_(`auto`))});setTimeout(t,100)}rm(Z(wm($(m),t,l),Y(([e,,t])=>e&&t),fm(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),Y(({refreshed:e})=>e),hm(m,t)),([,e])=>{om(s)&&v(e!==!1)}),rm(h,()=>{v(om(m)!==!1)}),rm(wm($(m),i),([e,t])=>{e&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=Q(null),b=ym();return J(Tm(Z($(r),X(e=>e?.length??0)),Z($(t))),b),rm(Z(wm(Z(b,pm(1)),c),hm($(y),s,d,f),X(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),Y(e=>!!e),mm(0)),t=>{g&&=(g(),null),om(n)?requestAnimationFrame(()=>{om(u)(`scrolling into view`,{}),im(p,t)}):g=sm(e,()=>{om(u)(`scrolling into view`,{}),im(p,t),g=null})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},nm(Oh,Gh,Ph,Rh,jh,km,Im,sg,lg)),pg=xm(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(J(Z(s,hm(a),Y(([,e])=>e!==0),hm(i,r,t,n,e),X(([[,e],t,n,r,i,a=[]])=>tg(e,t,n,r,i,a))),o),{}),nm(Oh,Rh,ig,jh),{singleton:!0}),mg=xm(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=Q(0);return rm(Z(e,hm(r),Y(([,e])=>e!==0),X(([,e])=>({top:e}))),e=>{sm(Z(n,pm(1),Y(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{im(t,e)})})}),{initialScrollTop:r}},nm(jh,Im,ig),{singleton:!0}),hg=xm(([{scrollVelocity:e}])=>{let t=Q(!1),n=ym(),r=Q(!1);return J(Z(e,hm(r,t,n),Y(([e,t])=>!!t),X(([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}),um()),t),rm(Z(wm(t,e,n),hm(r)),([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},nm(Gh),{singleton:!0}),gg=xm(([{scrollContainerState:e,scrollTo:t}])=>{let n=ym(),r=ym(),i=ym(),a=Q(!1),o=Q(void 0);return J(Z(wm(n,r),X(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),J(Z(t,hm(r),X(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},nm(Im)),_g=xm(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=ym(),u=Q(void 0),d=Q(null),f=Q(null);return J(s,d),J(c,f),rm(Z(l,hm(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=Sh(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),J(Z(u,Y(Zp),X(vg)),i),J(Z(a,hm(u),Y(([,e])=>e!==void 0),um(),X(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},nm(Oh,Im,Rh,jh,gg));function vg(e){return{align:`start`,index:0,offset:e.scrollTop}}var yg=xm(([{topItemsIndexes:e}])=>{let t=Q(0);return J(Z(t,Y(e=>e>=0),X(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},nm(ig));function bg(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var xg=bg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Sg=xm(([{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 J(k,T.scrollSeekRangeChanged),J(Z(T.windowViewportRect,X(e=>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}},nm(Oh,Rh,Im,_g,fg,ig,Ph,xm(([{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=bm(Z(c,hm(o),fm(([,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]),Y(([e])=>e!==0),hm(r,s,n,i,p,m),Y(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===Bh),X(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},Em.DEBUG),e))));function g(n){n>0?(im(t,{behavior:`auto`,top:-n}),im(e,0)):(im(e,0),im(t,{behavior:`auto`,top:-n}))}return rm(Z(h,hm(e,a)),([t,n,r])=>{r&&xg()?im(e,n-t):g(-t)}),rm(Z(wm(vm(a,!1),e,m),Y(([e,t,n])=>!e&&!n&&t!==0),X(([e,t])=>t),mm(1)),g),J(Z(d,X(e=>({top:-e}))),t),rm(Z(l,hm(f,u),X(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);{let n=0,i=Bm(r,0),o=0,s=0;for(;o<e;){o++,n+=i;let r=t.length===s+1?1/0:t[s+1]-t[s]-1;o+r>e&&(n-=i,r=e-o+1),o+=r,n+=a(r),s++}return n}})),n=>{im(e,n),requestAnimationFrame(()=>{im(t,{top:n}),requestAnimationFrame(()=>{im(e,0),im(m,!1)})})}),{deviation:e}},nm(Im,Gh,ig,Oh,km,oh)),yg,Ah,xm(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),nm(Zh,pg,jh,hg,ag,mg,og,gg,lg,km,sg))));function Cg(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 wg=typeof document<`u`?G.useLayoutEffect:G.useEffect;function Tg(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=G.createContext({});function c(e,n){e.propsReady&&im(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];im(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];im(i,n[r])}e.propsReady&&im(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];im(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=_m(e[t.events[r]]),n),{})}return{Component:G.forwardRef((t,a)=>{let{children:d,...f}=t,[p]=G.useState(()=>em(Cm(e),e=>{c(e,f)})),[m]=G.useState(Yp(u,p));wg(()=>{for(let e of o)e in f&&rm(m[e],f[e]);return()=>{Object.values(m).map(am)}},[f,m,p]),wg(()=>{c(p,f)}),G.useImperativeHandle(a,Kp(l(p)));let h=n;return(0,K.jsx)(s.Provider,{value:p,children:n?(0,K.jsx)(h,{...Cg([...r,...i,...o],f),children:d}):d})}),useEmitter:(e,t)=>{let n=G.useContext(s)[e];wg(()=>rm(n,t),[t,n])},useEmitterValue:e=>{let t=G.useContext(s)[e],[n,r]=G.useState(Yp(om,t));return wg(()=>rm(t,e=>{e!==n&&r(Kp(e))}),[t,n]),n},usePublisher:e=>{let t=G.useContext(s);return G.useCallback(n=>{im(t[e],n)},[t,e])}}}var Eg=G.createContext(void 0),Dg=G.createContext(void 0),Og=typeof document<`u`?G.useLayoutEffect:G.useEffect;function kg(e){return`self`in e}function Ag(e){return`body`in e}function jg(e,t,n,r=$p,i,a){let o=G.useRef(null),s=G.useRef(null),c=G.useRef(null),l=G.useCallback(n=>{let r,i,o,l=n.target;if(Ag(l)||kg(l)){let e=kg(l)?l:l.defaultView;o=a?e.scrollX:e.scrollY,r=a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a?e.innerWidth:e.innerHeight}else o=a?l.scrollLeft:l.scrollTop,r=a?l.scrollWidth:l.scrollHeight,i=a?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync?u():Gs.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]);G.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?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;kg(r)?(u=Math.max(uh(r.document.documentElement,a?`width`:`height`),a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a?r.innerWidth:r.innerHeight,d=a?window.scrollX:window.scrollY):(u=r[a?`scrollWidth`:`scrollHeight`],l=uh(r,a?`width`:`height`),d=r[a?`scrollLeft`:`scrollTop`]);let f=u-l;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),zh(l,u)||n.top===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}function d(e){a&&(e={behavior:e.behavior,left:e.top}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}var Mg=`-webkit-sticky`,Ng=`sticky`,Pg=bg(()=>{if(typeof document>`u`)return Ng;let e=document.createElement(`div`);return e.style.position=Mg,e.style.position===Mg?Mg:Ng});function Fg(e){return e}var Ig=xm(([e,t])=>({...e,...t}),nm(Sg,xm(()=>{let e=Q(e=>`Item ${e}`),t=Q(e=>`Group ${e}`),n=Q({}),r=Q(Fg),i=Q(`div`),a=Q($p),o=(e,t=null)=>vm(Z(n,X(t=>t[e]),um()),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`)}}))),Lg=({height:e})=>(0,K.jsx)(`div`,{style:{height:e}}),Rg={overflowAnchor:`none`,position:Pg(),zIndex:1},zg={overflowAnchor:`none`},Bg={...zg,display:`inline-block`,height:`100%`},Vg=G.memo(function({showTopList:e=!1}){let t=r_(`listState`),n=i_(`sizeRanges`),r=r_(`useWindowScroll`),i=r_(`customScrollParent`),a=i_(`windowScrollContainerState`),o=i_(`scrollContainerState`),s=i||r?a:o,c=r_(`itemContent`),l=r_(`context`),u=r_(`groupContent`),d=r_(`trackItemSizes`),f=r_(`itemSize`),p=r_(`log`),m=i_(`gap`),h=r_(`horizontalDirection`),{callbackRef:g}=Mm(n,f,d,e?$p:s,p,m,i,h,r_(`skipAnimationFrameInResizeObserver`)),[_,v]=G.useState(0);n_(`deviation`,e=>{_!==e&&v(e)});let y=r_(`EmptyPlaceholder`),b=r_(`ScrollSeekPlaceholder`)||Lg,x=r_(`ListComponent`),S=r_(`ItemComponent`),C=r_(`GroupComponent`),w=r_(`computeItemKey`),T=r_(`isSeeking`),E=r_(`groupIndices`).length>0,D=r_(`alignToBottom`),O=r_(`initialItemFinalLocationReached`),k=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginLeft:_===0?D?`auto`:0:_,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y?(0,K.jsx)(y,{...Kg(y,l)}):(0,K.jsx)(x,{...Kg(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,G.createElement)(b,{...Kg(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,G.createElement)(C,{...Kg(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Rg},u(e.index,l)):(0,G.createElement)(S,{...Kg(S,l),...qg(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?Bg:zg},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),Hg={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},Ug={outline:`none`,overflowX:`auto`,position:`relative`},Wg=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:{}}),Gg={position:Pg(),top:0,width:`100%`,zIndex:1};function Kg(e,t){if(typeof e!=`string`)return{context:t}}function qg(e,t){return{item:typeof e==`string`?void 0:t}}var Jg=G.memo(function(){let e=r_(`HeaderComponent`),t=i_(`headerHeight`),n=r_(`HeaderFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,r_(`skipAnimationFrameInResizeObserver`)),i=r_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null}),Yg=G.memo(function(){let e=r_(`FooterComponent`),t=i_(`footerHeight`),n=r_(`HeaderFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,r_(`skipAnimationFrameInResizeObserver`)),i=r_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null});function Xg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return G.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}=jg(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,K.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?Ug:Hg,...i},tabIndex:0,...o,...Kg(c,a),children:r})})}function Zg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return G.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=G.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=jg(s,l,c,t(`scrollerRef`),f);return Og(()=>(h.current=f||p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,K.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?{}:{height:u+d}},...o,...Kg(c,a),children:r})})}var Qg=({children:e})=>{let t=G.useContext(Eg),n=i_(`viewportHeight`),r=i_(`fixedItemHeight`),i=r_(`alignToBottom`),a=r_(`horizontalDirection`),o=Am(G.useMemo(()=>Jp(n,e=>uh(e,a?`width`:`height`)),[n,a]),!0,r_(`skipAnimationFrameInResizeObserver`));return G.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:Wg(i),children:e})},$g=({children:e})=>{let t=G.useContext(Eg),n=i_(`windowViewportRect`),r=i_(`fixedItemHeight`),i=Fm(n,r_(`customScrollParent`),r_(`skipAnimationFrameInResizeObserver`)),a=r_(`alignToBottom`);return G.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Wg(a),children:e})},e_=({children:e})=>{let t=r_(`TopItemListComponent`)||`div`,n=r_(`headerHeight`),r={...Gg,marginTop:`${n}px`},i=r_(`context`);return(0,K.jsx)(t,{style:r,...Kg(t,i),children:e})},{Component:t_,useEmitter:n_,useEmitterValue:r_,usePublisher:i_}=Tg(Ig,{required:{},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`}},G.memo(function(e){let t=r_(`useWindowScroll`),n=r_(`topItemsIndexes`).length>0,r=r_(`customScrollParent`),i=r_(`context`);return(0,K.jsxs)(r||t?o_:a_,{...e,context:i,children:[n&&(0,K.jsx)(e_,{children:(0,K.jsx)(Vg,{showTopList:!0})}),(0,K.jsxs)(r||t?$g:Qg,{children:[(0,K.jsx)(Jg,{}),(0,K.jsx)(Vg,{}),(0,K.jsx)(Yg,{})]})]})})),a_=Xg({useEmitter:n_,useEmitterValue:r_,usePublisher:i_}),o_=Zg({useEmitter:n_,useEmitterValue:r_,usePublisher:i_}),s_=t_,c_=xm(([e,t])=>({...e,...t}),nm(Sg,xm(()=>{let e=Q(e=>(0,K.jsxs)(`td`,{children:[`Item $`,e]})),t=Q(null),n=Q(e=>(0,K.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=Q(null),i=Q(null),a=Q({}),o=Q(Fg),s=Q($p),c=(e,t=null)=>vm(Z(a,X(t=>t[e]),um()),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`)}}))),l_=({height:e})=>(0,K.jsx)(`tr`,{children:(0,K.jsx)(`td`,{style:{height:e}})}),u_=({height:e})=>(0,K.jsx)(`tr`,{children:(0,K.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),d_={overflowAnchor:`none`},f_={position:Pg(),zIndex:2,overflowAnchor:`none`},p_=G.memo(function({showTopList:e=!1}){let t=y_(`listState`),n=y_(`computeItemKey`),r=y_(`firstItemIndex`),i=y_(`context`),a=y_(`isSeeking`),o=y_(`fixedHeaderHeight`),s=y_(`groupIndices`).length>0,c=y_(`itemContent`),l=y_(`groupContent`),u=y_(`ScrollSeekPlaceholder`)||l_,d=y_(`GroupComponent`),f=y_(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]),m=(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,G.createElement)(u,{...Kg(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,G.createElement)(d,{...Kg(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...f_,top:o}},l(t.index,i)):(0,G.createElement)(f,{...Kg(f,i),...qg(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?{...f_,top:o+g}:d_},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))});return(0,K.jsx)(K.Fragment,{children:m})}),m_=G.memo(function(){let e=y_(`listState`),t=y_(`topItemsIndexes`).length>0,n=b_(`sizeRanges`),r=y_(`useWindowScroll`),i=y_(`customScrollParent`),a=b_(`windowScrollContainerState`),o=b_(`scrollContainerState`),s=i||r?a:o,c=y_(`trackItemSizes`),{callbackRef:l,ref:u}=Mm(n,y_(`itemSize`),c,s,y_(`log`),void 0,i,!1,y_(`skipAnimationFrameInResizeObserver`)),[d,f]=G.useState(0);v_(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=y_(`EmptyPlaceholder`),m=y_(`FillerRow`)||u_,h=y_(`TableBodyComponent`),g=y_(`paddingTopAddition`),_=y_(`statefulTotalCount`),v=y_(`context`);if(_===0&&p)return(0,K.jsx)(p,{...Kg(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,K.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,K.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,K.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...Kg(h,v),children:[S,t&&(0,K.jsx)(p_,{showTopList:!0}),(0,K.jsx)(p_,{}),C]})}),h_=({children:e})=>{let t=G.useContext(Eg),n=b_(`viewportHeight`),r=b_(`fixedItemHeight`),i=Am(G.useMemo(()=>Jp(n,e=>uh(e,`height`)),[n]),!0,y_(`skipAnimationFrameInResizeObserver`));return G.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:Wg(!1),children:e})},g_=({children:e})=>{let t=G.useContext(Eg),n=b_(`windowViewportRect`),r=b_(`fixedItemHeight`),i=Fm(n,y_(`customScrollParent`),y_(`skipAnimationFrameInResizeObserver`));return G.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Wg(!1),children:e})},{Component:__,useEmitter:v_,useEmitterValue:y_,usePublisher:b_}=Tg(c_,{required:{},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`}},G.memo(function(e){let t=y_(`useWindowScroll`),n=y_(`customScrollParent`),r=b_(`fixedHeaderHeight`),i=b_(`fixedFooterHeight`),a=y_(`fixedHeaderContent`),o=y_(`fixedFooterContent`),s=y_(`context`),c=Am(G.useMemo(()=>Jp(r,e=>uh(e,`height`)),[r]),!0,y_(`skipAnimationFrameInResizeObserver`)),l=Am(G.useMemo(()=>Jp(i,e=>uh(e,`height`)),[i]),!0,y_(`skipAnimationFrameInResizeObserver`)),u=n||t?S_:x_,d=n||t?g_:h_,f=y_(`TableComponent`),p=y_(`TableHeadComponent`),m=y_(`TableFooterComponent`),h=a?(0,K.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...Kg(p,s),children:a()},`TableHead`):null,g=o?(0,K.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...Kg(m,s),children:o()},`TableFoot`):null;return(0,K.jsx)(u,{...e,...Kg(u,s),children:(0,K.jsx)(d,{children:(0,K.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...Kg(f,s),children:[h,(0,K.jsx)(m_,{},`TableBody`),g]})})})})),x_=Xg({useEmitter:v_,useEmitterValue:y_,usePublisher:b_}),S_=Zg({useEmitter:v_,useEmitterValue:y_,usePublisher:b_}),C_={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},w_={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:T_,floor:E_,max:D_,min:O_,round:k_}=Math;function A_(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function j_(e){return{...w_,items:e}}function M_(e,t){return e&&e.width===t.width&&e.height===t.height}function N_(e,t){return e&&e.column===t.column&&e.row===t.row}var P_=xm(([{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=Q(0),C=Q(0),w=Q(C_),T=Q({height:0,width:0}),E=Q({height:0,width:0}),D=ym(),O=ym(),k=Q(0),A=Q(null),j=Q({column:0,row:0}),M=ym(),N=ym(),P=Q(!1),F=Q(0),I=Q(!0),ee=Q(!1),te=Q(!1);rm(Z(m,hm(F),Y(([e,t])=>!!t)),()=>{im(I,!1)}),rm(Z(wm(m,I,E,T,F,ee),Y(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{im(ee,!0),Ih(1,()=>{im(D,e)}),sm(Z(l),()=>{im(t,[0,0]),im(I,!0)})}),J(Z(N,Y(e=>e!=null&&e.scrollTop>0),dm(0)),C),rm(Z(m,hm(N),Y(([,e])=>e!=null)),([,e])=>{e&&(im(T,e.viewport),im(E,e.item),im(j,e.gap),e.scrollTop>0&&(im(P,!0),sm(Z(l,pm(1)),e=>{im(P,!1)}),im(c,{top:e.scrollTop})))}),J(Z(T,X(({height:e})=>e)),d),J(Z(wm($(T,M_),$(E,M_),$(j,(e,t)=>e&&e.column===t.column&&e.row===t.row),$(l)),X(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),M),J(Z(wm($(S),r,$(j,N_),$(E,M_),$(T,M_),$(A),$(C),$(P),$(I),$(F)),Y(([,,,,,,,e])=>!e),X(([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 C_;if(p===0){let t=Lh(l,e);return j_(A_(t,t+Math.max(s-1,0),o))}let h=F_(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*E_((t+d)/(f+d)),_=h*T_((n+d)/(f+d))-1,_=O_(e-1,D_(_,h-1)),g=O_(_,D_(0,g))):(g=0,_=-1);let v=A_(g,_,o),{bottom:y,top:b}=I_(a,r,i,v),x=T_(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),J(Z(A,Y(e=>e!==null),X(e=>e.length)),S),J(Z(wm(T,E,w,j),Y(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),X(([e,t,{items:n},r])=>{let{bottom:i,top:a}=I_(e,r,t,n);return[a,i]}),um(ah)),t);let ne=Q(!1);J(Z(l,hm(ne),X(([e,t])=>t||e!==0)),ne);let re=bm(Z(wm(w,S),Y(([{items:e}])=>e.length>0),hm(ne),Y(([[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}),X(([[,e]])=>e-1),um())),ie=bm(Z($(w),Y(({items:e})=>e.length>0&&e[0].index===0),dm(0),um())),ae=bm(Z($(w),hm(P),Y(([{items:e},t])=>e.length>0&&!t),X(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),um(ih),mm(0)));J(ae,p.scrollSeekRangeChanged),J(Z(D,hm(T,E,S,j),X(([e,t,n,r,i])=>{let a=Nh(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=D_(0,l,O_(r-1,l));let u=L_(t,i,n,l);return o===`end`?u=k_(u-t.height+n.height):o===`center`&&(u=k_(u-t.height/2+n.height/2)),c&&(u+=c),{behavior:s,top:u}})),c);let oe=vm(Z(w,X(e=>e.offsetBottom+e.bottom)),0);return J(Z(b,X(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:te,initialTopMostItemIndex:F,totalListHeight:oe,...f,endReached:re,propsReady:h,rangeChanged:ae,startReached:ie,stateChanged:M,stateRestoreInProgress:P,...x}},nm(Zh,Im,Gh,hg,jh,gg,km));function F_(e,t,n){return D_(1,E_((e+n)/(E_(t)+n)))}function I_(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=L_(e,t,n,r[0].index);return{bottom:L_(e,t,n,r[r.length-1].index)+i,top:a}}function L_(e,t,n,r){let i=E_(r/F_(e.width,n.width,t.column)),a=i*n.height+D_(0,i-1)*t.row;return a>0?a+t.row:a}var R_=xm(([e,t])=>({...e,...t}),nm(P_,xm(()=>{let e=Q(e=>`Item ${e}`),t=Q({}),n=Q(null),r=Q(`virtuoso-grid-item`),i=Q(`virtuoso-grid-list`),a=Q(Fg),o=Q(`div`),s=Q($p),c=(e,n=null)=>vm(Z(t,X(t=>t[e]),um()),n),l=Q(!1),u=Q(!1);return J($(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`)}}))),z_=G.memo(function(){let e=K_(`gridState`),t=K_(`listClassName`),n=K_(`itemClassName`),r=K_(`itemContent`),i=K_(`computeItemKey`),a=K_(`isSeeking`),o=q_(`scrollHeight`),s=K_(`ItemComponent`),c=K_(`ListComponent`),l=K_(`ScrollSeekPlaceholder`),u=K_(`context`),d=q_(`itemDimensions`),f=q_(`gap`),p=K_(`log`),m=K_(`stateRestoreInProgress`),h=q_(`reportReadyState`),g=Am(G.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:X_(`column-gap`,getComputedStyle(e).columnGap,p),row:X_(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return Og(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,K.jsx)(c,{className:t,ref:g,...Kg(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,K.jsx)(l,{...Kg(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,G.createElement)(s,{...Kg(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),B_=G.memo(function(){let e=K_(`HeaderComponent`),t=q_(`headerHeight`),n=K_(`headerFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,!1),i=K_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null}),V_=G.memo(function(){let e=K_(`FooterComponent`),t=q_(`footerHeight`),n=K_(`headerFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,!1),i=K_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null}),H_=({children:e})=>{let t=G.useContext(Dg),n=q_(`itemDimensions`),r=q_(`viewportDimensions`),i=Am(G.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return G.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,K.jsx)(`div`,{ref:i,style:Wg(!1),children:e})},U_=({children:e})=>{let t=G.useContext(Dg),n=q_(`windowViewportRect`),r=q_(`itemDimensions`),i=Fm(n,K_(`customScrollParent`),!1);return G.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,K.jsx)(`div`,{ref:i,style:Wg(!1),children:e})},{Component:W_,useEmitter:G_,useEmitterValue:K_,usePublisher:q_}=Tg(R_,{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`}},G.memo(function({...e}){let t=K_(`useWindowScroll`),n=K_(`customScrollParent`),r=n||t?Y_:J_,i=n||t?U_:H_,a=K_(`context`);return(0,K.jsx)(r,{...e,...Kg(r,a),children:(0,K.jsxs)(i,{children:[(0,K.jsx)(B_,{}),(0,K.jsx)(z_,{}),(0,K.jsx)(V_,{})]})})})),J_=Xg({useEmitter:G_,useEmitterValue:K_,usePublisher:q_}),Y_=Zg({useEmitter:G_,useEmitterValue:K_,usePublisher:q_});function X_(e,t,n){return t!==`normal`&&!(t!=null&&t.endsWith(`px`))&&n(`${e} was not resolved to pixel value correctly`,t,Em.WARN),t===`normal`?0:parseInt(t??`0`,10)}function Z_(e){let t=(0,q.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,K.jsx)(Fe,{"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_=G.memo(Z_);function $_(e,...t){return typeof e==`function`?e(...t):e}function ev(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 tv(e){let t=(0,q.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=Qr(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(nv),j.length>0){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(ae,{"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,K.jsx)(ae,{"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,K.jsx)(s_,{"data-slot":`select-list`,style:{height:E},totalCount:O.visibleOptions.length,overscan:50,itemContent:e=>{let t=O.visibleOptions[e];return(0,K.jsxs)(K.Fragment,{children:[e===0&&j,N(e),(0,K.jsx)(Q_,{option:t,checked:O.isChecked(t.value),renderOption:h})]})}});let e=O.visibleOptions.flatMap((e,t)=>{let n=N(t),r=(0,K.jsx)(Q_,{option:e,checked:O.isChecked(e.value),renderOption:h},String(e.value));return n?[n,r]:[r]});return(0,K.jsxs)(K.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,K.jsx)(`span`,{className:`text-muted-foreground`,children:x}):(0,K.jsx)(ei,{items:t.map(O.labelOf),max:3})},t[26]=O.labelOf,t[27]=x,t[28]=I):I=t[28];let ee=I,te=e[`data-testid`],ne;t[29]===O?ne=t[30]:(ne=e=>O.labelOf(e),t[29]=O,t[30]=ne);let re=b?ee:void 0,ie;t[31]!==p||t[32]!==C?(ie=W({"w-full":C},p),t[31]=p,t[32]=C,t[33]=ie):ie=t[33];let oe=O.searchQuery,se=O.setSearchQuery,ce=O.open,le=O.setOpen,ue;t[34]===w?ue=t[35]:(ue=$_(w),t[34]=w,t[35]=ue);let de;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]!==te||t[44]!==ne||t[45]!==re||t[46]!==ie||t[47]!==ue?(de={"data-slot":`select-root`,"data-testid":te,displayValue:ne,renderValue:re,placeholder:x,className:ie,shouldFilter:!1,search:oe,onSearchChange:se,open:ce,onOpenChange:le,emptyState:ue,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]=te,t[44]=ne,t[45]=re,t[46]=ie,t[47]=ue,t[48]=de):de=t[48];let fe=de,pe;return t[49]!==fe||t[50]!==A||t[51]!==a||t[52]!==F||t[53]!==r?(pe=a?(0,K.jsx)(Ee,{...fe,multiple:!0,value:r,onValueChange:A,children:F()}):(0,K.jsx)(Ee,{...fe,multiple:!1,value:r,onValueChange:A,children:F()}),t[49]=fe,t[50]=A,t[51]=a,t[52]=F,t[53]=r,t[54]=pe):pe=t[54],pe}function nv(e){let t=`enabled`in e?!e.enabled:e.items.length===0;return(0,K.jsx)(g,{"data-slot":`select-bulk`,className:`pl-6 m-1 py-1`,value:`__bulk_${e.kind}`,disabled:t,onSelect:()=>{t||e.run()},children:ev(e)},e.kind)}var rv=er,iv=rr,av=Qn,ov=ir,sv=e=>{let t=(0,q.c)(16),{error:n,badData:r,shadowRoot:i}=e;if(n instanceof ut){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(Ts,{children:`Bad Data`}),t[0]=e):e=t[0];let a;t[1]===n.issues?a=t[2]:(a=n.issues.map(lv),t[1]=n.issues,t[2]=a);let o;t[3]===a?o=t[4]:(o=(0,K.jsx)(`div`,{className:`text-md prose dark:prose-invert`,children:(0,K.jsx)(`ul`,{children:a})}),t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(ov,{className:`py-2 text-[0.84375rem]`,children:`View Data:`}),t[5]=s):s=t[5];let c;t[6]===r?c=t[7]:(c=(0,K.jsx)(Pi,{data:r}),t[6]=r,t[7]=c);let l;t[8]!==i||t[9]!==c?(l=(0,K.jsx)(rv,{type:`single`,collapsible:!0,children:(0,K.jsxs)(av,{value:`item-1`,className:`text-muted-foreground border-muted-foreground-20`,children:[s,(0,K.jsx)(iv,{className:`text-[0.84375rem]`,children:(0,K.jsx)(oi,{container:i,children:c})})]})}),t[8]=i,t[9]=c,t[10]=l):l=t[10];let u;return t[11]!==o||t[12]!==l?(u=(0,K.jsxs)(Es,{variant:`destructive`,children:[e,o,l]}),t[11]=o,t[12]=l,t[13]=u):u=t[13],u}let a;return t[14]===n.message?a=t[15]:(a=(0,K.jsx)(`div`,{children:n.message}),t[14]=n.message,t[15]=a),a};function cv(e,t,n){return(0,K.jsx)(sv,{error:e,badData:t,shadowRoot:n})}function lv(e){let t=e.path.join(`.`);return(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`span`,{className:`font-bold`,children:t}),`: `,e.message]},t)}var uv=3,dv=150;function fv({hostElement:e,plugin:t,children:n,getInitialValue:r},i){let[o,c]=(0,G.useState)(n),[l,u]=(0,G.useState)(r()),{theme:d}=Xo(),[f,p]=(0,G.useState)(()=>t.validator.safeParse(Ae(e))),[h,g]=(0,G.useState)(0);(0,G.useImperativeHandle)(i,()=>({reset:()=>{u(r()),p(t.validator.safeParse(Ae(e))),g(e=>e+1)},setChildren:e=>{c(e)}})),Xt(e,xs.TYPE,t=>{t.detail.element===e&&u(t.detail.value)}),(0,G.useEffect)(()=>{let n=new MutationObserver(n=>{n.some(e=>e.type===`attributes`&&e.attributeName?.startsWith(`data-`))&&p(t.validator.safeParse(Ae(e)))});return n.observe(e,{attributes:!0}),()=>{n.disconnect()}},[e,t.validator]);let _=s(t=>{u(n=>{let r=qt.asUpdater(t)(n);return Lp(r,n)||e.dispatchEvent(bs(r,e)),r})}),v=(0,G.useMemo)(()=>{if(!t.functions)return{};let n={};for(let[r,i]of Zt.entries(t.functions)){let{input:t,output:o}=i;n[r]=async(...n)=>{Qt(n.length<=1,`Plugin functions only supports a single argument. Called ${r}`);let i=fn(),s=ee.findElementThroughShadowDOMs(e)?.id,c=s?ee.parse(s):null;if(c&&!i){let e=a.get(ve),t=e.cellRuntime[c],n=e.cellData[c];if(m({executionTime:t.runElapsedTimeMs??n.lastExecutionTime,status:t.status,errored:t.errored,interrupted:t.interrupted,stopped:t.stopped}))throw new hs}else U.warn(`Cell ID ${c} cannot be found`);let l=yv(t,n[0]);for(let t=0;;t++){let n=Sv(e);Qt(n,`Object ID should exist`);let i=await Rt.request({args:l,functionName:r,namespace:n});if(i.status.code===`ok`)return yv(o,i.return_value);let a=i.found===!1;if(a&&t<uv){let e=dv*2**t;await new Promise(t=>setTimeout(t,e));continue}throw U.error(i.status),a?new ps:Error(i.status.message||`Unknown error`)}}}return n},[t.functions,e,h]);return f.success?(0,K.jsx)(Hn,{children:(0,K.jsx)(`div`,{className:`contents ${d}`,children:(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(`div`,{}),children:(0,K.jsx)(Zi,{children:t.render({setValue:_,value:l,data:f.data,children:o,host:e,functions:v})})})})}):cv(f.error,Zt.mapValues(e.dataset,e=>typeof e==`string`?F(e):e),e.shadowRoot)}var pv=G.forwardRef(fv),mv=new Map,hv=`__custom_marimo_element__`;function gv(e){let t=class extends HTMLElement{observer;root;mounted=!1;pluginRef=(0,G.createRef)();__type__=hv;constructor(){super(),this.attachShadow({mode:`open`}),this.copyStyles(),this.observer=new MutationObserver(()=>{this.pluginRef.current?.setChildren(this.getChildren())})}connectedCallback(){this.isLightDOMChildOfMarimoElement()||(this.mounted||(Qt(this.shadowRoot,`Shadow root should exist`),this.root&&this.root.unmount(),this.root=Xl.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(vv(e))return!0;e=e.parentElement}return!1}reset(){this.dispatchEvent(bs(F(this.dataset.initialValue),this)),this.rerender()}rerender(){this.pluginRef.current?.reset()}getChildren(){return this.children.length===0?null:this.children.length===1?us({html:this.innerHTML,alwaysSanitizeHtml:!1}):Array.from(this.children).map((e,t)=>(0,K.jsx)(G.Fragment,{children:us({html:e.outerHTML,alwaysSanitizeHtml:!1})},t))}async mountReactComponent(){this.mounted=!0,Qt(this.root,`Root must be defined`),this.root.render((0,K.jsx)(o,{store:a,children:(0,K.jsx)(Wf,{children:(0,K.jsx)(pv,{hostElement:this,plugin:e,ref:this.pluginRef,getInitialValue:()=>p(this,Nt.INSTANCE),children:this.getChildren()})})}))}async copyStyles(){let t=this.shadowRoot;if(Qt(t,`Shadow root should exist`),!this.isAdoptedStyleSheetsSupported()){U.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:_v(e));for(let e of n){let t=e.href??(e.ownerNode instanceof HTMLElement?e.ownerNode.dataset.viteDevId:void 0)??e.title;if(t&&!mv.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-BLd6rnbk.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-xfs0Sn4r.js","./react-CBDbhulC.js","./compiler-runtime-CYIjoINj.js","./cells-Cp-G34Rz.js","./react-dom-BQrReHnR.js","./schemas-aTUejmFi.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./utils-D5Ywm7-q.js","./_baseMerge-DLqSVasz.js","./isArrayLikeObject-DnwgSs_Z.js","./_initCloneObject-CM3WilQg.js","./useEventListener-92uWqz-P.js","./objects-snlMn4yk.js","./jsx-runtime-B74pBk57.js","./invariant-Ci2dTZ72.js","./config-BlNM0caL.js","./constants-BDbGiS7O.js","./Deferred-CrTnjj37.js","./session-Sz5nSFku.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./fullscreen-BH2jz-F4.js","./dist-DzCQtGkt.js","./menu-items-BSRA2YI9.js","./alert-dialog-CA-2mBs3.js","./button-Dh8EwhsF.js","./select-nLt2y0Sw.js","./check-BoA6XBpj.js","./createLucideIcon-B7HeEoG2.js","./useNumberFormatter-DHJ9s6Vk.js","./context-Do8M9TDF.js","./circle-ByJdIf5p.js","./tooltip-BUtPzKB4.js","./dist-BtC9ym6k.js","./dist-CZNULd6Z.js","./arrays-BqUx5USx.js","./once-Haz_uxEL.js","./capabilities-D8kPgMKr.js","./cjs-C49f7GXV.js","./createReducer-B_XmHROl.js","./dist-DiYjQAhI.js","./marked.esm-B_3iMIUq.js","./strings-CReV1AYG.js","./requests-C6_IaFh7.js","./dist-B8pdsUrS.js","./useLifecycle-BUaJcygz.js","./toDate-hGYJX0Ha.js","./database-zap-CloO6gbw.js","./write-secret-modal-D6zoZgLY.js","./input-DEbY281O.js","./numbers-Bc-r3jsC.js","./useDebounce-DgpSQhrP.js","./uuid-k9DpjH68.js","./use-toast-DpWHUGuF.js","./plus-C4J9gIE1.js","./trash-2-D_HX-0qx.js","./badge-BSgtkC2e.js","./preload-helper-HclGiUj8.js","./dist-Cx4BE7jC.js","./dist-B0RXffUm.js","./dist-DkPPv0FB.js","./dist-Dw9YRsCU.js","./dist-CKUpxYGQ.js","./stex-Dc5bKD4z.js","./paths-zcL04qUW.js","./useTheme-C-ri8BtY.js","./useAsyncData-Buhk-UgR.js","./purify.es-DrVcFY1Q.js","./cells-D-c15Ks-.css","./ErrorBoundary-CDVGFYfr.js","./dropdown-menu-C40jM9o4.js","./chevron-right-CKA5zVsM.js","./chart-no-axes-column-ChZdjJhj.js","./tree-actions-CG5g7aUQ.js","./eye-off-CFuPxa9F.js","./refresh-cw-Bf-rx_aV.js","./circle-play-CQiat61_.js","./external-link-Bp3BxyRA.js","./file-icons-DdGYuADJ.js","./file-headphone-rFCxFRI8.js","./file-DF8n85RA.js","./image-ab13yGv4.js","./youtube-DCJ-ihUU.js","./link-Cap-MZiw.js","./spinner-Ck-Hgfvj.js","./package-DPlscLzt.js","./file-name-input-K4MKESI_.js","./tabs-Cy1qXLzH.js","./copy-BMXKNElG.js","./errors-DzO-nXy-.js","./extends-CvVTau-c.js","./pathUtils-Cryrlpma.js","./semaphore-BjoL5P0h.js","./app-config-button-DUJC6b6x.js","./ai-model-dropdown-DCmiuk7x.js","./get-DjNf4SIX.js","./has-sKqQhP6r.js","./_hasPath-BmRQipI0.js","./switch-DjXr9Y9D.js","./config-B-r81uZ6.js","./triangle-alert-MihykDYG.js","./VisuallyHidden-CBMDmozt.js","./SelectionIndicator-DPl6HPLh.js","./copy-DlEomWzI.js","./kbd-Cwh96ZBE.js","./alert-dmKwNsrp.js","./error-banner-Dw5YY9wq.js","./table-DmqOOjfe.js","./renderShortcut-X-CJUSM8.js","./azure-Dcn397wY.js","./card-dYXwy2mo.js","./settings-C-cYas75.js","./Inputs-E85rt2lh.js","./Inputs-C4Oo7q-H.css","./dates-B58T85Jq.js","./en-US-yTIMUO13.js","./isValid-nQ3Iam8J.js","./react-icons.esm-hr79-MCS.js","./icons-CjLa9BiH.js","./github-YRgb6LMu.js","./marimo-icons-C3KxMV9A.js","./links-DLvOXyO_.js","./useInterval-B4v7_zd0.js","./run-page-9pl8qhQR.js","./readonly-python-code-DpIyjHqY.js","./esm-BHMOvJzM.js","./useAddCell-DdB_uBif.js","./JsonOutput-CzIGPEZQ.js","./download-DMxOzI7b.js","./html-to-image-D6GUC5q6.js","./LazyAnyLanguageCodeMirror-LboTfNDv.js","./table-CUK1W5bI.js","./markdown-renderer-BZKlbm2Q.js","./chunk-5FQGJX7Z-CRg4xQWg.js","./micromark-factory-space-D9Dr-k4J.js","./markdown-renderer-B7zTpxjS.css","./ellipsis-Dfik_tuW.js","./message-circle-BQB1AIAg.js","./MarimoErrorOutput-DqpoYOvw.js","./hat-glasses-C8LSY3HT.js","./datasource-DrODSIs0.js","./RenderHTML-DwhMAd9l.js","./copy-icon-z8fuTE3w.js","./useRunCells-CX7oW5zy.js","./useInstallPackage-DsD08SLK.js","./state-B6AklCzD.js","./cell-link-6burT2XF.js","./useDateFormatter-BiqAQ-zI.js","./tooltip-BG35uS_N.js","./vega-loader.browser-AQmjV9CX.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-Dm4DaIgg.js","./emotion-is-prop-valid.esm-nLO-SoUf.js","./useIframeCapabilities-C7Di8f2y.js","./utils-49LGK4zG.js","./formats-C6s96nu2.js","./react-resizable-panels.browser.esm-BSRAHC4P.js","./JsonOutput-BQtz7-np.css","./layout-DWnrxIo2.js","./code-xml-B7x62Eeh.js","./code-CF0HKE9K.js","./useDeleteCell-Bz49_cFj.js","./trash-DS1-SuM0.js","./prop-types-Djf4O40e.js","./floating-outline-DaUHnl_e.js","./process-output-Ck7-P_xp.js","./name-cell-input-BMCdK-el.js","./name-cell-input-ujOhus_y.css","./esm-DmqQGMel.js","./dist-BF7Lrekv.js","./dist-BaRNSaca.js","./dist-qvk3g06H.js","./dist-C--ZICxQ.js","./dist-DmGtPaVM.js","./dist-CmImLjus.js","./dist-DPoYlxSC.js","./dist-DJOWOALB.js","./dist-Db-HC93w.js","./dist-kaLvV_d4.js","./dist-gELFCfHH.js","./dist-Cq8NOszX.js","./dist-Bsu3h9O7.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-8kQdxo7f.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-UyKn0rKt.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-Bv0S1RlZ.js","./readonly-code-display--S2daDa6.js","./layout-D-WxHzKd.css","./arrow-left-DrqK6gPp.js","./panels-CWn0Yh1D.js","./state-Di9TbuV9.js","./_baseSet-gX6o3Pih.js","./blob-B2d_dHwI.js","./share-CPtBiNgr.js","./events-CbeVJ6OD.js","./requests-S_7PqcSt.js","./ws-DLVysDhS.js","./runs-euHSzlw_.js","./panels-DDsRoC3H.css","./shell-DLpUCctE.js","./edit-page-xlMlcLnI.js","./arrow-right-CMihiUEa.js","./useBoolean-BXC4CItZ.js","./useCellActionButton-B31neI3m.js","./multi-icon-COhkNiC1.js","./multi-icon-CW3_9bja.css","./useSplitCell-Dy2_DmJR.js","./circle-check-CUWv70QX.js","./useNotebookActions-CQtbk9CB.js","./globe-BQf75qV_.js","./components-DUYCXngU.js","./markdown-export-0rLbaq8b.js","./square-B58Ib8Ir.js","./error-entries-Cv2m1yhc.js","./pair-with-agent-modal-CbUFKJHP.js","./add-connection-dialog-BGfpw5lC.js","./skeleton-BKeh8hf3.js","./add-cell-with-ai-R-3DS79K.js","./fileToBase64-NhpNrK5l.js","./clipboard-paste-C7rY4OqM.js","./cell-editor-Dw09J9yD.js","./save-BybsbOKz.js","./dist-wY2yia-1.js","./formatting-BWZH2nBg.js","./panel-accordion-state-DjUTN7i5.js","./loro_wasm_bg-BRA1AbB3.js","./cell-editor-_cVIHMNI.css","./RunButton-BlpbweyH.js","./rotate-ccw-BKamGvhU.js","./square-function-DkZweMAs.js","./CellStatus-LoTwk7fR.js","./ban-CwXfMsC1.js","./workflow-SJ9KZapt.js","./CellStatus-2Psjnl5F.css","./useDependencyPanelTab-C_ps0r--.js","./panel-context-CiVjnt80.js","./kiosk-mode-mxgb5lWf.js","./edit-page-Dstp9NQ5.css","./gallery-page-C3pBpHlY.js","./chat-ui-DGiVDzNh.js","./bot-message-square-CGhPjWFf.js","./chat-display-Bu405iyc.js","./isEmpty-BJso7_X0.js","./glide-data-editor-sICUMEhk.js","./glide-utils-UGsrRHYj.js","./data-grid-types-DgHVN_Zz.js","./dist-DQS4kic4.js","./click-outside-container-C5RF3h4V.js","./glide-data-editor-CDvI1PvV.css","./ConnectedDataExplorerComponent-DW6cJ-Lr.js","./spec-DKsAmLTi.js","./react-vega-C3-Qk46W.js","./linear-BMUPXU7z.js","./init-ZlXS9mIS.js","./timer-DnhpN6F0.js","./ordinal-BdBDtYTt.js","./time-BWPrZCK3.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-Cea4bVaX.js","./vega-component-C7TCzyaU.js","./useDeepCompareMemoize-CLytDdMl.js","./use-vega-container-remeasure-xx9nX6Kv.js","./swiper-component-5Kdi1-Gn.js","./swiper-component-BQTNpogT.css","./slides-BQsAdh8K.css","./ImageComparisonComponent-BKLXMG6c.js","./mermaid-l6lQkCib.js","./chunk-NSK5VX7P-CF0xJC4h.js","./src-HeEQIfJi.js","./chunk-Y2CYZVJY-DsF7k-Jl.js","./src-CAQsWNvA.js","./chunk-I66GZJ75-mACCwHgj.js","./dist-CeoU7cfW.js","./chunk-3NCLNEKW-zNdfrgTx.js","./chunk-ZIRB5QZD-O39ZBUk3.js","./chunk-W5SLKNZC-ASg9U-2L.js","./chunk-UBXNYLIW-DoU728rU.js","./chunk-4I5QYGJK-CRhC3ilJ.js","./chunk-WRU74C26-CWPrh85f.js","./chunk-QR6OTTB3-Bo5GoXIC.js","./rough.esm-Dy-Kn_BL.js","./chunk-7BUUIJ7U-Bb538aSH.js","./chunk-7Z6QIM7H-D1BVG1pf.js","./chunk-J7OUQ5F2-CO4p8tJJ.js","./katex-CfcQV1c4.js","./katex-DWOHUIcL.js","./mhchem-BCzq34a8.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-xfs0Sn4r.js";import{t as c}from"./react-CBDbhulC.js";import{$ as l,$i as u,$t as d,An as f,Ao as p,Ba as m,Bo as h,Cn as g,Co as _,Dn as v,Do as y,Fn as b,Gi as x,Go as S,In as C,Io as w,Jo as T,Jt as E,Kn as D,Ko as O,Lo as k,Mi as A,Mn as j,Mo as M,Ni as N,Nn as P,Oo as F,Pn as I,Po as ee,Q as te,Ro as ne,S as re,Sn as ie,Tn as ae,Ut as oe,Wo as se,Wt as ce,X as le,Xt as ue,Y as de,Yo as fe,Yt as pe,Z as me,Zi as he,Zt as ge,_o as _e,an as L,b as ve,bn as ye,bo as be,cn as xe,dn as Se,ea as Ce,en as we,et as Te,fn as Ee,gt as De,ht as Oe,jn as ke,ko as Ae,ln as je,nn as Me,oa as Ne,on as Pe,pn as Fe,po as Ie,qo as Le,qt as Re,ra as ze,rn as Be,sn as Ve,ta as He,tn as Ue,tt as We,un as Ge,uo as Ke,vn as qe,vo as Je,wn as Ye,yo as Xe,z as Ze,zi as Qe,zo as $e}from"./cells-Cp-G34Rz.js";import{t as et}from"./react-dom-BQrReHnR.js";import{Cn as R,In as z,It as tt,Jn as nt,Sn as B,Tt as V,W as rt,Wn as it,Yn as at,at as ot,bt as st,cn as ct,hn as lt,hr as ut,jn as dt,kt as H,lc as ft,ln as pt,n as mt,un as ht,vt as gt,wn as _t,wt as vt,xt as yt}from"./schemas-aTUejmFi.js";import{t as bt}from"./compiler-runtime-CYIjoINj.js";import{t as xt}from"./get-DjNf4SIX.js";import{t as St}from"./pick-Bs4cJfJU.js";import{C as Ct,D as wt,F as Tt,N as Et,P as Dt,d as Ot,o as kt,t as At,w as jt,y as Mt}from"./utils-D5Ywm7-q.js";import{a as Nt,c as Pt,d as Ft,f as It,h as Lt,i as Rt,l as zt,o as Bt,p as Vt,r as Ht,s as Ut,u as Wt,v as Gt,x as Kt}from"./state-Di9TbuV9.js";import{_ as qt,a as Jt,g as U,o as Yt,t as Xt}from"./useEventListener-92uWqz-P.js";import{t as Zt}from"./objects-snlMn4yk.js";import{t as Qt}from"./invariant-Ci2dTZ72.js";import{r as $t}from"./constants-BDbGiS7O.js";import{C as en,D as tn,E as nn,M as rn,N as an,O as on,S as sn,T as cn,a as ln,b as un,i as dn,l as fn,r as pn,s as mn,t as hn,v as gn}from"./config-BlNM0caL.js";import{a as _n,i as vn,n as yn,o as bn,r as xn,t as Sn}from"./switch-DjXr9Y9D.js";import{_ as Cn,c as wn,d as Tn,f as En,i as Dn,t as On,u as kn,v as An}from"./readonly-python-code-DpIyjHqY.js";import{t as jn}from"./ErrorBoundary-CDVGFYfr.js";import{n as Mn,t as W}from"./cn-ldLVeaqm.js";import{t as Nn}from"./jsx-runtime-B74pBk57.js";import{E as Pn,S as Fn,T as In,_ as Ln,b as Rn,h as zn,i as Bn,o as Vn,s as Hn,v as Un,w as Wn,x as Gn,y as Kn}from"./fullscreen-BH2jz-F4.js";import{o as qn,s as Jn}from"./dist-DzCQtGkt.js";import{d as Yn,u as Xn}from"./menu-items-BSRA2YI9.js";import{a as Zn,c as Qn,i as $n,l as er,o as tr,r as nr,s as rr,u as ir}from"./config-B-r81uZ6.js";import{a as ar,c as or,i as sr,l as cr,n as lr,s as ur,t as dr}from"./alert-dialog-CA-2mBs3.js";import{i as fr,n as pr,r as mr,t as hr}from"./tabs-Cy1qXLzH.js";import{a as gr,c as _r,d as vr,f as yr,h as br,i as xr,l as Sr,m as Cr,n as wr,o as Tr,p as Er,r as Dr,s as Or,t as kr}from"./select-nLt2y0Sw.js";import{t as Ar}from"./circle-ByJdIf5p.js";import{a as jr,c as Mr,i as Nr,o as Pr,p as Fr,r as Ir,t as Lr}from"./dropdown-menu-C40jM9o4.js";import{B as Rr,Bt as zr,C as Br,Ct as Vr,Dt as Hr,Et as Ur,F as Wr,Ft as Gr,G as Kr,H as qr,J as Jr,K as Yr,L as Xr,Lt as Zr,M as Qr,Mt as $r,N as ei,P as ti,Q as ni,R as ri,Rt as ii,S as ai,St as oi,Tt as si,V as ci,X as li,Y as ui,Z as di,_ as fi,_t as pi,b as mi,c as hi,ct as gi,d as _i,et as vi,f as yi,ft as bi,g as xi,gt as Si,h as Ci,ht as wi,j as Ti,jt as Ei,lt as Di,mt as Oi,p as ki,pt as Ai,q as ji,r as Mi,st as Ni,t as Pi,u as Fi,vt as Ii,w as Li,wt as Ri,x as zi,xt as Bi,y as Vi,yt as Hi,z as Ui,zt as Wi}from"./JsonOutput-CzIGPEZQ.js";import{h as Gi,l as Ki,n as qi,p as Ji,r as Yi}from"./download-DMxOzI7b.js";import{a as Xi,i as Zi,n as Qi,o as $i,r as ea,t as ta}from"./tooltip-BUtPzKB4.js";import{n as na,t as ra}from"./button-Dh8EwhsF.js";import{st as ia}from"./dist-BtC9ym6k.js";import{d as aa,o as oa,p as sa,t as ca}from"./arrays-BqUx5USx.js";import{n as la,t as ua}from"./once-Haz_uxEL.js";import{i as da,n as fa,r as pa,t as ma}from"./strings-CReV1AYG.js";import{n as ha}from"./requests-C6_IaFh7.js";import{t as ga}from"./createLucideIcon-B7HeEoG2.js";import{D as _a,E as va,S as ya,T as ba,_ as xa,a as Sa,c as Ca,d as wa,f as Ta,g as Ea,h as Da,i as Oa,l as ka,m as Aa,n as ja,o as Ma,p as Na,r as Pa,s as Fa,t as Ia,u as La,v as Ra,w as za,x as Ba,y as Va}from"./spec-DKsAmLTi.js";import{n as Ha,r as Ua,t as Wa}from"./fileToBase64-NhpNrK5l.js";import{t as Ga}from"./LazyAnyLanguageCodeMirror-LboTfNDv.js";import{i as Ka,n as qa,o as Ja}from"./useLifecycle-BUaJcygz.js";import{a as Ya,n as Xa,o as Za,r as Qa,t as $a}from"./useBoolean-BXC4CItZ.js";import{a as eo,r as to,t as no}from"./useNumberFormatter-DHJ9s6Vk.js";import{t as ro}from"./chevron-right-CKA5zVsM.js";import{t as io}from"./code-xml-B7x62Eeh.js";import{t as ao}from"./copy-BMXKNElG.js";import{t as oo}from"./eye-off-CFuPxa9F.js";import{n as so}from"./file-headphone-rFCxFRI8.js";import{r as co,t as lo}from"./file-icons-DdGYuADJ.js";import{t as uo}from"./globe-BQf75qV_.js";import{i as fo,n as po}from"./markdown-export-0rLbaq8b.js";import{C as mo,S as ho,x as go,y as _o}from"./write-secret-modal-D6zoZgLY.js";import{n as vo,t as yo}from"./spinner-Ck-Hgfvj.js";import{a as bo,c as xo,i as So,l as Co,r as wo}from"./glide-utils-UGsrRHYj.js";import{t as To}from"./plus-C4J9gIE1.js";import{t as Eo}from"./refresh-cw-Bf-rx_aV.js";import{i as Do,n as Oo,o as ko,r as Ao,t as jo}from"./input-DEbY281O.js";import{t as Mo}from"./square-function-DkZweMAs.js";import{a as No,i as Po,r as Fo,t as Io}from"./column-preview-riSXbYe_.js";import{t as Lo}from"./square-B58Ib8Ir.js";import{t as Ro}from"./trash-2-D_HX-0qx.js";import{t as zo}from"./triangle-alert-MihykDYG.js";import{n as Bo,t as Vo}from"./es-CrFhA96G.js";import{t as Ho}from"./preload-helper-HclGiUj8.js";import{n as Uo,t as Wo}from"./use-toast-DpWHUGuF.js";import{n as Go,t as Ko}from"./paths-zcL04qUW.js";import{l as qo,r as Jo,s as Yo}from"./session-Sz5nSFku.js";import{r as Xo}from"./useTheme-C-ri8BtY.js";import{n as Zo,t as Qo}from"./context-Do8M9TDF.js";import{a as $o,i as es,o as ts,t as ns}from"./numbers-Bc-r3jsC.js";import{n as rs,r as is}from"./useDebounce-DgpSQhrP.js";import{n as as}from"./useAsyncData-Buhk-UgR.js";import{n as os,r as ss,t as cs}from"./dates-B58T85Jq.js";import{t as ls}from"./copy-icon-z8fuTE3w.js";import{t as us}from"./RenderHTML-DwhMAd9l.js";import{a as ds,i as fs,n as ps,r as ms,t as hs}from"./errors-DzO-nXy-.js";import{i as gs,r as _s,t as vs}from"./tooltip-BG35uS_N.js";import{a as ys}from"./react-icons.esm-hr79-MCS.js";import{a as bs,i as xs,n as Ss,t as Cs}from"./events-CbeVJ6OD.js";import{n as ws,r as Ts,t as Es}from"./alert-dmKwNsrp.js";import{n as Ds,t as Os}from"./error-banner-Dw5YY9wq.js";import{n as ks,t as As}from"./utils-49LGK4zG.js";import{a as js,i as Ms,n as Ns,o as Ps,r as Fs,t as Is}from"./table-DmqOOjfe.js";import{t as Ls}from"./renderShortcut-X-CJUSM8.js";import{t as Rs}from"./bundle.esm-DzY74mzC.js";import{n as zs}from"./icons-CjLa9BiH.js";import{t as Bs}from"./useDeepCompareMemoize-CLytDdMl.js";import{t as Vs}from"./pathUtils-Cryrlpma.js";import{i as Hs,n as Us,r as Ws}from"./floating-outline-DaUHnl_e.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 G=e(c(),1),Gs=e(et(),1),K=Nn(),Ks=`NavigationMenu`,[qs,Js,Ys]=Yn(Ks),[Xs,Zs,Qs]=Yn(Ks),[$s,ec]=Wn(Ks,[Ys,Qs]),[tc,nc]=$s(Ks),[rc,ic]=$s(Ks),ac=G.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]=G.useState(null),p=Yt(t,e=>f(e)),m=Xn(l),h=G.useRef(0),g=G.useRef(0),_=G.useRef(0),[v,y]=G.useState(!0),[b,x]=Rn({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:Ks}),S=G.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(``),150)},[x]),C=G.useCallback(e=>{window.clearTimeout(g.current),x(e)},[x]),w=G.useCallback(e=>{b===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(e)},o)},[b,x,o]);return G.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(_.current)},[]),(0,K.jsx)(cc,{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,K.jsx)(In.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});ac.displayName=Ks;var oc=`NavigationMenuSub`,sc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=nc(oc,n),[l,u]=Rn({prop:r,onChange:i,defaultProp:a??``,caller:oc});return(0,K.jsx)(cc,{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,K.jsx)(In.div,{"data-orientation":o,...s,ref:t})})});sc.displayName=oc;var cc=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]=G.useState(null),[g,_]=G.useState(new Map),[v,y]=G.useState(null);return(0,K.jsx)(tc,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:br(s),baseId:Un(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:Ln(u),onTriggerLeave:Ln(d),onContentEnter:Ln(f),onContentLeave:Ln(p),onItemSelect:Ln(c),onItemDismiss:Ln(l),onViewportContentChange:G.useCallback((e,t)=>{_(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:G.useCallback(e=>{_(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,K.jsx)(qs.Provider,{scope:t,children:(0,K.jsx)(rc,{scope:t,items:g,children:o})})})},lc=`NavigationMenuList`,uc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=nc(lc,n),a=(0,K.jsx)(In.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,K.jsx)(In.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,K.jsx)(qs.Slot,{scope:n,children:i.isRootMenu?(0,K.jsx)(Mc,{asChild:!0,children:a}):a})})});uc.displayName=lc;var dc=`NavigationMenuItem`,[fc,pc]=$s(dc),mc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=Un(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=G.useRef(null),c=G.useRef(null),l=G.useRef(null),u=G.useRef(()=>{}),d=G.useRef(!1),f=G.useCallback((e=`start`)=>{if(s.current){u.current();let t=Ic(s.current);t.length&&Lc(e===`start`?t:t.reverse())}},[]),p=G.useCallback(()=>{if(s.current){let e=Ic(s.current);e.length&&(u.current=Rc(e))}},[]);return(0,K.jsx)(fc,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,K.jsx)(In.li,{...i,ref:t})})});mc.displayName=dc;var hc=`NavigationMenuTrigger`,gc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=nc(hc,e.__scopeNavigationMenu),o=pc(hc,e.__scopeNavigationMenu),s=G.useRef(null),c=Yt(s,o.triggerRef,t),l=Vc(a.baseId,o.value),u=Hc(a.baseId,o.value),d=G.useRef(!1),f=G.useRef(!1),p=o.value===a.value;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(qs.ItemSlot,{scope:n,value:o.value,children:(0,K.jsx)(Fc,{asChild:!0,children:(0,K.jsx)(In.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":Bc(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:Fn(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:Fn(e.onPointerMove,Uc(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:Fn(e.onPointerLeave,Uc(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:Fn(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:Fn(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,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Jn,{"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,K.jsx)(`span`,{"aria-owns":u})]})]})});gc.displayName=hc;var _c=`NavigationMenuLink`,vc=`navigationMenu.linkSelect`,yc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,K.jsx)(Fc,{asChild:!0,children:(0,K.jsx)(In.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:Fn(e.onClick,e=>{let t=e.target,n=new CustomEvent(vc,{bubbles:!0,cancelable:!0});if(t.addEventListener(vc,e=>i?.(e),{once:!0}),Pn(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(Ec,{bubbles:!0,cancelable:!0});Pn(t,e)}},{checkForDefaultPrevented:!1})})})});yc.displayName=_c;var bc=`NavigationMenuIndicator`,xc=G.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=nc(bc,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?Gs.createPortal((0,K.jsx)(Kn,{present:n||a,children:(0,K.jsx)(Sc,{...r,ref:t})}),i.indicatorTrack):null});xc.displayName=bc;var Sc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=nc(bc,n),a=Js(n),[o,s]=G.useState(null),[c,l]=G.useState(null),u=i.orientation===`horizontal`,d=!!i.value;G.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 zc(o,f),zc(i.indicatorTrack,f),c?(0,K.jsx)(In.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}),Cc=`NavigationMenuContent`,wc=G.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=nc(Cc,e.__scopeNavigationMenu),a=pc(Cc,e.__scopeNavigationMenu),o=Yt(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,K.jsx)(Tc,{forceMount:n,...c,ref:o}):(0,K.jsx)(Kn,{present:n||s,children:(0,K.jsx)(Dc,{"data-state":Bc(s),...c,ref:o,onPointerEnter:Fn(e.onPointerEnter,i.onContentEnter),onPointerLeave:Fn(e.onPointerLeave,Uc(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});wc.displayName=Cc;var Tc=G.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=nc(Cc,e.__scopeNavigationMenu);return Gn(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Gn(()=>()=>r(e.value),[e.value,r]),null}),Ec=`navigationMenu.rootContentDismiss`,Dc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=nc(Cc,n),d=G.useRef(null),f=Yt(d,t),p=Vc(u.baseId,r),m=Hc(u.baseId,r),h=Js(n),g=G.useRef(null),{onItemDismiss:_}=u;G.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{_(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(Ec,t),()=>e.removeEventListener(Ec,t)}},[u.isRootMenu,e.value,i,_,s]);let v=G.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,K.jsx)(Mc,{asChild:!0,children:(0,K.jsx)(zn,{id:m,"aria-labelledby":p,"data-motion":v,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(Ec,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:Fn(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:Fn(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:Fn(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=Ic(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);Lc(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:Fn(e.onEscapeKeyDown,e=>{o.current=!0})})})}),Oc=`NavigationMenuViewport`,kc=G.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!nc(Oc,e.__scopeNavigationMenu).value;return(0,K.jsx)(Kn,{present:n||i,children:(0,K.jsx)(Ac,{...r,ref:t})})});kc.displayName=Oc;var Ac=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=nc(Oc,n),o=Yt(t,a.onViewportChange),s=ic(Cc,e.__scopeNavigationMenu),[c,l]=G.useState(null),[u,d]=G.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 zc(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,K.jsx)(In.div,{"data-state":Bc(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:Fn(e.onPointerEnter,a.onContentEnter),onPointerLeave:Fn(e.onPointerLeave,Uc(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,K.jsx)(Kn,{present:n||i,children:(0,K.jsx)(Dc,{...r,ref:Jt(t,e=>{i&&e&&d(e)})})},e)})})}),jc=`FocusGroup`,Mc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=nc(jc,n);return(0,K.jsx)(Xs.Provider,{scope:n,children:(0,K.jsx)(Xs.Slot,{scope:n,children:(0,K.jsx)(In.div,{dir:i.dir,...r,ref:t})})})}),Nc=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],Pc=`FocusGroupItem`,Fc=G.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=Zs(n),a=nc(Pc,n);return(0,K.jsx)(Xs.ItemSlot,{scope:n,children:(0,K.jsx)(In.button,{...r,ref:t,onKeyDown:Fn(e.onKeyDown,e=>{if([`Home`,`End`,...Nc].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),Nc.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>Lc(t)),e.preventDefault()}})})})});function Ic(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 Lc(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function Rc(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 zc(e,t){let n=Ln(t);Gn(()=>{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 Bc(e){return e?`open`:`closed`}function Vc(e,t){return`${e}-trigger-${t}`}function Hc(e,t){return`${e}-content-${t}`}function Uc(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Wc=ac,Gc=uc,Kc=mc,qc=gc,Jc=yc,Yc=xc,Xc=wc,Zc=kc,Qc=[`PageUp`,`PageDown`],$c=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],el={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},tl=`Slider`,[nl,rl,il]=Yn(tl),[al,ol]=Wn(tl,[il]),[sl,cl]=al(tl),ll=G.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=G.useRef(new Set),_=G.useRef(0),v=o===`horizontal`?fl:pl,[y=[],b]=Rn({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=G.useRef(y);function S(e){T(e,Dl(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=Ml(a),s=Nl(Math.round((e-r)/a)*a+r,o),l=Cr(s,[r,i]);b((e=[])=>{let r=wl(e,l,t);if(Al(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,K.jsx)(sl,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,K.jsx)(nl.Provider,{scope:e.__scopeSlider,children:(0,K.jsx)(nl.Slot,{scope:e.__scopeSlider,children:(0,K.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:Fn(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=Qc.includes(e.key)||e.shiftKey&&$c.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});ll.displayName=tl;var[ul,dl]=al(tl,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),fl=G.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=G.useState(null),p=Yt(t,e=>f(e)),m=G.useRef(void 0),h=Xn(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=jl([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,K.jsx)(ul,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,K.jsx)(ml,{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=el[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),pl=G.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=G.useRef(null),d=Yt(t,u),f=G.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=jl([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,K.jsx)(ul,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,K.jsx)(ml,{"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=el[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),ml=G.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=cl(tl,n);return(0,K.jsx)(In.span,{...l,ref:t,onKeyDown:Fn(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):Qc.concat($c).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:Fn(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:Fn(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:Fn(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),hl=`SliderTrack`,gl=G.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=cl(hl,n);return(0,K.jsx)(In.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});gl.displayName=hl;var _l=`SliderRange`,vl=G.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=cl(_l,n),a=dl(_l,n),o=G.useRef(null),s=Yt(t,o),c=i.values.length,l=i.values.map(e=>Tl(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,K.jsx)(In.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})});vl.displayName=_l;var yl=`SliderThumb`,bl=G.forwardRef((e,t)=>{let n=rl(e.__scopeSlider),[r,i]=G.useState(null),a=Yt(t,e=>i(e)),o=G.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,K.jsx)(xl,{...e,ref:a,index:o})}),xl=G.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=cl(yl,n),s=dl(yl,n),[c,l]=G.useState(null),u=Yt(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=qn(c),p=o.values[r],m=p===void 0?0:Tl(p,o.min,o.max),h=El(r,o.values.length),g=f?.[s.size],_=g?Ol(g,m,s.direction):0;return G.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,K.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,K.jsx)(nl.ItemSlot,{scope:e.__scopeSlider,children:(0,K.jsx)(In.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:Fn(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,K.jsx)(Cl,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});bl.displayName=yl;var Sl=`RadioBubbleInput`,Cl=G.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=G.useRef(null),a=Yt(i,r),o=br(t);return G.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,K.jsx)(In.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});Cl.displayName=Sl;function wl(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Tl(e,t,n){let r=100/(n-t)*(e-t);return Cr(r,[0,100])}function El(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Dl(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 Ol(e,t,n){let r=e/2;return(r-jl([0,50],[0,r])(t)*n)*n}function kl(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Al(e,t){if(t>0){let n=kl(e);return Math.min(...n)>=t}return!0}function jl(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 Ml(e){return(String(e).split(`.`)[1]||``).length}function Nl(e,t){let n=10**t;return Math.round(e*n)/n}var Pl=ll,Fl=gl,Il=vl,Ll=bl,Rl=ga(`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`}]]),zl=ga(`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`}]]),Bl=ga(`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`}]]),Vl=ga(`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`}]]),Hl=ga(`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`}]]),Ul=ga(`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`}]]),Wl=ga(`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`}]]),Gl=ga(`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`}]]),Kl=ga(`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`}]]),ql=ga(`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`}]]),Jl=ga(`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`}]]),Yl=ga(`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`}]]),Xl=e(fe(),1),Zl={INSERT:`insert`,DELETE:`delete`,SUBSTITUTE:`substitute`,MATCH:`match`};function Ql(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:Zl.MATCH,position:s-1}),s--,c--):s>0&&c>0&&a[s][c]===a[s-1][c-1]+1?(o.unshift({type:Zl.SUBSTITUTE,position:s-1}),s--,c--):s>0&&a[s][c]===a[s-1][c]+1?(o.unshift({type:Zl.DELETE,position:s-1}),s--):c>0&&a[s][c]===a[s][c-1]+1&&(o.unshift({type:Zl.INSERT,position:s}),c--);return{distance:a[r][i],operations:o}}function $l(e,t,n){let r=[],i=0;for(let a of t)switch(a.type){case Zl.MATCH:r.push(e[i]),i++;break;case Zl.DELETE:i++;break;case Zl.INSERT:r.push(n);break;case Zl.SUBSTITUTE:r.push(n),i++}return r}function eu(e,t,n,r){let i=Ql(e,t,n);return{merged:$l(e,i.operations,r),edits:i}}var tu=0,nu=``;function ru(e){return e.id?e.id:e.name===`setup`?w:M.create()}function iu(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=>ru(e))||[];return{cellIds:e,sessionCellData:new Map(e.map((e,t)=>[e,null])),notebookCellData:new Map(e.map((e,n)=>[e,t?.cells[n]||au()]))}}if(!t){let t=e.cells.map(e=>ru(e));return{cellIds:t,sessionCellData:new Map(t.map((t,n)=>[t,e.cells[n]])),notebookCellData:new Map(t.map(e=>[e,au()]))}}let{merged:i,edits:a}=eu(e.cells,t.cells,(e,t)=>{let n=e.code_hash;return n?t.code_hash===n:!1},ou());a.distance>0&&U.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=ru(a);o.push(t);let s=i[e]||ou();s.id=t,n.set(t,s),r.set(t,a)}else U.warn(`Merged notebook cell is null at index`,e)}return{cellIds:o,sessionCellData:n,notebookCellData:r}}function au(){return{id:M.create(),name:nu,code:nu,code_hash:null,config:{column:null,disabled:!1,hide_code:!1}}}function ou(){return{id:M.create(),code_hash:null,console:[],outputs:[]}}function su(e,t){return{id:e,name:t.name??nu,code:t.code??nu,edited:!1,lastCodeRun:null,lastExecutionTime:null,config:{column:t.config?.column??null,disabled:t.config?.disabled??!1,hide_code:t.config?.hide_code??!1},serializedEditorState:null}}function cu(e){let t=Ze();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:tu};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:tu}}}let i=e.console||[];return{...t,outline:t.output?Oe(t.output):null,consoleOutputs:i.map(e=>e.type===`streamMedia`?{channel:`media`,data:e.data,mimetype:e.mimetype,timestamp:tu}:{channel:e.name===`stderr`?`stderr`:`stdout`,data:e.text,mimetype:e.mimetype??`text/plain`,timestamp:tu})}}function lu(e,t){let{cellIds:n,sessionCellData:r,notebookCellData:i}=iu(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]=su(e,n)),o[e]=cu(t)}return{cellIds:Ke.from([n]),cellData:a,cellRuntime:o,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var q=bt(),uu=Object.freeze({left:0,top:0,width:16,height:16}),du=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fu=Object.freeze({...uu,...du}),pu=Object.freeze({...fu,body:``,hidden:!1}),mu=Object.freeze({width:null,height:null}),hu=Object.freeze({...mu,...du});function gu(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 _u=/[\s,]+/;function vu(e,t){t.split(_u).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}var yu={...hu,preserveAspectRatio:``};function bu(e){let t={...yu},n=(t,n)=>e.getAttribute(t)||n;return t.width=n(`width`,null),t.height=n(`height`,null),t.rotate=gu(n(`rotate`,``)),vu(t,n(`flip`,``)),t.preserveAspectRatio=n(`preserveAspectRatio`,n(`preserveaspectratio`,``)),t}function xu(e,t){for(let n in yu)if(e[n]!==t[n])return!0;return!1}var Su=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cu=(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&&!wu(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&&!wu(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!wu(e,n)?null:e}return null},wu=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function Tu(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 Eu(e,t){let n=Tu(e,t);for(let r in pu)r in du?r in e&&!(r in n)&&(n[r]=du[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Du(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 Ou(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Eu(r[e]||i[e],a)}return o(t),n.forEach(o),Eu(e,a)}function ku(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=Du(e);for(let i in r){let a=r[i];a&&(t(i,Ou(e,i,a)),n.push(i))}return n}var Au={provider:``,aliases:{},not_found:{},...uu};function ju(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Mu(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!ju(e,Au))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!ju(t,pu))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]||!ju(t,pu))return null}return t}var Nu=Object.create(null);function Pu(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Fu(e,t){let n=Nu[e]||(Nu[e]=Object.create(null));return n[t]||(n[t]=Pu(e,t))}function Iu(e,t){return Mu(t)?ku(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Lu(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}function Ru(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(Nu)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(Nu[e]||{})).forEach(t=>{let r=Fu(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var zu=!1;function Bu(e){return typeof e==`boolean`&&(zu=e),zu}function Vu(e){let t=typeof e==`string`?Cu(e,!0,zu):e;if(t){let e=Fu(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function Hu(e,t){let n=Cu(e,!0,zu);if(!n)return!1;let r=Fu(n.provider,n.prefix);return t?Lu(r,n.name,t):(r.missing.add(n.name),!0)}function Uu(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),zu&&!t&&!e.prefix){let t=!1;return Mu(e)&&(e.prefix=``,ku(e,(e,n)=>{Hu(e,n)&&(t=!0)})),t}let n=e.prefix;return wu({provider:t,prefix:n,name:`a`})?!!Iu(Fu(t,n),e):!1}function Wu(e){return!!Vu(e)}function Gu(e){let t=Vu(e);return t&&{...fu,...t}}function Ku(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]=Fu(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 qu(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Ju(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||qu([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Yu=0;function Xu(e,t,n){let r=Yu++,i=qu.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 Zu=Object.create(null);function Qu(e,t){Zu[e]=t}function $u(e){return Zu[e]||Zu[``]}function ed(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Cu(e,t,n):e;i&&r.push(i)}),r}var td={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nd(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 rd(e){let t={...td,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=nd(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 id(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 ad=Object.create(null),od=[`https://api.simplesvg.com`,`https://api.unisvg.com`],sd=[];od.length>0;)od.length===1||Math.random()>.5?sd.push(od.shift()):sd.push(od.pop());ad[``]=id({resources:[`https://api.iconify.design`].concat(sd)});function cd(e,t){let n=id(t);return n!==null&&(ad[e]=n,!0)}function ld(e){return ad[e]}function ud(){return Object.keys(ad)}function dd(){}var fd=Object.create(null);function pd(e){if(!fd[e]){let t=ld(e);if(!t)return;fd[e]={config:t,redundancy:rd(t)}}return fd[e]}function md(e,t,n){let r,i;if(typeof e==`string`){let t=$u(e);if(!t)return n(void 0,424),dd;i=t.send;let a=pd(e);a&&(r=a.redundancy)}else{let t=id(e);if(t){r=rd(t);let n=$u(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),dd):r.query(t,i,n)().abort}function hd(){}function gd(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ju(e)}))}function _d(e){let t=[],n=[];return e.forEach(e=>{(e.match(Su)?t:n).push(e)}),{valid:t,invalid:n}}function vd(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(!Iu(e,n).length){r();return}}catch(e){console.error(e)}r(),gd(e)}function yd(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function bd(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)){yd(e.loadIcons(r,n,t),t=>{vd(e,r,t)});return}if(i){r.forEach(r=>{yd(i(r,n,t),t=>{vd(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=_d(r);if(o.length&&vd(e,o,null),!a.length)return;let s=n.match(Su)?$u(t):null;if(!s){vd(e,a,null);return}s.prepare(t,n,a).forEach(n=>{md(t,n,t=>{vd(e,n.icons,t)})})}))}var xd=(e,t)=>{let n=Ku(ed(e,!0,Bu()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,hd)}),()=>{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(Fu(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=Fu(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&&bd(e,t)}),t?Xu(t,n,i):hd},Sd=e=>new Promise((t,n)=>{let r=typeof e==`string`?Cu(e,!0):e;if(!r){n(e);return}xd([r||e],i=>{if(i.length&&r){let e=Vu(r);if(e){t({...fu,...e});return}}n(e)})});function Cd(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(typeof t.body==`string`)return{...t}}catch{}}function wd(e,t){if(typeof e==`object`)return{data:Cd(e),value:e};if(typeof e!=`string`)return{value:e};if(e.includes(`{`)){let t=Cd(e);if(t)return{data:t,value:e}}let n=Cu(e,!0,!0);if(!n)return{value:e};let r=Vu(n);return r!==void 0||!n.prefix?{value:e,name:n,data:r}:{value:e,name:n,loading:xd([n],()=>t(e,n,Vu(n)))}}var Td=!1;try{Td=navigator.vendor.indexOf(`Apple`)===0}catch{}function Ed(e,t){switch(t){case`svg`:case`bg`:case`mask`:return t}return t!==`style`&&(Td||e.indexOf(`<a`)===-1)?`svg`:e.indexOf(`currentColor`)===-1?`bg`:`mask`}var Dd=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Od=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kd(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(Dd);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Od.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 Ad(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 jd(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Md(e,t,n){let r=Ad(e);return jd(r.defs,t+r.content+n)}var Nd=e=>e===`unset`||e===`undefined`||e===`none`;function Pd(e,t){let n={...fu,...e},r={...hu,...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=Md(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=kd(d,c/l)):(u=o===`auto`?c:o,d=s===null?kd(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{Nd(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 Fd(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 Id(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function Ld(e){return`data:image/svg+xml,`+Id(e)}function Rd(e){return`url("`+Ld(e)+`")`}var zd=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Bd(e){zd=e}function Vd(){return zd}function Hd(e,t){let n=ld(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 Ud(e){return e===404}var Wd=(e,t,n)=>{let r=[],i=Hd(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 Gd(e){if(typeof e==`string`){let t=ld(e);if(t)return t.path}return`/`}var Kd={prepare:Wd,send:(e,t,n)=>{if(!zd){n(`abort`,424);return}let r=Gd(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;zd(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Ud(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 qd(e,t,n){Fu(n||``,t).loadIcons=e}function Jd(e,t,n){Fu(n||``,t).loadIcon=e}var Yd=`data-style`,Xd=``;function Zd(e){Xd=e}function Qd(e,t){let n=Array.from(e.childNodes).find(e=>e.hasAttribute&&e.hasAttribute(Yd));n||(n=document.createElement(`style`),n.setAttribute(Yd,Yd),e.appendChild(n)),n.textContent=`:host{display:inline-block;vertical-align:`+(t?`-0.125em`:`0`)+`}span,svg{display:block;margin:auto}`+Xd}function $d(){Qu(``,Kd),Bu(!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`||!Uu(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;cd(e,r)||console.error(n)}catch{console.error(n)}}}}return{enableCache:e=>{},disableCache:e=>{},iconLoaded:Wu,iconExists:Wu,getIcon:Gu,listIcons:Ru,addIcon:Hu,addCollection:Uu,calculateSize:kd,buildIcon:Pd,iconToHTML:Fd,svgToURL:Rd,loadIcons:xd,loadIcon:Sd,addAPIProvider:cd,setCustomIconLoader:Jd,setCustomIconsLoader:qd,appendCustomStyle:Zd,_api:{getAPIConfig:ld,setAPIModule:Qu,sendAPIQuery:md,setFetch:Bd,getFetch:Vd,listAPIProviders:ud}}}var ef={"background-color":`currentColor`},tf={"background-color":`transparent`},nf={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},rf={"-webkit-mask":ef,mask:ef,background:tf};for(let e in rf){let t=rf[e];for(let n in nf)t[e+`-`+n]=nf[n]}function af(e){return e?e+(e.match(/^[-0-9.]+$/)?`px`:``):`inherit`}function of(e,t,n){let r=document.createElement(`span`),i=e.body;i.indexOf(`<a`)!==-1&&(i+=`<!-- `+Date.now()+` -->`);let a=e.attributes,o=Rd(Fd(i,{...a,width:t.width+``,height:t.height+``})),s=r.style,c={"--svg":o,width:af(a.width),height:af(a.height),...n?ef:tf};for(let e in c)s.setProperty(e,c[e]);return r}var sf;function cf(){try{sf=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{sf=null}}function lf(e){return sf===void 0&&cf(),sf?sf.createHTML(e):e}function uf(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=lf(Fd(e.body,n)),t.firstChild}function df(e){return Array.from(e.childNodes).find(e=>{let t=e.tagName&&e.tagName.toUpperCase();return t===`SPAN`||t===`SVG`})}function ff(e,t){let n=t.icon.data,r=t.customisations,i=Pd(n,r);r.preserveAspectRatio&&(i.attributes.preserveAspectRatio=r.preserveAspectRatio);let a=t.renderedMode,o;switch(a){case`svg`:o=uf(i);break;default:o=of(i,{...fu,...n},a===`mask`)}let s=df(e);s?o.tagName===`SPAN`&&s.tagName===o.tagName?s.setAttribute(`style`,o.getAttribute(`style`)):e.replaceChild(o,s):e.appendChild(o)}function pf(e,t,n){return{rendered:!1,inline:t,icon:e,lastRender:n&&(n.rendered?n:n.lastRender)}}function mf(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`);Qd(e,t),this._state=pf({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,Qd(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{}ff(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=bu(this);(e.attrMode!==n||xu(e.customisations,r)||!df(this._shadowRoot))&&this._renderIcon(e.icon,r,n)}_iconChanged(e){let t=wd(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=pf(t,this._state.inline,this._state)}_forceRender(){if(!this._visible){let e=df(this._shadowRoot);e&&this._shadowRoot.removeChild(e);return}this._queueCheck()}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,bu(this),this.getAttribute(`mode`))}_renderIcon(e,t,n){let r=Ed(e.data.body,n),i=this._state.inline;ff(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=$d();for(let e in o)a[e]=a.prototype[e]=o[e];return t.define(e,a),a}var{enableCache:hf,disableCache:gf,iconLoaded:_f,iconExists:vf,getIcon:yf,listIcons:bf,addIcon:xf,addCollection:Sf,calculateSize:Cf,buildIcon:wf,iconToHTML:Tf,svgToURL:Ef,loadIcons:Df,loadIcon:Of,setCustomIconLoader:kf,setCustomIconsLoader:Af,addAPIProvider:jf,_api:Mf}=mf()||$d(),Nf=()=>((0,q.c)(1),null),Pf=(0,G.memo)(e=>{let t=(0,q.c)(3),{children:n}=e,{theme:r}=Xo(),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,G.useLayoutEffect)(i,a),n});Pf.displayName=`ThemeProvider`;var Ff=e=>{let t=(0,q.c)(3),{variables:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,K.jsx)(`div`,{className:`contents`,style:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},If=()=>{let e=(0,q.c)(25),[t,r]=n(Gt);if(t===null)return null;let i;e[0]===t?i=e[1]:(i=async()=>{try{await navigator.clipboard.writeText(t),Wo({title:`Copied to clipboard`,description:`Error details have been copied to your clipboard.`})}catch{Wo({title:`Failed to copy`,description:`Could not copy to clipboard.`,variant:`danger`})}},e[0]=t,e[1]=i);let a=i,o;e[2]===r?o=e[3]:(o=()=>{r(null)},e[2]=r,e[3]=o);let s=o,c=Lf,l;e[4]===s?l=e[5]:(l=e=>!e&&s(),e[4]=s,e[5]=l);let u;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsxs)(or,{children:[(0,K.jsxs)(cr,{className:`flex items-center gap-2 text-destructive`,children:[(0,K.jsx)(ze,{className:`h-5 w-5`}),`Kernel Startup Failed`]}),(0,K.jsx)(ar,{children:`The kernel failed to start. This usually happens when the package manager can't install your notebook's dependencies.`})]}),e[6]=u):u=e[6];let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:`Error Details`}),e[7]=d):d=e[7];let f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(ao,{className:`h-3 w-3`}),e[8]=f):f=e[8];let p;e[9]===a?p=e[10]:(p=(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[d,(0,K.jsxs)(ra,{variant:`outline`,size:`xs`,onClick:a,className:`flex items-center gap-1`,children:[f,`Copy`]})]}),e[9]=a,e[10]=p);let m;e[11]===t?m=e[12]:(m=(0,K.jsx)(`pre`,{className:`bg-muted p-4 rounded-md text-sm font-mono overflow-auto max-h-80`,children:t}),e[11]=t,e[12]=m);let h;e[13]!==p||e[14]!==m?(h=(0,K.jsxs)(`div`,{className:`my-4 overflow-hidden`,children:[p,m]}),e[13]=p,e[14]=m,e[15]=h):h=e[15];let g;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,K.jsxs)(ra,{variant:`outline`,onClick:c,className:`flex items-center gap-2`,children:[(0,K.jsx)(fo,{className:`h-4 w-4`}),`Return to Home`]}),e[16]=g):g=e[16];let _;e[17]===s?_=e[18]:(_=(0,K.jsxs)(ur,{children:[g,(0,K.jsx)(lr,{onClick:s,children:`Dismiss`})]}),e[17]=s,e[18]=_);let v;e[19]!==_||e[20]!==h?(v=(0,K.jsxs)(sr,{className:`max-w-2xl`,children:[u,h,_]}),e[19]=_,e[20]=h,e[21]=v):v=e[21];let y;return e[22]!==v||e[23]!==l?(y=(0,K.jsx)(dr,{open:!0,onOpenChange:l,children:v}),e[22]=v,e[23]=l,e[24]=y):y=e[24],y};function Lf(){let e=document.baseURI.split(`?`)[0];window.open(e,`_self`)}var Rf=e=>{let t=(0,q.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=De(i);let t=e.textContent||e.innerText||``;try{await navigator.clipboard.writeText(t),Wo({title:`Copied to clipboard`,description:`Traceback has been copied to your clipboard.`})}catch{Wo({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,K.jsx)(cr,{className:`text-destructive`,children:a}),t[4]=a,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsx)(ar,{children:`Click the traceback to select and copy.`}),t[6]=u):u=t[6];let d;t[7]===l?d=t[8]:(d=(0,K.jsxs)(or,{children:[l,u]}),t[7]=l,t[8]=d);let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.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,K.jsx)(ao,{className:`h-3 w-3`}),t[10]=p):p=t[10];let m;t[11]===s?m=t[12]:(m=(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[f,(0,K.jsxs)(ra,{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=us({html:i}),t[13]=i,t[14]=h);let g;t[15]===h?g=t[16]:(g=(0,K.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,K.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,K.jsx)(ur,{children:(0,K.jsx)(lr,{onClick:r,children:`Close`})}),t[20]=r,t[21]=v);let y;t[22]!==_||t[23]!==v||t[24]!==d?(y=(0,K.jsxs)(sr,{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,K.jsx)(dr,{open:n,onOpenChange:c,children:y}),t[26]=n,t[27]=y,t[28]=c,t[29]=b):b=t[29],b},zf=()=>{let e=(0,q.c)(6),[t,r]=n(We);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,K.jsx)(Rf,{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},Bf=()=>{let e=(0,q.c)(5),{toasts:t}=Uo(),n;e[0]===t?n=e[1]:(n=t.map(Uf),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(Vf,{}),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,K.jsxs)(te,{children:[n,r]}),e[3]=n,e[4]=i),i},Vf=Bn(({container:e})=>(0,Gs.createPortal)((0,K.jsx)(Hn,{children:(0,K.jsx)(Te,{})}),e??document.body)),Hf=e=>{let t=(0,q.c)(23),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({toastTitle:a,toastDescription:i,action:n,variant:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=(0,G.useRef)(null),c=!!i&&!n&&o===`danger`,u;t[6]===a?u=t[7]:(u=a&&(0,K.jsx)(l,{children:a}),t[6]=a,t[7]=u);let d;t[8]===i?d=t[9]:(d=i&&(0,K.jsx)(me,{ref:s,children:i}),t[8]=i,t[9]=d);let f;t[10]!==u||t[11]!==d?(f=(0,K.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-1`,children:[u,d]}),t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==c||t[14]!==i?(p=c&&(0,K.jsx)(ls,{tooltip:`Copy error`,ariaLabel:`Copy error`,className:`h-4 w-4`,buttonClassName:W(`absolute right-8 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity`,`hover:text-foreground focus:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group-hover:opacity-100`,`group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-500 focus-visible:group-[.destructive]:ring-red-400 focus-visible:group-[.destructive]:ring-offset-red-600`),value:()=>s.current?.innerText??(typeof i==`string`?i:``)}),t[13]=c,t[14]=i,t[15]=p):p=t[15];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,K.jsx)(le,{}),t[16]=m):m=t[16];let h;return t[17]!==n||t[18]!==r||t[19]!==f||t[20]!==p||t[21]!==o?(h=(0,K.jsxs)(de,{variant:o,...r,children:[f,n,p,m]}),t[17]=n,t[18]=r,t[19]=f,t[20]=p,t[21]=o,t[22]=h):h=t[22],h};function Uf(e){let{id:t,title:n,description:r,action:i,variant:a,...o}=e;return(0,K.jsx)(Hf,{toastTitle:n,toastDescription:r,action:i,variant:a,...o},t)}var Wf=e=>{let t=(0,q.c)(5),{children:n}=e,i=r(Mt),a;t[0]===i?a=t[1]:(a=si(i),t[0]=i,t[1]=a);let o;return t[2]!==n||t[3]!==a?(o=(0,K.jsx)(Zo,{locale:a,children:n}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o},Gf=Ya(()=>Ho(()=>import(`./home-page-BLd6rnbk.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]),import.meta.url)),Kf=Ya(()=>Ho(()=>import(`./run-page-9pl8qhQR.js`),__vite__mapDeps([128,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,129,103,94,93,79,108,130,95,131,92,132,74,75,76,133,134,135,136,78,80,137,138,139,140,141,82,89,142,143,104,144,90,145,146,147,148,109,110,149,150,151,106,152,119,120,121,153,154,155,156,157,122,158,159,111,160,161,112,162,163,164,165,166,86,167,113,168,107,169,170,171,172,173,174,175,176,177,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,100,277,278,279,280,281,282,283,284,285,125]),import.meta.url)),qf=Ya(()=>Ho(()=>import(`./edit-page-xlMlcLnI.js`),__vite__mapDeps([286,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,276,100,277,103,94,129,93,79,108,130,95,131,137,135,138,139,140,146,147,148,278,279,280,99,101,102,104,92,75,76,89,80,105,106,107,109,110,111,112,113,114,115,74,132,133,134,136,78,141,82,142,143,144,90,145,149,150,151,152,119,120,121,153,154,155,156,157,122,158,159,160,161,162,163,164,165,166,86,167,168,169,170,171,172,173,174,175,176,177,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,287,288,289,88,123,290,291,292,293,294,85,295,87,296,124,297,116,298,299,285,300,301,125,126,302,127,303,304,97,305,306,83,84,307,308,281,309,310,311,282,117,118,312,313,275,283,284,98,314,315,316,317,318,319,320,321,322,323]),import.meta.url)),Jf=Ya(()=>Ho(()=>import(`./gallery-page-C3pBpHlY.js`),__vite__mapDeps([324,1,3,4,74,21,18,30,16,17,24,25,48,2,19,89,33,54,6,26,34,35,55,41,40,56,8,9,10,11,69,23,71,94,7,111,29,115]),import.meta.url));function Yf(e){switch(e){case`home`:Gf.preload();break;case`gallery`:Jf.preload();break;case`read`:Kf.preload();break;default:qf.preload()}}var Xf=(0,G.memo)(()=>{let e=(0,q.c)(12),[t]=jt(),[n]=Ct(),r;e[0]===t.display.code_editor_font_size?r=e[1]:(r=Qf(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=nn();return e===`home`?(0,K.jsx)(Gf.Component,{}):e===`gallery`?(0,K.jsx)(Jf.Component,{}):e===`read`?(0,K.jsx)(Kf.Component,{appConfig:n}):(0,K.jsx)(qf.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,K.jsx)(Wf,{children:o()}),e[7]=o,e[8]=c);let l;return e[9]!==s||e[10]!==c?(l=(0,K.jsx)(Zf,{children:(0,K.jsx)(Ff,{variables:s,children:c})}),e[9]=s,e[10]=c,e[11]=l):l=e[11],l});Xf.displayName=`MarimoApp`;var Zf=(0,G.memo)(e=>{let t=(0,q.c)(6),{children:n}=e,r,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(Bf,{}),i=(0,K.jsx)(Nf,{}),a=(0,K.jsx)(If,{}),o=(0,K.jsx)(zf,{}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):(r=t[0],i=t[1],a=t[2],o=t[3]);let s;return t[4]===n?s=t[5]:(s=(0,K.jsx)(jn,{children:(0,K.jsx)(G.Suspense,{children:(0,K.jsx)(Zi,{children:(0,K.jsx)(Hr,{controller:Ri,children:(0,K.jsx)(Wf,{children:(0,K.jsxs)(_o,{children:[n,r,i,a,o]})})})})})}),t[4]=n,t[5]=s),s});Zf.displayName=`Providers`;function Qf(e){return`${e/16}rem`}function $f(){Yo(e=>{e.delete($t.accessToken)})}var ep={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`,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 tp(e,t){let n=ua(async e=>{a.set(gn,{state:cn.CONNECTING}),await e.init()});function r(e,r){let i=ep[r];return(async(...a)=>{let o=t();if(!o.isLazy)return e(...a);switch(i){case`serverOnly`:return e(...a);case`dropRequest`:U.debug(`Dropping request: ${r}, since not connected to a kernel.`);return;case`throwError`:throw new fs;case`waitForConnectionOpen`:return await sn(),await wn(),e(...a);case`startConnectionWithoutKernel`:case`startConnection`:return await n(o),await sn(),i===`startConnection`&&await wn(),e(...a);default:throw Error(`Unknown action for "${r}"`)}})}return Zt.mapValues(e,(e,t)=>r(e,t))}var np=`download`;function rp(){let e=a.get(Xe);if(!e)return;let t=Go.basename(e);return Ji.withoutExtension(t)}function ip(e){let t=rp();return t?`${t}.${e}`:`${np}.${e}`}function ap(e){let t=po[e??`pymdown`];return ip(t)}function op(e){return{body:e,bodySerializer:e=>e}}var{handleExportResponse:sp,handleResponse:cp,handleResponseReturnNull:lp}=yn;function up(){let e=la(()=>{let e=pn();return xn(e)}),t=()=>pn().sessionHeaders(),n=()=>({header:t()});return{sendComponentValues:t=>e().POST(`/api/kernel/set_ui_element_value`,{body:t,params:n()}).then(lp),sendModelValue:t=>e().POST(`/api/kernel/set_model_value`,{body:t,params:n()}).then(lp),sendRestart:()=>e().POST(`/api/kernel/restart_session`,{params:n()}).then(lp),sendDocumentTransaction:async t=>(await sn(),e().POST(`/api/document/transaction`,{body:t,params:n()}).then(lp)),sendRename:t=>e().POST(`/api/kernel/rename`,{body:t,params:n()}).then(lp),sendSave:t=>e().POST(`/api/kernel/save`,{body:t,parseAs:`text`,params:n()}).then(lp),sendCopy:t=>e().POST(`/api/kernel/copy`,{body:t,parseAs:`text`,params:n()}).then(lp),sendFormat:t=>e().POST(`/api/kernel/format`,{body:t}).then(cp),sendInterrupt:()=>e().POST(`/api/kernel/interrupt`,{params:n()}).then(lp),sendShutdown:()=>e().POST(`/api/kernel/shutdown`).then(lp),sendRun:async t=>(await sn(),e().POST(`/api/kernel/run`,{body:t,params:n()}).then(lp)),sendRunScratchpad:async t=>(await sn(),e().POST(`/api/kernel/scratchpad/run`,{body:t,params:n()}).then(lp)),sendInstantiate:async t=>(await sn(),e().POST(`/api/kernel/instantiate`,{body:t,params:n()}).then(lp)),sendDeleteCell:t=>e().POST(`/api/kernel/delete`,{body:t,params:n()}).then(lp),sendCodeCompletionRequest:async t=>(await sn(),e().POST(`/api/kernel/code_autocomplete`,{body:t,params:n()}).then(lp)),saveUserConfig:t=>e().POST(`/api/kernel/save_user_config`,{body:t}).then(lp),saveAppConfig:t=>e().POST(`/api/kernel/save_app_config`,{body:t,parseAs:`text`,params:n()}).then(lp),saveCellConfig:t=>e().POST(`/api/kernel/set_cell_config`,{body:t,params:n()}).then(lp),sendFunctionRequest:t=>e().POST(`/api/kernel/function_call`,{body:t,params:n()}).then(lp),sendStdin:t=>e().POST(`/api/kernel/stdin`,{body:t,params:n()}).then(lp),sendInstallMissingPackages:t=>e().POST(`/api/kernel/install_missing_packages`,{body:t,params:n()}).then(lp),readCode:async()=>(await sn(),e().POST(`/api/kernel/read_code`,{params:n()}).then(cp)),readSnippets:async()=>(await sn(),e().GET(`/api/documentation/snippets`,{params:n()}).then(cp)),previewDatasetColumn:t=>e().POST(`/api/datasources/preview_column`,{body:t,params:n()}).then(lp),previewSQLTable:t=>e().POST(`/api/datasources/preview_sql_table`,{body:t,params:n()}).then(lp),previewSQLTableList:t=>e().POST(`/api/datasources/preview_sql_table_list`,{body:t,params:n()}).then(lp),previewSQLSchemaList:t=>e().POST(`/api/datasources/preview_sql_schema_list`,{body:t,params:n()}).then(lp),previewDataSourceConnection:t=>e().POST(`/api/datasources/preview_datasource_connection`,{body:t,params:n()}).then(lp),discoverDataSources:t=>e().POST(`/api/datasources/discover`,{body:t,params:n()}).then(lp),validateSQL:t=>e().POST(`/api/sql/validate`,{body:t,params:n()}).then(lp),openFile:async t=>(await sn(),await e().POST(`/api/files/open`,{body:t}).then(lp),null),getUsageStats:async()=>(await sn(),e().GET(`/api/usage`).then(cp)),getEnvironmentInfo:()=>e().GET(`/api/environment`).then(cp),sendPdb:t=>e().POST(`/api/kernel/pdb/pm`,{body:t,params:n()}).then(lp),sendSetBreakpoints:t=>e().POST(`/api/kernel/pdb/breakpoints`,{body:t,params:n()}).then(lp),getFileRoots:async()=>(await sn(),e().GET(`/api/files/roots`).then(cp)),sendListFiles:async t=>(await sn(),e().POST(`/api/files/list_files`,{body:t}).then(cp)),sendSearchFiles:async t=>(await sn(),e().POST(`/api/files/search`,{body:t}).then(cp)),sendCreateFileOrFolder:async t=>{await sn();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`,op(n)).then(cp)},sendDeleteFileOrFolder:async t=>e().POST(`/api/files/delete`,{body:t}).then(cp),sendCopyFileOrFolder:async t=>e().POST(`/api/files/copy`,{body:t}).then(cp),sendRenameFileOrFolder:async t=>e().POST(`/api/files/move`,{body:t}).then(cp),sendUpdateFile:async t=>(await sn(),e().POST(`/api/files/update`,{body:t}).then(cp)),sendFileDetails:async t=>(await sn(),e().POST(`/api/files/file_details`,{body:t}).then(cp)),openTutorial:t=>e().POST(`/api/home/tutorial/open`,{body:t}).then(cp),getRecentFiles:()=>e().POST(`/api/home/recent_files`).then(cp),getWorkspaceFiles:t=>e().POST(`/api/home/workspace_files`,{body:t}).then(cp),getRunningNotebooks:()=>e().POST(`/api/home/running_notebooks`).then(cp),shutdownSession:t=>e().POST(`/api/home/shutdown_session`,{body:t}).then(cp),getExportAvailability:()=>e().GET(`/api/export/availability`).then(cp),installExportRequirements:t=>e().POST(`/api/export/requirements/install`,{body:t,params:n()}).then(cp),exportAsHTML:async t=>e().POST(`/api/export/html`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`html`)})),exportAsMarkdown:async t=>e().POST(`/api/export/markdown`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ap(t.flavor)})),exportAsScript:async t=>e().POST(`/api/export/script`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`script.py`)})),exportAsIPYNB:async t=>e().POST(`/api/export/ipynb`,{body:t,parseAs:`text`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`ipynb`)})),exportAsPDF:async t=>e().POST(`/api/export/pdf`,{body:t,parseAs:`blob`,params:n()}).then(e=>sp(e,{defaultFilename:ip(`pdf`)})),autoExportAsHTML:async t=>e().POST(`/api/export/auto_export/html`,{body:t,params:n()}).then(lp),autoExportAsMarkdown:async t=>e().POST(`/api/export/auto_export/markdown`,{body:t,params:n()}).then(lp),autoExportAsIPYNB:async t=>e().POST(`/api/export/auto_export/ipynb`,{body:t,params:n()}).then(lp),updateCellOutputs:async t=>e().POST(`/api/export/update_cell_outputs`,{body:t,params:n()}).then(lp),addPackage:t=>e().POST(`/api/packages/add`,{body:t}).then(cp),removePackage:t=>e().POST(`/api/packages/remove`,{body:t}).then(cp),getPackageList:async()=>(await en(),e().GET(`/api/packages/list`).then(cp)),getDependencyTree:async()=>(await en(),e().GET(`/api/packages/tree`).then(cp)),listSecretKeys:async t=>(await sn(),e().POST(`/api/secrets/keys`,{body:t,params:n()}).then(lp)),writeSecret:async t=>e().POST(`/api/secrets/create`,{body:t,params:n()}).then(lp),invokeAiTool:async t=>e().POST(`/api/ai/invoke_tool`,{body:t,params:n()}).then(cp),clearCache:async()=>e().POST(`/api/cache/clear`,{body:{},params:n()}).then(lp),getCacheInfo:async()=>e().POST(`/api/cache/info`,{body:{},params:n()}).then(lp),listStorageEntries:t=>e().POST(`/api/storage/list_entries`,{body:t,params:n()}).then(lp),downloadStorage:t=>e().POST(`/api/storage/download`,{body:t,params:n()}).then(lp)}}var dp=`static-notebook`;function fp(){Wo({id:dp,once:!0,title:`Static notebook`,description:`This notebook is not connected to a kernel. Any interactive elements will not work.`})}function pp(){let e=()=>{throw Error(`Unreachable. Expected to be in run mode`)};return{sendComponentValues:async()=>(fp(),U.log(`Updating UI elements is not supported in static mode`),null),sendModelValue:async()=>(U.log(`Updating model values is not supported in static mode`),null),sendInstantiate:async()=>(U.log(`Viewing as static notebook`),null),sendFunctionRequest:async()=>(fp(),U.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,getDependencyTree:e,listSecretKeys:e,writeSecret:e,invokeAiTool:e,clearCache:e,getCacheInfo:e,listStorageEntries:e,downloadStorage:e}}function mp(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`,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 fs){if(a.get(un))return;let e=Wo({title:`Kernel Not Connected`,description:`You need to connect to a kernel to perform this action.`,variant:`default`,action:(0,K.jsx)(hp,{onConnect:()=>e.dismiss()})});throw U.error(`Failed to handle request: ${r}`,n),n}if(n instanceof ms&&n.status===403)throw U.warn(`Request refused, connection is read-only: ${r}`),n;let i=t[e],o=ds(n);throw i&&Wo({title:i,description:o,variant:`danger`}),U.error(`Failed to handle request: ${r}`,n),n}}}return n}var hp=e=>{let t=(0,q.c)(9),{onConnect:n}=e,i=ln(),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,K.jsx)(yo,{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,K.jsxs)(ra,{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 gp(){let e;return e=an()?Vt.INSTANCE:fn()?pp():tp(up(),()=>pn()),mp(e)}var _p=G.forwardRef((e,t)=>{let n=(0,q.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=W(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,K.jsx)(Tp,{}),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,K.jsxs)(Wc,{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});_p.displayName=Wc.displayName;var vp=Mn(`group flex list-none gap-1`,{variants:{orientation:{horizontal:`flex items-center`,vertical:`flex flex-col`}},defaultVariants:{orientation:`horizontal`}}),yp=G.forwardRef((e,t)=>{let n=(0,q.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=W(vp({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,K.jsx)(Gc,{ref:t,className:o,...a}),n[7]=a,n[8]=t,n[9]=o,n[10]=s):s=n[10],s});yp.displayName=Gc.displayName;var bp=Kc,xp=Mn(`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`}}),Sp=G.forwardRef((e,t)=>{let n=(0,q.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=W(xp(),`group`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(ys,{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,K.jsxs)(qc,{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});Sp.displayName=qc.displayName;var Cp=G.forwardRef((e,t)=>{let n=(0,q.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=W(`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,K.jsx)(Xc,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});Cp.displayName=Xc.displayName;var wp=Jc,Tp=G.forwardRef((e,t)=>{let n=(0,q.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=W(`absolute left-0 top-full flex justify-center`),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=W(`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,K.jsx)(`div`,{className:a,children:(0,K.jsx)(Zc,{className:o,ref:t,...i})}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});Tp.displayName=Zc.displayName;var Ep=G.forwardRef((e,t)=>{let n=(0,q.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=W(`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,K.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,K.jsx)(Yc,{ref:t,className:a,...i,children:o}),n[6]=i,n[7]=t,n[8]=a,n[9]=s):s=n[9],s});Ep.displayName=Yc.displayName;var Dp=e=>{let t=(0,q.c)(23),{item:n,preserveQueryParams:r,target:i}=e,a=G.useRef(null),[o,s]=G.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=us({html:n.label}),t[1]=n.label,t[2]=l);let u;t[3]===l?u=t[4]:(u=(0,K.jsx)(Sp,{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,K.jsx)(Np,{label:e.label,href:r(e.href),target:i(e.href),children:e.description&&us({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,K.jsx)(Cp,{className:`w-auto`,children:(0,K.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,K.jsx)(yp,{children:(0,K.jsxs)(bp,{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,K.jsx)(Tp,{}),t[17]=m):m=t[17];let h;t[18]===o?h=t[19]:(h=(0,K.jsx)(Ap,{anchorRef:a,open:o,children:m}),t[18]=o,t[19]=h);let g;return t[20]!==p||t[21]!==h?(g=(0,K.jsxs)(Wc,{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},Op=Bn(({container:e,children:t})=>(0,Gs.createPortal)(t,e??document.body)),kp=8,Ap=e=>{let t=(0,q.c)(18),{anchorRef:n,open:r,children:i}=e,[a,o]=G.useState(null),s=G.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-kp;o({left:Math.max(kp,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]),G.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],Xa(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),G.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,K.jsx)(Op,{children:(0,K.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},jp=class{tagName=`marimo-nav-menu`;menuItemValidator=R({label:z(),href:z(),description:z().nullish()});menuItemGroupValidator=R({label:z(),items:V(this.menuItemValidator)});validator=R({items:V(nt([this.menuItemValidator,this.menuItemGroupValidator])),orientation:gt([`horizontal`,`vertical`])});render(e){return(0,K.jsx)(Mp,{...e.data})}},Mp=e=>{let t=(0,q.c)(13),{items:n,orientation:r}=e,i=Pp,a=Fp,o=Ip,s;t[0]===r?s=t[1]:(s=e=>`items`in e?r===`horizontal`?(0,K.jsx)(Dp,{item:e,preserveQueryParams:o,target:a},e.label):(0,K.jsxs)(bp,{children:[(0,K.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:us({html:e.label})}),(0,K.jsx)(yp,{className:`ml-4 auto-collapse-nav`,orientation:r,children:e.items.map(e=>(0,K.jsx)(G.Fragment,{children:i((0,K.jsx)(wp,{href:o(e.href),target:a(e.href),className:xp({orientation:r}),children:us({html:e.label})},e.label),e.description)},e.label))})]},e.label):(0,K.jsx)(bp,{children:(0,K.jsx)(wp,{href:o(e.href),target:a(e.href),className:xp({orientation:r}),children:us({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,K.jsx)(yp,{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,K.jsx)(_p,{orientation:r,children:u}),t[10]=r,t[11]=u,t[12]=d):d=t[12],d},Np=G.forwardRef((e,t)=>{let n=(0,q.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=W(`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=us({html:a}),n[7]=a,n[8]=c);let l;n[9]===c?l=n[10]:(l=(0,K.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,K.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,K.jsx)(`li`,{children:(0,K.jsx)(wp,{asChild:!0,children:(0,K.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});Np.displayName=`ListItem`;function Pp(e,t){return t?(0,K.jsx)(ta,{delayDuration:200,content:us({html:t}),children:e}):e}function Fp(e){return e.startsWith(`http`)?`_blank`:`_self`}function Ip(e){let t=new URL(globalThis.location.href);return Jo({href:e,queryParams:t.search,keys:[$t.filePath]})}function Lp(e,t){return e===t?!0:e==null||t==null?!1:Array.isArray(e)&&Array.isArray(t)?oa(e,t):typeof e==`object`&&typeof t==`object`&&Rp(e,t)}function Rp(e,t){return Object.keys(e).length===Object.keys(t).length&&Zt.keys(e).every(n=>e[n]===t[n])}function zp(e,t){if(!window?.customElements){U.warn(`Custom elements not supported`);return}if(window.customElements.get(e)){U.warn(`Custom element ${e} already defined`);return}window.customElements.define(e,t)}function Bp(e,t){if(!t)return[];let n=e;if(wi(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:pa(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:pa(t)}case`date`:case`datetime`:case`time`:{let e=t.type===`date`?cs:t.type===`time`?ss:os;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:pa(t)}}case`boolean`:return[{column_id:n,operator:t.operator,type:`condition`,negate:!1}];default:pa(t)}}function Vp(e){return{type:`group`,operator:`and`,children:e.flatMap(e=>Bp(e.id,e.value)),negate:!1}}var Hp=0,Up=1,Wp=2,Gp=4;function Kp(e){return()=>e}function qp(e){e()}function Jp(e,t){return n=>e(t(n))}function Yp(e,t){return()=>e(t)}function Xp(e,t){return n=>e(t,n)}function Zp(e){return e!==void 0}function Qp(...e){return()=>{e.map(qp)}}function $p(){}function em(e,t){return t(e),e}function tm(e,t){return t(e)}function nm(...e){return e}function rm(e,t){return e(Up,t)}function im(e,t){e(Hp,t)}function am(e){e(Wp)}function om(e){return e(Gp)}function J(e,t){return rm(e,Xp(t,Hp))}function sm(e,t){let n=e(Up,e=>{n(),t(e)});return n}function cm(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function lm(e,t){return e===t}function um(e=lm){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Y(e){return t=>n=>{e(n)&&t(n)}}function X(e){return t=>Jp(t,e)}function dm(e){return t=>()=>{t(e)}}function Z(e,...t){let n=gm(...t);return((t,r)=>{switch(t){case Wp:am(e);return;case Up:return rm(e,n(r))}})}function fm(e,t){return n=>r=>{n(t=e(t,r))}}function pm(e){return t=>n=>{e>0?e--:t(n)}}function mm(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function hm(...e){let t=Array(e.length),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;rm(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 gm(...e){return t=>e.reduceRight(tm,t)}function _m(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case Up:return a?n===a?void 0:(r(),n=a,t=rm(e,a),t):(r(),$p);case Wp:r(),n=null;return}}}function Q(e){let t=e,n=ym();return((e,r)=>{switch(e){case Hp:t=r;break;case Up:r(t);break;case Gp:return t}return n(e,r)})}function vm(e,t){return em(Q(t),t=>J(e,t))}function ym(){let e=[];return((t,n)=>{switch(t){case Hp:e.slice().forEach(e=>{e(n)});return;case Wp:e.splice(0,e.length);return;case Up:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function bm(e){return em(ym(),t=>J(e,t))}function xm(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Sm(),singleton:n}}var Sm=()=>Symbol();function Cm(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 wm(...e){let t=ym(),n=Array(e.length),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;rm(e,e=>{n[a]=e,r|=o,r===i&&im(t,n)})}),function(e,a){switch(e){case Wp:am(t);return;case Up:return r===i&&a(n),rm(t,a)}}}function $(e,t=lm){return Z(e,um(t))}function Tm(...e){return function(t,n){switch(t){case Wp:return;case Up:return Qp(...e.map(e=>rm(e,n)))}}}var Em=(e=>(e[e.DEBUG=0]=`DEBUG`,e[e.INFO=1]=`INFO`,e[e.WARN=2]=`WARN`,e[e.ERROR=3]=`ERROR`,e))(Em||{}),Dm={0:`debug`,3:`error`,1:`log`,2:`warn`},Om=()=>typeof globalThis>`u`?window:globalThis,km=xm(()=>{let e=Q(3);return{log:Q((t,n,r=1)=>{r>=(Om().VIRTUOSO_LOG_LEVEL??om(e))&&console[Dm[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0});function Am(e,t,n){return jm(e,t,n).callbackRef}function jm(e,t,n){let r=G.useRef(null),i=e=>{},a=G.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 Mm(e,t,n,r,i,a,o,s,c){return jm(G.useCallback(n=>{let c=Nm(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;!l.dataset.virtuosoScroller;)l=l.parentElement;let u=l.lastElementChild.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollLeft:o.scrollTop:u?s?d.scrollX||d.document.documentElement.scrollLeft:d.scrollY||d.document.documentElement.scrollTop:s?l.scrollLeft:l.scrollTop,p=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,m=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(f,0),viewportHeight:m}),a?.(s?Pm(`column-gap`,getComputedStyle(n).columnGap,i):Pm(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function Nm(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),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},Em.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 Pm(e,t,n){return t!==`normal`&&!(t!=null&&t.endsWith(`px`))&&n(`${e} was not resolved to pixel value correctly`,t,Em.WARN),t===`normal`?0:parseInt(t??`0`,10)}function Fm(e,t,n){let r=G.useRef(null),i=G.useCallback(n=>{if(!(n!=null&&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={offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=jm(i,!0,n),s=G.useCallback(()=>{i(o.current)},[i,o]);return G.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 Im=xm(()=>{let e=ym(),t=ym(),n=Q(0),r=ym(),i=Q(0),a=ym(),o=ym(),s=Q(0),c=Q(0),l=Q(0),u=Q(0),d=ym(),f=ym(),p=Q(!1),m=Q(!1),h=Q(!1);return J(Z(e,X(({scrollTop:e})=>e)),t),J(Z(e,X(({scrollHeight:e})=>e)),o),J(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}),Lm={lvl:0};function Rm(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 zm(e){return e===Lm}function Bm(e,t){if(!zm(e))return t===e.k?e.v:t<e.k?Bm(e.l,t):Bm(e.r,t)}function Vm(e,t,n=`k`){if(zm(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=Vm(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Vm(e.l,t,n)}function Hm(e,t,n){return zm(e)?$m(t,n,1):t===e.k?Ym(e,{k:t,v:n}):t<e.k?eh(Ym(e,{l:Hm(e.l,t,n)})):eh(Ym(e,{r:Hm(e.r,t,n)}))}function Um(){return Lm}function Wm(e,t,n){if(zm(e))return[];let r=Vm(e,t)[0];return rh(qm(e,r,n))}function Gm(e,t){if(zm(e))return Lm;let{k:n,l:r,r:i}=e;if(t===n){if(zm(r))return i;if(zm(i))return r;{let[t,n]=Qm(r);return Jm(Ym(e,{k:t,l:Xm(r),v:n}))}}return Jm(t<n?Ym(e,{l:Gm(r,t)}):Ym(e,{r:Gm(i,t)}))}function Km(e){return zm(e)?[]:[...Km(e.l),{k:e.k,v:e.v},...Km(e.r)]}function qm(e,t,n){if(zm(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(qm(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(qm(a,t,n))),s}function Jm(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(Zm(t))return th(Ym(e,{lvl:n-1}));if(!zm(t)&&!zm(t.r))return Ym(t.r,{l:Ym(t,{r:t.r.l}),lvl:n,r:Ym(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(Zm(e))return nh(Ym(e,{lvl:n-1}));if(!zm(r)&&!zm(r.l)){let t=r.l,i=Zm(t)?r.lvl-1:r.lvl;return Ym(t,{l:Ym(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:nh(Ym(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function Ym(e,t){return $m(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 Xm(e){return zm(e.r)?e.l:Jm(Ym(e,{r:Xm(e.r)}))}function Zm(e){return zm(e)||e.lvl>e.r.lvl}function Qm(e){return zm(e.r)?[e.k,e.v]:Qm(e.r)}function $m(e,t,n,r=Lm,i=Lm){return{k:e,l:r,lvl:n,r:i,v:t}}function eh(e){return nh(th(e))}function th(e){let{l:t}=e;return!zm(t)&&t.lvl===e.lvl?Ym(t,{r:Ym(e,{l:t.r})}):e}function nh(e){let{lvl:t,r:n}=e;return!zm(n)&&!zm(n.r)&&n.lvl===t&&n.r.lvl===t?Ym(n,{l:Ym(e,{r:n.l}),lvl:t+1}):e}function rh(e){return Rm(e,({k:e,v:t})=>({index:e,value:t}))}function ih(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ah(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var oh=xm(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function sh(e,t,n){return e[ch(e,t,n)]}function ch(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 lh(e,t,n,r){let i=ch(e,t,r),a=ch(e,n,r,i);return e.slice(i,a+1)}function uh(e,t){return Math.round(e.getBoundingClientRect()[t])}function dh(e){return!zm(e.groupOffsetTree)}function fh({index:e},t){return t===e?0:t<e?-1:1}function ph(){return{groupIndices:[],groupOffsetTree:Um(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Um()}}function mh(e,t){let n=zm(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),zm(e)){e=Hm(e,0,i);continue}let o=Wm(e,a-1,t+1);if(o.some(Eh(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=Gm(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=Hm(e,t+1,a));c&&(e=Hm(e,a,i))}return[e,n]}function hh(e){return typeof e.groupIndex<`u`}function gh({offset:e},t){return t===e?0:t<e?-1:1}function _h(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=sh(t,e,fh),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function vh(e,t){if(!dh(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function yh(e,t,n){if(hh(e))return t.groupIndices[e.groupIndex]+1;{let r=vh(e.index===`LAST`?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function bh(e,t,n,r=0){return r>0&&(t=Math.max(t,sh(e,r,fh).offset)),Rm(lh(e,t,n,gh),Th)}function xh(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,Em.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&zm(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>Hm(Hm(t,n,e),n+1,r),o)}else[o,s]=mh(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=wh(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Hm(e,t,_h(t,d,i)),Um()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function Sh(e){return Km(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i?i.k-1:1/0,size:t,startIndex:e}})}function Ch(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 wh(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t!==0){c=ch(i,t-1,fh),s=i[c].offset;let e=Vm(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===Vm(n,t)[1]&&--c,i=i.slice(0,c+1)}else i=[];for(let{start:e,value:c}of Wm(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 Th(e){return{index:e.index,value:e}}function Eh(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 Dh={offsetHeight:`height`,offsetWidth:`width`},Oh=xm(([{log:e},{recalcInProgress:t}])=>{let n=ym(),r=ym(),i=vm(r,0),a=ym(),o=ym(),s=Q(0),c=Q([]),l=Q(void 0),u=Q(void 0),d=Q(void 0),f=Q(void 0),p=Q((e,t)=>uh(e,Dh[t])),m=Q(void 0),h=Q(0),g=ph(),_=vm(Z(n,hm(c,e,h),fm(xh,g),um()),g),v=vm(Z(c,um(),fm((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),X(({prev:e})=>e)),[]);J(Z(c,Y(e=>e.length>0),hm(_,h),X(([e,t,n])=>{let r=e.reduce((e,r,i)=>Hm(e,r,_h(r,t.offsetTree,n)||i),Um());return{...t,groupIndices:e,groupOffsetTree:r}})),_),J(Z(r,hm(_),Y(([e,{lastIndex:t}])=>e<t),X(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),J(l,u);let y=vm(Z(l,X(e=>e===void 0)),!0);J(Z(u,Y(e=>e!==void 0&&zm(om(_).sizeTree)),X(e=>{let t=om(d),n=om(c).length>0;return t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),J(Z(f,Y(e=>e!==void 0&&e.length>0&&zm(om(_).sizeTree)),X(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),J(Z(c,hm(d,u),Y(([,e,t])=>e!==void 0&&t!==void 0),X(([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=bm(Z(n,hm(_),fm(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),X(e=>e.changed)));rm(Z(s,fm((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),X(e=>e.diff)),e=>{let{groupIndices:n}=om(_);if(e>0)im(t,!0),im(a,e+Ch(e,n));else if(e<0){let t=om(v);t.length>0&&(e-=Ch(-e,t)),im(o,e)}}),rm(Z(s,hm(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},Em.ERROR)});let x=bm(a);J(Z(a,hm(_),X(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=Bm(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=Km(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 Km(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=bm(Z(o,hm(_,h),X(([e,{offsetTree:t},n])=>_h(-e,t,n))));return J(Z(o,hm(_,h),X(([e,t,n])=>{if(t.groupIndices.length>0){if(zm(t.sizeTree))return t;let r=Um(),i=om(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=Km(t.sizeTree).reduce((t,{k:n,v:r})=>Hm(t,Math.max(0,n+e),r),r),a!==-e){let n=Bm(t.sizeTree,s);r=Hm(r,0,n);let i=Vm(t.sizeTree,-e+1)[1];r=Hm(r,1,i)}return{...t,sizeTree:r,...wh(t.offsetTree,0,r,n)}}{let r=Km(t.sizeTree).reduce((t,{k:n,v:r})=>Hm(t,Math.max(0,n+e),r),Um());return{...t,sizeTree:r,...wh(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}},nm(km,oh),{singleton:!0});function kh(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var Ah=xm(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=ym(),o=ym(),s=bm(Z(a,X(kh)));return J(Z(s,X(e=>e.totalCount)),n),J(Z(s,X(e=>e.groupIndices)),e),J(Z(wm(i,t,r),Y(([e,t])=>dh(t)),X(([e,t,n])=>Vm(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),um(),X(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},nm(Oh,Im)),jh=xm(([{log:e}])=>{let t=Q(!1),n=bm(Z(t,Y(e=>e),um()));return rm(t,t=>{t&&om(e)(`props updated`,{},Em.DEBUG)}),{didMount:n,propsReady:t}},nm(km),{singleton:!0}),Mh=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function Nh(e){let t=typeof e==`number`?{index:e}:e;return t.align||=`start`,(!t.behavior||!Mh)&&(t.behavior=`auto`),t.offset||=0,t}var Ph=xm(([{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=ym(),m=ym(),h=Q(0),g=null,_=null,v=null;function y(){g&&=(g(),null),v&&=(v(),null),_&&=(clearTimeout(_),null),im(c,!1)}return J(Z(p,hm(n,d,r,h,s,o,f),hm(e,a,i),X(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=Nh(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=yh(b,n,w),E=_h(T,n.offsetTree,d)+o;x===`end`?(E+=f+Vm(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+Vm(n.sizeTree,T)[1]-r+h)/2:E-=a,C&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},Em.DEBUG),im(p,e)):(im(m,!0),l(`list did not change, scroll successful`,{},Em.DEBUG))};if(y(),S===`smooth`){let e=!1;v=rm(t,t=>{e||=t}),g=sm(u,()=>{D(e)})}else g=sm(Z(t,Fh(150)),D);return _=setTimeout(()=>{y()},1200),im(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},Em.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},nm(Oh,Im,km),{singleton:!0});function Fh(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function Ih(e,t){e==0?t():requestAnimationFrame(()=>{Ih(e-1,t)})}function Lh(e,t){let n=t-1;return typeof e==`number`?e:e.index===`LAST`?n:e.index}var Rh=xm(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=Q(!0),c=Q(0),l=Q(!0);return J(Z(o,hm(c),Y(([e,t])=>!!t),dm(!1)),s),J(Z(o,hm(c),Y(([e,t])=>!!t),dm(!1)),l),rm(Z(wm(t,o),hm(s,n,e,l),Y(([[,e],t,{sizeTree:n},r,i])=>e&&(!zm(n)||Zp(r))&&!t&&!i),hm(c)),([,e])=>{sm(i,()=>{im(l,!0)}),Ih(4,()=>{sm(r,()=>{im(s,!0)}),im(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},nm(Oh,Im,Ph,jh),{singleton:!0});function zh(e,t){return Math.abs(e-t)<1.01}var Bh=`up`,Vh=`down`,Hh=`none`,Uh={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Wh=0,Gh=xm(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=Q(!1),s=Q(!0),c=ym(),l=ym(),u=Q(4),d=Q(Wh),f=vm(Z(Tm(Z($(i),pm(1),dm(!0)),Z($(i),pm(1),dm(!1),cm(100))),um()),!1),p=vm(Z(Tm(Z(n,dm(!0)),Z(n,dm(!1),cm(200))),um()),!1);J(Z(wm($(i),$(d)),X(([e,t])=>e<=t),um()),s),J(Z(s,mm(50)),l);let m=bm(Z(wm(r,$(a),$(t),$(e),$(u)),fm((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}},Uh),um((e,t)=>e&&e.atBottom===t.atBottom))),h=vm(Z(r,fm((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(zh(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{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}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Y(e=>e.changed),X(e=>e.jump)),0);J(Z(m,X(e=>e.atBottom)),o),J(Z(o,mm(50)),c);let g=Q(Vh);J(Z(r,X(({scrollTop:e})=>e),um(),fm((e,t)=>om(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Bh:Vh,prevScrollTop:t},{direction:Vh,prevScrollTop:0}),X(e=>e.direction)),g),J(Z(r,mm(50),dm(Hh)),g);let _=Q(0);return J(Z(f,Y(e=>!e),dm(0)),_),J(Z(i,mm(100),hm(f),Y(([e,t])=>t),fm(([e,t],[n])=>[t,n],[0,0]),X(([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:_}},nm(Im)),Kh=`top`,qh=`bottom`,Jh=`none`;function Yh(e,t,n){return typeof e==`number`?n===Bh&&t===Kh||n===Vh&&t===qh?e:0:n===Bh?t===Kh?e.main:e.reverse:t===qh?e.main:e.reverse}function Xh(e,t){return typeof e==`number`?e:e[t]??0}var Zh=xm(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=ym(),o=Q(0),s=Q(0),c=Q(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:vm(Z(wm($(r),$(i),$(n),$(a,ah),$(c),$(o),$(t),$(e),$(s)),X(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=Jh,m=Xh(l,Kh),h=Xh(l,qh);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=Bh),i<e-f+t+h&&(p=Vh),p===Jh?null:[Math.max(u-n-Yh(a,Kh,p)-m,0),u-f-s+t+Yh(a,qh,p)+h]}),Y(e=>e!=null),um(ah)),[0,0])}},nm(Im),{singleton:!0});function Qh(e,t,n){if(dh(t)){let r=vh(e,t);return[{index:Vm(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 $h={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function eg(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:ng(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:ng(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function tg(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=Lh(t,s);return eg(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function ng(e,t,n){if(e.length===0)return[];if(!dh(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=Wm(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 rg(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var ig=xm(([{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=Q([]),g=Q(0),_=ym(),v=Q(0);J(a.topItemsIndexes,h);let y=vm(Z(wm(p,m,$(c,ah),$(i),$(r),$(l),u,$(h),$(t),$(n),$(v),e),Y(([e,t,,n,,,,,,,,r])=>{let i=r&&r.length!==n;return e&&!t&&!i}),X(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=om(g);if(n===0)return{...$h,totalCount:n};if(e===0&&t===0)return m===0?{...$h,totalCount:n}:tg(m,i,r,s,c,u||[]);if(zm(p))return m>0?null:eg(Qh(Lh(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 Wm(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 eg([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=bh(f,e,t,_);if(v.length===0)return null;let y=n-1,b=em([],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=rg(l,Kh),S=rg(l,qh);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=Wm(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=Wm(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return eg(b,h,n,c,d,s)}),Y(e=>e!==null),um()),$h);J(Z(e,Y(Zp),X(e=>e?.length)),i),J(Z(y,X(e=>e.topListHeight)),d),J(d,s),J(Z(y,X(e=>[e.top,e.bottom])),o),J(Z(y,X(e=>e.items)),_);let b=bm(Z(y,Y(({items:e})=>e.length>0),hm(i,e),Y(([{items:e},t])=>e[e.length-1].originalIndex===t-1),X(([,e,t])=>[e-1,t]),um(ah),X(([e])=>e))),x=bm(Z(y,mm(200),Y(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),X(({items:e})=>e[0].index),um()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:bm(Z(y,Y(({items:e})=>e.length>0),X(({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}}),um(ih))),startReached:x,topItemsIndexes:h,...f}},nm(Oh,Ah,Zh,Rh,Ph,Gh,jh,oh),{singleton:!0}),ag=xm(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=ym(),o=vm(Z(wm(n,e,r,t,i),X(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return J($(o),a),{totalListHeight:o,totalListHeightChanged:a}},nm(Im,ig),{singleton:!0}),og=xm(([{viewportHeight:e},{totalListHeight:t}])=>{let n=Q(!1);return{alignToBottom:n,paddingTopAddition:vm(Z(wm(n,e,t),Y(([e])=>e),X(([,e,t])=>Math.max(0,e-t)),mm(0),um()),0)}},nm(Im,ag),{singleton:!0}),sg=xm(()=>({context:Q(null)})),cg=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,behavior:r}:e>a?{...i,align:n??`end`,behavior:r}:null,lg=xm(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=ym();return J(Z(u,hm(t,c,n,a,i,r,s),hm(e),X(([[e,t,n,r,i,a,s,c],l])=>{let{align:u,behavior:d,calculateViewLocation:f=cg,done:p,...m}=e,h=yh(e,t,r-1),g=_h(h,t.offsetTree,l)+i+a,_=g+Vm(t.sizeTree,h)[1],v=c+a,y=c+n-s,b=f({itemBottom:_,itemTop:g,locationParams:{align:u,behavior:d,...m},viewportBottom:y,viewportTop:v});return b?p&&sm(Z(o,Y(e=>!e),pm(om(o)?1:2)),p):p?.(),b}),Y(e=>e!==null)),l),{scrollIntoView:u}},nm(Oh,Im,Ph,ig,km),{singleton:!0});function ug(e){return e?e===`smooth`?`smooth`:`auto`:!1}var dg=(e,t)=>typeof e==`function`?ug(e(t)):t&&ug(e),fg=xm(([{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=Q(!1),h=ym(),g=null;function _(e){im(o,{align:`end`,behavior:e,index:`LAST`})}rm(Z(wm(Z($(t),pm(1)),c),hm($(m),a,s,d),X(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=dg(n,r||a),o&&=!!s),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),Y(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g&&=(g(),null),om(n)?requestAnimationFrame(()=>{om(u)(`following output to `,{totalCount:r},Em.DEBUG),_(t)}):g=sm(e,()=>{om(u)(`following output to `,{totalCount:r},Em.DEBUG),_(t),g=null})});function v(e){let t=sm(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&!g&&(om(u)(`scrolling to bottom due to increased size`,{},Em.DEBUG),_(`auto`))});setTimeout(t,100)}rm(Z(wm($(m),t,l),Y(([e,,t])=>e&&t),fm(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),Y(({refreshed:e})=>e),hm(m,t)),([,e])=>{om(s)&&v(e!==!1)}),rm(h,()=>{v(om(m)!==!1)}),rm(wm($(m),i),([e,t])=>{e&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=Q(null),b=ym();return J(Tm(Z($(r),X(e=>e?.length??0)),Z($(t))),b),rm(Z(wm(Z(b,pm(1)),c),hm($(y),s,d,f),X(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),Y(e=>!!e),mm(0)),t=>{g&&=(g(),null),om(n)?requestAnimationFrame(()=>{om(u)(`scrolling into view`,{}),im(p,t)}):g=sm(e,()=>{om(u)(`scrolling into view`,{}),im(p,t),g=null})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},nm(Oh,Gh,Ph,Rh,jh,km,Im,sg,lg)),pg=xm(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(J(Z(s,hm(a),Y(([,e])=>e!==0),hm(i,r,t,n,e),X(([[,e],t,n,r,i,a=[]])=>tg(e,t,n,r,i,a))),o),{}),nm(Oh,Rh,ig,jh),{singleton:!0}),mg=xm(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=Q(0);return rm(Z(e,hm(r),Y(([,e])=>e!==0),X(([,e])=>({top:e}))),e=>{sm(Z(n,pm(1),Y(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{im(t,e)})})}),{initialScrollTop:r}},nm(jh,Im,ig),{singleton:!0}),hg=xm(([{scrollVelocity:e}])=>{let t=Q(!1),n=ym(),r=Q(!1);return J(Z(e,hm(r,t,n),Y(([e,t])=>!!t),X(([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}),um()),t),rm(Z(wm(t,e,n),hm(r)),([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},nm(Gh),{singleton:!0}),gg=xm(([{scrollContainerState:e,scrollTo:t}])=>{let n=ym(),r=ym(),i=ym(),a=Q(!1),o=Q(void 0);return J(Z(wm(n,r),X(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),J(Z(t,hm(r),X(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},nm(Im)),_g=xm(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=ym(),u=Q(void 0),d=Q(null),f=Q(null);return J(s,d),J(c,f),rm(Z(l,hm(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=Sh(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),J(Z(u,Y(Zp),X(vg)),i),J(Z(a,hm(u),Y(([,e])=>e!==void 0),um(),X(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},nm(Oh,Im,Rh,jh,gg));function vg(e){return{align:`start`,index:0,offset:e.scrollTop}}var yg=xm(([{topItemsIndexes:e}])=>{let t=Q(0);return J(Z(t,Y(e=>e>=0),X(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},nm(ig));function bg(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var xg=bg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Sg=xm(([{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 J(k,T.scrollSeekRangeChanged),J(Z(T.windowViewportRect,X(e=>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}},nm(Oh,Rh,Im,_g,fg,ig,Ph,xm(([{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=bm(Z(c,hm(o),fm(([,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]),Y(([e])=>e!==0),hm(r,s,n,i,p,m),Y(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===Bh),X(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},Em.DEBUG),e))));function g(n){n>0?(im(t,{behavior:`auto`,top:-n}),im(e,0)):(im(e,0),im(t,{behavior:`auto`,top:-n}))}return rm(Z(h,hm(e,a)),([t,n,r])=>{r&&xg()?im(e,n-t):g(-t)}),rm(Z(wm(vm(a,!1),e,m),Y(([e,t,n])=>!e&&!n&&t!==0),X(([e,t])=>t),mm(1)),g),J(Z(d,X(e=>({top:-e}))),t),rm(Z(l,hm(f,u),X(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);{let n=0,i=Bm(r,0),o=0,s=0;for(;o<e;){o++,n+=i;let r=t.length===s+1?1/0:t[s+1]-t[s]-1;o+r>e&&(n-=i,r=e-o+1),o+=r,n+=a(r),s++}return n}})),n=>{im(e,n),requestAnimationFrame(()=>{im(t,{top:n}),requestAnimationFrame(()=>{im(e,0),im(m,!1)})})}),{deviation:e}},nm(Im,Gh,ig,Oh,km,oh)),yg,Ah,xm(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),nm(Zh,pg,jh,hg,ag,mg,og,gg,lg,km,sg))));function Cg(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 wg=typeof document<`u`?G.useLayoutEffect:G.useEffect;function Tg(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=G.createContext({});function c(e,n){e.propsReady&&im(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];im(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];im(i,n[r])}e.propsReady&&im(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];im(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=_m(e[t.events[r]]),n),{})}return{Component:G.forwardRef((t,a)=>{let{children:d,...f}=t,[p]=G.useState(()=>em(Cm(e),e=>{c(e,f)})),[m]=G.useState(Yp(u,p));wg(()=>{for(let e of o)e in f&&rm(m[e],f[e]);return()=>{Object.values(m).map(am)}},[f,m,p]),wg(()=>{c(p,f)}),G.useImperativeHandle(a,Kp(l(p)));let h=n;return(0,K.jsx)(s.Provider,{value:p,children:n?(0,K.jsx)(h,{...Cg([...r,...i,...o],f),children:d}):d})}),useEmitter:(e,t)=>{let n=G.useContext(s)[e];wg(()=>rm(n,t),[t,n])},useEmitterValue:e=>{let t=G.useContext(s)[e],[n,r]=G.useState(Yp(om,t));return wg(()=>rm(t,e=>{e!==n&&r(Kp(e))}),[t,n]),n},usePublisher:e=>{let t=G.useContext(s);return G.useCallback(n=>{im(t[e],n)},[t,e])}}}var Eg=G.createContext(void 0),Dg=G.createContext(void 0),Og=typeof document<`u`?G.useLayoutEffect:G.useEffect;function kg(e){return`self`in e}function Ag(e){return`body`in e}function jg(e,t,n,r=$p,i,a){let o=G.useRef(null),s=G.useRef(null),c=G.useRef(null),l=G.useCallback(n=>{let r,i,o,l=n.target;if(Ag(l)||kg(l)){let e=kg(l)?l:l.defaultView;o=a?e.scrollX:e.scrollY,r=a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a?e.innerWidth:e.innerHeight}else o=a?l.scrollLeft:l.scrollTop,r=a?l.scrollWidth:l.scrollHeight,i=a?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync?u():Gs.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]);G.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?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;kg(r)?(u=Math.max(uh(r.document.documentElement,a?`width`:`height`),a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a?r.innerWidth:r.innerHeight,d=a?window.scrollX:window.scrollY):(u=r[a?`scrollWidth`:`scrollHeight`],l=uh(r,a?`width`:`height`),d=r[a?`scrollLeft`:`scrollTop`]);let f=u-l;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),zh(l,u)||n.top===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}function d(e){a&&(e={behavior:e.behavior,left:e.top}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}var Mg=`-webkit-sticky`,Ng=`sticky`,Pg=bg(()=>{if(typeof document>`u`)return Ng;let e=document.createElement(`div`);return e.style.position=Mg,e.style.position===Mg?Mg:Ng});function Fg(e){return e}var Ig=xm(([e,t])=>({...e,...t}),nm(Sg,xm(()=>{let e=Q(e=>`Item ${e}`),t=Q(e=>`Group ${e}`),n=Q({}),r=Q(Fg),i=Q(`div`),a=Q($p),o=(e,t=null)=>vm(Z(n,X(t=>t[e]),um()),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`)}}))),Lg=({height:e})=>(0,K.jsx)(`div`,{style:{height:e}}),Rg={overflowAnchor:`none`,position:Pg(),zIndex:1},zg={overflowAnchor:`none`},Bg={...zg,display:`inline-block`,height:`100%`},Vg=G.memo(function({showTopList:e=!1}){let t=r_(`listState`),n=i_(`sizeRanges`),r=r_(`useWindowScroll`),i=r_(`customScrollParent`),a=i_(`windowScrollContainerState`),o=i_(`scrollContainerState`),s=i||r?a:o,c=r_(`itemContent`),l=r_(`context`),u=r_(`groupContent`),d=r_(`trackItemSizes`),f=r_(`itemSize`),p=r_(`log`),m=i_(`gap`),h=r_(`horizontalDirection`),{callbackRef:g}=Mm(n,f,d,e?$p:s,p,m,i,h,r_(`skipAnimationFrameInResizeObserver`)),[_,v]=G.useState(0);n_(`deviation`,e=>{_!==e&&v(e)});let y=r_(`EmptyPlaceholder`),b=r_(`ScrollSeekPlaceholder`)||Lg,x=r_(`ListComponent`),S=r_(`ItemComponent`),C=r_(`GroupComponent`),w=r_(`computeItemKey`),T=r_(`isSeeking`),E=r_(`groupIndices`).length>0,D=r_(`alignToBottom`),O=r_(`initialItemFinalLocationReached`),k=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginLeft:_===0?D?`auto`:0:_,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y?(0,K.jsx)(y,{...Kg(y,l)}):(0,K.jsx)(x,{...Kg(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,G.createElement)(b,{...Kg(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,G.createElement)(C,{...Kg(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Rg},u(e.index,l)):(0,G.createElement)(S,{...Kg(S,l),...qg(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?Bg:zg},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),Hg={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},Ug={outline:`none`,overflowX:`auto`,position:`relative`},Wg=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:{}}),Gg={position:Pg(),top:0,width:`100%`,zIndex:1};function Kg(e,t){if(typeof e!=`string`)return{context:t}}function qg(e,t){return{item:typeof e==`string`?void 0:t}}var Jg=G.memo(function(){let e=r_(`HeaderComponent`),t=i_(`headerHeight`),n=r_(`HeaderFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,r_(`skipAnimationFrameInResizeObserver`)),i=r_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null}),Yg=G.memo(function(){let e=r_(`FooterComponent`),t=i_(`footerHeight`),n=r_(`HeaderFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,r_(`skipAnimationFrameInResizeObserver`)),i=r_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null});function Xg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return G.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}=jg(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,K.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?Ug:Hg,...i},tabIndex:0,...o,...Kg(c,a),children:r})})}function Zg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return G.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=G.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=jg(s,l,c,t(`scrollerRef`),f);return Og(()=>(h.current=f||p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,K.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?{}:{height:u+d}},...o,...Kg(c,a),children:r})})}var Qg=({children:e})=>{let t=G.useContext(Eg),n=i_(`viewportHeight`),r=i_(`fixedItemHeight`),i=r_(`alignToBottom`),a=r_(`horizontalDirection`),o=Am(G.useMemo(()=>Jp(n,e=>uh(e,a?`width`:`height`)),[n,a]),!0,r_(`skipAnimationFrameInResizeObserver`));return G.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:Wg(i),children:e})},$g=({children:e})=>{let t=G.useContext(Eg),n=i_(`windowViewportRect`),r=i_(`fixedItemHeight`),i=Fm(n,r_(`customScrollParent`),r_(`skipAnimationFrameInResizeObserver`)),a=r_(`alignToBottom`);return G.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Wg(a),children:e})},e_=({children:e})=>{let t=r_(`TopItemListComponent`)||`div`,n=r_(`headerHeight`),r={...Gg,marginTop:`${n}px`},i=r_(`context`);return(0,K.jsx)(t,{style:r,...Kg(t,i),children:e})},{Component:t_,useEmitter:n_,useEmitterValue:r_,usePublisher:i_}=Tg(Ig,{required:{},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`}},G.memo(function(e){let t=r_(`useWindowScroll`),n=r_(`topItemsIndexes`).length>0,r=r_(`customScrollParent`),i=r_(`context`);return(0,K.jsxs)(r||t?o_:a_,{...e,context:i,children:[n&&(0,K.jsx)(e_,{children:(0,K.jsx)(Vg,{showTopList:!0})}),(0,K.jsxs)(r||t?$g:Qg,{children:[(0,K.jsx)(Jg,{}),(0,K.jsx)(Vg,{}),(0,K.jsx)(Yg,{})]})]})})),a_=Xg({useEmitter:n_,useEmitterValue:r_,usePublisher:i_}),o_=Zg({useEmitter:n_,useEmitterValue:r_,usePublisher:i_}),s_=t_,c_=xm(([e,t])=>({...e,...t}),nm(Sg,xm(()=>{let e=Q(e=>(0,K.jsxs)(`td`,{children:[`Item $`,e]})),t=Q(null),n=Q(e=>(0,K.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=Q(null),i=Q(null),a=Q({}),o=Q(Fg),s=Q($p),c=(e,t=null)=>vm(Z(a,X(t=>t[e]),um()),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`)}}))),l_=({height:e})=>(0,K.jsx)(`tr`,{children:(0,K.jsx)(`td`,{style:{height:e}})}),u_=({height:e})=>(0,K.jsx)(`tr`,{children:(0,K.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),d_={overflowAnchor:`none`},f_={position:Pg(),zIndex:2,overflowAnchor:`none`},p_=G.memo(function({showTopList:e=!1}){let t=y_(`listState`),n=y_(`computeItemKey`),r=y_(`firstItemIndex`),i=y_(`context`),a=y_(`isSeeking`),o=y_(`fixedHeaderHeight`),s=y_(`groupIndices`).length>0,c=y_(`itemContent`),l=y_(`groupContent`),u=y_(`ScrollSeekPlaceholder`)||l_,d=y_(`GroupComponent`),f=y_(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]),m=(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,G.createElement)(u,{...Kg(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,G.createElement)(d,{...Kg(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...f_,top:o}},l(t.index,i)):(0,G.createElement)(f,{...Kg(f,i),...qg(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?{...f_,top:o+g}:d_},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))});return(0,K.jsx)(K.Fragment,{children:m})}),m_=G.memo(function(){let e=y_(`listState`),t=y_(`topItemsIndexes`).length>0,n=b_(`sizeRanges`),r=y_(`useWindowScroll`),i=y_(`customScrollParent`),a=b_(`windowScrollContainerState`),o=b_(`scrollContainerState`),s=i||r?a:o,c=y_(`trackItemSizes`),{callbackRef:l,ref:u}=Mm(n,y_(`itemSize`),c,s,y_(`log`),void 0,i,!1,y_(`skipAnimationFrameInResizeObserver`)),[d,f]=G.useState(0);v_(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=y_(`EmptyPlaceholder`),m=y_(`FillerRow`)||u_,h=y_(`TableBodyComponent`),g=y_(`paddingTopAddition`),_=y_(`statefulTotalCount`),v=y_(`context`);if(_===0&&p)return(0,K.jsx)(p,{...Kg(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,K.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,K.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,K.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...Kg(h,v),children:[S,t&&(0,K.jsx)(p_,{showTopList:!0}),(0,K.jsx)(p_,{}),C]})}),h_=({children:e})=>{let t=G.useContext(Eg),n=b_(`viewportHeight`),r=b_(`fixedItemHeight`),i=Am(G.useMemo(()=>Jp(n,e=>uh(e,`height`)),[n]),!0,y_(`skipAnimationFrameInResizeObserver`));return G.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:Wg(!1),children:e})},g_=({children:e})=>{let t=G.useContext(Eg),n=b_(`windowViewportRect`),r=b_(`fixedItemHeight`),i=Fm(n,y_(`customScrollParent`),y_(`skipAnimationFrameInResizeObserver`));return G.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,K.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Wg(!1),children:e})},{Component:__,useEmitter:v_,useEmitterValue:y_,usePublisher:b_}=Tg(c_,{required:{},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`}},G.memo(function(e){let t=y_(`useWindowScroll`),n=y_(`customScrollParent`),r=b_(`fixedHeaderHeight`),i=b_(`fixedFooterHeight`),a=y_(`fixedHeaderContent`),o=y_(`fixedFooterContent`),s=y_(`context`),c=Am(G.useMemo(()=>Jp(r,e=>uh(e,`height`)),[r]),!0,y_(`skipAnimationFrameInResizeObserver`)),l=Am(G.useMemo(()=>Jp(i,e=>uh(e,`height`)),[i]),!0,y_(`skipAnimationFrameInResizeObserver`)),u=n||t?S_:x_,d=n||t?g_:h_,f=y_(`TableComponent`),p=y_(`TableHeadComponent`),m=y_(`TableFooterComponent`),h=a?(0,K.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...Kg(p,s),children:a()},`TableHead`):null,g=o?(0,K.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...Kg(m,s),children:o()},`TableFoot`):null;return(0,K.jsx)(u,{...e,...Kg(u,s),children:(0,K.jsx)(d,{children:(0,K.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...Kg(f,s),children:[h,(0,K.jsx)(m_,{},`TableBody`),g]})})})})),x_=Xg({useEmitter:v_,useEmitterValue:y_,usePublisher:b_}),S_=Zg({useEmitter:v_,useEmitterValue:y_,usePublisher:b_}),C_={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},w_={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:T_,floor:E_,max:D_,min:O_,round:k_}=Math;function A_(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function j_(e){return{...w_,items:e}}function M_(e,t){return e&&e.width===t.width&&e.height===t.height}function N_(e,t){return e&&e.column===t.column&&e.row===t.row}var P_=xm(([{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=Q(0),C=Q(0),w=Q(C_),T=Q({height:0,width:0}),E=Q({height:0,width:0}),D=ym(),O=ym(),k=Q(0),A=Q(null),j=Q({column:0,row:0}),M=ym(),N=ym(),P=Q(!1),F=Q(0),I=Q(!0),ee=Q(!1),te=Q(!1);rm(Z(m,hm(F),Y(([e,t])=>!!t)),()=>{im(I,!1)}),rm(Z(wm(m,I,E,T,F,ee),Y(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{im(ee,!0),Ih(1,()=>{im(D,e)}),sm(Z(l),()=>{im(t,[0,0]),im(I,!0)})}),J(Z(N,Y(e=>e!=null&&e.scrollTop>0),dm(0)),C),rm(Z(m,hm(N),Y(([,e])=>e!=null)),([,e])=>{e&&(im(T,e.viewport),im(E,e.item),im(j,e.gap),e.scrollTop>0&&(im(P,!0),sm(Z(l,pm(1)),e=>{im(P,!1)}),im(c,{top:e.scrollTop})))}),J(Z(T,X(({height:e})=>e)),d),J(Z(wm($(T,M_),$(E,M_),$(j,(e,t)=>e&&e.column===t.column&&e.row===t.row),$(l)),X(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),M),J(Z(wm($(S),r,$(j,N_),$(E,M_),$(T,M_),$(A),$(C),$(P),$(I),$(F)),Y(([,,,,,,,e])=>!e),X(([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 C_;if(p===0){let t=Lh(l,e);return j_(A_(t,t+Math.max(s-1,0),o))}let h=F_(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*E_((t+d)/(f+d)),_=h*T_((n+d)/(f+d))-1,_=O_(e-1,D_(_,h-1)),g=O_(_,D_(0,g))):(g=0,_=-1);let v=A_(g,_,o),{bottom:y,top:b}=I_(a,r,i,v),x=T_(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),J(Z(A,Y(e=>e!==null),X(e=>e.length)),S),J(Z(wm(T,E,w,j),Y(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),X(([e,t,{items:n},r])=>{let{bottom:i,top:a}=I_(e,r,t,n);return[a,i]}),um(ah)),t);let ne=Q(!1);J(Z(l,hm(ne),X(([e,t])=>t||e!==0)),ne);let re=bm(Z(wm(w,S),Y(([{items:e}])=>e.length>0),hm(ne),Y(([[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}),X(([[,e]])=>e-1),um())),ie=bm(Z($(w),Y(({items:e})=>e.length>0&&e[0].index===0),dm(0),um())),ae=bm(Z($(w),hm(P),Y(([{items:e},t])=>e.length>0&&!t),X(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),um(ih),mm(0)));J(ae,p.scrollSeekRangeChanged),J(Z(D,hm(T,E,S,j),X(([e,t,n,r,i])=>{let a=Nh(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=D_(0,l,O_(r-1,l));let u=L_(t,i,n,l);return o===`end`?u=k_(u-t.height+n.height):o===`center`&&(u=k_(u-t.height/2+n.height/2)),c&&(u+=c),{behavior:s,top:u}})),c);let oe=vm(Z(w,X(e=>e.offsetBottom+e.bottom)),0);return J(Z(b,X(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:te,initialTopMostItemIndex:F,totalListHeight:oe,...f,endReached:re,propsReady:h,rangeChanged:ae,startReached:ie,stateChanged:M,stateRestoreInProgress:P,...x}},nm(Zh,Im,Gh,hg,jh,gg,km));function F_(e,t,n){return D_(1,E_((e+n)/(E_(t)+n)))}function I_(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=L_(e,t,n,r[0].index);return{bottom:L_(e,t,n,r[r.length-1].index)+i,top:a}}function L_(e,t,n,r){let i=E_(r/F_(e.width,n.width,t.column)),a=i*n.height+D_(0,i-1)*t.row;return a>0?a+t.row:a}var R_=xm(([e,t])=>({...e,...t}),nm(P_,xm(()=>{let e=Q(e=>`Item ${e}`),t=Q({}),n=Q(null),r=Q(`virtuoso-grid-item`),i=Q(`virtuoso-grid-list`),a=Q(Fg),o=Q(`div`),s=Q($p),c=(e,n=null)=>vm(Z(t,X(t=>t[e]),um()),n),l=Q(!1),u=Q(!1);return J($(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`)}}))),z_=G.memo(function(){let e=K_(`gridState`),t=K_(`listClassName`),n=K_(`itemClassName`),r=K_(`itemContent`),i=K_(`computeItemKey`),a=K_(`isSeeking`),o=q_(`scrollHeight`),s=K_(`ItemComponent`),c=K_(`ListComponent`),l=K_(`ScrollSeekPlaceholder`),u=K_(`context`),d=q_(`itemDimensions`),f=q_(`gap`),p=K_(`log`),m=K_(`stateRestoreInProgress`),h=q_(`reportReadyState`),g=Am(G.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:X_(`column-gap`,getComputedStyle(e).columnGap,p),row:X_(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return Og(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,K.jsx)(c,{className:t,ref:g,...Kg(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,K.jsx)(l,{...Kg(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,G.createElement)(s,{...Kg(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),B_=G.memo(function(){let e=K_(`HeaderComponent`),t=q_(`headerHeight`),n=K_(`headerFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,!1),i=K_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null}),V_=G.memo(function(){let e=K_(`FooterComponent`),t=q_(`footerHeight`),n=K_(`headerFooterTag`),r=Am(G.useMemo(()=>e=>{t(uh(e,`height`))},[t]),!0,!1),i=K_(`context`);return e?(0,K.jsx)(n,{ref:r,children:(0,K.jsx)(e,{...Kg(e,i)})}):null}),H_=({children:e})=>{let t=G.useContext(Dg),n=q_(`itemDimensions`),r=q_(`viewportDimensions`),i=Am(G.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return G.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,K.jsx)(`div`,{ref:i,style:Wg(!1),children:e})},U_=({children:e})=>{let t=G.useContext(Dg),n=q_(`windowViewportRect`),r=q_(`itemDimensions`),i=Fm(n,K_(`customScrollParent`),!1);return G.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,K.jsx)(`div`,{ref:i,style:Wg(!1),children:e})},{Component:W_,useEmitter:G_,useEmitterValue:K_,usePublisher:q_}=Tg(R_,{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`}},G.memo(function({...e}){let t=K_(`useWindowScroll`),n=K_(`customScrollParent`),r=n||t?Y_:J_,i=n||t?U_:H_,a=K_(`context`);return(0,K.jsx)(r,{...e,...Kg(r,a),children:(0,K.jsxs)(i,{children:[(0,K.jsx)(B_,{}),(0,K.jsx)(z_,{}),(0,K.jsx)(V_,{})]})})})),J_=Xg({useEmitter:G_,useEmitterValue:K_,usePublisher:q_}),Y_=Zg({useEmitter:G_,useEmitterValue:K_,usePublisher:q_});function X_(e,t,n){return t!==`normal`&&!(t!=null&&t.endsWith(`px`))&&n(`${e} was not resolved to pixel value correctly`,t,Em.WARN),t===`normal`?0:parseInt(t??`0`,10)}function Z_(e){let t=(0,q.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,K.jsx)(Fe,{"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_=G.memo(Z_);function $_(e,...t){return typeof e==`function`?e(...t):e}function ev(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 tv(e){let t=(0,q.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=Qr(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(nv),j.length>0){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(ae,{"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,K.jsx)(ae,{"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,K.jsx)(s_,{"data-slot":`select-list`,style:{height:E},totalCount:O.visibleOptions.length,overscan:50,itemContent:e=>{let t=O.visibleOptions[e];return(0,K.jsxs)(K.Fragment,{children:[e===0&&j,N(e),(0,K.jsx)(Q_,{option:t,checked:O.isChecked(t.value),renderOption:h})]})}});let e=O.visibleOptions.flatMap((e,t)=>{let n=N(t),r=(0,K.jsx)(Q_,{option:e,checked:O.isChecked(e.value),renderOption:h},String(e.value));return n?[n,r]:[r]});return(0,K.jsxs)(K.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,K.jsx)(`span`,{className:`text-muted-foreground`,children:x}):(0,K.jsx)(ei,{items:t.map(O.labelOf),max:3})},t[26]=O.labelOf,t[27]=x,t[28]=I):I=t[28];let ee=I,te=e[`data-testid`],ne;t[29]===O?ne=t[30]:(ne=e=>O.labelOf(e),t[29]=O,t[30]=ne);let re=b?ee:void 0,ie;t[31]!==p||t[32]!==C?(ie=W({"w-full":C},p),t[31]=p,t[32]=C,t[33]=ie):ie=t[33];let oe=O.searchQuery,se=O.setSearchQuery,ce=O.open,le=O.setOpen,ue;t[34]===w?ue=t[35]:(ue=$_(w),t[34]=w,t[35]=ue);let de;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]!==te||t[44]!==ne||t[45]!==re||t[46]!==ie||t[47]!==ue?(de={"data-slot":`select-root`,"data-testid":te,displayValue:ne,renderValue:re,placeholder:x,className:ie,shouldFilter:!1,search:oe,onSearchChange:se,open:ce,onOpenChange:le,emptyState:ue,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]=te,t[44]=ne,t[45]=re,t[46]=ie,t[47]=ue,t[48]=de):de=t[48];let fe=de,pe;return t[49]!==fe||t[50]!==A||t[51]!==a||t[52]!==F||t[53]!==r?(pe=a?(0,K.jsx)(Ee,{...fe,multiple:!0,value:r,onValueChange:A,children:F()}):(0,K.jsx)(Ee,{...fe,multiple:!1,value:r,onValueChange:A,children:F()}),t[49]=fe,t[50]=A,t[51]=a,t[52]=F,t[53]=r,t[54]=pe):pe=t[54],pe}function nv(e){let t=`enabled`in e?!e.enabled:e.items.length===0;return(0,K.jsx)(g,{"data-slot":`select-bulk`,className:`pl-6 m-1 py-1`,value:`__bulk_${e.kind}`,disabled:t,onSelect:()=>{t||e.run()},children:ev(e)},e.kind)}var rv=er,iv=rr,av=Qn,ov=ir,sv=e=>{let t=(0,q.c)(16),{error:n,badData:r,shadowRoot:i}=e;if(n instanceof ut){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.jsx)(Ts,{children:`Bad Data`}),t[0]=e):e=t[0];let a;t[1]===n.issues?a=t[2]:(a=n.issues.map(lv),t[1]=n.issues,t[2]=a);let o;t[3]===a?o=t[4]:(o=(0,K.jsx)(`div`,{className:`text-md prose dark:prose-invert`,children:(0,K.jsx)(`ul`,{children:a})}),t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(ov,{className:`py-2 text-[0.84375rem]`,children:`View Data:`}),t[5]=s):s=t[5];let c;t[6]===r?c=t[7]:(c=(0,K.jsx)(Pi,{data:r}),t[6]=r,t[7]=c);let l;t[8]!==i||t[9]!==c?(l=(0,K.jsx)(rv,{type:`single`,collapsible:!0,children:(0,K.jsxs)(av,{value:`item-1`,className:`text-muted-foreground border-muted-foreground-20`,children:[s,(0,K.jsx)(iv,{className:`text-[0.84375rem]`,children:(0,K.jsx)(oi,{container:i,children:c})})]})}),t[8]=i,t[9]=c,t[10]=l):l=t[10];let u;return t[11]!==o||t[12]!==l?(u=(0,K.jsxs)(Es,{variant:`destructive`,children:[e,o,l]}),t[11]=o,t[12]=l,t[13]=u):u=t[13],u}let a;return t[14]===n.message?a=t[15]:(a=(0,K.jsx)(`div`,{children:n.message}),t[14]=n.message,t[15]=a),a};function cv(e,t,n){return(0,K.jsx)(sv,{error:e,badData:t,shadowRoot:n})}function lv(e){let t=e.path.join(`.`);return(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`span`,{className:`font-bold`,children:t}),`: `,e.message]},t)}var uv=3,dv=150;function fv({hostElement:e,plugin:t,children:n,getInitialValue:r},i){let[o,c]=(0,G.useState)(n),[l,u]=(0,G.useState)(r()),{theme:d}=Xo(),[f,p]=(0,G.useState)(()=>t.validator.safeParse(Ae(e))),[h,g]=(0,G.useState)(0);(0,G.useImperativeHandle)(i,()=>({reset:()=>{u(r()),p(t.validator.safeParse(Ae(e))),g(e=>e+1)},setChildren:e=>{c(e)}})),Xt(e,xs.TYPE,t=>{t.detail.element===e&&u(t.detail.value)}),(0,G.useEffect)(()=>{let n=new MutationObserver(n=>{n.some(e=>e.type===`attributes`&&e.attributeName?.startsWith(`data-`))&&p(t.validator.safeParse(Ae(e)))});return n.observe(e,{attributes:!0}),()=>{n.disconnect()}},[e,t.validator]);let _=s(t=>{u(n=>{let r=qt.asUpdater(t)(n);return Lp(r,n)||e.dispatchEvent(bs(r,e)),r})}),v=(0,G.useMemo)(()=>{if(!t.functions)return{};let n={};for(let[r,i]of Zt.entries(t.functions)){let{input:t,output:o}=i;n[r]=async(...n)=>{Qt(n.length<=1,`Plugin functions only supports a single argument. Called ${r}`);let i=fn(),s=ee.findElementThroughShadowDOMs(e)?.id,c=s?ee.parse(s):null;if(c&&!i){let e=a.get(ve),t=e.cellRuntime[c],n=e.cellData[c];if(m({executionTime:t.runElapsedTimeMs??n.lastExecutionTime,status:t.status,errored:t.errored,interrupted:t.interrupted,stopped:t.stopped}))throw new hs}else U.warn(`Cell ID ${c} cannot be found`);let l=yv(t,n[0]);for(let t=0;;t++){let n=Sv(e);Qt(n,`Object ID should exist`);let i=await Rt.request({args:l,functionName:r,namespace:n});if(i.status.code===`ok`)return yv(o,i.return_value);let a=i.found===!1;if(a&&t<uv){let e=dv*2**t;await new Promise(t=>setTimeout(t,e));continue}throw U.error(i.status),a?new ps:Error(i.status.message||`Unknown error`)}}}return n},[t.functions,e,h]);return f.success?(0,K.jsx)(Hn,{children:(0,K.jsx)(`div`,{className:`contents ${d}`,children:(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(`div`,{}),children:(0,K.jsx)(Zi,{children:t.render({setValue:_,value:l,data:f.data,children:o,host:e,functions:v})})})})}):cv(f.error,Zt.mapValues(e.dataset,e=>typeof e==`string`?F(e):e),e.shadowRoot)}var pv=G.forwardRef(fv),mv=new Map,hv=`__custom_marimo_element__`;function gv(e){let t=class extends HTMLElement{observer;root;mounted=!1;pluginRef=(0,G.createRef)();__type__=hv;constructor(){super(),this.attachShadow({mode:`open`}),this.copyStyles(),this.observer=new MutationObserver(()=>{this.pluginRef.current?.setChildren(this.getChildren())})}connectedCallback(){this.isLightDOMChildOfMarimoElement()||(this.mounted||(Qt(this.shadowRoot,`Shadow root should exist`),this.root&&this.root.unmount(),this.root=Xl.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(vv(e))return!0;e=e.parentElement}return!1}reset(){this.dispatchEvent(bs(F(this.dataset.initialValue),this)),this.rerender()}rerender(){this.pluginRef.current?.reset()}getChildren(){return this.children.length===0?null:this.children.length===1?us({html:this.innerHTML,alwaysSanitizeHtml:!1}):Array.from(this.children).map((e,t)=>(0,K.jsx)(G.Fragment,{children:us({html:e.outerHTML,alwaysSanitizeHtml:!1})},t))}async mountReactComponent(){this.mounted=!0,Qt(this.root,`Root must be defined`),this.root.render((0,K.jsx)(o,{store:a,children:(0,K.jsx)(Wf,{children:(0,K.jsx)(pv,{hostElement:this,plugin:e,ref:this.pluginRef,getInitialValue:()=>p(this,Nt.INSTANCE),children:this.getChildren()})})}))}async copyStyles(){let t=this.shadowRoot;if(Qt(t,`Shadow root should exist`),!this.isAdoptedStyleSheetsSupported()){U.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:_v(e));for(let e of n){let t=e.href??(e.ownerNode instanceof HTMLElement?e.ownerNode.dataset.viteDevId:void 0)??e.title;if(t&&!mv.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{}mv.set(t,n)}}if(t.adoptedStyleSheets=[...mv.values()],e.cssStyles){let n=new CSSStyleSheet;n.replaceSync(e.cssStyles.join(`
|
|
4
4
|
`)),t.adoptedStyleSheets=[...t.adoptedStyleSheets,n]}}copyStylesFallback(){let t=this.shadowRoot;Qt(t,`Shadow root should exist`),U.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(!_v(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(`
|