1import{j as e,q as oe,z as ne,r as s,a as le,s as ie,m as de,d as O}from"./index-CeBiOOBC.js";const ce=()=>e.jsx("svg",{className:"w-6 h-6 text-app-icon w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})}),xe=()=>e.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.5L13.196 5.232z"})}),ue=()=>e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:e.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})}),me=()=>e.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:e.jsx("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"})}),he=()=>e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})}),be=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})}),ge=({open:d,onDelete:m,onClose:h,loading:k})=>d?oe.createPortal(e.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/40 dark:bg-black/55 backdrop-blur-sm z-[999999999]",children:e.jsxs("div",{className:"bg-white dark:bg-[#15113A] rounded-[14px] shadow-[0_4px_16px_rgba(11,18,32,0.12)] dark:shadow-[0_4px_24px_rgba(0,0,0,0.55)] p-6 w-80 text-center border border-[#D2D8E0] dark:border-[rgba(244,240,255,0.10)]",onMouseDown:n=>n.stopPropagation(),children:[e.jsx("div",{className:"w-10 h-10 bg-[#FEF2F2] dark:bg-[rgba(196,85,75,0.12)] rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx("svg",{className:"w-5 h-5 text-[#B45444] dark:text-[#C4554B]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}),e.jsx("h2",{className:"text-[15px] font-semibold text-[#0B1220] dark:text-[#F2EEFB] mb-1",style:{fontFamily:"var(--font-display)"},children:"Delete folder?"}),e.jsxs("p",{className:"text-[13px] text-[#6A7689] dark:text-[#8E86AE] mb-5 leading-relaxed",children:["Items in this folder will be moved to ",e.jsx("span",{className:"font-medium text-[#2E3949] dark:text-[#B7AED5]",children:"My Stuff"}),"."]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:n=>{n.stopPropagation(),h()},className:"flex-1 h-9 bg-[#F4F3F8] dark:bg-[#1C1848] text-[#6A7689] dark:text-[#8E86AE] font-semibold rounded-full text-[13px] hover:bg-[#E5E9EF] dark:hover:bg-[#232057] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:n=>{n.stopPropagation(),m()},className:"flex-1 h-9 bg-[#B45444] dark:bg-[#C4554B] text-white font-semibold rounded-full text-[13px] hover:bg-[#9E3D36] dark:hover:bg-[#A84039] transition-colors flex justify-center items-center",children:k?e.jsx(ne,{className:"animate-spin",size:15}):"Delete"})]})]})}),document.body):null;function pe({onClose:d,className:m,onSelect:h,showTitle:k=!0,folderId:n,onChange:V,folderIds:N,selectedFolders:c,setSelectedFolders:fe,multiMeetinSelect:ke,handlefolderselect:R,defaultFolderList:y,onReturnEffect:T,isFromSidebar:A=!1}){const[l,D]=s.useState(""),[W,q]=s.useState(""),[K,b]=s.useState(null),[S,g]=s.useState(""),[Y,L]=s.useState(!1),{folders:v,getFolder:x,createFolder:G,EditFolder:J,DeleteFolder:Q}=le(),[M,E]=s.useState(!1),[j,_]=s.useState(""),[U,z]=s.useState(!1),[P,X]=s.useState(),[p,I]=s.useState(!1),[Z,ee]=s.useState(!1),{id:te}=ie(),re=de();s.useEffect(()=>{x()},[x]);const w=s.useRef(null),H=Array.isArray(v)?v.filter(t=>t?.name?.toLowerCase().includes(l.trim().toLowerCase())):[],$=l.trim().toLowerCase(),F=$.length>0&&!H.some(t=>t?.name?.toLowerCase()===$);s.useEffect(()=>{function t(r){w.current&&!w.current.contains(r.target)&&d()}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]),s.useEffect(()=>{const t=y?.some(r=>!c?.some(o=>o?.id===r?.id));ee(y?.length!==c?.length||t)},[c]);const C=async t=>{const r=t.trim();if(!r)return;I(!0);let o=await G({name:r});I(!1);let i=o?.id,f=o?.foldername;h?.(i,f),D(""),q(r),x()},se=async t=>{const r=S.trim();if(!r)return;const o=v.find(i=>i.id===t);if(o){if(o.name.trim()===r){b(null),g("");return}try{await J(t,{name:r}),V?.(t,r),O.success("Folder updated"),await x()}catch(i){let f=i?.response?.data?.message;O.error(f)}finally{b(null),g("")}}},ae=async()=>
1{if(j)try{z(!0),await Q(j),te==j&&re("/home"),await x()}catch(t){console.error("Delete failed",t)}finally{E(!1),_(""),z(!1)}};return s.useEffect(()=>()=>{T?.()},[]),e.jsxs("div",{className:m||"fixed inset-0 z-[999999] flex items-center justify-center bg-black/40 dark:bg-black/55 backdrop-blur-sm",children:[M&&e.jsx(ge,{open:M,loading:U,onDelete:ae,onClose:()=>E(!1)}),e.jsxs("div",{ref:w,className:"bg-white dark:bg-[#15113A] rounded-2xl p-5 w-full max-w-sm shadow-[0_8px_32px_rgba(11,18,32,0.16)] dark:shadow-[0_8px_40px_rgba(0,0,0,0.6)] border border-[#E5E9EF] dark:border-[rgba(244,240,255,0.10)] z-[99999]",children:[k&&e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-[15px] font-semibold text-[#0B1220] dark:text-[#F2EEFB]",style:{fontFamily:"var(--font-display)"},children:"Move to folder"}),e.jsx("button",{onClick:d,className:"w-7 h-7 bg-[#F4F3F8] dark:bg-[#1C1848] hover:bg-[#E5E9EF] dark:hover:bg-[#232057] rounded-full flex items-center justify-center text-[#6A7689] dark:text-[#8E86AE] transition-colors",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2.5",children:e.jsx("path",{strokeLinecap:"round",d:"M18 6L6 18M6 6l12 12"})})})]}),e.jsxs("div",{className:"relative mb-4 w-full",children:[e.jsxs("div",{className:"relative w-full",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#B4BDCB] dark:text-[#6A6390] pointer-events-none",children:e.jsx(he,{})}),e.jsx("input",{type:"text",className:"w-full pl-9 pr-10 py-2.5 bg-[#F4F3F8] dark:bg-[#100C30] border border-[#E5E9EF] dark:border-[rgba(244,240,255,0.12)] rounded-xl text-[13px] text-[#0B1220] dark:text-[#F2EEFB] placeholder-[#B4BDCB] dark:placeholder-[#6A6390] outline-none focus:ring-2 focus:ring-[#EAE5FE] dark:focus:ring-[rgba(116,100,220,0.16)] focus:border-[#A89FE0] dark:focus:border-[#BCB1F0] transition-colors",placeholder:"Search or create folder...",value:l,disabled:p,maxLength:30,onChange:t=>{const r=t.target.value;X(r.length>30),D(t.target.value)},onKeyDown:t=>{t.key==="Enter"&&F&&(t.preventDefault(),C(l))}}),F&&e.jsx("button",{disabled:p,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 bg-[#0B1220] dark:bg-[#F2EEFB] text-white dark:text-[#0C0826] rounded-full hover:bg-[#2E3949] dark:hover:bg-[#FAF8FF] transition-all active:scale-90",onMouseDown:t=>t.preventDefault(),onClick:()=>C(l),children:e.jsx(be,{})})]}),P&&e.jsx("p",{className:"text-[11px] text-[#B45444] dark:text-[#E07B6A] mt-1 pl-1",children:"Folder name must be 30 characters or fewer"})]}),e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.1em] text-[#B4BDCB] dark:text-[#6A6390] mb-2 px-1",children:"Your Folders"}),e.jsxs("div",{className:"space-y-0.5 overflow-y-auto max-h-[220px] scrollbar-hide mb-4",children:[H.map(t=>{const r=W===t.id||N?.includes(t.id),o=K===t.id,i=t?.isDefault,u=n===t.id||N?.includes(t.id)||r,B=t?.meetingCount??t?.count;return e.jsx("div",{onClick:()=>{c?.length===1&&c?.find(a=>a.id===t.id)||h?.(t.id,t.name)},className:`group/row w-full flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-150 cursor-pointer 2 ${u?"bg-[#EAE5FE] dark:bg-[rgba(116,100,220,0.16)]":"hover:bg-[#F4F3F8] dark:hover:bg-[#1C1848]"} 3 ${o?"bg-[#EAE5FE] dark:bg-[rgba(116,100,220,0.16)]":""} 4 `,children:o?e.jsxs("div",{className:"flex items-center w-full gap-2",children:[e.jsx("input",{className:"flex-1 bg-white dark:bg-[#15113A] rounded-lg px-2 py-1 text-[13px] font-medium border border-[#A89FE0] dark:border-[rgba(116,100,220,0.24)] text-[#0B1220] dark:text-[#F2EEFB] outline-none focus:ring-1 focus:ring-[#EAE5FE] dark:focus:ring-[rgba(116,100,220,0.16)]",type:"text",maxLength:30,value:S,onChange:a=>g(a.target.value),autoFocus:!0,onClick:a=>a.stopPropagation()}),e.jsx("button",{disabled:Y,className:"p-1 text-[#16A26C] dark:text-[#34D399] hover:scale-110 transition-transform shrink-0",onClick:async a=>{a.stopPropagation(),L(!0),await se(t.id),L(!1)},children:e.jsx(ue,{})}),e.jsx("button",{className:"p-1 text-[#6A7689] dark:text-[#8E86AE] hover:scale-110 transition-transform shrink-0",onClick:a=>{a.stopPropagation(),b(null)},children:e.jsx(ce,{})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:`text-[13px] font-semibold truncate ${u?"text-[#2D2580] dark:text-[#BCB1F0]":"text-[#0B1220] dark:text-[#F2EEFB] group-hover/row:text-[#2D2580] dark:group-hover/row:text-[#BCB1F0]"}`,children:t.name.length>22?t.name.slice(0,22)+"â¦":t.name}),B!=null&&e.jsxs("p",{className:"text-[11px] text-[#B4BDCB] dark:text-[#6A6390] mt-0.5",children:[B," ",B===1?"item":"items"]})]}),t.name?.toLowerCase()!=="my stuff"&&i===!1&&!u&&e.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/row:opacity-100 transition-opacity shrink-0",children:[e.jsx("button",{className:"p-1 text-[#6A7689] dark:text-[#8E86AE] hover:text-[#2D2580] dark:hover:text-[#BCB1F0] rounded-full hover:bg-white dark:hover:bg-[#15113A] transition-colors",onClick:a=>{a.stopPropagation(),b(t.id),g(t.name)},children:e.jsx(xe,{})}),e.jsx("button",{className:"p-1 text-[#6A7689] dark:text-[#8E86AE] hover:text-[#B45444] dark:hover:text-[#E07B6A] rounded-full hover:bg-white dark:hover:bg-[#15113A] transition-colors",onClick:a=>{a.stopPropagation(),_(t.id),E(!0)},children:e.jsx(me,{})})]}),!A&&e.jsx("div",{className:`shrink-0 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-all duration-150 ${u?"border-[#2D2580] dark:border-[#BCB1F0] bg-[#2D2580] dark:bg-[#BCB1F0]":"border-[#D2D8E0] dark:border-[rgba(244,240,255,0.2)]"}`,children:u&&e.jsx("div",{className:"w-2 h-2 bg-white rounded-full"})})]})},t.id)}),F&&e.jsxs("button",{onClick:()=>C(l),disabled:P,className:"w-full flex items-center px-3 py-2.5 rounded-xl text-[#2D2580] dark:text-[#BCB1F0] text-[13px] font-medium hover:bg-[#
4EAE5FE] dark:hover:bg-[rgba(116,100,220,0.16)] transition-all border border-dashed border-[#A89FE0] dark:border-[rgba(116,100,220,0.24)] mt-1 disabled:opacity-40",children:[!p&&e.jsx("svg",{className:"w-3.5 h-3.5 mr-2 shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})}),e.jsx("span",{className:"truncate",children:p?"Creating folderâ¦":`Create "${l.trim()}"`})]})]}),!A&&e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:d,className:"flex-1 py-2.5 rounded-full text-[13px] font-semibold text-[#0B1220] dark:text-[#F2EEFB] border border-[#D2D8E0] dark:border-[rgba(244,240,255,0.18)] hover:bg-[#F4F3F8] dark:hover:bg-[#1C1848] transition-colors",children:"Cancel"}),e.jsx("button",{onClick:R,disabled:!Z,className:"flex-1 py-2.5 rounded-full text-[13px] font-semibold text-white bg-[#0B1220] dark:bg-[#F2EEFB] dark:text-[#0C0826] hover:bg-[#2E3949] dark:hover:bg-[#FAF8FF] transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:"Move"})]})]})]})}const Ee=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"}));export{ce as C,me as D,xe as E,ue as S,ge as a,pe as b,Ee as c};
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.