1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,310373,645182,e=>{"use strict";var t=e.i(843476),a=e.i(500932),n=e.i(244002);let i=["linear-gradient(135deg,#e87a9d,#946bcc)","linear-gradient(145deg,#f7c65c,#e7a131)","linear-gradient(145deg,#42a2f1,#086bd5)","linear-gradient(145deg,#1e9b90,#07766d)","linear-gradient(145deg,#f87971,#dd4049)","linear-gradient(145deg,#6cb476,#337c44)","linear-gradient(145deg,#495254,#242d30)"];function s(e,t){return t&&"linear-gradient(135deg, #6366F1, #8B5CF6)"!==t?t:i[(0,n.hashKey)(e)%i.length]}function l(e){let i,l,r,o,c,d,p=(0,a.c)(17),{id:u,face:m,className:h,children:f,style:y}=e;p[0]!==u?(i=(0,n.sealForKey)(u),p[0]=u,p[1]=i):i=p[1];let g=i,x=`appLogo ${void 0===h?"":h}`;return p[2]!==x?(l=x.trim(),p[2]=x,p[3]=l):l=p[3],p[4]!==m||p[5]!==u?(r=m??s(u),p[4]=m,p[5]=u,p[6]=r):r=p[6],p[7]!==y||p[8]!==r?(o={background:r,...y},p[7]=y,p[8]=r,p[9]=o):o=p[9],p[10]!==f||p[11]!==g?(c=f??(0,t.jsx)(n.SealGlyph,{glyph:g.glyph,className:"appLogoGlyph"}),p[10]=f,p[11]=g,p[12]=c):c=p[12],p[13]!==l||p[14]!==o||p[15]!==c?(d=(0,t.jsx)("span",{className:l,"aria-hidden":"true",style:o,children:c}),p[13]=l,p[14]=o,p[15]=c,p[16]=d):d=p[16],d}e.s(["AppLogo",0,l,"appFace",0,s],310373);var r=e.i(271645),o=e.i(964053);e.i(785269);var c=e.i(322831);e.s(["AppInfoDialog",0,function({app:e,installed:a,color:i,returnFocus:d,onApplyColor:p,onOpen:u,onInstall:m,onUninstall:h,onClose:f}){let{t:y}=(0,c.useTranslation)("paletteOs"),[g,x]=(0,r.useState)(a),[v,b]=(0,r.useState)(!1),j=(0,r.useRef)(!1),w=(0,r.useRef)(!1),[C,S]=(0,r.useState)(!1),[N,k]=(0,r.useState)(""),[_,T]=(0,r.useState)(i??null),[D,I]=(0,r.useState)(i??null),[E,F]=(0,r.useState)(!1),A=_?.ac!==D?.ac||_?.af!==D?.af;(0,r.useEffect)(()=>{j.current||x(a)},[a]);let L=()=>{j.current||f()},R=async e=>{let t=e?h:m;if(t&&!j.current){j.current=!0,b(!0),k("");try{if(!await t())throw Error("App installation action failed");x(!e),S(!1)}catch{k(y(e?"appInfo.removeError":"appInfo.installError"))}finally{j.current=!1,b(!1)}}},z=e=>{T(e),F(!1)};return(0,t.jsx)(o.Dialog.Root,{open:!0,onOpenChange:e=>{e||L()},children:(0,t.jsx)(o.Dialog.Portal,{children:(0,t.jsxs)("div",{"data-theme":"palette-os",style:{display:"contents"},children:[(0,t.jsx)(o.Dialog.Overlay,{className:"ssSearchBd"}),(0,t.jsxs)(o.Dialog.Content,{className:"ssSearchDlg ssDlg ssAppInfo",onEscapeKeyDown:e=>{j.current&&e.preventDefault()},onPointerDownOutside:e=>{j.current&&e.preventDefault()},onCloseAutoFocus:e=>{e.preventDefault(),!w.current&&d?.isConnected&&d.focus()},children:[(0,t.jsxs)("div",{className:"ssSearchHead",children:[(0,t.jsx)(o.Dialog.Title,{asChild:!0,children:(0,t.jsx)("h2",{children:y("appInfo.title")})}),(0,t.jsx)("button",{type:"button",className:"ssSearchClose",disabled:v,onClick:L,"aria-label":y("shell.close"),children:(0,t.jsx)(n.Glyph,{name:"h_close"})})]}),(0,t.jsxs)("div",{className:"ssSearchBody ssDlgBody",children:[(0,t.jsxs)("div",{className:"storeDetailIdentity",children:[(0,t.jsx)(l,{id:e.id,face:s(e.id,_?.ac??e.gradient?.bg),style:{color:_?.af??"var(--white)"}}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{children:e.name}),(0,t.jsx)("p",{children:[e.developer,e.category].filter(Boolean).join(" · ")})]})]}),(0,t.jsx)(o.Dialog.Description,{className:"storeDetailDescription",children:e.description||e.tagline}),(0,t.jsxs)("div",{className:"storeDetailStatus",role:"status",children:[(0,t.jsx)(n.Glyph,{name:g?"h_check":"h_plus"}),y(g?"appInfo.added":"appInfo.available")]}),(e.version||!!e.permissions?.length)&&(0,t.jsxs)("details",{className:"storeDetailExtra",children:[(0,t.jsx)("summary",{children:y("appInfo.details")}),e.version&&(0,t.jsxs)("p",{children:[y("appDrawer.version"),": ",e.version]}),!!e.permissions?.length&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{children:y("appDrawer.permissions")}),(0,t.jsx)("ul",{children:e.permissions.map(e=>(0,t.jsx)("li",{children:e},e))})]})]}),p&&(0,t.jsxs)("details",{className:"storeDetailExtra",children:[(0,t.jsx)("summary",{children:y("appInfo.appearance")}),(0,t.jsxs)("div",{className:"storeColorPairs",role:"group","aria-label":y("appDrawer.pair"),children:[(0,t.jsx)("button",{type:"button",className:"cfBtn","aria-pressed":null===_,onClick:()=>z(null),children:y("appInfo.defaultColor")}),n.COLORWAYS.flatMap(e=>e.pairs.map(([a,i])=>(0,t.jsx)("button",{type:"button",className:"storeColorPair","aria-label":`${e.name}: ${a} / ${i}`,"aria-pressed":_?.ac===a&&_?.af===i,style:{background:a,color:i},onClick:()=>z({ac:a,af:i}),children:(0,t.jsx)(n.Glyph,{name:"h_grid"})},`${e.id}-${a}-${i}`)))]}),(0,t.jsxs)("div",{className:"storeColorFields",children:[(0,t.jsxs)("label",{children:[y("appDrawer.backgroundHex"),(0,t.jsx)("input",{type:"color",value:_?.ac??"#0e1620",onChange:e=>z({ac:e.target.value,af:_?.af??"#ffffff"})})]}),(0,t.jsxs)("label",{children:[y("appDrawer.foregroundHex"),(0,t.jsx)("input",{type:"color",value:_?.af??"#ffffff",onChange:e=>z({ac:_?.ac??"#0e1620",af:e.target.value})})]})]}),(0,t.jsxs)("div",{className:"ssDlgActions",children:[(0,t.jsx)("button",{type:"button",className:"cfBtn",disabled:!A,onClick:()=>z(D),children:y("appDrawer.reset")}),(0,t.jsx)("button",{type:"button",className:"cfBtn",disabled:!A,onClick:()=>{k("");try{p?.(_),I(_),F(!0)}catch{k(y("appInfo.appearanceError"))}},children:y("appInfo.saveAppearance")})]}),E&&(0,t.jsx)("p",{role:"status",children:y("appDrawer.saved")})]}),C&&(0,t.jsx)("p",{className:"storeDetailNotice",children:y("appInfo.removeNote",{name:e.name})}),N&&(0,t.jsx)("p",{className:"storeDetailError",role:"alert",children:N}),(0,t.jsx)("div",{className:"ssDlgActions","aria-busy":v,children:C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"cfBtn",disabled:v,onClick:()=>{S(!1),k("")},children:y("shell.cancel")}),(0,t.jsx)("button",{type:"button",className:"cfBtn cfDanger",disabled:v,onClick:()=>
1void R(!0),children:y(v?"appInfo.removing":"appInfo.remove")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"cfBtn",disabled:v,onClick:L,children:y("shell.close")}),g&&h&&(0,t.jsx)("button",{type:"button",className:"cfBtn",disabled:v,onClick:()=>{S(!0),k("")},children:y("appInfo.remove")}),g?(0,t.jsx)("button",{type:"button",className:"cfBtn cfPrimary",disabled:v,onClick:()=>{w.current=!0,L(),u()},children:y("appInfo.open")}):m&&(0,t.jsx)("button",{type:"button",className:"cfBtn cfPrimary",disabled:v,onClick:()=>void R(!1),children:y(v?"appInfo.installing":"appInfo.add")})]})})]})]})]})})})}],645182)},713967,216606,e=>{"use strict";var t=e.i(843476),a=e.i(500932),n=e.i(244002),i=e.i(271645);e.i(785269);var s=e.i(322831),l=e.i(174080),r=e.i(562436),o=e.i(770633),c=e.i(96213),d=e.i(549127),p=e.i(569377);let u={red:"#e5484d",orange:"#f76b15",yellow:"#ffc53d",green:"#30a46c",blue:"#0091ff",purple:"#8e4ec6",gray:"#8d8d86"};function m({sections:e,head:l,sub:o,x:c,y:d,flipFrom:p,onCloseSelf:h,onCloseAll:f,tagRow:y,className:g=""}){let{t:x}=(0,s.useTranslation)("paletteOs"),[v,b]=function(e,t,n){let s,l,r,o,c=(0,a.c)(10),d=(0,i.useRef)(null);c[0]!==e||c[1]!==t?(s={left:e,top:t},c[0]=e,c[1]=t,c[2]=s):s=c[2];let[p,u]=(0,i.useState)(s);return c[3]!==n||c[4]!==e||c[5]!==t?(l=()=>{let a=d.current;if(!a)return;let i=a.getBoundingClientRect();u({left:void 0!==n&&e+i.width>window.innerWidth-8?Math.max(8,n-i.width):Math.max(8,Math.min(e,window.innerWidth-i.width-8)),top:Math.max(8,Math.min(t,window.innerHeight-i.height-8))})},r=[e,t,n],c[3]=n,c[4]=e,c[5]=t,c[6]=l,c[7]=r):(l=c[6],r=c[7]),(0,i.useLayoutEffect)(l,r),c[8]!==p?(o=[d,p],c[8]=p,c[9]=o):o=c[9],o}(c,d,p),j=(0,i.useMemo)(()=>e.flat(),[e]),[w,C]=(0,i.useState)(()=>j.findIndex(e=>!e.disabled)),[S,N]=(0,i.useState)(null),k=(0,i.useRef)([]),_=(0,i.useRef)(void 0),T=(0,i.useRef)({buf:"",at:0}),D=(0,i.useCallback)(e=>{C(e),k.current[e]?.focus()},[]);(0,i.useLayoutEffect)(()=>{let e=j.findIndex(e=>!e.disabled);e>=0&&k.current[e]?.focus()},[j]),(0,i.useEffect)(()=>()=>window.clearTimeout(_.current),[]);let I=(e,t)=>{for(let a=1;a<=j.length;a++){let n=(e+t*a+j.length*a)%j.length;if(!j[n]?.disabled)return n}return e},E=(0,i.useCallback)((e,t)=>{let a=t.getBoundingClientRect();N({at:e,x:a.right-4,y:a.top-6,flipFrom:a.left+4})},[]),F=-1;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:v,role:"menu","aria-label":l??x("common.menu","Menu"),className:`poCtx${o?" poCtxSub":""} ${g}`,style:{left:b.left,top:b.top},onKeyDown:e=>{let t=j[w];if("ArrowDown"===e.key)e.preventDefault(),D(I(w,1));else if("ArrowUp"===e.key)e.preventDefault(),D(I(w,-1));else if("Home"===e.key)e.preventDefault(),D(I(-1,1));else if("End"===e.key)e.preventDefault(),D(I(0,-1));else if("ArrowRight"===e.key&&t?.submenu?.length){e.preventDefault();let t=k.current[w];t&&E(w,t)}else if("ArrowLeft"===e.key||"Escape"===e.key)e.preventDefault(),e.stopPropagation(),S?(N(null),D(S.at)):h();else if(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey){let t=Date.now();T.current.buf=t-T.current.at>500?e.key:T.current.buf+e.key,T.current.at=t;let a=T.current.buf.toLowerCase(),n=j.findIndex(e=>!e.disabled&&e.label.toLowerCase().startsWith(a));n>=0&&D(n)}},onContextMenu:e=>e.preventDefault(),children:[l&&(0,t.jsx)("div",{className:"poCtxHead","aria-hidden":!0,children:l}),(0,t.jsxs)("div",{className:"poCtxScroll",children:[e.map((e,a)=>(0,t.jsx)("div",{role:"group",className:"poCtxSec",children:e.map(e=>{let a=++F,i=!!e.submenu?.length;return(0,t.jsxs)("button",{ref:e=>{k.current[a]=e},role:void 0===e.checked?"menuitem":"menuitemcheckbox","aria-checked":e.checked,"aria-haspopup":i?"menu":void 0,"aria-expanded":i?S?.at===a:void 0,tabIndex:w===a?0:-1,disabled:e.disabled,className:`poCtxRow${e.danger?" danger":""}`,onFocus:()=>C(a),onMouseEnter:e=>{let t=e.currentTarget;window.clearTimeout(_.current),_.current=window.setTimeout(()=>i?E(a,t):N(null),180)},onMouseLeave:()=>window.clearTimeout(_.current),onClick:t=>{i?E(a,t.currentTarget):(f(),e.on?.())},children:[void 0!==e.checked&&(0,t.jsx)(n.Glyph,{name:"h_check",className:"poCtxTick"}),e.icon&&(0,t.jsx)(n.Glyph,{name:e.icon,className:"poCtxIcon"}),(0,t.jsx)("span",{className:"poCtxLbl",children:e.label}),e.hint&&(0,t.jsx)("span",{className:"poCtxHint",children:e.hint}),i&&(0,t.jsx)(n.Glyph,{name:"h_chevronRight",className:"poCtxArrow"})]},e.id??e.label)})},a)),y&&(0,t.jsx)("div",{className:"poCtxSec",children:(0,t.jsxs)("div",{className:"poCtxTags",children:[(0,t.jsx)("span",{className:"poCtxTagsLbl",children:x("drive.tags","Tags")}),r.TAG_COLORS.map(e=>{let a=y.tags.includes(e);return(0,t.jsx)("button",{title:x(`drive.tagColor.${e}`,e),className:`poCtxTag${a?" on":""}`,"aria-pressed":a,style:{background:u[e]},onClick:()=>{y.onSet(a?y.tags.filter(t=>t!==e):[...y.tags,e]),f()}},e)})]})})]})]}),S&&j[S.at]?.submenu&&(0,t.jsx)(m,{sections:[j[S.at].submenu],sub:!0,x:S.x,y:S.y,flipFrom:S.flipFrom,onCloseSelf:()=>{N(null),D(S.at)},onCloseAll:f})]})}function h(e){return e.length>0}e.s(["FileInspector",0,function({file:e,roomId:a,roomName:l,ops:m,canEdit:h,onChanged:f,onDeleted:y}){let{t:g}=(0,s.useTranslation)("paletteOs"),{openSession:x,openConfirm:v,closeDrawer:b}=(0,c.useViewContext)(),j=(0,o.useDataRoomAI)(),[w,C]=(0,i.useState)(e),[S,N]=(0,i.useState)(null),[k,_]=(0,i.useState)(""),[T,D]=(0,i.useState)(""),[I,E]=(0,i.useState)(!1),[F,A]=(0,i.useState)(null),[L,R]=(0,i.useState)(null),[z,P]=(0,i.useState)(!1),[B,O]=(0,i.useState)(null),[$,K]=(0,i.useState)(!1),[M,W]=(0,i.useState)(e.original_filename),G=(0,i.useRef)(!1);(0,i.useEffect)(()=>{let e=!0;return m.fetchComments(a,w.id).then(t=>{e&&N(t)}
1).catch(()=>{e&&N([])}),j.fetchSummary(a,w.id).then(t=>{e&&t?.summary&&R(t)}).catch(()=>{}),()=>{e=!1}},[a,w.id]);let H=(e,t)=>e?.status===422&&"string"==typeof e.detail?e.detail:t,U=async e=>{P(!0),O(null);try{R(await j.summarizeFile(a,w.id,e))}catch(e){O(H(e,g("drive.ai.summaryFailed","Summary failed. The file may not be indexed yet.")))}finally{P(!1)}},J=async()=>{E(!0),A(null);try{let e=await j.regenerateKeywords(a,w.id);V({...w,keywords:e})}catch(e){A(H(e,g("drive.ai.keywordsFailed","Keyword extraction failed.")))}finally{E(!1)}},V=e=>{C(e),f(e)},X=async e=>{if(h&&!G.current){G.current=!0;try{let t=w.tags.includes(e)?w.tags.filter(t=>t!==e):[...w.tags,e];await m.setFileTags(a,w.id,t),V({...w,tags:t})}finally{G.current=!1}}},Y=async()=>{let e=T.trim();if(!e||!h)return;let t=[...w.keywords,e];D(""),await m.setFileKeywords(a,w.id,t),V({...w,keywords:t})},q=async e=>{if(!h)return;let t=w.keywords.filter(t=>t!==e);await m.setFileKeywords(a,w.id,t),V({...w,keywords:t})},Q=async()=>{let e=M.trim();K(!1),e&&e!==w.original_filename&&(await m.renameFile(a,w.id,e),V({...w,original_filename:e}))},Z=async()=>{let e=k.trim();if(!e)return;_("");let t=await m.addComment(a,w.id,e);N(e=>[...e??[],t])},ee=w.mime_type.startsWith("image/"),et=w.mime_type.startsWith("video/"),ea=w.mime_type.startsWith("audio/"),en=!et&&!ea,ei=w.indexing;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"dTag",children:[(0,t.jsx)("span",{children:g("drive.inspector.tag","FILE · {{type}}",{type:(0,p.typeLabel)(w.mime_type,w.original_filename).toUpperCase()})}),(0,t.jsx)("span",{className:"idx",children:(0,d.fmtSize)(w.file_size)})]}),(0,t.jsxs)("div",{className:"dBody",children:[$?(0,t.jsx)("input",{className:"poInput",autoFocus:!0,value:M,onChange:e=>W(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Q(),"Escape"===e.key&&K(!1)},onBlur:()=>void Q()}):(0,t.jsx)("h3",{style:{cursor:h?"text":void 0},onDoubleClick:()=>h&&K(!0),children:w.original_filename}),(0,t.jsxs)("p",{style:{opacity:.6},children:[g("drive.inspector.modified","Modified {{time}}",{time:(0,d.relTime)(w.updated_at)}),w.uploaded_by_name?` \xb7 ${w.uploaded_by_name}`:""]}),ee&&w.file_url?(0,t.jsx)("img",{src:w.file_url,alt:w.original_filename,style:{marginTop:6,maxWidth:"100%",border:"1px solid var(--line)"}}):et&&w.file_url?(0,t.jsx)("video",{src:w.file_url,controls:!0,style:{marginTop:6,maxWidth:"100%",border:"1px solid var(--line)"}}):ea&&w.file_url?(0,t.jsx)("audio",{src:w.file_url,controls:!0,style:{marginTop:6,width:"100%"}}):(0,t.jsx)("div",{className:"drPrevBox",children:(0,t.jsx)(n.Glyph,{name:(0,p.glyphFor)(w.mime_type)})}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,marginTop:16,flexWrap:"wrap"},children:[(0,t.jsx)("button",{className:"po-btn",onClick:()=>{b(),x({newThread:!0,dataRoomContext:{kind:"file",roomId:a,roomName:l,targetId:w.id,targetName:w.original_filename,suggestions:[g("drive.ai.suggestSummarizeFile","Summarize {{name}}",{name:w.original_filename}),g("drive.ai.suggestNumbersFile","What are the important numbers or dates in {{name}}?",{name:w.original_filename}),g("drive.ai.suggestRisksFile","What risks, decisions, or action items are in {{name}}?",{name:w.original_filename})]}})},children:g("drive.inspector.askWithMemory","Ask with this memory â")}),(0,t.jsx)("button",{className:"po-btn po-btn--ghost",onClick:()=>m.downloadFile(a,w.id,w.original_filename),children:g("drive.inspector.download","Download â")}),h&&(0,t.jsx)("button",{className:"po-btn po-btn--ghost",onClick:async()=>{await m.duplicateFile(a,w.id)},children:g("drive.contextMenu.duplicate","Duplicate")})]}),(0,t.jsx)("div",{className:"dSectionLbl",children:g("drive.inspector.metadata","Metadata")}),(0,t.jsx)("div",{className:"po-metaGrid",children:[[g("drive.columns.type","Type"),w.mime_type],[g("drive.columns.size","Size"),(0,d.fmtSize)(w.file_size)],[g("drive.inspector.created","Created"),(0,d.relTime)(w.created_at)],[g("drive.inspector.comments","Comments"),String(w.comments_count)]].map(([e,a])=>(0,t.jsxs)("div",{className:"po-metaItem",children:[(0,t.jsx)("div",{className:"amk",children:e}),(0,t.jsx)("div",{className:"amv",style:{wordBreak:"break-all"},children:a})]},e))}),en&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"dSectionLbl",children:g("drive.inspector.aiSummary","AI summary")}
1),L?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{style:{fontSize:12.5,fontWeight:300,lineHeight:1.55,whiteSpace:"pre-wrap"},children:L.summary}),(0,t.jsx)("button",{className:"po-btn po-btn--ghost",style:{marginTop:8},disabled:z,onClick:()=>void U(!0),children:z?"â¦":g("drive.regenerate","Regenerate")})]}):(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)("span",{style:{fontSize:11,opacity:.5},children:z?g("drive.ai.summarising","Summarisingâ¦"):g("drive.inspector.noSummary","No summary yet")}),(0,t.jsx)("button",{className:"po-btn po-btn--ghost",style:{padding:"8px 14px",fontSize:9},disabled:z,onClick:()=>void U(!1),children:g("drive.inspector.generate","Generate")})]}),B&&(0,t.jsx)("span",{style:{fontSize:11.5,opacity:.7},children:B})]}),(0,t.jsx)("div",{className:"dSectionLbl",children:g("drive.inspector.agentRecall","Agent recall")}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",fontSize:11.5},children:[(0,t.jsx)("span",{className:"chip",children:ei?.status==="completed"?g("drive.inspector.indexed","Indexed · {{count}} chunks",{count:ei.chunk_count??0}):ei?.status==="failed"?g("drive.inspector.indexingFailed","Indexing failed"):ei?.status==="processing"||ei?.status==="pending"?g("drive.inspector.indexing","Indexingâ¦"):g("drive.inspector.notIndexed","Not indexed")}),ei?.status==="failed"&&h&&(0,t.jsx)("button",{className:"po-btn po-btn--ghost",style:{padding:"8px 14px",fontSize:9},onClick:async()=>{await m.retryFileIndexing(a,w.id)},children:g("drive.retry","Retry")})]}),(0,t.jsx)("div",{className:"dSectionLbl",children:g("drive.tags","Tags")}),(0,t.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:r.TAG_COLORS.map(e=>(0,t.jsx)("button",{className:`drTagDot${w.tags.includes(e)?" on":""}`,style:{"--tag":u[e]},title:g(`drive.tagColor.${e}`,e),disabled:!h,onClick:()=>void X(e)},e))}),(0,t.jsx)("div",{className:"dSectionLbl",children:g("drive.inspector.keywords","Keywords")}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[0===w.keywords.length&&(0,t.jsx)("span",{style:{fontSize:11,opacity:.5},children:g("drive.inspector.noKeywords","None yet")}),w.keywords.map(e=>(0,t.jsxs)("span",{className:"chip",children:[e,h&&(0,t.jsx)("button",{style:{border:0,background:"transparent",color:"currentColor",cursor:"pointer",opacity:.6},onClick:()=>void q(e),children:"Ã"})]},e))]}),h&&(0,t.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10},children:[(0,t.jsx)("input",{className:"poInput",value:T,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Y()},placeholder:g("drive.inspector.addKeywordPlaceholder","Add keyword + Enter")}),en&&(0,t.jsx)("button",{className:"po-btn po-btn--ghost",disabled:I,title:g("drive.inspector.regenKeywordsTitle","Re-extract keywords with AI"),onClick:()=>void J(),children:I?"â¦":g("drive.inspector.ai","AI")})]}),F&&(0,t.jsx)("span",{style:{fontSize:11.5,opacity:.7},children:F}),(0,t.jsx)("div",{className:"dSectionLbl",children:g("drive.inspector.comments","Comments")}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[null===S&&(0,t.jsx)("span",{style:{fontSize:11,opacity:.5},children:g("drive.loading","Loadingâ¦")}),S?.length===0&&(0,t.jsx)("span",{style:{fontSize:11,opacity:.5},children:g("drive.inspector.noComments","No comments")}),S?.map(e=>(0,t.jsxs)("div",{className:"drComment",children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[(0,t.jsx)("strong",{style:{fontSize:11},children:e.user_name??g("drive.inspector.unknownUser","Unknown")}),(0,t.jsx)("span",{style:{fontSize:9.5,opacity:.5},children:(0,d.relTime)(e.created_at)}),(0,t.jsx)("button",{style:{marginLeft:"auto",border:0,background:"transparent",color:"currentColor",cursor:"pointer",opacity:.45,fontSize:11},onClick:async()=>{await m.deleteComment(a,e.id),N(t=>(t??[]).filter(t=>t.id!==e.id))},children:"Ã"})]}),(0,t.jsx)("div",{style:{fontSize:12.5,lineHeight:1.5},children:e.content})]},e.id))]}),(0,t.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10},children:[(0,t.jsx)("input",{className:"poInput",value:k,onChange:e=>_(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Z()},placeholder:g("drive.inspector.commentPlaceholder","Write a commentâ¦")}),(0,t.jsx)("button",{className:"po-btn",disabled:!k.trim(),onClick:()=>void Z(),children:g("drive.inspector.post","Post")})]}),h&&(0,t.jsx)("div",{style:{marginTop:26,paddingTop:18,borderTop:"1px solid var(--line)"},children:(0,t.jsx)("button",{className:"po-btn po-btn--danger",onClick:()=>v({title:g("drive.confirm.trashTitle","Move to trash?"),desc:g("drive.confirm.trashFileRestoreDesc",'"{{name}}" can be restored from Trash for 30 days.',{name:w.original_filename}),danger:!0,confirmLabel:g("drive.confirm.trashIt","Trash it"),onConfirm:async()=>{await m.deleteFile(a,w.id),y(w.id),b()}}),children:g("drive.inspector.moveToTrash","Move to trash")})})]})]})},"TAG_HEX",0,u],216606),e.s(["PoContextMenu",0,function(e){let n,s,r,o,c,d,p,u,f=(0,a.c)(17),{ctx:y,onClose:g,className:x}=e,v=(0,i.useRef)(null),b=(0,i.useRef)("u"<typeof document?null:d
1ocument.activeElement);f[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{let e=v.current,t=b.current;return()=>{let a=document.activeElement;(!a||a===document.body||e?.contains(a))&&t?.focus()}},s=[],f[0]=n,f[1]=s):(n=f[0],s=f[1]),(0,i.useEffect)(n,s),f[2]!==g?(r=()=>{let e=e=>{v.current?.contains(e.target)||g()};document.addEventListener("mousedown",e),window.addEventListener("blur",g);let t=e=>{v.current?.contains(e.target)||g()};return window.addEventListener("resize",g),window.addEventListener("scroll",t,!0),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("blur",g),window.removeEventListener("resize",g),window.removeEventListener("scroll",t,!0)}},o=[g],f[2]=g,f[3]=r,f[4]=o):(r=f[3],o=f[4]),(0,i.useEffect)(r,o),f[5]!==y.sections?(c=y.sections.filter(h),f[5]=y.sections,f[6]=c):c=f[6];let j=c;f[7]===Symbol.for("react.memo_cache_sentinel")?(d=document.documentElement.getAttribute("data-canvas")??void 0,f[7]=d):d=f[7];let w=d;return f[8]===Symbol.for("react.memo_cache_sentinel")?(p={display:"contents"},f[8]=p):p=f[8],f[9]!==x||f[10]!==y.head||f[11]!==y.tagRow||f[12]!==y.x||f[13]!==y.y||f[14]!==g||f[15]!==j?(u=(0,l.createPortal)((0,t.jsx)("div",{ref:v,"data-theme":"palette-os","data-canvas":w,style:p,children:(0,t.jsx)(m,{className:x,sections:j,head:y.head,x:y.x,y:y.y,onCloseSelf:g,onCloseAll:g,tagRow:y.tagRow})}),document.body),f[9]=x,f[10]=y.head,f[11]=y.tagRow,f[12]=y.x,f[13]=y.y,f[14]=g,f[15]=j,f[16]=u):u=f[16],u}],713967)},706347,e=>{"use strict";var t=e.i(843476),a=e.i(500932),n=e.i(746798);e.s(["Tip",0,function(e){let i,s,l,r,o,c=(0,a.c)(13),{label:d,hint:p,side:u,children:m}=e,h=void 0===u?"bottom":u;return c[0]!==m?(i=(0,t.jsx)(n.TooltipTrigger,{asChild:!0,children:m}),c[0]=m,c[1]=i):i=c[1],c[2]!==d?(s=(0,t.jsx)("span",{className:"po-tipLbl",children:d}),c[2]=d,c[3]=s):s=c[3],c[4]!==p?(l=p&&(0,t.jsx)("span",{className:"po-tipHint",children:p}),c[4]=p,c[5]=l):l=c[5],c[6]!==h||c[7]!==s||c[8]!==l?(r=(0,t.jsxs)(n.TooltipContent,{side:h,sideOffset:4,className:"po-tip",children:[s,l]}),c[6]=h,c[7]=s,c[8]=l,c[9]=r):r=c[9],c[10]!==i||c[11]!==r?(o=(0,t.jsxs)(n.TooltipRoot,{children:[i,r]}),c[10]=i,c[11]=r,c[12]=o):o=c[12],o},"TipHost",0,function(e){let i,s=(0,a.c)(2),{children:l}=e;return s[0]!==l?(i=(0,t.jsx)(n.TooltipProvider,{delayDuration:240,disableHoverableContent:!0,children:l}),s[0]=l,s[1]=i):i=s[1],i}])},521135,e=>{"use strict";var t=e.i(500932),a=e.i(13080),n=e.i(955946),i=e.i(345526),s=e.i(571300),l=e.i(982484);function r(){let e,i,r,c=(0,t.c)(9),{user:d}=(0,a.useAuth)(),p=(0,s.useAppstoreCatalog)(),u=!!d?.organization_id,m=`${d?.id??"anon"}:${d?.organization_id??"none"}`;c[0]!==u||c[1]!==m?(e={visibleOnly:!0,enabled:u,cacheKey:m},c[0]=u,c[1]=m,c[2]=e):e=c[2];let{catalog:h,loading:f}=(0,n.useAppFullCatalog)(e);if(c[3]!==p||c[4]!==h){let e=h.map(n.fullCatalogToAppDefinition);i=(0,l.mergeCanonicalAppCatalog)(e,p,l.APP_CATALOG).sort(o),c[3]=p,c[4]=h,c[5]=i}else i=c[5];let y=i;return c[6]!==y||c[7]!==f?(r={apps:y,loading:f},c[6]=y,c[7]=f,c[8]=r):r=c[8],r}function o(e,t){return e.name.localeCompare(t.name)}function c(e){return[e.id,e]}e.s(["usePoCatalog",0,function(){return r()},"usePoInstalledApps",0,function(){let e,n,l,o=(0,t.c)(17),{user:d}=(0,a.useAuth)(),{installedApps:p,install:u,uninstall:m,isInstalled:h,loading:f,lastError:y}=(0,i.useInstalledApps)(),g=(0,s.useAppsById)(),{apps:x}=r();o[0]!==x?(e=Object.fromEntries(x.map(c)),o[0]=x,o[1]=e):e=o[1];let v=e;if(o[2]!==g||o[3]!==p||o[4]!==v){let e;o[6]!==g||o[7]!==v?(e=e=>v[e]??g[e],o[6]=g,o[7]=v,o[8]=e):e=o[8],n=p.map(e).filter(Boolean),o[2]=g,o[3]=p,o[4]=v,o[5]=n}else n=o[5];let b=n,j=d?.org_app_store_enabled!==!1;return o[9]!==b||o[10]!==u||o[11]!==h||o[12]!==y||o[13]!==f||o[14]!==j||o[15]!==m?(l={apps:b,install:u,uninstall:m,isInstalled:h,loading:f,lastError:y,appStoreEnabled:j},o[9]=b,o[10]=u,o[11]=h,o[12]=y,o[13]=f,o[14]=j,o[15]=m,o[16]=l):l=o[16],l}])},794933,e=>{"use strict";var t=e.i(500932),a=e.i(271645),n=e.i(402389),i=e.i(209165);async function s(e){let t=await (0,i.apiFetch)(e);if(!t.ok)throw Error(`HTTP ${t.status}`);return t.json()}function l(){return{}}e.s(["usePoConnect",0,function(){let e,r,o,c,d,p,u,m,h,f,y,g,x=(0,t.c)(17);x[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],x[0]=e):e=x[0];let[v,b]=(0,a.useState)(e);x[1]===Symbol.for("react.memo_cache_sentinel")?(r=[],x[1]=r):r=x[1];let[j,w]=(0,a.useState)(r);x[2]===Symbol.for("react.memo_cache_sentinel")?(o=[],x[2]=o):o=x[2];let[C,S]=(0,a.useState)(o),[N,k]=(0,a.useState)(!0),[_,T]=(0,a.useState)(!1);x[3]===Symbol.for("react.memo_cache_sentinel")?(c=async()=>{let[e,t,a]=await Promise.allSettled([s("/api/v1/mcp/connectors"),s("/api/v1/mcp/c
1hannels/bindings"),s("/api/v1/mcp/presets")]);T("rejected"===e.status||"rejected"===a.status),b("fulfilled"===e.status?e.value:[]),w("fulfilled"===t.status?t.value:null),S("fulfilled"===a.status?a.value:[])},x[3]=c):c=x[3];let D=c;x[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{D().finally(()=>k(!1))},p=[D],x[4]=d,x[5]=p):(d=x[4],p=x[5]),(0,a.useEffect)(d,p),x[6]===Symbol.for("react.memo_cache_sentinel")?(u=async e=>{let t=e.auth_type??(e.token?"bearer":"none"),a={slug:e.slug,name:e.name||e.slug,server_url:e.server_url,auth_type:t};e.transport&&(a.transport=e.transport),e.token&&"bearer"===t&&(a.auth_config={token:e.token}),e.token&&"api_key_header"===t&&(a.auth_config={header:e.header||"Authorization",value:e.token});let s=await (0,i.apiFetch)("/api/v1/mcp/connectors",{method:"POST",body:JSON.stringify(a)});if(!s.ok){let e=(await s.json().catch(l)).detail;throw Error("string"==typeof e?e:n.default.t("paletteOs:connect.addConnectorFailed","Failed to add connector"))}await D()},x[6]=u):u=x[6];let I=u;x[7]===Symbol.for("react.memo_cache_sentinel")?(m=async e=>{await (0,i.apiFetch)(`/api/v1/mcp/connectors/${e}/discover`,{method:"POST",body:"{}"}),await D()},x[7]=m):m=x[7];let E=m;x[8]===Symbol.for("react.memo_cache_sentinel")?(h=async e=>{await (0,i.apiFetch)(`/api/v1/mcp/connectors/${e.id}`,{method:"PATCH",body:JSON.stringify({status:"disabled"===e.status?"active":"disabled"})}),await D()},x[8]=h):h=x[8];let F=h;x[9]===Symbol.for("react.memo_cache_sentinel")?(f=async e=>{await (0,i.apiFetch)(`/api/v1/mcp/connectors/${e}`,{method:"DELETE"}),await D()},x[9]=f):f=x[9];let A=f;x[10]===Symbol.for("react.memo_cache_sentinel")?(y=async e=>{await (0,i.apiFetch)(`/api/v1/mcp/channels/bindings/${e}`,{method:"DELETE"}),await D()},x[10]=y):y=x[10];let L=y;return x[11]!==j||x[12]!==v||x[13]!==_||x[14]!==N||x[15]!==C?(g={connectors:v,bindings:j,presets:C,loading:N,error:_,refresh:D,addConnector:I,discover:E,toggle:F,removeConnector:A,removeBinding:L},x[11]=j,x[12]=v,x[13]=_,x[14]=N,x[15]=C,x[16]=g):g=x[16],g}])}]);
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.