9 lines
212 KiB
JavaScript
9 lines
212 KiB
JavaScript
import{r as v,j as p,R as T,d as Vi}from"./react-vendor-jWT2yUdV.js";import{c as kl,b as Cl,a as $l}from"./chunk-B75B6XQK-aFCr8AK6.js";import{t as hn,f as yn,Z as Dl,_ as El,v as Un,x as Wi,a0 as si,y as Sl,B as jl,E as Le,a1 as Al,O as Qt,Q as en,R as tn,S as nn,b as te,T as an,s as Zt,a2 as Lt,a3 as zl,a4 as Bl,a5 as xn,a6 as Yn,a7 as Fl,a8 as Ht,a9 as Nl,aa as ui,ab as kt,ac as Pl,ad as Tt,ae as pn,af as ci,ag as Il,ah as Ml,$ as Xn,c as Fn,u as Rl,k as Tl}from"./index-DiaaLdUu.js";import{i as Gn,$ as Li,a as Ol,b as Hi,c as Kl,d as _l}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{g as Zn}from"./qface-BZLvZXJ8.js";import{_ as Ft,u as qi}from"./useRequest-B1BwPztr.js";import{z as pe}from"./react-hot-toast-cGcFZPSt.js";import{F as Ui,a as Vl,b as Yi,c as Wl,d as Ll,e as di}from"./index-CVa9XolR.js";import{i as Hl}from"./index-DE7yoXMZ.js";import{C as ql,g as Ul,h as Yl}from"./code_editor-TFSnOENo.js";import{G as Xl}from"./iconBase-B7bT1FlI.js";import{F as De}from"./file_manager-BG19iFYW.js";import{i as Gl,m as Zl,a as Be,c as pi,s as Jl,$ as qt,b as $e,d as X,u as Ye,o as Xi,p as Ql}from"./chunk-APIAPHLK-nGgOe_Nr.js";import{f as at}from"./chunk-RJKRL3AU-CjtrMR1U.js";import{$ as Ee,a as Dt,b as $t,c as ln,d as Jn,e as er,f as Gi,g as Ot,h as tr,i as nr,j as ir}from"./SelectionManager-Dl9uHsLK.js";import{$ as Zi}from"./usePress-BrNwsdVw.js";import{$ as ar}from"./useFocusable-DA5Croun.js";import{$ as Qn}from"./useHover-DC1o5-bm.js";import{$ as or}from"./useToggle-B3ZYBe5S.js";import{f as lr}from"./chunk-SLABUSGS-Cmz8sGrU.js";import{$ as rr,a as Ji}from"./DOMLayoutDelegate-DOgfSALU.js";import{$ as sr}from"./index-BV9-YCKp.js";import{a as ur}from"./index-Bz8pD9tN.js";import{E as cr}from"./empty_state-BmDJmEaB.js";import{f as dr,g as mi,h as pr,i as mr,j as fr,k as vr,l as hr,m as xr,n as gr,o as br,p as yr,q as wr,r as kr}from"./index-_HIxriDC.js";import{i as Cr}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{w as $r,x as Dr}from"./index-FvTxWQTZ.js";import{u as Er}from"./use-dialog-CRIMuzeE.js";import{b as Sr,u as jr}from"./react-router-dom-C6k78GT4.js";import{m as Ar}from"./proxy-BsRmjYPH.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./codemirror-core-782AVq39.js";import"./codemirror-lang-DFaD5e7G.js";import"./index-BsnVex0g.js";import"./gestures-BHfQC-M8.js";import"./layout-Buao20KT.js";var fi=hn({base:"w-px h-px inline-block",variants:{isInline:{true:"inline-block",false:"block"}},defaultVariants:{isInline:!1}}),vi=hn({slots:{base:"flex flex-col relative gap-4",wrapper:["p-4","z-0","flex","flex-col","relative","justify-between","gap-4","shadow-small","bg-content1","overflow-auto"],table:"min-w-full h-auto",thead:"[&>tr]:first:rounded-lg",tbody:"",tr:["group/tr","outline-none",...yn],th:["group/th","px-3","h-10","text-start","align-middle","bg-default-100","whitespace-nowrap","text-foreground-500","text-tiny","font-semibold","first:rounded-s-lg","last:rounded-e-lg","outline-none","data-[sortable=true]:cursor-pointer","data-[hover=true]:text-foreground-400",...yn],td:["py-2","px-3","relative","align-middle","whitespace-normal","text-small","font-normal","outline-none","[&>*]:z-1","[&>*]:relative",...yn,"before:content-['']","before:absolute","before:z-0","before:inset-0","before:opacity-0","data-[selected=true]:before:opacity-100","group-data-[disabled=true]/tr:text-foreground-300","group-data-[disabled=true]/tr:cursor-not-allowed"],tfoot:"",sortIcon:["ms-2","mb-px","opacity-0","text-inherit","inline-block","transition-transform-opacity","data-[visible=true]:opacity-100","group-data-[hover=true]/th:opacity-100","data-[direction=ascending]:rotate-180"],emptyWrapper:"text-foreground-400 align-middle text-center h-40",loadingWrapper:"absolute inset-0 flex items-center justify-center"},variants:{color:{default:{td:"before:bg-default/60 data-[selected=true]:text-default-foreground"},primary:{td:"before:bg-primary/20 data-[selected=true]:text-primary"},secondary:{td:"before:bg-secondary/20 data-[selected=true]:text-secondary"},success:{td:"before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success"},warning:{td:"before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning"},danger:{td:"before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500"}},layout:{auto:{table:"table-auto"},fixed:{table:"table-fixed"}},radius:{none:{wrapper:"rounded-none"},sm:{wrapper:"rounded-small"},md:{wrapper:"rounded-medium"},lg:{wrapper:"rounded-large"}},shadow:{none:{wrapper:"shadow-none"},sm:{wrapper:"shadow-small"},md:{wrapper:"shadow-medium"},lg:{wrapper:"shadow-large"}},hideHeader:{true:{thead:"hidden"}},isStriped:{true:{td:["group-data-[odd=true]/tr:before:bg-default-100","group-data-[odd=true]/tr:before:opacity-100","group-data-[odd=true]/tr:before:-z-10"]}},isCompact:{true:{td:"py-1"},false:{}},isHeaderSticky:{true:{thead:"sticky top-0 z-20 [&>tr]:first:shadow-small"}},isSelectable:{true:{tr:"cursor-default",td:["group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:bg-default-100","group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:opacity-70"]}},isMultiSelectable:{true:{td:["group-data-[first=true]/tr:first:before:rounded-ts-lg","group-data-[first=true]/tr:last:before:rounded-te-lg","group-data-[middle=true]/tr:before:rounded-none","group-data-[last=true]/tr:first:before:rounded-bs-lg","group-data-[last=true]/tr:last:before:rounded-be-lg"]},false:{td:["first:before:rounded-s-lg","last:before:rounded-e-lg"]}},fullWidth:{true:{base:"w-full",wrapper:"w-full",table:"w-full"}},align:{start:{th:"text-start",td:"text-start"},center:{th:"text-center",td:"text-center"},end:{th:"text-end",td:"text-end"}}},defaultVariants:{layout:"auto",shadow:"sm",radius:"lg",color:"default",isCompact:!1,hideHeader:!1,isStriped:!1,fullWidth:!0,align:"start"},compoundVariants:[{isStriped:!0,color:"default",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-default/60"}},{isStriped:!0,color:"primary",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-primary/20"}},{isStriped:!0,color:"secondary",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-secondary/20"}},{isStriped:!0,color:"success",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-success/20"}},{isStriped:!0,color:"warning",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-warning/20"}},{isStriped:!0,color:"danger",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-danger/20"}}]}),zr=hn({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","flex-shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...El],hiddenInput:Dl,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(theme(borderRadius.medium)*0.5)]","before:rounded-[calc(theme(borderRadius.medium)*0.5)]","after:rounded-[calc(theme(borderRadius.medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(theme(borderRadius.medium)*0.6)]","before:rounded-[calc(theme(borderRadius.medium)*0.6)]","after:rounded-[calc(theme(borderRadius.medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(theme(borderRadius.medium)*0.7)]","before:rounded-[calc(theme(borderRadius.medium)*0.7)]","after:rounded-[calc(theme(borderRadius.medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(theme(borderRadius.medium)*0.5)]","before:rounded-[calc(theme(borderRadius.medium)*0.5)]","after:rounded-[calc(theme(borderRadius.medium)*0.5)]"]},md:{wrapper:["rounded-[calc(theme(borderRadius.medium)*0.6)]","before:rounded-[calc(theme(borderRadius.medium)*0.6)]","after:rounded-[calc(theme(borderRadius.medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(theme(borderRadius.medium)*0.7)]","before:rounded-[calc(theme(borderRadius.medium)*0.7)]","after:rounded-[calc(theme(borderRadius.medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});hn({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});function Qi(e,t){const n=v.useRef(!0),i=v.useRef(null);v.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),v.useEffect(()=>{let o=i.current;n.current?n.current=!1:(!o||t.some((a,l)=>!Object.is(a,o[l])))&&e(),i.current=t},t)}function Br(e){var t,n;const i=Un(),[o,a]=Wi(e,si.variantKeys),{ref:l,as:r,children:s,color:c="default",size:u="md",variant:d="solid",radius:f,isDisabled:m=!1,isIconOnly:h=!1,disableRipple:x=(t=i==null?void 0:i.disableRipple)!=null?t:!1,disableAnimation:b=(n=i==null?void 0:i.disableAnimation)!=null?n:!1,className:k,...C}=o,j=r||"div",D=Sl(l),g=v.useMemo(()=>si({...a,className:k}),[jl(a),k]),z=v.useMemo(()=>({size:u,color:c,variant:d,radius:f,isIconOnly:h,isDisabled:m,disableAnimation:b,disableRipple:x,fullWidth:!!(e!=null&&e.fullWidth)}),[u,c,d,f,m,h,b,x,e==null?void 0:e.fullWidth]),B=v.useCallback(()=>({role:"group",...C}),[C]);return{Component:j,children:s,domRef:D,context:z,classNames:g,getButtonGroupProps:B}}var ea=Le((e,t)=>{const{Component:n,domRef:i,context:o,children:a,classNames:l,getButtonGroupProps:r}=Br({...e,ref:t});return p.jsx(Al,{value:o,children:p.jsx(n,{ref:i,className:l,...r(),children:a})})});ea.displayName="HeroUI.ButtonGroup";var ta=ea;function Fr(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:i}=e,o=v.createContext(void 0);o.displayName=i;function a(){var l;const r=v.useContext(o);if(!r&&t){const s=new Error(n);throw s.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,s,a),s}return r}return[o.Provider,a,o]}function Nr(e,t){if(e!=null){if(Gl(e)){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Pr(...e){return t=>{e.forEach(n=>Nr(n,t))}}var Ir=({strokeWidth:e=1.5,...t})=>p.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:e,viewBox:"0 0 24 24",width:"1em",...t,children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),wn,hi;function Mr(){if(hi)return wn;hi=1;function e(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function t(o,a){for(var l="",r=0,s=-1,c=0,u,d=0;d<=o.length;++d){if(d<o.length)u=o.charCodeAt(d);else{if(u===47)break;u=47}if(u===47){if(!(s===d-1||c===1))if(s!==d-1&&c===2){if(l.length<2||r!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var f=l.lastIndexOf("/");if(f!==l.length-1){f===-1?(l="",r=0):(l=l.slice(0,f),r=l.length-1-l.lastIndexOf("/")),s=d,c=0;continue}}else if(l.length===2||l.length===1){l="",r=0,s=d,c=0;continue}}a&&(l.length>0?l+="/..":l="..",r=2)}else l.length>0?l+="/"+o.slice(s+1,d):l=o.slice(s+1,d),r=d-s-1;s=d,c=0}else u===46&&c!==-1?++c:c=-1}return l}function n(o,a){var l=a.dir||a.root,r=a.base||(a.name||"")+(a.ext||"");return l?l===a.root?l+r:l+o+r:r}var i={resolve:function(){for(var a="",l=!1,r,s=arguments.length-1;s>=-1&&!l;s--){var c;s>=0?c=arguments[s]:(r===void 0&&(r=process.cwd()),c=r),e(c),c.length!==0&&(a=c+"/"+a,l=c.charCodeAt(0)===47)}return a=t(a,!l),l?a.length>0?"/"+a:"/":a.length>0?a:"."},normalize:function(a){if(e(a),a.length===0)return".";var l=a.charCodeAt(0)===47,r=a.charCodeAt(a.length-1)===47;return a=t(a,!l),a.length===0&&!l&&(a="."),a.length>0&&r&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return e(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var r=arguments[l];e(r),r.length>0&&(a===void 0?a=r:a+="/"+r)}return a===void 0?".":i.normalize(a)},relative:function(a,l){if(e(a),e(l),a===l||(a=i.resolve(a),l=i.resolve(l),a===l))return"";for(var r=1;r<a.length&&a.charCodeAt(r)===47;++r);for(var s=a.length,c=s-r,u=1;u<l.length&&l.charCodeAt(u)===47;++u);for(var d=l.length,f=d-u,m=c<f?c:f,h=-1,x=0;x<=m;++x){if(x===m){if(f>m){if(l.charCodeAt(u+x)===47)return l.slice(u+x+1);if(x===0)return l.slice(u+x)}else c>m&&(a.charCodeAt(r+x)===47?h=x:x===0&&(h=0));break}var b=a.charCodeAt(r+x),k=l.charCodeAt(u+x);if(b!==k)break;b===47&&(h=x)}var C="";for(x=r+h+1;x<=s;++x)(x===s||a.charCodeAt(x)===47)&&(C.length===0?C+="..":C+="/..");return C.length>0?C+l.slice(u+h):(u+=h,l.charCodeAt(u)===47&&++u,l.slice(u))},_makeLong:function(a){return a},dirname:function(a){if(e(a),a.length===0)return".";for(var l=a.charCodeAt(0),r=l===47,s=-1,c=!0,u=a.length-1;u>=1;--u)if(l=a.charCodeAt(u),l===47){if(!c){s=u;break}}else c=!1;return s===-1?r?"/":".":r&&s===1?"//":a.slice(0,s)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');e(a);var r=0,s=-1,c=!0,u;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var d=l.length-1,f=-1;for(u=a.length-1;u>=0;--u){var m=a.charCodeAt(u);if(m===47){if(!c){r=u+1;break}}else f===-1&&(c=!1,f=u+1),d>=0&&(m===l.charCodeAt(d)?--d===-1&&(s=u):(d=-1,s=f))}return r===s?s=f:s===-1&&(s=a.length),a.slice(r,s)}else{for(u=a.length-1;u>=0;--u)if(a.charCodeAt(u)===47){if(!c){r=u+1;break}}else s===-1&&(c=!1,s=u+1);return s===-1?"":a.slice(r,s)}},extname:function(a){e(a);for(var l=-1,r=0,s=-1,c=!0,u=0,d=a.length-1;d>=0;--d){var f=a.charCodeAt(d);if(f===47){if(!c){r=d+1;break}continue}s===-1&&(c=!1,s=d+1),f===46?l===-1?l=d:u!==1&&(u=1):l!==-1&&(u=-1)}return l===-1||s===-1||u===0||u===1&&l===s-1&&l===r+1?"":a.slice(l,s)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return n("/",a)},parse:function(a){e(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var r=a.charCodeAt(0),s=r===47,c;s?(l.root="/",c=1):c=0;for(var u=-1,d=0,f=-1,m=!0,h=a.length-1,x=0;h>=c;--h){if(r=a.charCodeAt(h),r===47){if(!m){d=h+1;break}continue}f===-1&&(m=!1,f=h+1),r===46?u===-1?u=h:x!==1&&(x=1):u!==-1&&(x=-1)}return u===-1||f===-1||x===0||x===1&&u===f-1&&u===d+1?f!==-1&&(d===0&&s?l.base=l.name=a.slice(1,f):l.base=l.name=a.slice(d,f)):(d===0&&s?(l.name=a.slice(1,u),l.base=a.slice(1,f)):(l.name=a.slice(d,u),l.base=a.slice(d,f)),l.ext=a.slice(u,f)),d>0?l.dir=a.slice(0,d-1):s&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,wn=i,wn}var Rr=Mr();const ve=Zn(Rr);var kn={exports:{}},Cn,xi;function Tr(){if(xi)return Cn;xi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Cn=e,Cn}var $n,gi;function Or(){if(gi)return $n;gi=1;var e=Tr();function t(){}function n(){}return n.resetWarningCache=t,$n=function(){function i(l,r,s,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},$n}var bi;function Kr(){return bi||(bi=1,kn.exports=Or()()),kn.exports}var _r=Kr();const ee=Zn(_r),Vr=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Wt(e,t,n){const i=Wr(e),{webkitRelativePath:o}=e,a=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof i.path!="string"&&yi(i,"path",a),yi(i,"relativePath",a),i}function Wr(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const i=t.split(".").pop().toLowerCase(),o=Vr.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function yi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Lr=[".DS_Store","Thumbs.db"];function Hr(e){return Ft(this,void 0,void 0,function*(){return mn(e)&&qr(e.dataTransfer)?Gr(e.dataTransfer,e.type):Ur(e)?Yr(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Xr(e):[]})}function qr(e){return mn(e)}function Ur(e){return mn(e)&&mn(e.target)}function mn(e){return typeof e=="object"&&e!==null}function Yr(e){return Nn(e.target.files).map(t=>Wt(t))}function Xr(e){return Ft(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Wt(n))})}function Gr(e,t){return Ft(this,void 0,void 0,function*(){if(e.items){const n=Nn(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const i=yield Promise.all(n.map(Zr));return wi(na(i))}return wi(Nn(e.files).map(n=>Wt(n)))})}function wi(e){return e.filter(t=>Lr.indexOf(t.name)===-1)}function Nn(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const i=e[n];t.push(i)}return t}function Zr(e){if(typeof e.webkitGetAsEntry!="function")return ki(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?ia(t):ki(e,t)}function na(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?na(n):[n]],[])}function ki(e,t){return Ft(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const l=yield a.getFile();return l.handle=a,Wt(l)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return Wt(i,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function Jr(e){return Ft(this,void 0,void 0,function*(){return e.isDirectory?ia(e):Qr(e)})}function ia(e){const t=e.createReader();return new Promise((n,i)=>{const o=[];function a(){t.readEntries(l=>Ft(this,void 0,void 0,function*(){if(l.length){const r=Promise.all(l.map(Jr));o.push(r),a()}else try{const r=yield Promise.all(o);n(r)}catch(r){i(r)}}),l=>{i(l)})}a()})}function Qr(e){return Ft(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(i=>{const o=Wt(i,e.fullPath);t(o)},i=>{n(i)})})})}var rn={},Ci;function es(){return Ci||(Ci=1,rn.__esModule=!0,rn.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var i=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return n.some(function(l){var r=l.trim().toLowerCase();return r.charAt(0)==="."?i.toLowerCase().endsWith(r):r.endsWith("/*")?a===r.replace(/\/.*$/,""):o===r})}return!0}),rn}var ts=es();const Dn=Zn(ts);function $i(e){return as(e)||is(e)||oa(e)||ns()}function ns(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function is(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function as(e){if(Array.isArray(e))return Pn(e)}function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Ei(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Di(Object(n),!0).forEach(function(i){aa(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Di(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e,t){return rs(e)||ls(e,t)||oa(e,t)||os()}function os(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oa(e,t){if(e){if(typeof e=="string")return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pn(e,t)}}function Pn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ls(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],o=!0,a=!1,l,r;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(i.push(l.value),!(t&&i.length===t));o=!0);}catch(s){a=!0,r=s}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw r}}return i}}function rs(e){if(Array.isArray(e))return e}var ss=typeof Dn=="function"?Dn:Dn.default,us="file-invalid-type",cs="file-too-large",ds="file-too-small",ps="too-many-files",ms=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:us,message:"File type must be ".concat(i)}},Si=function(t){return{code:cs,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ji=function(t){return{code:ds,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},fs={code:ps,message:"Too many files"};function la(e,t){var n=e.type==="application/x-moz-file"||ss(e,t);return[n,n?null:ms(t)]}function ra(e,t,n){if(zt(e.size))if(zt(t)&&zt(n)){if(e.size>n)return[!1,Si(n)];if(e.size<t)return[!1,ji(t)]}else{if(zt(t)&&e.size<t)return[!1,ji(t)];if(zt(n)&&e.size>n)return[!1,Si(n)]}return[!0,null]}function zt(e){return e!=null}function vs(e){var t=e.files,n=e.accept,i=e.minSize,o=e.maxSize,a=e.multiple,l=e.maxFiles,r=e.validator;return!a&&t.length>1||a&&l>=1&&t.length>l?!1:t.every(function(s){var c=la(s,n),u=Jt(c,1),d=u[0],f=ra(s,i,o),m=Jt(f,1),h=m[0],x=r?r(s):null;return d&&h&&!x})}function fn(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function sn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ai(e){e.preventDefault()}function hs(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function xs(e){return e.indexOf("Edge/")!==-1}function gs(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hs(e)||xs(e)}function nt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];return t.some(function(r){return!fn(i)&&r&&r.apply(void 0,[i].concat(a)),fn(i)})}}function bs(){return"showOpenFilePicker"in window}function ys(e){if(zt(e)){var t=Object.entries(e).filter(function(n){var i=Jt(n,2),o=i[0],a=i[1],l=!0;return sa(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),l=!1),(!Array.isArray(a)||!a.every(ua))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),l=!1),l}).reduce(function(n,i){var o=Jt(i,2),a=o[0],l=o[1];return Ei(Ei({},n),{},aa({},a,l))},{});return[{description:"Files",accept:t}]}return e}function ws(e){if(zt(e))return Object.entries(e).reduce(function(t,n){var i=Jt(n,2),o=i[0],a=i[1];return[].concat($i(t),[o],$i(a))},[]).filter(function(t){return sa(t)||ua(t)}).join(",")}function ks(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Cs(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function sa(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function ua(e){return/^.*\.[\w]+$/.test(e)}var $s=["children"],Ds=["open"],Es=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Ss=["refKey","onChange","onClick"];function js(e){return Bs(e)||zs(e)||ca(e)||As()}function As(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zs(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bs(e){if(Array.isArray(e))return In(e)}function En(e,t){return Ps(e)||Ns(e,t)||ca(e,t)||Fs()}function Fs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ca(e,t){if(e){if(typeof e=="string")return In(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return In(e,t)}}function In(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ns(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],o=!0,a=!1,l,r;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(i.push(l.value),!(t&&i.length===t));o=!0);}catch(s){a=!0,r=s}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw r}}return i}}function Ps(e){if(Array.isArray(e))return e}function zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zi(Object(n),!0).forEach(function(i){Mn(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zi(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vn(e,t){if(e==null)return{};var n=Is(e,t),i,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)i=a[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Is(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,a;for(a=0;a<i.length;a++)o=i[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var ei=v.forwardRef(function(e,t){var n=e.children,i=vn(e,$s),o=pa(i),a=o.open,l=vn(o,Ds);return v.useImperativeHandle(t,function(){return{open:a}},[a]),T.createElement(v.Fragment,null,n(le(le({},l),{},{open:a})))});ei.displayName="Dropzone";var da={disabled:!1,getFilesFromEvent:Hr,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ei.defaultProps=da;ei.propTypes={children:ee.func,accept:ee.objectOf(ee.arrayOf(ee.string)),multiple:ee.bool,preventDropOnDocument:ee.bool,noClick:ee.bool,noKeyboard:ee.bool,noDrag:ee.bool,noDragEventsBubbling:ee.bool,minSize:ee.number,maxSize:ee.number,maxFiles:ee.number,disabled:ee.bool,getFilesFromEvent:ee.func,onFileDialogCancel:ee.func,onFileDialogOpen:ee.func,useFsAccessApi:ee.bool,autoFocus:ee.bool,onDragEnter:ee.func,onDragLeave:ee.func,onDragOver:ee.func,onDrop:ee.func,onDropAccepted:ee.func,onDropRejected:ee.func,onError:ee.func,validator:ee.func};var Rn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=le(le({},da),e),n=t.accept,i=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,l=t.minSize,r=t.multiple,s=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,x=t.onFileDialogCancel,b=t.onFileDialogOpen,k=t.useFsAccessApi,C=t.autoFocus,j=t.preventDropOnDocument,D=t.noClick,g=t.noKeyboard,z=t.noDrag,B=t.noDragEventsBubbling,R=t.onError,S=t.validator,$=v.useMemo(function(){return ws(n)},[n]),K=v.useMemo(function(){return ys(n)},[n]),q=v.useMemo(function(){return typeof b=="function"?b:Bi},[b]),F=v.useMemo(function(){return typeof x=="function"?x:Bi},[x]),N=v.useRef(null),I=v.useRef(null),W=v.useReducer(Ms,Rn),he=En(W,2),_=he[0],U=he[1],ke=_.isFocused,Ce=_.isFileDialogActive,re=v.useRef(typeof window<"u"&&window.isSecureContext&&k&&bs()),ae=function(){!re.current&&Ce&&setTimeout(function(){if(I.current){var A=I.current.files;A.length||(U({type:"closeDialog"}),F())}},300)};v.useEffect(function(){return window.addEventListener("focus",ae,!1),function(){window.removeEventListener("focus",ae,!1)}},[I,Ce,F,re]);var ne=v.useRef([]),oe=function(A){N.current&&N.current.contains(A.target)||(A.preventDefault(),ne.current=[])};v.useEffect(function(){return j&&(document.addEventListener("dragover",Ai,!1),document.addEventListener("drop",oe,!1)),function(){j&&(document.removeEventListener("dragover",Ai),document.removeEventListener("drop",oe))}},[N,j]),v.useEffect(function(){return!i&&C&&N.current&&N.current.focus(),function(){}},[N,C,i]);var Z=v.useCallback(function(y){R?R(y):console.error(y)},[R]),Fe=v.useCallback(function(y){y.preventDefault(),y.persist(),de(y),ne.current=[].concat(js(ne.current),[y.target]),sn(y)&&Promise.resolve(o(y)).then(function(A){if(!(fn(y)&&!B)){var V=A.length,H=V>0&&vs({files:A,accept:$,minSize:l,maxSize:a,multiple:r,maxFiles:s,validator:S}),Q=V>0&&!H;U({isDragAccept:H,isDragReject:Q,isDragActive:!0,type:"setDraggedFiles"}),c&&c(y)}}).catch(function(A){return Z(A)})},[o,c,Z,B,$,l,a,r,s,S]),xe=v.useCallback(function(y){y.preventDefault(),y.persist(),de(y);var A=sn(y);if(A&&y.dataTransfer)try{y.dataTransfer.dropEffect="copy"}catch{}return A&&d&&d(y),!1},[d,B]),L=v.useCallback(function(y){y.preventDefault(),y.persist(),de(y);var A=ne.current.filter(function(H){return N.current&&N.current.contains(H)}),V=A.indexOf(y.target);V!==-1&&A.splice(V,1),ne.current=A,!(A.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),sn(y)&&u&&u(y))},[N,u,B]),J=v.useCallback(function(y,A){var V=[],H=[];y.forEach(function(Q){var Ie=la(Q,$),Me=En(Ie,2),Xe=Me[0],Ge=Me[1],be=ra(Q,l,a),ye=En(be,2),Ze=ye[0],Je=ye[1],ot=S?S(Q):null;if(Xe&&Ze&&!ot)V.push(Q);else{var ht=[Ge,Je];ot&&(ht=ht.concat(ot)),H.push({file:Q,errors:ht.filter(function(Oe){return Oe})})}}),(!r&&V.length>1||r&&s>=1&&V.length>s)&&(V.forEach(function(Q){H.push({file:Q,errors:[fs]})}),V.splice(0)),U({acceptedFiles:V,fileRejections:H,isDragReject:H.length>0,type:"setFiles"}),f&&f(V,H,A),H.length>0&&h&&h(H,A),V.length>0&&m&&m(V,A)},[U,r,$,l,a,s,f,m,h,S]),ge=v.useCallback(function(y){y.preventDefault(),y.persist(),de(y),ne.current=[],sn(y)&&Promise.resolve(o(y)).then(function(A){fn(y)&&!B||J(A,y)}).catch(function(A){return Z(A)}),U({type:"reset"})},[o,J,Z,B]),se=v.useCallback(function(){if(re.current){U({type:"openDialog"}),q();var y={multiple:r,types:K};window.showOpenFilePicker(y).then(function(A){return o(A)}).then(function(A){J(A,null),U({type:"closeDialog"})}).catch(function(A){ks(A)?(F(A),U({type:"closeDialog"})):Cs(A)?(re.current=!1,I.current?(I.current.value=null,I.current.click()):Z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Z(A)});return}I.current&&(U({type:"openDialog"}),q(),I.current.value=null,I.current.click())},[U,q,F,k,J,Z,K,r]),ue=v.useCallback(function(y){!N.current||!N.current.isEqualNode(y.target)||(y.key===" "||y.key==="Enter"||y.keyCode===32||y.keyCode===13)&&(y.preventDefault(),se())},[N,se]),Ne=v.useCallback(function(){U({type:"focus"})},[]),Y=v.useCallback(function(){U({type:"blur"})},[]),He=v.useCallback(function(){D||(gs()?setTimeout(se,0):se())},[D,se]),ce=function(A){return i?null:A},me=function(A){return g?null:ce(A)},Pe=function(A){return z?null:ce(A)},de=function(A){B&&A.stopPropagation()},je=v.useMemo(function(){return function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=y.refKey,V=A===void 0?"ref":A,H=y.role,Q=y.onKeyDown,Ie=y.onFocus,Me=y.onBlur,Xe=y.onClick,Ge=y.onDragEnter,be=y.onDragOver,ye=y.onDragLeave,Ze=y.onDrop,Je=vn(y,Es);return le(le(Mn({onKeyDown:me(nt(Q,ue)),onFocus:me(nt(Ie,Ne)),onBlur:me(nt(Me,Y)),onClick:ce(nt(Xe,He)),onDragEnter:Pe(nt(Ge,Fe)),onDragOver:Pe(nt(be,xe)),onDragLeave:Pe(nt(ye,L)),onDrop:Pe(nt(Ze,ge)),role:typeof H=="string"&&H!==""?H:"presentation"},V,N),!i&&!g?{tabIndex:0}:{}),Je)}},[N,ue,Ne,Y,He,Fe,xe,L,ge,g,z,i]),E=v.useCallback(function(y){y.stopPropagation()},[]),P=v.useMemo(function(){return function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=y.refKey,V=A===void 0?"ref":A,H=y.onChange,Q=y.onClick,Ie=vn(y,Ss),Me=Mn({accept:$,multiple:r,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ce(nt(H,ge)),onClick:ce(nt(Q,E)),tabIndex:-1},V,I);return le(le({},Me),Ie)}},[I,n,r,ge,i]);return le(le({},_),{},{isFocused:ke&&!i,getRootProps:je,getInputProps:P,rootRef:N,inputRef:I,open:ce(se)})}function Ms(e,t){switch(t.type){case"focus":return le(le({},e),{},{isFocused:!0});case"blur":return le(le({},e),{},{isFocused:!1});case"openDialog":return le(le({},Rn),{},{isFileDialogActive:!0});case"closeDialog":return le(le({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return le(le({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return le(le({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return le({},Rn);default:return e}}function Bi(){}function Rs(e){return Xl({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 9.059v-2.559c0-.256-.098-.512-.293-.708-.195-.195-.451-.292-.707-.292s-.512.097-.707.292l-6.293 6.208 6.293 6.207c.195.195.451.293.707.293s.512-.098.707-.293.293-.452.293-.707v-2.489c2.75.068 5.755.566 8 3.989v-1c0-4.633-3.5-8.443-8-8.941z"},child:[]}]})(e)}function Ts({isOpen:e,fileType:t,newFileName:n,onTypeChange:i,onNameChange:o,onClose:a,onCreate:l}){return p.jsx(Qt,{radius:"sm",isOpen:e,onClose:a,children:p.jsxs(en,{className:"rounded-3xl border border-white/70 dark:border-white/10 bg-white/92 dark:bg-zinc-900/92 backdrop-blur-2xl shadow-2xl shadow-primary-900/15",children:[p.jsx(tn,{children:"新建"}),p.jsx(nn,{children:p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs(ta,{radius:"sm",color:"primary",children:[p.jsx(te,{variant:t==="file"?"solid":"flat",onPress:()=>i("file"),children:"文件"}),p.jsx(te,{variant:t==="directory"?"solid":"flat",onPress:()=>i("directory"),children:"目录"})]}),p.jsx(Gn,{radius:"sm",label:"名称",value:n,onChange:o})]})}),p.jsxs(an,{children:[p.jsx(te,{radius:"sm",color:"primary",variant:"flat",onPress:a,children:"取消"}),p.jsx(te,{radius:"sm",color:"primary",onPress:l,children:"创建"})]})]})})}function Os({isOpen:e,file:t,onClose:n,onSave:i,onContentChange:o}){const a=l=>l.endsWith(".js")?"javascript":l.endsWith(".ts")?"typescript":l.endsWith(".tsx")?"tsx":l.endsWith(".jsx")?"jsx":l.endsWith(".vue")?"vue":l.endsWith(".svelte")?"svelte":l.endsWith(".json")?"json":l.endsWith(".html")?"html":l.endsWith(".css")?"css":l.endsWith(".scss")?"scss":l.endsWith(".less")?"less":l.endsWith(".md")?"markdown":l.endsWith(".yaml")||l.endsWith(".yml")?"yaml":l.endsWith(".xml")?"xml":l.endsWith(".sql")?"sql":l.endsWith(".sh")?"shell":l.endsWith(".bat")?"bat":l.endsWith(".php")?"php":l.endsWith(".java")?"java":l.endsWith(".c")?"c":l.endsWith(".cpp")?"cpp":l.endsWith(".h")?"h":l.endsWith(".hpp")?"hpp":l.endsWith(".go")?"go":l.endsWith(".py")?"python":l.endsWith(".rb")?"ruby":l.endsWith(".cs")?"csharp":l.endsWith(".swift")?"swift":l.endsWith(".vb")?"vb":l.endsWith(".lua")?"lua":l.endsWith(".pl")?"perl":l.endsWith(".r")?"r":"plaintext";return p.jsx(Qt,{radius:"sm",size:"full",isOpen:e,onClose:n,scrollBehavior:"inside",children:p.jsxs(en,{className:"flex flex-col h-full max-h-[100dvh]",children:[p.jsxs(tn,{className:"flex items-center gap-2 border-b border-default-200/50 flex-shrink-0",children:[p.jsx("span",{children:"编辑文件"}),p.jsx(kl,{radius:"sm",className:"text-xs",children:t==null?void 0:t.path}),p.jsxs("div",{className:"ml-auto text-xs text-default-400 font-normal px-2",children:["按 ",p.jsx("span",{className:"px-1 py-0.5 rounded border border-default-300 bg-default-100",children:"Ctrl/Cmd + S"})," 保存"]})]}),p.jsx(nn,{className:"p-4 bg-content2/50 flex-1 min-h-0 overflow-hidden",children:p.jsx("div",{className:"h-full w-full overflow-auto",onKeyDown:l=>{(l.ctrlKey||l.metaKey)&&l.key==="s"&&(l.preventDefault(),i())},children:p.jsx(ql,{height:"100%",value:(t==null?void 0:t.content)||"",onChange:o,options:{wordWrap:"on"},language:t!=null&&t.path?a(t.path):"plaintext"})})}),p.jsxs(an,{className:"border-t border-default-200/50 flex-shrink-0",children:[p.jsx(te,{radius:"sm",color:"primary",variant:"flat",onPress:n,children:"取消"}),p.jsx(te,{radius:"sm",color:"primary",onPress:i,children:"保存"})]})]})})}const ma=[".mp4",".webm"],fa=[".mp3",".wav"],Tn=[...ma,...fa];function Ks({isOpen:e,filePath:t,onClose:n}){const i=ve.extname(t).toLowerCase(),{data:o,loading:a,error:l,run:r}=qi(async()=>De.downloadToURL(t),{refreshDeps:[t],manual:!0,refreshDepsAction:()=>{const c=ve.extname(t).toLowerCase();!t||!Tn.includes(c)||r()}});v.useEffect(()=>{t&&r()},[t]);let s=null;return Tn.includes(i)?l?s=p.jsx("div",{children:"读取文件失败"}):a||!o?s=p.jsx("div",{className:"flex justify-center items-center h-full",children:p.jsx(Zt,{})}):ma.includes(i)?s=p.jsx("video",{src:o,controls:!0,className:"max-w-full"}):fa.includes(i)?s=p.jsx("audio",{src:o,controls:!0,className:"w-full"}):s=p.jsx("div",{className:"flex justify-center items-center h-full",children:p.jsx(Zt,{})}):s=p.jsx("div",{children:"暂不支持预览此文件类型"}),p.jsx(Qt,{radius:"sm",isOpen:e,onClose:n,scrollBehavior:"inside",size:"3xl",children:p.jsxs(en,{children:[p.jsx(tn,{children:"文件预览"}),p.jsx(nn,{className:"flex justify-center items-center",children:s}),p.jsx(an,{children:p.jsx(te,{radius:"sm",color:"primary",variant:"flat",onPress:n,children:"关闭"})})]})})}const ti=new WeakMap;function On(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function _s(e,t){let n=ti.get(e);if(!n)throw new Error("Unknown grid");return`${n}-${On(t)}`}function va(e,t,n){let i=ti.get(e);if(!i)throw new Error("Unknown grid");return`${i}-${On(t)}-${On(n)}`}function ha(e,t){return[...e.collection.rowHeaderColumnKeys].map(n=>va(e,t,n)).join(" ")}var xa={};xa={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var ga={};ga={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var ba={};ba={ascending:"vzestupně",ascendingSort:e=>`řazeno vzestupně podle sloupce ${e.columnName}`,columnSize:e=>`${e.value} pixelů`,descending:"sestupně",descendingSort:e=>`řazeno sestupně podle sloupce ${e.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var ya={};ya={ascending:"stigende",ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende rækkefølge`,columnSize:e=>`${e.value} pixels`,descending:"faldende",descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var wa={};wa={ascending:"aufsteigend",ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,columnSize:e=>`${e.value} Pixel`,descending:"absteigend",descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var ka={};ka={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var Ca={};Ca={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:"Press Enter to start resizing"};var $a={};$a={ascending:"ascendente",ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,columnSize:e=>`${e.value} píxeles`,descending:"descendente",descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var Da={};Da={ascending:"tõusev järjestus",ascendingSort:e=>`sorditud veeru järgi ${e.columnName} tõusvas järjestuses`,columnSize:e=>`${e.value} pikslit`,descending:"laskuv järjestus",descendingSort:e=>`sorditud veeru järgi ${e.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var Ea={};Ea={ascending:"nouseva",ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa järjestyksessä`,columnSize:e=>`${e.value} pikseliä`,descending:"laskeva",descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var Sa={};Sa={ascending:"croissant",ascendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre croissant`,columnSize:e=>`${e.value} pixels`,descending:"décroissant",descendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var ja={};ja={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var Aa={};Aa={ascending:"rastući",ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastućem redoslijedom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`razvrstano po stupcima ${e.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var za={};za={ascending:"növekvő",ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, növekvő sorrendben`,columnSize:e=>`${e.value} képpont`,descending:"csökkenő",descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var Ba={};Ba={ascending:"crescente",ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,columnSize:e=>`${e.value} pixel`,descending:"decrescente",descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var Fa={};Fa={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var Na={};Na={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var Pa={};Pa={ascending:"didėjančia tvarka",ascendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} didėjančia tvarka`,columnSize:e=>`${e.value} piks.`,descending:"mažėjančia tvarka",descendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var Ia={};Ia={ascending:"augošā secībā",ascendingSort:e=>`kārtots pēc kolonnas ${e.columnName} augošā secībā`,columnSize:e=>`${e.value} pikseļi`,descending:"dilstošā secībā",descendingSort:e=>`kārtots pēc kolonnas ${e.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var Ma={};Ma={ascending:"stigende",ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkefølge`,columnSize:e=>`${e.value} piksler`,descending:"synkende",descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var Ra={};Ra={ascending:"oplopend",ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,columnSize:e=>`${e.value} pixels`,descending:"aflopend",descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var Ta={};Ta={ascending:"rosnąco",ascendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku rosnącym`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:"malejąco",descendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var Oa={};Oa={ascending:"crescente",ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,columnSize:e=>`${e.value} pixels`,descending:"decrescente",descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var Ka={};Ka={ascending:"ascendente",ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,columnSize:e=>`${e.value} pixels`,descending:"descendente",descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var _a={};_a={ascending:"crescătoare",ascendingSort:e=>`sortate după coloana ${e.columnName} în ordine crescătoare`,columnSize:e=>`${e.value} pixeli`,descending:"descrescătoare",descendingSort:e=>`sortate după coloana ${e.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var Va={};Va={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var Wa={};Wa={ascending:"vzostupne",ascendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,columnSize:e=>`Počet pixelov: ${e.value}`,descending:"zostupne",descendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var La={};La={ascending:"naraščajoče",ascendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v naraščajočem vrstnem redu`,columnSize:e=>`${e.value} slikovnih pik`,descending:"padajoče",descendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var Ha={};Ha={ascending:"rastući",ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastućim redosledom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`sortirano po kolonama ${e.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var qa={};qa={ascending:"stigande",ascendingSort:e=>`sorterat på kolumn ${e.columnName} i stigande ordning`,columnSize:e=>`${e.value} pixlar`,descending:"fallande",descendingSort:e=>`sorterat på kolumn ${e.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var Ua={};Ua={ascending:"artan sırada",ascendingSort:e=>`${e.columnName} sütuna göre artan düzende sırala`,columnSize:e=>`${e.value} piksel`,descending:"azalan sırada",descendingSort:e=>`${e.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var Ya={};Ya={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var Xa={};Xa={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var Ga={};Ga={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var gn={};gn={"ar-AE":xa,"bg-BG":ga,"cs-CZ":ba,"da-DK":ya,"de-DE":wa,"el-GR":ka,"en-US":Ca,"es-ES":$a,"et-EE":Da,"fi-FI":Ea,"fr-FR":Sa,"he-IL":ja,"hr-HR":Aa,"hu-HU":za,"it-IT":Ba,"ja-JP":Fa,"ko-KR":Na,"lt-LT":Pa,"lv-LV":Ia,"nb-NO":Ma,"nl-NL":Ra,"pl-PL":Ta,"pt-BR":Oa,"pt-PT":Ka,"ro-RO":_a,"ru-RU":Va,"sk-SK":Wa,"sl-SI":La,"sr-SP":Ha,"sv-SE":qa,"tr-TR":Ua,"uk-UA":Ya,"zh-CN":Xa,"zh-TW":Ga};class Za{isCell(t){return t.type==="cell"}isRow(t){return t.type==="row"||t.type==="item"}isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findPreviousKey(t,n){let i=t!=null?this.collection.getKeyBefore(t):this.collection.getLastKey();for(;i!=null;){let o=this.collection.getItem(i);if(!o)return null;if(!this.isDisabled(o)&&(!n||n(o)))return i;i=this.collection.getKeyBefore(i)}return null}findNextKey(t,n){let i=t!=null?this.collection.getKeyAfter(t):this.collection.getFirstKey();for(;i!=null;){let o=this.collection.getItem(i);if(!o)return null;if(!this.isDisabled(o)&&(!n||n(o)))return i;if(i=this.collection.getKeyAfter(i),i==null)return null}return null}getKeyForItemInRowByIndex(t,n=0){if(n<0)return null;let i=this.collection.getItem(t);if(!i)return null;let o=0;for(let r of Ee(i,this.collection)){var a;if(r.colSpan&&r.colSpan+o>n)return(a=r.key)!==null&&a!==void 0?a:null;r.colSpan&&(o=o+r.colSpan-1);var l;if(o===n)return(l=r.key)!==null&&l!==void 0?l:null;o++}return null}getKeyBelow(t){let n=t,i=this.collection.getItem(n);if(!i)return null;var o;if(this.isCell(i)&&(n=(o=i.parentKey)!==null&&o!==void 0?o:null),n==null)return null;if(n=this.findNextKey(n,a=>a.type==="item"),n!=null){if(this.isCell(i)){let a=i.colIndex?i.colIndex:i.index;return this.getKeyForItemInRowByIndex(n,a)}if(this.focusMode==="row")return n}return null}getKeyAbove(t){let n=t,i=this.collection.getItem(n);if(!i)return null;var o;if(this.isCell(i)&&(n=(o=i.parentKey)!==null&&o!==void 0?o:null),n==null)return null;if(n=this.findPreviousKey(n,a=>a.type==="item"),n!=null){if(this.isCell(i)){let a=i.colIndex?i.colIndex:i.index;return this.getKeyForItemInRowByIndex(n,a)}if(this.focusMode==="row")return n}return null}getKeyRightOf(t){let n=this.collection.getItem(t);if(!n)return null;if(this.isRow(n)){var i,o;let u=Ee(n,this.collection);var a;return(a=this.direction==="rtl"?(i=Dt(u))===null||i===void 0?void 0:i.key:(o=$t(u))===null||o===void 0?void 0:o.key)!==null&&a!==void 0?a:null}if(this.isCell(n)&&n.parentKey!=null){let u=this.collection.getItem(n.parentKey);if(!u)return null;let d=Ee(u,this.collection);var l;let f=(l=this.direction==="rtl"?ln(d,n.index-1):ln(d,n.index+1))!==null&&l!==void 0?l:null;var r;if(f)return(r=f.key)!==null&&r!==void 0?r:null;var s;if(this.focusMode==="row")return(s=n.parentKey)!==null&&s!==void 0?s:null;var c;return(c=this.direction==="rtl"?this.getFirstKey(t):this.getLastKey(t))!==null&&c!==void 0?c:null}return null}getKeyLeftOf(t){let n=this.collection.getItem(t);if(!n)return null;if(this.isRow(n)){var i,o;let u=Ee(n,this.collection);var a;return(a=this.direction==="rtl"?(i=$t(u))===null||i===void 0?void 0:i.key:(o=Dt(u))===null||o===void 0?void 0:o.key)!==null&&a!==void 0?a:null}if(this.isCell(n)&&n.parentKey!=null){let u=this.collection.getItem(n.parentKey);if(!u)return null;let d=Ee(u,this.collection);var l;let f=(l=this.direction==="rtl"?ln(d,n.index+1):ln(d,n.index-1))!==null&&l!==void 0?l:null;var r;if(f)return(r=f.key)!==null&&r!==void 0?r:null;var s;if(this.focusMode==="row")return(s=n.parentKey)!==null&&s!==void 0?s:null;var c;return(c=this.direction==="rtl"?this.getLastKey(t):this.getFirstKey(t))!==null&&c!==void 0?c:null}return null}getFirstKey(t,n){let i=t??null,o;if(i!=null){if(o=this.collection.getItem(i),!o)return null;if(this.isCell(o)&&!n&&o.parentKey!=null){var a;let c=this.collection.getItem(o.parentKey);if(!c)return null;var l;return(l=(a=$t(Ee(c,this.collection)))===null||a===void 0?void 0:a.key)!==null&&l!==void 0?l:null}}if(i=this.findNextKey(void 0,c=>c.type==="item"),i!=null&&(o&&this.isCell(o)&&n||this.focusMode==="cell")){var r;let c=this.collection.getItem(i);if(!c)return null;var s;i=(s=(r=$t(Ee(c,this.collection)))===null||r===void 0?void 0:r.key)!==null&&s!==void 0?s:null}return i}getLastKey(t,n){let i=t??null,o;if(i!=null){if(o=this.collection.getItem(i),!o)return null;if(this.isCell(o)&&!n&&o.parentKey!=null){var a;let c=this.collection.getItem(o.parentKey);if(!c)return null;let u=Ee(c,this.collection);var l;return(l=(a=Dt(u))===null||a===void 0?void 0:a.key)!==null&&l!==void 0?l:null}}if(i=this.findPreviousKey(void 0,c=>c.type==="item"),i!=null&&(o&&this.isCell(o)&&n||this.focusMode==="cell")){var r;let c=this.collection.getItem(i);if(!c)return null;let u=Ee(c,this.collection);var s;i=(s=(r=Dt(u))===null||r===void 0?void 0:r.key)!==null&&s!==void 0?s:null}return i}getKeyPageAbove(t){let n=t,i=this.layoutDelegate.getItemRect(n);if(!i)return null;let o=Math.max(0,i.y+i.height-this.layoutDelegate.getVisibleRect().height);for(;i&&i.y>o&&n!=null;){var a;if(n=(a=this.getKeyAbove(n))!==null&&a!==void 0?a:null,n==null)break;i=this.layoutDelegate.getItemRect(n)}return n}getKeyPageBelow(t){let n=t,i=this.layoutDelegate.getItemRect(n);if(!i)return null;let o=this.layoutDelegate.getVisibleRect().height,a=Math.min(this.layoutDelegate.getContentSize().height,i.y+o);for(;i&&i.y+i.height<a;){let l=this.getKeyBelow(n);if(l==null)break;i=this.layoutDelegate.getItemRect(l),n=l}return n}getKeyForSearch(t,n){let i=n??null;if(!this.collator)return null;let o=this.collection;if(i=n??this.getFirstKey(),i==null)return null;let a=o.getItem(i);if(!a)return null;var l;a.type==="cell"&&(i=(l=a.parentKey)!==null&&l!==void 0?l:null);let r=!1;for(;i!=null;){let u=o.getItem(i);if(!u)return null;if(u.textValue){let d=u.textValue.slice(0,t.length);if(this.collator.compare(d,t)===0){var s,c;return this.isRow(u)&&this.focusMode==="cell"?(c=(s=$t(Ee(u,this.collection)))===null||s===void 0?void 0:s.key)!==null&&c!==void 0?c:null:u.key}}i=this.findNextKey(i,d=>d.type==="item"),i==null&&!r&&(i=this.getFirstKey(),r=!0)}return null}constructor(t){if(this.collection=t.collection,this.disabledKeys=t.disabledKeys,this.disabledBehavior=t.disabledBehavior||"all",this.direction=t.direction,this.collator=t.collator,!t.layout&&!t.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=t.layoutDelegate||(t.layout?new Vs(t.layout):new rr(t.ref));var n;this.focusMode=(n=t.focusMode)!==null&&n!==void 0?n:"row"}}class Vs{getContentSize(){return this.layout.getContentSize()}getItemRect(t){var n;return((n=this.layout.getLayoutInfo(t))===null||n===void 0?void 0:n.rect)||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}constructor(t){this.layout=t}}const ni=new WeakMap;var Ja={};Ja={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var Qa={};Qa={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var eo={};eo={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var to={};to={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var no={};no={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var io={};io={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var ao={};ao={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var oo={};oo={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var lo={};lo={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var ro={};ro={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var so={};so={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var uo={};uo={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var co={};co={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var po={};po={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var mo={};mo={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var fo={};fo={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var vo={};vo={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var ho={};ho={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var xo={};xo={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var go={};go={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var bo={};bo={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var yo={};yo={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var wo={};wo={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var ko={};ko={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Co={};Co={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var $o={};$o={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var Do={};Do={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var Eo={};Eo={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var So={};So={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var jo={};jo={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var Ao={};Ao={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var zo={};zo={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var Bo={};Bo={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var Fo={};Fo={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var bn={};bn={"ar-AE":Ja,"bg-BG":Qa,"cs-CZ":eo,"da-DK":to,"de-DE":no,"el-GR":io,"en-US":ao,"es-ES":oo,"et-EE":lo,"fi-FI":ro,"fr-FR":so,"he-IL":uo,"hr-HR":co,"hu-HU":po,"it-IT":mo,"ja-JP":fo,"ko-KR":vo,"lt-LT":ho,"lv-LV":xo,"nb-NO":go,"nl-NL":bo,"pl-PL":yo,"pt-BR":wo,"pt-PT":ko,"ro-RO":Co,"ru-RU":$o,"sk-SK":Do,"sl-SI":Eo,"sr-SP":So,"sv-SE":jo,"tr-TR":Ao,"uk-UA":zo,"zh-CN":Bo,"zh-TW":Fo};const No=7e3;let it=null;function Po(e,t="assertive",n=No){it?it.announce(e,t,n):(it=new Ws,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?it.announce(e,t,n):setTimeout(()=>{it!=null&&it.isAttached()&&(it==null||it.announce(e,t,n))},100))}class Ws{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",i=No){var o,a;if(!this.node)return;let l=document.createElement("div");typeof t=="object"?(l.setAttribute("role","img"),l.setAttribute("aria-labelledby",t["aria-labelledby"])):l.textContent=t,n==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(l):(a=this.politeLog)===null||a===void 0||a.appendChild(l),t!==""&&setTimeout(()=>{l.remove()},i)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function Ls(e){return e&&e.__esModule?e.default:e}function Hs(e,t){let{getRowText:n=r=>{var s,c,u,d;return(d=(s=(c=t.collection).getTextValue)===null||s===void 0?void 0:s.call(c,r))!==null&&d!==void 0?d:(u=t.collection.getItem(r))===null||u===void 0?void 0:u.textValue}}=e,i=Lt(Ls(bn),"@react-aria/grid"),o=t.selectionManager.rawSelection,a=v.useRef(o),l=zl(()=>{var r;if(!t.selectionManager.isFocused||o===a.current){a.current=o;return}let s=Fi(o,a.current),c=Fi(a.current,o),u=t.selectionManager.selectionBehavior==="replace",d=[];if(t.selectionManager.selectedKeys.size===1&&u){let f=t.selectionManager.selectedKeys.keys().next().value;if(f!=null&&t.collection.getItem(f)){let m=n(f);m&&d.push(i.format("selectedItem",{item:m}))}}else if(s.size===1&&c.size===0){let f=s.keys().next().value;if(f!=null){let m=n(f);m&&d.push(i.format("selectedItem",{item:m}))}}else if(c.size===1&&s.size===0){let f=c.keys().next().value;if(f!=null&&t.collection.getItem(f)){let m=n(f);m&&d.push(i.format("deselectedItem",{item:m}))}}t.selectionManager.selectionMode==="multiple"&&(d.length===0||o==="all"||o.size>1||a.current==="all"||((r=a.current)===null||r===void 0?void 0:r.size)>1)&&d.push(o==="all"?i.format("selectedAll"):i.format("selectedCount",{count:o.size})),d.length>0&&Po(d.join(" ")),a.current=o});Qi(()=>{if(t.selectionManager.isFocused)l();else{let r=requestAnimationFrame(l);return()=>cancelAnimationFrame(r)}},[o,t.selectionManager.isFocused])}function Fi(e,t){let n=new Set;if(e==="all"||t==="all")return n;for(let i of e.keys())t.has(i)||n.add(i);return n}function qs(e){return e&&e.__esModule?e.default:e}function Us(e){let t=Lt(qs(bn),"@react-aria/grid"),n=Bl(),i=(n==="pointer"||n==="virtual"||n==null)&&typeof window<"u"&&"ontouchstart"in window,o=v.useMemo(()=>{let l=e.selectionManager.selectionMode,r=e.selectionManager.selectionBehavior,s;return i&&(s=t.format("longPressToSelect")),r==="replace"&&l!=="none"&&e.hasItemActions?s:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,i]);return Jn(o)}function Ys(e,t,n){let{isVirtualized:i,disallowTypeAhead:o,keyboardDelegate:a,focusMode:l,scrollRef:r,getRowText:s,onRowAction:c,onCellAction:u,escapeKeyBehavior:d="clearSelection",shouldSelectOnPressUp:f}=e,{selectionManager:m}=t;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let h=Ji({usage:"search",sensitivity:"base"}),{direction:x}=xn(),b=t.selectionManager.disabledBehavior,k=v.useMemo(()=>a||new Za({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:b,ref:n,direction:x,collator:h,focusMode:l}),[a,t.collection,t.disabledKeys,b,n,x,h,l]),{collectionProps:C}=er({ref:n,selectionManager:m,keyboardDelegate:k,isVirtualized:i,scrollRef:r,disallowTypeAhead:o,escapeKeyBehavior:d}),j=Yn(e.id);ni.set(t,{keyboardDelegate:k,actions:{onRowAction:c,onCellAction:u},shouldSelectOnPressUp:f});let D=Us({selectionManager:m,hasItemActions:!!(c||u)}),g=Fl(e,{labelable:!0}),z=v.useCallback($=>{if(m.isFocused){$.currentTarget.contains($.target)||m.setFocused(!1);return}$.currentTarget.contains($.target)&&m.setFocused(!0)},[m]),B=v.useMemo(()=>({onBlur:C.onBlur,onFocus:z}),[z,C.onBlur]),R=sr(n,{isDisabled:t.collection.size!==0}),S=Ht(g,{role:"grid",id:j,"aria-multiselectable":m.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?B:C,t.collection.size===0&&{tabIndex:R?-1:0}||void 0,D);return i&&(S["aria-rowcount"]=t.collection.size,S["aria-colcount"]=t.collection.columnCount),Hs({getRowText:s},t),{gridProps:S}}function Xs(){return{rowGroupProps:{role:"rowgroup"}}}function Gs(e,t,n){var i,o;let{node:a,isVirtualized:l,shouldSelectOnPressUp:r,onAction:s}=e,{actions:c,shouldSelectOnPressUp:u}=ni.get(t),d=c.onRowAction?()=>{var b;return(b=c.onRowAction)===null||b===void 0?void 0:b.call(c,a.key)}:s,{itemProps:f,...m}=Gi({selectionManager:t.selectionManager,key:a.key,ref:n,isVirtualized:l,shouldSelectOnPressUp:u||r,onAction:d||!(a==null||(i=a.props)===null||i===void 0)&&i.onAction?Nl(a==null||(o=a.props)===null||o===void 0?void 0:o.onAction,d):void 0,isDisabled:t.collection.size===0}),h=t.selectionManager.isSelected(a.key),x={role:"row","aria-selected":t.selectionManager.selectionMode!=="none"?h:void 0,"aria-disabled":m.isDisabled||void 0,...f};return l&&(x["aria-rowindex"]=a.index+1),{rowProps:x,...m}}function Io(e,t,n){let{node:i,isVirtualized:o,focusMode:a="child",shouldSelectOnPressUp:l,onAction:r}=e,{direction:s}=xn(),{keyboardDelegate:c,actions:{onCellAction:u}}=ni.get(t),d=v.useRef(null),f=()=>{if(n.current){let j=ui(n.current);if(a==="child"){if(n.current.contains(document.activeElement)&&n.current!==document.activeElement)return;let D=t.selectionManager.childFocusStrategy==="last"?Sn(j):j.firstChild();if(D){kt(D);return}}(d.current!=null&&i.key!==d.current||!n.current.contains(document.activeElement))&&kt(n.current)}},{itemProps:m,isPressed:h}=Gi({selectionManager:t.selectionManager,key:i.key,ref:n,isVirtualized:o,focus:f,shouldSelectOnPressUp:l,onAction:u?()=>u(i.key):r,isDisabled:t.collection.size===0}),x=j=>{if(!j.currentTarget.contains(j.target)||t.isKeyboardNavigationDisabled||!n.current||!document.activeElement)return;let D=ui(n.current);switch(D.currentNode=document.activeElement,j.key){case"ArrowLeft":{let $=s==="rtl"?D.nextNode():D.previousNode();if(a==="child"&&$===n.current&&($=null),j.preventDefault(),j.stopPropagation(),$)kt($),Ot($,{containingElement:Tt(n.current)});else{var g;if(((g=c.getKeyLeftOf)===null||g===void 0?void 0:g.call(c,i.key))!==i.key){var z;(z=n.current.parentElement)===null||z===void 0||z.dispatchEvent(new KeyboardEvent(j.nativeEvent.type,j.nativeEvent));break}a==="cell"&&s==="rtl"?(kt(n.current),Ot(n.current,{containingElement:Tt(n.current)})):(D.currentNode=n.current,$=s==="rtl"?D.firstChild():Sn(D),$&&(kt($),Ot($,{containingElement:Tt(n.current)})))}break}case"ArrowRight":{let $=s==="rtl"?D.previousNode():D.nextNode();if(a==="child"&&$===n.current&&($=null),j.preventDefault(),j.stopPropagation(),$)kt($),Ot($,{containingElement:Tt(n.current)});else{var B;if(((B=c.getKeyRightOf)===null||B===void 0?void 0:B.call(c,i.key))!==i.key){var R;(R=n.current.parentElement)===null||R===void 0||R.dispatchEvent(new KeyboardEvent(j.nativeEvent.type,j.nativeEvent));break}a==="cell"&&s==="ltr"?(kt(n.current),Ot(n.current,{containingElement:Tt(n.current)})):(D.currentNode=n.current,$=s==="rtl"?Sn(D):D.firstChild(),$&&(kt($),Ot($,{containingElement:Tt(n.current)})))}break}case"ArrowUp":case"ArrowDown":if(!j.altKey&&n.current.contains(j.target)){var S;j.stopPropagation(),j.preventDefault(),(S=n.current.parentElement)===null||S===void 0||S.dispatchEvent(new KeyboardEvent(j.nativeEvent.type,j.nativeEvent))}break}},b=j=>{if(d.current=i.key,j.target!==n.current){Pl()||t.selectionManager.setFocusedKey(i.key);return}requestAnimationFrame(()=>{a==="child"&&document.activeElement===n.current&&f()})},k=Ht(m,{role:"gridcell",onKeyDownCapture:x,"aria-colspan":i.colSpan,"aria-colindex":i.colIndex!=null?i.colIndex+1:void 0,colSpan:o?void 0:i.colSpan,onFocus:b});var C;return o&&(k["aria-colindex"]=((C=i.colIndex)!==null&&C!==void 0?C:i.index)+1),l&&k.tabIndex!=null&&k.onPointerDown==null&&(k.onPointerDown=j=>{let D=j.currentTarget,g=D.getAttribute("tabindex");D.removeAttribute("tabindex"),requestAnimationFrame(()=>{g!=null&&D.setAttribute("tabindex",g)})}),{gridCellProps:k,isPressed:h}}function Sn(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function Zs(e){return e&&e.__esModule?e.default:e}function Js(e,t){let{key:n}=e,i=t.selectionManager,o=Yn(),a=!t.selectionManager.canSelectItem(n),l=t.selectionManager.isSelected(n),r=()=>i.toggleSelection(n);const s=Lt(Zs(bn),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":s.format("select"),isSelected:l,isDisabled:a,onChange:r}}}class Qs extends Za{isCell(t){return t.type==="cell"||t.type==="rowheader"||t.type==="column"}getKeyBelow(t){let n=this.collection.getItem(t);if(!n)return null;if(n.type==="column"){let i=$t(Ee(n,this.collection));if(i)return i.key;let o=this.getFirstKey();return o==null||!this.collection.getItem(o)?null:super.getKeyForItemInRowByIndex(o,n.index)}return super.getKeyBelow(t)}getKeyAbove(t){let n=this.collection.getItem(t);if(!n)return null;if(n.type==="column"){let a=n.parentKey!=null?this.collection.getItem(n.parentKey):null;return a&&a.type==="column"?a.key:null}let i=super.getKeyAbove(t),o=i!=null?this.collection.getItem(i):null;return o&&o.type!=="headerrow"?i:this.isCell(n)?this.collection.columns[n.index].key:this.collection.columns[0].key}findNextColumnKey(t){let n=this.findNextKey(t.key,o=>o.type==="column");if(n!=null)return n;let i=this.collection.headerRows[t.level];for(let o of Ee(i,this.collection))if(o.type==="column")return o.key;return null}findPreviousColumnKey(t){let n=this.findPreviousKey(t.key,a=>a.type==="column");if(n!=null)return n;let i=this.collection.headerRows[t.level],o=[...Ee(i,this.collection)];for(let a=o.length-1;a>=0;a--){let l=o[a];if(l.type==="column")return l.key}return null}getKeyRightOf(t){let n=this.collection.getItem(t);return n?n.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(n):this.findNextColumnKey(n):super.getKeyRightOf(t):null}getKeyLeftOf(t){let n=this.collection.getItem(t);return n?n.type==="column"?this.direction==="rtl"?this.findNextColumnKey(n):this.findPreviousColumnKey(n):super.getKeyLeftOf(t):null}getKeyForSearch(t,n){if(!this.collator)return null;let i=this.collection,o=n??this.getFirstKey();if(o==null)return null;let a=i.getItem(o);var l;(a==null?void 0:a.type)==="cell"&&(o=(l=a.parentKey)!==null&&l!==void 0?l:null);let r=!1;for(;o!=null;){let s=i.getItem(o);if(!s)return null;if(s.textValue){let c=s.textValue.slice(0,t.length);if(this.collator.compare(c,t)===0)return s.key}for(let c of Ee(s,this.collection)){let u=i.columns[c.index];if(i.rowHeaderColumnKeys.has(u.key)&&c.textValue){let d=c.textValue.slice(0,t.length);if(this.collator.compare(d,t)===0){let f=n!=null?i.getItem(n):a;return(f==null?void 0:f.type)==="cell"?c.key:s.key}}}o=this.getKeyBelow(o),o==null&&!r&&(o=this.getFirstKey(),r=!0)}return null}}function eu(e){return e&&e.__esModule?e.default:e}function tu(e,t,n){let{keyboardDelegate:i,isVirtualized:o,layoutDelegate:a,layout:l}=e,r=Ji({usage:"search",sensitivity:"base"}),{direction:s}=xn(),c=t.selectionManager.disabledBehavior,u=v.useMemo(()=>i||new Qs({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:c,ref:n,direction:s,collator:r,layoutDelegate:a,layout:l}),[i,t.collection,t.disabledKeys,c,n,s,r,a,l]),d=Yn(e.id);ti.set(t,d);let{gridProps:f}=Ys({...e,id:d,keyboardDelegate:u},t,n);o&&(f["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),pn()&&"expandedKeys"in t&&(f.role="treegrid");let{column:m,direction:h}=t.sortDescriptor||{},x=Lt(eu(gn),"@react-aria/table"),b=v.useMemo(()=>{var C,j;let D=(j=(C=t.collection.columns.find(g=>g.key===m))===null||C===void 0?void 0:C.textValue)!==null&&j!==void 0?j:"";return h&&m?x.format(`${h}Sort`,{columnName:D}):void 0},[h,m,t.collection.columns]),k=Jn(b);return Qi(()=>{b&&Po(b,"assertive",500)},[b]),{gridProps:Ht(f,k,{"aria-describedby":[k["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")})}}function nu(e){return e&&e.__esModule?e.default:e}function Mo(e,t,n){var i,o;let{node:a}=e,l=a.props.allowsSorting,{gridCellProps:r}=Io({...e,focusMode:"child"},t,n),s=a.props.isSelectionCell&&t.selectionManager.selectionMode==="single",{pressProps:c}=Zi({isDisabled:!l||s,onPress(){t.sort(a.key)},ref:n}),{focusableProps:u}=ar({},n),d,f=((i=t.sortDescriptor)===null||i===void 0?void 0:i.column)===a.key,m=(o=t.sortDescriptor)===null||o===void 0?void 0:o.direction;a.props.allowsSorting&&!ci()&&(d=f?m:"none");let h=Lt(nu(gn),"@react-aria/table"),x;l&&(x=`${h.format("sortable")}`,f&&m&&ci()&&(x=`${x}, ${h.format(m)}`));let b=Jn(x),k=t.collection.size===0;return v.useEffect(()=>{k&&t.selectionManager.focusedKey===a.key&&t.selectionManager.setFocusedKey(null)},[k,t.selectionManager,a.key]),{columnHeaderProps:{...Ht(u,r,c,b,k?{tabIndex:-1}:null),role:"columnheader",id:_s(t,a.key),"aria-colspan":a.colSpan&&a.colSpan>1?a.colSpan:void 0,"aria-sort":d}}}const Ni={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function iu(e,t,n){let{node:i,isVirtualized:o}=e,{rowProps:a,...l}=Gs(e,t,n),{direction:r}=xn();o&&!(pn()&&"expandedKeys"in t)?a["aria-rowindex"]=i.index+1+t.collection.headerRows.length:delete a["aria-rowindex"];let s={};if(pn()&&"expandedKeys"in t){let g=t.keyMap.get(i.key);if(g!=null){var c,u,d,f,m,h;let z=((c=g.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((d=g.props)===null||d===void 0||(u=d.children)===null||u===void 0?void 0:u.length)>t.userColumnCount;var x,b,k,C;s={onKeyDown:B=>{(B.key===Ni.expand[r]&&t.selectionManager.focusedKey===g.key&&z&&t.expandedKeys!=="all"&&!t.expandedKeys.has(g.key)||B.key===Ni.collapse[r]&&t.selectionManager.focusedKey===g.key&&z&&(t.expandedKeys==="all"||t.expandedKeys.has(g.key)))&&(t.toggleKey(g.key),B.stopPropagation())},"aria-expanded":z?t.expandedKeys==="all"||t.expandedKeys.has(i.key):void 0,"aria-level":g.level,"aria-posinset":((x=g.indexOfType)!==null&&x!==void 0?x:0)+1,"aria-setsize":g.level>1?((k=(f=Dt((b=(m=t.keyMap.get(g.parentKey))===null||m===void 0?void 0:m.childNodes)!==null&&b!==void 0?b:[]))===null||f===void 0?void 0:f.indexOfType)!==null&&k!==void 0?k:0)+1:((C=(h=Dt(t.collection.body.childNodes))===null||h===void 0?void 0:h.indexOfType)!==null&&C!==void 0?C:0)+1}}}let j=Il(i.props),D=l.hasAction?j:{};return{rowProps:{...Ht(a,s,D),"aria-labelledby":ha(t,i.key)},...l}}function au(e,t,n){let{node:i,isVirtualized:o}=e,a={role:"row"};return o&&!(pn()&&"expandedKeys"in t)&&(a["aria-rowindex"]=i.index+1),{rowProps:a}}function Ro(e,t,n){var i;let{gridCellProps:o,isPressed:a}=Io(e,t,n),l=(i=e.node.column)===null||i===void 0?void 0:i.key;return l!=null&&t.collection.rowHeaderColumnKeys.has(l)&&(o.role="rowheader",o.id=va(t,e.node.parentKey,l)),{gridCellProps:o,isPressed:a}}function ou(e){return e&&e.__esModule?e.default:e}function lu(e,t){let{key:n}=e;const{checkboxProps:i}=Js(e,t);return{checkboxProps:{...i,"aria-labelledby":`${i.id} ${ha(t,n)}`}}}function ru(e){let{isEmpty:t,isSelectAll:n,selectionMode:i}=e.selectionManager;return{checkboxProps:{"aria-label":Lt(ou(gn),"@react-aria/table").format(i==="single"?"select":"selectAll"),isSelected:n,isDisabled:i!=="multiple"||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type==="loader",isIndeterminate:!t&&!n,onChange:()=>e.selectionManager.toggleSelectAll()}}}function ii(){return Xs()}function To(e,t,n){let i=Li({...e,value:t.isSelected}),{isInvalid:o,validationErrors:a,validationDetails:l}=i.displayValidation,{labelProps:r,inputProps:s,isSelected:c,isPressed:u,isDisabled:d,isReadOnly:f}=or({...e,isInvalid:o},t,n);Ol(e,i,n);let{isIndeterminate:m,isRequired:h,validationBehavior:x="aria"}=e;v.useEffect(()=>{n.current&&(n.current.indeterminate=!!m)});let{pressProps:b}=Zi({isDisabled:d||f,onPress(){let{[Hi]:k}=e,{commitValidation:C}=k||i;C()}});return{labelProps:Ht(r,b,v.useMemo(()=>({onMouseDown:k=>k.preventDefault()}),[])),inputProps:{...s,checked:c,"aria-required":h&&x==="aria"||void 0,required:h&&x==="native"},isSelected:c,isPressed:u,isDisabled:d,isReadOnly:f,isInvalid:o,validationErrors:a,validationDetails:l}}const su=new WeakMap;function Oo(e={}){let{isReadOnly:t}=e,[n,i]=Ml(e.isSelected,e.defaultSelected||!1,e.onChange),[o]=v.useState(n);function a(s){t||i(s)}function l(){t||i(!n)}var r;return{isSelected:n,defaultSelected:(r=e.defaultSelected)!==null&&r!==void 0?r:o,setSelected:a,toggle:l}}function uu(e,t,n){const i=Oo({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),defaultSelected:t.defaultValue.includes(e.value),onChange(k){k?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(k)}});let{name:o,form:a,descriptionId:l,errorMessageId:r,validationBehavior:s}=su.get(t);var c;s=(c=e.validationBehavior)!==null&&c!==void 0?c:s;let{realtimeValidation:u}=Li({...e,value:i.isSelected,name:void 0,validationBehavior:"aria"}),d=v.useRef(Kl),f=()=>{t.setInvalid(e.value,u.isInvalid?u:d.current)};v.useEffect(f);let m=t.realtimeValidation.isInvalid?t.realtimeValidation:u,h=s==="native"?t.displayValidation:m;var x;let b=To({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||o,form:e.form||a,isRequired:(x=e.isRequired)!==null&&x!==void 0?x:t.isRequired,validationBehavior:s,[Hi]:{realtimeValidation:m,displayValidation:h,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(k){d.current=k,f()}}},i,n);return{...b,inputProps:{...b.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?r:null,l].filter(Boolean).join(" ")||void 0}}}var Pi=Symbol("default");function cu(e){const t=v.useRef(null),n=v.useRef(void 0),i=v.useCallback(o=>{if(typeof e=="function"){const a=e,l=a(o);return()=>{typeof l=="function"?l():a(null)}}else if(e)return e.current=o,()=>{e.current=null}},[e]);return v.useMemo(()=>({get current(){return t.current},set current(o){t.current=o,n.current&&(n.current(),n.current=void 0),o!=null&&(n.current=i(o))}}),[i])}function Ko(e,t){let n=v.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(a=>`"${a}"`));if(!t&&!n.slots[Pi])throw new Error(`A slot prop is required. Valid slot names are ${i}.`);let o=t||Pi;if(!n.slots[o])throw new Error(`Invalid slot "${t}". Valid slot names are ${i}.`);return n.slots[o]}return n}function du(e,t,n){let i=Ko(n,e.slot)||{},{ref:o,...a}=i,l=cu(v.useMemo(()=>Zl(t,o),[t,o])),r=Be(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&(typeof a.style=="function"||typeof e.style=="function"?r.style=s=>{let c=typeof a.style=="function"?a.style(s):a.style,u={...s.defaultStyle,...c},d=typeof e.style=="function"?e.style({...s,defaultStyle:u}):e.style;return{...u,...d}}:r.style={...a.style,...e.style}),[r,l]}var Kn=v.createContext(null);v.forwardRef(function(t,n){[t,n]=du(t,n,Kn);let{validationErrors:i,validationBehavior:o="native",children:a,className:l,...r}=t;const s=v.useMemo(()=>lr({className:l}),[l]);return p.jsx("form",{noValidate:o!=="native",...r,ref:n,className:s,children:p.jsx(Kn.Provider,{value:{...t,validationBehavior:o},children:p.jsx(_l.Provider,{value:i??{},children:a})})})});var[ld,pu]=Fr({name:"CheckboxGroupContext",strict:!1});function mu(e){const{isSelected:t,disableAnimation:n,...i}=e;return p.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...i,children:p.jsx("polyline",{points:"1 9 7 14 15 4"})})}function fu(e){const{isSelected:t,disableAnimation:n,...i}=e;return p.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...i,children:p.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function vu(e){const{isIndeterminate:t,...n}=e,i=t?fu:mu;return p.jsx(i,{...n})}var _o=globalThis!=null&&globalThis.document?v.useLayoutEffect:v.useEffect;function hu(e,t=[]){const n=v.useRef(e);return _o(()=>{n.current=e}),v.useCallback((...i)=>{var o;return(o=n.current)==null?void 0:o.call(n,...i)},t)}function xu(e={}){var t,n,i,o,a,l,r,s;const c=Un(),u=pu(),{validationBehavior:d}=Ko(Kn)||{},f=!!u,{as:m,ref:h,value:x="",children:b,icon:k,name:C,isRequired:j,isReadOnly:D=!1,autoFocus:g=!1,isSelected:z,size:B=(t=u==null?void 0:u.size)!=null?t:"md",color:R=(n=u==null?void 0:u.color)!=null?n:"primary",radius:S=u==null?void 0:u.radius,lineThrough:$=(i=u==null?void 0:u.lineThrough)!=null?i:!1,isDisabled:K=(o=u==null?void 0:u.isDisabled)!=null?o:!1,disableAnimation:q=(l=(a=u==null?void 0:u.disableAnimation)!=null?a:c==null?void 0:c.disableAnimation)!=null?l:!1,validationState:F,isInvalid:N=F?F==="invalid":(r=u==null?void 0:u.isInvalid)!=null?r:!1,isIndeterminate:I=!1,validationBehavior:W=f?u.validationBehavior:(s=d??(c==null?void 0:c.validationBehavior))!=null?s:"native",defaultSelected:he,classNames:_,className:U,onValueChange:ke,validate:Ce,...re}=e,ae=m||"label",ne=v.useRef(null),oe=v.useRef(null);let Z=e.onChange;f&&(Z=pi(()=>{u.groupState.resetValidation()},Z));const Fe=v.useId(),xe=v.useMemo(()=>({name:C,value:x,children:b,autoFocus:g,defaultSelected:he,isIndeterminate:I,isRequired:j,isInvalid:N,isSelected:z,isDisabled:K,isReadOnly:D,"aria-label":Jl(re["aria-label"],b),"aria-labelledby":re["aria-labelledby"]||Fe,onChange:ke}),[C,x,b,g,he,I,j,N,z,K,D,re["aria-label"],re["aria-labelledby"],Fe,ke]),L=Oo(xe),J={isInvalid:N,isRequired:j,validate:Ce,validationState:F,validationBehavior:W},{inputProps:ge,isSelected:se,isDisabled:ue,isReadOnly:Ne,isPressed:Y,isInvalid:He}=f?uu({...xe,...J},u.groupState,oe):To({...xe,...J},L,oe),ce=ue||Ne,me=F==="invalid"||N||He,Pe=ce?!1:Y,{hoverProps:de,isHovered:je}=Qn({isDisabled:ge.disabled}),{focusProps:E,isFocused:P,isFocusVisible:y}=qt({autoFocus:ge.autoFocus}),A=v.useMemo(()=>zr({color:R,size:B,radius:S,isInvalid:me,lineThrough:$,isDisabled:ue,disableAnimation:q}),[R,B,S,me,$,ue,q]);_o(()=>{if(!oe.current)return;const ye=!!oe.current.checked;L.setSelected(ye)},[oe.current]);const V=hu(Z),H=v.useCallback(ye=>{if(Ne||ue){ye.preventDefault();return}V==null||V(ye)},[Ne,ue,V]),Q=$e(_==null?void 0:_.base,U),Ie=v.useCallback(()=>({ref:ne,className:A.base({class:Q}),"data-disabled":X(ue),"data-selected":X(se||I),"data-invalid":X(me),"data-hover":X(je),"data-focus":X(P),"data-pressed":X(Pe),"data-readonly":X(ge.readOnly),"data-focus-visible":X(y),"data-indeterminate":X(I),...Be(de,re)}),[A,Q,ue,se,I,me,je,P,Pe,ge.readOnly,y,de,re]),Me=v.useCallback((ye={})=>({...ye,"aria-hidden":!0,className:$e(A.wrapper({class:$e(_==null?void 0:_.wrapper,ye==null?void 0:ye.className)}))}),[A,_==null?void 0:_.wrapper]),Xe=v.useCallback(()=>({ref:Pr(oe,h),...Be(ge,E),className:A.hiddenInput({class:_==null?void 0:_.hiddenInput}),onChange:pi(ge.onChange,H)}),[ge,E,H,_==null?void 0:_.hiddenInput]),Ge=v.useCallback(()=>({id:Fe,className:A.label({class:_==null?void 0:_.label})}),[A,_==null?void 0:_.label,ue,se,me]),be=v.useCallback(()=>({isSelected:se,isIndeterminate:I,disableAnimation:q,className:A.icon({class:_==null?void 0:_.icon})}),[A,_==null?void 0:_.icon,se,I,q]);return{Component:ae,icon:k,children:b,isSelected:se,isDisabled:ue,isInvalid:me,isFocused:P,isHovered:je,isFocusVisible:y,getBaseProps:Ie,getWrapperProps:Me,getInputProps:Xe,getLabelProps:Ge,getIconProps:be}}var Vo=Le((e,t)=>{const{Component:n,children:i,icon:o=p.jsx(vu,{}),getBaseProps:a,getWrapperProps:l,getInputProps:r,getIconProps:s,getLabelProps:c}=xu({...e,ref:t}),u=typeof o=="function"?o(s()):v.cloneElement(o,s());return p.jsxs(n,{...a(),children:[p.jsx("input",{...r()}),p.jsx("span",{...l(),children:u}),i&&p.jsx("span",{...c(),children:i})]})});Vo.displayName="HeroUI.Checkbox";var Wo=Vo,Lo=Le((e,t)=>{var n,i;const{as:o,className:a,node:l,slots:r,state:s,selectionMode:c,color:u,checkboxesProps:d,disableAnimation:f,classNames:m,...h}=e,x=o||"th",b=typeof x=="string",k=Ye(t),{columnHeaderProps:C}=Mo({node:l},s,k),{isFocusVisible:j,focusProps:D}=qt(),{checkboxProps:g}=ru(s),z=$e(m==null?void 0:m.th,a,(n=l.props)==null?void 0:n.className),B=c==="single",{onChange:R,...S}=g;return p.jsx(x,{ref:k,"data-focus-visible":X(j),...Be(C,D,at(l.props,{enabled:b}),at(h,{enabled:b})),className:(i=r.th)==null?void 0:i.call(r,{class:z}),children:B?p.jsx(Xn,{children:g["aria-label"]}):p.jsx(Wo,{color:u,disableAnimation:f,onValueChange:R,...Be(d,S)})})});Lo.displayName="HeroUI.TableSelectAllCheckbox";var Ho=Lo;function gu(e){let{collection:t,focusMode:n}=e,i=e.UNSAFE_selectionState||tr(e),o=v.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=i.setFocusedKey;i.setFocusedKey=(s,c)=>{if(n==="cell"&&s!=null){let h=t.getItem(s);if((h==null?void 0:h.type)==="item"){var u,d;let x=Ee(h,t);var f,m;c==="last"?s=(f=(u=Dt(x))===null||u===void 0?void 0:u.key)!==null&&f!==void 0?f:null:s=(m=(d=$t(x))===null||d===void 0?void 0:d.key)!==null&&m!==void 0?m:null}}a(s,c)};let l=v.useMemo(()=>new nr(t,i),[t,i]);const r=v.useRef(null);return v.useEffect(()=>{if(i.focusedKey!=null&&r.current&&!t.getItem(i.focusedKey)){const s=r.current.getItem(i.focusedKey),c=(s==null?void 0:s.parentKey)!=null&&(s.type==="cell"||s.type==="rowheader"||s.type==="column")?r.current.getItem(s.parentKey):s;if(!c){i.setFocusedKey(null);return}const u=r.current.rows,d=t.rows,f=u.length-d.length;let m=Math.min(f>1?Math.max(c.index-f+1,0):c.index,d.length-1),h=null;for(;m>=0;){if(!l.isDisabled(d[m].key)&&d[m].type!=="headerrow"){h=d[m];break}m<d.length-1?m++:(m>c.index&&(m=c.index),m--)}if(h){const x=h.hasChildNodes?[...Ee(h,t)]:[],b=h.hasChildNodes&&c!==s&&s&&s.index<x.length?x[s.index].key:h.key;i.setFocusedKey(b)}else i.setFocusedKey(null)}r.current=t},[t,l,i,i.focusedKey]),{collection:t,disabledKeys:o,isKeyboardNavigationDisabled:!1,selectionManager:l}}class bu{*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var i;return n&&(i=n.prevKey)!==null&&i!==void 0?i:null}getKeyAfter(t){let n=this.keyMap.get(t);var i;return n&&(i=n.nextKey)!==null&&i!==void 0?i:null}getFirstKey(){var t;return(t=[...this.rows][0])===null||t===void 0?void 0:t.key}getLastKey(){var t;let n=[...this.rows];return(t=n[n.length-1])===null||t===void 0?void 0:t.key}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.keyMap=new Map,this.columnCount=t==null?void 0:t.columnCount,this.rows=[];let n=d=>{let f=this.keyMap.get(d.key);t.visitNode&&(d=t.visitNode(d)),this.keyMap.set(d.key,d);let m=new Set,h=null,x=!1;if(d.type==="item"){var b;for(let g of d.childNodes)if(((b=g.props)===null||b===void 0?void 0:b.colSpan)!==void 0){x=!0;break}}for(let g of d.childNodes){if(g.type==="cell"&&x){var k,C;g.colspan=(k=g.props)===null||k===void 0?void 0:k.colSpan,g.colSpan=(C=g.props)===null||C===void 0?void 0:C.colSpan;var j,D;g.colIndex=h?((j=h.colIndex)!==null&&j!==void 0?j:h.index)+((D=h.colSpan)!==null&&D!==void 0?D:1):g.index}g.type==="cell"&&g.parentKey==null&&(g.parentKey=d.key),m.add(g.key),h?(h.nextKey=g.key,g.prevKey=h.key):g.prevKey=null,n(g),h=g}if(h&&(h.nextKey=null),f)for(let g of f.childNodes)m.has(g.key)||i(g)},i=d=>{this.keyMap.delete(d.key);for(let f of d.childNodes)this.keyMap.get(f.key)===f&&i(f)},o=null;for(let[d,f]of t.items.entries()){var a,l,r,s,c,u;let m={...f,level:(a=f.level)!==null&&a!==void 0?a:0,key:(l=f.key)!==null&&l!==void 0?l:"row-"+d,type:(r=f.type)!==null&&r!==void 0?r:"row",value:(s=f.value)!==null&&s!==void 0?s:null,hasChildNodes:!0,childNodes:[...f.childNodes],rendered:f.rendered,textValue:(c=f.textValue)!==null&&c!==void 0?c:"",index:(u=f.index)!==null&&u!==void 0?u:d};o?(o.nextKey=m.key,m.prevKey=o.key):m.prevKey=null,this.rows.push(m),n(m),o=m}o&&(o.nextKey=null)}}const qo="row-header-column-"+Math.random().toString(36).slice(2);let _n="row-header-column-"+Math.random().toString(36).slice(2);for(;qo===_n;)_n="row-header-column-"+Math.random().toString(36).slice(2);function yu(e,t){if(t.length===0)return[];let n=[],i=new Map;for(let u of t){let d=u.parentKey,f=[u];for(;d;){let m=e.get(d);if(!m)break;if(i.has(m)){var o,a;(a=(o=m).colSpan)!==null&&a!==void 0||(o.colSpan=0),m.colSpan++,m.colspan=m.colSpan;let{column:h,index:x}=i.get(m);if(x>f.length)break;for(let b=x;b<f.length;b++)h.splice(b,0,null);for(let b=f.length;b<h.length;b++)h[b]&&i.has(h[b])&&(i.get(h[b]).index=b)}else m.colSpan=1,m.colspan=1,f.push(m),i.set(m,{column:f,index:f.length-1});d=m.parentKey}n.push(f),u.index=n.length-1}let l=Math.max(...n.map(u=>u.length)),r=Array(l).fill(0).map(()=>[]),s=0;for(let u of n){let d=l-1;for(let f of u){if(f){let m=r[d],h=m.reduce((x,b)=>{var k;return x+((k=b.colSpan)!==null&&k!==void 0?k:1)},0);if(h<s){let x={type:"placeholder",key:"placeholder-"+f.key,colspan:s-h,colSpan:s-h,index:h,value:null,rendered:null,level:d,hasChildNodes:!1,childNodes:[],textValue:""};m.length>0&&(m[m.length-1].nextKey=x.key,x.prevKey=m[m.length-1].key),m.push(x)}m.length>0&&(m[m.length-1].nextKey=f.key,f.prevKey=m[m.length-1].key),f.level=d,f.colIndex=s,m.push(f)}d--}s++}let c=0;for(let u of r){let d=u.reduce((f,m)=>{var h;return f+((h=m.colSpan)!==null&&h!==void 0?h:1)},0);if(d<t.length){let f={type:"placeholder",key:"placeholder-"+u[u.length-1].key,colSpan:t.length-d,colspan:t.length-d,index:d,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:u[u.length-1].key};u.push(f)}c++}return r.map((u,d)=>({type:"headerrow",key:"headerrow-"+d,index:d,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:u,textValue:""}))}class wu extends bu{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var i;return(i=n==null?void 0:n.prevKey)!==null&&i!==void 0?i:null}getKeyAfter(t){let n=this.keyMap.get(t);var i;return(i=n==null?void 0:n.nextKey)!==null&&i!==void 0?i:null}getFirstKey(){var t,n;return(n=(t=$t(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&n!==void 0?n:null}getLastKey(){var t,n;return(n=(t=Dt(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&n!==void 0?n:null}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){return t===this.body.key?this.body.childNodes:super.getChildren(t)}getTextValue(t){let n=this.getItem(t);if(!n)return"";if(n.textValue)return n.textValue;let i=this.rowHeaderColumnKeys;if(i){let o=[];for(let a of n.childNodes){let l=this.columns[a.index];if(i.has(l.key)&&a.textValue&&o.push(a.textValue),o.length===i.size)break}return o.join(" ")}return""}constructor(t,n,i){let o=new Set,a=null,l=[];if(i!=null&&i.showSelectionCheckboxes){let d={type:"column",key:qo,value:null,textValue:"",level:0,index:i!=null&&i.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};l.unshift(d)}if(i!=null&&i.showDragButtons){let d={type:"column",key:_n,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};l.unshift(d)}let r=[],s=new Map,c=d=>{switch(d.type){case"body":a=d;break;case"column":s.set(d.key,d),d.hasChildNodes||(l.push(d),d.props.isRowHeader&&o.add(d.key));break;case"item":r.push(d);return}for(let f of d.childNodes)c(f)};for(let d of t)c(d);let u=yu(s,l);if(u.forEach((d,f)=>r.splice(f,0,d)),super({columnCount:l.length,items:r,visitNode:d=>(d.column=l[d.index],d)}),this._size=0,this.columns=l,this.rowHeaderColumnKeys=o,this.body=a,this.headerRows=u,this._size=[...a.childNodes].length,this.rowHeaderColumnKeys.size===0){let d=this.columns.find(f=>{var m,h;return!(!((m=f.props)===null||m===void 0)&&m.isDragButtonCell)&&!(!((h=f.props)===null||h===void 0)&&h.isSelectionCell)});d&&this.rowHeaderColumnKeys.add(d.key)}}}const ku={ascending:"descending",descending:"ascending"};function Cu(e){let[t,n]=v.useState(!1),{selectionMode:i="none",showSelectionCheckboxes:o,showDragButtons:a}=e,l=v.useMemo(()=>({showSelectionCheckboxes:o&&i!=="none",showDragButtons:a,selectionMode:i,columns:[]}),[e.children,o,i,a]),r=ir(e,v.useCallback(d=>new wu(d,null,l),[l]),l),{disabledKeys:s,selectionManager:c}=gu({...e,collection:r,disabledBehavior:e.disabledBehavior||"selection"});var u;return{collection:r,disabledKeys:s,selectionManager:c,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:(u=e.sortDescriptor)!==null&&u!==void 0?u:null,isKeyboardNavigationDisabled:r.size===0||t,setKeyboardNavigationDisabled:n,sort(d,f){var m,h;(h=e.onSortChange)===null||h===void 0||h.call(e,{column:d,direction:f??(((m=e.sortDescriptor)===null||m===void 0?void 0:m.column)===d?ku[e.sortDescriptor.direction]:"ascending")})}}}function Uo(e){return null}Uo.getCollectionNode=function*(t,n){let{children:i,columns:o}=t;if(n.columns=[],typeof i=="function"){if(!o)throw new Error("props.children was a function but props.columns is missing");for(let a of o)yield{type:"column",value:a,renderer:i}}else{let a=[];T.Children.forEach(i,l=>{a.push({type:"column",element:l})}),yield*a}};let $u=Uo;function Yo(e){return null}Yo.getCollectionNode=function*(t){let{children:n,items:i}=t;yield{type:"body",hasChildNodes:!0,props:t,*childNodes(){if(typeof n=="function"){if(!i)throw new Error("props.children was a function but props.items is missing");for(let o of i)yield{type:"item",value:o,renderer:n}}else{let o=[];T.Children.forEach(n,a=>{o.push({type:"item",element:a})}),yield*o}}}};let Du=Yo;function Xo(e){return null}Xo.getCollectionNode=function*(t,n){let{title:i,children:o,childColumns:a}=t,l=i||o,r=t.textValue||(typeof l=="string"?l:"")||t["aria-label"],s=yield{type:"column",hasChildNodes:!!a||!!i&&T.Children.count(o)>0,rendered:l,textValue:r,props:t,*childNodes(){if(a)for(let u of a)yield{type:"column",value:u};else if(i){let u=[];T.Children.forEach(o,d=>{u.push({type:"column",element:d})}),yield*u}},shouldInvalidate(u){return c(u),!1}},c=u=>{for(let d of s)d.hasChildNodes||u.columns.push(d)};c(n)};let Eu=Xo;function Vn(e){return null}Vn.getCollectionNode=function*(t,n){let{children:i,textValue:o,UNSTABLE_childItems:a}=t;yield{type:"item",props:t,textValue:o,"aria-label":t["aria-label"],hasChildNodes:!0,*childNodes(){if(n.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),n.showSelectionCheckboxes&&n.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof i=="function"){for(let l of n.columns)yield{type:"cell",element:i(l.key),key:l.key};if(a)for(let l of a)yield{type:"item",value:l}}else{let l=[],r=[],s=0;if(T.Children.forEach(i,c=>{if(c.type===Vn){if(l.length<n.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");r.push({type:"item",element:c})}else{l.push({type:"cell",element:c});var u;s+=(u=c.props.colSpan)!==null&&u!==void 0?u:1}}),s!==n.columns.length)throw new Error(`Cell count must match column count. Found ${s} cells and ${n.columns.length} columns.`);yield*l,yield*r}},shouldInvalidate(l){return l.columns.length!==n.columns.length||l.columns.some((r,s)=>r.key!==n.columns[s].key)||l.showSelectionCheckboxes!==n.showSelectionCheckboxes||l.showDragButtons!==n.showDragButtons||l.selectionMode!==n.selectionMode}}};let Su=Vn;function Go(e){return null}Go.getCollectionNode=function*(t){let{children:n}=t,i=t.textValue||(typeof n=="string"?n:"")||t["aria-label"]||"";yield{type:"cell",props:t,rendered:n,textValue:i,"aria-label":t["aria-label"],hasChildNodes:!1}};let ju=Go;function Zo(e){var t;const n=Un(),[i,o]=Wi(e,vi.variantKeys),{ref:a,as:l,baseRef:r,children:s,className:c,classNames:u,removeWrapper:d=!1,disableAnimation:f=(t=n==null?void 0:n.disableAnimation)!=null?t:!1,isKeyboardNavigationDisabled:m=!1,selectionMode:h="none",topContentPlacement:x="inside",bottomContentPlacement:b="inside",selectionBehavior:k=h==="none"?null:"toggle",disabledBehavior:C="selection",showSelectionCheckboxes:j=h==="multiple"&&k!=="replace",BaseComponent:D="div",checkboxesProps:g,topContent:z,bottomContent:B,sortIcon:R,onRowAction:S,onCellAction:$,...K}=i,q=l||"table",F=typeof q=="string",N=Ye(a),I=Ye(r),W=Cu({...e,children:s,showSelectionCheckboxes:j});m&&!W.isKeyboardNavigationDisabled&&W.setKeyboardNavigationDisabled(!0);const{collection:he}=W,{layout:_,...U}=e,{gridProps:ke}=tu({...U},W,N),Ce=h!=="none",re=h==="multiple",ae=v.useMemo(()=>vi({...o,isSelectable:Ce,isMultiSelectable:re}),[Xi(o),Ce,re]),ne=$e(u==null?void 0:u.base,c),oe=v.useMemo(()=>{var L;return{state:W,slots:ae,isSelectable:Ce,collection:he,classNames:u,color:e==null?void 0:e.color,disableAnimation:f,checkboxesProps:g,isHeaderSticky:(L=e==null?void 0:e.isHeaderSticky)!=null?L:!1,selectionMode:h,selectionBehavior:k,disabledBehavior:C,showSelectionCheckboxes:j,onRowAction:S,onCellAction:$}},[ae,W,he,Ce,u,h,k,g,C,f,j,e==null?void 0:e.color,e==null?void 0:e.isHeaderSticky,S,$]),Z=v.useCallback(L=>({...L,ref:I,className:ae.base({class:$e(ne,L==null?void 0:L.className)})}),[ne,ae]),Fe=v.useCallback(L=>({...L,ref:I,className:ae.wrapper({class:$e(u==null?void 0:u.wrapper,L==null?void 0:L.className)})}),[u==null?void 0:u.wrapper,ae]),xe=v.useCallback(L=>({...Be(ke,at(K,{enabled:F}),L),onKeyDownCapture:void 0,ref:N,className:ae.table({class:$e(u==null?void 0:u.table,L==null?void 0:L.className)})}),[u==null?void 0:u.table,F,ae,ke,K]);return{BaseComponent:D,Component:q,children:s,state:W,collection:he,values:oe,topContent:z,bottomContent:B,removeWrapper:d,topContentPlacement:x,bottomContentPlacement:b,sortIcon:R,getBaseProps:Z,getWrapperProps:Fe,getTableProps:xe}}var Jo=Le((e,t)=>{var n,i,o;const{as:a,className:l,node:r,rowKey:s,slots:c,state:u,classNames:d,...f}=e,m=a||"td",h=typeof m=="string",x=Ye(t),{gridCellProps:b}=Ro({node:r},u,x),k=$e(d==null?void 0:d.td,l,(n=r.props)==null?void 0:n.className),{isFocusVisible:C,focusProps:j}=qt(),D=u.selectionManager.isSelected(s),g=v.useMemo(()=>{const B=typeof r.rendered;return B!=="object"&&B!=="function"?p.jsx("span",{children:r.rendered}):r.rendered},[r.rendered]),z=((i=r.column)==null?void 0:i.props)||{};return p.jsx(m,{ref:x,"data-focus-visible":X(C),"data-selected":X(D),...Be(b,j,at(r.props,{enabled:h}),f),className:(o=c.td)==null?void 0:o.call(c,{align:z.align,class:k}),children:g})});Jo.displayName="HeroUI.TableCell";var Qo=Jo,el=Le((e,t)=>{var n,i;const{as:o,className:a,node:l,rowKey:r,slots:s,state:c,color:u,disableAnimation:d,checkboxesProps:f,selectionMode:m,classNames:h,...x}=e,b=o||"td",k=typeof b=="string",C=Ye(t),{gridCellProps:j}=Ro({node:l},c,C),{isFocusVisible:D,focusProps:g}=qt(),{checkboxProps:z}=lu({key:(l==null?void 0:l.parentKey)||l.key},c),B=$e(h==null?void 0:h.td,a,(n=l.props)==null?void 0:n.className),R=m==="single",{onChange:S,...$}=z,K=c.selectionManager.isSelected(r);return p.jsx(b,{ref:C,"data-focus-visible":X(D),"data-selected":X(K),...Be(j,g,at(l.props,{enabled:k}),x),className:(i=s.td)==null?void 0:i.call(s,{class:B}),children:R?p.jsx(Xn,{children:z["aria-label"]}):p.jsx(Wo,{color:u,disableAnimation:d,onValueChange:S,...Be(f,$)})})});el.displayName="HeroUI.TableCheckboxCell";var tl=el,nl=Le((e,t)=>{var n,i;const{as:o,className:a,children:l,node:r,slots:s,state:c,isSelectable:u,classNames:d,...f}=e,m=o||(e!=null&&e.href?"a":"tr"),h=typeof m=="string",x=Ye(t),{rowProps:b}=iu({node:r},c,x),k=$e(d==null?void 0:d.tr,a,(n=r.props)==null?void 0:n.className),{isFocusVisible:C,focusProps:j}=qt(),D=c.disabledKeys.has(r.key),g=c.selectionManager.isSelected(r.key),{isHovered:z,hoverProps:B}=Qn({isDisabled:D}),{isFirst:R,isLast:S,isMiddle:$,isOdd:K}=v.useMemo(()=>{const q=r.key===c.collection.getFirstKey(),F=r.key===c.collection.getLastKey(),N=!q&&!F,I=r!=null&&r.index?(r.index+1)%2===0:!1;return{isFirst:q,isLast:F,isMiddle:N,isOdd:I}},[r,c.collection]);return p.jsx(m,{ref:x,"data-disabled":X(D),"data-first":X(R),"data-focus-visible":X(C),"data-hover":X(z),"data-last":X(S),"data-middle":X($),"data-odd":X(K),"data-selected":X(g),...Be(b,j,u?B:{},at(r.props,{enabled:h}),f),className:(i=s.tr)==null?void 0:i.call(s,{class:k}),children:l})});nl.displayName="HeroUI.TableRow";var il=nl,al=Le((e,t)=>{var n;const{as:i,className:o,slots:a,state:l,collection:r,isSelectable:s,color:c,disableAnimation:u,checkboxesProps:d,selectionMode:f,classNames:m,rowVirtualizer:h,...x}=e,b=i||"tbody",k=typeof b=="string",C=Ye(t),{rowGroupProps:j}=ii(),D=$e(m==null?void 0:m.tbody,o),g=r==null?void 0:r.body.props,z=(g==null?void 0:g.isLoading)||(g==null?void 0:g.loadingState)==="loading"||(g==null?void 0:g.loadingState)==="loadingMore",B=[...r.body.childNodes],R=h.getVirtualItems();let S,$;return r.size===0&&g.emptyContent&&(S=p.jsx("tr",{role:"row",children:p.jsx("td",{className:a==null?void 0:a.emptyWrapper({class:m==null?void 0:m.emptyWrapper}),colSpan:r.columnCount,role:"gridcell",children:!z&&g.emptyContent})})),z&&g.loadingContent&&($=p.jsxs("tr",{role:"row",children:[p.jsx("td",{className:a==null?void 0:a.loadingWrapper({class:m==null?void 0:m.loadingWrapper}),colSpan:r.columnCount,role:"gridcell",children:g.loadingContent}),!S&&r.size===0?p.jsx("td",{className:a==null?void 0:a.emptyWrapper({class:m==null?void 0:m.emptyWrapper})}):null]})),p.jsxs(b,{ref:C,...Be(j,at(g,{enabled:k}),x),className:(n=a.tbody)==null?void 0:n.call(a,{class:D}),"data-empty":X(r.size===0),"data-loading":X(z),children:[R.map((K,q)=>{const F=B[K.index];return F?p.jsx(il,{classNames:m,isSelectable:s,node:F,slots:a,state:l,style:{transform:`translateY(${K.start-q*K.size}px)`,height:`${K.size}px`},children:[...F.childNodes].map(N=>N.props.isSelectionCell?p.jsx(tl,{checkboxesProps:d,classNames:m,color:c,disableAnimation:u,node:N,rowKey:F.key,selectionMode:f,slots:a,state:l},String(N.key)):p.jsx(Qo,{classNames:m,node:N,rowKey:F.key,slots:a,state:l},String(N.key)))},String(F.key)):null}),$,S]})});al.displayName="HeroUI.VirtualizedTableBody";var Au=al,ol=Le((e,t)=>{var n,i,o,a,l;const{as:r,className:s,state:c,node:u,slots:d,classNames:f,sortIcon:m,...h}=e,x=r||"th",b=typeof x=="string",k=Ye(t),{columnHeaderProps:C}=Mo({node:u},c,k),j=$e(f==null?void 0:f.th,s,(n=u.props)==null?void 0:n.className),{isFocusVisible:D,focusProps:g}=qt(),{isHovered:z,hoverProps:B}=Qn({}),{hideHeader:R,align:S,...$}=u.props,K=$.allowsSorting,q={"aria-hidden":!0,"data-direction":(i=c.sortDescriptor)==null?void 0:i.direction,"data-visible":X(((o=c.sortDescriptor)==null?void 0:o.column)===u.key),className:(a=d.sortIcon)==null?void 0:a.call(d,{class:f==null?void 0:f.sortIcon})},F=typeof m=="function"?m(q):v.isValidElement(m)&&v.cloneElement(m,q);return p.jsxs(x,{ref:k,colSpan:u.colspan,"data-focus-visible":X(D),"data-hover":X(z),"data-sortable":X(K),...Be(C,g,at($,{enabled:b}),K?B:{},h),className:(l=d.th)==null?void 0:l.call(d,{align:S,class:j}),children:[R?p.jsx(Xn,{children:u.rendered}):u.rendered,K&&(F||p.jsx(Ir,{strokeWidth:3,...q}))]})});ol.displayName="HeroUI.TableColumnHeader";var ll=ol,rl=Le((e,t)=>{var n,i;const{as:o,className:a,children:l,node:r,slots:s,classNames:c,state:u,...d}=e,f=o||"tr",m=typeof f=="string",h=Ye(t),{rowProps:x}=au({node:r},u),b=$e(c==null?void 0:c.tr,a,(n=r.props)==null?void 0:n.className);return p.jsx(f,{ref:h,...Be(x,at(r.props,{enabled:m}),d),className:(i=s.tr)==null?void 0:i.call(s,{class:b}),children:l})});rl.displayName="HeroUI.TableHeaderRow";var sl=rl,ul=v.forwardRef((e,t)=>{var n;const{as:i,className:o,children:a,slots:l,classNames:r,...s}=e,c=i||"thead",u=Ye(t),{rowGroupProps:d}=ii(),f=$e(r==null?void 0:r.thead,o);return p.jsx(c,{ref:u,className:(n=l.thead)==null?void 0:n.call(l,{class:f}),...Be(d,s),children:a})});ul.displayName="HeroUI.TableRowGroup";var cl=ul,zu={px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};function Bu(e){return v.forwardRef(e)}var Fu=(e,t,n=!0)=>{if(!t)return[e,{}];const i=t.reduce((o,a)=>a in e?{...o,[a]:e[a]}:o,{});return n?[Object.keys(e).filter(a=>!t.includes(a)).reduce((a,l)=>({...a,[l]:e[l]}),{}),i]:[e,i]},Ii=e=>{var t;return(t=zu[e])!=null?t:e};function Nu(e){const[t,n]=Fu(e,fi.variantKeys),{as:i,className:o,x:a=1,y:l=1,...r}=t,s=i||"span",c=v.useMemo(()=>fi({...n,className:o}),[Xi(n),o]),u=Ii(a),d=Ii(l);return{Component:s,getSpacerProps:(m={})=>({...m,...r,"aria-hidden":X(!0),className:$e(c,m.className),style:{...m.style,...r.style,marginLeft:u,marginTop:d}})}}var dl=Bu((e,t)=>{const{Component:n,getSpacerProps:i}=Nu({...e});return p.jsx(n,{ref:t,...i()})});dl.displayName="HeroUI.Spacer";var pl=dl;function Kt(e,t,n){let i=n.initialDeps??[],o;return()=>{var a,l,r,s;let c;n.key&&((a=n.debug)!=null&&a.call(n))&&(c=Date.now());const u=e();if(!(u.length!==i.length||u.some((m,h)=>i[h]!==m)))return o;i=u;let f;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(f=Date.now()),o=t(...u),n.key&&((r=n.debug)!=null&&r.call(n))){const m=Math.round((Date.now()-c)*100)/100,h=Math.round((Date.now()-f)*100)/100,x=h/16,b=(k,C)=>{for(k=String(k);k.length<C;)k=" "+k;return k};console.info(`%c⏱ ${b(h,5)} /${b(m,5)} ms`,`
|
||
font-size: .6rem;
|
||
font-weight: bold;
|
||
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(s=n==null?void 0:n.onChange)==null||s.call(n,o),o}}function jn(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Pu=(e,t)=>Math.abs(e-t)<1,Iu=(e,t,n)=>{let i;return function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)}},Mu=e=>e,Ru=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let o=t;o<=n;o++)i.push(o);return i},Tu=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=l=>{const{width:r,height:s}=l;t({width:Math.round(r),height:Math.round(s)})};if(o(n.getBoundingClientRect()),!i.ResizeObserver)return()=>{};const a=new i.ResizeObserver(l=>{const r=l[0];if(r!=null&&r.borderBoxSize){const s=r.borderBoxSize[0];if(s){o({width:s.inlineSize,height:s.blockSize});return}}o(n.getBoundingClientRect())});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},Mi={passive:!0},Ou=typeof window>"u"?!0:"onscrollend"in window,Ku=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let o=0;const a=e.options.useScrollendEvent&&Ou?()=>{}:Iu(i,()=>{t(o,!1)},e.options.isScrollingResetDelay),l=c=>()=>{const{horizontal:u,isRtl:d}=e.options;o=u?n.scrollLeft*(d&&-1||1):n.scrollTop,a(),t(o,c)},r=l(!0),s=l(!1);return s(),n.addEventListener("scroll",r,Mi),n.addEventListener("scrollend",s,Mi),()=>{n.removeEventListener("scroll",r),n.removeEventListener("scrollend",s)}},_u=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Vu=(e,{adjustments:t=0,behavior:n},i)=>{var o,a;const l=e+t;(a=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[i.options.horizontal?"left":"top"]:l,behavior:n})};class Wu{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var a;return(a=i())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=i())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,o])=>{typeof o>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mu,rangeExtractor:Ru,onChange:()=>{},measureElement:_u,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...n}},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=Kt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,i)=>{const o=new Map,a=new Map;for(let l=i-1;l>=0;l--){const r=n[l];if(o.has(r.lane))continue;const s=a.get(r.lane);if(s==null||r.end>s.end?a.set(r.lane,r):r.end<s.end&&o.set(r.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,r)=>l.end===r.end?l.index-r.index:l.end-r.end)[0]:void 0},this.getMeasurementOptions=Kt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,o,a,l)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:l}),{key:!1}),this.getMeasurements=Kt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:l},r)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,s);for(let u=s;u<n;u++){const d=a(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),m=f?f.end+this.options.gap:i+o,h=r.get(d),x=typeof h=="number"?h:this.options.estimateSize(u),b=m+x,k=f?f.lane:u%this.options.lanes;c[u]={index:u,start:m,size:x,end:b,key:d,lane:k}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Kt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,i,o)=>this.range=n.length>0&&i>0?Lu({measurements:n,outerSize:i,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Kt(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const o=this.indexFromElement(n),a=this.measurementsCache[o];if(!a)return;const l=a.key,r=this.elementsCache.get(l);r!==n&&(r&&this.observer.unobserve(r),this.observer.observe(n),this.elementsCache.set(l,n)),n.isConnected&&this.resizeItem(o,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const o=this.measurementsCache[n];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,l=i-a;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,o)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(o))});return}this._measureElement(n,void 0)},this.getVirtualItems=Kt(()=>[this.getIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let a=0,l=n.length;a<l;a++){const r=n[a],s=i[r];o.push(s)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return jn(i[ml(0,i.length-1,o=>jn(i[o]).start,n)])},this.getOffsetForAlignment=(n,i)=>{const o=this.getSize(),a=this.getScrollOffset();i==="auto"&&n>=a+o&&(i="end"),i==="end"&&(n-=o);const l=this.options.horizontal?"scrollWidth":"scrollHeight",s=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-o;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.measurementsCache[n];if(!o)return;const a=this.getSize(),l=this.getScrollOffset();if(i==="auto")if(o.end>=l+a-this.options.scrollPaddingEnd)i="end";else if(o.start<=l+this.options.scrollPaddingStart)i="start";else return[l,i];const r=o.start-this.options.scrollPaddingStart+(o.size-a)/2;switch(i){case"center":return[this.getOffsetForAlignment(r,i),i];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,i),i];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,i),i]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:i="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:i="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(n,i);if(!a)return;const[l,r]=a;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=jn(this.getOffsetForIndex(n,r));Pu(c,this.getScrollOffset())||this.scrollToIndex(n,{align:r,behavior:o})}else this.scrollToIndex(n,{align:r,behavior:o})}))},this.scrollBy=(n,{behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;return i.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=i[i.length-1])==null?void 0:n.end)??0:Math.max(...i.slice(-this.options.lanes).map(a=>a.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ml=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,a=n(o);if(a<i)e=o+1;else if(a>i)t=o-1;else return o}return e>0?e-1:0};function Lu({measurements:e,outerSize:t,scrollOffset:n}){const i=e.length-1,a=ml(0,i,r=>e[r].start,n);let l=a;for(;l<i&&e[l].end<n+t;)l++;return{startIndex:a,endIndex:l}}const Ri=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Hu(e){const t=v.useReducer(()=>({}),{})[1],n={...e,onChange:(o,a)=>{var l;a?Vi.flushSync(t):t(),(l=e.onChange)==null||l.call(e,o,a)}},[i]=v.useState(()=>new Wu(n));return i.setOptions(n),Ri(()=>i._didMount(),[]),Ri(()=>i._willUpdate()),i}function qu(e){return Hu({observeElementRect:Tu,observeElementOffset:Ku,scrollToFn:Vu,...e})}var fl=Le((e,t)=>{const{BaseComponent:n,Component:i,collection:o,values:a,topContent:l,topContentPlacement:r,bottomContentPlacement:s,bottomContent:c,getBaseProps:u,getWrapperProps:d,getTableProps:f}=Zo({...e,ref:t}),{rowHeight:m=40,maxTableHeight:h=600}=e,x=v.useCallback(({children:R})=>p.jsx(n,{...d(),ref:C,style:{height:h,display:"block"},children:R}),[d,h]),k=[...o.body.childNodes].length,C=v.useRef(null),[j,D]=v.useState(0),g=v.useRef(null);v.useLayoutEffect(()=>{g.current&&D(g.current.getBoundingClientRect().height)},[g]);const z=qu({count:k,getScrollElement:()=>C.current,estimateSize:()=>m,overscan:5}),B=f();return p.jsxs("div",{...u(),children:[r==="outside"&&l,p.jsx(x,{children:p.jsxs(p.Fragment,{children:[r==="inside"&&l,p.jsxs(i,{...B,style:{height:`calc(${z.getTotalSize()+j}px)`,...B.style},children:[p.jsxs(cl,{ref:g,classNames:a.classNames,slots:a.slots,children:[o.headerRows.map(R=>p.jsx(sl,{classNames:a.classNames,node:R,slots:a.slots,state:a.state,children:[...R.childNodes].map(S=>{var $;return($=S==null?void 0:S.props)!=null&&$.isSelectionCell?p.jsx(Ho,{checkboxesProps:a.checkboxesProps,classNames:a.classNames,color:a.color,disableAnimation:a.disableAnimation,node:S,selectionMode:a.selectionMode,slots:a.slots,state:a.state},S==null?void 0:S.key):p.jsx(ll,{classNames:a.classNames,node:S,slots:a.slots,state:a.state},S==null?void 0:S.key)})},R==null?void 0:R.key)),p.jsx(pl,{as:"tr",tabIndex:-1,y:1})]}),p.jsx(Au,{checkboxesProps:a.checkboxesProps,classNames:a.classNames,collection:a.collection,color:a.color,disableAnimation:a.disableAnimation,isSelectable:a.isSelectable,rowVirtualizer:z,selectionMode:a.selectionMode,slots:a.slots,state:a.state})]}),s==="inside"&&c]})}),s==="outside"&&c]})});fl.displayName="HeroUI.VirtualizedTable";var Uu=fl,vl=Le((e,t)=>{var n;const{as:i,className:o,slots:a,state:l,collection:r,isSelectable:s,color:c,disableAnimation:u,checkboxesProps:d,selectionMode:f,classNames:m,...h}=e,x=i||"tbody",b=typeof x=="string",k=Ye(t),{rowGroupProps:C}=ii(),j=$e(m==null?void 0:m.tbody,o),D=r==null?void 0:r.body.props,g=(D==null?void 0:D.isLoading)||(D==null?void 0:D.loadingState)==="loading"||(D==null?void 0:D.loadingState)==="loadingMore",z=v.useMemo(()=>[...r.body.childNodes].map(S=>p.jsx(il,{classNames:m,isSelectable:s,node:S,slots:a,state:l,children:[...S.childNodes].map($=>$.props.isSelectionCell?p.jsx(tl,{checkboxesProps:d,classNames:m,color:c,disableAnimation:u,node:$,rowKey:S.key,selectionMode:f,slots:a,state:l},$.key):p.jsx(Qo,{classNames:m,node:$,rowKey:S.key,slots:a,state:l},$.key))},S.key)),[r.body.childNodes,m,s,a,l]);let B,R;return r.size===0&&D.emptyContent&&(B=p.jsx("tr",{role:"row",children:p.jsx("td",{className:a==null?void 0:a.emptyWrapper({class:m==null?void 0:m.emptyWrapper}),colSpan:r.columnCount,role:"gridcell",children:!g&&D.emptyContent})})),g&&D.loadingContent&&(R=p.jsxs("tr",{role:"row",children:[p.jsx("td",{className:a==null?void 0:a.loadingWrapper({class:m==null?void 0:m.loadingWrapper}),colSpan:r.columnCount,role:"gridcell",children:D.loadingContent}),!B&&r.size===0?p.jsx("td",{className:a==null?void 0:a.emptyWrapper({class:m==null?void 0:m.emptyWrapper})}):null]})),p.jsxs(x,{ref:k,...Be(C,at(D,{enabled:b}),h),className:(n=a.tbody)==null?void 0:n.call(a,{class:j}),"data-empty":X(r.size===0),"data-loading":X(g),children:[z,R,B]})});vl.displayName="HeroUI.TableBody";var Yu=vl,hl=Le((e,t)=>{const{BaseComponent:n,Component:i,collection:o,values:a,topContent:l,topContentPlacement:r,bottomContentPlacement:s,bottomContent:c,removeWrapper:u,sortIcon:d,getBaseProps:f,getWrapperProps:m,getTableProps:h}=Zo({...e,ref:t}),{isVirtualized:x,rowHeight:b=40,maxTableHeight:k=600}=e,C=x,j=v.useCallback(({children:D})=>u?D:p.jsx(n,{...m(),children:D}),[u,m]);return C?p.jsx(Uu,{...e,ref:t,maxTableHeight:k,rowHeight:b}):p.jsxs("div",{...f(),children:[r==="outside"&&l,p.jsx(j,{children:p.jsxs(p.Fragment,{children:[r==="inside"&&l,p.jsxs(i,{...h(),children:[p.jsxs(cl,{classNames:a.classNames,slots:a.slots,children:[o.headerRows.map(D=>p.jsx(sl,{classNames:a.classNames,node:D,slots:a.slots,state:a.state,children:[...D.childNodes].map(g=>{var z;return(z=g==null?void 0:g.props)!=null&&z.isSelectionCell?p.jsx(Ho,{checkboxesProps:a.checkboxesProps,classNames:a.classNames,color:a.color,disableAnimation:a.disableAnimation,node:g,selectionMode:a.selectionMode,slots:a.slots,state:a.state},g==null?void 0:g.key):p.jsx(ll,{classNames:a.classNames,node:g,slots:a.slots,sortIcon:d,state:a.state},g==null?void 0:g.key)})},D==null?void 0:D.key)),p.jsx(pl,{as:"tr",tabIndex:-1,y:1})]}),p.jsx(Yu,{checkboxesProps:a.checkboxesProps,classNames:a.classNames,collection:a.collection,color:a.color,disableAnimation:a.disableAnimation,isSelectable:a.isSelectable,selectionMode:a.selectionMode,slots:a.slots,state:a.state})]}),s==="inside"&&c]})}),s==="outside"&&c]})});hl.displayName="HeroUI.Table";var Xu=hl,Gu=Eu,Xt=Gu,Zu=$u,Ju=Zu,Qu=Su,ec=Qu,tc=Du,nc=tc,ic=ju,Gt=ic;function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Se.apply(null,arguments)}function ai(e,t){if(e==null)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.includes(i))continue;n[i]=e[i]}return n}function dn(e){var t=v.useRef({fn:e,curr:void 0}).current;if(t.fn=e,!t.curr){var n=Object.create(null);Object.keys(e).forEach(function(i){n[i]=function(){var o;return(o=t.fn[i]).call.apply(o,[t.fn].concat([].slice.call(arguments)))}}),t.curr=n}return t.curr}function Wn(e){return v.useReducer(function(t,n){return Se({},t,typeof n=="function"?n(t):n)},e)}v.createContext(void 0);var Ti="cubic-bezier(0.25, 0.8, 0.25, 1)",_t=20,vt=typeof window<"u"&&"ontouchstart"in window,Ln=function(e,t,n){return Math.max(Math.min(e,n),t)},un=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=0),Ln(e,1*(1-n),Math.max(6,t)*(1+n))},Hn=typeof window>"u"||/ServerSideRendering/.test(navigator&&navigator.userAgent)?v.useEffect:v.useLayoutEffect;function Vt(e,t,n){var i=v.useRef(t);i.current=t,v.useEffect(function(){function o(a){i.current(a)}return e&&window.addEventListener(e,o,n),function(){e&&window.removeEventListener(e,o)}},[e])}var ac=["container"];function oc(e){var t=e.container,n=t===void 0?document.body:t,i=ai(e,ac);return Vi.createPortal(T.createElement("div",Se({},i)),n)}function lc(e){return T.createElement("svg",Se({width:"44",height:"44",viewBox:"0 0 768 768"},e),T.createElement("path",{d:"M607.5 205.5l-178.5 178.5 178.5 178.5-45 45-178.5-178.5-178.5 178.5-45-45 178.5-178.5-178.5-178.5 45-45 178.5 178.5 178.5-178.5z"}))}function rc(e){return T.createElement("svg",Se({width:"44",height:"44",viewBox:"0 0 768 768"},e),T.createElement("path",{d:"M640.5 352.5v63h-390l178.5 180-45 45-256.5-256.5 256.5-256.5 45 45-178.5 180h390z"}))}function sc(e){return T.createElement("svg",Se({width:"44",height:"44",viewBox:"0 0 768 768"},e),T.createElement("path",{d:"M384 127.5l256.5 256.5-256.5 256.5-45-45 178.5-180h-390v-63h390l-178.5-180z"}))}function uc(){return v.useEffect(function(){var e=document.body.style,t=e.overflow;return e.overflow="hidden",function(){e.overflow=t}},[]),null}function Oi(e){var t=e.touches[0],n=t.clientX,i=t.clientY;if(e.touches.length>=2){var o=e.touches[1],a=o.clientX,l=o.clientY;return[(n+a)/2,(i+l)/2,Math.sqrt(Math.pow(a-n,2)+Math.pow(l-i,2))]}return[n,i,0]}var Ct=function(e,t,n,i){var o,a=n*t,l=(a-i)/2,r=e;return a<=i?(o=1,r=0):e>0&&l-e<=0?(o=2,r=l):e<0&&l+e<=0&&(o=3,r=-l),[o,r]};function An(e,t,n,i,o,a,l,r,s,c){l===void 0&&(l=innerWidth/2),r===void 0&&(r=innerHeight/2),s===void 0&&(s=0),c===void 0&&(c=0);var u=Ct(e,a,n,innerWidth)[0],d=Ct(t,a,i,innerHeight),f=innerWidth/2,m=innerHeight/2;return{x:l-a/o*(l-(f+e))-f+(i/n>=3&&n*a===innerWidth?0:u?s/2:s),y:r-a/o*(r-(m+t))-m+(d[0]?c/2:c),lastCX:l,lastCY:r}}function qn(e,t,n){var i=e%180!=0;return i?[n,t,i]:[t,n,i]}function zn(e,t,n){var i=qn(n,innerWidth,innerHeight),o=i[0],a=i[1],l=0,r=o,s=a,c=e/t*a,u=t/e*o;return e<o&&t<a?(r=e,s=t):e<o&&t>=a?r=c:e>=o&&t<a||e/t>o/a?s=u:t/e>=3&&!i[2]?l=((s=u)-a)/2:r=c,{width:r,height:s,x:0,y:l,pause:!0}}function cn(e,t){var n=t.leading,i=n!==void 0&&n,o=t.maxWait,a=t.wait,l=a===void 0?o||0:a,r=v.useRef(e);r.current=e;var s=v.useRef(0),c=v.useRef(),u=function(){return c.current&&clearTimeout(c.current)},d=v.useCallback(function(){var f=[].slice.call(arguments),m=Date.now();function h(){s.current=m,u(),r.current.apply(null,f)}var x=s.current,b=m-x;if(x===0&&(i&&h(),s.current=m),o!==void 0){if(b>o)return void h()}else b<l&&(s.current=m);u(),c.current=setTimeout(function(){h(),s.current=0},l)},[l,o,i]);return d.cancel=u,d}var Ki=function(e,t,n){return Bt(e,t,n,100,function(i){return i},function(){return Bt(t,e,n)})},cc=function(e){return 1-Math.pow(1-e,4)};function Bt(e,t,n,i,o,a){i===void 0&&(i=400),o===void 0&&(o=cc);var l=t-e;if(l!==0){var r=Date.now(),s=0,c=function(){var d=Math.min(1,(Date.now()-r)/i);n(e+o(d)*l)&&d<1?u():(cancelAnimationFrame(s),d>=1&&a&&a())};u()}function u(){s=requestAnimationFrame(c)}}var dc={T:0,L:0,W:0,H:0,FIT:void 0},xl=function(){var e=v.useRef(!1);return v.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},pc=["className"];function mc(e){var t=e.className,n=t===void 0?"":t,i=ai(e,pc);return T.createElement("div",Se({className:"PhotoView__Spinner "+n},i),T.createElement("svg",{viewBox:"0 0 32 32",width:"36",height:"36",fill:"white"},T.createElement("path",{opacity:".25",d:"M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"}),T.createElement("path",{d:"M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z"})))}var fc=["src","loaded","broken","className","onPhotoLoad","loadingElement","brokenElement"];function vc(e){var t=e.src,n=e.loaded,i=e.broken,o=e.className,a=e.onPhotoLoad,l=e.loadingElement,r=e.brokenElement,s=ai(e,fc),c=xl();return t&&!i?T.createElement(T.Fragment,null,T.createElement("img",Se({className:"PhotoView__Photo"+(o?" "+o:""),src:t,onLoad:function(u){var d=u.target;c.current&&a({loaded:!0,naturalWidth:d.naturalWidth,naturalHeight:d.naturalHeight})},onError:function(){c.current&&a({broken:!0})},draggable:!1,alt:""},s)),!n&&(l?T.createElement("span",{className:"PhotoView__icon"},l):T.createElement(mc,{className:"PhotoView__icon"}))):r?T.createElement("span",{className:"PhotoView__icon"},typeof r=="function"?r({src:t}):r):null}var hc={naturalWidth:void 0,naturalHeight:void 0,width:void 0,height:void 0,loaded:void 0,broken:!1,x:0,y:0,touched:!1,maskTouched:!1,rotate:0,scale:1,CX:0,CY:0,lastX:0,lastY:0,lastCX:0,lastCY:0,lastScale:1,touchTime:0,touchLength:0,pause:!0,stopRaf:!0,reach:void 0};function xc(e){var t=e.item,n=t.src,i=t.render,o=t.width,a=o===void 0?0:o,l=t.height,r=l===void 0?0:l,s=t.originRef,c=e.visible,u=e.speed,d=e.easing,f=e.wrapClassName,m=e.className,h=e.style,x=e.loadingElement,b=e.brokenElement,k=e.onPhotoTap,C=e.onMaskTap,j=e.onReachMove,D=e.onReachUp,g=e.onPhotoResize,z=e.isActive,B=e.expose,R=Wn(hc),S=R[0],$=R[1],K=v.useRef(0),q=xl(),F=S.naturalWidth,N=F===void 0?a:F,I=S.naturalHeight,W=I===void 0?r:I,he=S.width,_=he===void 0?a:he,U=S.height,ke=U===void 0?r:U,Ce=S.loaded,re=Ce===void 0?!n:Ce,ae=S.broken,ne=S.x,oe=S.y,Z=S.touched,Fe=S.stopRaf,xe=S.maskTouched,L=S.rotate,J=S.scale,ge=S.CX,se=S.CY,ue=S.lastX,Ne=S.lastY,Y=S.lastCX,He=S.lastCY,ce=S.lastScale,me=S.touchTime,Pe=S.touchLength,de=S.pause,je=S.reach,E=dn({onScale:function(w){return P(un(w))},onRotate:function(w){L!==w&&(B({rotate:w}),$(Se({rotate:w},zn(N,W,w))))}});function P(w,M,G){J!==w&&(B({scale:w}),$(Se({scale:w},An(ne,oe,_,ke,J,w,M,G),w<=1&&{x:0,y:0})))}var y=cn(function(w,M,G){if(G===void 0&&(G=0),(Z||xe)&&z){var lt=qn(L,_,ke),rt=lt[0],Ke=lt[1];if(G===0&&K.current===0){var Re=Math.abs(w-ge)<=20,Te=Math.abs(M-se)<=20;if(Re&&Te)return void $({lastCX:w,lastCY:M});K.current=Re?M>se?3:2:1}var Qe,Et=w-Y,xt=M-He;if(G===0){var St=Ct(Et+ue,J,rt,innerWidth)[0],Nt=Ct(xt+Ne,J,Ke,innerHeight);Qe=(function(gt,ut,ct,et){return ut&>===1||et==="x"?"x":ct&>>1||et==="y"?"y":void 0})(K.current,St,Nt[0],je),Qe!==void 0&&j(Qe,w,M,J)}if(Qe==="x"||xe)return void $({reach:"x"});var st=un(J+(G-Pe)/100/2*J,N/_,.2);B({scale:st}),$(Se({touchLength:G,reach:Qe,scale:st},An(ne,oe,_,ke,J,st,w,M,Et,xt)))}},{maxWait:8});function A(w){return!Fe&&!Z&&(q.current&&$(Se({},w,{pause:c})),q.current)}var V,H,Q,Ie,Me,Xe,Ge,be,ye=(Me=function(w){return A({x:w})},Xe=function(w){return A({y:w})},Ge=function(w){return q.current&&(B({scale:w}),$({scale:w})),!Z&&q.current},be=dn({X:function(w){return Me(w)},Y:function(w){return Xe(w)},S:function(w){return Ge(w)}}),function(w,M,G,lt,rt,Ke,Re,Te,Qe,Et,xt){var St=qn(Et,rt,Ke),Nt=St[0],st=St[1],gt=Ct(w,Te,Nt,innerWidth),ut=gt[0],ct=gt[1],et=Ct(M,Te,st,innerHeight),Pt=et[0],on=et[1],It=Date.now()-xt;if(It>=200||Te!==Re||Math.abs(Qe-Re)>1){var bt=An(w,M,rt,Ke,Re,Te),dt=bt.x,jt=bt.y,_e=ut?ct:dt!==w?dt:null,Mt=Pt?on:jt!==M?jt:null;return _e!==null&&Bt(w,_e,be.X),Mt!==null&&Bt(M,Mt,be.Y),void(Te!==Re&&Bt(Re,Te,be.S))}var At=(w-G)/It,yt=(M-lt)/It,wt=Math.sqrt(Math.pow(At,2)+Math.pow(yt,2)),pt=!1,mt=!1;(function(qe,Ae){var ze,Ue=qe,ft=0,Ve=0,Rt=function(Ut){ze||(ze=Ut);var Yt=Ut-ze,oi=Math.sign(qe),li=-.001*oi,ri=Math.sign(-Ue)*Math.pow(Ue,2)*2e-4,wl=Ue*Yt+(li+ri)*Math.pow(Yt,2)/2;ft+=wl,ze=Ut,oi*(Ue+=(li+ri)*Yt)<=0?We():Ae(ft)?tt():We()};function tt(){Ve=requestAnimationFrame(Rt)}function We(){cancelAnimationFrame(Ve)}tt()})(wt,function(qe){var Ae=w+qe*(At/wt),ze=M+qe*(yt/wt),Ue=Ct(Ae,Re,Nt,innerWidth),ft=Ue[0],Ve=Ue[1],Rt=Ct(ze,Re,st,innerHeight),tt=Rt[0],We=Rt[1];if(ft&&!pt&&(pt=!0,ut?Bt(Ae,Ve,be.X):Ki(Ve,Ae+(Ae-Ve),be.X)),tt&&!mt&&(mt=!0,Pt?Bt(ze,We,be.Y):Ki(We,ze+(ze-We),be.Y)),pt&&mt)return!1;var Ut=pt||be.X(Ve),Yt=mt||be.Y(We);return Ut&&Yt})}),Ze=(V=k,H=function(w,M){je||P(J!==1?1:Math.max(2,N/_),w,M)},Q=v.useRef(0),Ie=cn(function(){Q.current=0,V.apply(void 0,[].slice.call(arguments))},{wait:300}),function(){var w=[].slice.call(arguments);Q.current+=1,Ie.apply(void 0,w),Q.current>=2&&(Ie.cancel(),Q.current=0,H.apply(void 0,w))});function Je(w,M){if(K.current=0,(Z||xe)&&z){$({touched:!1,maskTouched:!1,pause:!1,stopRaf:!1,reach:void 0});var G=un(J,N/_);if(ye(ne,oe,ue,Ne,_,ke,J,G,ce,L,me),D(w,M),ge===w&&se===M){if(Z)return void Ze(w,M);xe&&C(w,M)}}}function ot(w,M,G){G===void 0&&(G=0),$({touched:!0,CX:w,CY:M,lastCX:w,lastCY:M,lastX:ne,lastY:oe,lastScale:J,touchLength:G,touchTime:Date.now()})}function ht(w){$({maskTouched:!0,CX:w.clientX,CY:w.clientY,lastX:ne,lastY:oe})}Vt(vt?void 0:"mousemove",function(w){w.preventDefault(),y(w.clientX,w.clientY)}),Vt(vt?void 0:"mouseup",function(w){Je(w.clientX,w.clientY)}),Vt(vt?"touchmove":void 0,function(w){w.preventDefault();var M=Oi(w);y.apply(void 0,M)},{passive:!1}),Vt(vt?"touchend":void 0,function(w){var M=w.changedTouches[0];Je(M.clientX,M.clientY)},{passive:!1}),Vt("resize",cn(function(){re&&!Z&&($(zn(N,W,L)),g())},{maxWait:8})),Hn(function(){z&&B(Se({scale:J,rotate:L},E))},[z]);var Oe=(function(w,M,G,lt,rt,Ke,Re,Te,Qe,Et){var xt=(function(dt,jt,_e,Mt,At){var yt=v.useRef(!1),wt=Wn({lead:!0,scale:_e}),pt=wt[0],mt=pt.lead,qe=pt.scale,Ae=wt[1],ze=cn(function(Ue){try{return At(!0),Ae({lead:!1,scale:Ue}),Promise.resolve()}catch(ft){return Promise.reject(ft)}},{wait:Mt});return Hn(function(){yt.current?(At(!1),Ae({lead:!0}),ze(_e)):yt.current=!0},[_e]),mt?[dt*qe,jt*qe,_e/qe]:[dt*_e,jt*_e,1]})(Ke,Re,Te,Qe,Et),St=xt[0],Nt=xt[1],st=xt[2],gt=(function(dt,jt,_e,Mt,At){var yt=v.useState(dc),wt=yt[0],pt=yt[1],mt=v.useState(0),qe=mt[0],Ae=mt[1],ze=v.useRef(),Ue=dn({OK:function(){return dt&&Ae(4)}});function ft(Ve){At(!1),Ae(Ve)}return v.useEffect(function(){if(ze.current||(ze.current=Date.now()),_e){if((function(Ve,Rt){var tt=Ve&&Ve.current;if(tt&&tt.nodeType===1){var We=tt.getBoundingClientRect();Rt({T:We.top,L:We.left,W:We.width,H:We.height,FIT:tt.tagName==="IMG"?getComputedStyle(tt).objectFit:void 0})}})(jt,pt),dt)return Date.now()-ze.current<250?(Ae(1),requestAnimationFrame(function(){Ae(2),requestAnimationFrame(function(){return ft(3)})}),void setTimeout(Ue.OK,Mt)):void Ae(4);ft(5)}},[dt,_e]),[qe,wt]})(w,M,G,Qe,Et),ut=gt[0],ct=gt[1],et=ct.W,Pt=ct.FIT,on=innerWidth/2,It=innerHeight/2,bt=ut<3||ut>4;return[bt?et?ct.L:on:lt+(on-Ke*Te/2),bt?et?ct.T:It:rt+(It-Re*Te/2),St,bt&&Pt?St*(ct.H/et):Nt,ut===0?st:bt?et/(Ke*Te)||.01:st,bt?Pt?1:0:1,ut,Pt]})(c,s,re,ne,oe,_,ke,J,u,function(w){return $({pause:w})}),O=Oe[4],ie=Oe[6],we="transform "+u+"ms "+d,fe={className:m,onMouseDown:vt?void 0:function(w){w.stopPropagation(),w.button===0&&ot(w.clientX,w.clientY,0)},onTouchStart:vt?function(w){w.stopPropagation(),ot.apply(void 0,Oi(w))}:void 0,onWheel:function(w){if(!je){var M=un(J-w.deltaY/100/2,N/_);$({stopRaf:!0}),P(M,w.clientX,w.clientY)}},style:{width:Oe[2]+"px",height:Oe[3]+"px",opacity:Oe[5],objectFit:ie===4?void 0:Oe[7],transform:L?"rotate("+L+"deg)":void 0,transition:ie>2?we+", opacity "+u+"ms ease, height "+(ie<4?u/2:ie>4?u:0)+"ms "+d:void 0}};return T.createElement("div",{className:"PhotoView__PhotoWrap"+(f?" "+f:""),style:h,onMouseDown:!vt&&z?ht:void 0,onTouchStart:vt&&z?function(w){return ht(w.touches[0])}:void 0},T.createElement("div",{className:"PhotoView__PhotoBox",style:{transform:"matrix("+O+", 0, 0, "+O+", "+Oe[0]+", "+Oe[1]+")",transition:Z||de?void 0:we,willChange:z?"transform":void 0}},n?T.createElement(vc,Se({src:n,loaded:re,broken:ae},fe,{onPhotoLoad:function(w){$(Se({},w,w.loaded&&zn(w.naturalWidth||0,w.naturalHeight||0,L)))},loadingElement:x,brokenElement:b})):i&&i({attrs:fe,scale:O,rotate:L})))}var _i={x:0,touched:!1,pause:!1,lastCX:void 0,lastCY:void 0,bg:void 0,lastBg:void 0,overlay:!0,minimal:!0,scale:1,rotate:0};function gc(e){var t=e.loop,n=t===void 0?3:t,i=e.speed,o=e.easing,a=e.photoClosable,l=e.maskClosable,r=l===void 0||l,s=e.maskOpacity,c=s===void 0?1:s,u=e.pullClosable,d=u===void 0||u,f=e.bannerVisible,m=f===void 0||f,h=e.overlayRender,x=e.toolbarRender,b=e.className,k=e.maskClassName,C=e.photoClassName,j=e.photoWrapClassName,D=e.loadingElement,g=e.brokenElement,z=e.images,B=e.index,R=B===void 0?0:B,S=e.onIndexChange,$=e.visible,K=e.onClose,q=e.afterClose,F=e.portalContainer,N=Wn(_i),I=N[0],W=N[1],he=v.useState(0),_=he[0],U=he[1],ke=I.x,Ce=I.touched,re=I.pause,ae=I.lastCX,ne=I.lastCY,oe=I.bg,Z=oe===void 0?c:oe,Fe=I.lastBg,xe=I.overlay,L=I.minimal,J=I.scale,ge=I.rotate,se=I.onScale,ue=I.onRotate,Ne=e.hasOwnProperty("index"),Y=Ne?R:_,He=Ne?S:U,ce=v.useRef(Y),me=z.length,Pe=z[Y],de=typeof n=="boolean"?n:me>n,je=(function(O,ie){var we=v.useReducer(function(G){return!G},!1)[1],fe=v.useRef(0),w=(function(G){var lt=v.useRef(G);function rt(Ke){lt.current=Ke}return v.useMemo(function(){(function(Ke){O?(Ke(O),fe.current=1):fe.current=2})(rt)},[G]),[lt.current,rt]})(O),M=w[1];return[w[0],fe.current,function(){we(),fe.current===2&&(M(!1),ie&&ie()),fe.current=0}]})($,q),E=je[0],P=je[1],y=je[2];Hn(function(){if(E)return W({pause:!0,x:Y*-(innerWidth+_t)}),void(ce.current=Y);W(_i)},[E]);var A=dn({close:function(O){ue&&ue(0),W({overlay:!0,lastBg:Z}),K(O)},changeIndex:function(O,ie){ie===void 0&&(ie=!1);var we=de?ce.current+(O-Y):O,fe=me-1,w=Ln(we,0,fe),M=de?we:w,G=innerWidth+_t;W({touched:!1,lastCX:void 0,lastCY:void 0,x:-G*M,pause:ie}),ce.current=M,He&&He(de?O<0?fe:O>fe?0:O:w)}}),V=A.close,H=A.changeIndex;function Q(O){return O?V():W({overlay:!xe})}function Ie(){W({x:-(innerWidth+_t)*Y,lastCX:void 0,lastCY:void 0,pause:!0}),ce.current=Y}function Me(O,ie,we,fe){O==="x"?(function(w){if(ae!==void 0){var M=w-ae,G=M;!de&&(Y===0&&M>0||Y===me-1&&M<0)&&(G=M/2),W({touched:!0,lastCX:ae,x:-(innerWidth+_t)*ce.current+G,pause:!1})}else W({touched:!0,lastCX:w,x:ke,pause:!1})})(ie):O==="y"&&(function(w,M){if(ne!==void 0){var G=c===null?null:Ln(c,.01,c-Math.abs(w-ne)/100/4);W({touched:!0,lastCY:ne,bg:M===1?G:c,minimal:M===1})}else W({touched:!0,lastCY:w,bg:Z,minimal:!0})})(we,fe)}function Xe(O,ie){var we=O-(ae??O),fe=ie-(ne??ie),w=!1;if(we<-40)H(Y+1);else if(we>40)H(Y-1);else{var M=-(innerWidth+_t)*ce.current;Math.abs(fe)>100&&L&&d&&(w=!0,V()),W({touched:!1,x:M,lastCX:void 0,lastCY:void 0,bg:c,overlay:!!w||xe})}}Vt("keydown",function(O){if($)switch(O.key){case"ArrowLeft":H(Y-1,!0);break;case"ArrowRight":H(Y+1,!0);break;case"Escape":V()}});var Ge=(function(O,ie,we){return v.useMemo(function(){var fe=O.length;return we?O.concat(O).concat(O).slice(fe+ie-1,fe+ie+2):O.slice(Math.max(ie-1,0),Math.min(ie+2,fe+1))},[O,ie,we])})(z,Y,de);if(!E)return null;var be=xe&&!P,ye=$?Z:Fe,Ze=se&&ue&&{images:z,index:Y,visible:$,onClose:V,onIndexChange:H,overlayVisible:be,overlay:Pe&&Pe.overlay,scale:J,rotate:ge,onScale:se,onRotate:ue},Je=i?i(P):400,ot=o?o(P):Ti,ht=i?i(3):600,Oe=o?o(3):Ti;return T.createElement(oc,{className:"PhotoView-Portal"+(be?"":" PhotoView-Slider__clean")+($?"":" PhotoView-Slider__willClose")+(b?" "+b:""),role:"dialog",onClick:function(O){return O.stopPropagation()},container:F},$&&T.createElement(uc,null),T.createElement("div",{className:"PhotoView-Slider__Backdrop"+(k?" "+k:"")+(P===1?" PhotoView-Slider__fadeIn":P===2?" PhotoView-Slider__fadeOut":""),style:{background:ye?"rgba(0, 0, 0, "+ye+")":void 0,transitionTimingFunction:ot,transitionDuration:(Ce?0:Je)+"ms",animationDuration:Je+"ms"},onAnimationEnd:y}),m&&T.createElement("div",{className:"PhotoView-Slider__BannerWrap"},T.createElement("div",{className:"PhotoView-Slider__Counter"},Y+1," / ",me),T.createElement("div",{className:"PhotoView-Slider__BannerRight"},x&&Ze&&x(Ze),T.createElement(lc,{className:"PhotoView-Slider__toolbarIcon",onClick:V}))),Ge.map(function(O,ie){var we=de||Y!==0?ce.current-1+ie:Y+ie;return T.createElement(xc,{key:de?O.key+"/"+O.src+"/"+we:O.key,item:O,speed:Je,easing:ot,visible:$,onReachMove:Me,onReachUp:Xe,onPhotoTap:function(){return Q(a)},onMaskTap:function(){return Q(r)},wrapClassName:j,className:C,style:{left:(innerWidth+_t)*we+"px",transform:"translate3d("+ke+"px, 0px, 0)",transition:Ce||re?void 0:"transform "+ht+"ms "+Oe},loadingElement:D,brokenElement:g,onPhotoResize:Ie,isActive:ce.current===we,expose:W})}),!vt&&m&&T.createElement(T.Fragment,null,(de||Y!==0)&&T.createElement("div",{className:"PhotoView-Slider__ArrowLeft",onClick:function(){return H(Y-1,!0)}},T.createElement(rc,null)),(de||Y+1<me)&&T.createElement("div",{className:"PhotoView-Slider__ArrowRight",onClick:function(){return H(Y+1,!0)}},T.createElement(sc,null))),h&&Ze&&T.createElement("div",{className:"PhotoView-Slider__Overlay"},h(Ze)))}const gl=e=>{const{name:t,isDirectory:n=!1}=e;if(n)return p.jsx(dr,{className:"text-yellow-500"});const i=(t==null?void 0:t.split(".").pop())||"";if(i)switch(i.toLowerCase()){case"jpg":case"jpeg":case"png":case"gif":case"svg":case"bmp":case"ico":case"webp":case"tiff":case"tif":case"heic":case"heif":case"avif":case"apng":case"flif":case"ai":case"psd":case"xcf":case"sketch":case"fig":case"xd":case"svgz":return p.jsx(kr,{className:"text-green-500"});case"pdf":return p.jsx(wr,{className:"text-red-500"});case"doc":case"docx":return p.jsx(yr,{className:"text-blue-500"});case"xls":case"xlsx":return p.jsx(br,{className:"text-green-500"});case"csv":return p.jsx(gr,{className:"text-green-500"});case"ppt":case"pptx":return p.jsx(xr,{className:"text-red-500"});case"zip":case"rar":case"7z":case"tar":case"gz":case"bz2":case"xz":case"lz":case"lzma":case"zst":case"zstd":case"z":case"taz":case"tz":case"tzo":return p.jsx(hr,{className:"text-green-500"});case"txt":return p.jsx(vr,{className:"text-gray-500"});case"mp3":case"wav":case"flac":return p.jsx(fr,{className:"text-green-500"});case"mp4":case"avi":case"mov":case"wmv":return p.jsx(mr,{className:"text-red-500"});case"html":case"css":case"js":case"ts":case"jsx":case"tsx":case"json":case"xml":case"yaml":case"yml":case"md":case"sh":case"py":case"java":case"c":case"cpp":case"cs":case"go":case"php":case"rb":case"pl":case"swift":case"kt":case"rs":case"sql":case"r":case"scala":case"groovy":case"dart":case"lua":case"perl":case"h":case"m":case"mm":case"makefile":case"cmake":case"dockerfile":case"gradle":case"properties":case"ini":case"conf":case"env":case"bat":case"cmd":case"ps1":case"psm1":case"psd1":case"ps1xml":case"psc1":case"pssc":case"nuspec":case"resx":case"resw":case"csproj":case"vbproj":case"vcxproj":case"fsproj":case"sln":case"suo":case"user":case"userosscache":case"sln.docstates":case"dll":return p.jsx(pr,{className:"text-blue-500"});default:return p.jsx(mi,{className:"text-gray-500"})}return p.jsx(mi,{className:"text-gray-500"})},bl=[".png",".jpg",".jpeg",".gif",".bmp"];function bc({name:e,filePath:t,onPreview:n,onAddPreview:i}){const{data:o,loading:a,error:l,run:r}=qi(async()=>De.downloadToURL(t),{refreshDeps:[t],manual:!0,refreshDepsAction:()=>{const s=ve.extname(t).toLowerCase();!t||!bl.includes(s)||r()}});return v.useEffect(()=>{o&&i({key:e,src:o,alt:e})},[o,e,i]),v.useEffect(()=>{t&&r()},[]),p.jsx(te,{radius:"sm",variant:"light",className:"text-left justify-start",onPress:n,startContent:l?p.jsx(gl,{name:e,isDirectory:!1}):a||!o?p.jsx(Zt,{size:"sm"}):p.jsx(Cr,{src:o,alt:e,className:"w-8 h-8 flex-shrink-0",classNames:{wrapper:"w-8 h-8 flex-shrink-0"},radius:"sm"}),children:e})}const Bn=20;function yc({files:e,currentPath:t,loading:n,sortDescriptor:i,onSortChange:o,selectedFiles:a,onSelectionChange:l,onDirectoryClick:r,onEdit:s,onPreview:c,onRenameRequest:u,onMoveRequest:d,onCopyPath:f,onDelete:m,onDownload:h}){const[x,b]=v.useState(1),k=Math.ceil(e.length/Bn)||1,C=(x-1)*Bn,j=C+Bn,D=e.slice(C,j),[g,z]=v.useState(!1),[B,R]=v.useState(0),[S,$]=v.useState([]),K=v.useCallback(F=>{$(N=>N.some(W=>W.key===F.key)?N:[...N,F])},[]);v.useEffect(()=>{$([]),R(0),z(!1),b(1)},[t]);const q=(F,N)=>{const I=N.findIndex(W=>W.key===F);I!==-1&&(R(I),z(!0))};return p.jsxs(p.Fragment,{children:[p.jsx(gc,{images:S,visible:g,onClose:()=>z(!1),index:B,onIndexChange:R}),!n&&e.length===0?p.jsx(cr,{compact:!0,icon:p.jsx(Ul,{size:20}),title:"这个目录是空的",description:"拖拽文件到这里,或用上方工具栏新建文件 / 文件夹。"}):p.jsxs(Xu,{"aria-label":"文件列表",radius:"sm",sortDescriptor:i,onSortChange:o,onSelectionChange:l,defaultSelectedKeys:[],selectedKeys:a,selectionMode:"multiple",bottomContent:k>1?p.jsx("div",{className:"flex w-full justify-center p-3 border-t border-white/50 dark:border-white/[0.06]",children:p.jsx(Ql,{isCompact:!0,showControls:!0,showShadow:!0,color:"primary",page:x,total:k,onChange:F=>b(F),classNames:{cursor:"bg-primary shadow-lg"}})}):null,classNames:{wrapper:"bg-white/60 dark:bg-white/[0.04] backdrop-blur-xl border border-white/60 dark:border-white/10 shadow-sm p-0 rounded-2xl",th:"bg-white/50 dark:bg-white/[0.05] backdrop-blur-md text-default-500 font-semibold text-xs uppercase tracking-wider",td:"group-data-[first=true]:first:before:rounded-none group-data-[first=true]:last:before:rounded-none"},children:[p.jsxs(Ju,{children:[p.jsx(Xt,{allowsSorting:!0,children:"名称"},"name"),p.jsx(Xt,{allowsSorting:!0,className:"hidden md:table-cell",children:"类型"},"type"),p.jsx(Xt,{allowsSorting:!0,className:"hidden md:table-cell",children:"大小"},"size"),p.jsx(Xt,{allowsSorting:!0,className:"hidden md:table-cell",children:"修改时间"},"mtime"),p.jsx(Xt,{children:"操作"},"actions")]}),p.jsx(nc,{isLoading:n,loadingContent:p.jsx("div",{className:"flex justify-center items-center h-full",children:p.jsx(Zt,{})}),children:D.map(F=>{const N=ve.join(t,F.name),I=ve.extname(F.name).toLowerCase(),W=Tn.includes(I),he=S;return p.jsxs(ec,{children:[p.jsx(Gt,{children:bl.includes(I)?p.jsx(bc,{name:F.name,filePath:N,onPreview:()=>q(F.name,he),onAddPreview:K}):p.jsx(te,{radius:"sm",variant:"light",onPress:()=>F.isDirectory?r(F.name):W?c(N):s(N),className:"text-left justify-start",startContent:p.jsx(gl,{name:F.name,isDirectory:F.isDirectory}),children:F.name})}),p.jsx(Gt,{className:"hidden md:table-cell",children:F.isDirectory?"目录":"文件"}),p.jsx(Gt,{className:"hidden md:table-cell",children:isNaN(F.size)||F.isDirectory?"-":`${F.size} 字节`}),p.jsx(Gt,{className:"hidden md:table-cell",children:new Date(F.mtime).toLocaleString()}),p.jsx(Gt,{children:p.jsxs(ta,{radius:"sm",size:"sm",variant:"light",children:[p.jsx(te,{isIconOnly:!0,color:"default",className:"text-default-500 hover:text-primary",onPress:()=>u(F.name),children:p.jsx(ur,{})}),p.jsx(te,{isIconOnly:!0,color:"default",className:"text-default-500 hover:text-primary",onPress:()=>d(F.name),children:p.jsx(Ui,{})}),p.jsx(te,{isIconOnly:!0,color:"default",className:"text-default-500 hover:text-primary",onPress:()=>f(F.name),children:p.jsx(Vl,{})}),p.jsx(te,{isIconOnly:!0,color:"default",className:"text-default-500 hover:text-primary",onPress:()=>h(N),children:p.jsx(Yi,{})}),p.jsx(te,{isIconOnly:!0,color:"danger",className:"text-danger hover:bg-danger/10",onPress:()=>m(N),children:p.jsx(Wl,{})})]})})]},F.name)})})]})]})}function yl({basePath:e,onSelect:t,selectedPath:n}){const[i,o]=v.useState([]),[a,l]=v.useState(!1),[r,s]=v.useState(!1),c=async()=>{try{const x=await De.listDirectories(e);o(x.map(b=>b.name))}catch{}},u=async()=>{a?l(!1):(l(!0),s(!0),await c(),s(!1))},d=()=>{t(e),u()},f=()=>e==="/"?"/":/^[A-Z]:$/i.test(e)?e:ve.basename(e),m=n===e,h=m?"solid":n&&ve.dirname(n)===e?"flat":"light";return p.jsxs("div",{className:"ml-4",children:[p.jsx(te,{radius:"sm",onPress:d,className:"py-1 px-2 text-left justify-start min-w-0 min-h-0 h-auto text-sm rounded-sm",size:"sm",color:"primary",variant:h,startContent:p.jsx("div",{className:Fn("rounded-sm",m?"bg-primary-600":"bg-primary-50"),children:a?p.jsx($r,{}):p.jsx(Dr,{})}),children:f()}),a&&p.jsx("div",{children:r?p.jsx("div",{className:"flex py-1 px-8",children:p.jsx(Zt,{size:"sm",color:"primary"})}):i.map(x=>{const b=e==="/"&&/^[A-Z]:$/i.test(x)?x:ve.join(e,x);return p.jsx(yl,{basePath:b,onSelect:t,selectedPath:n},b)})})]})}function wc({isOpen:e,moveTargetPath:t,selectionInfo:n,onClose:i,onMove:o,onSelect:a}){return p.jsx(Qt,{radius:"sm",isOpen:e,onClose:i,children:p.jsxs(en,{className:"rounded-3xl border border-white/70 dark:border-white/10 bg-white/92 dark:bg-zinc-900/92 backdrop-blur-2xl shadow-2xl shadow-primary-900/15",children:[p.jsx(tn,{children:"选择目标目录"}),p.jsxs(nn,{children:[p.jsx("div",{className:"rounded-sm p-2 border border-default-300 overflow-auto max-h-60",children:p.jsx(yl,{basePath:"/",onSelect:a,selectedPath:t})}),p.jsxs("p",{className:"text-sm text-default-500 mt-2",children:["当前选择:",t||"未选择"]}),p.jsxs("p",{className:"text-sm text-default-500",children:["移动项:",n]})]}),p.jsxs(an,{children:[p.jsx(te,{radius:"sm",color:"primary",variant:"flat",onPress:i,children:"取消"}),p.jsx(te,{radius:"sm",color:"primary",onPress:o,children:"确定"})]})]})})}function kc({isOpen:e,newFileName:t,onNameChange:n,onClose:i,onRename:o}){return p.jsx(Qt,{radius:"sm",isOpen:e,onClose:i,children:p.jsxs(en,{className:"rounded-3xl border border-white/70 dark:border-white/10 bg-white/92 dark:bg-zinc-900/92 backdrop-blur-2xl shadow-2xl shadow-primary-900/15",children:[p.jsx(tn,{children:"重命名"}),p.jsx(nn,{children:p.jsx(Gn,{radius:"sm",label:"新名称",value:t,onChange:n})}),p.jsxs(an,{children:[p.jsx(te,{radius:"sm",color:"primary",variant:"flat",onPress:i,children:"取消"}),p.jsx(te,{radius:"sm",color:"primary",onPress:o,children:"确定"})]})]})})}function rd(){const[e,t]=v.useState([]),[n,i]=v.useState(!1),[o,a]=v.useState({column:"name",direction:"ascending"}),l=Er(),r=Sr(),s=jr();let c=decodeURIComponent(r.hash.slice(1)||"/");/^\/[A-Z]:$/i.test(c)&&(c=c.slice(1));const[u,d]=v.useState(null),[f,m]=v.useState(!1),[h,x]=v.useState(""),[b,k]=v.useState("file"),[C,j]=v.useState(new Set),[D,g]=v.useState(!1),[z,B]=v.useState(!1),[R,S]=v.useState(""),[$,K]=v.useState(""),[q,F]=v.useState(""),[N,I]=v.useState(""),[W,he]=v.useState(!1),_=(E,P)=>[...E].sort((y,A)=>{if(y.isDirectory!==A.isDirectory)return y.isDirectory?-1:1;const V=P.direction==="ascending"?1:-1;switch(P.column){case"name":return V*y.name.localeCompare(A.name);case"type":{const H=y.isDirectory?"目录":"文件",Q=y.isDirectory?"目录":"文件";return V*H.localeCompare(Q)}case"size":return V*((y.size||0)-(A.size||0));case"mtime":return V*(new Date(y.mtime).getTime()-new Date(A.mtime).getTime());default:return 0}}),U=async()=>{i(!0);try{const E=await De.listFiles(c);t(_(E,o))}catch{pe.error("加载文件列表失败"),t([])}i(!1)};v.useEffect(()=>{U()},[c]);const ke=E=>{a(E),t(P=>_(P,E))},Ce=E=>{if(E===".."){if(/^[A-Z]:$/i.test(c)){s("/file_manager#/");return}const P=ve.dirname(c);s(`/file_manager#${encodeURIComponent(P===c?"/":P)}`);return}s(`/file_manager#${encodeURIComponent(ve.join(c,E))}`)},re=async E=>{try{const P=await De.readFile(E);d({path:E,content:P})}catch{pe.error("打开文件失败")}},ae=async()=>{if(u)try{await De.writeFile(u.path,u.content),pe.success("保存成功"),d(null),U()}catch{pe.error("保存失败")}},ne=async E=>{l.confirm({title:"删除文件",content:p.jsxs("div",{children:["确定要删除文件 ",E," 吗?"]}),onConfirm:async()=>{try{await De.delete(E),pe.success("删除成功"),U()}catch{pe.error("删除失败")}}})},oe=async()=>{if(!h)return;const E=ve.join(c,h);try{if(b==="directory"){if(!await De.createDirectory(E)){pe.error("目录已存在");return}}else if(!await De.createFile(E)){pe.error("文件已存在");return}pe.success("创建成功"),m(!1),x(""),U()}catch(P){pe.error((P==null?void 0:P.message)||"创建失败")}},Z=async()=>{const E=C instanceof Set?Array.from(C):e.map(P=>P.name);E.length!==0&&l.confirm({title:"批量删除",content:p.jsxs("div",{children:["确定要删除选中的 ",E.length," 个项目吗?"]}),onConfirm:async()=>{try{const P=E.map(y=>ve.join(c,y.toString()));await De.batchDelete(P),pe.success("批量删除成功"),j(new Set),U()}catch{pe.error("批量删除失败")}}})},Fe=async()=>{if(!(!R||!h))try{await De.rename(ve.join(c,R),ve.join(c,h)),pe.success("重命名成功"),g(!1),S(""),x(""),U()}catch{pe.error("重命名失败")}},xe=async E=>{if($)try{await De.move(ve.join(c,E),ve.join($,E)),pe.success("移动成功"),B(!1),K(""),U()}catch{pe.error("移动失败")}},L=async()=>{if(!$)return;const E=C instanceof Set?Array.from(C):e.map(P=>P.name);if(E.length!==0)try{const P=E.map(y=>({sourcePath:ve.join(c,y.toString()),targetPath:ve.join($,y.toString())}));await De.batchMove(P),pe.success("批量移动成功"),B(!1),K(""),j(new Set),U()}catch{pe.error("批量移动失败")}},J=E=>{navigator.clipboard.writeText(ve.join(c,E)),pe.success("路径已复制")},ge=E=>{S(E),K(""),B(!0)},se=E=>{De.download(E)},ue=async()=>{const E=C instanceof Set?Array.from(C):e.map(y=>y.name);if(E.length===0)return;const P=E.map(y=>ve.join(c,y.toString()));await De.batchDownload(P)},Ne=E=>{I(E)},Y=async E=>{try{const P=E.map(y=>{const A=y.webkitRelativePath||y.name;return new File([y],A,{type:y.type,lastModified:y.lastModified})});pe.promise(De.upload(c,P),{loading:"正在上传文件...",success:"上传成功",error:"上传失败"}).then(()=>{U()})}catch{pe.error("上传失败")}},{getRootProps:He,getInputProps:ce,isDragActive:me,open:Pe}=pa({onDrop:Y,noClick:!0,onDragOver:E=>{E.preventDefault(),E.stopPropagation()},useFsAccessApi:!1}),[de]=Rl(Tl.backgroundImage,""),je=!!de;return p.jsxs("div",{className:"h-full flex flex-col relative gap-4 w-full px-3 md:px-6 py-4 md:py-6",children:[p.jsxs("div",{className:Fn("mb-2 flex flex-col md:flex-row items-stretch md:items-center gap-3 sticky top-14 z-10 backdrop-blur-xl py-2.5 px-3 md:px-4 rounded-2xl transition-colors border border-white/60 dark:border-white/10 shadow-sm",je?"bg-black/25 dark:bg-black/30":"bg-white/65 dark:bg-white/[0.05]"),children:[p.jsxs("div",{className:"flex items-center gap-2 overflow-x-auto hide-scrollbar pb-1 md:pb-0",children:[p.jsx(te,{radius:"sm",color:"primary",size:"sm",isIconOnly:!0,variant:"flat",onPress:()=>Ce(".."),className:"text-lg min-w-8",children:p.jsx(Rs,{})}),p.jsx(te,{radius:"sm",color:"primary",size:"sm",isIconOnly:!0,variant:"flat",onPress:()=>m(!0),className:"text-lg min-w-8",children:p.jsx(Ll,{})}),p.jsx(te,{radius:"sm",color:"primary",isLoading:n,size:"sm",isIconOnly:!0,variant:"flat",onPress:U,className:"text-lg min-w-8",children:p.jsx(Hl,{})}),p.jsx(te,{radius:"sm",color:"primary",size:"sm",isIconOnly:!0,variant:"flat",onPress:()=>he(E=>!E),className:"text-lg min-w-8",children:p.jsx(di,{})}),(C instanceof Set&&C.size>0||C==="all")&&p.jsxs(p.Fragment,{children:[p.jsxs(te,{radius:"sm",color:"primary",size:"sm",variant:"flat",onPress:Z,className:"text-sm px-2 min-w-fit",startContent:p.jsx(Yl,{className:"text-lg"}),children:["(",C instanceof Set?C.size:e.length,")"]}),p.jsxs(te,{radius:"sm",color:"primary",size:"sm",variant:"flat",onPress:()=>{K(""),B(!0)},className:"text-sm px-2 min-w-fit",startContent:p.jsx(Ui,{className:"text-lg"}),children:["(",C instanceof Set?C.size:e.length,")"]}),p.jsxs(te,{radius:"sm",color:"primary",size:"sm",variant:"flat",onPress:ue,className:"text-sm px-2 min-w-fit",startContent:p.jsx(Yi,{className:"text-lg"}),children:["(",C instanceof Set?C.size:e.length,")"]})]})]}),p.jsxs("div",{className:"flex flex-col md:flex-row flex-1 gap-2 overflow-hidden items-stretch md:items-center",children:[p.jsx(Cl,{radius:"sm",className:"flex-1 bg-white/50 dark:bg-white/[0.05] backdrop-blur-md shadow-sm border border-white/60 dark:border-white/10 px-2 py-2 rounded-xl overflow-x-auto hide-scrollbar whitespace-nowrap",classNames:{list:"items-center"},children:(c.split("/").filter(Boolean).length>0?c.split("/").filter(Boolean):["根目录"]).map((E,P,y)=>p.jsx($l,{isCurrent:P===y.length-1,onPress:()=>{if(y[0]==="根目录")return;const A=y.slice(0,P+1).join("/");s(`/file_manager#${encodeURIComponent(A)}`)},children:E},`${E}-${P}`))}),p.jsx(Gn,{radius:"sm",type:"text",placeholder:"输入跳转路径",value:q,onChange:E=>F(E.target.value),onKeyDown:E=>{E.key==="Enter"&&q.trim()!==""&&s(`/file_manager#${encodeURIComponent(q.trim())}`)},className:"w-full md:w-64",classNames:{inputWrapper:"bg-white/70 dark:bg-white/[0.05] backdrop-blur-md border border-black/[0.08] dark:border-white/12"}})]})]}),p.jsx(Ar.div,{initial:{height:0},animate:{height:W?"auto":0},transition:{duration:.2},className:Fn("rounded-2xl text-center overflow-hidden transition-colors",me?"border-primary/60 bg-primary/[0.08]":"border-default-200/80 dark:border-white/10 bg-white/30 dark:bg-white/[0.02]",W?"mb-4 border-2 border-dashed":"border-0"),onDragOver:E=>{E.preventDefault(),E.stopPropagation()},children:p.jsxs("div",{...He(),className:"w-full h-full p-5 cursor-pointer hover:bg-white/50 dark:hover:bg-white/[0.05] transition-colors",children:[p.jsx("input",{...ce(),multiple:!0}),p.jsxs("div",{className:"flex flex-col items-center gap-2.5",children:[p.jsx("div",{className:"w-11 h-11 rounded-2xl bg-primary-500/10 text-primary-500 flex items-center justify-center",children:p.jsx(di,{className:"text-xl"})}),p.jsx("p",{className:"text-sm text-default-600",children:"拖拽文件到此处上传"}),p.jsx(te,{radius:"full",color:"primary",size:"sm",variant:"flat",onPress:Pe,children:"点击选择文件"})]})]})}),p.jsx(yc,{files:e,currentPath:c,loading:n,sortDescriptor:o,onSortChange:ke,selectedFiles:C,onSelectionChange:j,onDirectoryClick:Ce,onEdit:re,onPreview:Ne,onRenameRequest:E=>{S(E),x(E),g(!0)},onMoveRequest:ge,onCopyPath:J,onDelete:ne,onDownload:se}),p.jsx(Os,{isOpen:!!u,file:u,onClose:()=>d(null),onSave:ae,onContentChange:E=>d(P=>P?{...P,content:E??""}:null)}),p.jsx(Ks,{isOpen:!!N,filePath:N,onClose:()=>I("")}),p.jsx(Ts,{isOpen:f,fileType:b,newFileName:h,onTypeChange:k,onNameChange:E=>x(E.target.value),onClose:()=>m(!1),onCreate:oe}),p.jsx(kc,{isOpen:D,newFileName:h,onNameChange:E=>x(E.target.value),onClose:()=>g(!1),onRename:Fe}),p.jsx(wc,{isOpen:z,moveTargetPath:$,selectionInfo:C instanceof Set&&C.size>0?`${C.size} 个项目`:R,onClose:()=>B(!1),onMove:()=>C instanceof Set&&C.size>0?L():xe(R),onSelect:E=>K(E)})]})}export{rd as default};
|