@unciatech/file-manager 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,27 +1,27 @@
1
- "use strict";var ui=Object.create;var na=Object.defineProperty,fi=Object.defineProperties,gi=Object.getOwnPropertyDescriptor,hi=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertyNames,Pa=Object.getOwnPropertySymbols,xi=Object.getPrototypeOf,ho=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable;var Wo=(e,t,a)=>t in e?na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,n=(e,t)=>{for(var a in t||(t={}))ho.call(t,a)&&Wo(e,a,t[a]);if(Pa)for(var a of Pa(t))Ko.call(t,a)&&Wo(e,a,t[a]);return e},d=(e,t)=>fi(e,hi(t));var g=(e,t)=>{var a={};for(var o in e)ho.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&Pa)for(var o of Pa(e))t.indexOf(o)<0&&Ko.call(e,o)&&(a[o]=e[o]);return a};var bi=(e,t)=>{for(var a in t)na(e,a,{get:t[a],enumerable:!0})},Yo=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of vi(t))!ho.call(e,r)&&r!==a&&na(e,r,{get:()=>t[r],enumerable:!(o=gi(t,r))||o.enumerable});return e};var ka=(e,t,a)=>(a=e!=null?ui(xi(e)):{},Yo(t||!e||!e.__esModule?na(a,"default",{value:e,enumerable:!0}):a,e)),wi=e=>Yo(na({},"__esModule",{value:!0}),e);var ji={};bi(ji,{FileManager:()=>Zn,FileManagerModal:()=>jn,FileManagerProvider:()=>ia,MockProvider:()=>go,useFileManager:()=>O});module.exports=wi(ji);var ke=require("react");var oe={PAGE:"page",MODAL:"modal"},Wi=Object.values(oe),X={IMAGE:"images",VIDEO:"videos",AUDIO:"audios",FILE:"files"},Ki=Object.values(X),Le={SINGLE:"single",MULTIPLE:"multiple"},Yi=Object.values(Le),Ci={GRID:"grid",LIST:"list"},qi=Object.values(Ci),vo={LOCAL:"local",REMOTE:"remote",YOUTUBE:"youtube",VIMEO:"vimeo"},Qi=Object.values(vo);var Qo=require("next/navigation"),Se=require("sonner");var xo=(e,t)=>{let a=[...e];return t.forEach(o=>{a.some(i=>i.id===o.id)?a=a.filter(i=>i.id!==o.id):a.push(o)}),a},qo=(e,t)=>{let a=[...e];return t.forEach(o=>{a.some(i=>i.id===o.id)?a=a.filter(i=>i.id!==o.id):a.push(o)}),a};function Jo(e){let{mode:t,selectionMode:a,files:o,folders:r,selectedFiles:i,selectedFolders:l,currentFolder:c,setSelectedFiles:s,setSelectedFolders:f,setCurrentFolder:m,setFiles:b,setFolders:p,setPagination:y,loadData:w,isInSelectionMode:N,provider:M,onFilesSelected:D,onClose:z,basePath:T,setIsLoading:h,setFileDetailsModalFile:I}=e,Y=(0,Qo.useRouter)(),te=(0,ke.useCallback)((_,V,W=!1)=>{let K=[_];if(W||V&&(V.metaKey||V.ctrlKey)){s(q=>xo(q,K));return}if(N()&&t!==oe.MODAL){s(q=>xo(q,K));return}if(t===oe.MODAL){a==="single"?(s([_]),D==null||D([_]),z==null||z()):s(q=>xo(q,K));return}I(_)},[t,a,N,s,D,z,I]),se=(0,ke.useCallback)((_,V,W=!1)=>{let K=_?_.id:null;if((W||V&&(V.metaKey||V.ctrlKey))&&_){f(q=>qo(q,[_]));return}if(N()&&_){f(q=>qo(q,[_]));return}if(t===oe.PAGE){h(!0);let q=T!=null?T:"/media",Pe=K===null?q:`${q}/${K}`;Y.push(Pe)}else{h(!0),s([]),f([]);let q=new URLSearchParams(window.location.search);K===null?q.delete("folderId"):q.set("folderId",String(K)),q.set("page","1");let Pe=`${window.location.pathname}?${q.toString()}`;Y.push(Pe,{scroll:!1})}},[N,t,Y,f,s,T,h]),De=(0,ke.useCallback)(()=>{s([]),f([])},[s,f]),u=(0,ke.useCallback)(_=>{_?(s(o),f(t===oe.PAGE?r:[])):(s([]),f([]))},[o,r,t,s,f]),L=(0,ke.useCallback)(async(_=!1)=>{await w(_)},[w]),v=(0,ke.useCallback)(async _=>{var V;try{await M.uploadFiles(_,(V=c==null?void 0:c.id)!=null?V:null),await L(!0),s([]),Se.toast.success("Upload Successful",{description:`${_.length} file(s) uploaded successfully`})}catch(W){let K=W instanceof Error?W.message:"Failed to upload files";Se.toast.error("Upload Failed",{description:K}),console.error("Upload failed:",W)}},[c,M,L,s]),G=(0,ke.useCallback)(async _=>{var V;try{await M.createFolder(_,(V=c==null?void 0:c.id)!=null?V:null),await L(!0),s([]),Se.toast.success("Folder Created",{description:`Folder "${_}" created successfully`})}catch(W){let K=W instanceof Error?W.message:"Failed to create folder";Se.toast.error("Create Folder Failed",{description:K}),console.error("Failed to create folder:",W)}},[c,M,L,s]),B=(0,ke.useCallback)(async _=>{try{i.length>0&&await M.moveFiles(i.map(W=>W.id),_),l.length>0&&await M.moveFolders(l.map(W=>W.id),_),await L(!0),s([]),f([]);let V=i.length+l.length;Se.toast.success("Move Successful",{description:`${V} item(s) moved successfully`})}catch(V){let W=V instanceof Error?V.message:"Failed to move items";Se.toast.error("Move Failed",{description:W}),console.error("Failed to move items:",V)}},[i,l,M,L,s,f]),$=(0,ke.useCallback)(async(_,V)=>{try{p(W=>W.map(K=>K.id===_?d(n({},K),{name:V}):K)),await M.renameFolder(_,V),await L(!0),Se.toast.success("Folder Renamed",{description:`Folder renamed to "${V}"`})}catch(W){let K=W instanceof Error?W.message:"Failed to rename folder";Se.toast.error("Rename Failed",{description:K}),console.error("Failed to rename folder:",W)}},[M,L]),we=(0,ke.useCallback)(async(_,V)=>{try{b(W=>W.map(K=>{if(K.id===_){let Ye=V,{metaData:q}=Ye,Pe=g(Ye,["metaData"]);return d(n(n({},K),Pe),{metaData:q?n(n({},K.metaData),q):K.metaData})}return K})),await M.updateFileMetaData(_,V),await L(!0)}catch(W){let K=W instanceof Error?W.message:"Failed to update metadata";Se.toast.error("Update Failed",{description:K}),console.error("Failed to update metadata:",W)}},[M,L]),Vt=(0,ke.useCallback)(async()=>{try{i.length>0&&await M.deleteFiles(i.map(V=>V.id)),l.length>0&&await M.deleteFolders(l.map(V=>V.id)),await L(!0),s([]),f([]);let _=i.length+l.length;Se.toast.success("Delete Successful",{description:`${_} item(s) deleted successfully`})}catch(_){let V=_ instanceof Error?_.message:"Failed to delete items";Se.toast.error("Delete Failed",{description:V}),console.error("Failed to delete items:",_)}},[i,l,M,L,s,f]);return{handleFileClick:te,handleFolderClick:se,handleClearSelection:De,handleSelectAllGlobal:u,uploadFiles:v,createFolder:G,bulkMove:B,renameFolder:$,updateFileMetadata:we,bulkDelete:Vt,refreshData:L}}var rt=require("next/navigation"),U=require("react"),Sa=require("sonner");function Xo(e){let{mode:t,selectionMode:a,initialFolderId:o,acceptedFileTypesForModal:r,allowedFileTypes:i,provider:l,onFilesSelected:c,onClose:s,basePath:f}=e,m=(0,rt.useParams)(),b=(0,rt.useSearchParams)(),p=(0,rt.useRouter)(),y=(0,rt.usePathname)(),w=Math.max(1,parseInt(b.get("page")||"1",10)),N=Math.max(1,parseInt(b.get("limit")||"24",10)),M=b.get("query")||"",D=(0,U.useMemo)(()=>{if(t===oe.PAGE&&(m!=null&&m.path)){let j=Array.isArray(m.path)?m.path[0]:m.path;return typeof j=="string"&&/^\d+$/.test(j)?Number(j):null}if(t===oe.MODAL){let j=b.get("folderId");if(j&&/^\d+$/.test(j))return Number(j)}return o!=null?o:null},[t,m,b,o]),[z,T]=(0,U.useState)([]),[h,I]=(0,U.useState)([]),[Y,te]=(0,U.useState)([]),[se,De]=(0,U.useState)([]),[u,L]=(0,U.useState)(null),[v,G]=(0,U.useState)(!0),[B,$]=(0,U.useState)({currentPage:w,totalPages:1,totalFiles:0,filesPerPage:N}),we=(0,U.useRef)(null);we.current=u;let[Vt,_]=(0,U.useState)(M),[V,W]=(0,U.useState)(M);(0,U.useEffect)(()=>{let j=setTimeout(()=>{W(Vt)},300);return()=>clearTimeout(j)},[Vt]);let K=(0,U.useRef)(D),Ye=(0,U.useCallback)((j,ue)=>{let fe=new URLSearchParams(b.toString());fe.set("page",j.toString()),fe.set("limit",ue.toString()),p.push(`${y}?${fe.toString()}`,{scroll:!1})},[p,y]);(0,U.useEffect)(()=>{$(j=>d(n({},j),{currentPage:w,filesPerPage:N})),_(M)},[w,N,M]),(0,U.useEffect)(()=>{D!==K.current&&(t===oe.PAGE&&Ye(1,N),K.current=D)},[D,N,Ye,t]);let q=B.currentPage,Pe=B.filesPerPage;(0,U.useEffect)(()=>{let j=!1,ue=async()=>{if(D&&(!we.current||we.current.id!==D))try{G(!0);let ge=await l.getFolder(D);if(j)return;L(ge),await fe(ge)}catch(ge){let Ia=ge instanceof Error?ge.message:"Failed to load folder";if(Sa.toast.error("Load Folder Failed",{description:Ia}),console.error("Failed to fetch current folder",ge),j)return;L(null),j||G(!1)}else D===null&&we.current!==null?(L(null),await fe(null)):we.current?await fe(we.current):await fe(null)},fe=async ge=>{var Ia;if(!j){G(!0);try{let It=[];t===oe.MODAL?It=r:It=i;let ra=await l.getItems((Ia=ge==null?void 0:ge.id)!=null?Ia:null,It,q,Pe,V);if(j)return;I(ra.folders),T(ra.files),$(ra.pagination)}catch(It){let ra=It instanceof Error?It.message:"Failed to load data";Sa.toast.error("Load Data Failed",{description:ra}),console.error("Failed to load data:",It)}finally{j||G(!1)}}};return ue(),()=>{j=!0}},[D,l,t,r,i,q,Pe,V]),(0,U.useEffect)(()=>{De([]),te([])},[u]);let[Wn,Kn]=(0,U.useState)(!1),[Yn,qn]=(0,U.useState)(!1),[Qn,Jn]=(0,U.useState)(!1),[Xn,ei]=(0,U.useState)(!1),[ti,ai]=(0,U.useState)(!1),[oi,ri]=(0,U.useState)(null),[ni,ii]=(0,U.useState)(null),li=(0,U.useCallback)(async(j=!1)=>{var ue;j||G(!0);try{let fe=[];t===oe.MODAL?fe=r:fe=i;let ge=await l.getItems((ue=u==null?void 0:u.id)!=null?ue:null,fe,q,Pe,V);I(ge.folders),T(ge.files),$(ge.pagination)}catch(fe){let ge=fe instanceof Error?fe.message:"Failed to load data";Sa.toast.error("Load Data Failed",{description:ge}),console.error("Failed to load data:",fe)}finally{j||G(!1)}},[u,t,r,i,l,q,Pe,V]),si=()=>Y.length>0||se.length>0,di=()=>u,ci=(0,U.useMemo)(()=>()=>{let j=z.length+(t===oe.PAGE?h.length:0),ue=Y.length+se.length;return ue===0?!1:ue===j?!0:"indeterminate"},[z.length,h.length,Y.length,se.length,t]),pi=(0,U.useCallback)(j=>{$(ue=>d(n({},ue),{currentPage:j})),t===oe.PAGE&&Ye(j,Pe)},[Ye,Pe,t]),mi=(0,U.useCallback)(j=>{_(j);let ue=new URLSearchParams(b.toString());j.trim()?(ue.set("query",j),ue.set("page","1")):ue.delete("query"),p.push(`${y}?${ue.toString()}`,{scroll:!1})},[p,y,b]);return{files:z,folders:h,selectedFiles:Y,selectedFolders:se,currentFolder:u,isLoading:v,pagination:B,isUploadModalOpen:Wn,isCreateFolderModalOpen:Yn,isSearchModalOpen:Qn,isMoveFileModalOpen:Xn,isRenameFolderModalOpen:ti,fileDetailsModalFile:ni,folderToRename:oi,setFiles:T,setFolders:I,setSelectedFiles:te,setSelectedFolders:De,setCurrentFolder:L,setPagination:$,setIsUploadModalOpen:Kn,setIsCreateFolderModalOpen:qn,setIsSearchModalOpen:Jn,setIsMoveFileModalOpen:ei,setIsRenameFolderModalOpen:ai,setFileDetailsModalFile:ii,setFolderToRename:ri,loadData:li,setIsLoading:G,isInSelectionMode:si,getCurrentFolder:di,getSelectionState:ci,handlePageChange:pi,searchQuery:Vt,updateSearchQuery:mi,mode:t,selectionMode:a,acceptedFileTypesForModal:r,provider:l,onFilesSelected:c,onClose:s,basePath:f}}var Ot=require("react"),tr=require("react/jsx-runtime"),er=(0,Ot.createContext)(void 0);function ia({children:e,mode:t=oe.PAGE,selectionMode:a=Le.SINGLE,allowedFileTypes:o,onFilesSelected:r,onClose:i,acceptedFileTypesForModal:l,initialFolderId:c=null,provider:s,basePath:f="/media",maxUploadFiles:m=50,maxUploadSize:b=100*1024*1024}){let p=Xo({mode:t,selectionMode:a,initialFolderId:c,acceptedFileTypesForModal:l,allowedFileTypes:o,provider:s,onFilesSelected:r,onClose:i,basePath:f}),y=Jo(p),w=(0,Ot.useMemo)(()=>({files:p.files,folders:p.folders,selectedFiles:p.selectedFiles,selectedFolders:p.selectedFolders,currentFolder:p.currentFolder,isLoading:p.isLoading,pagination:p.pagination,isUploadModalOpen:p.isUploadModalOpen,isCreateFolderModalOpen:p.isCreateFolderModalOpen,isSearchModalOpen:p.isSearchModalOpen,isMoveFileModalOpen:p.isMoveFileModalOpen,isRenameFolderModalOpen:p.isRenameFolderModalOpen,fileDetailsModalFile:p.fileDetailsModalFile,folderToRename:p.folderToRename,mode:p.mode,selectionMode:p.selectionMode,allowedFileTypes:o,acceptedFileTypesForModal:p.acceptedFileTypesForModal,maxUploadFiles:m,maxUploadSize:b,setIsUploadModalOpen:p.setIsUploadModalOpen,setIsCreateFolderModalOpen:p.setIsCreateFolderModalOpen,setIsSearchModalOpen:p.setIsSearchModalOpen,setIsMoveFileModalOpen:p.setIsMoveFileModalOpen,setSelectedFiles:p.setSelectedFiles,setSelectedFolders:p.setSelectedFolders,setIsRenameFolderModalOpen:p.setIsRenameFolderModalOpen,setFileDetailsModalFile:p.setFileDetailsModalFile,setFolderToRename:p.setFolderToRename,handleFileClick:y.handleFileClick,handleFolderClick:y.handleFolderClick,handleClearSelection:y.handleClearSelection,handleSelectAllGlobal:y.handleSelectAllGlobal,handlePageChange:p.handlePageChange,searchQuery:p.searchQuery,updateSearchQuery:p.updateSearchQuery,uploadFiles:y.uploadFiles,createFolder:y.createFolder,bulkMove:y.bulkMove,renameFolder:y.renameFolder,updateFileMetadata:y.updateFileMetadata,bulkDelete:y.bulkDelete,refreshData:y.refreshData,isInSelectionMode:p.isInSelectionMode,getCurrentFolder:p.getCurrentFolder,getSelectionState:p.getSelectionState,onClose:p.onClose,onFilesSelected:p.onFilesSelected,provider:s,basePath:p.basePath}),[p,y,s,o,m,b]);return(0,tr.jsx)(er.Provider,{value:w,children:e})}function O(){let e=(0,Ot.useContext)(er);if(e===void 0)throw new Error("useFileManager must be used within a FileManagerProvider");return e}var ar=require("clsx"),or=require("tailwind-merge");function x(...e){return(0,or.twMerge)((0,ar.clsx)(e))}var rr=require("lucide-react");var nt=require("react/jsx-runtime"),nr=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return(0,nt.jsx)("nav",n({"data-slot":"pagination",role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e)},t))};function ir(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,nt.jsx)("ul",n({"data-slot":"pagination-content",className:x("flex flex-row items-center gap-1",e)},t))}function la(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,nt.jsx)("li",n({"data-slot":"pagination-item",className:x("",e)},t))}var lr=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return(0,nt.jsxs)("span",d(n({"data-slot":"pagination-ellipsis","aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e)},t),{children:[(0,nt.jsx)(rr.MoreHorizontal,{className:"h-4 w-4"}),(0,nt.jsx)("span",{className:"sr-only",children:"More pages"})]}))};var sr=require("class-variance-authority"),yi=require("lucide-react"),dr=require("radix-ui");var cr=require("react/jsx-runtime"),Fi=(0,sr.cva)("cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",mono:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",outline:"bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",dashed:"text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",ghost:"text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",dim:"text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",foreground:"",inverse:""},appearance:{default:"",ghost:""},underline:{solid:"",dashed:""},underlined:{solid:"",dashed:""},size:{lg:"h-10 px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",md:"h-9 px-3 gap-1.5 text-sm [&_svg:not([class*=size-])]:size-4",sm:"h-8 px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",xs:"h-7 px-2 gap-1 text-xs [&_svg:not([class*=size-])]:size-3.5",icon:"size-9 [&_svg:not([class*=size-])]:size-4 shrink-0"},autoHeight:{true:"",false:""},radius:{md:"rounded-md",full:"rounded-full"},mode:{default:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",icon:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",link:"text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",input:`
2
- justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background
3
- focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30
4
- [[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px]
5
- [[data-state=open]>&]:ring-ring/30
6
- aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
7
- in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10 dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
8
- `},placeholder:{true:"text-muted-foreground",false:""}},compoundVariants:[{variant:"ghost",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"dashed",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"secondary",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"input",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"icon",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{size:"xs",autoHeight:!0,className:"h-auto min-h-7"},{size:"md",autoHeight:!0,className:"h-auto min-h-9"},{size:"sm",autoHeight:!0,className:"h-auto min-h-8"},{size:"lg",autoHeight:!0,className:"h-auto min-h-10"},{variant:"primary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"link",underline:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"primary",mode:"link",underline:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"primary",mode:"link",underlined:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"primary",mode:"link",underlined:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underline:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"inverse",mode:"link",underline:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underlined:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"inverse",mode:"link",underlined:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underline:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"foreground",mode:"link",underline:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underlined:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"foreground",mode:"link",underlined:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"primary",appearance:"ghost",className:"bg-transparent text-primary/90 hover:bg-primary/5 data-[state=open]:bg-primary/5"},{variant:"destructive",appearance:"ghost",className:"bg-transparent text-destructive/90 hover:bg-destructive/5 data-[state=open]:bg-destructive/5"},{variant:"ghost",mode:"icon",className:"text-muted-foreground"},{size:"xs",mode:"icon",className:"w-7 h-7 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"sm",mode:"icon",className:"w-8 h-8 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"md",mode:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"lg",mode:"icon",className:"w-10 h-10 p-0 [&_svg:not([class*=size-])]:size-4"},{mode:"input",placeholder:!0,variant:"outline",className:"font-normal text-muted-foreground"},{mode:"input",variant:"outline",size:"sm",className:"gap-1.25"},{mode:"input",variant:"outline",size:"md",className:"gap-1.5"},{mode:"input",variant:"outline",size:"lg",className:"gap-1.5"}],defaultVariants:{variant:"primary",mode:"default",size:"md",radius:"md",appearance:"default"}});function C(y){var w=y,{className:e,selected:t,variant:a,radius:o,appearance:r,mode:i,size:l,autoHeight:c,underlined:s,underline:f,asChild:m=!1,placeholder:b=!1}=w,p=g(w,["className","selected","variant","radius","appearance","mode","size","autoHeight","underlined","underline","asChild","placeholder"]);let N=m?dr.Slot.Slot:"button";return(0,cr.jsx)(N,n(n({"data-slot":"button",className:x(Fi({variant:a,size:l,radius:o,appearance:r,mode:i,autoHeight:c,placeholder:b,underlined:s,underline:f,className:e}),m&&p.disabled&&"pointer-events-none opacity-50")},t&&{"data-state":"open"}),p))}var bo=require("react/jsx-runtime");function za(e){return(0,bo.jsx)("svg",d(n({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,bo.jsx)("path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"#141B34",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}var wo=require("react/jsx-runtime");function Gt(e){return(0,wo.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:(0,wo.jsx)("path",{fill:"currentColor",d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z"})}))}var de=require("react/jsx-runtime");function Mi(e,t){let a=[];if(t<=7)for(let o=1;o<=t;o++)a.push(o);else e<=4?a.push(1,2,3,4,5,"ellipsis",t):e>=t-3?a.push(1,"ellipsis",t-4,t-3,t-2,t-1,t):a.push(1,"ellipsis",e-1,e,e+1,"ellipsis",t);return a}function pr({className:e}){let{pagination:t,handlePageChange:a,files:o,folders:r}=O(),{currentPage:i,totalPages:l}=t,c=((o==null?void 0:o.length)||0)+((r==null?void 0:r.length)||0);if(l<=1||c===0)return null;let s=Mi(i,l);return(0,de.jsx)(nr,{className:e,children:(0,de.jsxs)(ir,{children:[(0,de.jsx)(la,{children:(0,de.jsx)(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===1,onClick:()=>i>1&&a(i-1),children:(0,de.jsxs)("span",{children:[(0,de.jsx)(Gt,{className:"rtl:rotate-180"})," Previous"]})})}),s.map((f,m)=>f==="ellipsis"?(0,de.jsx)(la,{children:(0,de.jsx)(lr,{})},`ellipsis-${i}-${l}-${m}`):(0,de.jsx)(la,{children:(0,de.jsx)(C,{variant:f===i?"outline":"ghost",mode:"icon",size:"icon",radius:"full",asChild:!0,onClick:()=>a(f),disabled:f===i,children:(0,de.jsx)("span",{children:f})})},f)),(0,de.jsx)(la,{children:(0,de.jsx)(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===l,onClick:()=>i<l&&a(i+1),children:(0,de.jsxs)("span",{children:["Next ",(0,de.jsx)(za,{className:"rtl:rotate-180"})]})})})]})})}var ur=require("react/jsx-runtime");function mr({children:e,className:t}){return(0,ur.jsx)("div",{className:x("p-4 flex md:flex-row gap-2",t),children:e})}var Ur=require("react");var fr=require("class-variance-authority"),gr=require("lucide-react"),it=require("radix-ui");var he=require("react/jsx-runtime"),Di=(0,fr.cva)("flex flex-col fixed outline-0 z-50 border border-border bg-background p-6 shadow-lg shadow-black/5 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-2xl",{variants:{variant:{default:"left-[50%] top-[50%] max-w-lg translate-x-[-50%] translate-y-[-50%] w-full",fullscreen:"inset-5"}},defaultVariants:{variant:"default"}});function ze(t){var e=g(t,[]);return(0,he.jsx)(it.Dialog.Root,n({"data-slot":"dialog"},e))}function Ni(t){var e=g(t,[]);return(0,he.jsx)(it.Dialog.Portal,n({"data-slot":"dialog-portal"},e))}function qe(t){var e=g(t,[]);return(0,he.jsx)(it.Dialog.Close,n({"data-slot":"dialog-close"},e))}function Ii(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,he.jsx)(it.Dialog.Overlay,n({"data-slot":"dialog-overlay",className:x("fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t))}function Te(l){var c=l,{className:e,children:t,showCloseButton:a=!0,overlay:o=!0,variant:r}=c,i=g(c,["className","children","showCloseButton","overlay","variant"]);return(0,he.jsxs)(Ni,{children:[o&&(0,he.jsx)(Ii,{}),(0,he.jsxs)(it.Dialog.Content,d(n({"data-slot":"dialog-content",className:x(Di({variant:r}),e)},i),{children:[t,a&&(0,he.jsxs)(qe,{className:"cursor-pointer outline-0 absolute end-5 top-5 rounded-full opacity-60 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,he.jsx)(gr.X,{className:"size-4"}),(0,he.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})}var Be=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return(0,he.jsx)("div",n({"data-slot":"dialog-header",className:x("flex flex-col space-y-1 text-center sm:text-start mb-5",e)},t))},He=a=>{var o=a,{className:e}=o,t=g(o,["className"]);return(0,he.jsx)("div",n({"data-slot":"dialog-footer",className:x("flex flex-col-reverse sm:flex-row sm:justify-end pt-5 sm:space-x-2.5",e)},t))};function Re(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,he.jsx)(it.Dialog.Title,n({"data-slot":"dialog-title",className:x("text-lg font-semibold leading-none tracking-tight",e)},t))}function lt(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,he.jsx)(it.Dialog.Description,n({"data-slot":"dialog-description",className:x("text-sm text-muted-foreground",e)},t))}var hr=require("class-variance-authority"),vr=require("lucide-react");var Qe=require("react/jsx-runtime"),Pi=(0,hr.cva)("flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",{variants:{variant:{secondary:"",primary:"",destructive:"",success:"",info:"",mono:"",warning:""},icon:{primary:"",destructive:"",success:"",info:"",warning:""},appearance:{solid:"",outline:"",light:"",stroke:"text-foreground"},size:{lg:"rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 *:data-slot=alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-1",md:"rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 *:data-slot=alert-icon:mt-0 [&_[data-slot=alert-close]]:mt-0.5",sm:"rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 *:data-alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"}},compoundVariants:[{variant:"secondary",appearance:"solid",className:"bg-muted text-foreground"},{variant:"primary",appearance:"solid",className:"bg-primary text-primary-foreground"},{variant:"destructive",appearance:"solid",className:"bg-destructive text-destructive-foreground"},{variant:"success",appearance:"solid",className:"bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"},{variant:"info",appearance:"solid",className:"bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"},{variant:"warning",appearance:"solid",className:"bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"},{variant:"mono",appearance:"solid",className:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"},{variant:"secondary",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"primary",appearance:"outline",className:"border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"},{variant:"destructive",appearance:"outline",className:"border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"},{variant:"success",appearance:"outline",className:"border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"info",appearance:"outline",className:"border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"warning",appearance:"outline",className:"border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"mono",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"secondary",appearance:"light",className:"bg-muted border border-border text-foreground"},{variant:"primary",appearance:"light",className:"text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"},{variant:"destructive",appearance:"light",className:"bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "},{variant:"success",appearance:"light",className:"bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"},{variant:"info",appearance:"light",className:"bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"},{variant:"warning",appearance:"light",className:"bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"},{variant:"mono",icon:"primary",className:"[&_[data-slot=alert-icon]]:text-primary"},{variant:"mono",icon:"warning",className:"[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"},{variant:"mono",icon:"success",className:"[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"},{variant:"mono",icon:"destructive",className:"[&_[data-slot=alert-icon]]:text-destructive"},{variant:"mono",icon:"info",className:"[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"}],defaultVariants:{variant:"secondary",appearance:"solid",size:"md"}});function xr(f){var m=f,{className:e,variant:t,size:a,icon:o,appearance:r,close:i=!1,onClose:l,children:c}=m,s=g(m,["className","variant","size","icon","appearance","close","onClose","children"]);return(0,Qe.jsxs)("div",d(n({"data-slot":"alert",role:"alert",className:x(Pi({variant:t,size:a,icon:o,appearance:r}),e)},s),{children:[c,i&&(0,Qe.jsx)("button",{onClick:l,"aria-label":"Dismiss","data-slot":"alert-close",className:x("group shrink-0 size-4 cursor-pointer"),children:(0,Qe.jsx)(vr.X,{className:"opacity-60 group-hover:opacity-100 size-4"})})]}))}function br(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Qe.jsx)("div",n({"data-slot":"alert-title",className:x("grow tracking-tight",e)},t))}function wr(o){var r=o,{children:e,className:t}=r,a=g(r,["children","className"]);return(0,Qe.jsx)("div",d(n({"data-slot":"alert-icon",className:x("shrink-0",t)},a),{children:e}))}function Cr(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Qe.jsx)("div",n({"data-slot":"alert-description",className:x("text-sm [&_p]:leading-relaxed [&_p]:mb-2",e)},t))}function yr(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Qe.jsx)("div",n({"data-slot":"alert-content",className:x("space-y-2 [&_[data-slot=alert-title]]:font-semibold",e)},t))}var Ee=ka(require("@radix-ui/react-tooltip"));var Je=require("react/jsx-runtime");function ki(a){var o=a,{delayDuration:e=0}=o,t=g(o,["delayDuration"]);return(0,Je.jsx)(Ee.Provider,n({"data-slot":"tooltip-provider",delayDuration:e},t))}function Fr(t){var e=g(t,[]);return(0,Je.jsx)(ki,{children:(0,Je.jsx)(Ee.Root,n({"data-slot":"tooltip"},e))})}function Mr(t){var e=g(t,[]);return(0,Je.jsx)(Ee.Trigger,n({"data-slot":"tooltip-trigger"},e))}function Dr(r){var i=r,{className:e,sideOffset:t=0,children:a}=i,o=g(i,["className","sideOffset","children"]);return(0,Je.jsx)(Ee.Portal,{children:(0,Je.jsxs)(Ee.Content,d(n({"data-slot":"tooltip-content",sideOffset:t,className:x("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e)},o),{children:[a,(0,Je.jsx)(Ee.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})}function le(e){if(e===0)return"0 Bytes";let t=1024,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(t));return Number.parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+a[o]}var re=require("react");var Nr=(e={})=>{let{maxFiles:t=Number.POSITIVE_INFINITY,maxSize:a=Number.POSITIVE_INFINITY,accept:o="*",multiple:r=!1,initialFiles:i=[],onFilesChange:l,onFilesAdded:c,onError:s}=e,[f,m]=(0,re.useState)({files:i.map(u=>({file:u,id:u.id,preview:u.url})),isDragging:!1,errors:[]}),b=(0,re.useRef)(null);(0,re.useEffect)(()=>()=>{f.files.forEach(u=>{u.preview&&u.file instanceof File&&URL.revokeObjectURL(u.preview)})},[f.files]);let p=(0,re.useCallback)(u=>{if(u instanceof File){if(u.size>a)return`File "${u.name}" exceeds the maximum size of ${le(a)}.`}else if(u.size>a)return`File "${u.name}" exceeds the maximum size of ${le(a)}.`;if(o!=="*"){let L=o.split(",").map($=>$.trim()),v=u instanceof File?u.type||"":u.type,G=`.${u instanceof File,u.name.split(".").pop()}`;if(!L.some($=>{if($.startsWith("."))return G.toLowerCase()===$.toLowerCase();if($.endsWith("/*")){let we=$.split("/")[0];return v.startsWith(`${we}/`)}return v===$}))return`File "${u instanceof File,u.name}" is not an accepted file type.`}return null},[o,a]),y=(0,re.useCallback)(u=>u instanceof File?URL.createObjectURL(u):u.url,[]),w=(0,re.useCallback)(u=>u instanceof File?`${u.name}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`:u.id.toString(),[]),N=(0,re.useCallback)(()=>{m(u=>{for(let v of u.files)v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);b.current&&(b.current.value="");let L=d(n({},u),{files:[],errors:[]});return l==null||l(L.files),L})},[l]),M=(0,re.useCallback)(u=>{if(!u||u.length===0)return;let L=Array.from(u),v=[];m(G=>d(n({},G),{errors:[]})),r||N(),m(G=>{if(r&&t!==Number.POSITIVE_INFINITY&&G.files.length+L.length>t)return v.push(`You can only upload a maximum of ${t} files.`),s==null||s(v),d(n({},G),{errors:v});let B=[];for(let $ of L){if(r&&G.files.some(_=>_.file.name===$.name&&_.file.size===$.size))continue;if($.size>a){v.push(r?`Some files exceed the maximum size of ${le(a)}.`:`File exceeds the maximum size of ${le(a)}.`);continue}let we=p($);we?v.push(we):B.push({file:$,id:w($),preview:y($)})}if(B.length>0){c==null||c(B);let $=r?[...G.files,...B]:B;return l==null||l($),d(n({},G),{files:$,errors:v})}else if(v.length>0)return s==null||s(v),d(n({},G),{errors:v});return G}),b.current&&(b.current.value="")},[t,r,a,p,y,w,N,l,c,s]),D=(0,re.useCallback)(u=>{m(L=>{let v=L.files.find(B=>B.id===u);v&&v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);let G=L.files.filter(B=>B.id!==u);return l==null||l(G),d(n({},L),{files:G,errors:[]})})},[l]),z=(0,re.useCallback)(()=>{m(u=>d(n({},u),{errors:[]}))},[]),T=(0,re.useCallback)(u=>{u.preventDefault(),u.stopPropagation(),m(L=>d(n({},L),{isDragging:!0}))},[]),h=(0,re.useCallback)(u=>{u.preventDefault(),u.stopPropagation(),!u.currentTarget.contains(u.relatedTarget)&&m(L=>d(n({},L),{isDragging:!1}))},[]),I=(0,re.useCallback)(u=>{u.preventDefault(),u.stopPropagation()},[]),Y=(0,re.useCallback)(u=>{var L;if(u.preventDefault(),u.stopPropagation(),m(v=>d(n({},v),{isDragging:!1})),!((L=b.current)!=null&&L.disabled)&&u.dataTransfer.files&&u.dataTransfer.files.length>0)if(r)M(u.dataTransfer.files);else{let v=u.dataTransfer.files[0];M([v])}},[M,r]),te=(0,re.useCallback)(u=>{u.target.files&&u.target.files.length>0&&M(u.target.files)},[M]),se=(0,re.useCallback)(()=>{b.current&&b.current.click()},[]),De=(0,re.useCallback)((u={})=>d(n({},u),{type:"file",onChange:te,accept:u.accept||o,multiple:u.multiple!==void 0?u.multiple:r,ref:b}),[o,r,te]);return[f,{addFiles:M,removeFile:D,clearFiles:N,clearErrors:z,handleDragEnter:T,handleDragLeave:h,handleDragOver:I,handleDrop:Y,handleFileChange:te,openFileDialog:se,getInputProps:De}]};var Qa=require("lucide-react");var Do=ka(require("mime"));var Bt=require("react/jsx-runtime");function Ta(e){return(0,Bt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[(0,Bt.jsx)("path",{fill:"#e5252a",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),(0,Bt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),(0,Bt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M5.79 29.86l0 -7.31 3.11 0c0.77,0 1.38,0.21 1.84,0.64 0.46,0.42 0.69,0.99 0.69,1.7 0,0.71 -0.23,1.28 -0.69,1.7 -0.46,0.43 -1.07,0.64 -1.84,0.64l-1.24 0 0 2.63 -1.87 0zm1.87 -4.22l1.03 0c0.28,0 0.5,-0.06 0.65,-0.2 0.15,-0.13 0.23,-0.31 0.23,-0.55 0,-0.24 -0.08,-0.42 -0.23,-0.55 -0.15,-0.14 -0.37,-0.2 -0.65,-0.2l-1.03 0 0 1.5zm4.54 4.22l0 -7.31 2.59 0c0.51,0 0.99,0.07 1.44,0.22 0.45,0.15 0.86,0.36 1.22,0.65 0.36,0.28 0.65,0.66 0.86,1.14 0.2,0.48 0.31,1.03 0.31,1.65 0,0.61 -0.11,1.16 -0.31,1.64 -0.21,0.48 -0.5,0.86 -0.86,1.14 -0.36,0.29 -0.77,0.5 -1.22,0.65 -0.45,0.15 -0.93,0.22 -1.44,0.22l-2.59 0zm1.83 -1.59l0.54 0c0.29,0 0.56,-0.03 0.81,-0.1 0.24,-0.07 0.47,-0.18 0.69,-0.33 0.21,-0.15 0.38,-0.36 0.5,-0.64 0.12,-0.28 0.18,-0.61 0.18,-0.99 0,-0.39 -0.06,-0.72 -0.18,-1 -0.12,-0.28 -0.29,-0.49 -0.5,-0.64 -0.22,-0.15 -0.45,-0.26 -0.69,-0.33 -0.25,-0.07 -0.52,-0.1 -0.81,-0.1l-0.54 0 0 4.13zm5.53 1.59l0 -7.31 5.2 0 0 1.59 -3.33 0 0 1.17 2.66 0 0 1.58 -2.66 0 0 2.97 -1.87 0z"})]}))}var Ht=require("react/jsx-runtime");function Ra(e){return(0,Ht.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[(0,Ht.jsx)("path",{fill:"#00733b",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),(0,Ht.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),(0,Ht.jsx)("path",{fill:"#fff",d:"M5.21 17.35l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 -6.08l3.15 0 0 1.18 -3.15 0 0 -1.18zm-4.12 0l3.14 0 0 1.18 -3.14 0 0 -1.18zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2.08l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19z"})]}))}var Ut=require("react/jsx-runtime");function Ea(e){return(0,Ut.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[(0,Ut.jsx)("path",{fill:"#e03303",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,Ut.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,Ut.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M11.76 16.13c-2.44,0.12 -4.38,2.15 -4.35,4.62 0.04,2.46 2.04,4.47 4.5,4.5 2.48,0.04 4.51,-1.9 4.62,-4.34 0.01,-0.12 -0.09,-0.22 -0.21,-0.22l-4.13 0c-0.12,0 -0.22,-0.1 -0.22,-0.21l0 -4.14c0,-0.12 -0.09,-0.21 -0.21,-0.21zm1.1 -0.67l0 4.13c0,0.12 0.09,0.21 0.21,0.21l4.14 0c0.12,0 0.21,-0.1 0.21,-0.22 -0.11,-2.34 -1.99,-4.22 -4.34,-4.33 -0.12,-0.01 -0.22,0.09 -0.22,0.21z"})]}))}var Zt=require("react/jsx-runtime");function Aa(e){return(0,Zt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 38.89 51.99",width:"100",height:"100"},e),{children:[(0,Zt.jsx)("path",{fill:"#0263d1",fillRule:"nonzero",d:"M6.76 0l17.4 0 14.73 15.36 0 29.87c0,3.73 -3.03,6.76 -6.77,6.76l-25.36 0c-3.73,0 -6.76,-3.03 -6.76,-6.76l0 -38.47c0,-3.73 3.03,-6.76 6.76,-6.76z"}),(0,Zt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"24.14 0 24.14 15.24 38.89 15.24"}),(0,Zt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M26.3 27.05l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm-4.57 13.71l-9.14 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l9.14 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm4.57 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm0 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0z"})]}))}var jt=require("react/jsx-runtime");function _a(e){return(0,jt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[(0,jt.jsx)("path",{fill:"#ffc000",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,jt.jsx)("polygon",{fill:"#ffffff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,jt.jsx)("path",{fill:"#ffffff",fillRule:"nonzero",d:"M16.45 21.21l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm0 2.86l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm-4.36 -8.57l-4.21 0c-0.4,0 -0.72,0.31 -0.72,0.71 0,0.4 0.32,0.71 0.72,0.71l4.21 0c0.4,0 0.72,-0.31 0.72,-0.71 0,-0.4 -0.32,-0.71 -0.72,-0.71l0 0zm4.36 2.85l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0z"})]}))}var Ve=require("react/jsx-runtime");function La(e){return(0,Ve.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:[(0,Ve.jsxs)("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1",x1:"37.127",x2:"25.868",y1:"6.873",y2:"18.132",gradientUnits:"userSpaceOnUse",children:[(0,Ve.jsx)("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),(0,Ve.jsx)("stop",{offset:".913",stopColor:"#262626",stopOpacity:".8"})]}),(0,Ve.jsx)("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1)",d:"M28,4v8c0,2.209,1.791,4,4,4h8L28,4z",children:" "}),(0,Ve.jsxs)("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2",x1:"-8.398",x2:"74.731",y1:"51.185",y2:"-18.568",gradientUnits:"userSpaceOnUse",children:[(0,Ve.jsx)("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),(0,Ve.jsx)("stop",{offset:"1",stopColor:"#262626",stopOpacity:".8"})]}),(0,Ve.jsx)("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2)",d:"M40,16v23c0,2.761-2.239,5-5,5H8V9c0-2.761,2.239-5,5-5h15L40,16z"})]}))}var $t=require("react/jsx-runtime");function Va(e){return(0,$t.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100","aria-hidden":"true"},e),{children:[(0,$t.jsx)("path",{fill:"#ffb11f",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,$t.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,$t.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M8.96 16.9l0 -2.22c0,-0.24 -0.19,-0.43 -0.43,-0.43l-1.2 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 2.22 -0.67 1.96c-0.19,0.55 -0.1,1.16 0.24,1.63 0.33,0.47 0.88,0.75 1.46,0.75 0.58,0 1.12,-0.28 1.46,-0.75 0.34,-0.47 0.43,-1.08 0.24,-1.63l-0.67 -1.96zm-0.28 3.08c-0.34,0.49 -1.16,0.49 -1.51,0 -0.17,-0.24 -0.22,-0.56 -0.12,-0.84l0.22 -0.66 1.31 0 0.23 0.66c0.09,0.28 0.05,0.6 -0.13,0.84zm-3.41 -17.65l0 1.22c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.82 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.94c0,0.24 0.19,0.44 0.43,0.44l1.63 0 0 1.81 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.95c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.38c0,0.24 0.2,0.43 0.44,0.43l2.39 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.23 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.24 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.2 0.43,-0.44l0 -0.94c0,-0.24 -0.2,-0.44 -0.43,-0.44l-1.64 0 0 -1.66c0,0 -3.25,0.01 -3.25,0.01z"})]}))}var Wt=require("react/jsx-runtime");function Oa(e){return(0,Wt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 20.49 27.4",width:"100",height:"100","aria-hidden":"true"},e),{children:[(0,Wt.jsx)("path",{fill:"#00a1e0",d:"M3.56 0l9.17 0 7.76 8.1 0 15.73c0,1.97 -1.59,3.57 -3.56,3.57l-13.37 0c-1.96,0 -3.56,-1.6 -3.56,-3.57l0 -20.27c0,-1.96 1.6,-3.56 3.56,-3.56z"}),(0,Wt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"12.72 0 12.72 8.03 20.49 8.03"}),(0,Wt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M12.07 20.44l-0.52 0 0 -0.99 0.11 0c0.26,0 0.39,-0.14 0.39,-0.42l0 -1.45c0,-0.23 0.06,-0.41 0.16,-0.53 0.11,-0.11 0.27,-0.21 0.48,-0.3 -0.2,-0.08 -0.36,-0.18 -0.47,-0.3 -0.11,-0.12 -0.17,-0.29 -0.17,-0.52l0 -1.45c0,-0.28 -0.13,-0.42 -0.39,-0.42l-0.11 0 0 -0.99 0.52 0c0.31,0 0.56,0.1 0.76,0.3 0.2,0.2 0.3,0.45 0.3,0.75l0 1.55c0,0.38 0.21,0.57 0.63,0.57l0 1.03c-0.42,0 -0.63,0.19 -0.63,0.58l0 1.54c0,0.3 -0.1,0.55 -0.3,0.75 -0.2,0.2 -0.45,0.3 -0.76,0.3zm-3.65 0c-0.3,0 -0.56,-0.1 -0.76,-0.3 -0.2,-0.2 -0.3,-0.45 -0.3,-0.75l0 -1.54c0,-0.39 -0.21,-0.58 -0.63,-0.58l0 -1.03c0.42,0 0.63,-0.19 0.63,-0.57l0 -1.55c0,-0.3 0.1,-0.55 0.3,-0.75 0.2,-0.2 0.46,-0.3 0.76,-0.3l0.53 0 0 0.99 -0.12 0c-0.26,0 -0.39,0.14 -0.39,0.42l0 1.45c0,0.23 -0.05,0.4 -0.16,0.52 -0.11,0.12 -0.27,0.22 -0.48,0.3 0.21,0.09 0.37,0.19 0.48,0.3 0.11,0.12 0.16,0.3 0.16,0.53l0 1.45c0,0.28 0.13,0.42 0.39,0.42l0.12 0 0 0.99 -0.53 0z"})]}))}var Kt=require("react/jsx-runtime");function Ga(e){return(0,Kt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[(0,Kt.jsx)("path",{fill:"#90c",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,Kt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,Kt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M15.07 21.38c0.31,-0.52 0.52,-1.18 0.56,-1.83 0.02,-0.42 -0.07,-0.86 -0.27,-1.27 -0.32,-0.65 -0.86,-1.01 -1.39,-1.37 -0.39,-0.26 -0.76,-0.51 -1.02,-0.86l-0.05 -0.06c-0.15,-0.21 -0.33,-0.45 -0.36,-0.65 -0.02,-0.2 -0.21,-0.34 -0.4,-0.33 -0.21,0.02 -0.36,0.18 -0.36,0.39l0 6.86c-0.32,-0.2 -0.72,-0.32 -1.16,-0.32 -1.06,0 -1.92,0.69 -1.92,1.54 0,0.85 0.86,1.54 1.92,1.54 1.06,0 1.93,-0.69 1.93,-1.54l0 -4.49c0.58,0.23 1.52,0.79 1.78,2.1 -0.05,0.07 -0.09,0.15 -0.15,0.21 -0.14,0.16 -0.12,0.4 0.04,0.55 0.16,0.14 0.4,0.12 0.54,-0.04 0.1,-0.12 0.2,-0.25 0.28,-0.4 0.01,-0.01 0.02,-0.02 0.03,-0.03z"})]}))}var J=require("react/jsx-runtime");function Ba(e){return(0,J.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[(0,J.jsx)("path",{fill:"#188a32",d:"M56,35v8c0,1.66-1.34,3-3,3H11c-1.66,0-3-1.34-3-3v-8c0-1.66,1.34-3,3-3h42C54.66,32,56,33.34,56,35z"}),(0,J.jsx)("path",{fill:"#0082AA",d:"M44,29v5c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3v-5h4v4h16v-4H44z"}),(0,J.jsx)("path",{fill:"#4d50c6",d:`M53,32H11c-1.657,0-3-1.343-3-3v-8c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
1
+ "use strict";var li=Object.create;var xo=Object.defineProperty,si=Object.defineProperties,di=Object.getOwnPropertyDescriptor,ci=Object.getOwnPropertyDescriptors,pi=Object.getOwnPropertyNames,Vo=Object.getOwnPropertySymbols,mi=Object.getPrototypeOf,Da=Object.prototype.hasOwnProperty,Xa=Object.prototype.propertyIsEnumerable;var Ja=(e,t,o)=>t in e?xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,r=(e,t)=>{for(var o in t||(t={}))Da.call(t,o)&&Ja(e,o,t[o]);if(Vo)for(var o of Vo(t))Xa.call(t,o)&&Ja(e,o,t[o]);return e},s=(e,t)=>si(e,ci(t));var g=(e,t)=>{var o={};for(var a in e)Da.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&Vo)for(var a of Vo(e))t.indexOf(a)<0&&Xa.call(e,a)&&(o[a]=e[a]);return o};var ui=(e,t)=>{for(var o in t)xo(e,o,{get:t[o],enumerable:!0})},er=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pi(t))!Da.call(e,n)&&n!==o&&xo(e,n,{get:()=>t[n],enumerable:!(a=di(t,n))||a.enumerable});return e};var Go=(e,t,o)=>(o=e!=null?li(mi(e)):{},er(t||!e||!e.__esModule?xo(o,"default",{value:e,enumerable:!0}):o,e)),fi=e=>er(xo({},"__esModule",{value:!0}),e);var Hi={};ui(Hi,{FileManager:()=>Vn,FileManagerModal:()=>Gn,FileManagerProvider:()=>bo,MockProvider:()=>Ma,useFileManager:()=>G});module.exports=fi(Hi);var ze=require("react");var ae={PAGE:"page",MODAL:"modal"},Ui=Object.values(ae),X={IMAGE:"images",VIDEO:"videos",AUDIO:"audios",FILE:"files"},ji=Object.values(X),Ve={SINGLE:"single",MULTIPLE:"multiple"},Wi=Object.values(Ve),gi={GRID:"grid",LIST:"list"},$i=Object.values(gi),Ia={LOCAL:"local",REMOTE:"remote",YOUTUBE:"youtube",VIMEO:"vimeo"},Ki=Object.values(Ia);var or=require("next/navigation"),Re=require("sonner");var Na=(e,t)=>{let o=[...e];return t.forEach(a=>{o.some(i=>i.id===a.id)?o=o.filter(i=>i.id!==a.id):o.push(a)}),o},tr=(e,t)=>{let o=[...e];return t.forEach(a=>{o.some(i=>i.id===a.id)?o=o.filter(i=>i.id!==a.id):o.push(a)}),o};function ar(e){let{mode:t,selectionMode:o,files:a,folders:n,selectedFiles:i,selectedFolders:l,currentFolder:c,setSelectedFiles:d,setSelectedFolders:f,setCurrentFolder:m,setFiles:b,setFolders:p,setPagination:y,loadData:w,isInSelectionMode:I,provider:M,onFilesSelected:D,onClose:z,basePath:R,setIsLoading:h,setFileDetailsModalFile:N}=e,Y=(0,or.useRouter)(),te=(0,ze.useCallback)((A,V,$=!1)=>{let K=[A];if($||V&&(V.metaKey||V.ctrlKey)){d(q=>Na(q,K));return}if(I()&&t!==ae.MODAL){d(q=>Na(q,K));return}if(t===ae.MODAL){o==="single"?(d([A]),D==null||D([A]),z==null||z()):d(q=>Na(q,K));return}N(A)},[t,o,I,d,D,z,N]),de=(0,ze.useCallback)((A,V,$=!1)=>{let K=A?A.id:null;if(($||V&&(V.metaKey||V.ctrlKey))&&A){f(q=>tr(q,[A]));return}if(I()&&A){f(q=>tr(q,[A]));return}if(t===ae.PAGE){h(!0);let q=R!=null?R:"/media",Se=K===null?q:`${q}/${K}`;Y.push(Se)}else{h(!0),d([]),f([]);let q=new URLSearchParams(window.location.search);K===null?q.delete("folderId"):q.set("folderId",String(K)),q.set("page","1");let Se=`${window.location.pathname}?${q.toString()}`;Y.push(Se,{scroll:!1})}},[I,t,Y,f,d,R,h]),Ne=(0,ze.useCallback)(()=>{d([]),f([])},[d,f]),u=(0,ze.useCallback)(A=>{A?(d(a),f(t===ae.PAGE?n:[])):(d([]),f([]))},[a,n,t,d,f]),_=(0,ze.useCallback)(async(A=!1)=>{await w(A)},[w]),v=(0,ze.useCallback)(async A=>{var V;try{await M.uploadFiles(A,(V=c==null?void 0:c.id)!=null?V:null),await _(!0),d([]),Re.toast.success("Upload Successful",{description:`${A.length} file(s) uploaded successfully`})}catch($){let K=$ instanceof Error?$.message:"Failed to upload files";Re.toast.error("Upload Failed",{description:K}),console.error("Upload failed:",$)}},[c,M,_,d]),O=(0,ze.useCallback)(async A=>{var V;try{await M.createFolder(A,(V=c==null?void 0:c.id)!=null?V:null),await _(!0),d([]),Re.toast.success("Folder Created",{description:`Folder "${A}" created successfully`})}catch($){let K=$ instanceof Error?$.message:"Failed to create folder";Re.toast.error("Create Folder Failed",{description:K}),console.error("Failed to create folder:",$)}},[c,M,_,d]),B=(0,ze.useCallback)(async A=>{try{i.length>0&&await M.moveFiles(i.map($=>$.id),A),l.length>0&&await M.moveFolders(l.map($=>$.id),A),await _(!0),d([]),f([]);let V=i.length+l.length;Re.toast.success("Move Successful",{description:`${V} item(s) moved successfully`})}catch(V){let $=V instanceof Error?V.message:"Failed to move items";Re.toast.error("Move Failed",{description:$}),console.error("Failed to move items:",V)}},[i,l,M,_,d,f]),W=(0,ze.useCallback)(async(A,V)=>{try{p($=>$.map(K=>K.id===A?s(r({},K),{name:V}):K)),await M.renameFolder(A,V),await _(!0),Re.toast.success("Folder Renamed",{description:`Folder renamed to "${V}"`})}catch($){let K=$ instanceof Error?$.message:"Failed to rename folder";Re.toast.error("Rename Failed",{description:K}),console.error("Failed to rename folder:",$)}},[M,_]),Ce=(0,ze.useCallback)(async(A,V)=>{try{b($=>$.map(K=>{if(K.id===A){let Qe=V,{metaData:q}=Qe,Se=g(Qe,["metaData"]);return s(r(r({},K),Se),{metaData:q?r(r({},K.metaData),q):K.metaData})}return K})),await M.updateFileMetaData(A,V),await _(!0)}catch($){let K=$ instanceof Error?$.message:"Failed to update metadata";Re.toast.error("Update Failed",{description:K}),console.error("Failed to update metadata:",$)}},[M,_]),Wt=(0,ze.useCallback)(async()=>{try{i.length>0&&await M.deleteFiles(i.map(V=>V.id)),l.length>0&&await M.deleteFolders(l.map(V=>V.id)),await _(!0),d([]),f([]);let A=i.length+l.length;Re.toast.success("Delete Successful",{description:`${A} item(s) deleted successfully`})}catch(A){let V=A instanceof Error?A.message:"Failed to delete items";Re.toast.error("Delete Failed",{description:V}),console.error("Failed to delete items:",A)}},[i,l,M,_,d,f]);return{handleFileClick:te,handleFolderClick:de,handleClearSelection:Ne,handleSelectAllGlobal:u,uploadFiles:v,createFolder:O,bulkMove:B,renameFolder:W,updateFileMetadata:Ce,bulkDelete:Wt,refreshData:_}}var st=require("next/navigation"),Z=require("react"),Oo=require("sonner");function rr(e){let{mode:t,selectionMode:o,initialFolderId:a,acceptedFileTypesForModal:n,allowedFileTypes:i,provider:l,onFilesSelected:c,onClose:d,basePath:f}=e,m=(0,st.useParams)(),b=(0,st.useSearchParams)(),p=(0,st.useRouter)(),y=(0,st.usePathname)(),w=Math.max(1,parseInt(b.get("page")||"1",10)),I=Math.max(1,parseInt(b.get("limit")||"24",10)),M=b.get("query")||"",D=(0,Z.useMemo)(()=>{if(t===ae.PAGE&&(m!=null&&m.path)){let j=Array.isArray(m.path)?m.path[0]:m.path;return typeof j=="string"&&/^\d+$/.test(j)?Number(j):null}if(t===ae.MODAL){let j=b.get("folderId");if(j&&/^\d+$/.test(j))return Number(j)}return a!=null?a:null},[t,m,b,a]),[z,R]=(0,Z.useState)([]),[h,N]=(0,Z.useState)([]),[Y,te]=(0,Z.useState)([]),[de,Ne]=(0,Z.useState)([]),[u,_]=(0,Z.useState)(null),[v,O]=(0,Z.useState)(!0),[B,W]=(0,Z.useState)({currentPage:w,totalPages:1,totalFiles:0,filesPerPage:I}),Ce=(0,Z.useRef)(null);Ce.current=u;let[Wt,A]=(0,Z.useState)(M),[V,$]=(0,Z.useState)(M);(0,Z.useEffect)(()=>{let j=setTimeout(()=>{$(Wt)},300);return()=>clearTimeout(j)},[Wt]);let K=(0,Z.useRef)(D),Qe=(0,Z.useCallback)((j,fe)=>{let ge=new URLSearchParams(b.toString());ge.set("page",j.toString()),ge.set("limit",fe.toString()),p.push(`${y}?${ge.toString()}`,{scroll:!1})},[p,y]);(0,Z.useEffect)(()=>{W(j=>s(r({},j),{currentPage:w,filesPerPage:I})),A(M)},[w,I,M]),(0,Z.useEffect)(()=>{D!==K.current&&(t===ae.PAGE&&Qe(1,I),K.current=D)},[D,I,Qe,t]);let q=B.currentPage,Se=B.filesPerPage;(0,Z.useEffect)(()=>{let j=!1,fe=async()=>{if(D&&(!Ce.current||Ce.current.id!==D))try{O(!0);let he=await l.getFolder(D);if(j)return;_(he),await ge(he)}catch(he){let _o=he instanceof Error?he.message:"Failed to load folder";if(Oo.toast.error("Load Folder Failed",{description:_o}),console.error("Failed to fetch current folder",he),j)return;_(null),j||O(!1)}else D===null&&Ce.current!==null?(_(null),await ge(null)):Ce.current?await ge(Ce.current):await ge(null)},ge=async he=>{var _o;if(!j){O(!0);try{let Rt=[];t===ae.MODAL?Rt=n:Rt=i;let vo=await l.getItems((_o=he==null?void 0:he.id)!=null?_o:null,Rt,q,Se,V);if(j)return;N(vo.folders),R(vo.files),W(vo.pagination)}catch(Rt){let vo=Rt instanceof Error?Rt.message:"Failed to load data";Oo.toast.error("Load Data Failed",{description:vo}),console.error("Failed to load data:",Rt)}finally{j||O(!1)}}};return fe(),()=>{j=!0}},[D,l,t,n,i,q,Se,V]),(0,Z.useEffect)(()=>{Ne([]),te([])},[u]);let[Bn,Hn]=(0,Z.useState)(!1),[Zn,Un]=(0,Z.useState)(!1),[jn,Wn]=(0,Z.useState)(!1),[$n,Kn]=(0,Z.useState)(!1),[Yn,qn]=(0,Z.useState)(!1),[Qn,Jn]=(0,Z.useState)(null),[Xn,ei]=(0,Z.useState)(null),ti=(0,Z.useCallback)(async(j=!1)=>{var fe;j||O(!0);try{let ge=[];t===ae.MODAL?ge=n:ge=i;let he=await l.getItems((fe=u==null?void 0:u.id)!=null?fe:null,ge,q,Se,V);N(he.folders),R(he.files),W(he.pagination)}catch(ge){let he=ge instanceof Error?ge.message:"Failed to load data";Oo.toast.error("Load Data Failed",{description:he}),console.error("Failed to load data:",ge)}finally{j||O(!1)}},[u,t,n,i,l,q,Se,V]),oi=()=>Y.length>0||de.length>0,ai=()=>u,ri=(0,Z.useMemo)(()=>()=>{let j=z.length+(t===ae.PAGE?h.length:0),fe=Y.length+de.length;return fe===0?!1:fe===j?!0:"indeterminate"},[z.length,h.length,Y.length,de.length,t]),ni=(0,Z.useCallback)(j=>{W(fe=>s(r({},fe),{currentPage:j})),t===ae.PAGE&&Qe(j,Se)},[Qe,Se,t]),ii=(0,Z.useCallback)(j=>{A(j);let fe=new URLSearchParams(b.toString());j.trim()?(fe.set("query",j),fe.set("page","1")):fe.delete("query"),p.push(`${y}?${fe.toString()}`,{scroll:!1})},[p,y,b]);return{files:z,folders:h,selectedFiles:Y,selectedFolders:de,currentFolder:u,isLoading:v,pagination:B,isUploadModalOpen:Bn,isCreateFolderModalOpen:Zn,isSearchModalOpen:jn,isMoveFileModalOpen:$n,isRenameFolderModalOpen:Yn,fileDetailsModalFile:Xn,folderToRename:Qn,setFiles:R,setFolders:N,setSelectedFiles:te,setSelectedFolders:Ne,setCurrentFolder:_,setPagination:W,setIsUploadModalOpen:Hn,setIsCreateFolderModalOpen:Un,setIsSearchModalOpen:Wn,setIsMoveFileModalOpen:Kn,setIsRenameFolderModalOpen:qn,setFileDetailsModalFile:ei,setFolderToRename:Jn,loadData:ti,setIsLoading:O,isInSelectionMode:oi,getCurrentFolder:ai,getSelectionState:ri,handlePageChange:ni,searchQuery:Wt,updateSearchQuery:ii,mode:t,selectionMode:o,acceptedFileTypesForModal:n,provider:l,onFilesSelected:c,onClose:d,basePath:f}}var $t=require("react"),ir=require("react/jsx-runtime"),nr=(0,$t.createContext)(void 0);function bo({children:e,mode:t=ae.PAGE,selectionMode:o=Ve.SINGLE,allowedFileTypes:a,onFilesSelected:n,onClose:i,acceptedFileTypesForModal:l,initialFolderId:c=null,provider:d,basePath:f="/media",maxUploadFiles:m=50,maxUploadSize:b=100*1024*1024}){let p=rr({mode:t,selectionMode:o,initialFolderId:c,acceptedFileTypesForModal:l,allowedFileTypes:a,provider:d,onFilesSelected:n,onClose:i,basePath:f}),y=ar(p),w=(0,$t.useMemo)(()=>({files:p.files,folders:p.folders,selectedFiles:p.selectedFiles,selectedFolders:p.selectedFolders,currentFolder:p.currentFolder,isLoading:p.isLoading,pagination:p.pagination,isUploadModalOpen:p.isUploadModalOpen,isCreateFolderModalOpen:p.isCreateFolderModalOpen,isSearchModalOpen:p.isSearchModalOpen,isMoveFileModalOpen:p.isMoveFileModalOpen,isRenameFolderModalOpen:p.isRenameFolderModalOpen,fileDetailsModalFile:p.fileDetailsModalFile,folderToRename:p.folderToRename,mode:p.mode,selectionMode:p.selectionMode,allowedFileTypes:a,acceptedFileTypesForModal:p.acceptedFileTypesForModal,maxUploadFiles:m,maxUploadSize:b,setIsUploadModalOpen:p.setIsUploadModalOpen,setIsCreateFolderModalOpen:p.setIsCreateFolderModalOpen,setIsSearchModalOpen:p.setIsSearchModalOpen,setIsMoveFileModalOpen:p.setIsMoveFileModalOpen,setSelectedFiles:p.setSelectedFiles,setSelectedFolders:p.setSelectedFolders,setIsRenameFolderModalOpen:p.setIsRenameFolderModalOpen,setFileDetailsModalFile:p.setFileDetailsModalFile,setFolderToRename:p.setFolderToRename,handleFileClick:y.handleFileClick,handleFolderClick:y.handleFolderClick,handleClearSelection:y.handleClearSelection,handleSelectAllGlobal:y.handleSelectAllGlobal,handlePageChange:p.handlePageChange,searchQuery:p.searchQuery,updateSearchQuery:p.updateSearchQuery,uploadFiles:y.uploadFiles,createFolder:y.createFolder,bulkMove:y.bulkMove,renameFolder:y.renameFolder,updateFileMetadata:y.updateFileMetadata,bulkDelete:y.bulkDelete,refreshData:y.refreshData,isInSelectionMode:p.isInSelectionMode,getCurrentFolder:p.getCurrentFolder,getSelectionState:p.getSelectionState,onClose:p.onClose,onFilesSelected:p.onFilesSelected,provider:d,basePath:p.basePath}),[p,y,d,a,m,b]);return(0,ir.jsx)(nr.Provider,{value:w,children:e})}function G(){let e=(0,$t.useContext)(nr);if(e===void 0)throw new Error("useFileManager must be used within a FileManagerProvider");return e}var lr=require("clsx"),sr=require("tailwind-merge");function x(...e){return(0,sr.twMerge)((0,lr.clsx)(e))}var Kt=require("react/jsx-runtime");function Bo(e){return(0,Kt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[(0,Kt.jsx)("path",{fill:"#e5252a",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),(0,Kt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),(0,Kt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M5.79 29.86l0 -7.31 3.11 0c0.77,0 1.38,0.21 1.84,0.64 0.46,0.42 0.69,0.99 0.69,1.7 0,0.71 -0.23,1.28 -0.69,1.7 -0.46,0.43 -1.07,0.64 -1.84,0.64l-1.24 0 0 2.63 -1.87 0zm1.87 -4.22l1.03 0c0.28,0 0.5,-0.06 0.65,-0.2 0.15,-0.13 0.23,-0.31 0.23,-0.55 0,-0.24 -0.08,-0.42 -0.23,-0.55 -0.15,-0.14 -0.37,-0.2 -0.65,-0.2l-1.03 0 0 1.5zm4.54 4.22l0 -7.31 2.59 0c0.51,0 0.99,0.07 1.44,0.22 0.45,0.15 0.86,0.36 1.22,0.65 0.36,0.28 0.65,0.66 0.86,1.14 0.2,0.48 0.31,1.03 0.31,1.65 0,0.61 -0.11,1.16 -0.31,1.64 -0.21,0.48 -0.5,0.86 -0.86,1.14 -0.36,0.29 -0.77,0.5 -1.22,0.65 -0.45,0.15 -0.93,0.22 -1.44,0.22l-2.59 0zm1.83 -1.59l0.54 0c0.29,0 0.56,-0.03 0.81,-0.1 0.24,-0.07 0.47,-0.18 0.69,-0.33 0.21,-0.15 0.38,-0.36 0.5,-0.64 0.12,-0.28 0.18,-0.61 0.18,-0.99 0,-0.39 -0.06,-0.72 -0.18,-1 -0.12,-0.28 -0.29,-0.49 -0.5,-0.64 -0.22,-0.15 -0.45,-0.26 -0.69,-0.33 -0.25,-0.07 -0.52,-0.1 -0.81,-0.1l-0.54 0 0 4.13zm5.53 1.59l0 -7.31 5.2 0 0 1.59 -3.33 0 0 1.17 2.66 0 0 1.58 -2.66 0 0 2.97 -1.87 0z"})]}))}var Yt=require("react/jsx-runtime");function Ho(e){return(0,Yt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[(0,Yt.jsx)("path",{fill:"#00733b",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),(0,Yt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),(0,Yt.jsx)("path",{fill:"#fff",d:"M5.21 17.35l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 -6.08l3.15 0 0 1.18 -3.15 0 0 -1.18zm-4.12 0l3.14 0 0 1.18 -3.14 0 0 -1.18zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2.08l3.15 0 0 1.19 -3.15 0 0 -1.19zm-4.12 0l3.14 0 0 1.19 -3.14 0 0 -1.19zm4.12 2l3.15 0 0 1.19 -3.15 0 0 -1.19z"})]}))}var qt=require("react/jsx-runtime");function Zo(e){return(0,qt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[(0,qt.jsx)("path",{fill:"#e03303",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,qt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,qt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M11.76 16.13c-2.44,0.12 -4.38,2.15 -4.35,4.62 0.04,2.46 2.04,4.47 4.5,4.5 2.48,0.04 4.51,-1.9 4.62,-4.34 0.01,-0.12 -0.09,-0.22 -0.21,-0.22l-4.13 0c-0.12,0 -0.22,-0.1 -0.22,-0.21l0 -4.14c0,-0.12 -0.09,-0.21 -0.21,-0.21zm1.1 -0.67l0 4.13c0,0.12 0.09,0.21 0.21,0.21l4.14 0c0.12,0 0.21,-0.1 0.21,-0.22 -0.11,-2.34 -1.99,-4.22 -4.34,-4.33 -0.12,-0.01 -0.22,0.09 -0.22,0.21z"})]}))}var Qt=require("react/jsx-runtime");function Uo(e){return(0,Qt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 38.89 51.99",width:"100",height:"100"},e),{children:[(0,Qt.jsx)("path",{fill:"#0263d1",fillRule:"nonzero",d:"M6.76 0l17.4 0 14.73 15.36 0 29.87c0,3.73 -3.03,6.76 -6.77,6.76l-25.36 0c-3.73,0 -6.76,-3.03 -6.76,-6.76l0 -38.47c0,-3.73 3.03,-6.76 6.76,-6.76z"}),(0,Qt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"24.14 0 24.14 15.24 38.89 15.24"}),(0,Qt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M26.3 27.05l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm-4.57 13.71l-9.14 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l9.14 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm4.57 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0zm0 -4.57l-13.71 0c-0.63,0 -1.15,-0.51 -1.15,-1.14 0,-0.63 0.52,-1.14 1.15,-1.14l13.71 0c0.63,0 1.14,0.51 1.14,1.14 0,0.63 -0.51,1.14 -1.14,1.14l0 0z"})]}))}var Jt=require("react/jsx-runtime");function jo(e){return(0,Jt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[(0,Jt.jsx)("path",{fill:"#ffc000",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,Jt.jsx)("polygon",{fill:"#ffffff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,Jt.jsx)("path",{fill:"#ffffff",fillRule:"nonzero",d:"M16.45 21.21l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm0 2.86l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0zm-4.36 -8.57l-4.21 0c-0.4,0 -0.72,0.31 -0.72,0.71 0,0.4 0.32,0.71 0.72,0.71l4.21 0c0.4,0 0.72,-0.31 0.72,-0.71 0,-0.4 -0.32,-0.71 -0.72,-0.71l0 0zm4.36 2.85l-8.57 0c-0.4,0 -0.72,0.32 -0.72,0.72 0,0.39 0.32,0.71 0.72,0.71l8.57 0c0.4,0 0.72,-0.32 0.72,-0.71 0,-0.4 -0.32,-0.72 -0.72,-0.72l0 0z"})]}))}var Ge=require("react/jsx-runtime");function Wo(e){return(0,Ge.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:[(0,Ge.jsxs)("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1",x1:"37.127",x2:"25.868",y1:"6.873",y2:"18.132",gradientUnits:"userSpaceOnUse",children:[(0,Ge.jsx)("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),(0,Ge.jsx)("stop",{offset:".913",stopColor:"#262626",stopOpacity:".8"})]}),(0,Ge.jsx)("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzja_Pjo0BrMdm974_gr1)",d:"M28,4v8c0,2.209,1.791,4,4,4h8L28,4z",children:" "}),(0,Ge.jsxs)("linearGradient",{id:"X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2",x1:"-8.398",x2:"74.731",y1:"51.185",y2:"-18.568",gradientUnits:"userSpaceOnUse",children:[(0,Ge.jsx)("stop",{offset:"0",stopColor:"#262626",stopOpacity:"0"}),(0,Ge.jsx)("stop",{offset:"1",stopColor:"#262626",stopOpacity:".8"})]}),(0,Ge.jsx)("path",{fill:"url(#X-uD4Bgl9JIhUIufrZZzjb_Pjo0BrMdm974_gr2)",d:"M40,16v23c0,2.761-2.239,5-5,5H8V9c0-2.761,2.239-5,5-5h15L40,16z"})]}))}var Xt=require("react/jsx-runtime");function $o(e){return(0,Xt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100","aria-hidden":"true"},e),{children:[(0,Xt.jsx)("path",{fill:"#ffb11f",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,Xt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,Xt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M8.96 16.9l0 -2.22c0,-0.24 -0.19,-0.43 -0.43,-0.43l-1.2 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 2.22 -0.67 1.96c-0.19,0.55 -0.1,1.16 0.24,1.63 0.33,0.47 0.88,0.75 1.46,0.75 0.58,0 1.12,-0.28 1.46,-0.75 0.34,-0.47 0.43,-1.08 0.24,-1.63l-0.67 -1.96zm-0.28 3.08c-0.34,0.49 -1.16,0.49 -1.51,0 -0.17,-0.24 -0.22,-0.56 -0.12,-0.84l0.22 -0.66 1.31 0 0.23 0.66c0.09,0.28 0.05,0.6 -0.13,0.84zm-3.41 -17.65l0 1.22c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.82 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.94c0,0.24 0.19,0.44 0.43,0.44l1.63 0 0 1.81 -1.63 0c-0.24,0 -0.43,0.19 -0.43,0.43l0 0.95c0,0.24 0.19,0.43 0.43,0.43l1.63 0 0 1.38c0,0.24 0.2,0.43 0.44,0.43l2.39 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.23 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.19 0.43,-0.43l0 -0.95c0,-0.24 -0.2,-0.43 -0.43,-0.43l-1.64 0 0 -1.81 1.64 0c0.23,0 0.43,-0.2 0.43,-0.44l0 -0.94c0,-0.24 -0.2,-0.44 -0.43,-0.44l-1.64 0 0 -1.66c0,0 -3.25,0.01 -3.25,0.01z"})]}))}var eo=require("react/jsx-runtime");function Ko(e){return(0,eo.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 20.49 27.4",width:"100",height:"100","aria-hidden":"true"},e),{children:[(0,eo.jsx)("path",{fill:"#00a1e0",d:"M3.56 0l9.17 0 7.76 8.1 0 15.73c0,1.97 -1.59,3.57 -3.56,3.57l-13.37 0c-1.96,0 -3.56,-1.6 -3.56,-3.57l0 -20.27c0,-1.96 1.6,-3.56 3.56,-3.56z"}),(0,eo.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"12.72 0 12.72 8.03 20.49 8.03"}),(0,eo.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M12.07 20.44l-0.52 0 0 -0.99 0.11 0c0.26,0 0.39,-0.14 0.39,-0.42l0 -1.45c0,-0.23 0.06,-0.41 0.16,-0.53 0.11,-0.11 0.27,-0.21 0.48,-0.3 -0.2,-0.08 -0.36,-0.18 -0.47,-0.3 -0.11,-0.12 -0.17,-0.29 -0.17,-0.52l0 -1.45c0,-0.28 -0.13,-0.42 -0.39,-0.42l-0.11 0 0 -0.99 0.52 0c0.31,0 0.56,0.1 0.76,0.3 0.2,0.2 0.3,0.45 0.3,0.75l0 1.55c0,0.38 0.21,0.57 0.63,0.57l0 1.03c-0.42,0 -0.63,0.19 -0.63,0.58l0 1.54c0,0.3 -0.1,0.55 -0.3,0.75 -0.2,0.2 -0.45,0.3 -0.76,0.3zm-3.65 0c-0.3,0 -0.56,-0.1 -0.76,-0.3 -0.2,-0.2 -0.3,-0.45 -0.3,-0.75l0 -1.54c0,-0.39 -0.21,-0.58 -0.63,-0.58l0 -1.03c0.42,0 0.63,-0.19 0.63,-0.57l0 -1.55c0,-0.3 0.1,-0.55 0.3,-0.75 0.2,-0.2 0.46,-0.3 0.76,-0.3l0.53 0 0 0.99 -0.12 0c-0.26,0 -0.39,0.14 -0.39,0.42l0 1.45c0,0.23 -0.05,0.4 -0.16,0.52 -0.11,0.12 -0.27,0.22 -0.48,0.3 0.21,0.09 0.37,0.19 0.48,0.3 0.11,0.12 0.16,0.3 0.16,0.53l0 1.45c0,0.28 0.13,0.42 0.39,0.42l0.12 0 0 0.99 -0.53 0z"})]}))}var to=require("react/jsx-runtime");function oo(e){return(0,to.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 24.33 32.53",width:"100",height:"100"},e),{children:[(0,to.jsx)("path",{fill:"#90c",d:"M4.23 0l10.88 0 9.22 9.61 0 18.69c0,2.33 -1.9,4.23 -4.23,4.23l-15.87 0c-2.34,0 -4.23,-1.9 -4.23,-4.23l0 -24.07c0,-2.34 1.89,-4.23 4.23,-4.23z"}),(0,to.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"15.1 0 15.1 9.53 24.33 9.53"}),(0,to.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M15.07 21.38c0.31,-0.52 0.52,-1.18 0.56,-1.83 0.02,-0.42 -0.07,-0.86 -0.27,-1.27 -0.32,-0.65 -0.86,-1.01 -1.39,-1.37 -0.39,-0.26 -0.76,-0.51 -1.02,-0.86l-0.05 -0.06c-0.15,-0.21 -0.33,-0.45 -0.36,-0.65 -0.02,-0.2 -0.21,-0.34 -0.4,-0.33 -0.21,0.02 -0.36,0.18 -0.36,0.39l0 6.86c-0.32,-0.2 -0.72,-0.32 -1.16,-0.32 -1.06,0 -1.92,0.69 -1.92,1.54 0,0.85 0.86,1.54 1.92,1.54 1.06,0 1.93,-0.69 1.93,-1.54l0 -4.49c0.58,0.23 1.52,0.79 1.78,2.1 -0.05,0.07 -0.09,0.15 -0.15,0.21 -0.14,0.16 -0.12,0.4 0.04,0.55 0.16,0.14 0.4,0.12 0.54,-0.04 0.1,-0.12 0.2,-0.25 0.28,-0.4 0.01,-0.01 0.02,-0.02 0.03,-0.03z"})]}))}var J=require("react/jsx-runtime");function Yo(e){return(0,J.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[(0,J.jsx)("path",{fill:"#188a32",d:"M56,35v8c0,1.66-1.34,3-3,3H11c-1.66,0-3-1.34-3-3v-8c0-1.66,1.34-3,3-3h42C54.66,32,56,33.34,56,35z"}),(0,J.jsx)("path",{fill:"#0082AA",d:"M44,29v5c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3v-5h4v4h16v-4H44z"}),(0,J.jsx)("path",{fill:"#4d50c6",d:`M53,32H11c-1.657,0-3-1.343-3-3v-8c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
9
2
  C56,30.657,54.657,32,53,32z`}),(0,J.jsx)("path",{fill:"#e6275e",d:`M53,18H11c-1.657,0-3-1.343-3-3V7c0-1.657,1.343-3,3-3h42c1.657,0,3,1.343,3,3v8
10
3
  C56,16.657,54.657,18,53,18z`}),(0,J.jsx)("rect",{width:"16",height:"42",x:"24",y:"4",fill:"#FAB400"}),(0,J.jsx)("path",{fill:"#DC9600",d:"M32,46L32,46c-4.418,0-8-3.582-8-8v-4h16v4C40,42.418,36.418,46,32,46z"}),(0,J.jsx)("path",{fill:"#FAB400",d:"M32,44L32,44c-4.418,0-8-3.582-8-8v-4h16v4C40,40.418,36.418,44,32,44z"}),(0,J.jsx)("rect",{width:"16",height:"4",x:"24",y:"33",fill:"#DC9600"}),(0,J.jsx)("path",{fill:"#F0F0F0",d:`M44,17v16c0,1.66-1.34,3-3,3H23c-1.66,0-3-1.34-3-3V17c0-1.66,1.34-3,3-3h1v18h16V14h1
11
4
  C42.66,14,44,15.34,44,17z`}),(0,J.jsx)("path",{fill:"#D2D2D2",d:"M34,31v2c0,1.1-0.9,2-2,2s-2-0.9-2-2v-2H34z"}),(0,J.jsx)("path",{fill:"#F0F0F0",d:`M32,34L32,34c-1.105,0-2-0.895-2-2v-8c0-1.105,0.895-2,2-2h0c1.105,0,2,0.895,2,2v8
12
5
  C34,33.105,33.105,34,32,34z`}),(0,J.jsx)("circle",{cx:"32",cy:"18",r:"2",fill:"#C80A50"}),(0,J.jsx)("circle",{cx:"32",cy:"10",r:"2",fill:"#00A0C8"}),(0,J.jsx)("path",{fill:"#F0F0F0",d:"M34,18h-4c0-1.1,0.9-2,2-2S34,16.9,34,18z"}),(0,J.jsx)("path",{fill:"#0A5078",d:`M47,60H17c-1.105,0-2-0.895-2-2V44c0-1.105,0.895-2,2-2h30c1.105,0,2,0.895,2,2v14
13
6
  C49,59.105,48.105,60,47,60z`}),(0,J.jsx)("path",{fill:"#F0F0F0",d:`M35,53h-6c-0.552,0-1-0.448-1-1v-3c0-2.206,1.794-4,4-4s4,1.794,4,4v3C36,52.552,35.552,53,35,53z
14
7
  M30,51h4v-2c0-1.103-0.897-2-2-2s-2,0.897-2,2V51z`}),(0,J.jsx)("path",{fill:"#F0F0F0",d:"M29 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C30 56.552 29.552 57 29 57zM35 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C36 56.552 35.552 57 35 57zM42 53h-3c-.552 0-1-.448-1-1v-6c0-.552.448-1 1-1h3c2.206 0 4 1.794 4 4S44.206 53 42 53zM40 51h2c1.103 0 2-.897 2-2s-.897-2-2-2h-2V51z"}),(0,J.jsx)("path",{fill:"#F0F0F0",d:"M39 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C40 56.552 39.552 57 39 57zM45.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C45.304 56.966 45.151 57 45.001 57z"}),(0,J.jsxs)("g",{children:[(0,J.jsx)("path",{fill:"#F0F0F0",d:`M22,53h-3c-0.552,0-1-0.448-1-1v-6c0-0.552,0.448-1,1-1h3c2.206,0,4,1.794,4,4S24.206,53,22,53z
15
- M20,51h2c1.103,0,2-0.897,2-2s-0.897-2-2-2h-2V51z`}),(0,J.jsx)("path",{fill:"#F0F0F0",d:"M19 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C20 56.552 19.552 57 19 57zM25.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C25.304 56.966 25.151 57 25.001 57z"})]})]}))}var sa=require("react/jsx-runtime");function Ha(e){return(0,sa.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"100",height:"100"},e),{children:[(0,sa.jsx)("path",{fill:"#e8e9ea",d:`M8.16,17.51V3.74c0-1.79,1.45-3.24,3.24-3.24h20.53l12.79,12.8v30.96c0,1.79-1.45,3.24-3.24,3.24H11.4
16
- c-1.79,0-3.24-1.45-3.24-3.24v-1.62`}),(0,sa.jsx)("path",{fill:"#697d7f",d:"M44.72 13.3h-9.93c-1.58 0-2.86-1.28-2.86-2.86V.5M11.53 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H4.78c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76H11.53zM36.33 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-6.75c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-5.25v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-3.98v-2.76H36.33zM15.55 36.67c.26.19.57.28.87.28.47 0 .93-.22 1.22-.63l2.92-4.07 2.92 4.07c.29.41.75.63 1.22.63.3 0 .61-.09.87-.28.67-.48.83-1.42.34-2.09l-3.51-4.89 3.51-4.89c.48-.67.33-1.61-.34-2.09-.67-.48-1.61-.33-2.09.34l-2.92 4.07-2.92-4.07c-.48-.67-1.42-.83-2.09-.34-.67.48-.83 1.42-.34 2.09l3.51 4.89-3.51 4.89C14.72 35.25 14.87 36.19 15.55 36.67z"})]}))}var Yt=require("react/jsx-runtime");function qt(e){return(0,Yt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[(0,Yt.jsx)("path",{fill:"#0ac963",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),(0,Yt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),(0,Yt.jsx)("path",{fill:"#fff",d:"M11.85 11.82l-6.01 0c-0.45,0 -0.82,0.37 -0.82,0.82l0 3.82c0,0.45 0.37,0.82 0.82,0.82l6.01 0c0.45,0 0.81,-0.37 0.81,-0.82l0 -3.82c0,-0.45 -0.36,-0.82 -0.81,-0.82zm-4.37 1.03c0.49,0 0.88,0.4 0.88,0.88 0,0.49 -0.39,0.89 -0.88,0.89 -0.49,0 -0.89,-0.4 -0.89,-0.89 0,-0.48 0.4,-0.88 0.89,-0.88zm4.64 3.61c0,0.15 -0.12,0.28 -0.27,0.28l-6.01 0c-0.15,0 -0.27,-0.13 -0.27,-0.28l0 -0.16 1.09 -1.09 0.9 0.9c0.11,0.11 0.28,0.11 0.39,0l2.26 -2.26 1.91 1.91 0 0.7 0 0z"})]}))}var Qt=require("react/jsx-runtime");function Ua(e){return(0,Qt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[(0,Qt.jsx)("path",{fill:"#fa0000",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),(0,Qt.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),(0,Qt.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M14.97 18.16c-3.57,0 -6.47,2.9 -6.47,6.47 0,3.57 2.9,6.46 6.47,6.46 3.57,0 6.46,-2.89 6.46,-6.46 0,-3.57 -2.9,-6.46 -6.46,-6.47zm2.72 6.67c-0.05,0.09 -0.12,0.16 -0.21,0.21l0 0 -3.69 1.85c-0.23,0.11 -0.51,0.02 -0.62,-0.21 -0.04,-0.06 -0.05,-0.13 -0.05,-0.21l0 -3.69c0,-0.26 0.21,-0.46 0.46,-0.46 0.07,0 0.14,0.01 0.21,0.05l3.69 1.84c0.23,0.12 0.32,0.39 0.21,0.62z"})]}))}var Ue=require("react/jsx-runtime");function Za(e){return(0,Ue.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[(0,Ue.jsx)("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
17
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),(0,Ue.jsx)("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
18
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),(0,Ue.jsx)("rect",{width:"58.6",height:"21.1",x:"1.6",y:"14.7",fill:"#ffffff"}),(0,Ue.jsx)("rect",{width:".8",height:"21.1",x:"1.6",y:"14.7",fill:"#f3f3f3"}),(0,Ue.jsx)("rect",{width:"58.6",height:".9",x:"1.6",y:"14.7",fill:"#f3f1f1"}),(0,Ue.jsx)("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
19
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),(0,Ue.jsx)("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
20
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}var Pt=require("react/jsx-runtime");function ja(e){return(0,Pt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[(0,Pt.jsx)("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
21
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),(0,Pt.jsx)("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
22
- c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),(0,Pt.jsx)("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
23
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),(0,Pt.jsx)("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
24
- c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}var Q=require("react/jsx-runtime");function Xe(e){return(0,Q.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:(0,Q.jsxs)("g",{fill:"none",children:[(0,Q.jsx)("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"origin",mask:"url(#1752500502786-6297956_folder_mask_2iow0yqdp)"}),(0,Q.jsx)("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"clone",filter:"url(#1752500502786-6297956_folder_filter_56qas2ark)",clipPath:"url(#1752500502786-6297956_folder_clipPath_gygn8e14a)"}),(0,Q.jsx)("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)","data-glass":"blur"}),(0,Q.jsx)("path",{d:"M18.6807 9.00586C19.7975 9.02423 20.4692 9.09846 20.9864 9.39258C21.5915 9.73676 22.0586 10.2802 22.3067 10.9307C22.5894 11.6719 22.4426 12.6251 22.1495 14.5303L21.626 17.9297C21.4038 19.3742 21.2926 20.097 20.9385 20.6396L20.8155 20.8135C20.5147 21.2098 20.1193 21.5262 19.6641 21.7324C19.074 21.9997 18.3431 22 16.8819 22V21.25C17.624 21.25 18.1389 21.2495 18.543 21.2188C18.9374 21.1887 19.1709 21.133 19.3546 21.0498C19.7447 20.873 20.0766 20.5882 20.3106 20.2295C20.4208 20.0606 20.5119 19.8385 20.6016 19.4531C20.6935 19.0584 20.772 18.5489 20.8848 17.8154L21.4083 14.416C21.5568 13.4504 21.6601 12.7732 21.6954 12.2441C21.7302 11.7223 21.6913 11.4231 21.6055 11.1982C21.4194 10.7103 21.0693 10.3021 20.6153 10.0439C20.4061 9.92506 20.1166 9.84086 19.5958 9.7959C19.0675 9.75031 18.3823 9.75 17.4053 9.75H6.59479C5.61785 9.75 4.93266 9.75032 4.40436 9.7959C3.88353 9.84086 3.59399 9.92504 3.38483 10.0439C2.93088 10.3021 2.5807 10.7103 2.3946 11.1982C2.30885 11.4231 2.26996 11.7223 2.30475 12.2441C2.34005 12.7732 2.44331 13.4504 2.59186 14.416L3.1153 17.8154C3.22814 18.5489 3.30665 19.0584 3.3985 19.4531C3.4882 19.8385 3.5793 20.0606 3.68952 20.2295C3.92357 20.5882 4.25545 20.873 4.64558 21.0498C4.82929 21.133 5.06268 21.1887 5.4571 21.2188C5.86121 21.2495 6.37613 21.25 7.11823 21.25V22L6.14948 21.9961C5.44148 21.9856 4.96108 21.9493 4.56452 21.8213L4.336 21.7324C3.88079 21.5262 3.48544 21.2098 3.18464 20.8135L3.06159 20.6396C2.79608 20.2327 2.66703 19.7244 2.52546 18.8867L2.37409 17.9297L1.85065 14.5303C1.57585 12.744 1.42974 11.7947 1.64558 11.0723L1.6944 10.9307C1.91158 10.3615 2.29578 9.8738 2.79401 9.53027L3.01374 9.39258C3.70332 9.00046 4.66737 9 6.59479 9H17.4053L18.6807 9.00586ZM16.8819 21.25V22H7.11823V21.25H16.8819Z",fill:"url(#1752500502786-6297956_folder_existing_2_vhap9347d)"}),(0,Q.jsxs)("defs",{children:[(0,Q.jsxs)("linearGradient",{id:"1752500502786-6297956_folder_existing_0_ekojck6b3",x1:"12",y1:"2",x2:"12",y2:"16",gradientUnits:"userSpaceOnUse",children:[(0,Q.jsx)("stop",{stopColor:"#575757"}),(0,Q.jsx)("stop",{offset:"1",stopColor:"#151515"})]}),(0,Q.jsxs)("linearGradient",{id:"1752500502786-6297956_folder_existing_1_v5o9796uz",x1:"23",y1:"15.5",x2:"1",y2:"15.5",gradientUnits:"userSpaceOnUse",children:[(0,Q.jsx)("stop",{stopColor:"#E3E3E5",stopOpacity:".6"}),(0,Q.jsx)("stop",{offset:"1",stopColor:"#BBBBC0",stopOpacity:".6"})]}),(0,Q.jsxs)("linearGradient",{id:"1752500502786-6297956_folder_existing_2_vhap9347d",x1:"12",y1:"9",x2:"12",y2:"16.528",gradientUnits:"userSpaceOnUse",children:[(0,Q.jsx)("stop",{stopColor:"#fff"}),(0,Q.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0"})]}),(0,Q.jsx)("filter",{id:"1752500502786-6297956_folder_filter_56qas2ark",x:"-100%",y:"-100%",width:"400%",height:"400%",filterUnits:"objectBoundingBox",primitiveUnits:"userSpaceOnUse",children:(0,Q.jsx)("feGaussianBlur",{stdDeviation:"2",x:"0%",y:"0%",width:"100%",height:"100%",in:"SourceGraphic",edgeMode:"none",result:"blur"})}),(0,Q.jsx)("clipPath",{id:"1752500502786-6297956_folder_clipPath_gygn8e14a",children:(0,Q.jsx)("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)"})}),(0,Q.jsxs)("mask",{id:"1752500502786-6297956_folder_mask_2iow0yqdp",children:[(0,Q.jsx)("rect",{width:"100%",height:"100%",fill:"#FFF"}),(0,Q.jsx)("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"#000"})]})]})]})}))}var da=require("react/jsx-runtime");function $a(e){return(0,da.jsxs)("svg",d(n({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[(0,da.jsx)("path",{opacity:"0.4",d:"M13.4919 2.29395C13.0743 1.94268 12.5457 1.75 11.9997 1.75C11.5221 1.75 11.058 1.89775 10.6697 2.16992L10.5085 2.29395L1.5974 9.78906C1.18491 10.1364 1.13178 10.7528 1.47924 11.165C1.78946 11.5327 2.31307 11.6121 2.71557 11.3789V15.9531V15.955C2.71555 17.0543 2.71553 17.9612 2.7976 18.6885C2.88313 19.4463 3.06823 20.1292 3.52318 20.7217L3.68627 20.9199C3.85487 21.1119 4.04268 21.2876 4.24584 21.4434L4.47143 21.6016C5.01004 21.9427 5.61706 22.0932 6.281 22.168C7.00121 22.2491 7.89724 22.249 8.98176 22.249H8.99975H14.9997H15.0178C16.1023 22.249 16.9983 22.2491 17.7185 22.168C18.4771 22.0825 19.1606 21.8977 19.7537 21.4434L19.9529 21.2803C20.145 21.1119 20.3205 20.9245 20.4763 20.7217L20.6345 20.4961C20.976 19.9581 21.127 19.3517 21.2019 18.6885C21.284 17.9612 21.2839 17.0543 21.2839 15.955V15.9531V11.3789C21.6864 11.6121 22.21 11.5327 22.5203 11.165C22.846 10.7785 22.8199 10.2127 22.4753 9.85742L13.4919 2.29395Z",fill:"#141B34"}),(0,da.jsx)("path",{d:"M14.9998 17V22.249H8.99979V17C8.99979 15.5859 9.00002 14.8788 9.43924 14.4395C9.87855 14.0001 10.5857 14 11.9998 14C13.4139 14 14.121 14.0002 14.5603 14.4395C14.9997 14.8788 14.9998 15.5858 14.9998 17Z",fill:"#141B34"})]}))}var Co=require("react/jsx-runtime");function Ae(e){return(0,Co.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:(0,Co.jsx)("path",{fill:"currentColor",d:"M46.599 46.599a4.498 4.498 0 0 1-6.363 0l-7.941-7.941C29.028 40.749 25.167 42 21 42 9.402 42 0 32.598 0 21S9.402 0 21 0s21 9.402 21 21c0 4.167-1.251 8.028-3.342 11.295l7.941 7.941a4.498 4.498 0 0 1 0 6.363zM21 6C12.717 6 6 12.714 6 21s6.717 15 15 15c8.286 0 15-6.714 15-15S29.286 6 21 6z"})}))}var ca=require("react/jsx-runtime");function pa(e){return(0,ca.jsxs)("svg",d(n({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[(0,ca.jsx)("path",{fill:"currentColor",opacity:"0.4",d:"M20.4155 3.66085C22.3012 5.52939 19.2842 20.7253 16.1883 20.9931C13.5911 21.2177 12.7819 16.0954 12.2348 14.4719C11.695 12.8696 11.0943 12.2927 9.50513 11.767C5.46811 10.4315 3.4496 9.76374 3.04996 8.70639C1.99171 5.90649 18.0071 1.27438 20.4155 3.66085Z"}),(0,ca.jsx)("path",{fill:"currentColor",d:"M3.04996 8.70639C3.4496 9.76374 5.46811 10.4315 9.50513 11.767C10.3308 12.0402 10.8897 12.3271 11.3118 12.7646L20.4155 3.66085C18.0071 1.27438 1.99171 5.90649 3.04996 8.70639Z"})]}))}var Ir=require("react/jsx-runtime");var ma=require("react/jsx-runtime");function kt(e){return(0,ma.jsxs)("svg",d(n({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[(0,ma.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.75 11.7499C18.3023 11.7499 18.75 12.1977 18.75 12.7499V15.7499H21.75C22.3023 15.7499 22.75 16.1977 22.75 16.7499C22.75 17.3022 22.3023 17.7499 21.75 17.7499H18.75V20.7499C18.75 21.3022 18.3023 21.7499 17.75 21.7499C17.1977 21.7499 16.75 21.3022 16.75 20.7499V17.7499H13.75C13.1977 17.7499 12.75 17.3022 12.75 16.7499C12.75 16.1977 13.1977 15.7499 13.75 15.7499H16.75V12.7499C16.75 12.1977 17.1977 11.7499 17.75 11.7499Z",fill:"currentColor"}),(0,ma.jsx)("path",{opacity:"0.4",d:"M9.4626 2.48876C8.82373 2.24919 8.11205 2.24951 7.08264 2.24996C6.2039 2.24995 5.32205 2.24999 4.7497 2.30044C4.15996 2.35243 3.64388 2.46238 3.17258 2.7254C2.56533 3.06428 2.06428 3.56534 1.7254 4.17258C1.46238 4.64388 1.35242 5.15996 1.30044 5.7497C1.24999 6.32205 1.24999 7.03077 1.25 7.9095V11.0574C1.24999 13.3658 1.24998 15.1748 1.43975 16.5863C1.63399 18.031 2.03933 19.1711 2.93414 20.0659C3.82895 20.9607 4.96897 21.366 6.41371 21.5603C7.82519 21.75 9.63423 21.75 11.9426 21.75H13.2923C14.1084 21.75 14.8409 21.75 15.5 21.7383V18.9999H13.75C12.5074 18.9999 11.5 17.9926 11.5 16.7499C11.5 15.5073 12.5074 14.4999 13.75 14.4999H15.5V12.7499C15.5 11.5073 16.5074 10.4999 17.75 10.4999C18.9926 10.4999 20 11.5073 20 12.7499V14.4999H22.7383C22.75 13.8408 22.75 13.1084 22.75 12.2923C22.75 11.2733 22.75 10.3688 22.683 9.70949C22.6137 9.02893 22.4669 8.43872 22.118 7.91661C21.8444 7.50715 21.4929 7.15559 21.0834 6.88199C20.5613 6.53313 19.9711 6.38628 19.2905 6.31705C18.6312 6.24998 17.8095 6.24999 16.7905 6.25L13.2361 6.25C12.92 6.25 12.7396 6.24908 12.6064 6.23531C12.5044 6.22817 12.4348 6.15255 12.4128 6.11563C12.3409 6.0027 12.0838 5.48909 11.9425 5.20636C11.4704 4.25121 10.8581 3.01205 9.4626 2.48876Z",fill:"currentColor"})]}))}var yo=require("react/jsx-runtime");function St(e){return(0,yo.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:(0,yo.jsx)("path",{fill:"currentColor",d:"M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"})}))}var Jt=require("react/jsx-runtime");function Ze(e){return(0,Jt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:[(0,Jt.jsx)("path",{fill:"currentColor",d:"M3 6.386c0-.484.345-.877.771-.877h2.665c.529-.016.996-.399 1.176-.965l.03-.1l.115-.391c.07-.24.131-.45.217-.637c.338-.739.964-1.252 1.687-1.383c.184-.033.378-.033.6-.033h3.478c.223 0 .417 0 .6.033c.723.131 1.35.644 1.687 1.383c.086.187.147.396.218.637l.114.391l.03.1c.18.566.74.95 1.27.965h2.57c.427 0 .772.393.772.877s-.345.877-.771.877H3.77c-.425 0-.77-.393-.77-.877"}),(0,Jt.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.425 11.482c.413-.044.78.273.821.707l.5 5.263c.041.433-.26.82-.671.864c-.412.043-.78-.273-.821-.707l-.5-5.263c-.041-.434.26-.821.671-.864m5.15 0c.412.043.713.43.671.864l-.5 5.263c-.04.434-.408.75-.82.707c-.413-.044-.713-.43-.672-.864l.5-5.264c.041-.433.409-.75.82-.707",clipRule:"evenodd"}),(0,Jt.jsx)("path",{fill:"currentColor",d:"M11.596 22h.808c2.783 0 4.174 0 5.08-.886c.904-.886.996-2.339 1.181-5.245l.267-4.188c.1-1.577.15-2.366-.303-2.865c-.454-.5-1.22-.5-2.753-.5H8.124c-1.533 0-2.3 0-2.753.5s-.404 1.288-.303 2.865l.267 4.188c.185 2.906.277 4.36 1.182 5.245c.905.886 2.296.886 5.079.886",opacity:"0.5"})]}))}var Fo=require("react/jsx-runtime");function ve(e){return(0,Fo.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),{children:(0,Fo.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"})}))}var zt=require("react/jsx-runtime");function Wa(e){return(0,zt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,zt.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,zt.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,zt.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,zt.jsx)("path",{d:"M12 4l0 12"})]}))}var Tt=require("react/jsx-runtime");function Ka(e){return(0,Tt.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,Tt.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Tt.jsx)("path",{d:"M9 15l6 -6"}),(0,Tt.jsx)("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),(0,Tt.jsx)("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]}))}var Mo=require("react/jsx-runtime");function Ya(e){return(0,Mo.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:(0,Mo.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.944 1.25H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S3.025 4.705 2.89 5.71c-.138 1.029-.14 2.383-.14 4.29a.75.75 0 0 1-1.5 0v-.056c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153m8.345 1.64c-1.027-.138-2.382-.14-4.289-.14a.75.75 0 0 1 0-1.5h.056c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238c.748.749 1.08 1.698 1.238 2.87c.153 1.14.153 2.595.153 4.433V10a.75.75 0 0 1-1.5 0c0-1.907-.002-3.261-.14-4.29c-.135-1.005-.389-1.585-.812-2.008s-1.003-.677-2.009-.812M2 13.25a.75.75 0 0 1 .75.75c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V14a.75.75 0 0 1 .75-.75m20 0a.75.75 0 0 1 .75.75v.056c0 1.838 0 3.294-.153 4.433c-.158 1.172-.49 2.121-1.238 2.87c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812s.677-1.003.812-2.009c.138-1.027.14-2.382.14-4.289a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})}))}var xe=require("react/jsx-runtime");function je(e,t){if(typeof e!="string")return console.warn("getFileTypeFromMime: mimeType is not a string:",e),X.FILE;let a=e;if(t){let o=t.toLowerCase().replace(/^\./,""),r=Do.default.getType(o);r&&(a=r)}return a.startsWith("image/")?X.IMAGE:a.startsWith("video/")?X.VIDEO:a.startsWith("audio/")?X.AUDIO:X.FILE}function qa(e,t){let a=e;if(t){let o=t.toLowerCase().replace(/^\./,""),r=Do.default.getType(o);r&&(a=r)}if(a.startsWith("image/"))return"image";if(a.startsWith("video/"))return"video";if(a.startsWith("audio/"))return"audio";switch(a){case"application/pdf":return"pdf";case"application/json":return"json";case"application/zip":case"application/x-zip-compressed":return"zip";case"application/x-rar-compressed":case"application/vnd.rar":return"rar";case"application/x-msdownload":case"application/x-executable":return"exe";case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.ms-excel":case"text/csv":return"excel";case"application/vnd.openxmlformats-officedocument.presentationml.presentation":case"application/vnd.ms-powerpoint":return"powerpoint";case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return"document"}if(a.startsWith("text/"))return"txt";if(t)switch(t.toLowerCase().replace(/^\./,"")){case"exe":case"msi":return"exe";case"zip":return"zip";case"rar":return"rar";case"pdf":return"pdf";case"csv":return"excel"}return"file"}var st=o=>{var r=o,{type:e,className:t}=r,a=g(r,["type","className"]);switch(e){case"folder-with-files":return(0,xe.jsx)(Za,n({className:t},a));case"folder":return(0,xe.jsx)(ja,n({className:t},a));case"image":return(0,xe.jsx)(qt,n({className:t},a));case"video":return(0,xe.jsx)(Ua,n({className:t},a));case"audio":return(0,xe.jsx)(Ga,n({className:t},a));case"pdf":return(0,xe.jsx)(Ta,n({className:t},a));case"excel":case"xlsx":return(0,xe.jsx)(Ra,n({className:t},a));case"powerpoint":case"pptx":return(0,xe.jsx)(Ea,n({className:t},a));case"document":case"docx":case"doc":return(0,xe.jsx)(Aa,n({className:t},a));case"txt":return(0,xe.jsx)(_a,n({className:t},a));case"json":return(0,xe.jsx)(Oa,n({className:t},a));case"zip":return(0,xe.jsx)(Va,n({className:t},a));case"rar":return(0,xe.jsx)(Ba,n({className:t},a));case"exe":return(0,xe.jsx)(Ha,n({className:t},a));default:return(0,xe.jsx)(La,n({className:t},a))}};function Pr(e){if(!e||e.length===0)return"*/*";let t=[];for(let a of e)switch(a){case X.IMAGE:t.push("image/*");break;case X.VIDEO:t.push("video/*");break;case X.AUDIO:t.push("audio/*");break;case X.FILE:t.push("application/*","text/*");break}return t.join(",")}function kr(e){if(!e||e.length===0)return"All files";let t=[];for(let a of e)switch(a){case X.IMAGE:t.push("Images");break;case X.VIDEO:t.push("Videos");break;case X.AUDIO:t.push("Audio");break;case X.FILE:t.push("Files");break}return t.join(", ")}var ua=require("react/jsx-runtime");function No(e){return(0,ua.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",color:"currentColor"},e),{children:[(0,ua.jsx)("path",{d:"M13.0059 21.25C13.0059 21.8023 12.5581 22.25 12.0059 22.25C11.4536 22.25 11.0059 21.8023 11.0059 21.25L11.0059 16.75L10.4116 16.75C10.236 16.7501 10.0203 16.7503 9.84387 16.7282L9.84053 16.7278C9.71408 16.712 9.13804 16.6402 8.86368 16.0746C8.58872 15.5078 8.89065 15.0076 8.95597 14.8994L8.95841 14.8954C9.05062 14.7424 9.18477 14.5715 9.29511 14.4309L9.31885 14.4007C9.61348 14.0249 9.99545 13.5406 10.3759 13.1496C10.5657 12.9545 10.783 12.7533 11.0139 12.5944C11.2191 12.4532 11.5693 12.25 12 12.25C12.4307 12.25 12.7809 12.4532 12.9861 12.5944C13.217 12.7533 13.4343 12.9545 13.6241 13.1496C14.0046 13.5406 14.3865 14.0249 14.6812 14.4007L14.7049 14.4309C14.8152 14.5715 14.9494 14.7424 15.0416 14.8954L15.044 14.8994C15.1093 15.0076 15.4113 15.5078 15.1363 16.0746C14.862 16.6402 14.2859 16.712 14.1595 16.7278L14.1561 16.7282C13.9797 16.7503 13.764 16.7501 13.5884 16.75L13.0059 16.75L13.0059 21.25Z",fill:"currentColor",fillRule:"evenodd"}),(0,ua.jsx)("path",{d:"M1.25 12.5C1.25 9.85827 3.03106 7.63322 5.45825 6.9592C5.65424 6.90478 5.75224 6.87756 5.80872 6.81971C5.8652 6.76186 5.88991 6.66386 5.93931 6.46785C6.62272 3.75655 9.07671 1.75002 12 1.75002C15.2149 1.75002 17.8628 4.17733 18.2112 7.29925C18.2385 7.54461 18.2522 7.66731 18.3147 7.7383C18.3772 7.80929 18.4989 7.83881 18.7423 7.89787C21.0422 8.4559 22.75 10.5285 22.75 13C22.75 15.8995 20.3995 18.25 17.5 18.25H16.4006C15.942 18.25 15.7126 18.25 15.6826 18.2119C15.6679 18.1933 15.6641 18.1839 15.6617 18.1604C15.6567 18.1121 15.8519 17.9223 16.2425 17.5427C17.2326 16.5804 17.255 14.9976 16.2927 14.0075C15.6442 13.1982 15.0315 12.3422 14.2379 11.6663C13.6086 11.1303 12.8426 10.75 12 10.75C11.1574 10.75 10.3914 11.1303 9.76209 11.6663C8.96846 12.3422 8.35575 13.1982 7.7073 14.0075C6.74496 14.9976 6.76745 16.5804 7.75753 17.5427C8.14807 17.9223 8.34334 18.1121 8.33832 18.1604C8.33587 18.1839 8.33206 18.1933 8.31739 18.2119C8.28737 18.25 8.05801 18.25 7.59942 18.25H7C3.82436 18.25 1.25 15.6757 1.25 12.5Z",fill:"currentColor"})]}))}var Sr=require("react"),fa=require("react/jsx-runtime");function zr({file:e}){var r;let[t,a]=(0,Sr.useState)(!1),o=e.previewUrl||e.url;return o&&!t?(0,fa.jsx)("img",{src:o,alt:((r=e==null?void 0:e.name)==null?void 0:r.substring(0,10))||"image",className:"w-full h-full object-contain rounded-md drop-shadow-md",onError:()=>a(!0)}):(0,fa.jsx)(qt,{})}function Tr({file:e}){return e.caption?(0,fa.jsxs)("p",{className:"text-xs text-blue-600 line-clamp-2 mb-2",children:[e.height," x ",e.width]}):null}var Io=require("lucide-react"),Rr=require("react"),ce=require("react/jsx-runtime");function Er({file:e,className:t}){let[a,o]=(0,Rr.useState)(!1);return e.previewUrl&&!a?(0,ce.jsxs)("div",{className:"relative w-full h-full",children:[(0,ce.jsx)("img",{src:e.previewUrl,className:"w-full h-full object-contain rounded-md",alt:e.name,onError:()=>o(!0)}),(0,ce.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,ce.jsx)("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:(0,ce.jsx)(Io.Play,{className:"size-5 text-white fill-white"})})})]}):e.url&&!a?(0,ce.jsxs)("div",{className:"relative w-full h-full",children:[(0,ce.jsx)("video",{src:e.url,className:"w-full h-full object-contain rounded-md",preload:"metadata",onError:()=>o(!0)}),(0,ce.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,ce.jsx)("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:(0,ce.jsx)(Io.Play,{className:"size-5 text-white fill-white"})})})]}):(0,ce.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:(0,ce.jsx)("div",{className:"text-center",children:(0,ce.jsx)("div",{className:"text-4xl",children:(0,ce.jsx)(st,{type:"video",className:t})})})})}function Ar({file:e}){var t;return(t=e.metaData)!=null&&t.duration?(0,ce.jsxs)("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}var Rt=require("react/jsx-runtime");function _r({file:e,className:t}){return(0,Rt.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:(0,Rt.jsx)("div",{className:"text-center",children:(0,Rt.jsx)("div",{className:"text-4xl",children:(0,Rt.jsx)(st,{type:"audio",className:t})})})})}function Lr({file:e}){var t;return(t=e.metaData)!=null&&t.duration?(0,Rt.jsxs)("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}var dt=require("react/jsx-runtime");function Vr({file:e,className:t}){let a=qa(e.mime,e.ext);return(0,dt.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-transparent relative",children:e.previewUrl?(0,dt.jsx)("img",{src:e.previewUrl,alt:e.name,className:"w-full h-full object-contain rounded-md drop-shadow-md"}):(0,dt.jsx)("div",{className:"text-center",children:(0,dt.jsx)("div",{className:"text-4xl",children:(0,dt.jsx)(st,{type:a,className:t})})})})}function Or({file:e}){var t;return(t=e.metaData)!=null&&t.pageCount?(0,dt.jsxs)("p",{className:"text-xs text-blue-600 mb-2",children:["Pages: ",e.metaData.pageCount]}):null}var Br=require("react/jsx-runtime");function Gr({file:e}){let t=qa(e.mime,e.ext);return(0,Br.jsx)(st,{type:t})}var Hr={images:{component:zr,metadataComponent:Tr},videos:{component:Er,metadataComponent:Ar},files:{component:Vr,metadataComponent:Or},audios:{component:_r,metadataComponent:Lr},default:{component:Gr}};function ct(e){let t=je(e.mime,e.ext);return Hr[t]||Hr.default}var Po=require("react/jsx-runtime");function Xt(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Po.jsx)("kbd",n({"data-slot":"kbd",className:x("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e)},t))}function ea(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Po.jsx)("kbd",n({"data-slot":"kbd-group",className:x("inline-flex items-center gap-1",e)},t))}var F=require("react/jsx-runtime");function Zr(){let{isUploadModalOpen:e,setIsUploadModalOpen:t,uploadFiles:a,allowedFileTypes:o,maxUploadFiles:r,maxUploadSize:i}=O(),l=Pr(o),c=kr(o),[s,f]=(0,Ur.useState)([]),[{isDragging:m,errors:b},{removeFile:p,clearFiles:y,handleDragEnter:w,handleDragLeave:N,handleDragOver:M,handleDrop:D,openFileDialog:z,getInputProps:T}]=Nr({maxFiles:r,maxSize:i,accept:l,multiple:!0,onFilesChange:v=>{let G=v.map(B=>{let $=s.find(we=>we.id===B.id);return $?n(n({},$),B):d(n({},B),{progress:100,status:"completed"})});f(G)}}),h=v=>{p(v)},I=v=>{f(G=>G.map(B=>B.id===v?d(n({},B),{progress:0,status:"uploading",error:void 0}):B))},Y=()=>{let v=s.filter(G=>G.status==="completed");if(v.length>0){let G=v.map(B=>({name:B.file.name,size:B.file.size,type:je(B.file.type,B.file.name.split(".").pop()),lastModified:B.file instanceof File?B.file.lastModified:Date.now(),file:B.file,metadata:{}}));a(G),te()}},te=()=>{t(!1),y(),f([])},se=(v,G)=>{let B={id:"temp",name:v.name,size:v.size,mime:v.type,ext:v.name.split(".").pop()||"",url:G||"",createdAt:new Date(v.lastModified),updatedAt:new Date(v.lastModified),folderId:null,metaData:{}},{component:$}=ct(B);return(0,F.jsx)($,{file:B,metaData:B.metaData})},De=s.filter(v=>v.status==="completed").length,u=s.filter(v=>v.status==="uploading").length,L=De>0&&u===0;return(0,F.jsx)(ze,{open:e,onOpenChange:t,children:(0,F.jsxs)(Te,{className:"p-0 max-w-4xl max-h-[80vh] flex flex-col",variant:"default",showCloseButton:!1,children:[(0,F.jsxs)(Be,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,F.jsx)(Re,{className:"px-6 text-base",children:(0,F.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,F.jsxs)("span",{children:["Upload Files",(0,F.jsx)(ea,{className:"ml-2",children:(0,F.jsxs)(Xt,{children:[(0,F.jsx)("span",{className:"text-lg",children:"\u2318"})," + U"]})})]}),(0,F.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>t(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,F.jsx)(ve,{className:"size-5"}),(0,F.jsx)("span",{className:"hidden",children:"Close"})]})]})}),(0,F.jsx)(lt,{})]}),(0,F.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[(0,F.jsxs)("div",{className:x("relative rounded-lg border-dashed border-[2.5px] bg-gray-100 border-gray-300 px-6 py-16 text-center transition-colors mb-4",m?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50"),onDragEnter:w,onDragLeave:N,onDragOver:M,onDrop:D,children:[(0,F.jsx)("input",d(n({},T()),{className:"sr-only"})),(0,F.jsxs)("div",{className:"flex flex-col items-center",children:[(0,F.jsx)("div",{className:x("flex h-12 w-12 items-center justify-center rounded-full transition-colors",m?"border-primary bg-primary/10":"border-muted-foreground/25"),children:(0,F.jsx)(No,{className:"mb-3 text-zinc-400 dark:text-zinc-500"})}),(0,F.jsxs)("div",{className:"space-y-2",children:[(0,F.jsxs)("p",{className:"text-sm font-medium",children:["Drop files here or"," ",(0,F.jsx)("button",{type:"button",onClick:z,className:"cursor-pointer text-primary underline-offset-4 hover:underline",children:"browse files"})]}),(0,F.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c," \u2022 Max size: ",le(i)," \u2022 Max files: ",r]})]})]})]}),s.length>0&&(0,F.jsx)("div",{className:"space-y-4",children:(0,F.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3 lg:grid-cols-4",children:s.map(v=>(0,F.jsxs)("div",{className:"relative group",children:[(0,F.jsx)(C,{onClick:()=>h(v.id),variant:"outline",size:"icon",className:"absolute -end-2 -top-2 z-10 size-6 rounded-full opacity-0 transition-opacity group-hover:opacity-100",children:(0,F.jsx)(ve,{className:"size-3"})}),(0,F.jsxs)("div",{className:"relative overflow-hidden rounded-lg border bg-card transition-colors",children:[(0,F.jsx)("div",{className:"relative aspect-square bg-muted border-b border-border",children:(0,F.jsx)("div",{className:"flex h-full items-center justify-center p-4",children:(0,F.jsx)("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:v.status==="uploading"?(0,F.jsxs)("div",{className:"relative w-full h-full flex items-center justify-center",children:[(0,F.jsxs)("svg",{className:"size-12 -rotate-90 absolute",viewBox:"0 0 48 48",children:[(0,F.jsx)("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-muted-foreground/20"}),(0,F.jsx)("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:`${2*Math.PI*20}`,strokeDashoffset:`${2*Math.PI*20*(1-v.progress/100)}`,className:"text-primary transition-all duration-300",strokeLinecap:"round"})]}),v.file instanceof File&&se(v.file,v.preview)]}):v.file instanceof File&&se(v.file,v.preview)})})}),(0,F.jsx)("div",{className:"p-3",children:(0,F.jsxs)("div",{className:"space-y-1",children:[(0,F.jsx)("p",{className:"truncate text-xs font-medium",children:v.file.name}),(0,F.jsxs)("div",{className:"relative flex items-center justify-between gap-2",children:[(0,F.jsx)("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:le(v.file.size)}),v.status==="error"&&v.error&&(0,F.jsxs)(Fr,{children:[(0,F.jsx)(Mr,{asChild:!0,children:(0,F.jsx)(C,{onClick:()=>I(v.id),variant:"ghost",size:"icon",className:"absolute end-0 -top-1.25 size-6 text-destructive hover:bg-destructive/10 hover:text-destructive",children:(0,F.jsx)(Qa.RefreshCwIcon,{className:"size-3 opacity-100"})})}),(0,F.jsx)(Dr,{children:"Upload failed. Retry"})]})]})]})})]})]},v.id))})}),b.length>0&&(0,F.jsxs)(xr,{variant:"destructive",appearance:"light",className:"mt-5",children:[(0,F.jsx)(wr,{children:(0,F.jsx)(Qa.TriangleAlert,{})}),(0,F.jsxs)(yr,{children:[(0,F.jsx)(br,{children:"File upload error(s)"}),(0,F.jsx)(Cr,{children:b.map((v,G)=>(0,F.jsx)("p",{className:"last:mb-0",children:v},G))})]})]})]}),(0,F.jsxs)(He,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,F.jsx)(qe,{asChild:!0,children:(0,F.jsx)(C,{type:"button",radius:"full",variant:"outline",onClick:te,className:"w-full md:w-auto",children:"Cancel"})}),(0,F.jsxs)(C,{type:"button",radius:"full",onClick:Y,disabled:!L,className:"w-full md:w-auto",children:["Upload ",De>0&&`(${De})`]})]})]})})}var Ja=require("react");var ga=require("class-variance-authority");var jr=require("react/jsx-runtime"),Si=(0,ga.cva)(`
8
+ M20,51h2c1.103,0,2-0.897,2-2s-0.897-2-2-2h-2V51z`}),(0,J.jsx)("path",{fill:"#F0F0F0",d:"M19 57c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4C20 56.552 19.552 57 19 57zM25.001 57c-.367 0-.72-.202-.896-.553l-2-4c-.247-.494-.047-1.095.447-1.342.495-.248 1.095-.047 1.342.447l2 4c.247.494.047 1.095-.447 1.342C25.304 56.966 25.151 57 25.001 57z"})]})]}))}var wo=require("react/jsx-runtime");function qo(e){return(0,wo.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"100",height:"100"},e),{children:[(0,wo.jsx)("path",{fill:"#e8e9ea",d:`M8.16,17.51V3.74c0-1.79,1.45-3.24,3.24-3.24h20.53l12.79,12.8v30.96c0,1.79-1.45,3.24-3.24,3.24H11.4
9
+ c-1.79,0-3.24-1.45-3.24-3.24v-1.62`}),(0,wo.jsx)("path",{fill:"#697d7f",d:"M44.72 13.3h-9.93c-1.58 0-2.86-1.28-2.86-2.86V.5M11.53 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H4.78c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5H6.28v-2.76H11.53zM36.33 25.42c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-6.75c-.83 0-1.5.67-1.5 1.5v11.53c0 .83.67 1.5 1.5 1.5h6.75c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-5.25v-2.76h3.98c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5h-3.98v-2.76H36.33zM15.55 36.67c.26.19.57.28.87.28.47 0 .93-.22 1.22-.63l2.92-4.07 2.92 4.07c.29.41.75.63 1.22.63.3 0 .61-.09.87-.28.67-.48.83-1.42.34-2.09l-3.51-4.89 3.51-4.89c.48-.67.33-1.61-.34-2.09-.67-.48-1.61-.33-2.09.34l-2.92 4.07-2.92-4.07c-.48-.67-1.42-.83-2.09-.34-.67.48-.83 1.42-.34 2.09l3.51 4.89-3.51 4.89C14.72 35.25 14.87 36.19 15.55 36.67z"})]}))}var ao=require("react/jsx-runtime");function ro(e){return(0,ao.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 17.69 23.65",width:"100",height:"100"},e),{children:[(0,ao.jsx)("path",{fill:"#0ac963",d:"M3.08 0l7.91 0 6.7 6.99 0 13.58c0,1.7 -1.38,3.08 -3.08,3.08l-11.53 0c-1.7,0 -3.08,-1.38 -3.08,-3.08l0 -17.49c0,-1.7 1.38,-3.08 3.08,-3.08z"}),(0,ao.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"10.98 0 10.98 6.93 17.69 6.93"}),(0,ao.jsx)("path",{fill:"#fff",d:"M11.85 11.82l-6.01 0c-0.45,0 -0.82,0.37 -0.82,0.82l0 3.82c0,0.45 0.37,0.82 0.82,0.82l6.01 0c0.45,0 0.81,-0.37 0.81,-0.82l0 -3.82c0,-0.45 -0.36,-0.82 -0.81,-0.82zm-4.37 1.03c0.49,0 0.88,0.4 0.88,0.88 0,0.49 -0.39,0.89 -0.88,0.89 -0.49,0 -0.89,-0.4 -0.89,-0.89 0,-0.48 0.4,-0.88 0.89,-0.88zm4.64 3.61c0,0.15 -0.12,0.28 -0.27,0.28l-6.01 0c-0.15,0 -0.27,-0.13 -0.27,-0.28l0 -0.16 1.09 -1.09 0.9 0.9c0.11,0.11 0.28,0.11 0.39,0l2.26 -2.26 1.91 1.91 0 0.7 0 0z"})]}))}var no=require("react/jsx-runtime");function Qo(e){return(0,no.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 29.93 40.02",width:"100",height:"100"},e),{children:[(0,no.jsx)("path",{fill:"#fa0000",d:"M5.21 0l13.38 0 11.34 11.82 0 22.99c0,2.88 -2.33,5.21 -5.2,5.21l-19.52 0c-2.88,0 -5.21,-2.33 -5.21,-5.21l0 -29.6c0,-2.88 2.33,-5.21 5.21,-5.21z"}),(0,no.jsx)("polygon",{fill:"#fff",fillOpacity:".302",points:"18.58 0 18.58 11.73 29.93 11.73"}),(0,no.jsx)("path",{fill:"#fff",fillRule:"nonzero",d:"M14.97 18.16c-3.57,0 -6.47,2.9 -6.47,6.47 0,3.57 2.9,6.46 6.47,6.46 3.57,0 6.46,-2.89 6.46,-6.46 0,-3.57 -2.9,-6.46 -6.46,-6.47zm2.72 6.67c-0.05,0.09 -0.12,0.16 -0.21,0.21l0 0 -3.69 1.85c-0.23,0.11 -0.51,0.02 -0.62,-0.21 -0.04,-0.06 -0.05,-0.13 -0.05,-0.21l0 -3.69c0,-0.26 0.21,-0.46 0.46,-0.46 0.07,0 0.14,0.01 0.21,0.05l3.69 1.84c0.23,0.12 0.32,0.39 0.21,0.62z"})]}))}var Ze=require("react/jsx-runtime");function Jo(e){return(0,Ze.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[(0,Ze.jsx)("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
10
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),(0,Ze.jsx)("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
11
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),(0,Ze.jsx)("rect",{width:"58.6",height:"21.1",x:"1.6",y:"14.7",fill:"#ffffff"}),(0,Ze.jsx)("rect",{width:".8",height:"21.1",x:"1.6",y:"14.7",fill:"#f3f3f3"}),(0,Ze.jsx)("rect",{width:"58.6",height:".9",x:"1.6",y:"14.7",fill:"#f3f1f1"}),(0,Ze.jsx)("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
12
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),(0,Ze.jsx)("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
13
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}var Tt=require("react/jsx-runtime");function Xo(e){return(0,Tt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100",height:"100"},e),{children:[(0,Tt.jsx)("path",{fill:"#5a5959",d:`M2.1,57.4h57.7c1.1,0,2.1-0.9,2.1-2.1V13.4c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
14
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,5.7,0,6.6,0,7.8v47.5C0,56.4,0.9,57.4,2.1,57.4z`}),(0,Tt.jsx)("path",{fill:"#504e4e",d:`M3,58.3h56.7c1.1,0,2.1-0.9,2.1-2.1V14.3c0-1.1-0.9-2.1-2.1-2.1H31c-0.8,0-1.5-0.4-1.8-1.1l-1.7-3.4
15
+ c-0.4-0.7-1.1-1.1-1.8-1.1H2.1C0.9,6.6,0,7.6,0,8.7v46.6C0,56.9,1.3,58.3,3,58.3z`}),(0,Tt.jsx)("path",{fill:"#676666",d:`M64,18.6v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
16
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,15.6,64,17,64,18.6z`}),(0,Tt.jsx)("path",{fill:"#6f6d6d",d:`M64,19.5v35.8c0,1.7-1.3,3-3,3H3c-1.7,0-3-1.3-3-3v-31c0-1.7,1.3-3,3-3h29.2c0.8,0,1.6-0.3,2.1-0.9l3-3
17
+ c0.6-0.6,1.3-0.9,2.1-0.9H61C62.7,16.5,64,17.9,64,19.5z`})]}))}var Q=require("react/jsx-runtime");function Je(e){return(0,Q.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:(0,Q.jsxs)("g",{fill:"none",children:[(0,Q.jsx)("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"origin",mask:"url(#1752500502786-6297956_folder_mask_2iow0yqdp)"}),(0,Q.jsx)("path",{d:"M16.2 5C17.8802 5 18.7202 5 19.362 5.32698C19.9265 5.6146 20.3854 6.07354 20.673 6.63803C21 7.27976 21 8.11984 21 9.8V11.2C21 12.8802 21 13.7202 20.673 14.362C20.3854 14.9265 19.9265 15.3854 19.362 15.673C18.7202 16 17.8802 16 16.2 16H7.8C6.11984 16 5.27976 16 4.63803 15.673C4.07354 15.3854 3.6146 14.9265 3.32698 14.362C3 13.7202 3 12.8802 3 11.2L3 6.8C3 5.11984 3 4.27976 3.32698 3.63803C3.6146 3.07354 4.07354 2.6146 4.63803 2.32698C5.27976 2 6.11984 2 7.8 2L9.28741 2C9.91355 2 10.2266 2 10.5108 2.0863C10.7624 2.1627 10.9964 2.28796 11.1996 2.45491C11.429 2.64349 11.6027 2.90398 11.95 3.42496L13 5H16.2Z",fill:"url(#1752500502786-6297956_folder_existing_0_ekojck6b3)","data-glass":"clone",filter:"url(#1752500502786-6297956_folder_filter_56qas2ark)",clipPath:"url(#1752500502786-6297956_folder_clipPath_gygn8e14a)"}),(0,Q.jsx)("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)","data-glass":"blur"}),(0,Q.jsx)("path",{d:"M18.6807 9.00586C19.7975 9.02423 20.4692 9.09846 20.9864 9.39258C21.5915 9.73676 22.0586 10.2802 22.3067 10.9307C22.5894 11.6719 22.4426 12.6251 22.1495 14.5303L21.626 17.9297C21.4038 19.3742 21.2926 20.097 20.9385 20.6396L20.8155 20.8135C20.5147 21.2098 20.1193 21.5262 19.6641 21.7324C19.074 21.9997 18.3431 22 16.8819 22V21.25C17.624 21.25 18.1389 21.2495 18.543 21.2188C18.9374 21.1887 19.1709 21.133 19.3546 21.0498C19.7447 20.873 20.0766 20.5882 20.3106 20.2295C20.4208 20.0606 20.5119 19.8385 20.6016 19.4531C20.6935 19.0584 20.772 18.5489 20.8848 17.8154L21.4083 14.416C21.5568 13.4504 21.6601 12.7732 21.6954 12.2441C21.7302 11.7223 21.6913 11.4231 21.6055 11.1982C21.4194 10.7103 21.0693 10.3021 20.6153 10.0439C20.4061 9.92506 20.1166 9.84086 19.5958 9.7959C19.0675 9.75031 18.3823 9.75 17.4053 9.75H6.59479C5.61785 9.75 4.93266 9.75032 4.40436 9.7959C3.88353 9.84086 3.59399 9.92504 3.38483 10.0439C2.93088 10.3021 2.5807 10.7103 2.3946 11.1982C2.30885 11.4231 2.26996 11.7223 2.30475 12.2441C2.34005 12.7732 2.44331 13.4504 2.59186 14.416L3.1153 17.8154C3.22814 18.5489 3.30665 19.0584 3.3985 19.4531C3.4882 19.8385 3.5793 20.0606 3.68952 20.2295C3.92357 20.5882 4.25545 20.873 4.64558 21.0498C4.82929 21.133 5.06268 21.1887 5.4571 21.2188C5.86121 21.2495 6.37613 21.25 7.11823 21.25V22L6.14948 21.9961C5.44148 21.9856 4.96108 21.9493 4.56452 21.8213L4.336 21.7324C3.88079 21.5262 3.48544 21.2098 3.18464 20.8135L3.06159 20.6396C2.79608 20.2327 2.66703 19.7244 2.52546 18.8867L2.37409 17.9297L1.85065 14.5303C1.57585 12.744 1.42974 11.7947 1.64558 11.0723L1.6944 10.9307C1.91158 10.3615 2.29578 9.8738 2.79401 9.53027L3.01374 9.39258C3.70332 9.00046 4.66737 9 6.59479 9H17.4053L18.6807 9.00586ZM16.8819 21.25V22H7.11823V21.25H16.8819Z",fill:"url(#1752500502786-6297956_folder_existing_2_vhap9347d)"}),(0,Q.jsxs)("defs",{children:[(0,Q.jsxs)("linearGradient",{id:"1752500502786-6297956_folder_existing_0_ekojck6b3",x1:"12",y1:"2",x2:"12",y2:"16",gradientUnits:"userSpaceOnUse",children:[(0,Q.jsx)("stop",{stopColor:"#575757"}),(0,Q.jsx)("stop",{offset:"1",stopColor:"#151515"})]}),(0,Q.jsxs)("linearGradient",{id:"1752500502786-6297956_folder_existing_1_v5o9796uz",x1:"23",y1:"15.5",x2:"1",y2:"15.5",gradientUnits:"userSpaceOnUse",children:[(0,Q.jsx)("stop",{stopColor:"#E3E3E5",stopOpacity:".6"}),(0,Q.jsx)("stop",{offset:"1",stopColor:"#BBBBC0",stopOpacity:".6"})]}),(0,Q.jsxs)("linearGradient",{id:"1752500502786-6297956_folder_existing_2_vhap9347d",x1:"12",y1:"9",x2:"12",y2:"16.528",gradientUnits:"userSpaceOnUse",children:[(0,Q.jsx)("stop",{stopColor:"#fff"}),(0,Q.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0"})]}),(0,Q.jsx)("filter",{id:"1752500502786-6297956_folder_filter_56qas2ark",x:"-100%",y:"-100%",width:"400%",height:"400%",filterUnits:"objectBoundingBox",primitiveUnits:"userSpaceOnUse",children:(0,Q.jsx)("feGaussianBlur",{stdDeviation:"2",x:"0%",y:"0%",width:"100%",height:"100%",in:"SourceGraphic",edgeMode:"none",result:"blur"})}),(0,Q.jsx)("clipPath",{id:"1752500502786-6297956_folder_clipPath_gygn8e14a",children:(0,Q.jsx)("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"url(#1752500502786-6297956_folder_existing_1_v5o9796uz)"})}),(0,Q.jsxs)("mask",{id:"1752500502786-6297956_folder_mask_2iow0yqdp",children:[(0,Q.jsx)("rect",{width:"100%",height:"100%",fill:"#FFF"}),(0,Q.jsx)("path",{d:"M17.4051 9C19.3327 9 20.2965 9 20.9861 9.39213C21.5914 9.73631 22.0581 10.2803 22.3062 10.9309C22.5889 11.6721 22.4424 12.6247 22.1492 14.5299L21.6262 17.9299C21.4039 19.3744 21.2928 20.0966 20.9388 20.6393C20.6267 21.1176 20.1846 21.4969 19.6644 21.7326C19.0742 22 18.3435 22 16.882 22L7.11801 22C5.65653 22 4.92579 22 4.33558 21.7326C3.8154 21.4969 3.3733 21.1176 3.06124 20.6393C2.70717 20.0966 2.59606 19.3744 2.37383 17.9299L1.85075 14.5299C1.55764 12.6247 1.41109 11.6721 1.6938 10.9309C1.94194 10.2803 2.40865 9.73631 3.01392 9.39213C3.70353 9 4.66733 9 6.59493 9L17.4051 9Z",fill:"#000"})]})]})]})}))}var Co=require("react/jsx-runtime");function ea(e){return(0,Co.jsxs)("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[(0,Co.jsx)("path",{opacity:"0.4",d:"M13.4919 2.29395C13.0743 1.94268 12.5457 1.75 11.9997 1.75C11.5221 1.75 11.058 1.89775 10.6697 2.16992L10.5085 2.29395L1.5974 9.78906C1.18491 10.1364 1.13178 10.7528 1.47924 11.165C1.78946 11.5327 2.31307 11.6121 2.71557 11.3789V15.9531V15.955C2.71555 17.0543 2.71553 17.9612 2.7976 18.6885C2.88313 19.4463 3.06823 20.1292 3.52318 20.7217L3.68627 20.9199C3.85487 21.1119 4.04268 21.2876 4.24584 21.4434L4.47143 21.6016C5.01004 21.9427 5.61706 22.0932 6.281 22.168C7.00121 22.2491 7.89724 22.249 8.98176 22.249H8.99975H14.9997H15.0178C16.1023 22.249 16.9983 22.2491 17.7185 22.168C18.4771 22.0825 19.1606 21.8977 19.7537 21.4434L19.9529 21.2803C20.145 21.1119 20.3205 20.9245 20.4763 20.7217L20.6345 20.4961C20.976 19.9581 21.127 19.3517 21.2019 18.6885C21.284 17.9612 21.2839 17.0543 21.2839 15.955V15.9531V11.3789C21.6864 11.6121 22.21 11.5327 22.5203 11.165C22.846 10.7785 22.8199 10.2127 22.4753 9.85742L13.4919 2.29395Z",fill:"#141B34"}),(0,Co.jsx)("path",{d:"M14.9998 17V22.249H8.99979V17C8.99979 15.5859 9.00002 14.8788 9.43924 14.4395C9.87855 14.0001 10.5857 14 11.9998 14C13.4139 14 14.121 14.0002 14.5603 14.4395C14.9997 14.8788 14.9998 15.5858 14.9998 17Z",fill:"#141B34"})]}))}var ka=require("react/jsx-runtime");function Me(e){return(0,ka.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 48 48","aria-hidden":"true"},e),{children:(0,ka.jsx)("path",{fill:"currentColor",d:"M46.599 46.599a4.498 4.498 0 0 1-6.363 0l-7.941-7.941C29.028 40.749 25.167 42 21 42 9.402 42 0 32.598 0 21S9.402 0 21 0s21 9.402 21 21c0 4.167-1.251 8.028-3.342 11.295l7.941 7.941a4.498 4.498 0 0 1 0 6.363zM21 6C12.717 6 6 12.714 6 21s6.717 15 15 15c8.286 0 15-6.714 15-15S29.286 6 21 6z"})}))}var yo=require("react/jsx-runtime");function Xe(e){return(0,yo.jsxs)("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[(0,yo.jsx)("path",{fill:"currentColor",opacity:"0.4",d:"M20.4155 3.66085C22.3012 5.52939 19.2842 20.7253 16.1883 20.9931C13.5911 21.2177 12.7819 16.0954 12.2348 14.4719C11.695 12.8696 11.0943 12.2927 9.50513 11.767C5.46811 10.4315 3.4496 9.76374 3.04996 8.70639C1.99171 5.90649 18.0071 1.27438 20.4155 3.66085Z"}),(0,yo.jsx)("path",{fill:"currentColor",d:"M3.04996 8.70639C3.4496 9.76374 5.46811 10.4315 9.50513 11.767C10.3308 12.0402 10.8897 12.3271 11.3118 12.7646L20.4155 3.66085C18.0071 1.27438 1.99171 5.90649 3.04996 8.70639Z"})]}))}var dr=require("react/jsx-runtime");var Fo=require("react/jsx-runtime");function Et(e){return(0,Fo.jsxs)("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),{children:[(0,Fo.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.75 11.7499C18.3023 11.7499 18.75 12.1977 18.75 12.7499V15.7499H21.75C22.3023 15.7499 22.75 16.1977 22.75 16.7499C22.75 17.3022 22.3023 17.7499 21.75 17.7499H18.75V20.7499C18.75 21.3022 18.3023 21.7499 17.75 21.7499C17.1977 21.7499 16.75 21.3022 16.75 20.7499V17.7499H13.75C13.1977 17.7499 12.75 17.3022 12.75 16.7499C12.75 16.1977 13.1977 15.7499 13.75 15.7499H16.75V12.7499C16.75 12.1977 17.1977 11.7499 17.75 11.7499Z",fill:"currentColor"}),(0,Fo.jsx)("path",{opacity:"0.4",d:"M9.4626 2.48876C8.82373 2.24919 8.11205 2.24951 7.08264 2.24996C6.2039 2.24995 5.32205 2.24999 4.7497 2.30044C4.15996 2.35243 3.64388 2.46238 3.17258 2.7254C2.56533 3.06428 2.06428 3.56534 1.7254 4.17258C1.46238 4.64388 1.35242 5.15996 1.30044 5.7497C1.24999 6.32205 1.24999 7.03077 1.25 7.9095V11.0574C1.24999 13.3658 1.24998 15.1748 1.43975 16.5863C1.63399 18.031 2.03933 19.1711 2.93414 20.0659C3.82895 20.9607 4.96897 21.366 6.41371 21.5603C7.82519 21.75 9.63423 21.75 11.9426 21.75H13.2923C14.1084 21.75 14.8409 21.75 15.5 21.7383V18.9999H13.75C12.5074 18.9999 11.5 17.9926 11.5 16.7499C11.5 15.5073 12.5074 14.4999 13.75 14.4999H15.5V12.7499C15.5 11.5073 16.5074 10.4999 17.75 10.4999C18.9926 10.4999 20 11.5073 20 12.7499V14.4999H22.7383C22.75 13.8408 22.75 13.1084 22.75 12.2923C22.75 11.2733 22.75 10.3688 22.683 9.70949C22.6137 9.02893 22.4669 8.43872 22.118 7.91661C21.8444 7.50715 21.4929 7.15559 21.0834 6.88199C20.5613 6.53313 19.9711 6.38628 19.2905 6.31705C18.6312 6.24998 17.8095 6.24999 16.7905 6.25L13.2361 6.25C12.92 6.25 12.7396 6.24908 12.6064 6.23531C12.5044 6.22817 12.4348 6.15255 12.4128 6.11563C12.3409 6.0027 12.0838 5.48909 11.9425 5.20636C11.4704 4.25121 10.8581 3.01205 9.4626 2.48876Z",fill:"currentColor"})]}))}var Pa=require("react/jsx-runtime");function dt(e){return(0,Pa.jsx)("svg",s(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,Pa.jsx)("path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"#141B34",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}var Sa=require("react/jsx-runtime");function io(e){return(0,Sa.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:(0,Sa.jsx)("path",{fill:"currentColor",d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76z"})}))}var za=require("react/jsx-runtime");function Lt(e){return(0,za.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},e),{children:(0,za.jsx)("path",{fill:"currentColor",d:"M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"})}))}var lo=require("react/jsx-runtime");function Ue(e){return(0,lo.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:[(0,lo.jsx)("path",{fill:"currentColor",d:"M3 6.386c0-.484.345-.877.771-.877h2.665c.529-.016.996-.399 1.176-.965l.03-.1l.115-.391c.07-.24.131-.45.217-.637c.338-.739.964-1.252 1.687-1.383c.184-.033.378-.033.6-.033h3.478c.223 0 .417 0 .6.033c.723.131 1.35.644 1.687 1.383c.086.187.147.396.218.637l.114.391l.03.1c.18.566.74.95 1.27.965h2.57c.427 0 .772.393.772.877s-.345.877-.771.877H3.77c-.425 0-.77-.393-.77-.877"}),(0,lo.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.425 11.482c.413-.044.78.273.821.707l.5 5.263c.041.433-.26.82-.671.864c-.412.043-.78-.273-.821-.707l-.5-5.263c-.041-.434.26-.821.671-.864m5.15 0c.412.043.713.43.671.864l-.5 5.263c-.04.434-.408.75-.82.707c-.413-.044-.713-.43-.672-.864l.5-5.264c.041-.433.409-.75.82-.707",clipRule:"evenodd"}),(0,lo.jsx)("path",{fill:"currentColor",d:"M11.596 22h.808c2.783 0 4.174 0 5.08-.886c.904-.886.996-2.339 1.181-5.245l.267-4.188c.1-1.577.15-2.366-.303-2.865c-.454-.5-1.22-.5-2.753-.5H8.124c-1.533 0-2.3 0-2.753.5s-.404 1.288-.303 2.865l.267 4.188c.185 2.906.277 4.36 1.182 5.245c.905.886 2.296.886 5.079.886",opacity:"0.5"})]}))}var Ra=require("react/jsx-runtime");function ie(e){return(0,Ra.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),{children:(0,Ra.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"})}))}var At=require("react/jsx-runtime");function ta(e){return(0,At.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,At.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,At.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,At.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,At.jsx)("path",{d:"M12 4l0 12"})]}))}var _t=require("react/jsx-runtime");function oa(e){return(0,_t.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,_t.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,_t.jsx)("path",{d:"M9 15l6 -6"}),(0,_t.jsx)("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),(0,_t.jsx)("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]}))}var Ta=require("react/jsx-runtime");function aa(e){return(0,Ta.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:(0,Ta.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.944 1.25H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S3.025 4.705 2.89 5.71c-.138 1.029-.14 2.383-.14 4.29a.75.75 0 0 1-1.5 0v-.056c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153m8.345 1.64c-1.027-.138-2.382-.14-4.289-.14a.75.75 0 0 1 0-1.5h.056c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238c.748.749 1.08 1.698 1.238 2.87c.153 1.14.153 2.595.153 4.433V10a.75.75 0 0 1-1.5 0c0-1.907-.002-3.261-.14-4.29c-.135-1.005-.389-1.585-.812-2.008s-1.003-.677-2.009-.812M2 13.25a.75.75 0 0 1 .75.75c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V14a.75.75 0 0 1 .75-.75m20 0a.75.75 0 0 1 .75.75v.056c0 1.838 0 3.294-.153 4.433c-.158 1.172-.49 2.121-1.238 2.87c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812s.677-1.003.812-2.009c.138-1.027.14-2.382.14-4.289a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})}))}var Mo=require("react/jsx-runtime");function et(e){return(0,Mo.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,Mo.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,Mo.jsx)("path",{d:"M5 12l5 5l10 -10"})]}))}var Ea=require("react/jsx-runtime");function so(e){return(0,Ea.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:(0,Ea.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-5.97-3.03a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})}))}var La=require("react/jsx-runtime");function co(e){return(0,La.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 72 72",fill:"currentColor"},e),{children:(0,La.jsx)("path",{d:"M38.406 22.234l11.36 11.36L28.784 54.576l-12.876 4.307c-1.725.577-3.367-1.065-2.791-2.79l4.307-12.876L38.406 22.234zM41.234 19.406l5.234-5.234c1.562-1.562 4.095-1.562 5.657 0l5.703 5.703c1.562 1.562 1.562 4.095 0 5.657l-5.234 5.234L41.234 19.406z"})}))}var po=require("react/jsx-runtime");function Vt(e){return(0,po.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,po.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,po.jsx)("circle",{cx:"19",cy:"12",r:"1"}),(0,po.jsx)("circle",{cx:"5",cy:"12",r:"1"})]}))}var Aa=require("react/jsx-runtime");function ra(e){return(0,Aa.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:(0,Aa.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6.75a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5zm0 14a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5zM13.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0z",fill:"#000000"})}))}var _a=require("react/jsx-runtime");function na(e){return(0,_a.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:(0,_a.jsx)("path",{d:"M18 11h-12c-1.104 0-2 .896-2 2s.896 2 2 2h12c1.104 0 2-.896 2-2s-.896-2-2-2z"})}))}var Oe=require("react/jsx-runtime");function ve(e){return(0,Oe.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,Oe.jsx)("path",{d:"M12 3L12 6",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M21 12L18 12",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M12 21L12 18",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M3 12L6 12",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M5.63586 5.63605L7.75718 7.75737",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M18.3639 5.63605L16.2426 7.75737",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M18.3641 18.3639L16.2428 16.2426",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Oe.jsx)("path",{d:"M5.63623 18.3639L7.75755 16.2426",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))}var Gt=require("react/jsx-runtime");function Do(e){return(0,Gt.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,Gt.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,Gt.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("g",{id:"SVGRepo_iconCarrier",children:(0,Gt.jsx)("path",{d:"M21.4086 9.35258C23.5305 10.5065 23.5305 13.4935 21.4086 14.6474L8.59662 21.6145C6.53435 22.736 4 21.2763 4 18.9671L4 5.0329C4 2.72368 6.53435 1.26402 8.59661 2.38548L21.4086 9.35258Z",fill:"#000000"})})]}))}var Va=require("react/jsx-runtime");function ia(e){return(0,Va.jsx)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:(0,Va.jsx)("path",{clipRule:"evenodd",d:"M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM7 9V3H9V9H7ZM7 13V11H9V13H7Z",fill:"#030708",fillRule:"evenodd"})}))}var Ot=require("react/jsx-runtime");function la(e){return(0,Ot.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,Ot.jsx)("path",{id:"primary",d:"M14,18H9A6,6,0,0,1,5.54,7.11",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,Ot.jsx)("path",{id:"primary-2","data-name":"primary",d:"M10,6h5a6,6,0,0,1,3.46,10.89",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,Ot.jsx)("polyline",{id:"primary-3","data-name":"primary",points:"12 16 14 18 12 20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,Ot.jsx)("polyline",{id:"primary-4","data-name":"primary",points:"12 8 10 6 12 4",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]}))}var hi=require("react/jsx-runtime");var ct=require("react/jsx-runtime"),cr=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return(0,ct.jsx)("nav",r({"data-slot":"pagination",role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e)},t))};function pr(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,ct.jsx)("ul",r({"data-slot":"pagination-content",className:x("flex flex-row items-center gap-1",e)},t))}function Io(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,ct.jsx)("li",r({"data-slot":"pagination-item",className:x("",e)},t))}var mr=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return(0,ct.jsxs)("span",s(r({"data-slot":"pagination-ellipsis","aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e)},t),{children:[(0,ct.jsx)(Vt,{className:"h-4 w-4"}),(0,ct.jsx)("span",{className:"sr-only",children:"More pages"})]}))};var ur=require("class-variance-authority");var fr=require("radix-ui");var gr=require("react/jsx-runtime"),xi=(0,ur.cva)("cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",mono:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",outline:"bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",dashed:"text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",ghost:"text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",dim:"text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",foreground:"",inverse:""},appearance:{default:"",ghost:""},underline:{solid:"",dashed:""},underlined:{solid:"",dashed:""},size:{lg:"h-10 px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",md:"h-9 px-3 gap-1.5 text-sm [&_svg:not([class*=size-])]:size-4",sm:"h-8 px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",xs:"h-7 px-2 gap-1 text-xs [&_svg:not([class*=size-])]:size-3.5",icon:"size-9 [&_svg:not([class*=size-])]:size-4 shrink-0"},autoHeight:{true:"",false:""},radius:{md:"rounded-md",full:"rounded-full"},mode:{default:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",icon:"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",link:"text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",input:`
18
+ justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background
19
+ focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30
20
+ [[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px]
21
+ [[data-state=open]>&]:ring-ring/30
22
+ aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
23
+ in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10 dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
24
+ `},placeholder:{true:"text-muted-foreground",false:""}},compoundVariants:[{variant:"ghost",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"dashed",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"secondary",mode:"default",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"input",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{variant:"outline",mode:"icon",className:"[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"},{size:"xs",autoHeight:!0,className:"h-auto min-h-7"},{size:"md",autoHeight:!0,className:"h-auto min-h-9"},{size:"sm",autoHeight:!0,className:"h-auto min-h-8"},{size:"lg",autoHeight:!0,className:"h-auto min-h-10"},{variant:"primary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"default",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"mono",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"secondary",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"outline",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"dashed",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"destructive",mode:"icon",appearance:"default",className:"shadow-xs shadow-black/5"},{variant:"primary",mode:"link",underline:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"primary",mode:"link",underline:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"primary",mode:"link",underlined:"solid",className:"font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"primary",mode:"link",underlined:"dashed",className:"font-medium text-primary hover:text-primary/90 [&_svg]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underline:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"inverse",mode:"link",underline:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"inverse",mode:"link",underlined:"solid",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"inverse",mode:"link",underlined:"dashed",className:"font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underline:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"},{variant:"foreground",mode:"link",underline:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"},{variant:"foreground",mode:"link",underlined:"solid",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"},{variant:"foreground",mode:"link",underlined:"dashed",className:"font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"},{variant:"primary",appearance:"ghost",className:"bg-transparent text-primary/90 hover:bg-primary/5 data-[state=open]:bg-primary/5"},{variant:"destructive",appearance:"ghost",className:"bg-transparent text-destructive/90 hover:bg-destructive/5 data-[state=open]:bg-destructive/5"},{variant:"ghost",mode:"icon",className:"text-muted-foreground"},{size:"xs",mode:"icon",className:"w-7 h-7 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"sm",mode:"icon",className:"w-8 h-8 p-0 [[&_svg:not([class*=size-])]:size-3.5"},{size:"md",mode:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"icon",className:"w-9 h-9 p-0 [&_svg:not([class*=size-])]:size-4"},{size:"lg",mode:"icon",className:"w-10 h-10 p-0 [&_svg:not([class*=size-])]:size-4"},{mode:"input",placeholder:!0,variant:"outline",className:"font-normal text-muted-foreground"},{mode:"input",variant:"outline",size:"sm",className:"gap-1.25"},{mode:"input",variant:"outline",size:"md",className:"gap-1.5"},{mode:"input",variant:"outline",size:"lg",className:"gap-1.5"}],defaultVariants:{variant:"primary",mode:"default",size:"md",radius:"md",appearance:"default"}});function C(y){var w=y,{className:e,selected:t,variant:o,radius:a,appearance:n,mode:i,size:l,autoHeight:c,underlined:d,underline:f,asChild:m=!1,placeholder:b=!1}=w,p=g(w,["className","selected","variant","radius","appearance","mode","size","autoHeight","underlined","underline","asChild","placeholder"]);let I=m?fr.Slot.Slot:"button";return(0,gr.jsx)(I,r(r({"data-slot":"button",className:x(xi({variant:o,size:l,radius:a,appearance:n,mode:i,autoHeight:c,placeholder:b,underlined:d,underline:f,className:e}),m&&p.disabled&&"pointer-events-none opacity-50")},t&&{"data-state":"open"}),p))}var ce=require("react/jsx-runtime");function bi(e,t){let o=[];if(t<=7)for(let a=1;a<=t;a++)o.push(a);else e<=4?o.push(1,2,3,4,5,"ellipsis",t):e>=t-3?o.push(1,"ellipsis",t-4,t-3,t-2,t-1,t):o.push(1,"ellipsis",e-1,e,e+1,"ellipsis",t);return o}function hr({className:e}){let{pagination:t,handlePageChange:o,files:a,folders:n}=G(),{currentPage:i,totalPages:l}=t,c=((a==null?void 0:a.length)||0)+((n==null?void 0:n.length)||0);if(l<=1||c===0)return null;let d=bi(i,l);return(0,ce.jsx)(cr,{className:e,children:(0,ce.jsxs)(pr,{children:[(0,ce.jsx)(Io,{children:(0,ce.jsx)(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===1,onClick:()=>i>1&&o(i-1),children:(0,ce.jsxs)("span",{children:[(0,ce.jsx)(io,{className:"rtl:rotate-180"})," Previous"]})})}),d.map((f,m)=>f==="ellipsis"?(0,ce.jsx)(Io,{children:(0,ce.jsx)(mr,{})},`ellipsis-${i}-${l}-${m}`):(0,ce.jsx)(Io,{children:(0,ce.jsx)(C,{variant:f===i?"outline":"ghost",mode:"icon",size:"icon",radius:"full",asChild:!0,onClick:()=>o(f),disabled:f===i,children:(0,ce.jsx)("span",{children:f})})},f)),(0,ce.jsx)(Io,{children:(0,ce.jsx)(C,{variant:"ghost",radius:"full",asChild:!0,disabled:i===l,onClick:()=>i<l&&o(i+1),children:(0,ce.jsxs)("span",{children:["Next ",(0,ce.jsx)(dt,{className:"rtl:rotate-180"})]})})})]})})}var xr=require("react/jsx-runtime");function vr({children:e,className:t}){return(0,xr.jsx)("div",{className:x("p-4 flex md:flex-row gap-2",t),children:e})}var jr=require("react");var br=require("class-variance-authority");var pt=require("radix-ui");var xe=require("react/jsx-runtime"),wi=(0,br.cva)("flex flex-col fixed outline-0 z-50 border border-border bg-background shadow-lg shadow-black/5 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-2xl",{variants:{variant:{default:"left-[50%] top-[50%] max-w-lg translate-x-[-50%] translate-y-[-50%] w-full p-6 max-h-[90dvh]",fullscreen:"top-5 left-5 right-5 bottom-5"}},defaultVariants:{variant:"default"}});function Te(t){var e=g(t,[]);return(0,xe.jsx)(pt.Dialog.Root,r({"data-slot":"dialog"},e))}function Ci(t){var e=g(t,[]);return(0,xe.jsx)(pt.Dialog.Portal,r({"data-slot":"dialog-portal"},e))}function tt(t){var e=g(t,[]);return(0,xe.jsx)(pt.Dialog.Close,r({"data-slot":"dialog-close"},e))}function yi(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,xe.jsx)(pt.Dialog.Overlay,r({"data-slot":"dialog-overlay",className:x("fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t))}function Ee(l){var c=l,{className:e,children:t,showCloseButton:o=!0,overlay:a=!0,variant:n}=c,i=g(c,["className","children","showCloseButton","overlay","variant"]);return(0,xe.jsxs)(Ci,{children:[a&&(0,xe.jsx)(yi,{}),(0,xe.jsxs)(pt.Dialog.Content,s(r({"data-slot":"dialog-content",className:x(wi({variant:n}),e)},i),{children:[t,o&&(0,xe.jsxs)(tt,{className:"cursor-pointer outline-0 absolute end-5 top-5 rounded-full opacity-60 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,xe.jsx)(ie,{className:"size-4"}),(0,xe.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})}var je=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return(0,xe.jsx)("div",r({"data-slot":"dialog-header",className:x("flex flex-col space-y-1 text-center sm:text-start mb-5",e)},t))},We=o=>{var a=o,{className:e}=a,t=g(a,["className"]);return(0,xe.jsx)("div",r({"data-slot":"dialog-footer",className:x("flex flex-col-reverse sm:flex-row sm:justify-end pt-5 sm:space-x-2.5",e)},t))};function Le(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,xe.jsx)(pt.Dialog.Title,r({"data-slot":"dialog-title",className:x("text-lg font-semibold leading-none tracking-tight",e)},t))}function mt(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,xe.jsx)(pt.Dialog.Description,r({"data-slot":"dialog-description",className:x("text-sm text-muted-foreground",e)},t))}var wr=require("class-variance-authority");var ot=require("react/jsx-runtime"),Fi=(0,wr.cva)("flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",{variants:{variant:{secondary:"",primary:"",destructive:"",success:"",info:"",mono:"",warning:""},icon:{primary:"",destructive:"",success:"",info:"",warning:""},appearance:{solid:"",outline:"",light:"",stroke:"text-foreground"},size:{lg:"rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 *:data-slot=alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-1",md:"rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 *:data-slot=alert-icon:mt-0 [&_[data-slot=alert-close]]:mt-0.5",sm:"rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 *:data-alert-icon:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"}},compoundVariants:[{variant:"secondary",appearance:"solid",className:"bg-muted text-foreground"},{variant:"primary",appearance:"solid",className:"bg-primary text-primary-foreground"},{variant:"destructive",appearance:"solid",className:"bg-destructive text-destructive-foreground"},{variant:"success",appearance:"solid",className:"bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"},{variant:"info",appearance:"solid",className:"bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"},{variant:"warning",appearance:"solid",className:"bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"},{variant:"mono",appearance:"solid",className:"bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black *:data-slot-[alert=close]:text-white"},{variant:"secondary",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"primary",appearance:"outline",className:"border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"},{variant:"destructive",appearance:"outline",className:"border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"},{variant:"success",appearance:"outline",className:"border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"info",appearance:"outline",className:"border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"warning",appearance:"outline",className:"border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"},{variant:"mono",appearance:"outline",className:"border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"},{variant:"secondary",appearance:"light",className:"bg-muted border border-border text-foreground"},{variant:"primary",appearance:"light",className:"text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"},{variant:"destructive",appearance:"light",className:"bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "},{variant:"success",appearance:"light",className:"bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"},{variant:"info",appearance:"light",className:"bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"},{variant:"warning",appearance:"light",className:"bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"},{variant:"mono",icon:"primary",className:"[&_[data-slot=alert-icon]]:text-primary"},{variant:"mono",icon:"warning",className:"[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"},{variant:"mono",icon:"success",className:"[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"},{variant:"mono",icon:"destructive",className:"[&_[data-slot=alert-icon]]:text-destructive"},{variant:"mono",icon:"info",className:"[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"}],defaultVariants:{variant:"secondary",appearance:"solid",size:"md"}});function Cr(f){var m=f,{className:e,variant:t,size:o,icon:a,appearance:n,close:i=!1,onClose:l,children:c}=m,d=g(m,["className","variant","size","icon","appearance","close","onClose","children"]);return(0,ot.jsxs)("div",s(r({"data-slot":"alert",role:"alert",className:x(Fi({variant:t,size:o,icon:a,appearance:n}),e)},d),{children:[c,i&&(0,ot.jsx)("button",{onClick:l,"aria-label":"Dismiss","data-slot":"alert-close",className:x("group shrink-0 size-4 cursor-pointer"),children:(0,ot.jsx)(ie,{className:"opacity-60 group-hover:opacity-100 size-4"})})]}))}function yr(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,ot.jsx)("div",r({"data-slot":"alert-title",className:x("grow tracking-tight",e)},t))}function Fr(a){var n=a,{children:e,className:t}=n,o=g(n,["children","className"]);return(0,ot.jsx)("div",s(r({"data-slot":"alert-icon",className:x("shrink-0",t)},o),{children:e}))}function Mr(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,ot.jsx)("div",r({"data-slot":"alert-description",className:x("text-sm [&_p]:leading-relaxed [&_p]:mb-2",e)},t))}function Dr(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,ot.jsx)("div",r({"data-slot":"alert-content",className:x("space-y-2 [&_[data-slot=alert-title]]:font-semibold",e)},t))}var Ae=Go(require("@radix-ui/react-tooltip"));var at=require("react/jsx-runtime");function Mi(o){var a=o,{delayDuration:e=0}=a,t=g(a,["delayDuration"]);return(0,at.jsx)(Ae.Provider,r({"data-slot":"tooltip-provider",delayDuration:e},t))}function Ir(t){var e=g(t,[]);return(0,at.jsx)(Mi,{children:(0,at.jsx)(Ae.Root,r({"data-slot":"tooltip"},e))})}function Nr(t){var e=g(t,[]);return(0,at.jsx)(Ae.Trigger,r({"data-slot":"tooltip-trigger"},e))}function kr(n){var i=n,{className:e,sideOffset:t=0,children:o}=i,a=g(i,["className","sideOffset","children"]);return(0,at.jsx)(Ae.Portal,{children:(0,at.jsxs)(Ae.Content,s(r({"data-slot":"tooltip-content",sideOffset:t,className:x("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e)},a),{children:[o,(0,at.jsx)(Ae.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})}function se(e){if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(t));return Number.parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+o[a]}var re=require("react");var Pr=(e={})=>{let{maxFiles:t=Number.POSITIVE_INFINITY,maxSize:o=Number.POSITIVE_INFINITY,accept:a="*",multiple:n=!1,initialFiles:i=[],onFilesChange:l,onFilesAdded:c,onError:d}=e,[f,m]=(0,re.useState)({files:i.map(u=>({file:u,id:u.id,preview:u.url})),isDragging:!1,errors:[]}),b=(0,re.useRef)(null);(0,re.useEffect)(()=>()=>{f.files.forEach(u=>{u.preview&&u.file instanceof File&&URL.revokeObjectURL(u.preview)})},[f.files]);let p=(0,re.useCallback)(u=>{if(u instanceof File){if(u.size>o)return`File "${u.name}" exceeds the maximum size of ${se(o)}.`}else if(u.size>o)return`File "${u.name}" exceeds the maximum size of ${se(o)}.`;if(a!=="*"){let _=a.split(",").map(W=>W.trim()),v=u instanceof File?u.type||"":u.type,O=`.${u instanceof File,u.name.split(".").pop()}`;if(!_.some(W=>{if(W.startsWith("."))return O.toLowerCase()===W.toLowerCase();if(W.endsWith("/*")){let Ce=W.split("/")[0];return v.startsWith(`${Ce}/`)}return v===W}))return`File "${u instanceof File,u.name}" is not an accepted file type.`}return null},[a,o]),y=(0,re.useCallback)(u=>u instanceof File?URL.createObjectURL(u):u.url,[]),w=(0,re.useCallback)(u=>u instanceof File?`${u.name}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`:u.id.toString(),[]),I=(0,re.useCallback)(()=>{m(u=>{for(let v of u.files)v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);b.current&&(b.current.value="");let _=s(r({},u),{files:[],errors:[]});return l==null||l(_.files),_})},[l]),M=(0,re.useCallback)(u=>{if(!u||u.length===0)return;let _=Array.from(u),v=[];m(O=>s(r({},O),{errors:[]})),n||I(),m(O=>{if(n&&t!==Number.POSITIVE_INFINITY&&O.files.length+_.length>t)return v.push(`You can only upload a maximum of ${t} files.`),d==null||d(v),s(r({},O),{errors:v});let B=[];for(let W of _){if(n&&O.files.some(A=>A.file.name===W.name&&A.file.size===W.size))continue;if(W.size>o){v.push(n?`Some files exceed the maximum size of ${se(o)}.`:`File exceeds the maximum size of ${se(o)}.`);continue}let Ce=p(W);Ce?v.push(Ce):B.push({file:W,id:w(W),preview:y(W)})}if(B.length>0){c==null||c(B);let W=n?[...O.files,...B]:B;return l==null||l(W),s(r({},O),{files:W,errors:v})}else if(v.length>0)return d==null||d(v),s(r({},O),{errors:v});return O}),b.current&&(b.current.value="")},[t,n,o,p,y,w,I,l,c,d]),D=(0,re.useCallback)(u=>{m(_=>{let v=_.files.find(B=>B.id===u);v&&v.preview&&v.file instanceof File&&v.file.type.startsWith("image/")&&URL.revokeObjectURL(v.preview);let O=_.files.filter(B=>B.id!==u);return l==null||l(O),s(r({},_),{files:O,errors:[]})})},[l]),z=(0,re.useCallback)(()=>{m(u=>s(r({},u),{errors:[]}))},[]),R=(0,re.useCallback)(u=>{u.preventDefault(),u.stopPropagation(),m(_=>s(r({},_),{isDragging:!0}))},[]),h=(0,re.useCallback)(u=>{u.preventDefault(),u.stopPropagation(),!u.currentTarget.contains(u.relatedTarget)&&m(_=>s(r({},_),{isDragging:!1}))},[]),N=(0,re.useCallback)(u=>{u.preventDefault(),u.stopPropagation()},[]),Y=(0,re.useCallback)(u=>{var _;if(u.preventDefault(),u.stopPropagation(),m(v=>s(r({},v),{isDragging:!1})),!((_=b.current)!=null&&_.disabled)&&u.dataTransfer.files&&u.dataTransfer.files.length>0)if(n)M(u.dataTransfer.files);else{let v=u.dataTransfer.files[0];M([v])}},[M,n]),te=(0,re.useCallback)(u=>{u.target.files&&u.target.files.length>0&&M(u.target.files)},[M]),de=(0,re.useCallback)(()=>{b.current&&b.current.click()},[]),Ne=(0,re.useCallback)((u={})=>s(r({},u),{type:"file",onChange:te,accept:u.accept||a,multiple:u.multiple!==void 0?u.multiple:n,ref:b}),[a,n,te]);return[f,{addFiles:M,removeFile:D,clearFiles:I,clearErrors:z,handleDragEnter:R,handleDragLeave:h,handleDragOver:N,handleDrop:Y,handleFileChange:te,openFileDialog:de,getInputProps:Ne}]};var da=require("lucide-react");var Ga=Go(require("mime"));var be=require("react/jsx-runtime");function $e(e,t){if(typeof e!="string")return console.warn("getFileTypeFromMime: mimeType is not a string:",e),X.FILE;let o=e;if(t){let a=t.toLowerCase().replace(/^\./,""),n=Ga.default.getType(a);n&&(o=n)}return o.startsWith("image/")?X.IMAGE:o.startsWith("video/")?X.VIDEO:o.startsWith("audio/")?X.AUDIO:X.FILE}function sa(e,t){let o=e;if(t){let a=t.toLowerCase().replace(/^\./,""),n=Ga.default.getType(a);n&&(o=n)}if(o.startsWith("image/"))return"image";if(o.startsWith("video/"))return"video";if(o.startsWith("audio/"))return"audio";switch(o){case"application/pdf":return"pdf";case"application/json":return"json";case"application/zip":case"application/x-zip-compressed":return"zip";case"application/x-rar-compressed":case"application/vnd.rar":return"rar";case"application/x-msdownload":case"application/x-executable":return"exe";case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.ms-excel":case"text/csv":return"excel";case"application/vnd.openxmlformats-officedocument.presentationml.presentation":case"application/vnd.ms-powerpoint":return"powerpoint";case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":return"document"}if(o.startsWith("text/"))return"txt";if(t)switch(t.toLowerCase().replace(/^\./,"")){case"exe":case"msi":return"exe";case"zip":return"zip";case"rar":return"rar";case"pdf":return"pdf";case"csv":return"excel"}return"file"}var ut=a=>{var n=a,{type:e,className:t}=n,o=g(n,["type","className"]);switch(e){case"folder-with-files":return(0,be.jsx)(Jo,r({className:t},o));case"folder":return(0,be.jsx)(Xo,r({className:t},o));case"image":return(0,be.jsx)(ro,r({className:t},o));case"video":return(0,be.jsx)(Qo,r({className:t},o));case"audio":return(0,be.jsx)(oo,r({className:t},o));case"pdf":return(0,be.jsx)(Bo,r({className:t},o));case"excel":case"xlsx":return(0,be.jsx)(Ho,r({className:t},o));case"powerpoint":case"pptx":return(0,be.jsx)(Zo,r({className:t},o));case"document":case"docx":case"doc":return(0,be.jsx)(Uo,r({className:t},o));case"txt":return(0,be.jsx)(jo,r({className:t},o));case"json":return(0,be.jsx)(Ko,r({className:t},o));case"zip":return(0,be.jsx)($o,r({className:t},o));case"rar":return(0,be.jsx)(Yo,r({className:t},o));case"exe":return(0,be.jsx)(qo,r({className:t},o));default:return(0,be.jsx)(Wo,r({className:t},o))}};function Sr(e){if(!e||e.length===0)return"*/*";let t=[];for(let o of e)switch(o){case X.IMAGE:t.push("image/*");break;case X.VIDEO:t.push("video/*");break;case X.AUDIO:t.push("audio/*");break;case X.FILE:t.push("application/*","text/*");break}return t.join(",")}function zr(e){if(!e||e.length===0)return"All files";let t=[];for(let o of e)switch(o){case X.IMAGE:t.push("Images");break;case X.VIDEO:t.push("Videos");break;case X.AUDIO:t.push("Audio");break;case X.FILE:t.push("Files");break}return t.join(", ")}var No=require("react/jsx-runtime");function Oa(e){return(0,No.jsxs)("svg",s(r({xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",color:"currentColor"},e),{children:[(0,No.jsx)("path",{d:"M13.0059 21.25C13.0059 21.8023 12.5581 22.25 12.0059 22.25C11.4536 22.25 11.0059 21.8023 11.0059 21.25L11.0059 16.75L10.4116 16.75C10.236 16.7501 10.0203 16.7503 9.84387 16.7282L9.84053 16.7278C9.71408 16.712 9.13804 16.6402 8.86368 16.0746C8.58872 15.5078 8.89065 15.0076 8.95597 14.8994L8.95841 14.8954C9.05062 14.7424 9.18477 14.5715 9.29511 14.4309L9.31885 14.4007C9.61348 14.0249 9.99545 13.5406 10.3759 13.1496C10.5657 12.9545 10.783 12.7533 11.0139 12.5944C11.2191 12.4532 11.5693 12.25 12 12.25C12.4307 12.25 12.7809 12.4532 12.9861 12.5944C13.217 12.7533 13.4343 12.9545 13.6241 13.1496C14.0046 13.5406 14.3865 14.0249 14.6812 14.4007L14.7049 14.4309C14.8152 14.5715 14.9494 14.7424 15.0416 14.8954L15.044 14.8994C15.1093 15.0076 15.4113 15.5078 15.1363 16.0746C14.862 16.6402 14.2859 16.712 14.1595 16.7278L14.1561 16.7282C13.9797 16.7503 13.764 16.7501 13.5884 16.75L13.0059 16.75L13.0059 21.25Z",fill:"currentColor",fillRule:"evenodd"}),(0,No.jsx)("path",{d:"M1.25 12.5C1.25 9.85827 3.03106 7.63322 5.45825 6.9592C5.65424 6.90478 5.75224 6.87756 5.80872 6.81971C5.8652 6.76186 5.88991 6.66386 5.93931 6.46785C6.62272 3.75655 9.07671 1.75002 12 1.75002C15.2149 1.75002 17.8628 4.17733 18.2112 7.29925C18.2385 7.54461 18.2522 7.66731 18.3147 7.7383C18.3772 7.80929 18.4989 7.83881 18.7423 7.89787C21.0422 8.4559 22.75 10.5285 22.75 13C22.75 15.8995 20.3995 18.25 17.5 18.25H16.4006C15.942 18.25 15.7126 18.25 15.6826 18.2119C15.6679 18.1933 15.6641 18.1839 15.6617 18.1604C15.6567 18.1121 15.8519 17.9223 16.2425 17.5427C17.2326 16.5804 17.255 14.9976 16.2927 14.0075C15.6442 13.1982 15.0315 12.3422 14.2379 11.6663C13.6086 11.1303 12.8426 10.75 12 10.75C11.1574 10.75 10.3914 11.1303 9.76209 11.6663C8.96846 12.3422 8.35575 13.1982 7.7073 14.0075C6.74496 14.9976 6.76745 16.5804 7.75753 17.5427C8.14807 17.9223 8.34334 18.1121 8.33832 18.1604C8.33587 18.1839 8.33206 18.1933 8.31739 18.2119C8.28737 18.25 8.05801 18.25 7.59942 18.25H7C3.82436 18.25 1.25 15.6757 1.25 12.5Z",fill:"currentColor"})]}))}var Rr=require("react"),ko=require("react/jsx-runtime");function Tr({file:e}){var n;let[t,o]=(0,Rr.useState)(!1),a=e.previewUrl||e.url;return a&&!t?(0,ko.jsx)("img",{src:a,alt:((n=e==null?void 0:e.name)==null?void 0:n.substring(0,10))||"image",className:"w-full h-full object-contain rounded-md drop-shadow-md",onError:()=>o(!0)}):(0,ko.jsx)(ro,{})}function Er({file:e}){return e.caption?(0,ko.jsxs)("p",{className:"text-xs text-blue-600 line-clamp-2 mb-2",children:[e.height," x ",e.width]}):null}var Lr=require("react"),pe=require("react/jsx-runtime");function Ar({file:e,className:t}){let[o,a]=(0,Lr.useState)(!1);return e.previewUrl&&!o?(0,pe.jsxs)("div",{className:"relative w-full h-full",children:[(0,pe.jsx)("img",{src:e.previewUrl,className:"w-full h-full object-contain rounded-md",alt:e.name,onError:()=>a(!0)}),(0,pe.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,pe.jsx)("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:(0,pe.jsx)(Do,{className:"size-5 text-white fill-white"})})})]}):e.url&&!o?(0,pe.jsxs)("div",{className:"relative w-full h-full",children:[(0,pe.jsx)("video",{src:`${e.url}#t=0.001`,className:"w-full h-full object-contain rounded-md",preload:"metadata",muted:!0,playsInline:!0,onError:()=>a(!0)}),(0,pe.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,pe.jsx)("div",{className:"bg-black/60 rounded-full p-2 backdrop-blur-xs",children:(0,pe.jsx)(Do,{className:"size-5 text-white fill-white"})})})]}):(0,pe.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:(0,pe.jsx)("div",{className:"text-center",children:(0,pe.jsx)("div",{className:"text-4xl",children:(0,pe.jsx)(ut,{type:"video",className:t})})})})}function _r({file:e}){var t;return(t=e.metaData)!=null&&t.duration?(0,pe.jsxs)("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}var Bt=require("react/jsx-runtime");function Vr({file:e,className:t}){return(0,Bt.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-transparent",children:(0,Bt.jsx)("div",{className:"text-center",children:(0,Bt.jsx)("div",{className:"text-4xl",children:(0,Bt.jsx)(ut,{type:"audio",className:t})})})})}function Gr({file:e}){var t;return(t=e.metaData)!=null&&t.duration?(0,Bt.jsxs)("p",{className:"text-xs text-blue-600 mb-2",children:["Duration: ",Math.floor(e.metaData.duration/60),":",(e.metaData.duration%60).toString().padStart(2,"0")]}):null}var ft=require("react/jsx-runtime");function Or({file:e,className:t}){let o=sa(e.mime,e.ext);return(0,ft.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-transparent relative",children:e.previewUrl?(0,ft.jsx)("img",{src:e.previewUrl,alt:e.name,className:"w-full h-full object-contain rounded-md drop-shadow-md"}):(0,ft.jsx)("div",{className:"text-center",children:(0,ft.jsx)("div",{className:"text-4xl",children:(0,ft.jsx)(ut,{type:o,className:t})})})})}function Br({file:e}){var t;return(t=e.metaData)!=null&&t.pageCount?(0,ft.jsxs)("p",{className:"text-xs text-blue-600 mb-2",children:["Pages: ",e.metaData.pageCount]}):null}var Zr=require("react/jsx-runtime");function Hr({file:e}){let t=sa(e.mime,e.ext);return(0,Zr.jsx)(ut,{type:t})}var Ur={images:{component:Tr,metadataComponent:Er},videos:{component:Ar,metadataComponent:_r},files:{component:Or,metadataComponent:Br},audios:{component:Vr,metadataComponent:Gr},default:{component:Hr}};function gt(e){let t=$e(e.mime,e.ext);return Ur[t]||Ur.default}var Ba=require("react/jsx-runtime");function mo(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,Ba.jsx)("kbd",r({"data-slot":"kbd",className:x("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e)},t))}function uo(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,Ba.jsx)("kbd",r({"data-slot":"kbd-group",className:x("inline-flex items-center gap-1",e)},t))}var F=require("react/jsx-runtime");function Wr(){let{isUploadModalOpen:e,setIsUploadModalOpen:t,uploadFiles:o,allowedFileTypes:a,maxUploadFiles:n,maxUploadSize:i}=G(),l=Sr(a),c=zr(a),[d,f]=(0,jr.useState)([]),[{isDragging:m,errors:b},{removeFile:p,clearFiles:y,handleDragEnter:w,handleDragLeave:I,handleDragOver:M,handleDrop:D,openFileDialog:z,getInputProps:R}]=Pr({maxFiles:n,maxSize:i,accept:l,multiple:!0,onFilesChange:v=>{let O=v.map(B=>{let W=d.find(Ce=>Ce.id===B.id);return W?r(r({},W),B):s(r({},B),{progress:100,status:"completed"})});f(O)}}),h=v=>{p(v)},N=v=>{f(O=>O.map(B=>B.id===v?s(r({},B),{progress:0,status:"uploading",error:void 0}):B))},Y=()=>{let v=d.filter(O=>O.status==="completed");if(v.length>0){let O=v.map(B=>({name:B.file.name,size:B.file.size,type:$e(B.file.type,B.file.name.split(".").pop()),lastModified:B.file instanceof File?B.file.lastModified:Date.now(),file:B.file,metadata:{}}));o(O),te()}},te=()=>{t(!1),y(),f([])},de=(v,O)=>{let B={id:"temp",name:v.name,size:v.size,mime:v.type,ext:v.name.split(".").pop()||"",url:O||"",createdAt:new Date(v.lastModified),updatedAt:new Date(v.lastModified),folderId:null,metaData:{}},{component:W}=gt(B);return(0,F.jsx)(W,{file:B,metaData:B.metaData})},Ne=d.filter(v=>v.status==="completed").length,u=d.filter(v=>v.status==="uploading").length,_=Ne>0&&u===0;return(0,F.jsx)(Te,{open:e,onOpenChange:t,children:(0,F.jsxs)(Ee,{className:"p-0 max-w-4xl max-h-[80vh] flex flex-col",variant:"default",showCloseButton:!1,children:[(0,F.jsxs)(je,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,F.jsx)(Le,{className:"px-6 text-base",children:(0,F.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,F.jsxs)("span",{children:["Upload Files",(0,F.jsx)(uo,{className:"ml-2",children:(0,F.jsxs)(mo,{children:[(0,F.jsx)("span",{className:"text-lg",children:"\u2318"})," + U"]})})]}),(0,F.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>t(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,F.jsx)(ie,{className:"size-5"}),(0,F.jsx)("span",{className:"hidden",children:"Close"})]})]})}),(0,F.jsx)(mt,{})]}),(0,F.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[(0,F.jsxs)("div",{className:x("relative rounded-lg border-dashed border-[2.5px] bg-gray-100 border-gray-300 px-6 py-16 text-center transition-colors mb-4",m?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50"),onDragEnter:w,onDragLeave:I,onDragOver:M,onDrop:D,children:[(0,F.jsx)("input",s(r({},R()),{className:"sr-only"})),(0,F.jsxs)("div",{className:"flex flex-col items-center",children:[(0,F.jsx)("div",{className:x("flex h-12 w-12 items-center justify-center rounded-full transition-colors",m?"border-primary bg-primary/10":"border-muted-foreground/25"),children:(0,F.jsx)(Oa,{className:"mb-3 text-zinc-400 dark:text-zinc-500"})}),(0,F.jsxs)("div",{className:"space-y-2",children:[(0,F.jsxs)("p",{className:"text-sm font-medium",children:["Drop files here or"," ",(0,F.jsx)("button",{type:"button",onClick:z,className:"cursor-pointer text-primary underline-offset-4 hover:underline",children:"browse files"})]}),(0,F.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c," \u2022 Max size: ",se(i)," \u2022 Max files: ",n]})]})]})]}),d.length>0&&(0,F.jsx)("div",{className:"space-y-4",children:(0,F.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3 lg:grid-cols-4",children:d.map(v=>(0,F.jsxs)("div",{className:"relative group",children:[(0,F.jsx)(C,{onClick:()=>h(v.id),variant:"outline",size:"icon",className:"absolute -end-2 -top-2 z-10 size-6 rounded-full opacity-0 transition-opacity group-hover:opacity-100",children:(0,F.jsx)(ie,{className:"size-3"})}),(0,F.jsxs)("div",{className:"relative overflow-hidden rounded-lg border bg-card transition-colors",children:[(0,F.jsx)("div",{className:"relative aspect-square bg-muted border-b border-slate-200",children:(0,F.jsx)("div",{className:"flex h-full items-center justify-center p-4",children:(0,F.jsx)("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:v.status==="uploading"?(0,F.jsxs)("div",{className:"relative w-full h-full flex items-center justify-center",children:[(0,F.jsxs)("svg",{className:"size-12 -rotate-90 absolute",viewBox:"0 0 48 48",children:[(0,F.jsx)("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-muted-foreground/20"}),(0,F.jsx)("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:`${2*Math.PI*20}`,strokeDashoffset:`${2*Math.PI*20*(1-v.progress/100)}`,className:"text-primary transition-all duration-300",strokeLinecap:"round"})]}),v.file instanceof File&&de(v.file,v.preview)]}):v.file instanceof File&&de(v.file,v.preview)})})}),(0,F.jsx)("div",{className:"p-3",children:(0,F.jsxs)("div",{className:"space-y-1",children:[(0,F.jsx)("p",{className:"truncate text-xs font-medium",children:v.file.name}),(0,F.jsxs)("div",{className:"relative flex items-center justify-between gap-2",children:[(0,F.jsx)("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:se(v.file.size)}),v.status==="error"&&v.error&&(0,F.jsxs)(Ir,{children:[(0,F.jsx)(Nr,{asChild:!0,children:(0,F.jsx)(C,{onClick:()=>N(v.id),variant:"ghost",size:"icon",className:"absolute end-0 -top-1.25 size-6 text-destructive hover:bg-destructive/10 hover:text-destructive",children:(0,F.jsx)(da.RefreshCwIcon,{className:"size-3 opacity-100"})})}),(0,F.jsx)(kr,{children:"Upload failed. Retry"})]})]})]})})]})]},v.id))})}),b.length>0&&(0,F.jsxs)(Cr,{variant:"destructive",appearance:"light",className:"mt-5",children:[(0,F.jsx)(Fr,{children:(0,F.jsx)(da.TriangleAlert,{})}),(0,F.jsxs)(Dr,{children:[(0,F.jsx)(yr,{children:"File upload error(s)"}),(0,F.jsx)(Mr,{children:b.map((v,O)=>(0,F.jsx)("p",{className:"last:mb-0",children:v},O))})]})]})]}),(0,F.jsxs)(We,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,F.jsx)(tt,{asChild:!0,children:(0,F.jsx)(C,{type:"button",radius:"full",variant:"outline",onClick:te,className:"w-full md:w-auto",children:"Cancel"})}),(0,F.jsxs)(C,{type:"button",radius:"full",onClick:Y,disabled:!_,className:"w-full md:w-auto",children:["Upload ",Ne>0&&`(${Ne})`]})]})]})})}var ca=require("react");var Po=require("class-variance-authority");var $r=require("react/jsx-runtime"),Di=(0,Po.cva)(`
25
25
  flex w-full bg-background border border-input shadow-xs shadow-black/5 transition-[color,box-shadow] text-foreground placeholder:text-muted-foreground/80
26
26
  focus-visible:ring-ring/30 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
27
27
  disabled:cursor-not-allowed disabled:opacity-60
@@ -29,7 +29,7 @@
29
29
  file:h-full [&[type=file]]:py-0 file:border-solid file:border-input file:bg-transparent
30
30
  file:font-medium file:not-italic file:text-foreground file:p-0 file:border-0 file:border-e
31
31
  aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
32
- `,{variants:{variant:{lg:"h-10 px-4 text-sm rounded-md file:pe-4 file:me-4",md:"h-9 px-3 text-sm rounded-md file:pe-3 file:me-3",sm:"h-8 px-2.5 text-xs rounded-md file:pe-2.5 file:me-2.5"}},defaultVariants:{variant:"md"}}),P0=(0,ga.cva)("flex items-center shrink-0 justify-center bg-muted border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] text-secondary-foreground [&_svg]:text-secondary-foreground/60",{variants:{variant:{lg:"rounded-md h-10 min-w-10 px-4 text-sm [&_svg:not([class*=size-])]:size-4.5",md:"rounded-md h-9 min-w-9 px-3 text-sm [&_svg:not([class*=size-])]:size-4.5",sm:"rounded-md h-8 min-w-7 text-xs px-2.5 [&_svg:not([class*=size-])]:size-3.5"},mode:{default:"",icon:"px-0 justify-center"}},defaultVariants:{variant:"md",mode:"default"}}),k0=(0,ga.cva)(`
32
+ `,{variants:{variant:{lg:"h-10 px-4 text-sm rounded-md file:pe-4 file:me-4",md:"h-9 px-3 text-sm rounded-md file:pe-3 file:me-3",sm:"h-8 px-2.5 text-xs rounded-md file:pe-2.5 file:me-2.5"}},defaultVariants:{variant:"md"}}),sc=(0,Po.cva)("flex items-center shrink-0 justify-center bg-muted border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] text-secondary-foreground [&_svg]:text-secondary-foreground/60",{variants:{variant:{lg:"rounded-md h-10 min-w-10 px-4 text-sm [&_svg:not([class*=size-])]:size-4.5",md:"rounded-md h-9 min-w-9 px-3 text-sm [&_svg:not([class*=size-])]:size-4.5",sm:"rounded-md h-8 min-w-7 text-xs px-2.5 [&_svg:not([class*=size-])]:size-3.5"},mode:{default:"",icon:"px-0 justify-center"}},defaultVariants:{variant:"md",mode:"default"}}),dc=(0,Po.cva)(`
33
33
  flex items-stretch
34
34
  [&_[data-slot=input]]:grow
35
35
  [&_[data-slot=input-addon]:has(+[data-slot=input])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=input])]:border-e-0
@@ -48,7 +48,7 @@
48
48
  [&_[data-slot=datefield]+[data-slot=input-addon]]:border-s-0
49
49
  [&_[data-slot=datefield]:has(~[data-slot=input-addon])]:[&_[data-slot=input]]:rounded-e-none
50
50
  [&_[data-slot=datefield]~[data-slot=input-addon]]:rounded-s-none
51
- `,{variants:{},defaultVariants:{}}),S0=(0,ga.cva)(`
51
+ `,{variants:{},defaultVariants:{}}),cc=(0,Po.cva)(`
52
52
  flex items-center gap-1.5
53
53
  has-[:focus-visible]:ring-ring/30
54
54
  has-[:focus-visible]:border-ring
@@ -81,35 +81,35 @@
81
81
  has-[[aria-invalid=true]]:ring-destructive/10
82
82
  dark:has-[[aria-invalid=true]]:border-destructive
83
83
  dark:has-[[aria-invalid=true]]:ring-destructive/20
84
- `,{variants:{variant:{sm:"gap-1.25 [&_svg:not([class*=size-])]:size-3.5",md:"gap-1.5 [&_svg:not([class*=size-])]:size-4",lg:"gap-1.5 [&_svg:not([class*=size-])]:size-4"}},defaultVariants:{variant:"md"}});function ta(r){var i=r,{className:e,type:t,variant:a}=i,o=g(i,["className","type","variant"]);return(0,jr.jsx)("input",n({"data-slot":"input",type:t,className:x(Si({variant:a}),e)},o))}var ae=require("react/jsx-runtime");function $r(){let{isCreateFolderModalOpen:e,setIsCreateFolderModalOpen:t,isRenameFolderModalOpen:a,setIsRenameFolderModalOpen:o,createFolder:r,renameFolder:i,folderToRename:l,setFolderToRename:c}=O(),[s,f]=(0,Ja.useState)(""),m=a,b=e||a;(0,Ja.useEffect)(()=>{a&&l?f(l.name):e||f("")},[a,e,l]);let p=async()=>{if(s.trim()!==""){if(m&&l){let w=l.id;w!==null&&await i(w,s.trim()),o(!1),c(null)}else r(s.trim()),t(!1);f("")}},y=()=>{m?(o(!1),c(null)):t(!1),f("")};return b?(0,ae.jsx)(ze,{open:b,onOpenChange:y,children:(0,ae.jsxs)(Te,{className:"p-0 max-w-xl m-auto min-h-fit max-h-[80vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[(0,ae.jsx)(Be,{className:"pt-5 pb-3 m-0 border-b border-border flex w-full justify-between",children:(0,ae.jsx)(Re,{className:"px-6 text-base",children:(0,ae.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,ae.jsxs)("span",{children:[m?"Rename Folder":"Create New Folder",!m&&(0,ae.jsx)("span",{className:"ml-4",children:(0,ae.jsx)(ea,{children:(0,ae.jsxs)(Xt,{children:[(0,ae.jsx)("span",{className:"text-lg",children:"\u2318"})," + F"]})})})]}),(0,ae.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:y,className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,ae.jsx)(ve,{className:"size-5"}),(0,ae.jsx)("span",{className:"hidden",children:"Close"})]})]})})}),(0,ae.jsxs)("div",{className:"p-6",children:[(0,ae.jsx)("label",{htmlFor:"folder-name",className:"hidden mb-2",children:"Folder Name:"}),(0,ae.jsx)(ta,{id:"folder-name",name:"folder-name",value:s,onChange:w=>f(w.target.value),placeholder:"Enter folder name",autoFocus:!0,onKeyDown:w=>{w.key==="Enter"&&s.trim()!==""&&p()}})]}),(0,ae.jsxs)(He,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,ae.jsx)(qe,{asChild:!0,children:(0,ae.jsx)(C,{type:"button",variant:"outline",onClick:y,radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),(0,ae.jsx)(C,{type:"button",disabled:s.trim()==="",onClick:p,radius:"full",className:"w-full md:w-auto",children:m?"Rename":"Create"})]})]})}):null}var pt=require("react");var ha=require("lucide-react");function $e(e,t=30){if(e.length<=t)return e;let a=e.slice(0,Math.ceil(t/2)),o=e.slice(-Math.floor(t/2));return`${a}...${o}`}var Et=require("react");function ko({threshold:e=0,root:t=null,rootMargin:a="0%"}={}){let[o,r]=(0,Et.useState)(),[i,l]=(0,Et.useState)(null),c=(0,Et.useRef)(null);return(0,Et.useEffect)(()=>(c.current&&c.current.disconnect(),i&&typeof window!="undefined"&&"IntersectionObserver"in window&&(c.current=new IntersectionObserver(([s])=>{r(s)},{threshold:e,root:t,rootMargin:a}),c.current.observe(i)),()=>{c.current&&c.current.disconnect()}),[i,e,t,a]),{ref:l,entry:o}}var P=require("react/jsx-runtime");function Wr({folder:e,selectedFolderId:t,onSelect:a,onLoadChildren:o,disabledFolderIds:r=[],treeState:i}){var h;let[l,c]=(0,pt.useState)(!1),s=((h=e.folderCount)!=null?h:0)>0,f=t===e.id,m=r.includes(e.id),b=i.loading.has(e.id),p=i.loaded.has(e.id),y=i.folders.get(e.id)||[],w=i.pagination.get(e.id),{ref:N,entry:M}=ko({threshold:.1,rootMargin:"100px"}),D=w&&w.currentPage<w.totalPages;return(0,pt.useEffect)(()=>{if(l&&(M!=null&&M.isIntersecting)&&D&&!b){let I=((w==null?void 0:w.currentPage)||1)+1;o(e.id,I)}},[M==null?void 0:M.isIntersecting,D,b,l,w,e.id,o]),(0,P.jsxs)("li",{children:[(0,P.jsxs)("div",{className:"flex items-center gap-1.5 py-1",children:[s?(0,P.jsx)("button",{onClick:async()=>{if(!s)return;let I=!l;c(I),I&&!p&&!b&&await o(e.id,1)},className:"p-1 -m-1 hover:bg-gray-100 rounded transition-colors","aria-label":l?"Collapse folder":"Expand folder",children:(0,P.jsx)(ha.ChevronRight,{className:`size-4 text-gray-500 transition-transform ${!m&&l?"rotate-90":""}`})}):(0,P.jsx)("div",{className:"w-4"}),(0,P.jsxs)("button",{onClick:()=>{m||a(e.id)},disabled:m,title:e.name,className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${f?"bg-blue-100 text-blue-600 font-semibold":m?"opacity-50 cursor-not-allowed":"hover:bg-gray-100"}`,children:[(0,P.jsx)(Xe,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),(0,P.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,P.jsx)("span",{className:"truncate min-w-0",children:$e(e.name,15)}),m?(0,P.jsx)("span",{className:"text-[0.6rem] text-left font-medium text-gray-900",children:"(Already selected)"}):""]})]})]}),!m&&l&&(0,P.jsxs)("ul",{className:"pl-6",children:[y.map(I=>(0,P.jsx)(Wr,{folder:I,selectedFolderId:t,onSelect:a,onLoadChildren:o,disabledFolderIds:r,treeState:i},I.id)),(b||D)&&(0,P.jsx)("li",{ref:N,className:"py-2 pl-6 flex justify-start",children:(0,P.jsx)(ha.Loader2,{className:"h-4 w-4 animate-spin text-blue-500"})}),b&&y.length===0&&(0,P.jsx)("li",{className:"py-1",children:(0,P.jsx)("div",{className:"flex items-center gap-1.5 px-2",children:(0,P.jsx)("span",{className:"text-sm text-gray-500",children:"Loading..."})})})]})]})}function Kr(){let{isMoveFileModalOpen:e,setIsMoveFileModalOpen:t,selectedFiles:a,selectedFolders:o,bulkMove:r,provider:i}=O(),[l,c]=(0,pt.useState)(void 0),[s,f]=(0,pt.useState)({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}),{ref:m,entry:b}=ko({threshold:.1,rootMargin:"100px"}),p=s.pagination.get(null),y=p&&p.currentPage<p.totalPages,w=s.loading.has(null),N=o.map(h=>h.id),M=s.folders.get(null)||[];(0,pt.useEffect)(()=>{e&&!s.loaded.has(null)&&!s.loading.has(null)&&D(null,1)},[e]),(0,pt.useEffect)(()=>{if(e&&(b!=null&&b.isIntersecting)&&y&&!w){let h=((p==null?void 0:p.currentPage)||1)+1;D(null,h)}},[b==null?void 0:b.isIntersecting,y,w,p,e]);let D=async(h,I=1)=>{if(!s.loading.has(h)){f(Y=>d(n({},Y),{loading:new Set(Y.loading).add(h)}));try{let Y=await i.getFolders(h,I,20);f(te=>{let se=new Set(te.loading);se.delete(h);let De=new Set(te.loaded);De.add(h);let u=new Map(te.folders),L=u.get(h)||[];I>1?u.set(h,[...L,...Y.folders]):u.set(h,Y.folders);let v=new Map(te.pagination);return v.set(h,Y.pagination),{folders:u,loading:se,loaded:De,pagination:v}})}catch(Y){console.error(`Failed to load folders for ${h}:`,Y),f(te=>{let se=new Set(te.loading);return se.delete(h),d(n({},te),{loading:se})})}}},z=()=>{l!==void 0&&(r(l),t(!1),c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))},T=h=>{t(h),h?D(null,1):(c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))};return e?(0,P.jsx)(ze,{open:e,onOpenChange:T,children:(0,P.jsxs)(Te,{className:"p-0 max-w-3xl max-h-full m-auto md:max-h-[80vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[(0,P.jsxs)(Be,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,P.jsx)(Re,{className:"px-6 text-base",children:(0,P.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,P.jsxs)("span",{className:"w-full text-left",children:["Move Items",(0,P.jsxs)("p",{className:"text-gray-400 text-xs",children:["Moving ",a.length," file",a.length===1?"":"s"," and"," ",o.length," folder",o.length===1?"":"s","."]})]}),(0,P.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>T(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,P.jsx)(ve,{className:"size-5"}),(0,P.jsx)("span",{className:"hidden",children:"Close"})]})]})}),(0,P.jsx)(lt,{})]}),(0,P.jsx)("div",{className:"text-sm my-3 px-6 flex-1 flex flex-col min-h-0",children:(0,P.jsx)("div",{className:"space-y-4 flex flex-col flex-1 min-h-0",children:(0,P.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,P.jsx)("label",{className:"block mb-2 font-medium text-gray-900",children:"Select destination folder:"}),(0,P.jsxs)("ul",{className:"border rounded-xl p-2 shadow-inner overflow-y-auto flex-1 min-h-0",children:[(0,P.jsx)("li",{children:(0,P.jsxs)("div",{className:"flex items-center gap-1.5 py-1",children:[(0,P.jsx)("div",{className:"w-4"}),(0,P.jsxs)("button",{onClick:()=>c(null),className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${l===null?"bg-blue-100 text-blue-600 font-semibold":"hover:bg-gray-100"}`,children:[(0,P.jsx)(Xe,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),(0,P.jsx)("div",{className:"flex flex-col gap-1",children:(0,P.jsx)("span",{className:"truncate min-w-0",children:"Root Directory"})})]})]})}),M.map(h=>(0,P.jsx)(Wr,{folder:h,selectedFolderId:l,onSelect:I=>c(I),onLoadChildren:D,disabledFolderIds:N,treeState:s},h.id)),(w||y)&&(0,P.jsx)("li",{ref:m,className:"py-2 pl-6 flex justify-start",children:(0,P.jsx)(ha.Loader2,{className:"h-5 w-5 animate-spin text-blue-500"})}),M.length===0&&!w&&!y&&(0,P.jsx)("li",{className:"text-gray-500 text-sm text-center py-4",children:"No nested folders available"})]})]})})}),(0,P.jsxs)(He,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,P.jsx)(qe,{asChild:!0,children:(0,P.jsx)(C,{type:"button",variant:"outline",radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),(0,P.jsx)(C,{type:"button",onClick:z,disabled:l===void 0,radius:"full",className:"w-full md:w-auto",children:"Move"})]})]})}):null}var ba=require("react"),on=require("lucide-react");var aa=require("radix-ui");var mt=require("react/jsx-runtime");function Yr(i){var l=i,{className:e,viewportClassName:t,children:a,viewportRef:o}=l,r=g(l,["className","viewportClassName","children","viewportRef"]);return(0,mt.jsxs)(aa.ScrollArea.Root,d(n({"data-slot":"scroll-area",className:x("relative overflow-hidden",e)},r),{children:[(0,mt.jsx)(aa.ScrollArea.Viewport,{ref:o,className:x("h-full w-full rounded-[inherit]",t),children:a}),(0,mt.jsx)(zi,{}),(0,mt.jsx)(aa.ScrollArea.Corner,{})]}))}function zi(o){var r=o,{className:e,orientation:t="vertical"}=r,a=g(r,["className","orientation"]);return(0,mt.jsx)(aa.ScrollArea.ScrollAreaScrollbar,d(n({"data-slot":"scroll-area-scrollbar",orientation:t,className:x("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-[1px]",e)},a),{children:(0,mt.jsx)(aa.ScrollArea.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}))}var pe=require("react/jsx-runtime");function ut({title:e,open:t,onClose:a,previewSection:o,metadataSection:r,footer:i}){return(0,pe.jsx)(ze,{open:t,onOpenChange:l=>!l&&a(),children:(0,pe.jsxs)(Te,{className:"p-0 max-w-6xl m-auto xl:min-h-fit max-h-[85vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[(0,pe.jsxs)(Be,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,pe.jsx)(Re,{className:"px-6 text-base",children:(0,pe.jsxs)("div",{className:"flex w-full justify-between gap-2",children:[(0,pe.jsx)("span",{children:e}),(0,pe.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>a(),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,pe.jsx)(ve,{className:"size-5"}),(0,pe.jsx)("span",{className:"hidden",children:"Close"})]})]})}),(0,pe.jsx)(lt,{})]}),(0,pe.jsx)(Yr,{className:"flex-1 min-h-0",children:(0,pe.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 min-h-full max-h-[65vh] overflow-scroll",children:[(0,pe.jsx)("div",{className:"p-6 border-b lg:border-b-0 lg:border-r",children:o}),(0,pe.jsx)("div",{className:"p-6",children:r})]})}),(0,pe.jsx)(He,{className:"px-6 py-4 border-t border-border",children:i})]})})}var zo=require("lucide-react");var At=require("sonner");var Xa=require("react");var va=require("react/jsx-runtime");function So(e){return(0,va.jsxs)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{children:[(0,va.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,va.jsx)("path",{d:"M5 12l5 5l10 -10"})]}))}var _e=require("react/jsx-runtime");function ft({file:e}){let{provider:t,setFileDetailsModalFile:a,refreshData:o}=O(),[r,i]=(0,Xa.useState)(!1);return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",title:"Delete",className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50 active:scale-95 transition-transform",onClick:async()=>{i(!0);try{await t.deleteFiles([e.id]),await o(),a(null),At.toast.success("File Deleted",{description:`${$e(e.name,20)} has been deleted`})}catch(c){At.toast.error("Delete failed"),i(!1)}},disabled:r,children:r?(0,_e.jsx)(zo.Loader2,{className:"size-5 animate-spin"}):(0,_e.jsx)(Ze,{className:"size-5"})})}function gt({file:e}){let[t,a]=(0,Xa.useState)(!1);return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{a(!0);try{let r=document.createElement("a");r.href=e.url,r.download=e.name,r.click(),At.toast.success("Download Started",{description:`Downloading ${$e(e.name,20)}`})}catch(r){At.toast.error("Download failed")}finally{a(!1)}},className:"border-gray-200 bg-white hover:text-blue-600 hover:border-blue-200 hover:bg-blue-50 active:scale-95 transition-transform",title:"Download",disabled:t,children:t?(0,_e.jsx)(zo.Loader2,{className:"size-5 animate-spin"}):(0,_e.jsx)(Wa,{className:"size-5",strokeWidth:2.5})})}function ht({file:e}){let[t,a]=(0,Xa.useState)(!1);return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{try{await navigator.clipboard.writeText(e.url),a(!0),At.toast.success("Link Copied",{description:"File URL copied to clipboard"}),setTimeout(()=>a(!1),2e3)}catch(r){At.toast.error("Failed to copy link")}},className:`border-gray-200 bg-white active:scale-95 transition-all ${t?"text-green-700 border-green-400 bg-green-100 font-bold":"hover:text-orange-600 hover:border-orange-200 hover:bg-orange-50"}`,title:"Copy Link",disabled:t,children:t?(0,_e.jsx)(So,{className:"size-5 animate-in zoom-in duration-200",strokeWidth:3}):(0,_e.jsx)(Ka,{className:"size-5",strokeWidth:2.5})})}function qr({file:e,onFullscreen:t}){return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",onClick:t,className:"border-gray-200 bg-white hover:text-purple-600 hover:border-purple-200 hover:bg-purple-50 active:scale-95 transition-transform",title:"Fullscreen",children:(0,_e.jsx)(Ya,{className:"size-5",strokeWidth:1})})}var Qr=require("class-variance-authority");var Jr=require("react/jsx-runtime"),Ti=(0,Qr.cva)(`
84
+ `,{variants:{variant:{sm:"gap-1.25 [&_svg:not([class*=size-])]:size-3.5",md:"gap-1.5 [&_svg:not([class*=size-])]:size-4",lg:"gap-1.5 [&_svg:not([class*=size-])]:size-4"}},defaultVariants:{variant:"md"}});function fo(n){var i=n,{className:e,type:t,variant:o}=i,a=g(i,["className","type","variant"]);return(0,$r.jsx)("input",r({"data-slot":"input",type:t,className:x(Di({variant:o}),e)},a))}var oe=require("react/jsx-runtime");function Kr(){let{isCreateFolderModalOpen:e,setIsCreateFolderModalOpen:t,isRenameFolderModalOpen:o,setIsRenameFolderModalOpen:a,createFolder:n,renameFolder:i,folderToRename:l,setFolderToRename:c}=G(),[d,f]=(0,ca.useState)(""),m=o,b=e||o;(0,ca.useEffect)(()=>{o&&l?f(l.name):e||f("")},[o,e,l]);let p=async()=>{if(d.trim()!==""){if(m&&l){let w=l.id;w!==null&&await i(w,d.trim()),a(!1),c(null)}else n(d.trim()),t(!1);f("")}},y=()=>{m?(a(!1),c(null)):t(!1),f("")};return b?(0,oe.jsx)(Te,{open:b,onOpenChange:y,children:(0,oe.jsxs)(Ee,{className:"p-0 max-w-xl m-auto max-h-[32vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[(0,oe.jsx)(je,{className:"pt-5 pb-3 m-0 border-b border-border flex w-full justify-between",children:(0,oe.jsx)(Le,{className:"px-6 text-base",children:(0,oe.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,oe.jsxs)("span",{children:[m?"Rename Folder":"Create New Folder",!m&&(0,oe.jsx)("span",{className:"ml-4",children:(0,oe.jsx)(uo,{children:(0,oe.jsxs)(mo,{children:[(0,oe.jsx)("span",{className:"text-lg",children:"\u2318"})," + F"]})})})]}),(0,oe.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:y,className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,oe.jsx)(ie,{className:"size-5"}),(0,oe.jsx)("span",{className:"hidden",children:"Close"})]})]})})}),(0,oe.jsxs)("div",{className:"p-6",children:[(0,oe.jsx)("label",{htmlFor:"folder-name",className:"hidden mb-2",children:"Folder Name:"}),(0,oe.jsx)(fo,{id:"folder-name",name:"folder-name",value:d,onChange:w=>f(w.target.value),placeholder:"Enter folder name",autoFocus:!0,onKeyDown:w=>{w.key==="Enter"&&d.trim()!==""&&p()}})]}),(0,oe.jsxs)(We,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,oe.jsx)(tt,{asChild:!0,children:(0,oe.jsx)(C,{type:"button",variant:"outline",onClick:y,radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),(0,oe.jsx)(C,{type:"button",disabled:d.trim()==="",onClick:p,radius:"full",className:"w-full md:w-auto",children:m?"Rename":"Create"})]})]})}):null}var ht=require("react");function Ke(e,t=30){if(e.length<=t)return e;let o=e.slice(0,Math.ceil(t/2)),a=e.slice(-Math.floor(t/2));return`${o}...${a}`}var Ht=require("react");function Ha({threshold:e=0,root:t=null,rootMargin:o="0%"}={}){let[a,n]=(0,Ht.useState)(),[i,l]=(0,Ht.useState)(null),c=(0,Ht.useRef)(null);return(0,Ht.useEffect)(()=>(c.current&&c.current.disconnect(),i&&typeof window!="undefined"&&"IntersectionObserver"in window&&(c.current=new IntersectionObserver(([d])=>{n(d)},{threshold:e,root:t,rootMargin:o}),c.current.observe(i)),()=>{c.current&&c.current.disconnect()}),[i,e,t,o]),{ref:l,entry:a}}var k=require("react/jsx-runtime");function Yr({folder:e,selectedFolderId:t,onSelect:o,onLoadChildren:a,disabledFolderIds:n=[],treeState:i}){var h;let[l,c]=(0,ht.useState)(!1),d=((h=e.folderCount)!=null?h:0)>0,f=t===e.id,m=n.includes(e.id),b=i.loading.has(e.id),p=i.loaded.has(e.id),y=i.folders.get(e.id)||[],w=i.pagination.get(e.id),{ref:I,entry:M}=Ha({threshold:.1,rootMargin:"100px"}),D=w&&w.currentPage<w.totalPages;return(0,ht.useEffect)(()=>{if(l&&(M!=null&&M.isIntersecting)&&D&&!b){let N=((w==null?void 0:w.currentPage)||1)+1;a(e.id,N)}},[M==null?void 0:M.isIntersecting,D,b,l,w,e.id,a]),(0,k.jsxs)("li",{children:[(0,k.jsxs)("div",{className:"flex items-center gap-1.5 py-1",children:[d?(0,k.jsx)("button",{onClick:async()=>{if(!d)return;let N=!l;c(N),N&&!p&&!b&&await a(e.id,1)},className:"p-1 -m-1 hover:bg-gray-100 rounded transition-colors","aria-label":l?"Collapse folder":"Expand folder",children:(0,k.jsx)(dt,{className:`size-4 text-gray-500 transition-transform ${!m&&l?"rotate-90":""}`})}):(0,k.jsx)("div",{className:"w-4"}),(0,k.jsxs)("button",{onClick:()=>{m||o(e.id)},disabled:m,title:e.name,className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${f?"bg-blue-100 text-blue-600 font-semibold":m?"opacity-50 cursor-not-allowed":"hover:bg-gray-100"}`,children:[(0,k.jsx)(Je,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),(0,k.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,k.jsx)("span",{className:"truncate min-w-0",children:Ke(e.name,15)}),m?(0,k.jsx)("span",{className:"text-[0.6rem] text-left font-medium text-gray-900",children:"(Already selected)"}):""]})]})]}),!m&&l&&(0,k.jsxs)("ul",{className:"pl-6",children:[y.map(N=>(0,k.jsx)(Yr,{folder:N,selectedFolderId:t,onSelect:o,onLoadChildren:a,disabledFolderIds:n,treeState:i},N.id)),(b||D)&&(0,k.jsx)("li",{ref:I,className:"py-2 pl-6 flex justify-start",children:(0,k.jsx)(ve,{className:"h-4 w-4 animate-spin text-blue-500"})}),b&&y.length===0&&(0,k.jsx)("li",{className:"py-1",children:(0,k.jsx)("div",{className:"flex items-center gap-1.5 px-2",children:(0,k.jsx)("span",{className:"text-sm text-gray-500",children:"Loading..."})})})]})]})}function qr(){let{isMoveFileModalOpen:e,setIsMoveFileModalOpen:t,selectedFiles:o,selectedFolders:a,bulkMove:n,provider:i}=G(),[l,c]=(0,ht.useState)(void 0),[d,f]=(0,ht.useState)({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}),{ref:m,entry:b}=Ha({threshold:.1,rootMargin:"100px"}),p=d.pagination.get(null),y=p&&p.currentPage<p.totalPages,w=d.loading.has(null),I=a.map(h=>h.id),M=d.folders.get(null)||[];(0,ht.useEffect)(()=>{e&&!d.loaded.has(null)&&!d.loading.has(null)&&D(null,1)},[e]),(0,ht.useEffect)(()=>{if(e&&(b!=null&&b.isIntersecting)&&y&&!w){let h=((p==null?void 0:p.currentPage)||1)+1;D(null,h)}},[b==null?void 0:b.isIntersecting,y,w,p,e]);let D=async(h,N=1)=>{if(!d.loading.has(h)){f(Y=>s(r({},Y),{loading:new Set(Y.loading).add(h)}));try{let Y=await i.getFolders(h,N,20);f(te=>{let de=new Set(te.loading);de.delete(h);let Ne=new Set(te.loaded);Ne.add(h);let u=new Map(te.folders),_=u.get(h)||[];N>1?u.set(h,[..._,...Y.folders]):u.set(h,Y.folders);let v=new Map(te.pagination);return v.set(h,Y.pagination),{folders:u,loading:de,loaded:Ne,pagination:v}})}catch(Y){console.error(`Failed to load folders for ${h}:`,Y),f(te=>{let de=new Set(te.loading);return de.delete(h),s(r({},te),{loading:de})})}}},z=()=>{l!==void 0&&(n(l),t(!1),c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))},R=h=>{t(h),h?D(null,1):(c(void 0),f({folders:new Map,loading:new Set,loaded:new Set,pagination:new Map}))};return e?(0,k.jsx)(Te,{open:e,onOpenChange:R,children:(0,k.jsxs)(Ee,{className:"p-0 max-w-3xl max-h-full m-auto md:max-h-[80vh] flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[(0,k.jsxs)(je,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,k.jsx)(Le,{className:"px-6 text-base",children:(0,k.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,k.jsxs)("span",{className:"w-full text-left",children:["Move Items",(0,k.jsxs)("p",{className:"text-gray-400 text-xs",children:["Moving ",o.length," file",o.length===1?"":"s"," and"," ",a.length," folder",a.length===1?"":"s","."]})]}),(0,k.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>R(!1),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,k.jsx)(ie,{className:"size-5"}),(0,k.jsx)("span",{className:"hidden",children:"Close"})]})]})}),(0,k.jsx)(mt,{})]}),(0,k.jsx)("div",{className:"text-sm my-3 px-6 flex-1 flex flex-col min-h-0",children:(0,k.jsx)("div",{className:"space-y-4 flex flex-col flex-1 min-h-0",children:(0,k.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,k.jsx)("label",{className:"block mb-2 font-medium text-gray-900",children:"Select destination folder:"}),(0,k.jsxs)("ul",{className:"border rounded-xl p-2 shadow-inner overflow-y-auto flex-1 min-h-0",children:[(0,k.jsx)("li",{children:(0,k.jsxs)("div",{className:"flex items-center gap-1.5 py-1",children:[(0,k.jsx)("div",{className:"w-4"}),(0,k.jsxs)("button",{onClick:()=>c(null),className:`flex items-center gap-1.5 px-2 py-1 rounded-xl flex-1 text-left transition-colors min-w-0 ${l===null?"bg-blue-100 text-blue-600 font-semibold":"hover:bg-gray-100"}`,children:[(0,k.jsx)(Je,{className:"size-8 text-white shrink-0",strokeWidth:1.5}),(0,k.jsx)("div",{className:"flex flex-col gap-1",children:(0,k.jsx)("span",{className:"truncate min-w-0",children:"Root Directory"})})]})]})}),M.map(h=>(0,k.jsx)(Yr,{folder:h,selectedFolderId:l,onSelect:N=>c(N),onLoadChildren:D,disabledFolderIds:I,treeState:d},h.id)),(w||y)&&(0,k.jsx)("li",{ref:m,className:"py-2 pl-6 flex justify-start",children:(0,k.jsx)(ve,{className:"h-5 w-5 animate-spin text-blue-500"})}),M.length===0&&!w&&!y&&(0,k.jsx)("li",{className:"text-gray-500 text-sm text-center py-4",children:"No nested folders available"})]})]})})}),(0,k.jsxs)(We,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,k.jsx)(tt,{asChild:!0,children:(0,k.jsx)(C,{type:"button",variant:"outline",radius:"full",className:"w-full md:w-auto",children:"Cancel"})}),(0,k.jsx)(C,{type:"button",onClick:z,disabled:l===void 0,radius:"full",className:"w-full md:w-auto",children:"Move"})]})]})}):null}var zo=require("react");var go=require("radix-ui");var vt=require("react/jsx-runtime");function Qr(i){var l=i,{className:e,viewportClassName:t,children:o,viewportRef:a}=l,n=g(l,["className","viewportClassName","children","viewportRef"]);return(0,vt.jsxs)(go.ScrollArea.Root,s(r({"data-slot":"scroll-area",className:x("relative overflow-hidden",e)},n),{children:[(0,vt.jsx)(go.ScrollArea.Viewport,{ref:a,className:x("h-full w-full rounded-[inherit]",t),children:o}),(0,vt.jsx)(Ii,{}),(0,vt.jsx)(go.ScrollArea.Corner,{})]}))}function Ii(a){var n=a,{className:e,orientation:t="vertical"}=n,o=g(n,["className","orientation"]);return(0,vt.jsx)(go.ScrollArea.ScrollAreaScrollbar,s(r({"data-slot":"scroll-area-scrollbar",orientation:t,className:x("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-[1px]",e)},o),{children:(0,vt.jsx)(go.ScrollArea.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}))}var me=require("react/jsx-runtime");function xt({title:e,open:t,onClose:o,previewSection:a,metadataSection:n,footer:i}){return(0,me.jsx)(Te,{open:t,onOpenChange:l=>!l&&o(),children:(0,me.jsxs)(Ee,{className:"p-0 max-w-6xl w-full mx-auto flex flex-col",variant:"fullscreen",showCloseButton:!1,children:[(0,me.jsxs)(je,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,me.jsx)(Le,{className:"px-6 text-base",children:(0,me.jsxs)("div",{className:"flex w-full justify-between gap-2",children:[(0,me.jsx)("span",{children:e}),(0,me.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>o(),className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50",children:[(0,me.jsx)(ie,{className:"size-5"}),(0,me.jsx)("span",{className:"hidden",children:"Close"})]})]})}),(0,me.jsx)(mt,{})]}),(0,me.jsx)(Qr,{className:"flex-1 h-0",children:(0,me.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 min-h-full",children:[(0,me.jsx)("div",{className:"p-6 border-b lg:border-b-0 lg:border-r border-slate-200 ",children:a}),(0,me.jsx)("div",{className:"p-6 overflow-y-auto",children:n})]})}),(0,me.jsx)(We,{className:"px-6 py-4 border-t border-border",children:i})]})})}var Zt=require("sonner");var pa=require("react");var _e=require("react/jsx-runtime");function bt({file:e}){let{provider:t,setFileDetailsModalFile:o,refreshData:a}=G(),[n,i]=(0,pa.useState)(!1);return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",title:"Delete",className:"border-gray-200 bg-white hover:text-red-600 hover:border-red-200 hover:bg-red-50 active:scale-95 transition-transform",onClick:async()=>{i(!0);try{await t.deleteFiles([e.id]),await a(),o(null),Zt.toast.success("File Deleted",{description:`${Ke(e.name,20)} has been deleted`})}catch(c){Zt.toast.error("Delete failed"),i(!1)}},disabled:n,children:n?(0,_e.jsx)(ve,{className:"size-5 animate-spin"}):(0,_e.jsx)(Ue,{className:"size-5"})})}function wt({file:e}){let[t,o]=(0,pa.useState)(!1);return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{o(!0);try{let n=document.createElement("a");n.href=e.url,n.download=e.name,n.click(),Zt.toast.success("Download Started",{description:`Downloading ${Ke(e.name,20)}`})}catch(n){Zt.toast.error("Download failed")}finally{o(!1)}},className:"border-gray-200 bg-white hover:text-blue-600 hover:border-blue-200 hover:bg-blue-50 active:scale-95 transition-transform",title:"Download",disabled:t,children:t?(0,_e.jsx)(ve,{className:"size-5 animate-spin"}):(0,_e.jsx)(ta,{className:"size-5",strokeWidth:2.5})})}function Ct({file:e}){let[t,o]=(0,pa.useState)(!1);return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",onClick:async()=>{try{await navigator.clipboard.writeText(e.url),o(!0),Zt.toast.success("Link Copied",{description:"File URL copied to clipboard"}),setTimeout(()=>o(!1),2e3)}catch(n){Zt.toast.error("Failed to copy link")}},className:`border-gray-200 bg-white active:scale-95 transition-all ${t?"text-green-700 border-green-400 bg-green-100 font-bold":"hover:text-orange-600 hover:border-orange-200 hover:bg-orange-50"}`,title:"Copy Link",disabled:t,children:t?(0,_e.jsx)(et,{className:"size-5 animate-in zoom-in duration-200",strokeWidth:3}):(0,_e.jsx)(oa,{className:"size-5",strokeWidth:2.5})})}function Jr({file:e,onFullscreen:t}){return(0,_e.jsx)(C,{variant:"outline",size:"icon",radius:"full",onClick:t,className:"border-gray-200 bg-white hover:text-purple-600 hover:border-purple-200 hover:bg-purple-50 active:scale-95 transition-transform",title:"Fullscreen",children:(0,_e.jsx)(aa,{className:"size-5",strokeWidth:1})})}var Xr=require("class-variance-authority");var en=require("react/jsx-runtime"),Ni=(0,Xr.cva)(`
85
85
  w-full bg-background border border-input bg-background text-foreground shadow-xs shadow-black/5 transition-[color,box-shadow]
86
86
  text-foreground placeholder:text-muted-foreground/80 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
87
87
  focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 [&[readonly]]:opacity-70
88
88
  aria-invalid:border-destructive aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
89
- `,{variants:{variant:{sm:"px-2.5 py-2.5 text-xs rounded-md",md:"px-3 py-3 text-sm rounded-md",lg:"px-4 py-4 text-sm rounded-md"}},defaultVariants:{variant:"md"}});function We(o){var r=o,{className:e,variant:t}=r,a=g(r,["className","variant"]);return(0,Jr.jsx)("textarea",n({"data-slot":"textarea",className:x(Ti({variant:t}),e)},a))}var Xr=require("class-variance-authority"),en=require("radix-ui");var tn=require("react/jsx-runtime"),Ri=(0,Xr.cva)("text-sm leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{variant:{primary:"font-medium",secondary:"font-normal"}},defaultVariants:{variant:"primary"}});function Oe(o){var r=o,{className:e,variant:t}=r,a=g(r,["className","variant"]);return(0,tn.jsx)(en.Label.Root,n({"data-slot":"label",className:x(Ri({variant:t}),e)},a))}function vt(e){let t=typeof e=="string"?new Date(e):e,a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),r=t.getFullYear();return`${a}/${o}/${r}`}function eo(e){let t=Math.floor(e/60),a=e%60;return`${t}:${a.toString().padStart(2,"0")}`}var _i=require("react"),an=require("class-variance-authority");var Ei=require("radix-ui");var Ai=require("react/jsx-runtime");var to=require("react/jsx-runtime");var Li=(0,an.cva)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function xt(o){var r=o,{className:e,orientation:t="vertical"}=r,a=g(r,["className","orientation"]);return(0,to.jsx)("div",n({role:"group","data-slot":"field","data-orientation":t,className:x(Li({orientation:t}),e)},a))}function bt(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,to.jsx)(Oe,n({"data-slot":"field-label",className:x("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e)},t))}var To=require("class-variance-authority");var xa=require("react/jsx-runtime");function wt(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,xa.jsx)("div",n({"data-slot":"input-group",role:"group",className:x("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e)},t))}var Vi=(0,To.cva)("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function Ct(o){var r=o,{className:e,align:t="inline-start"}=r,a=g(r,["className","align"]);return(0,xa.jsx)("div",n({role:"group","data-slot":"input-group-addon","data-align":t,className:x(Vi({align:t}),e),onClick:i=>{var l,c;i.target.closest("button")||(c=(l=i.currentTarget.parentElement)==null?void 0:l.querySelector("input"))==null||c.focus()}},a))}var Rc=(0,To.cva)("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function yt(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,xa.jsx)("span",n({className:x("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e)},t))}function Ft(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,xa.jsx)(ta,n({"data-slot":"input-group-control",className:x("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e)},t))}var E=require("react/jsx-runtime");function rn({file:e,onClose:t,onSave:a,onDelete:o}){var M;let[r,i]=(0,ba.useState)(!1),[l,c]=(0,ba.useState)(e.name),[s,f]=(0,ba.useState)(e.alternativeText||""),[m,b]=(0,ba.useState)(e.caption||""),p=async()=>{i(!0);try{await(a==null?void 0:a({name:l,alternativeText:s,caption:m})),t()}finally{i(!1)}},y=(0,E.jsxs)("div",{className:"flex flex-col h-full",children:[(0,E.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,E.jsx)(ft,{file:e}),(0,E.jsx)(gt,{file:e}),(0,E.jsx)(ht,{file:e}),(0,E.jsx)(qr,{file:e,onFullscreen:()=>window.open(e.url,"_blank")})]}),(0,E.jsx)("div",{className:"flex-1 flex items-center justify-center bg-gray-50 dark:bg-gray-900 rounded-lg overflow-hidden",style:{backgroundImage:`
89
+ `,{variants:{variant:{sm:"px-2.5 py-2.5 text-xs rounded-md",md:"px-3 py-3 text-sm rounded-md",lg:"px-4 py-4 text-sm rounded-md"}},defaultVariants:{variant:"md"}});function Ye(a){var n=a,{className:e,variant:t}=n,o=g(n,["className","variant"]);return(0,en.jsx)("textarea",r({"data-slot":"textarea",className:x(Ni({variant:t}),e)},o))}var tn=require("class-variance-authority"),on=require("radix-ui");var an=require("react/jsx-runtime"),ki=(0,tn.cva)("text-sm leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{variant:{primary:"font-medium",secondary:"font-normal"}},defaultVariants:{variant:"primary"}});function Be(a){var n=a,{className:e,variant:t}=n,o=g(n,["className","variant"]);return(0,an.jsx)(on.Label.Root,r({"data-slot":"label",className:x(ki({variant:t}),e)},o))}function yt(e){let t=typeof e=="string"?new Date(e):e,o=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=t.getFullYear();return`${o}/${a}/${n}`}function ma(e){let t=Math.floor(e/60),o=e%60;return`${t}:${o.toString().padStart(2,"0")}`}var zi=require("react"),rn=require("class-variance-authority");var Pi=require("radix-ui");var Si=require("react/jsx-runtime");var ua=require("react/jsx-runtime");var Ri=(0,rn.cva)("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function Ft(a){var n=a,{className:e,orientation:t="vertical"}=n,o=g(n,["className","orientation"]);return(0,ua.jsx)("div",r({role:"group","data-slot":"field","data-orientation":t,className:x(Ri({orientation:t}),e)},o))}function Mt(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,ua.jsx)(Be,r({"data-slot":"field-label",className:x("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e)},t))}var Za=require("class-variance-authority");var So=require("react/jsx-runtime");function Dt(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,So.jsx)("div",r({"data-slot":"input-group",role:"group",className:x("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e)},t))}var Ti=(0,Za.cva)("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function It(a){var n=a,{className:e,align:t="inline-start"}=n,o=g(n,["className","align"]);return(0,So.jsx)("div",r({role:"group","data-slot":"input-group-addon","data-align":t,className:x(Ti({align:t}),e),onClick:i=>{var l,c;i.target.closest("button")||(c=(l=i.currentTarget.parentElement)==null?void 0:l.querySelector("input"))==null||c.focus()}},o))}var up=(0,Za.cva)("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Nt(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,So.jsx)("span",r({className:x("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e)},t))}function kt(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,So.jsx)(fo,r({"data-slot":"input-group-control",className:x("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e)},t))}var E=require("react/jsx-runtime");function nn({file:e,onClose:t,onSave:o,onDelete:a}){var M;let[n,i]=(0,zo.useState)(!1),[l,c]=(0,zo.useState)(e.name),[d,f]=(0,zo.useState)(e.alternativeText||""),[m,b]=(0,zo.useState)(e.caption||""),p=async()=>{i(!0);try{await(o==null?void 0:o({name:l,alternativeText:d,caption:m})),t()}finally{i(!1)}},y=(0,E.jsxs)("div",{className:"flex flex-col h-full",children:[(0,E.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,E.jsx)(bt,{file:e}),(0,E.jsx)(wt,{file:e}),(0,E.jsx)(Ct,{file:e}),(0,E.jsx)(Jr,{file:e,onFullscreen:()=>window.open(e.url,"_blank")})]}),(0,E.jsx)("div",{className:"flex-1 flex items-center justify-center bg-gray-50 dark:bg-gray-900 rounded-lg overflow-hidden",style:{backgroundImage:`
90
90
  linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
91
91
  linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
92
92
  linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
93
93
  linear-gradient(-45deg, transparent 75%, #e5e7eb 75%)
94
- `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},children:(0,E.jsx)("img",{src:e.previewUrl||e.url,alt:e.alternativeText||e.name,className:"max-w-full max-h-full object-contain"})})]}),w=(0,E.jsxs)("div",{className:"space-y-6",children:[(0,E.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:le(e.size)})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Dimensions"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:vt(e.createdAt)})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:((M=e.ext)==null?void 0:M.replace(".",""))||"N/A"})]})]}),(0,E.jsxs)("div",{className:"space-y-4 pt-4 border-t",children:[(0,E.jsx)("div",{className:"space-y-2",children:(0,E.jsxs)(xt,{className:"gap-0",children:[(0,E.jsx)(bt,{htmlFor:"fileName",children:"File name"}),(0,E.jsxs)(wt,{children:[(0,E.jsx)(Ft,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:D=>c(D.target.value)}),(0,E.jsx)(Ct,{align:"inline-end",className:"pr-1",children:(0,E.jsx)(yt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(Oe,{htmlFor:"altText",children:"Alternative text"}),(0,E.jsx)(We,{id:"altText",value:s,onChange:D=>f(D.target.value),placeholder:"Describe the image for accessibility",rows:3}),(0,E.jsx)("p",{className:"text-xs text-muted-foreground",children:"This text will be displayed if the asset can't be shown."})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(Oe,{htmlFor:"caption",children:"Caption"}),(0,E.jsx)(We,{id:"caption",value:m,onChange:D=>b(D.target.value),placeholder:"Add a caption",rows:3})]})]})]});return(0,E.jsx)(ut,{title:"Details",open:!0,onClose:t,previewSection:y,metadataSection:w,footer:(0,E.jsxs)("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[(0,E.jsx)(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:r,children:"Cancel"}),(0,E.jsxs)(C,{className:"w-full md:w-auto",onClick:p,radius:"full",disabled:r,children:[r&&(0,E.jsx)(on.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}var ao=require("react"),nn=require("lucide-react");var R=require("react/jsx-runtime");function ln({file:e,onClose:t,onSave:a,onDelete:o}){var w,N,M;let[r,i]=(0,ao.useState)(!1),[l,c]=(0,ao.useState)(e.name),[s,f]=(0,ao.useState)(e.caption||""),m=async()=>{i(!0);try{await(a==null?void 0:a({name:l,caption:s})),t()}finally{i(!1)}},b=(0,R.jsxs)("div",{className:"flex flex-col h-full",children:[(0,R.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,R.jsx)(ft,{file:e}),(0,R.jsx)(gt,{file:e}),(0,R.jsx)(ht,{file:e})]}),(0,R.jsx)("div",{className:"flex-1 flex items-center justify-center bg-black rounded-lg overflow-hidden",children:(0,R.jsx)("video",{src:e.url,controls:!0,className:"max-w-full max-h-full",style:{maxHeight:"500px"},children:"Your browser does not support the video tag."})})]}),p=(0,R.jsxs)("div",{className:"space-y-6",children:[(0,R.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),(0,R.jsx)("p",{className:"text-xs font-bold text-blue-600",children:le(e.size)})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Dimensions"}),(0,R.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),(0,R.jsx)("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?eo(e.metaData.duration):"N/A"})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),(0,R.jsx)("p",{className:"text-xs font-bold text-blue-600",children:vt(e.createdAt)})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),(0,R.jsx)("p",{className:"text-xs font-bold text-blue-600",children:((N=e.ext)==null?void 0:N.replace(".",""))||"N/A"})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Video Source"}),(0,R.jsx)("p",{className:"text-xs font-bold text-blue-600 capitalize",children:((M=e.metaData)==null?void 0:M.videoSource)||"local"})]})]}),(0,R.jsxs)("div",{className:"space-y-4 pt-4 border-t",children:[(0,R.jsx)("div",{className:"space-y-2",children:(0,R.jsxs)(xt,{className:"gap-0",children:[(0,R.jsx)(bt,{htmlFor:"fileName",children:"File name"}),(0,R.jsxs)(wt,{children:[(0,R.jsx)(Ft,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:D=>c(D.target.value)}),(0,R.jsx)(Ct,{align:"inline-end",className:"pr-1",children:(0,R.jsx)(yt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,R.jsxs)("div",{className:"space-y-2",children:[(0,R.jsx)(Oe,{htmlFor:"caption",children:"Caption"}),(0,R.jsx)(We,{id:"caption",value:s,onChange:D=>f(D.target.value),placeholder:"Add a caption",rows:3})]})]})]});return(0,R.jsx)(ut,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:(0,R.jsxs)("div",{className:"flex w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,R.jsx)(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:r,children:"Cancel"}),(0,R.jsxs)(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:r,children:[r&&(0,R.jsx)(nn.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}var oo=require("react"),sn=require("lucide-react");var dn=require("lucide-react");var S=require("react/jsx-runtime");function cn({file:e,onClose:t,onSave:a,onDelete:o}){var w,N,M;let[r,i]=(0,oo.useState)(!1),[l,c]=(0,oo.useState)(e.name),[s,f]=(0,oo.useState)(e.caption||""),m=async()=>{i(!0);try{await(a==null?void 0:a({name:l,caption:s})),t()}finally{i(!1)}},b=(0,S.jsxs)("div",{className:"flex flex-col h-full",children:[(0,S.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,S.jsx)(ft,{file:e}),(0,S.jsx)(gt,{file:e}),(0,S.jsx)(ht,{file:e})]}),(0,S.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-purple-50 to-blue-50 dark:from-purple-950 dark:to-blue-950 rounded-lg p-8",children:[(0,S.jsx)("div",{className:"mb-8",children:(0,S.jsx)("div",{className:"w-32 h-32 rounded-full bg-white dark:bg-gray-800 shadow-lg flex items-center justify-center",children:(0,S.jsx)(dn.Music,{className:"w-16 h-16 text-purple-600 dark:text-purple-400"})})}),(0,S.jsx)("div",{className:"w-full max-w-md",children:(0,S.jsx)("audio",{src:e.url,controls:!0,className:"w-full",children:"Your browser does not support the audio tag."})})]})]}),p=(0,S.jsxs)("div",{className:"space-y-6",children:[(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:le(e.size)})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?eo(e.metaData.duration):"N/A"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Bitrate"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:(N=e.metaData)!=null&&N.bitrate?`${e.metaData.bitrate} kbps`:"N/A"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:vt(e.createdAt)})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:((M=e.ext)==null?void 0:M.replace(".",""))||"N/A"})]})]}),(0,S.jsxs)("div",{className:"space-y-4 pt-4 border-t",children:[(0,S.jsx)("div",{className:"space-y-2",children:(0,S.jsxs)(xt,{className:"gap-0",children:[(0,S.jsx)(bt,{htmlFor:"fileName",children:"File name"}),(0,S.jsxs)(wt,{children:[(0,S.jsx)(Ft,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:D=>c(D.target.value)}),(0,S.jsx)(Ct,{align:"inline-end",className:"pr-1",children:(0,S.jsx)(yt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)(Oe,{htmlFor:"caption",children:"Caption"}),(0,S.jsx)(We,{id:"caption",value:s,onChange:D=>f(D.target.value),placeholder:"Add a caption",rows:3})]})]})]});return(0,S.jsx)(ut,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:(0,S.jsxs)("div",{className:"flex gap-2 w-full sm:justify-between justify-center items-center flex-col sm:flex-row ",children:[(0,S.jsx)(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:r,children:"Cancel"}),(0,S.jsxs)(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:r,children:[r&&(0,S.jsx)(sn.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}var ro=require("react"),pn=require("lucide-react");var A=require("react/jsx-runtime");function mn({file:e,onClose:t,onSave:a}){var N,M,D,z;let[o,r]=(0,ro.useState)(!1),[i,l]=(0,ro.useState)(e.name),[c,s]=(0,ro.useState)(((N=e.metaData)==null?void 0:N.description)||""),f=async()=>{r(!0);try{await(a==null?void 0:a({name:i,metaData:d(n({},e.metaData),{description:c})})),t()}finally{r(!1)}},m=((M=e.ext)==null?void 0:M.replace(".",""))||"file",{component:b}=ct(e),p=(0,A.jsxs)("div",{className:"flex flex-col h-full",children:[(0,A.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,A.jsx)(ft,{file:e}),(0,A.jsx)(gt,{file:e}),(0,A.jsx)(ht,{file:e})]}),(0,A.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 rounded-lg p-8",children:[(0,A.jsx)("div",{className:"mb-4 w-32 h-32 flex items-center justify-center",children:(0,A.jsx)(b,{file:e,metaData:e.metaData})}),(0,A.jsxs)("p",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[m," File"]})]})]}),y=(0,A.jsxs)("div",{className:"space-y-6",children:[(0,A.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),(0,A.jsx)("p",{className:"text-xs font-bold text-blue-600",children:le(e.size)})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),(0,A.jsx)("p",{className:"text-xs font-bold text-blue-600",children:vt(e.createdAt)})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),(0,A.jsx)("p",{className:"text-xs font-bold text-blue-600",children:m})]}),((D=e.metaData)==null?void 0:D.pageCount)&&(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Page Count"}),(0,A.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.pageCount})]}),((z=e.metaData)==null?void 0:z.author)&&(0,A.jsxs)("div",{children:[(0,A.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Author"}),(0,A.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.author})]})]}),(0,A.jsxs)("div",{className:"space-y-4 pt-4 border-t",children:[(0,A.jsx)("div",{className:"space-y-2",children:(0,A.jsxs)(xt,{className:"gap-0",children:[(0,A.jsx)(bt,{htmlFor:"fileName",children:"File name"}),(0,A.jsxs)(wt,{children:[(0,A.jsx)(Ft,{id:"fileName",placeholder:"Enter file name",value:i.replace(e.ext||"",""),onChange:T=>l(T.target.value)}),(0,A.jsx)(Ct,{align:"inline-end",className:"pr-1",children:(0,A.jsx)(yt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,A.jsxs)("div",{className:"space-y-2",children:[(0,A.jsx)(Oe,{htmlFor:"description",children:"Description"}),(0,A.jsx)(We,{id:"description",value:c,onChange:T=>s(T.target.value),placeholder:"Add a description",rows:3})]})]})]});return(0,A.jsx)(ut,{title:"Details",open:!0,onClose:t,previewSection:p,metadataSection:y,footer:(0,A.jsxs)("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[(0,A.jsx)(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:o,children:"Cancel"}),(0,A.jsxs)(C,{className:"w-full md:w-auto",onClick:f,radius:"full",disabled:o,children:[o&&(0,A.jsx)(pn.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Save"]})]})})}var Ke=require("react/jsx-runtime");function un({className:e}){let{fileDetailsModalFile:t,setFileDetailsModalFile:a,updateFileMetadata:o}=O(),r=()=>{a(null)},i=async c=>{t&&await o(t.id,c)},l=()=>{if(!t)return null;switch(je(t.mime,t.ext)){case X.IMAGE:return(0,Ke.jsx)(rn,{file:t,onClose:r,onSave:i});case X.VIDEO:return(0,Ke.jsx)(ln,{file:t,onClose:r,onSave:i});case X.AUDIO:return(0,Ke.jsx)(cn,{file:t,onClose:r,onSave:i});case X.FILE:default:return(0,Ke.jsx)(mn,{file:t,onClose:r,onSave:i})}};return(0,Ke.jsxs)("div",{className:x("",e),children:[(0,Ke.jsx)(Zr,{}),(0,Ke.jsx)($r,{}),(0,Ke.jsx)(Kr,{}),l()]})}var Ro=require("react/jsx-runtime");function Oi(a){var o=a,{children:e}=o,t=g(o,["children"]);return(0,Ro.jsx)(ia,d(n({mode:oe.PAGE,selectionMode:Le.MULTIPLE},t),{children:e}))}function Gi(c){var s=c,{children:e,fileSelectionMode:t=Le.SINGLE,acceptedFileTypes:a,viewMode:o="grid",onFilesSelected:r,onClose:i}=s,l=g(s,["children","fileSelectionMode","acceptedFileTypes","viewMode","onFilesSelected","onClose"]);return(0,Ro.jsx)(ia,d(n({mode:oe.MODAL,selectionMode:t,acceptedFileTypesForModal:a||l.allowedFileTypes,viewMode:o,onFilesSelected:r,onClose:i},l),{children:e}))}var et={Page:Oi,Modal:Gi,Header:mr,Footer:pr,Overlays:un};var ee=require("react/jsx-runtime");function fn(){let{setIsMoveFileModalOpen:e}=O();return(0,ee.jsxs)(C,{variant:"outline",size:"lg",radius:"full",onClick:()=>e(!0),className:"text-md font-medium bg-white hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 border-gray-200 shadow-sm",children:[(0,ee.jsx)(pa,{className:"size-5"}),(0,ee.jsx)("span",{className:"hidden sm:inline",children:"Move"})]})}function gn(){let{bulkDelete:e}=O();return(0,ee.jsxs)(C,{variant:"outline",size:"lg",radius:"full",onClick:e,className:"text-md font-medium bg-white hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 shadow-sm",children:[(0,ee.jsx)(Ze,{className:"size-5"}),(0,ee.jsx)("span",{className:"hidden",children:"Delete"})]})}function hn(){let{handleClearSelection:e}=O();return(0,ee.jsxs)(C,{variant:"outline",size:"lg",onClick:e,className:"rounded-full text-md font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 hover:font-bold hover:border-blue-200 transition-all duration-200",children:[(0,ee.jsx)(ve,{className:"size-5 text-blue-600"}),"Clear"]})}function vn(){let{selectedFiles:e,selectedFolders:t}=O();return e.length+t.length===0?null:(0,ee.jsx)("div",{className:"w-full",children:(0,ee.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,ee.jsxs)("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[(0,ee.jsx)(fn,{}),(0,ee.jsx)(gn,{})]}),(0,ee.jsx)(hn,{})]})})}function xn({className:e}){let{selectedFiles:t,selectedFolders:a}=O();return t.length+a.length===0?null:(0,ee.jsx)("div",{className:`fixed bottom-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-sm border-t border-gray-200 shadow-lg ${e||""}`,children:(0,ee.jsx)("div",{className:"px-4 sm:px-6 py-3 mx-auto",children:(0,ee.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,ee.jsxs)("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[(0,ee.jsx)(fn,{}),(0,ee.jsx)(gn,{})]}),(0,ee.jsx)(hn,{})]})})})}var bn=require("react/jsx-runtime");function Eo(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,bn.jsx)("div",n({"data-slot":"skeleton",className:x("animate-pulse rounded-md bg-accent",e)},t))}var wn=require("next/navigation"),be=require("react/jsx-runtime");function no(){let{currentFolder:e,handleFolderClick:t,isLoading:a}=O(),o=(0,wn.useRouter)(),r=()=>{o.back()};return a?(0,be.jsxs)("div",{className:"flex item-center w-full",children:[(0,be.jsx)(Eo,{className:"rounded-full size-10 mr-2 shrink-0"}),(0,be.jsx)(Eo,{className:"min-w-32 rounded-md h-full"})]}):(0,be.jsx)(be.Fragment,{children:e?(0,be.jsxs)("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[(0,be.jsx)(C,{variant:"outline",size:"icon",radius:"full",disabled:a,className:"border-gray-200 bg-white mr-2",onClick:r,children:(0,be.jsx)(Gt,{className:"size-5",strokeWidth:"1",stroke:"black"})}),(0,be.jsx)("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:$e(e.name,20)})]}):(0,be.jsxs)("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[(0,be.jsx)(C,{className:"mr-2 shrink-0",radius:"full",variant:"ghost",mode:"icon",size:"icon",onClick:()=>t(null),children:(0,be.jsx)($a,{className:"size-6"})}),(0,be.jsx)("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:"Home"})]})})}var Uo=require("lucide-react");var Ao=require("lucide-react"),_t=require("radix-ui");var Mt=require("react/jsx-runtime");function wa(t){var e=g(t,[]);return(0,Mt.jsx)(_t.DropdownMenu.Root,n({"data-slot":"dropdown-menu"},e))}function Ca(t){var e=g(t,[]);return(0,Mt.jsx)(_t.DropdownMenu.Trigger,n({className:"select-none","data-slot":"dropdown-menu-trigger"},e))}function ya(o){var r=o,{className:e,sideOffset:t=4}=r,a=g(r,["className","sideOffset"]);return(0,Mt.jsx)(_t.DropdownMenu.Portal,{children:(0,Mt.jsx)(_t.DropdownMenu.Content,n({"data-slot":"dropdown-menu-content",sideOffset:t,className:x("space-y-0.5 z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},a))})}function tt(r){var i=r,{className:e,inset:t,variant:a}=i,o=g(i,["className","inset","variant"]);return(0,Mt.jsx)(_t.DropdownMenu.Item,n({"data-slot":"dropdown-menu-item",className:x("text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0","focus:bg-accent focus:text-foreground","data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",t&&"ps-8",a==="destructive"&&"text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",e)},o))}function Cn(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Mt.jsx)(_t.DropdownMenu.Separator,n({"data-slot":"dropdown-menu-separator",className:x("-mx-2 my-1.5 h-px bg-muted",e)},t))}var at=require("react");var Lt=require("cmdk"),_o=require("lucide-react");var Fe=require("react/jsx-runtime");function Bi(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Fe.jsx)(Lt.Command,n({className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e)},t))}var yn=r=>{var i=r,{children:e,className:t,shouldFilter:a}=i,o=g(i,["children","className","shouldFilter"]);return(0,Fe.jsx)(ze,d(n({},o),{children:(0,Fe.jsxs)(Te,{className:x("overflow-hidden p-0 shadow-lg",t),children:[(0,Fe.jsx)(Re,{className:"hidden"}),(0,Fe.jsx)(Bi,{shouldFilter:a,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})]})}))};function Fn(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Fe.jsxs)("div",{className:"flex items-center border-border border-b px-3","cmdk-input-wrapper":"","data-slot":"command-input",children:[(0,Fe.jsx)(_o.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,Fe.jsx)(Lt.Command.Input,n({className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e)},t))]})}function Mn(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Fe.jsx)(Lt.Command.List,n({"data-slot":"command-list",className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e)},t))}function io(t){var e=g(t,[]);return(0,Fe.jsx)(Lt.Command.Empty,n({"data-slot":"command-empty",className:"py-6 text-center text-sm"},e))}function Lo(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Fe.jsx)(Lt.Command.Group,n({"data-slot":"command-group",className:x("overflow-hidden p-1.5 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e)},t))}function Vo(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Fe.jsx)(Lt.Command.Item,n({"data-slot":"command-item",className:x("relative flex text-foreground cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0","[&_svg:not([role=img]):not([class*=text-])]:opacity-60",e)},t))}var lo=require("react");function so(e,t=500){let[a,o]=(0,lo.useState)(e);return(0,lo.useEffect)(()=>{let r=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(r)}},[e,t]),a}var Dn=require("sonner");var H=require("react/jsx-runtime");function Oo(){let[e,t]=(0,at.useState)(""),[a,o]=(0,at.useState)([]),[r,i]=(0,at.useState)([]),[l,c]=(0,at.useState)(!1),{provider:s,handleFolderClick:f,handleClearSelection:m,isSearchModalOpen:b,setIsSearchModalOpen:p,setFileDetailsModalFile:y}=O(),w=so(e,300),N=(0,at.useCallback)(async z=>{c(!0);try{let[T,h]=await Promise.all([s.findFiles(z),s.findFolders(z)]);o(T),i(h)}catch(T){let h=T instanceof Error?T.message:"Search failed";Dn.toast.error("Search Failed",{description:h}),o([]),i([])}finally{c(!1)}},[s]);return(0,at.useEffect)(()=>{b&&w.length>0?N(w):(o([]),i([]))},[w,b,N]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>p(!0),children:[(0,H.jsx)(Ae,{className:"size-4 text-gray-700"}),(0,H.jsx)("span",{className:"hidden",children:"Search"})]}),(0,H.jsxs)(yn,{className:"max-w-4xl w-full",open:b,onOpenChange:z=>{p(z),z||(t(""),o([]),i([]))},shouldFilter:!1,children:[(0,H.jsx)(Fn,{placeholder:"Type to search files or folders...",value:e,onValueChange:z=>{t(z)}}),(0,H.jsxs)(Mn,{children:[l&&(0,H.jsx)(io,{children:"Searching..."}),!l&&a.length===0&&r.length===0&&!e&&(0,H.jsx)(io,{children:(0,H.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[(0,H.jsx)(Ae,{className:"size-12 text-gray-300 mb-3"}),(0,H.jsx)("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"Search your files and folders"}),(0,H.jsx)("p",{className:"text-xs text-gray-500",children:"Start typing to find what you're looking for"}),(0,H.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:(0,H.jsx)(ea,{children:(0,H.jsxs)(Xt,{children:[(0,H.jsx)("span",{className:"text-lg",children:"\u2318"})," + K"]})})})]})}),!l&&a.length===0&&r.length===0&&e&&(0,H.jsx)(io,{children:(0,H.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[(0,H.jsx)(Ae,{className:"size-12 text-gray-300 mb-3"}),(0,H.jsx)("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"No results found"}),(0,H.jsx)("p",{className:"text-xs text-gray-500",children:"Try searching with different keywords"})]})}),r.length>0&&(0,H.jsx)(Lo,{heading:"Folders",children:r.map(z=>(0,H.jsxs)(Vo,{onSelect:()=>{m(),p(!1),f(z)},children:[(0,H.jsx)(Xe,{className:"size-4 mr-2 shrink-0",strokeWidth:1.5}),(0,H.jsx)("span",{children:$e(z.name,60)})]},z.id))}),a.length>0&&(0,H.jsx)(Lo,{heading:"Files",children:a.map(z=>{let{component:T}=ct(z);return(0,H.jsxs)(Vo,{onSelect:()=>{m(),y(z)},children:[(0,H.jsx)("div",{className:"size-6 mr-2 shrink-0 flex items-center justify-center",children:(0,H.jsx)(T,{file:z,metaData:z.metaData})}),(0,H.jsx)("span",{children:$e(z.name,60)})]},z.id)})})]})]})]})}var Nn=require("class-variance-authority"),co=require("lucide-react"),Go=require("radix-ui");var oa=require("react/jsx-runtime"),Hi=(0,Nn.cva)(`
94
+ `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},children:(0,E.jsx)("img",{src:e.previewUrl||e.url,alt:e.alternativeText||e.name,className:"max-w-full max-h-full object-contain"})})]}),w=(0,E.jsxs)("div",{className:"space-y-6",children:[(0,E.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:se(e.size)})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Dimensions"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:yt(e.createdAt)})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),(0,E.jsx)("p",{className:"text-xs font-bold text-blue-600",children:((M=e.ext)==null?void 0:M.replace(".",""))||"N/A"})]})]}),(0,E.jsxs)("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[(0,E.jsx)("div",{className:"space-y-2",children:(0,E.jsxs)(Ft,{className:"gap-0",children:[(0,E.jsx)(Mt,{htmlFor:"fileName",children:"File name"}),(0,E.jsxs)(Dt,{children:[(0,E.jsx)(kt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:D=>c(D.target.value)}),(0,E.jsx)(It,{align:"inline-end",className:"pr-1",children:(0,E.jsx)(Nt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(Be,{htmlFor:"altText",children:"Alternative text"}),(0,E.jsx)(Ye,{id:"altText",value:d,onChange:D=>f(D.target.value),placeholder:"Describe the image for accessibility",rows:3}),(0,E.jsx)("p",{className:"text-xs text-muted-foreground",children:"This text will be displayed if the asset can't be shown."})]}),(0,E.jsxs)("div",{className:"space-y-2",children:[(0,E.jsx)(Be,{htmlFor:"caption",children:"Caption"}),(0,E.jsx)(Ye,{id:"caption",value:m,onChange:D=>b(D.target.value),placeholder:"Add a caption",rows:3})]})]})]});return(0,E.jsx)(xt,{title:"Details",open:!0,onClose:t,previewSection:y,metadataSection:w,footer:(0,E.jsxs)("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[(0,E.jsx)(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:n,children:"Cancel"}),(0,E.jsxs)(C,{className:"w-full md:w-auto",onClick:p,radius:"full",disabled:n,children:[n&&(0,E.jsx)(ve,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}var fa=require("react");var T=require("react/jsx-runtime");function ln({file:e,onClose:t,onSave:o,onDelete:a}){var w,I,M;let[n,i]=(0,fa.useState)(!1),[l,c]=(0,fa.useState)(e.name),[d,f]=(0,fa.useState)(e.caption||""),m=async()=>{i(!0);try{await(o==null?void 0:o({name:l,caption:d})),t()}finally{i(!1)}},b=(0,T.jsxs)("div",{className:"flex flex-col h-full",children:[(0,T.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,T.jsx)(bt,{file:e}),(0,T.jsx)(wt,{file:e}),(0,T.jsx)(Ct,{file:e})]}),(0,T.jsx)("div",{className:"flex-1 flex items-center justify-center bg-black rounded-lg overflow-hidden",children:(0,T.jsx)("video",{src:e.url,controls:!0,className:"max-w-full max-h-full",style:{maxHeight:"500px"},children:"Your browser does not support the video tag."})})]}),p=(0,T.jsxs)("div",{className:"space-y-6",children:[(0,T.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),(0,T.jsx)("p",{className:"text-xs font-bold text-blue-600",children:se(e.size)})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Dimensions"}),(0,T.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.width&&e.height?`${e.width}\xD7${e.height}`:"N/A"})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),(0,T.jsx)("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?ma(e.metaData.duration):"N/A"})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),(0,T.jsx)("p",{className:"text-xs font-bold text-blue-600",children:yt(e.createdAt)})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),(0,T.jsx)("p",{className:"text-xs font-bold text-blue-600",children:((I=e.ext)==null?void 0:I.replace(".",""))||"N/A"})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Video Source"}),(0,T.jsx)("p",{className:"text-xs font-bold text-blue-600 capitalize",children:((M=e.metaData)==null?void 0:M.videoSource)||"local"})]})]}),(0,T.jsxs)("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[(0,T.jsx)("div",{className:"space-y-2",children:(0,T.jsxs)(Ft,{className:"gap-0",children:[(0,T.jsx)(Mt,{htmlFor:"fileName",children:"File name"}),(0,T.jsxs)(Dt,{children:[(0,T.jsx)(kt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:D=>c(D.target.value)}),(0,T.jsx)(It,{align:"inline-end",className:"pr-1",children:(0,T.jsx)(Nt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,T.jsxs)("div",{className:"space-y-2",children:[(0,T.jsx)(Be,{htmlFor:"caption",children:"Caption"}),(0,T.jsx)(Ye,{id:"caption",value:d,onChange:D=>f(D.target.value),placeholder:"Add a caption",rows:3})]})]})]});return(0,T.jsx)(xt,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:(0,T.jsxs)("div",{className:"flex w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2 ",children:[(0,T.jsx)(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:n,children:"Cancel"}),(0,T.jsxs)(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:n,children:[n&&(0,T.jsx)(ve,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}var ga=require("react");var S=require("react/jsx-runtime");function sn({file:e,onClose:t,onSave:o,onDelete:a}){var w,I,M;let[n,i]=(0,ga.useState)(!1),[l,c]=(0,ga.useState)(e.name),[d,f]=(0,ga.useState)(e.caption||""),m=async()=>{i(!0);try{await(o==null?void 0:o({name:l,caption:d})),t()}finally{i(!1)}},b=(0,S.jsxs)("div",{className:"flex flex-col h-full",children:[(0,S.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,S.jsx)(bt,{file:e}),(0,S.jsx)(wt,{file:e}),(0,S.jsx)(Ct,{file:e})]}),(0,S.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-purple-50 to-blue-50 dark:from-purple-950 dark:to-blue-950 rounded-lg p-8",children:[(0,S.jsx)("div",{className:"mb-8",children:(0,S.jsx)("div",{className:"w-32 h-32 rounded-full bg-white dark:bg-gray-800 shadow-lg flex items-center justify-center",children:(0,S.jsx)(oo,{className:"w-16 h-16 text-purple-600 dark:text-purple-400"})})}),(0,S.jsx)("div",{className:"w-full max-w-md",children:(0,S.jsx)("audio",{src:e.url,controls:!0,className:"w-full",children:"Your browser does not support the audio tag."})})]})]}),p=(0,S.jsxs)("div",{className:"space-y-6",children:[(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Size"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:se(e.size)})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Duration"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:(w=e.metaData)!=null&&w.duration?ma(e.metaData.duration):"N/A"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Bitrate"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:(I=e.metaData)!=null&&I.bitrate?`${e.metaData.bitrate} kbps`:"N/A"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Date"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:yt(e.createdAt)})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Extension"}),(0,S.jsx)("p",{className:"text-xs font-bold text-blue-600",children:((M=e.ext)==null?void 0:M.replace(".",""))||"N/A"})]})]}),(0,S.jsxs)("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[(0,S.jsx)("div",{className:"space-y-2",children:(0,S.jsxs)(Ft,{className:"gap-0",children:[(0,S.jsx)(Mt,{htmlFor:"fileName",children:"File name"}),(0,S.jsxs)(Dt,{children:[(0,S.jsx)(kt,{id:"fileName",placeholder:"Enter file name",value:l.replace(e.ext||"",""),onChange:D=>c(D.target.value)}),(0,S.jsx)(It,{align:"inline-end",className:"pr-1",children:(0,S.jsx)(Nt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)(Be,{htmlFor:"caption",children:"Caption"}),(0,S.jsx)(Ye,{id:"caption",value:d,onChange:D=>f(D.target.value),placeholder:"Add a caption",rows:3})]})]})]});return(0,S.jsx)(xt,{title:"Details",open:!0,onClose:t,previewSection:b,metadataSection:p,footer:(0,S.jsxs)("div",{className:"flex gap-2 w-full sm:justify-between justify-center items-center flex-col sm:flex-row ",children:[(0,S.jsx)(C,{variant:"outline",onClick:t,radius:"full",className:"w-full md:w-auto",disabled:n,children:"Cancel"}),(0,S.jsxs)(C,{onClick:m,radius:"full",className:"w-full md:w-auto",disabled:n,children:[n&&(0,S.jsx)(ve,{className:"mr-2 h-4 w-4 animate-spin"}),"Finish"]})]})})}var ha=require("react");var L=require("react/jsx-runtime");function dn({file:e,onClose:t,onSave:o}){var I,M,D,z;let[a,n]=(0,ha.useState)(!1),[i,l]=(0,ha.useState)(e.name),[c,d]=(0,ha.useState)(((I=e.metaData)==null?void 0:I.description)||""),f=async()=>{n(!0);try{await(o==null?void 0:o({name:i,metaData:s(r({},e.metaData),{description:c})})),t()}finally{n(!1)}},m=((M=e.ext)==null?void 0:M.replace(".",""))||"file",{component:b}=gt(e),p=(0,L.jsxs)("div",{className:"flex flex-col h-full",children:[(0,L.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,L.jsx)(bt,{file:e}),(0,L.jsx)(wt,{file:e}),(0,L.jsx)(Ct,{file:e})]}),(0,L.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center bg-linear-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800 rounded-lg p-8",children:[(0,L.jsx)("div",{className:"mb-4 w-32 h-32 flex items-center justify-center",children:(0,L.jsx)(b,{file:e,metaData:e.metaData})}),(0,L.jsxs)("p",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[m," File"]})]})]}),y=(0,L.jsxs)("div",{className:"space-y-6",children:[(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Size"}),(0,L.jsx)("p",{className:"text-xs font-bold text-blue-600",children:se(e.size)})]}),(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Date"}),(0,L.jsx)("p",{className:"text-xs font-bold text-blue-600",children:yt(e.createdAt)})]}),(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{className:"text-xs font-medium text-muted-foreground tracking-wide mb-1",children:"Extension"}),(0,L.jsx)("p",{className:"text-xs font-bold text-blue-600",children:m})]}),((D=e.metaData)==null?void 0:D.pageCount)&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Page Count"}),(0,L.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.pageCount})]}),((z=e.metaData)==null?void 0:z.author)&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Author"}),(0,L.jsx)("p",{className:"text-xs font-bold text-blue-600",children:e.metaData.author})]})]}),(0,L.jsxs)("div",{className:"space-y-4 pt-4 border-t border-slate-200",children:[(0,L.jsx)("div",{className:"space-y-2",children:(0,L.jsxs)(Ft,{className:"gap-0",children:[(0,L.jsx)(Mt,{htmlFor:"fileName",children:"File name"}),(0,L.jsxs)(Dt,{children:[(0,L.jsx)(kt,{id:"fileName",placeholder:"Enter file name",value:i.replace(e.ext||"",""),onChange:R=>l(R.target.value)}),(0,L.jsx)(It,{align:"inline-end",className:"pr-1",children:(0,L.jsx)(Nt,{className:"font-bold bg-gray-200 rounded-lg py-1 px-3",children:e.ext})})]})]})}),(0,L.jsxs)("div",{className:"space-y-2",children:[(0,L.jsx)(Be,{htmlFor:"description",children:"Description"}),(0,L.jsx)(Ye,{id:"description",value:c,onChange:R=>d(R.target.value),placeholder:"Add a description",rows:3})]})]})]});return(0,L.jsx)(xt,{title:"Details",open:!0,onClose:t,previewSection:p,metadataSection:y,footer:(0,L.jsxs)("div",{className:"flex w-full justify-between items-center flex-col sm:flex-row gap-2 ",children:[(0,L.jsx)(C,{className:"w-full md:w-auto",variant:"outline",onClick:t,radius:"full",disabled:a,children:"Cancel"}),(0,L.jsxs)(C,{className:"w-full md:w-auto",onClick:f,radius:"full",disabled:a,children:[a&&(0,L.jsx)(ve,{className:"mr-2 h-4 w-4 animate-spin"}),"Save"]})]})})}var qe=require("react/jsx-runtime");function cn({className:e}){let{fileDetailsModalFile:t,setFileDetailsModalFile:o,updateFileMetadata:a}=G(),n=()=>{o(null)},i=async c=>{t&&await a(t.id,c)},l=()=>{if(!t)return null;switch($e(t.mime,t.ext)){case X.IMAGE:return(0,qe.jsx)(nn,{file:t,onClose:n,onSave:i});case X.VIDEO:return(0,qe.jsx)(ln,{file:t,onClose:n,onSave:i});case X.AUDIO:return(0,qe.jsx)(sn,{file:t,onClose:n,onSave:i});case X.FILE:default:return(0,qe.jsx)(dn,{file:t,onClose:n,onSave:i})}};return(0,qe.jsxs)("div",{className:x("",e),children:[(0,qe.jsx)(Wr,{}),(0,qe.jsx)(Kr,{}),(0,qe.jsx)(qr,{}),l()]})}var Ua=require("react/jsx-runtime");function Ei(o){var a=o,{children:e}=a,t=g(a,["children"]);return(0,Ua.jsx)(bo,s(r({mode:ae.PAGE,selectionMode:Ve.MULTIPLE},t),{children:e}))}function Li(c){var d=c,{children:e,fileSelectionMode:t=Ve.SINGLE,acceptedFileTypes:o,viewMode:a="grid",onFilesSelected:n,onClose:i}=d,l=g(d,["children","fileSelectionMode","acceptedFileTypes","viewMode","onFilesSelected","onClose"]);return(0,Ua.jsx)(bo,s(r({mode:ae.MODAL,selectionMode:t,acceptedFileTypesForModal:o||l.allowedFileTypes,viewMode:a,onFilesSelected:n,onClose:i},l),{children:e}))}var rt={Page:Ei,Modal:Li,Header:vr,Footer:hr,Overlays:cn};var ee=require("react/jsx-runtime");function pn(){let{setIsMoveFileModalOpen:e}=G();return(0,ee.jsxs)(C,{variant:"outline",size:"lg",radius:"full",onClick:()=>e(!0),className:"text-md font-medium bg-white hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 border-gray-200 shadow-sm",children:[(0,ee.jsx)(Xe,{className:"size-5"}),(0,ee.jsx)("span",{className:"hidden sm:inline",children:"Move"})]})}function mn(){let{bulkDelete:e}=G();return(0,ee.jsxs)(C,{variant:"outline",size:"lg",radius:"full",onClick:e,className:"text-md font-medium bg-white hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 shadow-sm",children:[(0,ee.jsx)(Ue,{className:"size-5"}),(0,ee.jsx)("span",{className:"hidden",children:"Delete"})]})}function un(){let{handleClearSelection:e}=G();return(0,ee.jsxs)(C,{variant:"outline",size:"lg",onClick:e,className:"rounded-full text-md font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 hover:font-bold hover:border-blue-200 transition-all duration-200",children:[(0,ee.jsx)(ie,{className:"size-5 text-blue-600"}),"Clear"]})}function fn(){let{selectedFiles:e,selectedFolders:t}=G();return e.length+t.length===0?null:(0,ee.jsx)("div",{className:"w-full",children:(0,ee.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,ee.jsxs)("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[(0,ee.jsx)(pn,{}),(0,ee.jsx)(mn,{})]}),(0,ee.jsx)(un,{})]})})}function gn({className:e}){let{selectedFiles:t,selectedFolders:o}=G();return t.length+o.length===0?null:(0,ee.jsx)("div",{className:`fixed bottom-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-sm border-t border-gray-200 shadow-lg ${e||""}`,children:(0,ee.jsx)("div",{className:"px-4 sm:px-6 py-3 mx-auto",children:(0,ee.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,ee.jsxs)("div",{className:"flex items-center gap-2 flex-1 sm:flex-initial",children:[(0,ee.jsx)(pn,{}),(0,ee.jsx)(mn,{})]}),(0,ee.jsx)(un,{})]})})})}var hn=require("react/jsx-runtime");function ja(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,hn.jsx)("div",r({"data-slot":"skeleton",className:x("animate-pulse rounded-md bg-accent",e)},t))}var vn=require("next/navigation"),we=require("react/jsx-runtime");function va(){let{currentFolder:e,handleFolderClick:t,isLoading:o}=G(),a=(0,vn.useRouter)(),n=()=>{a.back()};return o?(0,we.jsxs)("div",{className:"flex item-center w-full",children:[(0,we.jsx)(ja,{className:"rounded-full size-10 mr-2 shrink-0"}),(0,we.jsx)(ja,{className:"min-w-32 rounded-md h-full"})]}):(0,we.jsx)(we.Fragment,{children:e?(0,we.jsxs)("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[(0,we.jsx)(C,{variant:"outline",size:"icon",radius:"full",disabled:o,className:"border-gray-200 bg-white mr-2",onClick:n,children:(0,we.jsx)(io,{className:"size-5",strokeWidth:"1",stroke:"black"})}),(0,we.jsx)("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:Ke(e.name,20)})]}):(0,we.jsxs)("div",{className:"flex items-center flex-1 min-w-0 max-w-[calc(100%-40px)]",children:[(0,we.jsx)(C,{className:"mr-2 shrink-0",radius:"full",variant:"ghost",mode:"icon",size:"icon",onClick:()=>t(null),children:(0,we.jsx)(ea,{className:"size-6"})}),(0,we.jsx)("h1",{className:"text-lg flex-1 min-w-0 align-middle font-semibold",children:"Home"})]})})}var Ai=require("lucide-react");var Ut=require("radix-ui");var Pt=require("react/jsx-runtime");function Ro(t){var e=g(t,[]);return(0,Pt.jsx)(Ut.DropdownMenu.Root,r({"data-slot":"dropdown-menu"},e))}function To(t){var e=g(t,[]);return(0,Pt.jsx)(Ut.DropdownMenu.Trigger,r({className:"select-none","data-slot":"dropdown-menu-trigger"},e))}function Eo(a){var n=a,{className:e,sideOffset:t=4}=n,o=g(n,["className","sideOffset"]);return(0,Pt.jsx)(Ut.DropdownMenu.Portal,{children:(0,Pt.jsx)(Ut.DropdownMenu.Content,r({"data-slot":"dropdown-menu-content",sideOffset:t,className:x("space-y-0.5 z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},o))})}function nt(n){var i=n,{className:e,inset:t,variant:o}=i,a=g(i,["className","inset","variant"]);return(0,Pt.jsx)(Ut.DropdownMenu.Item,r({"data-slot":"dropdown-menu-item",className:x("text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0","focus:bg-accent focus:text-foreground","data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",t&&"ps-8",o==="destructive"&&"text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",e)},a))}function xn(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,Pt.jsx)(Ut.DropdownMenu.Separator,r({"data-slot":"dropdown-menu-separator",className:x("-mx-2 my-1.5 h-px bg-muted",e)},t))}var it=require("react");var jt=require("cmdk");var De=require("react/jsx-runtime");function _i(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,De.jsx)(jt.Command,r({className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e)},t))}var bn=n=>{var i=n,{children:e,className:t,shouldFilter:o}=i,a=g(i,["children","className","shouldFilter"]);return(0,De.jsx)(Te,s(r({},a),{children:(0,De.jsxs)(Ee,{className:x("overflow-hidden p-0 shadow-lg",t),children:[(0,De.jsx)(Le,{className:"hidden"}),(0,De.jsx)(_i,{shouldFilter:o,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})]})}))};function wn(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,De.jsxs)("div",{className:"flex items-center border-border border-b px-3","cmdk-input-wrapper":"","data-slot":"command-input",children:[(0,De.jsx)(Me,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,De.jsx)(jt.Command.Input,r({className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e)},t))]})}function Cn(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,De.jsx)(jt.Command.List,r({"data-slot":"command-list",className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e)},t))}function xa(t){var e=g(t,[]);return(0,De.jsx)(jt.Command.Empty,r({"data-slot":"command-empty",className:"py-6 text-center text-sm"},e))}function Wa(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,De.jsx)(jt.Command.Group,r({"data-slot":"command-group",className:x("overflow-hidden p-1.5 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e)},t))}function $a(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,De.jsx)(jt.Command.Item,r({"data-slot":"command-item",className:x("relative flex text-foreground cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0","[&_svg:not([role=img]):not([class*=text-])]:opacity-60",e)},t))}var ba=require("react");function wa(e,t=500){let[o,a]=(0,ba.useState)(e);return(0,ba.useEffect)(()=>{let n=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(n)}},[e,t]),o}var yn=require("sonner");var H=require("react/jsx-runtime");function Ka(){let[e,t]=(0,it.useState)(""),[o,a]=(0,it.useState)([]),[n,i]=(0,it.useState)([]),[l,c]=(0,it.useState)(!1),{provider:d,handleFolderClick:f,handleClearSelection:m,isSearchModalOpen:b,setIsSearchModalOpen:p,setFileDetailsModalFile:y}=G(),w=wa(e,300),I=(0,it.useCallback)(async z=>{c(!0);try{let[R,h]=await Promise.all([d.findFiles(z),d.findFolders(z)]);a(R),i(h)}catch(R){let h=R instanceof Error?R.message:"Search failed";yn.toast.error("Search Failed",{description:h}),a([]),i([])}finally{c(!1)}},[d]);return(0,it.useEffect)(()=>{b&&w.length>0?I(w):(a([]),i([]))},[w,b,I]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>p(!0),children:[(0,H.jsx)(Me,{className:"size-4 text-gray-700"}),(0,H.jsx)("span",{className:"hidden",children:"Search"})]}),(0,H.jsxs)(bn,{className:"max-w-4xl w-full",open:b,onOpenChange:z=>{p(z),z||(t(""),a([]),i([]))},shouldFilter:!1,children:[(0,H.jsx)(wn,{placeholder:"Type to search files or folders...",value:e,onValueChange:z=>{t(z)}}),(0,H.jsxs)(Cn,{children:[l&&(0,H.jsx)(xa,{children:"Searching..."}),!l&&o.length===0&&n.length===0&&!e&&(0,H.jsx)(xa,{children:(0,H.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[(0,H.jsx)(Me,{className:"size-12 text-gray-300 mb-3"}),(0,H.jsx)("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"Search your files and folders"}),(0,H.jsx)("p",{className:"text-xs text-gray-500",children:"Start typing to find what you're looking for"}),(0,H.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:(0,H.jsx)(uo,{children:(0,H.jsxs)(mo,{children:[(0,H.jsx)("span",{className:"text-lg",children:"\u2318"})," + K"]})})})]})}),!l&&o.length===0&&n.length===0&&e&&(0,H.jsx)(xa,{children:(0,H.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[(0,H.jsx)(Me,{className:"size-12 text-gray-300 mb-3"}),(0,H.jsx)("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"No results found"}),(0,H.jsx)("p",{className:"text-xs text-gray-500",children:"Try searching with different keywords"})]})}),n.length>0&&(0,H.jsx)(Wa,{heading:"Folders",children:n.map(z=>(0,H.jsxs)($a,{onSelect:()=>{m(),p(!1),f(z)},children:[(0,H.jsx)(Je,{className:"size-4 mr-2 shrink-0",strokeWidth:1.5}),(0,H.jsx)("span",{children:Ke(z.name,60)})]},z.id))}),o.length>0&&(0,H.jsx)(Wa,{heading:"Files",children:o.map(z=>{let{component:R}=gt(z);return(0,H.jsxs)($a,{onSelect:()=>{m(),y(z)},children:[(0,H.jsx)("div",{className:"size-6 mr-2 shrink-0 flex items-center justify-center",children:(0,H.jsx)(R,{file:z,metaData:z.metaData})}),(0,H.jsx)("span",{children:Ke(z.name,60)})]},z.id)})})]})]})]})}var Fn=require("class-variance-authority");var Ya=require("radix-ui");var ho=require("react/jsx-runtime"),Vi=(0,Fn.cva)(`
95
95
  group peer bg-background shrink-0 rounded-md border border-input ring-offset-background focus-visible:outline-none
96
96
  focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50
97
97
  aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
98
98
  [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20,
99
99
  data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:text-primary-foreground
100
- `,{variants:{size:{sm:"size-4.5 [&_svg]:size-3",md:"size-5 [&_svg]:size-3.5",lg:"size-5.5 [&_svg]:size-4"}},defaultVariants:{size:"md"}});function Fa(o){var r=o,{className:e,size:t}=r,a=g(r,["className","size"]);return(0,oa.jsx)(Go.Checkbox.Root,d(n({"data-slot":"checkbox",className:x(Hi({size:t}),e)},a),{children:(0,oa.jsxs)(Go.Checkbox.Indicator,{className:x("flex items-center justify-center text-current"),children:[(0,oa.jsx)(co.Check,{className:"group-data-[state=indeterminate]:hidden"}),(0,oa.jsx)(co.Minus,{className:"hidden group-data-[state=indeterminate]:block"})]})}))}var ot=require("react/jsx-runtime");function In(){return(0,ot.jsx)(Oo,{})}function Bo(){let{setIsUploadModalOpen:e}=O();return(0,ot.jsxs)(C,{variant:"outline",size:"md",radius:"full",className:"border-gray-200 bg-white text-md font-medium",onClick:()=>e(!0),children:[(0,ot.jsx)(St,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),(0,ot.jsx)("span",{className:"hidden sm:inline",children:"Upload File"})]})}function Ho(){let{setIsCreateFolderModalOpen:e}=O();return(0,ot.jsxs)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>e(!0),children:[(0,ot.jsx)(kt,{className:"size-5 text-gray-900"}),(0,ot.jsx)("span",{className:"hidden",children:"Create Folder"})]})}var k=require("react/jsx-runtime");function Pn(){let{setIsUploadModalOpen:e,setIsCreateFolderModalOpen:t,setIsSearchModalOpen:a}=O();return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("div",{className:"hidden md:flex gap-2",children:[(0,k.jsx)(Bo,{}),(0,k.jsx)(Ho,{}),(0,k.jsx)(In,{})]}),(0,k.jsx)("div",{className:"flex md:hidden",children:(0,k.jsxs)(wa,{children:[(0,k.jsx)(Ca,{asChild:!0,children:(0,k.jsx)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:(0,k.jsx)(Uo.MoreHorizontal,{className:"size-5"})})}),(0,k.jsxs)(ya,{align:"end",className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:[(0,k.jsxs)(tt,{onClick:()=>e(!0),className:"cursor-pointer",children:[(0,k.jsx)(St,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),(0,k.jsx)("span",{className:"inline",children:"Upload File"})]}),(0,k.jsxs)(tt,{onClick:()=>t(!0),className:"cursor-pointer",children:[(0,k.jsx)(kt,{className:"size-5 text-gray-900"}),(0,k.jsx)("span",{className:"inline",children:"Create Folder"})]}),(0,k.jsxs)(tt,{onClick:()=>a(!0),className:"cursor-pointer",children:[(0,k.jsx)(Ae,{className:"size-5 text-gray-700"}),(0,k.jsx)("span",{className:"inline",children:"Search"})]})]})]})})]})}function kn({onSearchClick:e}){let{setIsUploadModalOpen:t,setIsCreateFolderModalOpen:a}=O();return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("div",{className:"hidden md:flex gap-2",children:[(0,k.jsx)(Bo,{}),(0,k.jsx)(Ho,{}),e?(0,k.jsxs)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:e,children:[(0,k.jsx)(Ae,{className:"size-5 text-gray-900"}),(0,k.jsx)("span",{className:"hidden",children:"Search"})]}):null]}),(0,k.jsx)("div",{className:"flex md:hidden",children:(0,k.jsxs)(wa,{children:[(0,k.jsx)(Ca,{asChild:!0,children:(0,k.jsx)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:(0,k.jsx)(Uo.MoreHorizontal,{className:"size-5"})})}),(0,k.jsxs)(ya,{align:"end",className:"w-48",children:[(0,k.jsxs)(tt,{onClick:()=>t(!0),className:"cursor-pointer",children:[(0,k.jsx)(St,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),(0,k.jsx)("span",{className:"inline",children:"Upload File"})]}),(0,k.jsxs)(tt,{onClick:()=>a(!0),className:"cursor-pointer",children:[(0,k.jsx)(kt,{className:"size-5 text-gray-900"}),(0,k.jsx)("span",{className:"inline",children:"Create Folder"})]}),e?(0,k.jsxs)(tt,{onClick:e,className:"cursor-pointer",children:[(0,k.jsx)(Ae,{className:"size-5 text-gray-700"}),(0,k.jsx)("span",{className:"inline",children:"Search"})]}):null]})]})})]})}var Ln=require("lucide-react");var An=ka(require("react")),_n=require("lucide-react");var ne=ka(require("@radix-ui/react-context-menu")),Zo=require("lucide-react");var Dt=require("react/jsx-runtime");function Sn(t){var e=g(t,[]);return(0,Dt.jsx)(ne.Root,n({"data-slot":"context-menu"},e))}function zn(t){var e=g(t,[]);return(0,Dt.jsx)(ne.Trigger,n({"data-slot":"context-menu-trigger"},e))}function Tn(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Dt.jsx)(ne.Portal,{children:(0,Dt.jsx)(ne.Content,n({"data-slot":"context-menu-content",className:x("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e)},t))})}function Rn(r){var i=r,{className:e,inset:t,variant:a="default"}=i,o=g(i,["className","inset","variant"]);return(0,Dt.jsx)(ne.Item,n({"data-slot":"context-menu-item","data-inset":t,"data-variant":a,className:x("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e)},o))}function En(a){var o=a,{className:e}=o,t=g(o,["className"]);return(0,Dt.jsx)(ne.Separator,n({"data-slot":"context-menu-separator",className:x("bg-border -mx-1 my-1 h-px",e)},t))}var Ce=require("react/jsx-runtime");function po({children:e,menuItems:t,isInSelectionMode:a=!1,mode:o}){let r=!a&&o!=="modal",i=(l=!1)=>t.map((c,s)=>{let f=s===t.length-1,m=c.variant==="destructive",b=l?tt:Rn,p=l?Cn:En,y=s<t.length-1&&t[s+1].variant==="destructive";return(0,Ce.jsxs)(An.default.Fragment,{children:[(0,Ce.jsxs)(b,{onClick:c.onClick,className:c.className||`text-sm font-medium ${m?"text-red-600 focus:text-red-700 focus:bg-red-50":""} ${s===0?"rounded-t-xl":""} ${f?"rounded-b-xl":""}`,children:[c.icon,c.label]}),y&&!f&&(0,Ce.jsx)(p,{className:"bg-gray-200"})]},s)});return(0,Ce.jsxs)(Sn,{children:[(0,Ce.jsx)(zn,{children:(0,Ce.jsxs)("div",{className:"relative w-full h-full",children:[e,r&&(0,Ce.jsx)("div",{className:"absolute top-0 right-0 z-10 md:hidden",onClick:l=>l.stopPropagation(),children:(0,Ce.jsxs)(wa,{children:[(0,Ce.jsx)(Ca,{asChild:!0,children:(0,Ce.jsx)(C,{variant:"ghost",size:"icon",radius:"full",className:"focus-visible:ring-0 focus-visible:ring-offset-0",children:(0,Ce.jsx)(_n.MoreVertical,{className:"size-4 text-gray-700"})})}),(0,Ce.jsx)(ya,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!0)})]})})]})}),r&&(0,Ce.jsx)(Tn,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!1)})]})}var jo=require("react/jsx-runtime");function Ma(e){return(0,jo.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 72 72",fill:"currentColor"},e),{children:(0,jo.jsx)("path",{d:"M38.406 22.234l11.36 11.36L28.784 54.576l-12.876 4.307c-1.725.577-3.367-1.065-2.791-2.79l4.307-12.876L38.406 22.234zM41.234 19.406l5.234-5.234c1.562-1.562 4.095-1.562 5.657 0l5.703 5.703c1.562 1.562 1.562 4.095 0 5.657l-5.234 5.234L41.234 19.406z"})}))}var $o=require("react/jsx-runtime");function Da(e){return(0,$o.jsx)("svg",d(n({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:(0,$o.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-5.97-3.03a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})}))}var ie=require("react/jsx-runtime");function Vn({file:e,isSelected:t,onSelect:a,onDelete:o,onEdit:r,onMove:i,selectionMode:l,showCheckbox:c=!1,mode:s=oe.PAGE,isInSelectionMode:f=!1}){let m=h=>{h.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?`)&&o(e.id)},b=h=>{h.stopPropagation(),r(e)},p=h=>{h.stopPropagation(),a(e,void 0,!0)},y=h=>{h.stopPropagation(),i(e)},w=h=>{a(e,h,!1)},N=h=>{a(e,void 0,!0)},M=h=>{h.stopPropagation()},{component:D,metadataComponent:z}=ct(e);return(0,ie.jsx)(po,{menuItems:[{label:"Edit",icon:(0,ie.jsx)(Ma,{className:"size-6"}),onClick:b},{label:"Select File",icon:(0,ie.jsx)(Da,{className:"size-6"}),onClick:p},{label:"Move to...",icon:(0,ie.jsx)(Ln.Move,{className:"size-4 mr-2"}),onClick:y},{label:"Delete",icon:(0,ie.jsx)(Ze,{className:"size-5 mr-2 text-red-600"}),onClick:m,variant:"destructive"}],isInSelectionMode:f,mode:s,children:(0,ie.jsxs)("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:w,onClick:w,children:[(0,ie.jsxs)("div",{className:`
100
+ `,{variants:{size:{sm:"size-4.5 [&_svg]:size-3",md:"size-5 [&_svg]:size-3.5",lg:"size-5.5 [&_svg]:size-4"}},defaultVariants:{size:"md"}});function Lo(a){var n=a,{className:e,size:t}=n,o=g(n,["className","size"]);return(0,ho.jsx)(Ya.Checkbox.Root,s(r({"data-slot":"checkbox",className:x(Vi({size:t}),e)},o),{children:(0,ho.jsxs)(Ya.Checkbox.Indicator,{className:x("flex items-center justify-center text-current"),children:[(0,ho.jsx)(et,{className:"group-data-[state=indeterminate]:hidden"}),(0,ho.jsx)(na,{className:"hidden group-data-[state=indeterminate]:block"})]})}))}var lt=require("react/jsx-runtime");function Mn(){return(0,lt.jsx)(Ka,{})}function qa(){let{setIsUploadModalOpen:e}=G();return(0,lt.jsxs)(C,{variant:"outline",size:"md",radius:"full",className:"border-gray-200 bg-white text-md font-medium",onClick:()=>e(!0),children:[(0,lt.jsx)(Lt,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),(0,lt.jsx)("span",{className:"hidden sm:inline",children:"Upload File"})]})}function Qa(){let{setIsCreateFolderModalOpen:e}=G();return(0,lt.jsxs)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:()=>e(!0),children:[(0,lt.jsx)(Et,{className:"size-5 text-gray-900"}),(0,lt.jsx)("span",{className:"hidden",children:"Create Folder"})]})}var P=require("react/jsx-runtime");function Dn(){let{setIsUploadModalOpen:e,setIsCreateFolderModalOpen:t,setIsSearchModalOpen:o}=G();return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"hidden md:flex gap-2",children:[(0,P.jsx)(qa,{}),(0,P.jsx)(Qa,{}),(0,P.jsx)(Mn,{})]}),(0,P.jsx)("div",{className:"flex md:hidden",children:(0,P.jsxs)(Ro,{children:[(0,P.jsx)(To,{asChild:!0,children:(0,P.jsx)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:(0,P.jsx)(Vt,{className:"size-5"})})}),(0,P.jsxs)(Eo,{align:"end",className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:[(0,P.jsxs)(nt,{onClick:()=>e(!0),className:"cursor-pointer",children:[(0,P.jsx)(Lt,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),(0,P.jsx)("span",{className:"inline",children:"Upload File"})]}),(0,P.jsxs)(nt,{onClick:()=>t(!0),className:"cursor-pointer",children:[(0,P.jsx)(Et,{className:"size-5 text-gray-900"}),(0,P.jsx)("span",{className:"inline",children:"Create Folder"})]}),(0,P.jsxs)(nt,{onClick:()=>o(!0),className:"cursor-pointer",children:[(0,P.jsx)(Me,{className:"size-5 text-gray-700"}),(0,P.jsx)("span",{className:"inline",children:"Search"})]})]})]})})]})}function In({onSearchClick:e}){let{setIsUploadModalOpen:t,setIsCreateFolderModalOpen:o}=G();return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"hidden md:flex gap-2",children:[(0,P.jsx)(qa,{}),(0,P.jsx)(Qa,{}),e?(0,P.jsxs)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",onClick:e,children:[(0,P.jsx)(Me,{className:"size-5 text-gray-900"}),(0,P.jsx)("span",{className:"hidden",children:"Search"})]}):null]}),(0,P.jsx)("div",{className:"flex md:hidden",children:(0,P.jsxs)(Ro,{children:[(0,P.jsx)(To,{asChild:!0,children:(0,P.jsx)(C,{variant:"outline",size:"icon",radius:"full",className:"border-gray-200 bg-white",children:(0,P.jsx)(Vt,{className:"size-5"})})}),(0,P.jsxs)(Eo,{align:"end",className:"w-48",children:[(0,P.jsxs)(nt,{onClick:()=>t(!0),className:"cursor-pointer",children:[(0,P.jsx)(Lt,{className:"size-5 text-gray-900",stroke:"black",strokeWidth:"1"}),(0,P.jsx)("span",{className:"inline",children:"Upload File"})]}),(0,P.jsxs)(nt,{onClick:()=>o(!0),className:"cursor-pointer",children:[(0,P.jsx)(Et,{className:"size-5 text-gray-900"}),(0,P.jsx)("span",{className:"inline",children:"Create Folder"})]}),e?(0,P.jsxs)(nt,{onClick:e,className:"cursor-pointer",children:[(0,P.jsx)(Me,{className:"size-5 text-gray-700"}),(0,P.jsx)("span",{className:"inline",children:"Search"})]}):null]})]})})]})}var Rn=Go(require("react"));var ne=Go(require("@radix-ui/react-context-menu")),Gi=require("lucide-react");var St=require("react/jsx-runtime");function Nn(t){var e=g(t,[]);return(0,St.jsx)(ne.Root,r({"data-slot":"context-menu"},e))}function kn(t){var e=g(t,[]);return(0,St.jsx)(ne.Trigger,r({"data-slot":"context-menu-trigger"},e))}function Pn(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,St.jsx)(ne.Portal,{children:(0,St.jsx)(ne.Content,r({"data-slot":"context-menu-content",className:x("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e)},t))})}function Sn(n){var i=n,{className:e,inset:t,variant:o="default"}=i,a=g(i,["className","inset","variant"]);return(0,St.jsx)(ne.Item,r({"data-slot":"context-menu-item","data-inset":t,"data-variant":o,className:x("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e)},a))}function zn(o){var a=o,{className:e}=a,t=g(a,["className"]);return(0,St.jsx)(ne.Separator,r({"data-slot":"context-menu-separator",className:x("bg-border -mx-1 my-1 h-px",e)},t))}var ye=require("react/jsx-runtime");function Ca({children:e,menuItems:t,isInSelectionMode:o=!1,mode:a}){let n=!o&&a!=="modal",i=(l=!1)=>t.map((c,d)=>{let f=d===t.length-1,m=c.variant==="destructive",b=l?nt:Sn,p=l?xn:zn,y=d<t.length-1&&t[d+1].variant==="destructive";return(0,ye.jsxs)(Rn.default.Fragment,{children:[(0,ye.jsxs)(b,{onClick:c.onClick,className:c.className||`text-sm font-medium ${m?"text-red-600 focus:text-red-700 focus:bg-red-50":""} ${d===0?"rounded-t-xl":""} ${f?"rounded-b-xl":""}`,children:[c.icon,c.label]}),y&&!f&&(0,ye.jsx)(p,{className:"bg-gray-200"})]},d)});return(0,ye.jsxs)(Nn,{children:[(0,ye.jsx)(kn,{children:(0,ye.jsxs)("div",{className:"relative w-full h-full",children:[e,n&&(0,ye.jsx)("div",{className:"absolute top-0 right-0 z-10 md:hidden",onClick:l=>l.stopPropagation(),children:(0,ye.jsxs)(Ro,{children:[(0,ye.jsx)(To,{asChild:!0,children:(0,ye.jsx)(C,{variant:"ghost",size:"icon",radius:"full",className:"focus-visible:ring-0 focus-visible:ring-offset-0",children:(0,ye.jsx)(ra,{className:"size-4 text-gray-700"})})}),(0,ye.jsx)(Eo,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!0)})]})})]})}),n&&(0,ye.jsx)(Pn,{className:"w-56 rounded-2xl shadow-xl bg-white/50 backdrop-blur-2xl border-gray-200",children:i(!1)})]})}var le=require("react/jsx-runtime");function Tn({file:e,isSelected:t,onSelect:o,onDelete:a,onEdit:n,onMove:i,selectionMode:l,showCheckbox:c=!1,mode:d=ae.PAGE,isInSelectionMode:f=!1}){let m=h=>{h.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?`)&&a(e.id)},b=h=>{h.stopPropagation(),n(e)},p=h=>{h.stopPropagation(),o(e,void 0,!0)},y=h=>{h.stopPropagation(),i(e)},w=h=>{o(e,h,!1)},I=h=>{o(e,void 0,!0)},M=h=>{h.stopPropagation()},{component:D,metadataComponent:z}=gt(e);return(0,le.jsx)(Ca,{menuItems:[{label:"Edit",icon:(0,le.jsx)(co,{className:"size-6"}),onClick:b},{label:"Select File",icon:(0,le.jsx)(so,{className:"size-6"}),onClick:p},{label:"Move to...",icon:(0,le.jsx)(Xe,{className:"size-6"}),onClick:y},{label:"Delete",icon:(0,le.jsx)(Ue,{className:"size-6 text-red-600"}),onClick:m,variant:"destructive"}],isInSelectionMode:f,mode:d,children:(0,le.jsxs)("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:w,onClick:w,children:[(0,le.jsxs)("div",{className:`
101
101
  relative w-full aspect-square flex items-center justify-center mb-1 overflow-hidden rounded-2xl hover:bg-gray-200/60
102
102
  ${t?"bg-gray-200/60":""}
103
- `,children:[(0,ie.jsx)("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:(0,ie.jsx)(D,{file:e,metaData:e.metaData})}),(l===Le.MULTIPLE||c)&&(0,ie.jsx)("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:M,children:(0,ie.jsx)(Fa,{checked:t,onCheckedChange:N,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),(0,ie.jsxs)("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[(0,ie.jsx)("span",{className:`
104
- text-[13px] font-medium leading-[1.3] tracking-tight line-clamp-2 px-2.5 py-[2px] rounded-[6px] transition-colors duration-100 wrap-break-word max-w-full
103
+ `,children:[(0,le.jsx)("div",{className:"w-[75%] h-[75%] flex items-center justify-center",children:(0,le.jsx)(D,{file:e,metaData:e.metaData})}),(l===Ve.MULTIPLE||c)&&(0,le.jsx)("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:M,children:(0,le.jsx)(Lo,{checked:t,onCheckedChange:I,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),(0,le.jsxs)("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[(0,le.jsx)("span",{className:`
104
+ text-[13px] font-semibold leading-[1.3] tracking-tight line-clamp-2 px-2.5 py-[2px] rounded-[6px] transition-colors duration-100 wrap-break-word max-w-full
105
105
  ${t?"bg-[#2563EB] text-white antialiased shadow-sm":"text-[#374151] group-hover:text-black"}
106
- `,children:e.name}),(0,ie.jsxs)("div",{className:`flex flex-col items-center justify-center gap-0.5 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:[(0,ie.jsx)("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:le(e.size)}),z?(0,ie.jsx)("div",{className:"text-[11px] text-gray-400 flex items-center scale-95",children:(0,ie.jsx)(z,{file:e})}):null]})]})]})})}var On=require("lucide-react");var me=require("react/jsx-runtime");function Gn({folder:e,isSelected:t,onSelect:a,onRightClick:o,onDelete:r,onRename:i,onMove:l,selectionMode:c,showCheckbox:s,mode:f,isInSelectionMode:m}){let b=T=>{T.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?
106
+ `,children:e.name}),(0,le.jsxs)("div",{className:`flex flex-col items-center justify-center gap-0.5 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:[(0,le.jsx)("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight",children:se(e.size)}),z?(0,le.jsx)("div",{className:"text-[11px] text-gray-400 flex items-center scale-95",children:(0,le.jsx)(z,{file:e})}):null]})]})]})})}var ue=require("react/jsx-runtime");function En({folder:e,isSelected:t,onSelect:o,onRightClick:a,onDelete:n,onRename:i,onMove:l,selectionMode:c,showCheckbox:d,mode:f,isInSelectionMode:m}){let b=R=>{R.stopPropagation(),confirm(`Are you sure you want to delete "${e.name}"?
107
107
 
108
- \u26A0\uFE0F Warning: This will also delete all ${e.fileCount} file(s) inside this folder.`)&&r(e.id)},p=T=>{T.stopPropagation(),i(e)},y=T=>{T.stopPropagation(),l(e)},w=T=>{T.stopPropagation(),a(e,void 0,!0)},N=T=>{a(e,T,!1)},M=T=>{a(e,void 0,!0)},D=T=>{T.stopPropagation()};return(0,me.jsx)(po,{menuItems:[{label:"Rename",icon:(0,me.jsx)(Ma,{className:"size-6"}),onClick:p},{label:"Select Folder",icon:(0,me.jsx)(Da,{className:"size-6"}),onClick:w},{label:"Move to...",icon:(0,me.jsx)(On.Move,{className:"size-5 mr-1"}),onClick:y},{label:"Delete",icon:(0,me.jsx)(Ze,{className:"size-5 mr-1 text-red-600"}),onClick:b,variant:"destructive"}],isInSelectionMode:m,mode:f,children:(0,me.jsxs)("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:N,onClick:N,children:[(0,me.jsxs)("div",{className:`
108
+ \u26A0\uFE0F Warning: This will also delete all ${e.fileCount} file(s) inside this folder.`)&&n(e.id)},p=R=>{R.stopPropagation(),i(e)},y=R=>{R.stopPropagation(),l(e)},w=R=>{R.stopPropagation(),o(e,void 0,!0)},I=R=>{o(e,R,!1)},M=R=>{o(e,void 0,!0)},D=R=>{R.stopPropagation()};return(0,ue.jsx)(Ca,{menuItems:[{label:"Rename",icon:(0,ue.jsx)(co,{className:"size-6"}),onClick:p},{label:"Select Folder",icon:(0,ue.jsx)(so,{className:"size-6"}),onClick:w},{label:"Move to...",icon:(0,ue.jsx)(Xe,{className:"size-5 mr-1"}),onClick:y},{label:"Delete",icon:(0,ue.jsx)(Ue,{className:"size-5 mr-1 text-red-600"}),onClick:b,variant:"destructive"}],isInSelectionMode:m,mode:f,children:(0,ue.jsxs)("div",{className:"group relative flex flex-col items-center justify-start transition-all duration-200 cursor-pointer w-full select-none",onDoubleClick:I,onClick:I,children:[(0,ue.jsxs)("div",{className:`
109
109
  relative w-full aspect-square flex items-center justify-center mb-1 overflow-hidden rounded-2xl hover:bg-gray-200/60
110
110
 
111
111
  ${t?"bg-gray-200/60 ":""}
112
- `,children:[(0,me.jsx)("div",{className:"w-[75%] h-[75%] flex items-center justify-center transform ",children:(0,me.jsx)(Xe,{className:"w-full h-full text-blue-400 fill-blue-400/20 drop-shadow-sm",strokeWidth:1.5})}),(c===Le.MULTIPLE||s)&&(0,me.jsx)("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:D,children:(0,me.jsx)(Fa,{checked:t,onCheckedChange:M,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),(0,me.jsxs)("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[(0,me.jsx)("span",{className:`
113
- text-[13px] font-medium leading-[1.3] tracking-tight line-clamp-2 px-2.5 pb-[2px] rounded-[6px] transition-colors duration-100 break-words max-w-full
112
+ `,children:[(0,ue.jsx)("div",{className:"w-[75%] h-[75%] flex items-center justify-center transform ",children:(0,ue.jsx)(Je,{className:"w-full h-full text-blue-400 fill-blue-400/20 drop-shadow-sm",strokeWidth:1.5})}),(c===Ve.MULTIPLE||d)&&(0,ue.jsx)("div",{className:`absolute top-2 left-2 z-10 ${t?"opacity-100":"opacity-0 group-hover:opacity-100"} transition-opacity duration-200`,onClick:D,children:(0,ue.jsx)(Lo,{checked:t,onCheckedChange:M,className:"bg-white/90 border-gray-300 shadow-sm data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 rounded-full h-5 w-5"})})]}),(0,ue.jsxs)("div",{className:"w-full text-center px-0.5 flex flex-col items-center",children:[(0,ue.jsx)("span",{className:`
113
+ text-[13px] font-semibold leading-[1.3] tracking-tight line-clamp-2 px-2.5 pb-[2px] rounded-[6px] transition-colors duration-100 break-words max-w-full
114
114
  ${t?"bg-[#2563EB] text-white antialiased shadow-sm":"text-[#374151] group-hover:text-black"}
115
- `,children:e.name}),(0,me.jsx)("div",{className:`flex items-center justify-center gap-1 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:(0,me.jsxs)("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight px-1.5 rounded-full",children:[e.fileCount," items"]})})]})]})})}var Ge=require("react/jsx-runtime");function mo(){let{files:e,folders:t,isLoading:a,handleFileClick:o,handleFolderClick:r,bulkDelete:i,mode:l,selectionMode:c,isInSelectionMode:s,selectedFiles:f,selectedFolders:m,currentFolder:b,setSelectedFiles:p,setSelectedFolders:y,setIsRenameFolderModalOpen:w,setIsMoveFileModalOpen:N,setFileDetailsModalFile:M,setFolderToRename:D}=O(),T=(()=>{if(!b)return 18;let h=b.folderCount||0,I=b.fileCount||0,Y=h+I;return Y>0?Y:18})();return a?(0,Ge.jsx)("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:Array.from({length:T}).map((h,I)=>(0,Ge.jsxs)("div",{className:"flex flex-col items-center justify-start w-full gap-2",children:[(0,Ge.jsx)("div",{className:"w-full aspect-square bg-gray-100 rounded-2xl animate-pulse"}),(0,Ge.jsxs)("div",{className:"flex flex-col items-center gap-1 w-full",children:[(0,Ge.jsx)("div",{className:"h-4 w-20 bg-gray-100 rounded animate-pulse"}),(0,Ge.jsx)("div",{className:"h-3 w-12 bg-gray-100 rounded animate-pulse"})]})]},I))}):(0,Ge.jsxs)("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:[t.map(h=>(0,Ge.jsx)(Gn,{folder:h,isSelected:m.some(I=>I.id===h.id),onSelect:r,onDelete:()=>i(),onRename:I=>{D(I),w(!0)},onMove:I=>{y([I]),p([]),N(!0)},selectionMode:c,mode:l,isInSelectionMode:s()},h.id)),e.map(h=>(0,Ge.jsx)(Vn,{file:h,isSelected:f.some(I=>I.id===h.id),onSelect:o,onDelete:()=>i(),onEdit:I=>{M(I)},onMove:I=>{p([I]),y([]),N(!0)},selectionMode:c,mode:l,isInSelectionMode:s()},h.id))]})}var Bn=require("react");var fo=require("lucide-react"),Me=require("react/jsx-runtime"),uo=class extends Bn.Component{constructor(a){super(a);this.handleReset=()=>{window.location.reload()};this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,o){console.error("FileManager Error Boundary caught an error:",a,o)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,Me.jsx)("div",{className:"flex items-center justify-center min-h-[400px] p-8 w-full h-full bg-slate-50/50 rounded-lg border border-dashed border-slate-200",children:(0,Me.jsxs)("div",{className:"text-center max-w-md flex flex-col items-center",children:[(0,Me.jsx)("div",{className:"bg-red-100 p-3 rounded-full mb-4",children:(0,Me.jsx)(fo.AlertCircle,{className:"size-8 text-red-600"})}),(0,Me.jsx)("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Something went wrong"}),(0,Me.jsx)("p",{className:"text-sm text-slate-500 mb-6",children:"The file manager encountered an unexpected error. Refreshing the page usually resolves this issue."}),this.state.error&&(0,Me.jsxs)("details",{className:"mb-6 text-left w-full border border-slate-200 rounded-lg overflow-hidden flex-col group",children:[(0,Me.jsx)("summary",{className:"cursor-pointer text-xs font-mono bg-slate-100 p-2 text-slate-600 hover:bg-slate-200 transition-colors",children:"View Technical Details"}),(0,Me.jsx)("div",{className:"p-3 bg-white",children:(0,Me.jsx)("pre",{className:"text-[10px] text-slate-600 font-mono whitespace-pre-wrap word-break-all max-h-40 overflow-auto",children:this.state.error.toString()})})]}),(0,Me.jsxs)(C,{onClick:this.handleReset,radius:"full",className:"gap-2",children:[(0,Me.jsx)(fo.RefreshCw,{className:"size-4"}),"Reload Application"]})]})}):this.props.children}};var Hn=require("react");function Un(){let{handleSelectAllGlobal:e,handleClearSelection:t,getSelectionState:a,isCreateFolderModalOpen:o,setIsCreateFolderModalOpen:r,isUploadModalOpen:i,setIsUploadModalOpen:l,isSearchModalOpen:c,setIsSearchModalOpen:s}=O();return(0,Hn.useEffect)(()=>{let f=m=>{m.key==="k"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),s(!c)),m.key==="a"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),a()===!0?t():e(!0)),m.key==="f"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),r(!o)),m.key==="u"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),l(!i))};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,a,o,r,i,l,c,s]),null}var ye=require("react/jsx-runtime");function Zn(e){return(0,ye.jsx)(uo,{children:(0,ye.jsxs)(et.Page,d(n({},e),{children:[(0,ye.jsx)(Un,{}),(0,ye.jsxs)("div",{className:"flex h-full relative pb-12 overflow-hidden",children:[(0,ye.jsxs)("div",{className:"flex-1 flex w-full flex-col",children:[(0,ye.jsx)(et.Header,{children:(0,ye.jsxs)("div",{className:"flex w-full justify-between gap-2",children:[(0,ye.jsx)(no,{}),(0,ye.jsx)(Pn,{})]})}),(0,ye.jsx)(xn,{className:"-mb-1"}),(0,ye.jsx)(mo,{}),(0,ye.jsx)(et.Footer,{className:"pt-6 pb-10"})]}),(0,ye.jsx)(et.Overlays,{})]})]}))})}var Nt=require("react");var Z=require("react/jsx-runtime");function jn(o){var r=o,{open:e,onClose:t}=r,a=g(r,["open","onClose"]);return(0,Z.jsx)(et.Modal,d(n({},a),{onClose:t,children:(0,Z.jsx)(ze,{open:e,onOpenChange:t,children:(0,Z.jsx)(Ui,{onClose:t})})}))}function Ui({onClose:e}){let{updateSearchQuery:t}=O(),[a,o]=(0,Nt.useState)(!1),[r,i]=(0,Nt.useState)(""),l=(0,Nt.useRef)(null),c=so(r,300);return(0,Nt.useEffect)(()=>{t(c)},[c,t]),(0,Nt.useEffect)(()=>{a&&l.current&&l.current.focus()},[a]),(0,Z.jsxs)(Te,{className:"p-0",variant:"fullscreen",showCloseButton:!1,children:[(0,Z.jsxs)(Be,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,Z.jsx)(Re,{className:"px-6 text-base",children:(0,Z.jsx)("div",{className:"flex w-full justify-between gap-2",children:a?(0,Z.jsxs)("div",{className:"flex items-center gap-4 flex-1",children:[(0,Z.jsx)(Ae,{className:"size-5 text-gray-500 shrink-0"}),(0,Z.jsx)(ta,{ref:l,type:"text",placeholder:"Search files and folders...",className:"border-none shadow-none focus-visible:ring-0 h-auto p-0 text-base font-semibold",value:r,onChange:s=>i(s.target.value),onKeyDown:s=>{s.key==="Escape"&&(i(""),t(""),o(!1))}}),(0,Z.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>{i(""),t(""),o(!1)},className:"border-gray-200 bg-white shrink-0",children:[(0,Z.jsx)(ve,{className:"size-5"}),(0,Z.jsx)("span",{className:"sr-only",children:"Cancel Search"})]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(no,{}),(0,Z.jsx)(kn,{onSearchClick:()=>o(!0)}),(0,Z.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:e,className:"border-gray-200 bg-white",children:[(0,Z.jsx)(ve,{className:"size-5"}),(0,Z.jsx)("span",{className:"hidden",children:"Close"})]})]})})}),(0,Z.jsx)(lt,{className:"sr-only",children:"Browse and select files from your media library"})]}),(0,Z.jsxs)("div",{className:"overflow-y-auto flex-1 pb-4",children:[(0,Z.jsx)(mo,{}),(0,Z.jsx)(et.Footer,{className:"my-4"}),(0,Z.jsx)(et.Overlays,{})]}),(0,Z.jsx)(Zi,{onClose:e})]})}function Zi({onClose:e}){let{selectedFiles:t,onFilesSelected:a,setSelectedFiles:o,setSelectedFolders:r,updateSearchQuery:i,handlePageChange:l}=O();return(0,Z.jsxs)(He,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2",children:[(0,Z.jsx)(vn,{}),(0,Z.jsx)(qe,{asChild:!0,children:(0,Z.jsx)(C,{type:"button",variant:"outline",onClick:e,radius:"full",className:"w-full md:w-auto mr-0",children:"Cancel"})}),(0,Z.jsxs)(C,{type:"button",onClick:()=>{a&&t.length>0&&(a(t),o([]),r([]),i(""),l(1),e())},disabled:t.length===0,radius:"full",className:"w-full md:w-auto",children:["Select ",t.length>0?`(${t.length})`:""]})]})}var Ne=[{id:1,name:"Documents",pathId:1,path:"/1",parentId:null,fileCount:20,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:2,name:"Images",pathId:2,path:"/2",parentId:null,fileCount:10,folderCount:3,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:3,name:"Videos",pathId:3,path:"/3",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:4,name:"Music Some Long Name Streched also so long to fit in the card Music Some Long Name Streched also so long to fit in the card",pathId:4,path:"/4",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:5,name:"Archives",pathId:5,path:"/5",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:6,name:"Album 01",pathId:6,path:"/2/6",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:7,name:"Album 02",pathId:7,path:"/2/7",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:8,name:"Squirrels",pathId:8,path:"/2/8",parentId:2,fileCount:1,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")}],$n=[{id:1,name:"Important",color:"#ef4444"},{id:2,name:"Work",color:"#3b82f6"},{id:3,name:"Personal",color:"#10b981"},{id:4,name:"Project",color:"#8b5cf6"},{id:5,name:"Archive",color:"#6b7280"}],Ie=[{id:101,name:"welcome.pdf",url:"/placeholder.svg?height=400&width=300",size:245e3,createdAt:new Date("2024-05-15T10:00:00Z"),updatedAt:new Date("2024-05-15T10:00:00Z"),folderId:null,tags:["important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:2,author:"Admin"}},{id:102,name:"desktop_wallpaper.jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926",size:42e5,createdAt:new Date("2024-05-14T15:30:00Z"),updatedAt:new Date("2024-05-14T15:30:00Z"),folderId:null,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:5e3,height:3333,formats:{thumbnail:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=156",hash:"thumbnail_desktop_wallpaper_abc123",mime:"image/jpeg",name:"thumbnail_desktop_wallpaper.jpg",path:null,size:5.57,width:156,height:104},small:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=500",hash:"small_desktop_wallpaper_abc123",mime:"image/jpeg",name:"small_desktop_wallpaper.jpg",path:null,size:47.27,width:500,height:333},medium:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=750",hash:"medium_desktop_wallpaper_abc123",mime:"image/jpeg",name:"medium_desktop_wallpaper.jpg",path:null,size:97.89,width:750,height:500},large:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=1000",hash:"large_desktop_wallpaper_abc123",mime:"image/jpeg",name:"large_desktop_wallpaper.jpg",path:null,size:159.48,width:1e3,height:667}},metaData:{}},{id:103,name:"quick_notes.txt",url:"/placeholder.svg?height=400&width=300",size:3500,createdAt:new Date("2024-05-13T09:45:00Z"),updatedAt:new Date("2024-05-13T09:45:00Z"),folderId:null,tags:[],mime:"text/plain",ext:".txt",metaData:{}},{id:104,name:"intro_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:12e6,createdAt:new Date("2024-05-12T14:00:00Z"),updatedAt:new Date("2024-05-12T14:00:00Z"),folderId:null,tags:[],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:90,videoSource:"local"}},{id:105,name:"profile_photo.png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde",size:85e4,createdAt:new Date("2024-05-11T11:20:00Z"),updatedAt:new Date("2024-05-11T11:20:00Z"),folderId:null,tags:["personal"],mime:"image/png",ext:".png",width:2e3,height:2e3,formats:{thumbnail:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=156",hash:"thumbnail_profile_photo_def456",mime:"image/png",name:"thumbnail_profile_photo.png",path:null,size:8.2,width:156,height:156},small:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=500",hash:"small_profile_photo_def456",mime:"image/png",name:"small_profile_photo.png",path:null,size:52.3,width:500,height:500},medium:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=750",hash:"medium_profile_photo_def456",mime:"image/png",name:"medium_profile_photo.png",path:null,size:110.5,width:750,height:750},large:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=1000",hash:"large_profile_photo_def456",mime:"image/png",name:"large_profile_photo.png",path:null,size:185.7,width:1e3,height:1e3}},metaData:{}},{id:106,name:"todo_list.md",url:"/placeholder.svg?height=400&width=300",size:6200,createdAt:new Date("2024-05-10T08:30:00Z"),updatedAt:new Date("2024-05-10T08:30:00Z"),folderId:null,tags:["important"],mime:"text/markdown",ext:".md",metaData:{}},{id:107,name:"app_settings.json",url:"/placeholder.svg?height=400&width=300",size:4800,createdAt:new Date("2024-05-09T16:15:00Z"),updatedAt:new Date("2024-05-09T16:15:00Z"),folderId:null,tags:[],mime:"application/json",ext:".json",metaData:{}},{id:108,name:"mountain_landscape.webp",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:12e5,createdAt:new Date("2024-05-08T13:00:00Z"),updatedAt:new Date("2024-05-08T13:00:00Z"),folderId:null,tags:["personal"],mime:"image/webp",ext:".webp",width:4e3,height:2667,metaData:{}},{id:1,name:"Key-Monastery-img.avif",url:"https://unciatrails.com/wp-content/uploads/2024/07/Key-Monastery-img.avif",size:2621440,createdAt:new Date("2023-10-26T10:30:00Z"),updatedAt:new Date("2023-10-26T10:30:00Z"),folderId:8,tags:["personal","important"],mime:"image/avif",ext:".avif",caption:"A cute squirrel in the park",alternativeText:"Gray squirrel sitting on wooden fence",width:3024,height:4032,metaData:{}},{id:2,name:"project_proposal thoda sa.pdf",url:"/placeholder.svg?height=400&width=300",size:1048576,createdAt:new Date("2024-05-10T14:20:00Z"),updatedAt:new Date("2024-05-10T14:20:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:15,author:"John Doe"}},{id:3,name:"quarterly_report.xlsx",url:"/placeholder.svg?height=400&width=300",size:524288,createdAt:new Date("2024-05-08T09:15:00Z"),updatedAt:new Date("2024-05-08T09:15:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:10}},{id:4,name:"presentation.pptx",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:20}},{id:8,name:"documnet.doc",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/msword",ext:".doc",metaData:{pageCount:20}},{id:5,name:"demo_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:10485760,createdAt:new Date("2024-05-03T11:30:00Z"),updatedAt:new Date("2024-05-03T11:30:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:120,videoSource:"remote"}},{id:6,name:"podcast_episode.mp3",url:"/placeholder.svg?height=400&width=300",size:5242880,createdAt:new Date("2024-05-02T10:00:00Z"),updatedAt:new Date("2024-05-02T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:3600}},{id:7,name:"notes.txt",url:"/placeholder.svg?height=400&width=300",size:1024,createdAt:new Date("2024-05-01T09:00:00Z"),updatedAt:new Date("2024-05-01T09:00:00Z"),folderId:1,tags:["work"],mime:"text/plain",ext:".txt",metaData:{}},{id:9,name:"data.json",url:"/placeholder.svg?height=400&width=300",size:2048,createdAt:new Date("2024-04-30T15:00:00Z"),updatedAt:new Date("2024-04-30T15:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:10,name:"archive.zip",url:"/placeholder.svg?height=400&width=300",size:104857600,createdAt:new Date("2024-04-29T12:00:00Z"),updatedAt:new Date("2024-04-29T12:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Project backup"}},{id:11,name:"setup.exe",url:"/placeholder.svg?height=400&width=300",size:52428800,createdAt:new Date("2024-04-28T11:00:00Z"),updatedAt:new Date("2024-04-28T11:00:00Z"),folderId:5,tags:["software"],mime:"application/x-msdownload",ext:".exe",metaData:{description:"Installer"}},{id:12,name:"old_stuff.rar",url:"/placeholder.svg?height=400&width=300",size:20971520,createdAt:new Date("2024-04-27T10:00:00Z"),updatedAt:new Date("2024-04-27T10:00:00Z"),folderId:5,tags:["archive"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Old files"}},{id:13,name:"meeting_notes_q1.pdf",url:"/placeholder.svg?height=400&width=300",size:856e3,createdAt:new Date("2024-03-15T09:00:00Z"),updatedAt:new Date("2024-03-15T09:00:00Z"),folderId:1,tags:["work"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:8,author:"Sarah Johnson"}},{id:14,name:"budget_2024.xlsx",url:"/placeholder.svg?height=400&width=300",size:425e3,createdAt:new Date("2024-03-10T14:30:00Z"),updatedAt:new Date("2024-03-10T14:30:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:5}},{id:15,name:"team_photo.jpg",url:"https://images.unsplash.com/photo-1522071820081-009f0129c71c",size:32e5,createdAt:new Date("2024-02-28T11:00:00Z"),updatedAt:new Date("2024-02-28T11:00:00Z"),folderId:2,tags:["work"],mime:"image/jpeg",ext:".jpg",width:4e3,height:3e3,metaData:{}},{id:16,name:"logo_design.png",url:"https://images.unsplash.com/photo-1611162617474-5b21e879e113",size:15e5,createdAt:new Date("2024-02-20T10:00:00Z"),updatedAt:new Date("2024-02-20T10:00:00Z"),folderId:2,tags:["project"],mime:"image/png",ext:".png",width:2e3,height:2e3,metaData:{}},{id:17,name:"product_demo.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:15e6,createdAt:new Date("2024-02-15T16:00:00Z"),updatedAt:new Date("2024-02-15T16:00:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:180,videoSource:"local"}},{id:18,name:"training_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:25e6,createdAt:new Date("2024-02-10T09:30:00Z"),updatedAt:new Date("2024-02-10T09:30:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:300,videoSource:"local"}},{id:19,name:"background_music.mp3",url:"/placeholder.svg?height=400&width=300",size:45e5,createdAt:new Date("2024-02-05T14:00:00Z"),updatedAt:new Date("2024-02-05T14:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:240}},{id:20,name:"contract_template.docx",url:"/placeholder.svg?height=400&width=300",size:65e4,createdAt:new Date("2024-01-30T11:00:00Z"),updatedAt:new Date("2024-01-30T11:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:12}},{id:21,name:"invoice_jan.pdf",url:"/placeholder.svg?height=400&width=300",size:32e4,createdAt:new Date("2024-01-25T10:00:00Z"),updatedAt:new Date("2024-01-25T10:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:3}},{id:22,name:"vacation_photo1.jpg",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:28e5,createdAt:new Date("2024-01-20T15:00:00Z"),updatedAt:new Date("2024-01-20T15:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:3500,height:2500,metaData:{}},{id:23,name:"vacation_photo2.jpg",url:"https://images.unsplash.com/photo-1469474968028-56623f02e42e",size:31e5,createdAt:new Date("2024-01-20T15:05:00Z"),updatedAt:new Date("2024-01-20T15:05:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2800,metaData:{}},{id:24,name:"project_backup.zip",url:"/placeholder.svg?height=400&width=300",size:85e6,createdAt:new Date("2024-01-15T12:00:00Z"),updatedAt:new Date("2024-01-15T12:00:00Z"),folderId:5,tags:["archive","project"],mime:"application/zip",ext:".zip",metaData:{description:"Full project backup"}},{id:25,name:"presentation_final.pptx",url:"/placeholder.svg?height=400&width=300",size:35e5,createdAt:new Date("2024-01-10T16:00:00Z"),updatedAt:new Date("2024-01-10T16:00:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:35}},{id:26,name:"screenshot_001.png",url:"https://images.unsplash.com/photo-1517694712202-14dd9538aa97",size:12e5,createdAt:new Date("2024-01-05T09:00:00Z"),updatedAt:new Date("2024-01-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/png",ext:".png",width:1920,height:1080,metaData:{}},{id:27,name:"config.json",url:"/placeholder.svg?height=400&width=300",size:5e3,createdAt:new Date("2023-12-28T14:00:00Z"),updatedAt:new Date("2023-12-28T14:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:28,name:"readme.md",url:"/placeholder.svg?height=400&width=300",size:8500,createdAt:new Date("2023-12-20T10:00:00Z"),updatedAt:new Date("2023-12-20T10:00:00Z"),folderId:1,tags:["project"],mime:"text/markdown",ext:".md",metaData:{}},{id:29,name:"database_backup.sql",url:"/placeholder.svg?height=400&width=300",size:12e6,createdAt:new Date("2023-12-15T11:00:00Z"),updatedAt:new Date("2023-12-15T11:00:00Z"),folderId:5,tags:["archive","important"],mime:"application/sql",ext:".sql",metaData:{description:"Database backup"}},{id:30,name:"tutorial_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:18e6,createdAt:new Date("2023-12-10T13:00:00Z"),updatedAt:new Date("2023-12-10T13:00:00Z"),folderId:3,tags:["personal"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:420,videoSource:"local"}},{id:31,name:"company_logo.svg",url:"/placeholder.svg?height=400&width=300",size:45e3,createdAt:new Date("2023-12-05T09:00:00Z"),updatedAt:new Date("2023-12-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/svg+xml",ext:".svg",metaData:{}},{id:32,name:"report_q4.pdf",url:"/placeholder.svg?height=400&width=300",size:18e5,createdAt:new Date("2023-12-01T15:00:00Z"),updatedAt:new Date("2023-12-01T15:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:25,author:"Finance Team"}},{id:33,name:"nature_photo.webp",url:"https://images.unsplash.com/photo-1441974231531-c6227db76b6e",size:95e4,createdAt:new Date("2023-11-25T12:00:00Z"),updatedAt:new Date("2023-11-25T12:00:00Z"),folderId:2,tags:["personal"],mime:"image/webp",ext:".webp",width:3e3,height:2e3,metaData:{}},{id:34,name:"podcast_intro.mp3",url:"/placeholder.svg?height=400&width=300",size:25e5,createdAt:new Date("2023-11-20T10:00:00Z"),updatedAt:new Date("2023-11-20T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:180}},{id:35,name:"data_export.csv",url:"/placeholder.svg?height=400&width=300",size:85e4,createdAt:new Date("2023-11-15T14:00:00Z"),updatedAt:new Date("2023-11-15T14:00:00Z"),folderId:1,tags:["work"],mime:"text/csv",ext:".csv",metaData:{}},{id:36,name:"wireframes.pdf",url:"/placeholder.svg?height=400&width=300",size:42e5,createdAt:new Date("2023-11-10T11:00:00Z"),updatedAt:new Date("2023-11-10T11:00:00Z"),folderId:1,tags:["project"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:45}},{id:37,name:"cityscape.jpg",url:"https://images.unsplash.com/photo-1449824913935-59a10b8d2000",size:38e5,createdAt:new Date("2023-11-05T16:00:00Z"),updatedAt:new Date("2023-11-05T16:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4500,height:3e3,metaData:{}},{id:38,name:"interview_recording.mp3",url:"/placeholder.svg?height=400&width=300",size:85e5,createdAt:new Date("2023-11-01T09:00:00Z"),updatedAt:new Date("2023-11-01T09:00:00Z"),folderId:4,tags:["work"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:1800}},{id:39,name:"client_files.rar",url:"/placeholder.svg?height=400&width=300",size:45e6,createdAt:new Date("2023-10-25T13:00:00Z"),updatedAt:new Date("2023-10-25T13:00:00Z"),folderId:5,tags:["archive","work"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Client deliverables"}},{id:40,name:"marketing_plan.docx",url:"/placeholder.svg?height=400&width=300",size:12e5,createdAt:new Date("2023-10-20T10:00:00Z"),updatedAt:new Date("2023-10-20T10:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:18}},{id:41,name:"analytics_data.xlsx",url:"/placeholder.svg?height=400&width=300",size:21e5,createdAt:new Date("2023-10-15T15:00:00Z"),updatedAt:new Date("2023-10-15T15:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:8}},{id:42,name:"sunset_beach.jpg",url:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e",size:32e5,createdAt:new Date("2023-10-10T17:00:00Z"),updatedAt:new Date("2023-10-10T17:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2700,metaData:{}},{id:43,name:"webinar_recording.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:35e6,createdAt:new Date("2023-10-05T14:00:00Z"),updatedAt:new Date("2023-10-05T14:00:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:600,videoSource:"local"}},{id:44,name:"sound_effects.wav",url:"/placeholder.svg?height=400&width=300",size:15e6,createdAt:new Date("2023-10-01T11:00:00Z"),updatedAt:new Date("2023-10-01T11:00:00Z"),folderId:4,tags:["project"],mime:"audio/wav",ext:".wav",metaData:{duration:120}},{id:45,name:"legacy_system.zip",url:"/placeholder.svg?height=400&width=300",size:125e6,createdAt:new Date("2023-09-25T09:00:00Z"),updatedAt:new Date("2023-09-25T09:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Old system files"}}];var Na=e=>new Promise(t=>setTimeout(t,e)),go=class{getFolder(t){if(t===null)return Promise.resolve(null);let a=Ne.find(i=>i.id===t);if(!a)return Promise.resolve(null);let o=n({},a),r=o;for(;r.parentId!==null;){let i=Ne.find(l=>l.id===r.parentId);if(i)r.parent=n({},i),r=r.parent;else break}return Promise.resolve(o)}async getFolders(t,a=1,o=20,r=""){await Na(300);let i=t!==null?Ne.filter(p=>p.parentId===t):Ne.filter(p=>p.parentId===null),l=i;if(r&&r.trim()){let p=r.toLowerCase().trim();l=i.filter(y=>y.name.toLowerCase().includes(p))}let c=l.sort((p,y)=>new Date(p.createdAt).getTime()-new Date(y.createdAt).getTime()),s=c.length,f=Math.ceil(s/o),m=(a-1)*o;return{folders:c.slice(m,m+o),pagination:{currentPage:a,totalPages:f,totalFiles:s,filesPerPage:o}}}getTags(){return Promise.resolve($n.map(t=>t.name))}async getFiles(t,a,o,r,i){await Na(500);let l=[...Ie];if(t!==null&&(l=l.filter(w=>w.folderId===t)),a&&a.length>0&&(l=l.filter(w=>{let N=je(w.mime,w.ext);return a.includes(N)})),i){let w=i==null?void 0:i.toLowerCase();l=l.filter(N=>N.name.toLowerCase().includes(w))}let c=l.sort((w,N)=>new Date(w.createdAt).getTime()-new Date(N.createdAt).getTime()),s=o!=null?o:1,f=r!=null?r:10,m=c.length,b=Math.ceil(m/f),p=(s-1)*f,y=c.slice(p,p+f);return Promise.resolve({files:y,pagination:{currentPage:s,totalPages:b,totalFiles:m,filesPerPage:f}})}async getItems(t,a,o=1,r=24,i=""){await Na(300);let l=t!==null?Ne.filter(h=>h.parentId===t):Ne.filter(h=>h.parentId===null),c=t!==null?Ie.filter(h=>h.folderId===t):Ie.filter(h=>h.folderId===null);if(a&&a.length>0&&(c=c.filter(h=>{let I=je(h.mime,h.ext);return a.includes(I)})),i&&i.trim()){let h=i.toLowerCase().trim();l=l.filter(I=>I.name.toLowerCase().includes(h)),c=c.filter(I=>{var Y,te;return I.name.toLowerCase().includes(h)||((te=(Y=I.ext)==null?void 0:Y.toLowerCase().includes(h))!=null?te:!1)})}let s=l.sort((h,I)=>new Date(h.createdAt).getTime()-new Date(I.createdAt).getTime()),f=c.sort((h,I)=>new Date(h.createdAt).getTime()-new Date(I.createdAt).getTime()),m=s.length+f.length,b=Math.ceil(m/r)||1,p=(o-1)*r,y=p+r,w=s.slice(Math.max(0,p),Math.min(s.length,y)),N=w.length,M=r-N,D=Math.min(s.length,p),z=Math.max(0,p-s.length),T=f.slice(z,z+M);return{folders:w,files:T,pagination:{currentPage:o,totalPages:b,totalFiles:m,filesPerPage:r}}}async createFolder(t,a){await Na(300);let o={id:Date.now(),name:t,parentId:a!=null?a:null,pathId:typeof a=="number"?a:0,path:"",fileCount:0,folderCount:0,createdAt:new Date,updatedAt:new Date};return Ne.push(o),o}getMetaDataType(t,a){return t.type.startsWith("image/")?{}:t.type.startsWith("video/")?{duration:0,videoSource:a!=null?a:vo.LOCAL}:t.type.startsWith("audio/")?{duration:0}:{description:""}}getFileType(t){var o;let a="."+((o=t.name.split(".").pop())==null?void 0:o.toLowerCase());return je(t.type,a)}async uploadFiles(t,a){var r;await Na(500);let o=[];for(let{file:i,videoSource:l}of t){let c=this.getFileType(i),s="."+((r=i.name.split(".").pop())==null?void 0:r.toLowerCase()),f={id:Date.now()+Math.random(),name:i.name,folderId:a!=null?a:null,size:i.size,url:URL.createObjectURL(i),mime:i.type||"application/octet-stream",ext:s,metaData:this.getMetaDataType(i,l),createdAt:new Date,updatedAt:new Date,tags:[],width:c===X.IMAGE?800:void 0,height:c===X.IMAGE?600:void 0};Ie.push(f),o.push(f)}return o}renameFolder(t,a){let o=Ne.find(r=>r.id===t);return o?(o.name=a,o.updatedAt=new Date,Promise.resolve(o)):Promise.reject(new Error("Folder not found"))}updateFileMetaData(t,a){let o=Ie.find(c=>c.id===t);if(!o)return Promise.reject(new Error("File not found"));let l=a,{metaData:r}=l,i=g(l,["metaData"]);return Object.assign(o,i),r&&(o.metaData=n(n({},o.metaData),r)),o.updatedAt=new Date,Promise.resolve(o)}deleteFiles(t){for(let a of t){let o=Ie.findIndex(r=>r.id===a);o!==-1&&Ie.splice(o,1)}return Promise.resolve()}deleteFolders(t){for(let a of t){let o=Ne.findIndex(r=>r.id===a);if(o!==-1){Ne.splice(o,1);for(let r=Ie.length-1;r>=0;r--)Ie[r].folderId===a&&Ie.splice(r,1)}}return Promise.resolve()}findFiles(t){let a=t==null?void 0:t.toLowerCase(),o=Ie.filter(r=>{var i;return r.name.toLowerCase().includes(a)||((i=r.tags)==null?void 0:i.some(l=>l.toLowerCase().includes(a)))});return Promise.resolve(o)}findFolders(t){let a=t==null?void 0:t.toLowerCase(),o=Ne.filter(r=>r.name.toLowerCase().includes(a));return Promise.resolve(o)}moveFiles(t,a){let o=[];for(let r of t){let i=Ie.find(l=>l.id===r);i&&(i.folderId=a,i.updatedAt=new Date,o.push(i))}return Promise.resolve(o)}moveFolders(t,a){let o=[];for(let r of t){let i=Ne.find(l=>l.id===r);i&&(i.parentId=a,i.updatedAt=new Date,o.push(i))}return Promise.resolve(o)}};0&&(module.exports={FileManager,FileManagerModal,FileManagerProvider,MockProvider,useFileManager});
115
+ `,children:e.name}),(0,ue.jsx)("div",{className:`flex items-center justify-center gap-1 mt-1 transition-opacity duration-200 ${t?"opacity-60":"opacity-100"}`,children:(0,ue.jsxs)("span",{className:"text-[11px] text-blue-600 font-medium tracking-tight px-1.5 rounded-full",children:[e.fileCount," items"]})})]})]})})}var He=require("react/jsx-runtime");function ya(){let{files:e,folders:t,isLoading:o,handleFileClick:a,handleFolderClick:n,bulkDelete:i,mode:l,selectionMode:c,isInSelectionMode:d,selectedFiles:f,selectedFolders:m,currentFolder:b,setSelectedFiles:p,setSelectedFolders:y,setIsRenameFolderModalOpen:w,setIsMoveFileModalOpen:I,setFileDetailsModalFile:M,setFolderToRename:D}=G(),R=(()=>{if(!b)return 18;let h=b.folderCount||0,N=b.fileCount||0,Y=h+N;return Y>0?Y:18})();return o?(0,He.jsx)("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:Array.from({length:R}).map((h,N)=>(0,He.jsxs)("div",{className:"flex flex-col items-center justify-start w-full gap-2",children:[(0,He.jsx)("div",{className:"w-full aspect-square bg-gray-100 rounded-2xl animate-pulse"}),(0,He.jsxs)("div",{className:"flex flex-col items-center gap-1 w-full",children:[(0,He.jsx)("div",{className:"h-4 w-20 bg-gray-100 rounded animate-pulse"}),(0,He.jsx)("div",{className:"h-3 w-12 bg-gray-100 rounded animate-pulse"})]})]},N))}):(0,He.jsxs)("div",{className:"p-4 grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-6 xl:grid-cols-7 2xl:grid-cols-8 content-start",children:[t.map(h=>(0,He.jsx)(En,{folder:h,isSelected:m.some(N=>N.id===h.id),onSelect:n,onDelete:()=>i(),onRename:N=>{D(N),w(!0)},onMove:N=>{y([N]),p([]),I(!0)},selectionMode:c,mode:l,isInSelectionMode:d()},h.id)),e.map(h=>(0,He.jsx)(Tn,{file:h,isSelected:f.some(N=>N.id===h.id),onSelect:a,onDelete:()=>i(),onEdit:N=>{M(N)},onMove:N=>{p([N]),y([]),I(!0)},selectionMode:c,mode:l,isInSelectionMode:d()},h.id))]})}var Ln=require("react");var Ie=require("react/jsx-runtime"),Fa=class extends Ln.Component{constructor(o){super(o);this.handleReset=()=>{window.location.reload()};this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,a){console.error("FileManager Error Boundary caught an error:",o,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,Ie.jsx)("div",{className:"flex items-center justify-center min-h-[400px] p-8 w-full h-full bg-slate-50/50 rounded-lg border border-dashed border-slate-200",children:(0,Ie.jsxs)("div",{className:"text-center max-w-md flex flex-col items-center",children:[(0,Ie.jsx)("div",{className:"bg-red-100 p-3 rounded-full mb-4",children:(0,Ie.jsx)(ia,{className:"size-8 text-red-600"})}),(0,Ie.jsx)("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Something went wrong"}),(0,Ie.jsx)("p",{className:"text-sm text-slate-500 mb-6",children:"The file manager encountered an unexpected error. Refreshing the page usually resolves this issue."}),this.state.error&&(0,Ie.jsxs)("details",{className:"mb-6 text-left w-full border border-slate-200 rounded-lg overflow-hidden flex-col group",children:[(0,Ie.jsx)("summary",{className:"cursor-pointer text-xs font-mono bg-slate-100 p-2 text-slate-600 hover:bg-slate-200 transition-colors",children:"View Technical Details"}),(0,Ie.jsx)("div",{className:"p-3 bg-white",children:(0,Ie.jsx)("pre",{className:"text-[10px] text-slate-600 font-mono whitespace-pre-wrap word-break-all max-h-40 overflow-auto",children:this.state.error.toString()})})]}),(0,Ie.jsxs)(C,{onClick:this.handleReset,radius:"full",className:"gap-2",children:[(0,Ie.jsx)(la,{className:"size-4"}),"Reload Application"]})]})}):this.props.children}};var An=require("react");function _n(){let{handleSelectAllGlobal:e,handleClearSelection:t,getSelectionState:o,isCreateFolderModalOpen:a,setIsCreateFolderModalOpen:n,isUploadModalOpen:i,setIsUploadModalOpen:l,isSearchModalOpen:c,setIsSearchModalOpen:d}=G();return(0,An.useEffect)(()=>{let f=m=>{m.key==="k"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),d(!c)),m.key==="a"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),o()===!0?t():e(!0)),m.key==="f"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),n(!a)),m.key==="u"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),l(!i))};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,o,a,n,i,l,c,d]),null}var Fe=require("react/jsx-runtime");function Vn(e){return(0,Fe.jsx)(Fa,{children:(0,Fe.jsxs)(rt.Page,s(r({},e),{children:[(0,Fe.jsx)(_n,{}),(0,Fe.jsxs)("div",{className:"flex h-full relative pb-12 overflow-hidden",children:[(0,Fe.jsxs)("div",{className:"flex-1 flex w-full flex-col",children:[(0,Fe.jsx)(rt.Header,{children:(0,Fe.jsxs)("div",{className:"flex w-full justify-between gap-2",children:[(0,Fe.jsx)(va,{}),(0,Fe.jsx)(Dn,{})]})}),(0,Fe.jsx)(gn,{className:"-mb-1"}),(0,Fe.jsx)(ya,{}),(0,Fe.jsx)(rt.Footer,{className:"pt-6 pb-10"})]}),(0,Fe.jsx)(rt.Overlays,{})]})]}))})}var zt=require("react");var U=require("react/jsx-runtime");function Gn(a){var n=a,{open:e,onClose:t}=n,o=g(n,["open","onClose"]);return(0,U.jsx)(rt.Modal,s(r({},o),{onClose:t,children:(0,U.jsx)(Te,{open:e,onOpenChange:t,children:(0,U.jsx)(Oi,{onClose:t})})}))}function Oi({onClose:e}){let{updateSearchQuery:t}=G(),[o,a]=(0,zt.useState)(!1),[n,i]=(0,zt.useState)(""),l=(0,zt.useRef)(null),c=wa(n,300);return(0,zt.useEffect)(()=>{t(c)},[c,t]),(0,zt.useEffect)(()=>{o&&l.current&&l.current.focus()},[o]),(0,U.jsxs)(Ee,{className:"p-0",variant:"fullscreen",showCloseButton:!1,children:[(0,U.jsxs)(je,{className:"pt-5 pb-3 m-0 border-b border-border",children:[(0,U.jsx)(Le,{className:"px-6 text-base",children:(0,U.jsx)("div",{className:"flex w-full justify-between gap-2",children:o?(0,U.jsxs)("div",{className:"flex items-center gap-4 flex-1",children:[(0,U.jsx)(Me,{className:"size-5 text-gray-500 shrink-0"}),(0,U.jsx)(fo,{ref:l,type:"text",placeholder:"Search files and folders...",className:"border-none shadow-none focus-visible:ring-0 h-auto p-0 text-base font-semibold",value:n,onChange:d=>i(d.target.value),onKeyDown:d=>{d.key==="Escape"&&(i(""),t(""),a(!1))}}),(0,U.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:()=>{i(""),t(""),a(!1)},className:"border-gray-200 bg-white shrink-0",children:[(0,U.jsx)(ie,{className:"size-5"}),(0,U.jsx)("span",{className:"sr-only",children:"Cancel Search"})]})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(va,{}),(0,U.jsx)(In,{onSearchClick:()=>a(!0)}),(0,U.jsxs)(C,{variant:"outline",size:"icon",radius:"full",onClick:e,className:"border-gray-200 bg-white",children:[(0,U.jsx)(ie,{className:"size-5"}),(0,U.jsx)("span",{className:"hidden",children:"Close"})]})]})})}),(0,U.jsx)(mt,{className:"sr-only",children:"Browse and select files from your media library"})]}),(0,U.jsxs)("div",{className:"overflow-y-auto flex-1 pb-4",children:[(0,U.jsx)(ya,{}),(0,U.jsx)(rt.Footer,{className:"my-4"}),(0,U.jsx)(rt.Overlays,{})]}),(0,U.jsx)(Bi,{onClose:e})]})}function Bi({onClose:e}){let{selectedFiles:t,onFilesSelected:o,setSelectedFiles:a,setSelectedFolders:n,updateSearchQuery:i,handlePageChange:l}=G();return(0,U.jsxs)(We,{className:"px-6 py-4 border-t border-border w-full sm:justify-between justify-center items-center flex-col sm:flex-row gap-2",children:[(0,U.jsx)(fn,{}),(0,U.jsx)(tt,{asChild:!0,children:(0,U.jsx)(C,{type:"button",variant:"outline",onClick:e,radius:"full",className:"w-full md:w-auto mr-0",children:"Cancel"})}),(0,U.jsxs)(C,{type:"button",onClick:()=>{o&&t.length>0&&(o(t),a([]),n([]),i(""),l(1),e())},disabled:t.length===0,radius:"full",className:"w-full md:w-auto",children:["Select ",t.length>0?`(${t.length})`:""]})]})}var ke=[{id:1,name:"Documents",pathId:1,path:"/1",parentId:null,fileCount:20,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:2,name:"Images",pathId:2,path:"/2",parentId:null,fileCount:10,folderCount:3,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:3,name:"Videos",pathId:3,path:"/3",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:4,name:"Music Some Long Name Streched also so long to fit in the card Music Some Long Name Streched also so long to fit in the card",pathId:4,path:"/4",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:5,name:"Archives",pathId:5,path:"/5",parentId:null,fileCount:5,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:6,name:"Album 01",pathId:6,path:"/2/6",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:7,name:"Album 02",pathId:7,path:"/2/7",parentId:2,fileCount:0,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")},{id:8,name:"Squirrels",pathId:8,path:"/2/8",parentId:2,fileCount:1,folderCount:0,createdAt:new Date("2024-01-01"),updatedAt:new Date("2024-01-01")}],On=[{id:1,name:"Important",color:"#ef4444"},{id:2,name:"Work",color:"#3b82f6"},{id:3,name:"Personal",color:"#10b981"},{id:4,name:"Project",color:"#8b5cf6"},{id:5,name:"Archive",color:"#6b7280"}],Pe=[{id:101,name:"welcome.pdf",url:"/placeholder.svg?height=400&width=300",size:245e3,createdAt:new Date("2024-05-15T10:00:00Z"),updatedAt:new Date("2024-05-15T10:00:00Z"),folderId:null,tags:["important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:2,author:"Admin"}},{id:102,name:"desktop_wallpaper.jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926",size:42e5,createdAt:new Date("2024-05-14T15:30:00Z"),updatedAt:new Date("2024-05-14T15:30:00Z"),folderId:null,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:5e3,height:3333,formats:{thumbnail:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=156",hash:"thumbnail_desktop_wallpaper_abc123",mime:"image/jpeg",name:"thumbnail_desktop_wallpaper.jpg",path:null,size:5.57,width:156,height:104},small:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=500",hash:"small_desktop_wallpaper_abc123",mime:"image/jpeg",name:"small_desktop_wallpaper.jpg",path:null,size:47.27,width:500,height:333},medium:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=750",hash:"medium_desktop_wallpaper_abc123",mime:"image/jpeg",name:"medium_desktop_wallpaper.jpg",path:null,size:97.89,width:750,height:500},large:{ext:".jpg",url:"https://images.unsplash.com/photo-1557683316-973673baf926?w=1000",hash:"large_desktop_wallpaper_abc123",mime:"image/jpeg",name:"large_desktop_wallpaper.jpg",path:null,size:159.48,width:1e3,height:667}},metaData:{}},{id:103,name:"quick_notes.txt",url:"/placeholder.svg?height=400&width=300",size:3500,createdAt:new Date("2024-05-13T09:45:00Z"),updatedAt:new Date("2024-05-13T09:45:00Z"),folderId:null,tags:[],mime:"text/plain",ext:".txt",metaData:{}},{id:104,name:"intro_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:12e6,createdAt:new Date("2024-05-12T14:00:00Z"),updatedAt:new Date("2024-05-12T14:00:00Z"),folderId:null,tags:[],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:90,videoSource:"local"}},{id:105,name:"profile_photo.png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde",size:85e4,createdAt:new Date("2024-05-11T11:20:00Z"),updatedAt:new Date("2024-05-11T11:20:00Z"),folderId:null,tags:["personal"],mime:"image/png",ext:".png",width:2e3,height:2e3,formats:{thumbnail:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=156",hash:"thumbnail_profile_photo_def456",mime:"image/png",name:"thumbnail_profile_photo.png",path:null,size:8.2,width:156,height:156},small:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=500",hash:"small_profile_photo_def456",mime:"image/png",name:"small_profile_photo.png",path:null,size:52.3,width:500,height:500},medium:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=750",hash:"medium_profile_photo_def456",mime:"image/png",name:"medium_profile_photo.png",path:null,size:110.5,width:750,height:750},large:{ext:".png",url:"https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=1000",hash:"large_profile_photo_def456",mime:"image/png",name:"large_profile_photo.png",path:null,size:185.7,width:1e3,height:1e3}},metaData:{}},{id:106,name:"todo_list.md",url:"/placeholder.svg?height=400&width=300",size:6200,createdAt:new Date("2024-05-10T08:30:00Z"),updatedAt:new Date("2024-05-10T08:30:00Z"),folderId:null,tags:["important"],mime:"text/markdown",ext:".md",metaData:{}},{id:107,name:"app_settings.json",url:"/placeholder.svg?height=400&width=300",size:4800,createdAt:new Date("2024-05-09T16:15:00Z"),updatedAt:new Date("2024-05-09T16:15:00Z"),folderId:null,tags:[],mime:"application/json",ext:".json",metaData:{}},{id:108,name:"mountain_landscape.webp",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:12e5,createdAt:new Date("2024-05-08T13:00:00Z"),updatedAt:new Date("2024-05-08T13:00:00Z"),folderId:null,tags:["personal"],mime:"image/webp",ext:".webp",width:4e3,height:2667,metaData:{}},{id:1,name:"Key-Monastery-img.avif",url:"https://unciatrails.com/wp-content/uploads/2024/07/Key-Monastery-img.avif",size:2621440,createdAt:new Date("2023-10-26T10:30:00Z"),updatedAt:new Date("2023-10-26T10:30:00Z"),folderId:8,tags:["personal","important"],mime:"image/avif",ext:".avif",caption:"A cute squirrel in the park",alternativeText:"Gray squirrel sitting on wooden fence",width:3024,height:4032,metaData:{}},{id:2,name:"project_proposal thoda sa.pdf",url:"/placeholder.svg?height=400&width=300",size:1048576,createdAt:new Date("2024-05-10T14:20:00Z"),updatedAt:new Date("2024-05-10T14:20:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:15,author:"John Doe"}},{id:3,name:"quarterly_report.xlsx",url:"/placeholder.svg?height=400&width=300",size:524288,createdAt:new Date("2024-05-08T09:15:00Z"),updatedAt:new Date("2024-05-08T09:15:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:10}},{id:4,name:"presentation.pptx",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:20}},{id:8,name:"documnet.doc",url:"/placeholder.svg?height=400&width=300",size:2097152,createdAt:new Date("2024-05-05T16:45:00Z"),updatedAt:new Date("2024-05-05T16:45:00Z"),folderId:1,tags:["work","project"],mime:"application/msword",ext:".doc",metaData:{pageCount:20}},{id:5,name:"demo_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:10485760,createdAt:new Date("2024-05-03T11:30:00Z"),updatedAt:new Date("2024-05-03T11:30:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:120,videoSource:"remote"}},{id:6,name:"podcast_episode.mp3",url:"/placeholder.svg?height=400&width=300",size:5242880,createdAt:new Date("2024-05-02T10:00:00Z"),updatedAt:new Date("2024-05-02T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:3600}},{id:7,name:"notes.txt",url:"/placeholder.svg?height=400&width=300",size:1024,createdAt:new Date("2024-05-01T09:00:00Z"),updatedAt:new Date("2024-05-01T09:00:00Z"),folderId:1,tags:["work"],mime:"text/plain",ext:".txt",metaData:{}},{id:9,name:"data.json",url:"/placeholder.svg?height=400&width=300",size:2048,createdAt:new Date("2024-04-30T15:00:00Z"),updatedAt:new Date("2024-04-30T15:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:10,name:"archive.zip",url:"/placeholder.svg?height=400&width=300",size:104857600,createdAt:new Date("2024-04-29T12:00:00Z"),updatedAt:new Date("2024-04-29T12:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Project backup"}},{id:11,name:"setup.exe",url:"/placeholder.svg?height=400&width=300",size:52428800,createdAt:new Date("2024-04-28T11:00:00Z"),updatedAt:new Date("2024-04-28T11:00:00Z"),folderId:5,tags:["software"],mime:"application/x-msdownload",ext:".exe",metaData:{description:"Installer"}},{id:12,name:"old_stuff.rar",url:"/placeholder.svg?height=400&width=300",size:20971520,createdAt:new Date("2024-04-27T10:00:00Z"),updatedAt:new Date("2024-04-27T10:00:00Z"),folderId:5,tags:["archive"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Old files"}},{id:13,name:"meeting_notes_q1.pdf",url:"/placeholder.svg?height=400&width=300",size:856e3,createdAt:new Date("2024-03-15T09:00:00Z"),updatedAt:new Date("2024-03-15T09:00:00Z"),folderId:1,tags:["work"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:8,author:"Sarah Johnson"}},{id:14,name:"budget_2024.xlsx",url:"/placeholder.svg?height=400&width=300",size:425e3,createdAt:new Date("2024-03-10T14:30:00Z"),updatedAt:new Date("2024-03-10T14:30:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:5}},{id:15,name:"team_photo.jpg",url:"https://images.unsplash.com/photo-1522071820081-009f0129c71c",size:32e5,createdAt:new Date("2024-02-28T11:00:00Z"),updatedAt:new Date("2024-02-28T11:00:00Z"),folderId:2,tags:["work"],mime:"image/jpeg",ext:".jpg",width:4e3,height:3e3,metaData:{}},{id:16,name:"logo_design.png",url:"https://images.unsplash.com/photo-1611162617474-5b21e879e113",size:15e5,createdAt:new Date("2024-02-20T10:00:00Z"),updatedAt:new Date("2024-02-20T10:00:00Z"),folderId:2,tags:["project"],mime:"image/png",ext:".png",width:2e3,height:2e3,metaData:{}},{id:17,name:"product_demo.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:15e6,createdAt:new Date("2024-02-15T16:00:00Z"),updatedAt:new Date("2024-02-15T16:00:00Z"),folderId:3,tags:["project"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:180,videoSource:"local"}},{id:18,name:"training_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:25e6,createdAt:new Date("2024-02-10T09:30:00Z"),updatedAt:new Date("2024-02-10T09:30:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:300,videoSource:"local"}},{id:19,name:"background_music.mp3",url:"/placeholder.svg?height=400&width=300",size:45e5,createdAt:new Date("2024-02-05T14:00:00Z"),updatedAt:new Date("2024-02-05T14:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:240}},{id:20,name:"contract_template.docx",url:"/placeholder.svg?height=400&width=300",size:65e4,createdAt:new Date("2024-01-30T11:00:00Z"),updatedAt:new Date("2024-01-30T11:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:12}},{id:21,name:"invoice_jan.pdf",url:"/placeholder.svg?height=400&width=300",size:32e4,createdAt:new Date("2024-01-25T10:00:00Z"),updatedAt:new Date("2024-01-25T10:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:3}},{id:22,name:"vacation_photo1.jpg",url:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4",size:28e5,createdAt:new Date("2024-01-20T15:00:00Z"),updatedAt:new Date("2024-01-20T15:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:3500,height:2500,metaData:{}},{id:23,name:"vacation_photo2.jpg",url:"https://images.unsplash.com/photo-1469474968028-56623f02e42e",size:31e5,createdAt:new Date("2024-01-20T15:05:00Z"),updatedAt:new Date("2024-01-20T15:05:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2800,metaData:{}},{id:24,name:"project_backup.zip",url:"/placeholder.svg?height=400&width=300",size:85e6,createdAt:new Date("2024-01-15T12:00:00Z"),updatedAt:new Date("2024-01-15T12:00:00Z"),folderId:5,tags:["archive","project"],mime:"application/zip",ext:".zip",metaData:{description:"Full project backup"}},{id:25,name:"presentation_final.pptx",url:"/placeholder.svg?height=400&width=300",size:35e5,createdAt:new Date("2024-01-10T16:00:00Z"),updatedAt:new Date("2024-01-10T16:00:00Z"),folderId:1,tags:["work","important"],mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ext:".pptx",metaData:{pageCount:35}},{id:26,name:"screenshot_001.png",url:"https://images.unsplash.com/photo-1517694712202-14dd9538aa97",size:12e5,createdAt:new Date("2024-01-05T09:00:00Z"),updatedAt:new Date("2024-01-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/png",ext:".png",width:1920,height:1080,metaData:{}},{id:27,name:"config.json",url:"/placeholder.svg?height=400&width=300",size:5e3,createdAt:new Date("2023-12-28T14:00:00Z"),updatedAt:new Date("2023-12-28T14:00:00Z"),folderId:1,tags:["project"],mime:"application/json",ext:".json",metaData:{}},{id:28,name:"readme.md",url:"/placeholder.svg?height=400&width=300",size:8500,createdAt:new Date("2023-12-20T10:00:00Z"),updatedAt:new Date("2023-12-20T10:00:00Z"),folderId:1,tags:["project"],mime:"text/markdown",ext:".md",metaData:{}},{id:29,name:"database_backup.sql",url:"/placeholder.svg?height=400&width=300",size:12e6,createdAt:new Date("2023-12-15T11:00:00Z"),updatedAt:new Date("2023-12-15T11:00:00Z"),folderId:5,tags:["archive","important"],mime:"application/sql",ext:".sql",metaData:{description:"Database backup"}},{id:30,name:"tutorial_video.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:18e6,createdAt:new Date("2023-12-10T13:00:00Z"),updatedAt:new Date("2023-12-10T13:00:00Z"),folderId:3,tags:["personal"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:420,videoSource:"local"}},{id:31,name:"company_logo.svg",url:"/placeholder.svg?height=400&width=300",size:45e3,createdAt:new Date("2023-12-05T09:00:00Z"),updatedAt:new Date("2023-12-05T09:00:00Z"),folderId:2,tags:["work"],mime:"image/svg+xml",ext:".svg",metaData:{}},{id:32,name:"report_q4.pdf",url:"/placeholder.svg?height=400&width=300",size:18e5,createdAt:new Date("2023-12-01T15:00:00Z"),updatedAt:new Date("2023-12-01T15:00:00Z"),folderId:1,tags:["work","important"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:25,author:"Finance Team"}},{id:33,name:"nature_photo.webp",url:"https://images.unsplash.com/photo-1441974231531-c6227db76b6e",size:95e4,createdAt:new Date("2023-11-25T12:00:00Z"),updatedAt:new Date("2023-11-25T12:00:00Z"),folderId:2,tags:["personal"],mime:"image/webp",ext:".webp",width:3e3,height:2e3,metaData:{}},{id:34,name:"podcast_intro.mp3",url:"/placeholder.svg?height=400&width=300",size:25e5,createdAt:new Date("2023-11-20T10:00:00Z"),updatedAt:new Date("2023-11-20T10:00:00Z"),folderId:4,tags:["personal"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:180}},{id:35,name:"data_export.csv",url:"/placeholder.svg?height=400&width=300",size:85e4,createdAt:new Date("2023-11-15T14:00:00Z"),updatedAt:new Date("2023-11-15T14:00:00Z"),folderId:1,tags:["work"],mime:"text/csv",ext:".csv",metaData:{}},{id:36,name:"wireframes.pdf",url:"/placeholder.svg?height=400&width=300",size:42e5,createdAt:new Date("2023-11-10T11:00:00Z"),updatedAt:new Date("2023-11-10T11:00:00Z"),folderId:1,tags:["project"],mime:"application/pdf",ext:".pdf",metaData:{pageCount:45}},{id:37,name:"cityscape.jpg",url:"https://images.unsplash.com/photo-1449824913935-59a10b8d2000",size:38e5,createdAt:new Date("2023-11-05T16:00:00Z"),updatedAt:new Date("2023-11-05T16:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4500,height:3e3,metaData:{}},{id:38,name:"interview_recording.mp3",url:"/placeholder.svg?height=400&width=300",size:85e5,createdAt:new Date("2023-11-01T09:00:00Z"),updatedAt:new Date("2023-11-01T09:00:00Z"),folderId:4,tags:["work"],mime:"audio/mpeg",ext:".mp3",metaData:{duration:1800}},{id:39,name:"client_files.rar",url:"/placeholder.svg?height=400&width=300",size:45e6,createdAt:new Date("2023-10-25T13:00:00Z"),updatedAt:new Date("2023-10-25T13:00:00Z"),folderId:5,tags:["archive","work"],mime:"application/x-rar-compressed",ext:".rar",metaData:{description:"Client deliverables"}},{id:40,name:"marketing_plan.docx",url:"/placeholder.svg?height=400&width=300",size:12e5,createdAt:new Date("2023-10-20T10:00:00Z"),updatedAt:new Date("2023-10-20T10:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",ext:".docx",metaData:{pageCount:18}},{id:41,name:"analytics_data.xlsx",url:"/placeholder.svg?height=400&width=300",size:21e5,createdAt:new Date("2023-10-15T15:00:00Z"),updatedAt:new Date("2023-10-15T15:00:00Z"),folderId:1,tags:["work"],mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ext:".xlsx",metaData:{pageCount:8}},{id:42,name:"sunset_beach.jpg",url:"https://images.unsplash.com/photo-1507525428034-b723cf961d3e",size:32e5,createdAt:new Date("2023-10-10T17:00:00Z"),updatedAt:new Date("2023-10-10T17:00:00Z"),folderId:2,tags:["personal"],mime:"image/jpeg",ext:".jpg",width:4e3,height:2700,metaData:{}},{id:43,name:"webinar_recording.mp4",url:"https://docs.material-tailwind.com/demo.mp4",size:35e6,createdAt:new Date("2023-10-05T14:00:00Z"),updatedAt:new Date("2023-10-05T14:00:00Z"),folderId:3,tags:["work"],mime:"video/mp4",ext:".mp4",width:1920,height:1080,metaData:{duration:600,videoSource:"local"}},{id:44,name:"sound_effects.wav",url:"/placeholder.svg?height=400&width=300",size:15e6,createdAt:new Date("2023-10-01T11:00:00Z"),updatedAt:new Date("2023-10-01T11:00:00Z"),folderId:4,tags:["project"],mime:"audio/wav",ext:".wav",metaData:{duration:120}},{id:45,name:"legacy_system.zip",url:"/placeholder.svg?height=400&width=300",size:125e6,createdAt:new Date("2023-09-25T09:00:00Z"),updatedAt:new Date("2023-09-25T09:00:00Z"),folderId:5,tags:["archive"],mime:"application/zip",ext:".zip",metaData:{description:"Old system files"}}];var Ao=e=>new Promise(t=>setTimeout(t,e)),Ma=class{getFolder(t){if(t===null)return Promise.resolve(null);let o=ke.find(i=>i.id===t);if(!o)return Promise.resolve(null);let a=r({},o),n=a;for(;n.parentId!==null;){let i=ke.find(l=>l.id===n.parentId);if(i)n.parent=r({},i),n=n.parent;else break}return Promise.resolve(a)}async getFolders(t,o=1,a=20,n=""){await Ao(300);let i=t!==null?ke.filter(p=>p.parentId===t):ke.filter(p=>p.parentId===null),l=i;if(n&&n.trim()){let p=n.toLowerCase().trim();l=i.filter(y=>y.name.toLowerCase().includes(p))}let c=l.sort((p,y)=>new Date(p.createdAt).getTime()-new Date(y.createdAt).getTime()),d=c.length,f=Math.ceil(d/a),m=(o-1)*a;return{folders:c.slice(m,m+a),pagination:{currentPage:o,totalPages:f,totalFiles:d,filesPerPage:a}}}getTags(){return Promise.resolve(On.map(t=>t.name))}async getFiles(t,o,a,n,i){await Ao(500);let l=[...Pe];if(t!==null&&(l=l.filter(w=>w.folderId===t)),o&&o.length>0&&(l=l.filter(w=>{let I=$e(w.mime,w.ext);return o.includes(I)})),i){let w=i==null?void 0:i.toLowerCase();l=l.filter(I=>I.name.toLowerCase().includes(w))}let c=l.sort((w,I)=>new Date(w.createdAt).getTime()-new Date(I.createdAt).getTime()),d=a!=null?a:1,f=n!=null?n:10,m=c.length,b=Math.ceil(m/f),p=(d-1)*f,y=c.slice(p,p+f);return Promise.resolve({files:y,pagination:{currentPage:d,totalPages:b,totalFiles:m,filesPerPage:f}})}async getItems(t,o,a=1,n=24,i=""){await Ao(300);let l=t!==null?ke.filter(h=>h.parentId===t):ke.filter(h=>h.parentId===null),c=t!==null?Pe.filter(h=>h.folderId===t):Pe.filter(h=>h.folderId===null);if(o&&o.length>0&&(c=c.filter(h=>{let N=$e(h.mime,h.ext);return o.includes(N)})),i&&i.trim()){let h=i.toLowerCase().trim();l=l.filter(N=>N.name.toLowerCase().includes(h)),c=c.filter(N=>{var Y,te;return N.name.toLowerCase().includes(h)||((te=(Y=N.ext)==null?void 0:Y.toLowerCase().includes(h))!=null?te:!1)})}let d=l.sort((h,N)=>new Date(h.createdAt).getTime()-new Date(N.createdAt).getTime()),f=c.sort((h,N)=>new Date(h.createdAt).getTime()-new Date(N.createdAt).getTime()),m=d.length+f.length,b=Math.ceil(m/n)||1,p=(a-1)*n,y=p+n,w=d.slice(Math.max(0,p),Math.min(d.length,y)),I=w.length,M=n-I,D=Math.min(d.length,p),z=Math.max(0,p-d.length),R=f.slice(z,z+M);return{folders:w,files:R,pagination:{currentPage:a,totalPages:b,totalFiles:m,filesPerPage:n}}}async createFolder(t,o){await Ao(300);let a={id:Date.now(),name:t,parentId:o!=null?o:null,pathId:typeof o=="number"?o:0,path:"",fileCount:0,folderCount:0,createdAt:new Date,updatedAt:new Date};return ke.push(a),a}getMetaDataType(t,o){return t.type.startsWith("image/")?{}:t.type.startsWith("video/")?{duration:0,videoSource:o!=null?o:Ia.LOCAL}:t.type.startsWith("audio/")?{duration:0}:{description:""}}getFileType(t){var a;let o="."+((a=t.name.split(".").pop())==null?void 0:a.toLowerCase());return $e(t.type,o)}async uploadFiles(t,o){var n;await Ao(500);let a=[];for(let{file:i,videoSource:l}of t){let c=this.getFileType(i),d="."+((n=i.name.split(".").pop())==null?void 0:n.toLowerCase()),f={id:Date.now()+Math.random(),name:i.name,folderId:o!=null?o:null,size:i.size,url:URL.createObjectURL(i),mime:i.type||"application/octet-stream",ext:d,metaData:this.getMetaDataType(i,l),createdAt:new Date,updatedAt:new Date,tags:[],width:c===X.IMAGE?800:void 0,height:c===X.IMAGE?600:void 0};Pe.push(f),a.push(f)}return a}renameFolder(t,o){let a=ke.find(n=>n.id===t);return a?(a.name=o,a.updatedAt=new Date,Promise.resolve(a)):Promise.reject(new Error("Folder not found"))}updateFileMetaData(t,o){let a=Pe.find(c=>c.id===t);if(!a)return Promise.reject(new Error("File not found"));let l=o,{metaData:n}=l,i=g(l,["metaData"]);return Object.assign(a,i),n&&(a.metaData=r(r({},a.metaData),n)),a.updatedAt=new Date,Promise.resolve(a)}deleteFiles(t){for(let o of t){let a=Pe.findIndex(n=>n.id===o);a!==-1&&Pe.splice(a,1)}return Promise.resolve()}deleteFolders(t){for(let o of t){let a=ke.findIndex(n=>n.id===o);if(a!==-1){ke.splice(a,1);for(let n=Pe.length-1;n>=0;n--)Pe[n].folderId===o&&Pe.splice(n,1)}}return Promise.resolve()}findFiles(t){let o=t==null?void 0:t.toLowerCase(),a=Pe.filter(n=>{var i;return n.name.toLowerCase().includes(o)||((i=n.tags)==null?void 0:i.some(l=>l.toLowerCase().includes(o)))});return Promise.resolve(a)}findFolders(t){let o=t==null?void 0:t.toLowerCase(),a=ke.filter(n=>n.name.toLowerCase().includes(o));return Promise.resolve(a)}moveFiles(t,o){let a=[];for(let n of t){let i=Pe.find(l=>l.id===n);i&&(i.folderId=o,i.updatedAt=new Date,a.push(i))}return Promise.resolve(a)}moveFolders(t,o){let a=[];for(let n of t){let i=ke.find(l=>l.id===n);i&&(i.parentId=o,i.updatedAt=new Date,a.push(i))}return Promise.resolve(a)}};0&&(module.exports={FileManager,FileManagerModal,FileManagerProvider,MockProvider,useFileManager});