@marimo-team/frontend 0.23.2-dev40 → 0.23.2-dev42
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/__vite-browser-external-DgbEhFq1.js +1 -0
- package/dist/assets/{edit-page-C28CPNWD.js → edit-page-DLoHgnmR.js} +3 -3
- package/dist/assets/file-explorer-panel-BUgLGfwg.js +26 -0
- package/dist/assets/{index-ddxYLCBl.js → index-D7RqQR10.js} +6 -6
- package/dist/assets/{panels-CHFFNaFY.js → panels-ChT_IPtH.js} +1 -1
- package/dist/assets/{run-page-Tt0WlqGQ.js → run-page-BtEws7vt.js} +1 -1
- package/dist/assets/state-BpNPsbIR.js +3 -0
- package/dist/assets/{worker-BPV9SmHz.js → worker-ztl1wuLb.js} +2 -2
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/__mocks__/requests.ts +1 -0
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +33 -0
- package/src/components/editor/file-tree/file-explorer.tsx +7 -33
- package/src/components/editor/file-tree/requesting-tree.tsx +41 -0
- package/src/components/editor/file-tree/state.tsx +1 -0
- package/src/core/islands/bridge.ts +1 -0
- package/src/core/network/requests-lazy.ts +1 -0
- package/src/core/network/requests-network.ts +8 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.tsx +1 -0
- package/src/core/network/types.ts +3 -0
- package/src/core/wasm/bridge.ts +11 -0
- package/src/core/wasm/worker/types.ts +3 -0
- package/src/core/wasm/worker/worker.ts +1 -0
- package/dist/assets/__vite-browser-external-DT1nudb6.js +0 -1
- package/dist/assets/file-explorer-panel-DeoEBy9i.js +0 -26
- package/dist/assets/state-BV4n_RxL.js +0 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var Ot=Object.defineProperty;var $t=(t,e,n)=>e in t?Ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Q=(t,e,n)=>$t(t,typeof e!="symbol"?e+"":e,n);import{s as Ae}from"./chunk-LvLJmgfZ.js";import{i as Tt,l as fe,n as J,p as Ee,u as he}from"./useEvent-D91BmmQi.js";import{t as Rt}from"./react-Bj1aDYRI.js";import{E as At,Mn as Ie,_i as Be,hr as Et,pi as It}from"./cells-9Zp_JbEx.js";import"./react-dom-CSu739Rf.js";import{t as oe}from"./compiler-runtime-B3qBwwSJ.js";import{_ as je,v as Bt}from"./useEventListener-BR0C1MaI.js";import{t as Vt}from"./invariant-BUdrueMv.js";import{p as Ht,u as Ve}from"./utils-DIGrmLDO.js";import{S as xe}from"./config-Calf6e81.js";import{t as re}from"./cn-DCUzRj2J.js";import{t as Lt}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import{n as qt}from"./multi-map-rafH3cg3.js";import{o as Ut}from"./alert-dialog-BGBdrcqJ.js";import"./popover-UExmgBsf.js";import{a as $,c as ce,p as He,r as Le,t as qe}from"./dropdown-menu-D1A3cFC8.js";import{a as Wt,gt as be,i as Ue,o as ue}from"./JsonOutput-CaMHqTRB.js";import{c as Gt,i as ve,r as ge}from"./download-CsVG4qrR.js";import{t as E}from"./tooltip-Gcwqb_SK.js";import{n as Kt,t as T}from"./button-D9nb17Rw.js";import{St as Jt}from"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{n as Yt,r as we}from"./requests-DIwGYs0l.js";import{t as X}from"./createLucideIcon-D5guW7EU.js";import{a as We,c as Ge,i as Ke,n as ye,o as Ne,r as Zt,t as Qt}from"./state-Dlj7aAV2.js";import{n as Xt}from"./LazyAnyLanguageCodeMirror-DQ37z5WJ.js";import{t as ea}from"./x-C-6liIBr.js";import{n as ke}from"./maps-C48Oksn0.js";import{n as Fe}from"./markdown-renderer-BclMAJo1.js";import{u as ta}from"./toDate-B5A0DFEz.js";import{t as Ce}from"./copy-BwrPA9zQ.js";import{t as aa}from"./eye-off-n1Li95bE.js";import{a as na,i as Je,n as Ye,r as sa,t as ra}from"./file-icons-DLa7-MLk.js";import{t as Ze}from"./file-BrdxGLRX.js";import{i as Qe,r as ia,t as Xe}from"./add-connection-dialog-BTUO6NJ0.js";import{n as _e,t as la}from"./spinner-jEqwgi_c.js";import{t as et}from"./plus-BueqiM86.js";import{t as tt}from"./refresh-cw-BmiNHssk.js";import{t as oa}from"./save-B_q9ApPf.js";import{t as ca}from"./trash-2-C5AzNaHr.js";import{t as da}from"./triangle-alert-CBEvAwaa.js";import{i as ha,n as ma,t as pa}from"./es-CjWf0wU3.js";import"./dist-BwejP-9J.js";import"./dist-G3xLh7ZX.js";import"./dist-idZNafp8.js";import"./dist-DfWgLTCQ.js";import"./dist-Dg3CCt0r.js";import{t as I}from"./use-toast-PYIpV284.js";import{t as Se}from"./paths-DsQUzvvb.js";import"./session-DdhIEena.js";import"./purify.es-CeTCD9Zj.js";import"./dates-CtmdgiVR.js";import{n as me}from"./copy-BnK_ki61.js";import{t as fa}from"./copy-icon-D189KR4Z.js";import{t as at}from"./context-BrNoqz7t.js";import{n as nt}from"./ImperativeModal-CAFE3UV7.js";import{r as xa}from"./errors-DVkmLSXX.js";import{n as ua,t as st}from"./blob-CpeNXBj-.js";import"./utils-DVodi8oQ.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{a as ga,i as ya,n as Pe,r as ja,t as ba}from"./tree-Dtn4o2IZ.js";import{n as va,t as wa}from"./alert-DD-RU0QZ.js";import{n as rt}from"./error-banner-BxlXxssi.js";import{n as De}from"./useAsyncData-BRNkjHs1.js";import{a as Na,o as it,t as ka,u as Fa}from"./command-DQS2IzwJ.js";import"./chunk-5FQGJX7Z-nCjg4iIq.js";import"./html-to-image-BB3CKaMw.js";import{o as Ca}from"./focus-COBUb5b6.js";import"./react-resizable-panels.browser.esm-xQHRvEag.js";import{a as _a}from"./renderShortcut-B-72v1dC.js";import{t as Sa}from"./bundle.esm-sq57iaa5.js";import{t as lt}from"./useAddCell-DgomfDJt.js";import{a as Pa,c as ee,d as Me,l as ot,u as ct}from"./components-D8goxQ66.js";import{t as Da}from"./empty-state-CrP10sqm.js";import{t as ze}from"./formatting-CbFi9xG8.js";import{a as Ma,i as za,n as dt,r as ht,t as mt}from"./components-Cdl3TnkR.js";import{n as pt,t as Oa}from"./marimo-icons-Ce24dQVN.js";import{t as $a}from"./links-DhwG_EVu.js";var Ta=X("book-plus",[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]),Ra=X("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["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"}]]),ft=X("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]),Aa=X("file-symlink",[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"huwfnr"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}]]),xt=X("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),ut=X("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Ea=X("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Ia=X("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),gt=X("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),z=Ae(Rt(),1),Ba=oe(),a=Ae(Lt(),1);const yt=t=>{let e=(0,Ba.c)(17),{filename:n,filenameIcon:i,onBack:r,onRefresh:s,onDownload:d,actions:c}=t,h;e[0]===r?h=e[1]:(h=r&&(0,a.jsx)(E,{content:"Back to file list",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:r,children:(0,a.jsx)(Ge,{className:"h-4 w-4"})})}),e[0]=r,e[1]=h);let l;e[2]!==n||e[3]!==i?(l=n?(0,a.jsxs)("span",{className:"flex items-center gap-1.5 flex-1 min-w-0 text-xs font-semibold truncate",children:[i,n]}):(0,a.jsx)("span",{className:"flex-1"}),e[2]=n,e[3]=i,e[4]=l):l=e[4];let f;e[5]===s?f=e[6]:(f=s&&(0,a.jsx)(E,{content:"Refresh",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:s,children:(0,a.jsx)(tt,{className:"h-3.5 w-3.5"})})}),e[5]=s,e[6]=f);let x;e[7]===d?x=e[8]:(x=d&&(0,a.jsx)(E,{content:"Download",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:d,children:(0,a.jsx)(be,{className:"h-3.5 w-3.5"})})}),e[7]=d,e[8]=x);let p;e[9]!==c||e[10]!==f||e[11]!==x?(p=(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[f,c,x]}),e[9]=c,e[10]=f,e[11]=x,e[12]=p):p=e[12];let g;return e[13]!==h||e[14]!==l||e[15]!==p?(g=(0,a.jsxs)("div",{className:"flex items-center shrink-0 border-b px-1 gap-1",children:[h,l,p]}),e[13]=h,e[14]=l,e[15]=p,e[16]=g):g=e[16],g};var Va=new Set(["http","file","in-memory"]);function Oe(t){return JSON.stringify(t).slice(1,-1)}const jt=[{id:"read-file",label:"Insert read snippet",icon:Ta,getCode:t=>{if(t.entry.kind==="directory")return null;let e=Oe(t.entry.path);return t.backendType==="obstore"?`_data = ${t.variableName}.get("${e}").bytes()
|
|
2
|
+
_data`:`_data = ${t.variableName}.cat_file("${e}")
|
|
3
|
+
_data`}},{id:"download-file",label:"Insert download snippet",icon:Aa,getCode:t=>{if(t.entry.kind==="directory")return null;let e=Oe(t.entry.path);if(t.backendType==="obstore")return Va.has(t.protocol)?null:`from datetime import timedelta
|
|
4
|
+
from obstore import sign
|
|
5
|
+
|
|
6
|
+
signed_url = sign(
|
|
7
|
+
${t.variableName}, "GET", "${e}",
|
|
8
|
+
expires_in=timedelta(hours=1),
|
|
9
|
+
)
|
|
10
|
+
signed_url`;let n=Oe(t.entry.path.split("/").pop()||"download");return`${t.variableName}.get("${e}", "${n}")`}}];var Ha=100*1024*1024;function La(t){let e=t.endsWith("/")?t.slice(0,-1):t,n=e.split("/");return n[n.length-1]||e}const qa=({entry:t,namespace:e,protocol:n,backendType:i,onBack:r})=>{let{locale:s}=at(),d=lt(),c=La(t.path),h=t.mimeType||"text/plain",l=ue(h),f=l&&t.size>Ha&&t.size>0,{data:x,isPending:p,error:g,refetch:j}=De(async()=>{if(f)return null;let m=await Ne.request({namespace:e,path:t.path,preview:!l});if(m.error)throw Error(m.error);if(!m.url)throw Error("No URL returned");if(l)return{type:"media",url:m.url};let b=await fetch(m.url);if(!b.ok)throw Error(`Failed to fetch preview: ${b.statusText}`);return{type:"text",content:await b.text()}},[e,t.path,l,f]),w=(0,z.useCallback)(async()=>{try{let m=await Ne.request({namespace:e,path:t.path});if(m.error){I({title:"Download failed",description:m.error,variant:"danger"});return}m.url&&ve(m.url,m.filename??c)}catch(m){je.error("Failed to download storage entry",m),I({title:"Download failed",description:String(m),variant:"danger"})}},[e,t.path,c]),v=jt.map(m=>{let b=m.getCode({variableName:e,protocol:n,entry:t,backendType:i});if(b===null)return null;let u=m.icon;return(0,a.jsx)(E,{content:m.label,children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:()=>d(b),"aria-label":m.label,children:(0,a.jsx)(u,{className:"h-3.5 w-3.5"})})},m.id)}),o=(0,a.jsx)(yt,{filename:c,filenameIcon:Je(c),onBack:r,onDownload:w,actions:v}),y=({includeMime:m=!1})=>(0,a.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 p-4 text-xs",children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Path"}),(0,a.jsxs)("div",{className:"truncate flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"font-mono text-[11px]",children:t.path}),(0,a.jsx)(fa,{value:t.path,className:"h-3 w-3"})]}),m&&(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Type"}),m&&(0,a.jsx)("span",{children:h}),t.size>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Size"}),(0,a.jsx)("span",{children:ze(t.size,s)})]}),t.lastModified!=null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Modified"}),(0,a.jsx)("span",{children:new Date(t.lastModified*1e3).toLocaleString()})]})]});return f?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"px-4 pb-4 text-xs text-muted-foreground italic",children:["File is too large to preview (",ze(t.size,s),")."]})]}):p?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-center gap-2 text-xs text-muted-foreground min-h-24",children:[(0,a.jsx)(_e,{className:"h-4 w-4 animate-spin"}),"Loading preview..."]})]}):g?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"px-4 pb-4 text-xs text-destructive",children:["Failed to load preview: ",g.message]}),(0,a.jsx)("div",{className:"px-4 pb-4",children:(0,a.jsxs)(T,{variant:"secondary",size:"xs",onClick:j,children:[(0,a.jsx)(tt,{className:"h-3 w-3 mr-1"}),"Retry"]})})]}):x?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({}),(0,a.jsx)(Ue,{mimeType:h,contents:x.type==="text"?x.content:void 0,mediaSource:x.type==="media"?{url:x.url}:void 0})]}):(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"p-4 flex items-center gap-2 text-xs text-muted-foreground",children:[(0,a.jsx)(Ze,{className:"h-4 w-4"}),"Preview not available for this file type."]})]})};var $e=oe(),Ua=16;function te(t){return{paddingLeft:t*Ua}}function Wa(t,e){return new Date(t*1e3).toLocaleDateString(e,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function bt(t){let e=t.endsWith("/")?t.slice(0,-1):t,n=e.split("/");return n[n.length-1]||e}function Te(t,e,n,i){let r=n.toLowerCase();if(bt(t.path).toLowerCase().includes(r))return!0;if(t.kind==="directory"){let s=i.get(We(e,t.path));if(s)return s.some(d=>Te(d,e,n,i))}return!1}function vt(t,e,n,i){return n.trim()?t.filter(r=>Te(r,e,n,i)):t}var Ga=t=>{let e=(0,$e.c)(36),{namespace:n,protocol:i,rootPath:r,backendType:s,prefix:d,depth:c,locale:h,searchValue:l,onOpenFile:f}=t,{entriesByPath:x}=ye(),{entries:p,isPending:g,error:j}=Ke(n,d);if(g){let o;e[0]===c?o=e[1]:(o=te(c),e[0]=c,e[1]=o);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=(0,a.jsx)(_e,{className:"h-3 w-3 animate-spin"}),e[2]=y):y=e[2];let m;return e[3]===o?m=e[4]:(m=(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-1 text-xs text-muted-foreground",style:o,children:[y,"Loading..."]}),e[3]=o,e[4]=m),m}if(j){let o;e[5]===c?o=e[6]:(o=te(c),e[5]=c,e[6]=o);let y;return e[7]!==j.message||e[8]!==o?(y=(0,a.jsxs)("div",{className:"py-1 text-xs text-destructive",style:o,children:["Failed to load: ",j.message]}),e[7]=j.message,e[8]=o,e[9]=y):y=e[9],y}if(p.length===0){let o;e[10]===c?o=e[11]:(o=te(c),e[10]=c,e[11]=o);let y;return e[12]===o?y=e[13]:(y=(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:o,children:"Empty"}),e[12]=o,e[13]=y),y}let w;if(e[14]!==s||e[15]!==p||e[16]!==c||e[17]!==x||e[18]!==h||e[19]!==n||e[20]!==f||e[21]!==i||e[22]!==r||e[23]!==l){let o=vt(p,n,l,x),y;e[25]!==s||e[26]!==c||e[27]!==h||e[28]!==n||e[29]!==f||e[30]!==i||e[31]!==r||e[32]!==l?(y=m=>(0,a.jsx)(wt,{entry:m,namespace:n,protocol:i,rootPath:r,backendType:s,depth:c,locale:h,searchValue:l,onOpenFile:f},m.path),e[25]=s,e[26]=c,e[27]=h,e[28]=n,e[29]=f,e[30]=i,e[31]=r,e[32]=l,e[33]=y):y=e[33],w=o.map(y),e[14]=s,e[15]=p,e[16]=c,e[17]=x,e[18]=h,e[19]=n,e[20]=f,e[21]=i,e[22]=r,e[23]=l,e[24]=w}else w=e[24];let v;return e[34]===w?v=e[35]:(v=(0,a.jsx)(a.Fragment,{children:w}),e[34]=w,e[35]=v),v},wt=({entry:t,namespace:e,protocol:n,rootPath:i,backendType:r,depth:s,locale:d,searchValue:c,onOpenFile:h})=>{var b;let[l,f]=(0,z.useState)(!1),{entriesByPath:x}=ye(),p=lt(),g=t.kind==="directory",j=bt(t.path),w=!!c.trim(),v=g&&w&&j.toLowerCase().includes(c.trim().toLowerCase()),o=g&&w&&!!((b=x.get(We(e,t.path)))!=null&&b.some(u=>Te(u,e,c,x))),y=l||o,m=(0,z.useCallback)(async()=>{try{let u=await Ne.request({namespace:e,path:t.path});if(u.error){I({title:"Download failed",description:u.error,variant:"danger"});return}u.url&&ve(u.url,u.filename??"download")}catch(u){je.error("Failed to download storage entry",u),I({title:"Download failed",description:String(u),variant:"danger"})}},[e,t.path]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(it,{className:re("text-xs flex items-center gap-1.5 cursor-pointer rounded-none group h-6.5",g&&"font-medium"),style:te(s),value:`${e}:${t.path}`,onSelect:()=>{g?f(!y):h({entry:t,namespace:e,protocol:n,backendType:r})},children:[g?(0,a.jsx)(Me,{isExpanded:y,className:"h-3 w-3"}):(0,a.jsx)("span",{className:"w-3 shrink-0"}),g?(0,a.jsx)(na,{className:re("h-3.5 w-3.5 shrink-0",Ye.directory)}):Je(j),(0,a.jsx)("span",{className:"truncate flex-1 text-left",children:j}),(0,a.jsxs)("div",{className:"flex items-center",children:[t.size>0&&(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground pr-2 opacity-0 group-hover:opacity-100 transition-opacity tabular-nums",children:ze(t.size,d)}),t.lastModified!=null&&(0,a.jsx)(E,{content:`Last modified: ${new Date(t.lastModified*1e3).toLocaleString()}`,children:(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground pr-1 opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap",children:Wa(t.lastModified,d)})}),(0,a.jsxs)(qe,{children:[(0,a.jsx)(He,{asChild:!0,children:(0,a.jsx)(ot,{iconClassName:"h-3 w-3",onClick:u=>u.stopPropagation()})}),(0,a.jsxs)(Le,{align:"end",onClick:u=>u.stopPropagation(),onCloseAutoFocus:u=>u.preventDefault(),children:[!g&&(0,a.jsxs)($,{onSelect:()=>h({entry:t,namespace:e,protocol:n,backendType:r}),children:[(0,a.jsx)(gt,{className:"h-3.5 w-3.5 mr-2"}),"View"]}),(0,a.jsxs)($,{onSelect:async()=>{await me(t.path),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(Ce,{className:ee}),"Copy path"]}),!g&&(0,a.jsxs)($,{onSelect:()=>m(),children:[(0,a.jsx)(be,{className:"h-3.5 w-3.5 mr-2"}),"Download"]}),(0,a.jsx)(ce,{}),jt.map(u=>{let N=u.getCode({variableName:e,protocol:n,entry:t,backendType:r});if(N===null)return null;let F=u.icon;return(0,a.jsxs)($,{onSelect:()=>p(N),children:[(0,a.jsx)(F,{className:ee}),u.label]},u.id)})]})]})]})]}),g&&y&&(0,a.jsx)(Ga,{namespace:e,protocol:n,rootPath:i,backendType:r,prefix:t.path,depth:s+1,locale:d,searchValue:v?"":c,onOpenFile:h})]})},Ka=t=>{let e=(0,$e.c)(43),{namespace:n,locale:i,searchValue:r,onOpenFile:s}=t,[d,c]=(0,z.useState)(!0),{entriesByPath:h}=ye(),{clearNamespaceCache:l}=Zt(),f=n.name??n.displayName,{entries:x,isPending:p,error:g,refetch:j}=Ke(f),w;e[0]!==l||e[1]!==f||e[2]!==j?(w=m=>{m.stopPropagation(),l(f),j()},e[0]=l,e[1]=f,e[2]=j,e[3]=w):w=e[3];let v=w,o=p?n.storageEntries:x,y;if(e[4]!==o||e[5]!==h||e[6]!==g||e[7]!==v||e[8]!==d||e[9]!==p||e[10]!==i||e[11]!==n.backendType||e[12]!==n.displayName||e[13]!==n.name||e[14]!==n.protocol||e[15]!==n.rootPath||e[16]!==f||e[17]!==s||e[18]!==r){let m=vt(o,f,r,h),b;e[20]===d?b=e[21]:(b=()=>c(!d),e[20]=d,e[21]=b);let u;e[22]===d?u=e[23]:(u=(0,a.jsx)(Me,{isExpanded:d,className:"h-3 w-3"}),e[22]=d,e[23]=u);let N;e[24]===n.protocol?N=e[25]:(N=(0,a.jsx)(ia,{protocol:n.protocol}),e[24]=n.protocol,e[25]=N);let F;e[26]===n.displayName?F=e[27]:(F=(0,a.jsx)("span",{children:n.displayName}),e[26]=n.displayName,e[27]=F);let _;e[28]===n.name?_=e[29]:(_=n.name&&(0,a.jsxs)("span",{className:"text-xs text-muted-foreground font-normal",children:["(",(0,a.jsx)(Ma,{variableName:n.name}),")"]}),e[28]=n.name,e[29]=_);let S;e[30]===v?S=e[31]:(S=(0,a.jsx)(ct,{onClick:v,tooltip:"Refresh storage connection",className:"p-0",iconClassName:"h-3 w-3"}),e[30]=v,e[31]=S);let M=n.rootPath||"(root)",P;e[32]===M?P=e[33]:(P=(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground font-normal tabular-nums ml-auto",children:M}),e[32]=M,e[33]=P);let D;e[34]!==n.name||e[35]!==P||e[36]!==b||e[37]!==u||e[38]!==N||e[39]!==F||e[40]!==_||e[41]!==S?(D=(0,a.jsxs)(it,{value:n.name,onSelect:b,className:"flex flex-row font-semibold h-7 text-xs gap-1.5 bg-(--slate-2) text-muted-foreground rounded-none",children:[u,N,F,_,S,P]}),e[34]=n.name,e[35]=P,e[36]=b,e[37]=u,e[38]=N,e[39]=F,e[40]=_,e[41]=S,e[42]=D):D=e[42],y=(0,a.jsxs)(a.Fragment,{children:[D,d&&(0,a.jsxs)(a.Fragment,{children:[p&&o.length===0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-1 text-xs text-muted-foreground",style:te(1),children:[(0,a.jsx)(_e,{className:"h-3 w-3 animate-spin"}),"Loading..."]}),g&&o.length===0&&(0,a.jsx)(Pa,{error:g,style:te(1),className:"py-1 text-xs h-auto overflow-auto max-h-32 items-start",showIcon:!1}),!p&&o.length===0&&!g&&(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:te(1),children:"No entries"}),r&&m.length===0&&o.length>0&&(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:te(1),children:"No matches"}),m.map(A=>(0,a.jsx)(wt,{entry:A,namespace:f,protocol:n.protocol,rootPath:n.rootPath,backendType:n.backendType,depth:1,locale:i,searchValue:r,onOpenFile:s},A.path))]})]}),e[4]=o,e[5]=h,e[6]=g,e[7]=v,e[8]=d,e[9]=p,e[10]=i,e[11]=n.backendType,e[12]=n.displayName,e[13]=n.name,e[14]=n.protocol,e[15]=n.rootPath,e[16]=f,e[17]=s,e[18]=r,e[19]=y}else y=e[19];return y};const Ja=()=>{let t=(0,$e.c)(31),{namespaces:e}=ye(),{locale:n}=at(),[i,r]=(0,z.useState)(""),[s,d]=(0,z.useState)(null),c=!!i.trim();if(e.length===0){let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsxs)("span",{children:["Create an obstore or fsspec connection in your notebook. See the"," ",(0,a.jsx)("a",{className:"text-link",href:"https://docs.marimo.io/guides/working_with_data/remote_storage/#quick-start",target:"_blank",rel:"noopener noreferrer",children:"docs"}),"."]}),t[0]=b):b=t[0];let u;return t[1]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)(Da,{title:"No storage connected",description:b,action:(0,a.jsx)(Xe,{defaultTab:"storage",children:(0,a.jsxs)(T,{variant:"outline",size:"sm",children:["Add remote storage",(0,a.jsx)(et,{className:"h-4 w-4 ml-2"})]})}),icon:(0,a.jsx)(Qe,{className:"h-8 w-8"})}),t[1]=u):u=t[1],u}let h;t[2]===s?h=t[3]:(h=s&&(0,a.jsx)(qa,{entry:s.entry,namespace:s.namespace,protocol:s.protocol,backendType:s.backendType,onBack:()=>d(null)}),t[2]=s,t[3]=h);let l=s&&"hidden",f;t[4]===l?f=t[5]:(f=re("border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden scrollbar-thin",l),t[4]=l,t[5]=f);let x;t[6]===i?x=t[7]:(x=(0,a.jsx)(Na,{placeholder:"Search entries...",className:"h-6 m-1",value:i,onValueChange:r,rootClassName:"flex-1 border-b-0"}),t[6]=i,t[7]=x);let p;t[8]===c?p=t[9]:(p=c&&(0,a.jsx)(T,{variant:"text",size:"xs",className:"float-right border-none px-2 m-0 h-full",onClick:()=>r(""),children:(0,a.jsx)(ea,{className:"h-4 w-4"})}),t[8]=c,t[9]=p);let g;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(E,{content:"Filters loaded entries only. Expand directories to include their contents in the search.",delayDuration:200,children:(0,a.jsx)(ta,{className:"h-3.5 w-3.5 shrink-0 cursor-help text-muted-foreground hover:text-foreground mr-2"})}),t[10]=g):g=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(Xe,{defaultTab:"storage",children:(0,a.jsx)(T,{variant:"ghost",size:"sm",className:"px-2 border-0 border-l border-muted-background rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",children:(0,a.jsx)(et,{className:"h-4 w-4"})})}),t[11]=j):j=t[11];let w;t[12]!==x||t[13]!==p?(w=(0,a.jsxs)("div",{className:"flex items-center w-full border-b",children:[x,p,g,j]}),t[12]=x,t[13]=p,t[14]=w):w=t[14];let v;if(t[15]!==n||t[16]!==e||t[17]!==i){let b;t[19]!==n||t[20]!==i?(b=u=>(0,a.jsx)(Ka,{namespace:u,locale:n,searchValue:i,onOpenFile:d},u.name??u.displayName),t[19]=n,t[20]=i,t[21]=b):b=t[21],v=e.map(b),t[15]=n,t[16]=e,t[17]=i,t[18]=v}else v=t[18];let o;t[22]===v?o=t[23]:(o=(0,a.jsx)(Fa,{className:"flex flex-col",children:v}),t[22]=v,t[23]=o);let y;t[24]!==f||t[25]!==w||t[26]!==o?(y=(0,a.jsxs)(ka,{className:f,shouldFilter:!1,children:[w,o]}),t[24]=f,t[25]=w,t[26]=o,t[27]=y):y=t[27];let m;return t[28]!==h||t[29]!==y?(m=(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[h,y]}),t[28]=h,t[29]=y,t[30]=m):m=t[30],m};var Nt=oe(),kt=(0,z.createContext)(null);function Ya(){return(0,z.useContext)(kt)??void 0}var Za=t=>{let e=(0,Nt.c)(3),{children:n}=t,i=ya(),r;return e[0]!==n||e[1]!==i?(r=(0,a.jsx)(kt.Provider,{value:i,children:n}),e[0]=n,e[1]=i,e[2]=r):r=e[2],r};const Qa=t=>{let e=(0,Nt.c)(5),{children:n}=t,[i,r]=(0,z.useState)(null),s;e[0]!==n||e[1]!==i?(s=i&&(0,a.jsx)(ga,{backend:ja,options:{rootElement:i},children:(0,a.jsx)(Za,{children:n})}),e[0]=n,e[1]=i,e[2]=s):s=e[2];let d;return e[3]===s?d=e[4]:(d=(0,a.jsx)("div",{ref:r,className:"contents",children:s}),e[3]=s,e[4]=d),d};var Re=new Map;const Xa=({file:t,onOpenNotebook:e})=>{let{sendFileDetails:n,sendUpdateFile:i}=we(),r=he(Ht),s=he(Ve),d=he(It),[c,h]=(0,z.useState)(""),{data:l,isPending:f,error:x,setData:p,refetch:g}=De(async()=>{let N=await n({path:t.path}),F=N.contents||"";return h(Re.get(t.path)||F),N},[t.path]),j=async()=>{c!==(l==null?void 0:l.contents)&&await i({path:t.path,contents:c}).then(N=>{N.success&&(p(F=>({...F,contents:c})),h(c))})},w=(0,z.useRef)(c);if(w.current=c,(0,z.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let N=w.current;N===l.contents?Re.delete(t.path):Re.set(t.path,N)},[t.path,l==null?void 0:l.contents]),x)return(0,a.jsx)(rt,{error:x});if(f||!l)return null;let v=l.mimeType||"text/plain",o=v in Wt,y=d&&l.file.isMarimoFile&&(t.path===d||t.path.endsWith(`/${d}`));if(!l.contents&&!o)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:v})]});let m=(0,a.jsx)(yt,{filename:l.file.name,onRefresh:g,onDownload:s?void 0:()=>{if(l.isBase64&&l.contents){ue(v)?ve(Fe(l.contents,v),l.file.name):ge(st(Fe(l.contents,l.mimeType||"application/octet-stream")),l.file.name);return}ge(new Blob([l.contents||c],{type:v}),l.file.name)},actions:(0,a.jsxs)(a.Fragment,{children:[t.isMarimoFile&&!xe()&&(0,a.jsx)(E,{content:"Open notebook",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:N=>e(N),children:(0,a.jsx)(ke,{className:"h-3.5 w-3.5"})})}),!ue(v)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{content:"Copy contents to clipboard",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:async()=>{await me(c)},children:(0,a.jsx)(Ce,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(E,{content:_a("global.save"),children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:j,disabled:c===l.contents,children:(0,a.jsx)(oa,{className:"h-3.5 w-3.5"})})})]})]})}),b=ue(v),u=!b&&v!=="text/csv";return(0,a.jsxs)(a.Fragment,{children:[m,u&&y&&(0,a.jsxs)(wa,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(da,{className:"h-4 w-4"}),(0,a.jsx)(va,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)(Ue,{mimeType:v,contents:b?void 0:u?c:l.contents??void 0,mediaSource:b?{base64:l.contents,mime:v}:void 0,readOnly:!u,onChange:h,extensions:[Jt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>c===l.contents?!1:(j(),!0)}])]})]})};var en=class{constructor(t){Q(this,"delegate",new Pe([]));Q(this,"rootPath","");Q(this,"onChange",Bt.NOOP);Q(this,"path",new Se("/"));Q(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new Pe(e.files),this.rootPath=e.root,this.path=Se.guessDeliminator(e.root)}catch(e){I({title:"Failed",description:xa(e)})}this.onChange(this.delegate.data)});Q(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(i=>{var r;return(r=this.delegate.find(i))==null?void 0:r.data.path})].filter(Boolean),n=await Promise.all(e.map(i=>this.callbacks.listFiles({path:i}).catch(()=>({files:[]}))));for(let[i,r]of e.entries()){let s=n[i];r===this.rootPath?this.delegate=new Pe(s.files):this.delegate.update({id:r,changes:{children:s.files}})}this.onChange(this.delegate.data)});Q(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});Q(this,"handleResponse",t=>t.success?t:(I({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let n=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:n.files}}),this.onChange(this.delegate.data),!0}async copy(t,e){var c;let n=this.delegate.find(t);if(!n){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}let i=n.data.path,r=this.path.dirname(i),s=this.path.join(r,e),d=await this.callbacks.copyFileOrFolder({path:i,newPath:s}).then(this.handleResponse);d!=null&&d.info&&(this.delegate.create({parentId:((c=n.parent)==null?void 0:c.id)??null,index:0,data:d.info}),this.onChange(this.delegate.data),await this.refreshAll([r]))}async rename(t,e){let n=this.delegate.find(t);if(!n){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}let i=n.data.path,r=this.path.join(this.path.dirname(i),e);await this.callbacks.renameFileOrFolder({path:i,newPath:r}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:r}}),this.onChange(this.delegate.data),await this.refreshAll([r])}async move(t,e){var i;let n=e?((i=this.delegate.find(e))==null?void 0:i.data.path)??e:this.rootPath;await Promise.all(t.map(r=>{this.delegate.move({id:r,parentId:e,index:0});let s=this.delegate.find(r);if(!s)return Promise.resolve();let d=this.path.join(n,this.path.basename(s.data.path));return this.delegate.update({id:r,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:s.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([n])}async createFile(t,e,n="file"){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,r=await this.callbacks.createFileOrFolder({path:i,type:n,name:t}).then(this.handleResponse);r!=null&&r.info&&(this.delegate.create({parentId:e,index:0,data:r.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var r;let n=e?((r=this.delegate.find(e))==null?void 0:r.data.path)??e:this.rootPath,i=await this.callbacks.createFileOrFolder({path:n,type:"directory",name:t}).then(this.handleResponse);i!=null&&i.info&&(this.delegate.create({parentId:e,index:0,data:i.info}),this.onChange(this.delegate.data),await this.refreshAll([n]))}async delete(t){let e=this.delegate.find(t);if(!e){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data)}};const Ft=Ee(t=>{let e=t(Yt);return Vt(e,"no requestClientAtom set"),new en({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,copyFileOrFolder:e.sendCopyFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),tn=Ee({});async function an(){await Tt.get(Ft).refreshAll([])}var ae=" ";const Ct={directory:t=>`os.listdir("${t}")`,python:t=>`with open("${t}", "r") as _f:
|
|
11
|
+
${ae}...
|
|
12
|
+
`,json:t=>`with open("${t}", "r") as _f:
|
|
13
|
+
${ae}_data = json.load(_f)
|
|
14
|
+
`,code:t=>`with open("${t}", "r") as _f:
|
|
15
|
+
${ae}...
|
|
16
|
+
`,text:t=>`with open("${t}", "r") as _f:
|
|
17
|
+
${ae}...
|
|
18
|
+
`,image:t=>`mo.image("${t}")`,audio:t=>`mo.audio("${t}")`,video:t=>`mo.video("${t}")`,pdf:t=>`with open("${t}", "rb") as _f:
|
|
19
|
+
${ae}...
|
|
20
|
+
`,zip:t=>`with open("${t}", "rb") as _f:
|
|
21
|
+
${ae}...
|
|
22
|
+
`,data:t=>`with open("${t}", "r") as _f:
|
|
23
|
+
${ae}...
|
|
24
|
+
`,unknown:t=>`with open("${t}", "r") as _f:
|
|
25
|
+
${ae}...
|
|
26
|
+
`};var nn=oe(),sn=1024*1024*100;function _t(t){let e=(0,nn.c)(7),n;e[0]===t?n=e[1]:(n=t===void 0?{}:t,e[0]=t,e[1]=n);let i=n,{sendCreateFileOrFolder:r}=we(),s;e[2]===r?s=e[3]:(s=async c=>{if(c.length===0)return;let h=c.length===1;await Gt(h?"Uploading file...":"Uploading files...",async l=>{l.addTotal(c.length);for(let f of c){let x=hn(dn(f)),p="";x&&(p=Se.guessDeliminator(x).dirname(x));let g=(await ua(f)).split(",")[1];await r({path:p,type:"file",name:f.name,contents:g}),l.increment(1)}await an()},{title:h?"File uploaded":`${c.length} files uploaded`})},e[2]=r,e[3]=s);let d;return e[4]!==i||e[5]!==s?(d={multiple:!0,maxSize:sn,onError:cn,onDropRejected:rn,onDrop:s,...i},e[4]=i,e[5]=s,e[6]=d):d=e[6],pa(d)}function rn(t){I({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(ln)}),variant:"danger"})}function ln(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(on).join(", "),")"]},t.file.name)}function on(t){return t.message}function cn(t){je.error(t),I({title:"File upload failed",description:t.message,variant:"danger"})}function dn(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function hn(t){if(t)return t.replace(/^\/+/,"")}var de=oe(),mn=Be("marimo:showHiddenFiles",!0,Ie,{getOnInit:!0}),St=z.createContext(null);const pn=t=>{let e=(0,de.c)(72),{height:n}=t,i=(0,z.useRef)(null),r=Ya(),[s]=fe(Ft),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[c,h]=(0,z.useState)(d),[l,f]=(0,z.useState)(null),[x,p]=fe(mn),{openPrompt:g}=nt(),[j,w]=fe(tn),v;e[1]===s?v=e[2]:(v=()=>s.initialize(h),e[1]=s,e[2]=v);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[3]=o):o=e[3];let{isPending:y,error:m}=De(v,o),b;e[4]!==j||e[5]!==s?(b=()=>s.refreshAll(Object.keys(j).filter(k=>j[k])),e[4]=j,e[5]=s,e[6]=b):b=e[6];let u=J(b),N;e[7]!==p||e[8]!==x?(N=()=>{p(!x)},e[7]=p,e[8]=x,e[9]=N):N=e[9];let F=J(N),_;e[10]!==g||e[11]!==s?(_=async()=>{g({title:"Folder name",onConfirm:async k=>{s.createFolder(k,null)}})},e[10]=g,e[11]=s,e[12]=_):_=e[12];let S=J(_),M;e[13]!==g||e[14]!==s?(M=async()=>{g({title:"File name",onConfirm:async k=>{s.createFile(k,null)}})},e[13]=g,e[14]=s,e[15]=M):M=e[15];let P=J(M),D;e[16]!==g||e[17]!==s?(D=async()=>{g({title:"Notebook name",onConfirm:async k=>{s.createFile(k,null,"notebook")}})},e[16]=g,e[17]=s,e[18]=D):D=e[18];let A=J(D),R;e[19]===w?R=e[20]:(R=()=>{var k;(k=i.current)==null||k.closeAll(),w({})},e[19]=w,e[20]=R);let ne=J(R),Y;e[21]!==c||e[22]!==x?(Y=Dt(c,x),e[21]=c,e[22]=x,e[23]=Y):Y=e[23];let K=Y;if(y){let k;return e[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsx)(la,{size:"medium",centered:!0}),e[24]=k):k=e[24],k}if(m){let k;return e[25]===m?k=e[26]:(k=(0,a.jsx)(rt,{error:m}),e[25]=m,e[26]=k),k}if(l){let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=()=>f(null),e[27]=k):k=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(T,{onClick:k,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(Ge,{size:16})}),e[28]=O):O=e[28];let W;e[29]===l.name?W=e[30]:(W=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[O,(0,a.jsx)("span",{className:"font-bold",children:l.name})]}),e[29]=l.name,e[30]=W);let ie;e[31]!==l.path||e[32]!==s?(ie=zt=>Pt(zt,s.relativeFromRoot(l.path)),e[31]=l.path,e[32]=s,e[33]=ie):ie=e[33];let le;e[34]!==l||e[35]!==ie?(le=(0,a.jsx)(z.Suspense,{children:(0,a.jsx)(Xa,{onOpenNotebook:ie,file:l})}),e[34]=l,e[35]=ie,e[36]=le):le=e[36];let pe;return e[37]!==W||e[38]!==le?(pe=(0,a.jsxs)(a.Fragment,{children:[W,le]}),e[37]=W,e[38]=le,e[39]=pe):pe=e[39],pe}let B;e[40]!==ne||e[41]!==P||e[42]!==S||e[43]!==A||e[44]!==F||e[45]!==u||e[46]!==s?(B=(0,a.jsx)(xn,{onRefresh:u,onHidden:F,onCreateFile:P,onCreateNotebook:A,onCreateFolder:S,onCollapseAll:ne,tree:s}),e[40]=ne,e[41]=P,e[42]=S,e[43]=A,e[44]=F,e[45]=u,e[46]=s,e[47]=B):B=e[47];let se=n-33,V,H,L;e[48]===s?(V=e[49],H=e[50],L=e[51]):(V=async k=>{let{ids:O}=k;for(let W of O)await s.delete(W)},H=async k=>{let{id:O,name:W}=k;await s.rename(O,W)},L=async k=>{let{dragIds:O,parentId:W}=k;await s.move(O,W)},e[48]=s,e[49]=V,e[50]=H,e[51]=L);let Z;e[52]===Symbol.for("react.memo_cache_sentinel")?(Z=k=>{let O=k[0];O&&(O.data.isDirectory||f(O.data))},e[52]=Z):Z=e[52];let q;e[53]!==j||e[54]!==w||e[55]!==s?(q=async k=>{if(await s.expand(k)){let O=j[k]??!1;w({...j,[k]:!O})}},e[53]=j,e[54]=w,e[55]=s,e[56]=q):q=e[56];let U;e[57]!==r||e[58]!==j||e[59]!==se||e[60]!==V||e[61]!==H||e[62]!==L||e[63]!==q||e[64]!==K?(U=(0,a.jsx)(ba,{width:"100%",ref:i,height:se,className:"h-full",data:K,initialOpenState:j,openByDefault:!1,dndManager:r,renderCursor:vn,disableDrop:wn,onDelete:V,onRename:H,onMove:L,onSelect:Z,onToggle:q,padding:15,rowHeight:30,indent:fn,overscanCount:1e3,disableMultiSelection:!0,children:yn}),e[57]=r,e[58]=j,e[59]=se,e[60]=V,e[61]=H,e[62]=L,e[63]=q,e[64]=K,e[65]=U):U=e[65];let G;e[66]!==U||e[67]!==s?(G=(0,a.jsx)(St,{value:s,children:U}),e[66]=U,e[67]=s,e[68]=G):G=e[68];let C;return e[69]!==B||e[70]!==G?(C=(0,a.jsxs)(a.Fragment,{children:[B,G]}),e[69]=B,e[70]=G,e[71]=C):C=e[71],C};var fn=15,xn=t=>{let e=(0,de.c)(37),{onRefresh:n,onHidden:i,onCreateFile:r,onCreateNotebook:s,onCreateFolder:d,onCollapseAll:c}=t,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={noDrag:!0,noDragEventsBubbling:!0},e[0]=h):h=e[0];let{getRootProps:l,getInputProps:f}=_t(h),x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(pt,{size:16}),e[1]=x):x=e[1];let p;e[2]===s?p=e[3]:(p=(0,a.jsx)(E,{content:"Add notebook",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-notebook-button",onClick:s,variant:"text",size:"xs",children:x})}),e[2]=s,e[3]=p);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(ft,{size:16}),e[4]=g):g=e[4];let j;e[5]===r?j=e[6]:(j=(0,a.jsx)(E,{content:"Add file",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-file-button",onClick:r,variant:"text",size:"xs",children:g})}),e[5]=r,e[6]=j);let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(xt,{size:16}),e[7]=w):w=e[7];let v;e[8]===d?v=e[9]:(v=(0,a.jsx)(E,{content:"Add folder",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-folder-button",onClick:d,variant:"text",size:"xs",children:w})}),e[8]=d,e[9]=v);let o;e[10]===l?o=e[11]:(o=l({}),e[10]=l,e[11]=o);let y,m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=Kt({variant:"text",size:"xs"}),y=(0,a.jsx)(ha,{size:16}),e[12]=y,e[13]=m):(y=e[12],m=e[13]);let b;e[14]===o?b=e[15]:(b=(0,a.jsx)(E,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...o,className:m,children:y})}),e[14]=o,e[15]=b);let u;e[16]===f?u=e[17]:(u=f({}),e[16]=f,e[17]=u);let N;e[18]===u?N=e[19]:(N=(0,a.jsx)("input",{...u,type:"file"}),e[18]=u,e[19]=N);let F;e[20]===n?F=e[21]:(F=(0,a.jsx)(ct,{"data-testid":"file-explorer-refresh-button",onClick:n}),e[20]=n,e[21]=F);let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(aa,{size:16}),e[22]=_):_=e[22];let S;e[23]===i?S=e[24]:(S=(0,a.jsx)(E,{content:"Toggle hidden files",children:(0,a.jsx)(T,{"data-testid":"file-explorer-hidden-files-button",onClick:i,variant:"text",size:"xs",children:_})}),e[23]=i,e[24]=S);let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=(0,a.jsx)(Ra,{size:16}),e[25]=M):M=e[25];let P;e[26]===c?P=e[27]:(P=(0,a.jsx)(E,{content:"Collapse all folders",children:(0,a.jsx)(T,{"data-testid":"file-explorer-collapse-button",onClick:c,variant:"text",size:"xs",children:M})}),e[26]=c,e[27]=P);let D;return e[28]!==b||e[29]!==N||e[30]!==F||e[31]!==S||e[32]!==P||e[33]!==p||e[34]!==j||e[35]!==v?(D=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[p,j,v,b,N,F,S,P]}),e[28]=b,e[29]=N,e[30]=F,e[31]=S,e[32]=P,e[33]=p,e[34]=j,e[35]=v,e[36]=D):D=e[36],D},un=t=>{let e=(0,de.c)(9),{node:n,onOpenMarimoFile:i}=t,r;e[0]===n?r=e[1]:(r=c=>{n.data.isDirectory||(c.stopPropagation(),n.select())},e[0]=n,e[1]=r);let s;e[2]!==n.data.isMarimoFile||e[3]!==i?(s=n.data.isMarimoFile&&!xe()&&(0,a.jsxs)("span",{className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:i,children:["open ",(0,a.jsx)(ke,{className:"inline ml-1",size:12})]}),e[2]=n.data.isMarimoFile,e[3]=i,e[4]=s):s=e[4];let d;return e[5]!==n.data.name||e[6]!==r||e[7]!==s?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:r,children:[n.data.name,s]}),e[5]=n.data.name,e[6]=r,e[7]=s,e[8]=d):d=e[8],d},gn=t=>{let e=(0,de.c)(10),{node:n}=t,i=(0,z.useRef)(null),r,s;e[0]===n.data.name?(r=e[1],s=e[2]):(r=()=>{var l,f;(l=i.current)==null||l.focus(),(f=i.current)==null||f.setSelectionRange(0,n.data.name.lastIndexOf("."))},s=[n.data.name],e[0]=n.data.name,e[1]=r,e[2]=s),(0,z.useEffect)(r,s);let d,c;e[3]===n?(d=e[4],c=e[5]):(d=()=>n.reset(),c=l=>{l.key==="Escape"&&n.reset(),l.key==="Enter"&&n.submit(l.currentTarget.value)},e[3]=n,e[4]=d,e[5]=c);let h;return e[6]!==n.data.name||e[7]!==d||e[8]!==c?(h=(0,a.jsx)("input",{ref:i,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:n.data.name,onClick:Nn,onBlur:d,onKeyDown:c}),e[6]=n.data.name,e[7]=d,e[8]=c,e[9]=h):h=e[9],h},yn=t=>{let e=(0,de.c)(71),{node:n,style:i,dragHandle:r}=t,{openFile:s,sendFileDetails:d}=we(),c=he(Ve),h;e[0]!==n.data.isDirectory||e[1]!==n.data.name?(h=n.data.isDirectory?"directory":sa(n.data.name),e[0]=n.data.isDirectory,e[1]=n.data.name,e[2]=h):h=e[2];let l=h,f=ra[l],{openConfirm:x,openPrompt:p}=nt(),{createNewCell:g}=At(),j=Ca(),w;e[3]!==g||e[4]!==j?(w=C=>{g({code:C,before:!1,cellId:j??"__end__"})},e[3]=g,e[4]=j,e[5]=w):w=e[5];let v=w,o=(0,z.use)(St),y;e[6]!==n.data.path||e[7]!==o?(y=async C=>{Pt(C,o?o.relativeFromRoot(n.data.path):n.data.path)},e[6]=n.data.path,e[7]=o,e[8]=y):y=e[8];let m=y,b;e[9]!==n.data.name||e[10]!==n.id||e[11]!==n.tree||e[12]!==x?(b=async C=>{C.stopPropagation(),C.preventDefault(),x({title:"Delete file",description:`Are you sure you want to delete ${n.data.name}?`,confirmAction:(0,a.jsx)(Ut,{onClick:async()=>{await n.tree.delete(n.id)},"aria-label":"Confirm",children:"Delete"})})},e[9]=n.data.name,e[10]=n.id,e[11]=n.tree,e[12]=x,e[13]=b):b=e[13];let u=b,N;e[14]!==n||e[15]!==p||e[16]!==o?(N=async()=>{n.open(),p({title:"Folder name",onConfirm:async C=>{o==null||o.createFolder(C,n.id)}})},e[14]=n,e[15]=p,e[16]=o,e[17]=N):N=e[17];let F=J(N),_;e[18]!==n||e[19]!==p||e[20]!==o?(_=async()=>{n.open(),p({title:"File name",onConfirm:async C=>{o==null||o.createFile(C,n.id)}})},e[18]=n,e[19]=p,e[20]=o,e[21]=_):_=e[21];let S=J(_),M;e[22]!==n||e[23]!==p||e[24]!==o?(M=async()=>{n.open(),p({title:"Notebook name",onConfirm:async C=>{o==null||o.createFile(C,n.id,"notebook")}})},e[22]=n,e[23]=p,e[24]=o,e[25]=M):M=e[25];let P=J(M),D;e[26]!==n.data.name||e[27]!==n.id||e[28]!==o?(D=async()=>{if(!o)return;let[C,k]=ma(n.data.name),O=`${C}_copy${k}`;await o.copy(n.id,O)},e[26]=n.data.name,e[27]=n.id,e[28]=o,e[29]=D):D=e[29];let A=J(D),R;e[30]!==c||e[31]!==l||e[32]!==S||e[33]!==F||e[34]!==P||e[35]!==u||e[36]!==A||e[37]!==v||e[38]!==m||e[39]!==n||e[40]!==s||e[41]!==d||e[42]!==o?(R=()=>(0,a.jsxs)(Le,{align:"end",className:"print:hidden w-[220px]",onClick:kn,onCloseAutoFocus:Fn,children:[!n.data.isDirectory&&(0,a.jsxs)($,{onSelect:()=>n.select(),children:[(0,a.jsx)(gt,{className:"h-3.5 w-3.5 mr-2"}),"Open file"]}),!n.data.isDirectory&&!xe()&&(0,a.jsxs)($,{onSelect:()=>{s({path:n.data.path})},children:[(0,a.jsx)(ke,{className:"h-3.5 w-3.5 mr-2"}),"Open file in external editor"]}),n.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)($,{onSelect:()=>P(),children:[(0,a.jsx)(pt,{className:"h-3.5 w-3.5 mr-2"}),"Create notebook"]}),(0,a.jsxs)($,{onSelect:()=>S(),children:[(0,a.jsx)(ft,{className:"h-3.5 w-3.5 mr-2"}),"Create file"]}),(0,a.jsxs)($,{onSelect:()=>F(),children:[(0,a.jsx)(xt,{className:"h-3.5 w-3.5 mr-2"}),"Create folder"]}),(0,a.jsx)(ce,{})]}),(0,a.jsxs)($,{onSelect:()=>n.edit(),children:[(0,a.jsx)(Ea,{className:ee}),"Rename"]}),(0,a.jsxs)($,{onSelect:A,children:[(0,a.jsx)(Ce,{className:ee}),"Duplicate"]}),(0,a.jsxs)($,{onSelect:async()=>{await me(n.data.path),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(ut,{className:ee}),"Copy path"]}),o&&(0,a.jsxs)($,{onSelect:async()=>{await me(o.relativeFromRoot(n.data.path)),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(ut,{className:"h-3.5 w-3.5 mr-2"}),"Copy relative path"]}),(0,a.jsx)(ce,{}),(0,a.jsxs)($,{onSelect:()=>{let{path:C}=n.data;v(Ct[l](C))},children:[(0,a.jsx)(Xt,{className:ee}),"Insert snippet for reading file"]}),(0,a.jsxs)($,{onSelect:async()=>{I({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:C}=n.data;await me(Ct[l](C))},children:[(0,a.jsx)(Et,{className:ee}),"Copy snippet for reading file"]}),n.data.isMarimoFile&&!xe()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ce,{}),(0,a.jsxs)($,{onSelect:m,children:[(0,a.jsx)(Ia,{className:"h-3.5 w-3.5 mr-2"}),"Open notebook"]})]}),(0,a.jsx)(ce,{}),!n.data.isDirectory&&!c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)($,{onSelect:async()=>{let C=await d({path:n.data.path});C.isBase64&&C.contents?ge(st(Fe(C.contents,C.mimeType||"application/octet-stream")),n.data.name):ge(new Blob([C.contents||""]),n.data.name)},children:[(0,a.jsx)(be,{className:"h-3.5 w-3.5 mr-2"}),"Download"]}),(0,a.jsx)(ce,{})]}),(0,a.jsxs)($,{onSelect:u,variant:"danger",children:[(0,a.jsx)(ca,{className:ee}),"Delete"]})]}),e[30]=c,e[31]=l,e[32]=S,e[33]=F,e[34]=P,e[35]=u,e[36]=A,e[37]=v,e[38]=m,e[39]=n,e[40]=s,e[41]=d,e[42]=o,e[43]=R):R=e[43];let ne=R,Y;e[44]===Symbol.for("react.memo_cache_sentinel")?(Y=re("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),e[44]=Y):Y=e[44];let K,B;e[45]===n?(K=e[46],B=e[47]):(K=C=>{C.stopPropagation(),n.data.isDirectory&&n.toggle()},B=(0,a.jsx)(jn,{node:n}),e[45]=n,e[46]=K,e[47]=B);let se=n.willReceiveDrop&&n.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground",V;e[48]===se?V=e[49]:(V=re("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",se),e[48]=se,e[49]=V);let H;e[50]!==f||e[51]!==l||e[52]!==n.data.isMarimoFile?(H=n.data.isMarimoFile?(0,a.jsx)(Oa,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}):(0,a.jsx)(f,{className:re("w-5 h-5 shrink-0 mr-2",Ye[l]),strokeWidth:1.5}),e[50]=f,e[51]=l,e[52]=n.data.isMarimoFile,e[53]=H):H=e[53];let L;e[54]!==m||e[55]!==n?(L=n.isEditing?(0,a.jsx)(gn,{node:n}):(0,a.jsx)(un,{node:n,onOpenMarimoFile:m}),e[54]=m,e[55]=n,e[56]=L):L=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,a.jsx)(He,{asChild:!0,tabIndex:-1,onClick:Cn,children:(0,a.jsx)(ot,{"data-testid":"file-explorer-more-button",iconClassName:"w-5 h-5"})}),e[57]=Z):Z=e[57];let q;e[58]===ne?q=e[59]:(q=(0,a.jsxs)(qe,{modal:!1,children:[Z,ne()]}),e[58]=ne,e[59]=q);let U;e[60]!==V||e[61]!==H||e[62]!==L||e[63]!==q?(U=(0,a.jsxs)("span",{className:V,children:[H,L,q]}),e[60]=V,e[61]=H,e[62]=L,e[63]=q,e[64]=U):U=e[64];let G;return e[65]!==r||e[66]!==i||e[67]!==K||e[68]!==B||e[69]!==U?(G=(0,a.jsxs)("div",{style:i,ref:r,className:Y,draggable:!0,onClick:K,children:[B,U]}),e[65]=r,e[66]=i,e[67]=K,e[68]=B,e[69]=U,e[70]=G):G=e[70],G},jn=t=>{let e=(0,de.c)(3),{node:n}=t;if(!n.data.isDirectory){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)("span",{className:"w-4 h-4 shrink-0"}),e[0]=r):r=e[0],r}let i;return e[1]===n.isOpen?i=e[2]:(i=(0,a.jsx)(Me,{isExpanded:n.isOpen,className:"w-4 h-4"}),e[1]=n.isOpen,e[2]=i),i};function Pt(t,e){t.stopPropagation(),t.preventDefault(),$a(e)}function Dt(t,e){if(e)return t;let n=[];for(let i of t){if(bn(i.name))continue;let r=i;if(i.children){let s=Dt(i.children,e);s!==i.children&&(r={...i,children:s})}n.push(r)}return n}function bn(t){return!!t.startsWith(".")}function vn(){return null}function wn(t){let{parentNode:e}=t;return!e.data.isDirectory}function Nn(t){return t.stopPropagation()}function kn(t){return t.stopPropagation()}function Fn(t){return t.preventDefault()}function Cn(t){return t.stopPropagation()}var Mt=oe(),_n=Be("marimo:file-explorer-panel:state",{openSections:["files"],hasUserInteracted:!1},Ie),Sn=t=>{let e=(0,Mt.c)(20),{height:n}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={noClick:!0,noKeyboard:!0},e[0]=i):i=e[0];let{getRootProps:r,getInputProps:s,isDragActive:d}=_t(i),c;e[1]===r?c=e[2]:(c=r(),e[1]=r,e[2]=c);let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=re("flex flex-col overflow-hidden relative"),e[3]=h):h=e[3];let l;e[4]===n?l=e[5]:(l={height:n},e[4]=n,e[5]=l);let f;e[6]===s?f=e[7]:(f=s(),e[6]=s,e[7]=f);let x;e[8]===f?x=e[9]:(x=(0,a.jsx)("input",{...f}),e[8]=f,e[9]=x);let p;e[10]===d?p=e[11]:(p=d&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),e[10]=d,e[11]=p);let g;e[12]===n?g=e[13]:(g=(0,a.jsx)(pn,{height:n}),e[12]=n,e[13]=g);let j;return e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==p||e[18]!==g?(j=(0,a.jsx)(Qa,{children:(0,a.jsxs)("div",{...c,className:h,style:l,children:[x,p,g]})}),e[14]=c,e[15]=l,e[16]=x,e[17]=p,e[18]=g,e[19]=j):j=e[19],j},Pn=33,Dn=()=>{let t=(0,Mt.c)(36),{ref:e,height:n}=Sa(),i=n===void 0?500:n,[r,s]=fe(_n),d=he(Qt).length,c;e:{if(!r.hasUserInteracted&&d>0){if(r.openSections.includes("remote-storage")){c=r.openSections;break e}let R;t[0]===r.openSections?R=t[1]:(R=[...r.openSections,"remote-storage"],t[0]=r.openSections,t[1]=R),c=R;break e}c=r.openSections}let h=c,l;t[2]===s?l=t[3]:(l=R=>{s({openSections:R,hasUserInteracted:!0})},t[2]=s,t[3]=l);let f=l,x=i-Pn*2,p;t[4]===h?p=t[5]:(p=h.includes("remote-storage"),t[4]=h,t[5]=p);let g=p,j;t[6]!==h||t[7]!==g?(j=g&&h.includes("files"),t[6]=h,t[7]=g,t[8]=j):j=t[8];let w=j,v;t[9]!==x||t[10]!==w?(v=w?Math.round(x*.4):x,t[9]=x,t[10]=w,t[11]=v):v=t[11];let o=v,y=Math.max(200,w?x-o:x),m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(Qe,{className:"w-4 h-4"}),t[12]=m):m=t[12];let b;t[13]===d?b=t[14]:(b=d>0&&(0,a.jsx)(za,{children:d}),t[13]=d,t[14]=b);let u;t[15]===b?u=t[16]:(u=(0,a.jsxs)(ht,{children:[m," Remote storage",b]}),t[15]=b,t[16]=u);let N;t[17]===o?N=t[18]:(N={maxHeight:o},t[17]=o,t[18]=N);let F;t[19]===Symbol.for("react.memo_cache_sentinel")?(F=(0,a.jsx)(Ja,{}),t[19]=F):F=t[19];let _;t[20]===N?_=t[21]:(_=(0,a.jsx)(mt,{className:"overflow-auto",style:N,children:F}),t[20]=N,t[21]=_);let S;t[22]!==_||t[23]!==u?(S=(0,a.jsxs)(dt,{value:"remote-storage",children:[u,_]}),t[22]=_,t[23]=u,t[24]=S):S=t[24];let M;t[25]===Symbol.for("react.memo_cache_sentinel")?(M=(0,a.jsxs)(ht,{children:[(0,a.jsx)(Ze,{className:"w-4 h-4"}),"Files"]}),t[25]=M):M=t[25];let P;t[26]===y?P=t[27]:(P=(0,a.jsxs)(dt,{value:"files",children:[M,(0,a.jsx)(mt,{children:(0,a.jsx)(Sn,{height:y})})]}),t[26]=y,t[27]=P);let D;t[28]!==f||t[29]!==h||t[30]!==S||t[31]!==P?(D=(0,a.jsxs)(qt,{type:"multiple",value:h,onValueChange:f,children:[S,P]}),t[28]=f,t[29]=h,t[30]=S,t[31]=P,t[32]=D):D=t[32];let A;return t[33]!==e||t[34]!==D?(A=(0,a.jsx)("div",{ref:e,className:"h-full overflow-auto",children:D}),t[33]=e,t[34]=D,t[35]=A):A=t[35],A};export{Dn as default};
|