1import{u as ze,j as Ge,z as qe,E as Je,r,h as We,c as V,i as T,k as Ye,o as l,b as a,d as e,p as Qe,q as Xe,e as D,t as n,f as h,C as g,D as w,m as O,F as k,g as x,J as et,B as tt,n as ot,N as st}from"./index-BNUSfvSO.js";import{i as re}from"./index-BdSYyQzq.js";import{u as nt,a as ie}from"./ResourceFoldersStore-BLC2avMc.js";import{u as de}from"./ChatStore-CK6ENiEW.js";const lt={class:"container mx-auto px-4 pb-20"},at={class:"mb-10 ml-5"},rt={class:"breadcrumbs"},it={class:"underline underline-offset-2"},dt={class:"mt-5 text-center text-3xl font-bold"},ct={class:"my-10 text-center text-2xl"},ut={class:"i4u-container bg-neutral text-primary pt-6 lg:pt-12"},pt={key:0},ht={key:1,class:"mb-2"},vt={class:"mb-10 grid grid-cols-12 gap-6"},mt=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"h-6 w-6 text-orange-400"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})],-1),gt={class:"text-xl font-semibold"},bt={key:1,disabled:"",class:"i4u-card group col-span-12 flex cursor-not-allowed items-center gap-4 border border-transparent bg-neutral-300 text-neutral-500 opacity-50 duration-200 ease-in-out md:col-span-6 lg:col-span-4 lg:row-span-1"},_t=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"h-6 w-6 text-orange-400"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})],-1),wt={class:"text-xl font-semibold"},yt={key:2,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},ft={class:"i4u-card w-96 bg-white"},kt=e("div",{class:"i4u-accent bg-accent"},null,-1),xt={class:"mb-2 text-xl font-semibold"},Ft={class:"form-control mb-4 w-full"},Ct={class:"label"},$t={class:"label-text"},Mt=["placeholder"],Tt={class:"flex flex-row justify-between gap-4"},It=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"h-6 w-6 text-blue-500"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})],-1),Ut={class:"text-xl font-semibold"},At={key:4,class:"i4u-card group col-span-12 flex cursor-not-allowed items-center gap-4 border border-transparent bg-neutral-300 text-neutral-500 opacity-50 duration-200 ease-in-out md:col-span-6 lg:col-span-4 lg:row-span-1",disabled:""},Et=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"h-6 w-6 text-neutral-500"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})],-1),jt={class:"text-xl font-semibold"},Kt=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-blue-500"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.
1123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})],-1),St=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-green-500"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})],-1),Bt={class:"text-xl font-semibold"},Pt={key:7,class:"i4u-card group col-span-12 flex cursor-not-allowed items-center gap-4 border border-transparent bg-neutral-300 text-neutral-500 opacity-50 duration-200 ease-in-out md:col-span-6 lg:col-span-4 lg:row-span-1",disabled:""},Vt=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-green-500"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})],-1),Dt={class:"text-xl font-semibold"},Lt={class:"mb-2"},Ht={class:"mr-2 text-3xl"},Zt={class:"breadcrumbs mb-4 pt-0 text-sm"},Nt={key:0},Rt=["onClick"],Ot={key:2,class:"mb-8 p-3"},zt={class:"btn-group flex gap-1"},Gt=["disabled"],qt=e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1),Jt=[qt],Wt=["onClick"],Yt=["disabled"],Qt=e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1),Xt=[Qt],eo={class:"flex flex-col gap-4"},to={class:"flex gap-2"},oo={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-orange-400"},so=e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"},null,-1),no=[so],lo={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-blue-500"},ao=e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"},null,-1),ro=[ao],io={key:2,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-green-500"},co=e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"},null,-1),uo=[co],po=["onClick"],ho=["href"],vo=["href"],mo={key:0,class:"dropdown dropdown-end h-0"},go={key:0,tabindex:"0",role:"button",class:"btn btn-circle btn-xs border-none duration-200 ease-in-out hover:bg-neutral-300"},bo=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})],-1),_o=[bo],wo={tabindex:"0",class:"dropdown-content menu bg-base-100 rounded-box z-[1] w-52 p-2 shadow"},yo=["onClick"],fo=["onClick"],ko={key:1,class:"dropdown dropdown-end h-0"},xo=e("div",{tabindex:"0",role:"button",class:"btn btn-circle btn-xs border-none duration-200 ease-in-out hover:bg-neutral-300"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})])],-1),Fo={tabindex:"0",class:"dropdown-content menu bg-base-100 rounded-box z-[1] w-52 p-2 shadow"},Co=["onClick"],$o={key:2,class:"dropdown dropdown-end h-0"},Mo=e("div",{tabindex:"0",role:"button",class:"btn btn-circle btn-xs border-none duration-200 ease-in-out hover:bg-neutral-300"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})])],-1),To={tabindex:"0",class:"dropdown-content menu bg-base-100 rounded-box z-[1] w-52 p-2 shadow"},Io=["onClick"],Uo={id:"editFolderModal",class:"modal"},Ao={class:"i4u-card w-96 bg-white"},Eo=e("div",{class:"i4u-accent bg-accent"},null,-1),jo={class:"text-primary mb-2 text-xl font-semibold"},Ko={class:"form-control"},So={class:"label"},Bo={class:"label-text"},Po=["placeholder"],Vo={class:"flex flex-row justify-between gap-4"},Do={id:"editfileModal",class:"modal"},Lo={class:"i4u-card w-96 bg-white"},Ho=e("div",{class:"i4u-accent bg-accent"},null,-1),Zo={class:"text-primary mb-2 text-xl font-semibold"},No={class:"form-control"},Ro={class:"label"},Oo={class:"label-text"},zo=["placeholder"],Go={class:"flex flex-row justify-between gap-4"},qo={class:"modal",role:"dialog"},Jo={class:"i4u-card w-4/5 bg-white md:w-1/5"},Wo={class:"font-Inter"},Yo={key:0,class:"flex flex-row justify-between"},Qo={class:"w-2/6"},Xo={class:"w-1/6"},es={class:"w-2/6"},ts=["onUpdate:modelValue"],os={class:"w-1/6"},ss=["onClick"],ns=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})],-1),ls=[ns],as={class:"flex flex-row justify-between gap-4"},rs=["disabled"],is={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},ds={class:"i4u-card w-96 bg-white"},cs=e("div",{class:"i4u-accent bg-accent"},null,-1),us={class:"mb-2 text-xl font-semibold"},ps={class:"form-control"},hs={class:"label"},vs={class:"label-text"},ms={class:"form-control"},gs={class:"label"},bs={class:"label-text"},_s={class:"form-control"},ws={class:"label"},ys={class:"label-text"},fs={class:"mt-5 flex flex-row justify-between gap-4"},ks={key:1,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},xs={class:"i4u-card w-96 bg-white"},Fs=e("div",{class:"i4u-accent bg-accent"},null,-1),Cs={class:"mb-2 text-xl font-semibold"},$s={class:"my-5 text-xl"},Ms=["id","value"],Ts=["for"],Is={class:"mt-5 flex flex-row justify-between gap-4"},Us={key:2,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},As={class:"i4u-card w-96 bg-white"},Es=e("div",{class:"i4u-accent bg-accent"},null,-1),js={class:"mb-2 text-xl font-semibold"},Ks={class:"my-5 text-xl"},Ss={class:"mb-5"},Bs={class:"label cursor-pointer"},Ps={class:"label-text"},Vs=["id","value","onChange","checked"],Ds={class:"mt-5 flex flex-row justify-between gap-4"},qs={__name:"EcoResourcesView",setup(Ls){const{createNewFolder:Hs,renameFolder:ce}=nt(),{getEcosystemFiles:Zs,getFoldersAndFiles:ue,shareFileWithEcosystem:pe,getEcosystemFoldersAndFiles:y,getCurrentFolderEcoFiles:he,removeFileWithEcosystem:Ns,createEcosystemFolder:ve,deleteFolderFromEcosystem:me}
1=ie(),v=ze(),f=ie(),I=Ge(),ge=de(),{setSelectedCOnversation:be}=de(),_e=qe(),z=Je(),we=I.singelEcosystem.name,ye=I.singelEcosystem.id,fe=(t,s)=>Array.isArray(s)&&s.includes(t.ecosystemId),L=r(!1);r(!1);const U=r(!1),c=r([{name:"Your files",folder_id:null}]),G=r(null),m=r([]),F=r([]),q=r(null),ke=r([]),C=r(""),J=window.location.href.split("resources/")[1],p=J.toString(),H=r(`Bearer ${v.getUserData.token}`);We(async()=>{const t=window.location.href.split("resources/")[1];y(t),ae()});const W=t=>{t&&t.url?window.open(t.url,"_blank"):console.error("Item or item URL is not defined")},xe=async t=>{try{await me(t,J.value),await y(p)}catch(s){console.error("Error deleting folder or fetching folders:",s)}},Fe=t=>{console.log("Navigating to folder:",t),A.value=null;const s=c.value.findIndex(d=>d.folder_id===t);s!==-1&&(c.value=c.value.slice(0,s+1)),y(p)},Ce=()=>{let t=m.value[0].hasOwnProperty("type")?"external_url":"local_files",s=new FormData;m.value.forEach((o,i)=>{const u=new File([o.fileData],`${o.name}.${o.name_file_type}`,{type:o.fileData.type});s.append("files",u)});const d=[{ecosystemId:p,folderId:M.value}];s.append("ecosystemShared",JSON.stringify(d)),s.append("uploadType",t),T.post("/fileUpload/test",s,{headers:{"Content-Type":"multipart/form-data",Authorization:`${H.value}`}}).then(o=>{ke.value=o.data,setTimeout(()=>{console.log("uploadFiles - response in set timeout - check for getCurrentFolderEcoFiles"),f.getCurrentFolderEcoFiles(A.value._id,p),Z()},500),re.success("File Uploaded",{autoClose:3e3})}).catch(()=>{q.value=!1})},$e=t=>{m.value.splice(t,1)},Me=()=>{L.value=!0,C.value=""},Y=()=>{L.value=!1,C.value=""},Te=t=>{const s=v.getUserData.organisation.id;console.log("AuthStore",s),ve(t,p,s),y(p),Y()},$=r(null),b=r(""),Q=r(""),A=r(null),Ie=t=>{$.value=t,b.value=t.name,Q.value=t._id,document.getElementById("editFolderModal").showModal()},X=()=>{$.value=null,b.value="",document.getElementById("editFolderModal").close()},ee=()=>{ce(Q.value,b.value,M.value),y(p),document.getElementById("editFolderModal").close()},Ue=t=>{A.value=t,console.log("Navigate to Folder",t._id),c.value.push({name:t.name,folder_id:t._id}),c.length>
11?y(p):(he(t._id,p),console.log("goToFolder - else triggered"))},M=V(()=>c.value[c.value.length-1].folder_id),Ae=()=>{m.value=[],U.value=!0},Z=()=>{U.value=!1},te=r(!1),oe=r(null),Ee=r([]),se=()=>{te.value=!1},je=(t,s)=>{const d=[t],o=s;T.patch("/files/move",{idList:d,folder:o},{headers:{authorization:H.value}}),se(),ue(M.value)},Ke=()=>{G.value.click()},Se=t=>{let s=t.target.files;for(var d=0;d<s.length;d++){let o=s[d],i={preview_url:null,fileData:o,ecosystemShared:[p],name:o.name.split(".")[0],name_file_type:o.name.split(".")[1]};i.fileData.type.split("/")[0]=="image"&&(i.preview_url=URL.createObjectURL(o)),m.value.push(i)}},ne=r(!1),E=r(null);r([]);const Be=()=>{ne.value=!1,f.getFoldersAndFiles(M.value)},Pe=(t,s,d,o)=>{pe(d,s.ecosystemId)},N=r(!1),j=r(""),K=r(""),S=r(""),Ve=()=>{j.value="",K.value="",S.value="",N.value=!0},le=()=>{N.value=!1},De=()=>{let t={filename:j.value,url:K.value,mimeType:"link",ecosystemShared:[{ecosystemId:p,folderId:M.value}],organisationId:v.userData.organisation.id,description:S.value};T.post("/files",t,{headers:{authorization:H.value}}),setTimeout(()=>{f.getCurrentFolderEcoFiles(A.value._id,p),Z()},500),re.success("Link Uploaded to ecosystem",{autoClose:3e3}),le()},Le=V(()=>{const s=(_.value-1)*10,d=s+10;return f.returnFoldersAndFiles.slice(s,d)}),B=V(()=>Math.ceil(f.returnFoldersAndFiles.length/10)),_=r(1),R=t=>{_.value=t},P=V(()=>{const t=I.returnSingelEcosystem.administrator[0];return v.userData.organisation.id===t}),ae=async()=>{try{const t=v.getUserData.organisation.id,s=await T.get(`messages/conversations?organisationId=${t}`,{headers:{Authorization:`Bearer ${v.getUserData.token}`}});F.value=s.data.conversations,console.log("Conversations:",F.value)}catch(t){console.error("Failed to get conversations",t)}},He=()=>{const t=I.returnSingelEcosystem.administrator[0];Ze(t)?Ne(t):Re(t)},Ze=t=>{const s=v.getUserData.organisation.id;return F.value.some(d=>d.participants.some(o=>o.id===t&&o.id!==s))},Ne=t=>{const s=v.getUserData.organisation.id,d=F.value.find(o=>{const i=o.participants.map(u=>u.id);return i.includes(t)&&i.includes(s)});
1be(d),z.push({name:"messages",query:{members:"members",id:_e.params.id}})},Re=async t=>{try{const s=v.getUserData.organisation.id,d=await T.post("messages/createConversation",{senderId:s,receiverId:t},{headers:{Authorization:`Bearer ${v.getUserData.token}`}});await ae();const o=F.value.find(i=>{const u=i.participants.map(Oe=>Oe.id);return u.includes(t)&&u.includes(s)});ge.setSelectedCOnversation(o),z.push({name:"messages"})}catch(s){console.error("Failed to start conversation",s)}};return(t,s)=>{const d=Ye("router-link");return l(),a("main",lt,[e("section",at,[e("div",rt,[e("ul",null,[e("li",null,[Qe(d,{to:`/ecosystemhome/${D(ye)}`},{default:Xe(()=>[O(n(t.$t("extraKeys.ecosystem")),1)]),_:1},8,["to"])]),e("li",it,n(t.$t("extraKeys.resources")),1)])])]),e("p",dt,n(D(we)),1),e("p",ct,n(t.$t("extraKeys.resources")),1),e("section",ut,[c.value.length>1?(l(),a("p",pt)):(l(),a("p",ht,"Click an folder to upload File or Link *")),e("div",vt,[P.value==!0&&c.value.length==1?(l(),a("button",{key:0,onClick:s[0]||(s[0]=o=>Me()),class:"i4u-card group col-span-12 flex cursor-pointer items-center gap-4 border border-transparent bg-neutral-50 duration-200 ease-in-out hover:border-neutral-300 hover:shadow-md md:col-span-6 lg:col-span-4 lg:row-span-1"},[mt,e("p",gt,n(t.$t("resourcePage.newFolderText")),1)])):h("",!0),P.value==!0&&c.value.length>1?(l(),a("button",bt,[_t,e("p",wt,n(t.$t("resourcePage.newFolderText")),1)])):h("",!0),L.value?(l(),a("div",yt,[e("div",ft,[kt,e("h3",xt,n(t.$t("resourcePage.newFolderText")),1),e("label",Ft,[e("div",Ct,[e("span",$t,n(t.$t("resourcePage.folderNameText")),1)]),g(e("input",{type:"text",placeholder:t.$t("resourcePage.folderNameInputText"),class:"input input-bordered w-full border-neutral-300","onUpdate:modelValue":s[1]||(s[1]=o=>C.value=o)},null,8,Mt),[[w,C.value]])]),e("div",Tt,[e("button",{onClick:s[2]||(s[2]=o=>Te(C.value)),class:"btn btn-primary text-white"},n(t.$t("resourcePage.createButtonText")),1),e("button",{onClick:s[3]||(s[3]=o=>Y()),class:"btn btn-primary btn-ghost text-primary"},n(t.$t("resourcePage.closeButtonText")),1)])])])):h("",!0),c.value.length>1?(l(),a("button",{key:3,onClick:s[4]||(s[4]=o=>Ae()),class:"i4u-card group col-span-12 flex cursor-pointer items-center gap-4 border border-transparent bg-neutral-50 duration-200 ease-in-out hover:border-neutral-300 hover:shadow-md md:col-span-6 lg:col-span-4 lg:row-span-1"},[It,e("p",Ut,n(t.$t("extraKeys.orgResourcesUploadFile")),1)])):(l(),a("button",At,[Et,e("p",jt,n(t.$t("extraKeys.orgResourcesUploadFile")),1)])),c.value.length==1&&!P.value&&D(f).returnFoldersAndFiles.filter(o=>o.mimeType==="folder").length===0?(l(),a("button",{key:5,onClick:He,class:"i4u-card group col-span-24 flex items-center gap-4 border border-transparent bg-neutral-300 hover:bg-neutral-400 text-neutral-1000 duration-200 ease-in-out md:col-span-6 lg:col-span-4 lg:row-span-1 cursor-pointer"},[Kt,O(" Contact administrator to request folder creation for file uploads ")])):h("",!0),c.value.length>1?(l(),a("button",{key:6,onClick:s[5]||(s[5]=o=>Ve()),class:"i4u-card group col-span-12 flex cursor-pointer items-center gap-4 border border-transparent bg-neutral-50 duration-200 ease-in-out hover:border-neutral-300 hover:shadow-md md:col-span-6 lg:col-span-4 lg:row-span-1"},[St,e("p",Bt,n(t.$t("resourcePage.addLinkText")),1)])):(l(),a("button",Pt,[Vt,e("p",Dt,n(t.$t("resourcePage.addLinkText")),1)]))]),e("p",Lt,[e("span",Ht,n(t.$t("resourcePage.addedResourcesText")),1)]),e("div",Zt,[e("ul",null,[(l(!0),a(k,null,x(c.value,(o,i)=>(l(),a("li",{key:i},[i===c.value.length-1?(l(),a("span",Nt,n(o.name),1)):(l(),a("a",{key:1,onClick:tt(u=>Fe(o.folder_id),["prevent"])},n(o.name),9,Rt))]))),128))])]),B.value!=0?(l(),a("div",Ot,[e("div",zt,[e("button",{type:"button",class:"btn",disabled:_.value===1,onClick:s[6]||(s[6]=o=>R(_.value-1))},Jt,8,Gt),(l(!0),a(k,null,x(B.value,o=>(l(),a("button",{type:"button",key:o,class:ot(["btn",{"btn-primary":_.value===o}]),onClick:i=>R(o)},n(o),11,Wt))),128)),e("button",{type:"button",class:"btn",disabled:_.value===B.value||B.value===0,onClick:s[7]||(s[7]=o=>R(_.value+1))},Xt,8,Yt)])])):h("",!0),e("div",eo,[(l(!0),a(k,null,x(Le.value,(o,i)=>(l(),a("div",{class:"i4u-list-card flex flex-row justify-between bg-white",key:i},[e("div",to,[o.mimeType==="folder"?(l(),a("svg",oo,no)):o.mimeType==="link"?(l(),a("svg",lo,ro)):(l(),a("svg",i
1o,uo)),o.mimeType=="folder"?(l(),a("p",{key:3,onClick:u=>Ue(o),class:"cursor-pointer"},n(o.name),9,po)):h("",!0),o.mimeType=="link"?(l(),a("a",{key:4,href:o.url,target:"_blank",class:"cursor-pointer"},[e("p",null,n(o.filename),1)],8,ho)):(l(),a("a",{key:5,href:o.url,target:"_blank",class:"cursor-pointer"},[e("p",null,n(o.filename),1)],8,vo))]),o.mimeType=="folder"?(l(),a("div",mo,[P.value==!0?(l(),a("div",go,_o)):h("",!0),e("ul",wo,[e("li",{onClick:u=>Ie(o),class:"cursor-pointer p-3 hover:bg-blue-200"}," Rename Folder ",8,yo),e("li",{onClick:u=>xe(o._id,D(p)),class:"cursor-pointer p-3 hover:bg-blue-200"}," Delete folder ",8,fo)])])):o.mimeType=="link"?(l(),a("div",ko,[xo,e("ul",Fo,[e("li",{class:"cursor-pointer p-3 hover:bg-blue-200",onClick:u=>W(o)},n(t.$t("extraKeys.openFile")),9,Co)])])):(l(),a("div",$o,[Mo,e("ul",To,[e("li",{class:"cursor-pointer p-3 hover:bg-blue-200",onClick:u=>W(o)},n(t.$t("extraKeys.openFile")),9,Io)])]))]))),128))])]),e("dialog",Uo,[e("div",Ao,[Eo,e("h3",jo,n(t.$t("extraKeys.editFolder")),1),e("label",Ko,[e("div",So,[e("span",Bo,n(t.$t("ecoHomePage.ecoName")),1)]),g(e("input",{type:"text",placeholder:"Update folder name",class:"input input-bordered mb-3 w-full border-neutral-300","onUpdate:modelValue":s[8]||(s[8]=o=>b.value=o)},null,8,Po),[[w,b.value]])]),e("div",Vo,[e("button",{class:"btn btn-primary text-white",onClick:s[9]||(s[9]=o=>ee())},n(t.$t("extraKeys.updateFolder")),1),e("button",{onClick:X,class:"btn btn-primary btn-ghost text-primary"},n(t.$t("extraKeys.ecoMessagesClose")),1)])])]),e("dialog",Do,[e("div",Lo,[Ho,e("h3",Zo,n(t.$t("extraKeys.editFolder")),1),e("label",No,[e("div",Ro,[e("span",Oo,n(t.$t("ecoHomePage.ecoName")),1)]),g(e("input",{type:"text",placeholder:t.$t("extraKeys.updateFolderName"),class:"input input-bordered mb-3 w-full border-neutral-300","onUpdate:modelValue":s[10]||(s[10]=o=>b.value=o)},null,8,zo),[[w,b.value]])]),e("div",Go,[e("button",{class:"btn btn-primary text-white",onClick:s[11]||(s[11]=o=>ee())},n(t.$t("extraKeys.updateFile")),1),e("button",{onClick:X,class:"btn btn-primary btn-ghost text-primary"},n(t.$t("extraKeys.ecoMessagesClose")),1)])])]),g(e("input",{type:"checkbox",id:"selectFilesModal","onUpdate:modelValue":s[12]||(s[12]=o=>U.value=o),class:"modal-toggle"},null,512),[[et,U.value]]),e("div",qo,[e("div",Jo,[e("button",{onClick:Ke,class:"btn btn-primary font-Inter mb-3 rounded-none normal-case text-white"},n(t.$t("extraKeys.selectFiles")),1),e("input",{class:"hidden",type:"file",ref_key:"filePicker",ref:G,multiple:"multiple",onChange:Se},null,544),e("div",null,[e("p",Wo,n(t.$t("extraKeys.selectedFiles")),1),m.value&&m.value.length>0?(l(),a("div",Yo,[e("div",Qo,n(t.$t("extraKeys.name"))+":",1),e("div",Xo,n(t.$t("extraKeys.remove"))+":",1)])):h("",!0),(l(!0),a(k,null,x(m.value,(o,i)=>(l(),a("div",{class:"mt-2 flex flex-row flex-wrap justify-between",key:i},[e("div",es,[g(e("input",{"onUpdate:modelValue":u=>o.name=u,type:"text",class:"input bg-neutral mr-2"},null,8,ts),[[w,o.name]]),O("."+n(o.name_file_type),1)]),e("div",os,[e("button",{onClick:u=>$e(i)},ls,8,ss)])]))),128)),e("div",as,[m.value.length!=0?(l(),a("button",{key:0,disabled:q.value,class:"btn btn-success font-Inter mb-3 mt-3 rounded-none normal-case text-white",onClick:Ce},n(t.$t("extraKeys.upload")),9,rs)):h("",!0),e("button",{class:"btn btn-primary mb-3 mt-3 rounded-none text-white",onClick:s[13]||(s[13]=o=>Z())},n(t.$t("extraKeys.ecoMessagesClose")),1)])])])]),N.value?(l(),a("div",is,[e("div",ds,[cs,e("h3",us,n(t.$t("resourcePage.addLinkText")),1),e("label",ps,[e("div",hs,[e("span",vs,n(t.$t("extraKeys.nameOfLink")),1)]),g(e("input",{type:"text",placeholder:"name of link",class:"input input-bordered w-full border-neutral-300","onUpdate:modelValue":s[14]||(s[14]=o=>j.value=o)},null,512),[[w,j.value]])]),e("label",ms,[e("div",gs,[e("span",bs,n(t.$t("extraKeys.urlToLink")),1)]),g(e("input",{type:"text",placeholder:"url to link",class:"input input-bordered w-full border-neutral-300","onUpdate:modelValue":s[15]||(s[15]=o=>K.value=o)},null,512),[[w,K.value]])]),e("label",_s,[e("div",ws,[e("span",ys,n(t.$t("extraKeys.linkDescription")),1)]),g(e("textarea",{placeholder:"Link Description",class:"textarea textarea-bordered w-full border-neutral-300","onUpdate:modelValue":s[16]||(s[16]=o=>S.value=o)},null,512),[[w,S.value]])]),e("div",fs,[e("button",{onClick:s[17]||(s[17]=o=>De()),class:"btn btn-primary text-white"},n(t.$t("extraKeys.addLink")),1),e("button",{onClick:s[18]||(s[18]=o=>le()),class:"btn btn-primary btn-ghost text-primary"},n(t.$t("extraKeys.ecoMessagesClose")),1)])])])):h("",!0),te.value?(l(),a("div",ks,[e("div",xs,[Fs,e("h3",Cs,n(t.$t("extraKeys.moveFile")),1),e("section",null,[e("p",$s,n(oe.value.filename),1)]),e("p",null,n(t.$t("extraKeys.selectFolder")),1),(l(!0),a(k,null,x(Ee.value,o=>(l(),a("div",{key:o._id,class:"flex items-center p-2"},[g(e("input",{type:"radio",id:o._id,value:o._id,"onUpdate:modelValue":s[19]||(s[19]=i=>$.value=i),class:"radio radio-primary mr-2"},null,8,Ms),[[st,$.value]]),e("label",{for:o._id,class:"cursor-pointer"},n(o.name),9,Ts)]))),128)),e("div",Is,[e("button",{onClick:s[20]||(s[20]=o=>je(oe.value._id,$.value)),class:"btn btn-primary text-white"},n(t.$t("extraKeys.moveFile")),1),e("button",{onClick:s[21]||(s[21]=o=>se()),class:"btn btn-primary btn-ghost text-primary"},n(t.$t("extraKeys.ecoMessagesClose")),1)])])])):h("",!0),ne.value?(l(),a("div",Us,[e("div",As,[Es,e("h3",js,n(t.$t("extraKeys.shareRemoveFileInEcosystem")),1),e("section",null,[e("p",Ks,n(E.value.filename),1)]),e("p",Ss,n(t.$t("extraKeys.selectEcosystemToShareUnshareTo")),1),(l(!0),a(k,null,x(t.ecosystemsUserArePartOf,o=>(l(),a("div",{class:"form-control",key:o.ecosystemId},[e("label",Bs,[e("span",Ps,n(o.name),1),e("input",{type:"checkbox",id:`eco-${o.ec
1osystemId}`,value:o.ecosystemId,onChange:i=>Pe(i,o,E.value._id,E.value),checked:fe(o,E.value.ecosystemShared),ref_for:!0,ref:"checkboxes",class:"checkbox checkbox-primary checkbox-sm"},null,40,Vs)])]))),128)),e("div",Ds,[e("button",{onClick:s[22]||(s[22]=o=>Be()),class:"btn btn-primary btn-ghost text-primary"},n(t.$t("extraKeys.ecoMessagesClose")),1)])])])):h("",!0)])}}};export{qs as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.