orqevio 1.4.0 → 1.4.1
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/web/assets/{AccessKeyReveal-CP2Sm1DM.js → AccessKeyReveal-BhGhJ9TO.js} +1 -1
- package/dist/web/assets/{AccessRows-BDJ9Gtg1.js → AccessRows-BukzKFuJ.js} +1 -1
- package/dist/web/assets/{ActivityList-CS7AMLtm.js → ActivityList-TVMXixkB.js} +1 -1
- package/dist/web/assets/{AgentsPage-CC9Qqwrq.js → AgentsPage-lZ18h_Fd.js} +1 -1
- package/dist/web/assets/{Avatar-DJI4yDCJ.js → Avatar-B1img0gb.js} +1 -1
- package/dist/web/assets/BoardPage-DiTjq46K.js +1 -0
- package/dist/web/assets/{Button-CaaiSWVd.js → Button-CHkkj3LG.js} +1 -1
- package/dist/web/assets/{CardItem-335cP4hf.js → CardItem-BAkxFtTs.js} +1 -1
- package/dist/web/assets/{Checkbox-DsYEB6SC.js → Checkbox-S2SJTJty.js} +1 -1
- package/dist/web/assets/{ColorPicker-CgNvcSm7.js → ColorPicker-DSVbH2ix.js} +1 -1
- package/dist/web/assets/{ConsentPage-B1cAJnPs.js → ConsentPage-CXS-bOLl.js} +1 -1
- package/dist/web/assets/{CopyButton-MHBEUW1-.js → CopyButton-BDbxvAXk.js} +1 -1
- package/dist/web/assets/DocPage-8QmjOXZg.js +1 -0
- package/dist/web/assets/{EmptyState-BjkQU_2d.js → EmptyState-D6CMbgBz.js} +1 -1
- package/dist/web/assets/{Field-BHRDucE9.js → Field-BsUKJQ-4.js} +1 -1
- package/dist/web/assets/{HomePage-GVs6GSeR.js → HomePage-Bm_gsAiP.js} +1 -1
- package/dist/web/assets/{Menu-GG9F8t1A.js → Menu-CzgZwzmu.js} +1 -1
- package/dist/web/assets/{PageHeader-CE8sCm7O.js → PageHeader-DJdrnGpr.js} +1 -1
- package/dist/web/assets/{Phrases-DftRflqk.js → Phrases-C89QdC4L.js} +1 -1
- package/dist/web/assets/Popover-BVPB22vZ.js +1 -0
- package/dist/web/assets/{ProjectPage-Y62SbAUg.js → ProjectPage-hVAuJHb8.js} +1 -1
- package/dist/web/assets/{ProjectSettingsDialog-CucUzCi8.js → ProjectSettingsDialog-ekHTFmaO.js} +1 -1
- package/dist/web/assets/{Segmented-C_LnD1mj.js → Segmented-BibQ5uCT.js} +1 -1
- package/dist/web/assets/{SettingsPage-6VUN2Hkm.js → SettingsPage-BlACK1Ir.js} +1 -1
- package/dist/web/assets/{States-BfRfXN15.js → States-D9T0E3QG.js} +1 -1
- package/dist/web/assets/{TokenCard-CXXi_YD_.js → TokenCard-DcxUdsB4.js} +1 -1
- package/dist/web/assets/{Trans-Dwl9vXMB.js → Trans-CA0OvHif.js} +1 -1
- package/dist/web/assets/TrashPage-DtEce2C1.js +1 -0
- package/dist/web/assets/{VaultPage-Cpf15EJg.js → VaultPage-BXNKzLjV.js} +1 -1
- package/dist/web/assets/{actions-B4SD3ZSA.js → actions-TwDLbdln.js} +1 -1
- package/dist/web/assets/{activity-C3OJB6dT.js → activity-C0-uReAO.js} +1 -1
- package/dist/web/assets/{arrow-up-right-DzWSrgbl.js → arrow-up-right-GSt0z737.js} +1 -1
- package/dist/web/assets/check-A2t_TRNF.js +1 -0
- package/dist/web/assets/chevron-down-MyAtFaeL.js +1 -0
- package/dist/web/assets/chevron-right-BGyQzokh.js +1 -0
- package/dist/web/assets/{clock-Dv2gO1hx.js → clock-Dat3GIX9.js} +1 -1
- package/dist/web/assets/dist-DFO0RDUp.js +1 -0
- package/dist/web/assets/{download-G_xumAL_.js → download-CHH-5Z1W.js} +1 -1
- package/dist/web/assets/{download-CC5hNb_z.js → download-CRdduKx2.js} +1 -1
- package/dist/web/assets/{eye-BRlDzN6c.js → eye-CkYWwyJN.js} +1 -1
- package/dist/web/assets/{file-plus-BJ5sZ4_S.js → file-plus-B9m4uZcE.js} +1 -1
- package/dist/web/assets/{folder-open-BnGaROW7.js → folder-open-DCuG03EB.js} +1 -1
- package/dist/web/assets/{format-BVq_UI0J.js → format-Dk1nO38Z.js} +1 -1
- package/dist/web/assets/{index-55_U3eq8.js → index-DaNg7x81.js} +1 -1
- package/dist/web/assets/{lock-keyhole-Djv60i7r.js → lock-keyhole-DVrMCpqy.js} +1 -1
- package/dist/web/assets/{markdown-html-DCdPZD4C.js → markdown-html-Bbis0Fwx.js} +73 -73
- package/dist/web/assets/{paperclip-Dbt7ft29.js → paperclip-BnASHXPW.js} +1 -1
- package/dist/web/assets/{pencil-DL6HUNUM.js → pencil-C37OTkSN.js} +1 -1
- package/dist/web/assets/plus-DcOCeQtr.js +1 -0
- package/dist/web/assets/{realtime-BMqja886.js → realtime-Dn6o1BHn.js} +1 -1
- package/dist/web/assets/{restore-BE3HhGP4.js → restore-CAzTqClb.js} +1 -1
- package/dist/web/assets/router-BVJjZgrw.js +1 -0
- package/dist/web/assets/router-C3-WXlLY.js +6 -0
- package/dist/web/assets/{search-Bj8d5ft7.js → search-6TSW8Big.js} +1 -1
- package/dist/web/assets/{session-Bk-WM0zq.js → session-BdZhhrrQ.js} +1 -1
- package/dist/web/assets/{shield-exclamation-point-Bc5-UJbC.js → shield-exclamation-point-sqW5yuTY.js} +1 -1
- package/dist/web/assets/{square-kanban-WA9_EY-N.js → square-kanban-Cd_tPOtx.js} +1 -1
- package/dist/web/assets/{sticky-note-DyZXd_-_.js → sticky-note-hvgZ-pol.js} +1 -1
- package/dist/web/assets/{sync-B8v5y0v_.js → sync-Byk1kJR_.js} +1 -1
- package/dist/web/assets/{tag-B9G_Z0Ii.js → tag-CBK0qBXV.js} +1 -1
- package/dist/web/assets/{trash-C0okQtqH.js → trash-BtTKuFPT.js} +2 -2
- package/dist/web/assets/{trash-COg6vRm8.js → trash-CkQBpprn.js} +1 -1
- package/dist/web/assets/{triangle-exclamation-point-B2z2xtST.js → triangle-exclamation-point-BTUlFMkc.js} +1 -1
- package/dist/web/index.html +33 -33
- package/dist/worker/index.js +1 -1
- package/package.json +1 -1
- package/dist/web/assets/BoardPage-BhOlMFNk.js +0 -1
- package/dist/web/assets/DocPage-pqtzFH44.js +0 -1
- package/dist/web/assets/Popover-DQ5dN5Cv.js +0 -1
- package/dist/web/assets/TrashPage-Dnx7-c4T.js +0 -1
- package/dist/web/assets/check-a7phVGDi.js +0 -1
- package/dist/web/assets/chevron-down-DHFpQP3r.js +0 -1
- package/dist/web/assets/chevron-right-BJJ2BXpg.js +0 -1
- package/dist/web/assets/dist-BsPSSv6i.js +0 -1
- package/dist/web/assets/plus-Hg2QI8YW.js +0 -1
- package/dist/web/assets/router-QbdvZGkb.js +0 -6
- package/dist/web/assets/router-qpSsldc5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};t.node;var n=e(t),r={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{S as t,in as n,x as r}from"./format-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{S as t,in as n,x as r}from"./format-Dk1nO38Z.js";var i={sessionEnded:4401,noAccess:4403},a=e(n(),1),o=3e3;function s(e){let t=new Map,n,r=!1,i=()=>{n===void 0&&!r&&t.size&&(n=setTimeout(()=>void a(),100))};async function a(){n=void 0;let a=[...t.values()];t.clear(),r=!0;let s;try{await Promise.race([Promise.all(a.map(t=>e.invalidateQueries({queryKey:t}))),new Promise(e=>s=setTimeout(e,o))])}finally{clearTimeout(s),r=!1,i()}}return{refresh(e){t.set(JSON.stringify(e),e),i()},forget(e){t.delete(JSON.stringify(e))}}}var c=s(t),l=new Map,u=new Set,d=0,f=0;function p(){d++;for(let e of u)e()}function m(e,t){l.set(e,{name:t,until:Date.now()+4500}),f=Date.now(),p(),setTimeout(()=>{let t=l.get(e);t&&t.until<=Date.now()&&(l.delete(e),p())},4600)}var h=e=>(u.add(e),()=>{u.delete(e)});function g(e){(0,a.useSyncExternalStore)(h,()=>d);let t=l.get(e);return t&&t.until>Date.now()?t.name:null}function _(){return(0,a.useSyncExternalStore)(h,()=>d),Date.now()-f<6e3}var v=e=>c.refresh(e),y=new Set;function b(e){return y.add(e),()=>{y.delete(e)}}function x(e){for(let t of y)t(e)}var S=new Set;function C(e){return S.add(e),()=>{S.delete(e)}}var w=null,T=e=>{w=e};function E(e,t,n){let i=t.actor.kind===`user`&&t.actor.id===n;if(t.boardId&&(c.refresh(r.board(t.boardId)),c.refresh(r.archived(t.boardId))),t.cardId){if(t.action!==`card.deleted`)c.refresh(r.card(t.cardId));else for(let e of[r.card(t.cardId),r.history(`card`,t.cardId),r.comments(t.cardId)])c.forget(e);(t.action.startsWith(`card.comment`)||t.action===`trash.restored`)&&c.refresh(r.comments(t.cardId));for(let e of S)e(t)}if(t.pageId||t.projectId)for(let e of y)e(t);return t.pageId&&(t.action===`page.deleted`&&c.forget(r.history(`page`,t.pageId)),t.cardId&&c.refresh(r.page(t.pageId))),t.structure&&c.refresh(r.overview(e)),c.refresh(r.home(e)),c.refresh([`activity`,e]),c.refresh(r.trash(e)),t.cardId&&t.action!==`card.deleted`&&c.refresh(r.history(`card`,t.cardId)),t.pageId&&t.action!==`page.deleted`&&c.refresh(r.history(`page`,t.pageId)),t.actor.kind===`agent`&&(t.cardId&&m(t.cardId,t.actor.name),t.pageId&&m(t.pageId,t.actor.name),w?.(t)),i}var D=25e3,O=1e4;function k(e,n){(0,a.useEffect)(()=>{if(!e||!n)return;let a=null,o,s,c,l=0,u=!1,d=!1,f=()=>{clearInterval(s),clearTimeout(c)},p=()=>{let m=`${window.location.protocol===`https:`?`wss`:`ws`}://${window.location.host}/api/workspaces/${e}/live`,h=new WebSocket(m);a=h,h.onmessage=r=>{if(r.data===`pong`)clearTimeout(c);else try{let i=JSON.parse(String(r.data));i.type===`ready`?(l>0&&t.invalidateQueries(),l=0):i.type===`change`&&E(e,i.event,n)}catch(e){console.error(`Invalid realtime message`,e)}},h.onopen=()=>{d=!0,s=setInterval(()=>{h.readyState===WebSocket.OPEN&&(h.send(`ping`),clearTimeout(c),c=setTimeout(()=>h.close(),O))},D)};let g=()=>{d=!1,l++,o=setTimeout(p,Math.min(1e3*2**l,2e4))};h.onclose=a=>{f(),u||(a.code===i.sessionEnded||a.code===i.noAccess?t.invalidateQueries({queryKey:r.me}).then(()=>{if(u)return;let i=t.getQueryState(r.me);i?.status===`success`&&i.data?.user.id===n&&i.data.workspaces.some(t=>t.id===e)&&g()}):(d||t.invalidateQueries({queryKey:r.me}),g()))}};return p(),()=>{u=!0,clearTimeout(o),f();let e=a;e?.readyState===WebSocket.CONNECTING?(e.onmessage=null,e.onopen=()=>e.close()):e?.close()}},[e,n])}export{T as a,k as c,v as i,C as n,g as o,b as r,_ as s,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./chevron-right-BJJ2BXpg.js";import{$ as n,D as r,Dt as i,Et as a,I as o,O as s,Ot as c,P as l,Zt as u,in as d,nt as f,o as p,rn as m}from"./format-BVq_UI0J.js";import{a as h,n as g}from"./dist-BsPSSv6i.js";import{t as _}from"./Button-CaaiSWVd.js";import{t as v}from"./Checkbox-DsYEB6SC.js";import{c as y,l as b,n as x,r as S}from"./trash-C0okQtqH.js";import{a as C,i as w,r as T,t as E}from"./tag-B9G_Z0Ii.js";import{n as D,t as O}from"./square-kanban-WA9_EY-N.js";import{n as k,t as A}from"./paperclip-Dbt7ft29.js";import{t as j}from"./sticky-note-DyZXd_-_.js";var M={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};M.node;var N=a(M),P={name:`square-check`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-square-2`]};P.node;var F=a(P),I=e(d(),1),L=m(),R={project:N,board:O,column:C,card:j,page:D,attachment:A,label:E,checklist:T,checklist_item:F,link:w,comment:k};function z({kind:e}){let t=R[e];return(0,L.jsx)(t,{"aria-hidden":!0})}var B={project:80,board:80,column:60,label:40,card:300,page:200,attachment:180},ee=e=>e.ready&&e.nodes.length===1&&e.where.place===`original`&&e.conflicts.length===0&&e.relations.length===0;function te(e,t={}){let{t:n}=c([`trash`,`common`]),r=u(),[i,a]=(0,I.useState)(null),[o,s]=(0,I.useState)(null);function l(i,a){if(i.waitsFor!==void 0)return g.message(n(`linkWaits`,{name:i.waitsFor||n(`common:untitled`)})),t.onRestored?.(i);let o=[i.location?n(`restoredAt`,{place:i.location}):``,i.left?n(`leftInTrash`,{count:i.left}):``].filter(Boolean);g.success(n(`restored`,{name:a||n(`common:untitled`)}),{...o.length&&{description:o.join(` `)},...i.path&&{action:{label:n(`open`),onClick:()=>r(`/w/${e}/${i.path}`)}}}),t.onRestored?.(i)}async function d(t){s(t);try{let r=await x(e,{key:t}),i=r.where.to&&r.where.to!==`other`?{kind:r.where.to}:void 0;if(ee(r))try{return l(await y(e,{key:t,to:i}),r.node.title)}catch(e){let n=H(e);if(!n)throw e;return a({plan:n,request:{key:t,to:i}})}let o=K(r,t,n(`restoreDialog.suggested`,{name:`{{name}}`}));a({plan:o.names||o.include?await x(e,o):r,request:o})}catch(e){g.error(f(e))}finally{s(null)}}return{start:d,starting:o,dialog:i&&(0,L.jsx)(ae,{workspaceId:e,initial:i,onCancel:()=>a(null),onDone:(e,t)=>{a(null),l(e,t)}})}}function ne(e,t={}){let{t:n}=c([`trash`,`common`]),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(!1);async function s(t){o(!0);try{let r=n(`restoreDialog.suggested`,{name:`{{name}}`}),a=await S(e,t.map(e=>({key:e.key}))),o=new Map(a.plans.map(e=>[e.node.key,e])),s=new Set(t.map(e=>e.key)),c=t.map(e=>{let t=o.get(e.key),n=t?K(t,e.key,r,s):{key:e.key};for(let e of n.include??[])s.add(e);let i=!!a.missing?.includes(e.key);return{node:e,request:n,choice:t?.where.to??null,on:!i,gone:i}}),l=c.filter(e=>e.on);i({items:c,planned:l.length?await S(e,l.map(e=>e.request)):{plans:[],ready:!1}})}catch(e){g.error(f(e))}finally{o(!1)}}return{start:s,starting:a,dialog:r&&(0,L.jsx)(re,{workspaceId:e,initial:r,onCancel:()=>i(null),onDone:e=>{i(null);let r=e.filter(e=>e.waitsFor===void 0).length,a=e.length-r,o=a?{description:n(`many.waiting`,{count:a})}:void 0;r?g.success(n(`many.restored`,{count:r}),o):g.message(n(`many.waiting`,{count:a})),t.onRestored?.(e)}})}}function V(e){return e instanceof n&&e.code===`restore_incomplete`&&Array.isArray(e.details?.plans)?e.details:null}function re({workspaceId:e,initial:t,onCancel:r,onDone:a}){let{t:o}=c([`trash`,`common`]),[s,l]=(0,I.useState)(t.items),[u,d]=(0,I.useState)({result:t.planned,planned:t.items}),[p,m]=(0,I.useState)(null),[y,x]=(0,I.useState)(!1),[C,w]=(0,I.useState)(!1),[T,E]=(0,I.useState)(0),D=(0,I.useRef)(0),O=u.planned!==s,k=s.filter(e=>e.on),A=new Map(u.result.plans.map(e=>[e.node.key,e])),j=u.result.cameWith??{},M=new Set([...s.filter(e=>e.gone).map(e=>e.node.key),...u.result.missing??[]]),N=e=>s.find(t=>t.node.key===e)?.node.title||o(`common:untitled`);(0,I.useEffect)(()=>{if(!O&&T===0)return;let t=++D.current;w(!1);let n=s,r=n.filter(e=>e.on),i=setTimeout(()=>{if(r.length===0)return d({result:{plans:[],ready:!1},planned:n}),E(0);S(e,r.map(e=>e.request)).then(e=>{t===D.current&&(d({result:e,planned:n}),E(0))}).catch(()=>t===D.current&&w(!0))},250);return()=>clearTimeout(i)},[e,s,O,T]),(0,I.useEffect)(()=>{if(O)return;let e=o(`restoreDialog.suggested`,{name:`{{name}}`}),t=!1,n=s.map(n=>{if(!n.gone&&M.has(n.node.key))return t=!0,{...n,on:!1,gone:!0};let r=A.get(n.node.key);if(!n.on||!r)return n;let i=n.request,a=G(r,i);a&&(i={...i,include:a});let o=W(r,i,e);return Object.keys(o).length&&(i={...i,names:{...i.names,...o}}),i===n.request?n:(t=!0,{...n,request:i})});t&&l(n)});let P=(e,t)=>l(n=>n.map(n=>n.node.key===e?t(n):n)),F=(e,t)=>l(n=>n.map(n=>n.node.key===e?{...n,on:t}:t||!n.request.include?.includes(e)?n:{...n,request:{...n.request,include:n.request.include.filter(t=>t!==e)}})),R=k.filter(e=>{if(j[e.node.key])return!1;let t=A.get(e.node.key);return!t||J(t,e.request,e.choice)});async function B(){x(!0);try{a(await b(e,k.map(e=>e.request)))}catch(e){let t=V(e);t?d({result:t,planned:s}):e instanceof n&&e.code===`restore_changed`&&E(e=>e+1),g.error(f(e))}finally{x(!1)}}return(0,L.jsx)(h,{open:!0,onOpenChange:e=>!e&&r(),title:o(`many.title`,{count:s.length}),description:o(`many.body`),width:`max-w-[640px]`,footer:(0,L.jsxs)(L.Fragment,{children:[C?(0,L.jsxs)(`p`,{className:`mr-auto flex min-w-0 items-center gap-2 text-[12.5px] text-danger`,role:`alert`,children:[o(`restoreDialog.planFailed`),(0,L.jsx)(_,{size:`xs`,variant:`ghost`,onClick:()=>E(e=>e+1),children:o(`restoreDialog.retry`)})]}):!O&&R.length>0&&(0,L.jsx)(`p`,{className:`mr-auto min-w-0 text-[12.5px] text-warn`,children:o(`many.pending`,{count:R.length})}),(0,L.jsx)(_,{variant:`ghost`,onClick:r,children:o(`common:actions.cancel`)}),(0,L.jsx)(_,{variant:`primary`,loading:y,disabled:O||C||k.length===0||R.length>0,onClick:()=>void B(),children:o(`many.confirm`,{count:k.length})})]}),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-1.5`,"aria-label":o(`many.list`),children:s.map(t=>{let n=A.get(t.node.key),r=t.node.title||o(`common:untitled`),a=p===t.node.key&&t.on&&n!==void 0;return(0,L.jsxs)(`li`,{"aria-label":r,className:i(`rounded-[12px] border border-line`,a&&`border-line-strong`),children:[(0,L.jsxs)(`div`,{className:`flex min-h-11 items-center gap-2.5 px-2.5 py-1.5`,children:[(0,L.jsx)(v,{checked:t.on,disabled:M.has(t.node.key),onChange:e=>F(t.node.key,e),label:o(`many.include`,{name:r}),size:16}),(0,L.jsx)(`span`,{className:`text-ink-3 [&_svg]:size-4`,children:(0,L.jsx)(z,{kind:t.node.kind})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`p`,{className:i(`truncate text-[13.5px] font-medium`,!t.on&&`text-ink-3 line-through decoration-ink-4`),children:r}),(0,L.jsx)(ie,{item:t,plan:n,stale:O,gone:M.has(t.node.key),comesWith:j[t.node.key]?N(j[t.node.key]):null})]}),t.on&&n&&(0,L.jsx)(_,{size:`xs`,variant:`ghost`,"aria-expanded":a,onClick:()=>m(a?null:t.node.key),"aria-label":o(a?`many.doneChanging`:`many.change`,{name:r}),children:o(a?`many.doneChangingShort`:`many.changeShort`)})]}),a&&(0,L.jsx)(`div`,{className:`border-t border-line px-3.5 py-3`,children:(0,L.jsx)(Y,{workspaceId:e,plan:n,request:t.request,onChange:e=>P(t.node.key,t=>({...t,request:e(t.request)})),choice:t.choice,onChoice:e=>P(t.node.key,t=>({...t,choice:e}))})})]},t.node.key)})})})}function ie({item:e,plan:t,stale:n,gone:r,comesWith:a}){let{t:o}=c([`trash`,`common`]);if(r)return(0,L.jsx)(`p`,{className:`text-[12.5px] text-warn`,children:o(`many.gone`)});if(!e.on)return(0,L.jsx)(`p`,{className:`text-[12.5px] text-ink-3`,children:o(`many.stays`)});if(a)return(0,L.jsx)(`p`,{className:`text-[12.5px] text-ink-3`,children:o(`many.comesWith`,{name:a})});if(!t)return(0,L.jsx)(`p`,{className:`skeleton mt-1 h-3 w-40 rounded`});let s=t.where,l=e.choice??s.to,u=s.place!==`original`&&!s.canRecreate&&s.choose.length===0,d=[];u?d.push({text:o(`restoreDialog.nowhere`),tone:`danger`}):q(l,e.request)||t.missing.includes(`place`)?d.push({text:o(`many.choosePlace`),tone:`warn`}):l===`recreate`?d.push({text:o(`many.recreate`,{place:s.location||o(`common:untitled`)})}):l===`other`?d.push({text:o(`many.other`,{place:s.location})}):d.push({text:s.location?o(`many.original`,{place:s.location}):o(`many.originalTop`)});for(let e of t.limits)d.push({text:o(`many.noRoom`,{board:e.board||o(`common:untitled`),count:e.count,max:e.max}),tone:`danger`});let f=t.conflicts.filter(t=>!(e.request.keepNames??[]).includes(t.key)&&e.request.names?.[t.key]);f.length===1?d.push({text:o(`many.renamed`,{name:e.request.names[f[0].key]})}):f.length>1&&d.push({text:o(`many.renamedMany`,{count:f.length})});let m=t.nodes.filter(e=>e.included).length-1;m>0&&d.push({text:o(`many.withInside`,{count:m})});let h=t.relations.filter(e=>e.state===`trash`&&e.included).map(e=>o(`many.quoted`,{name:e.title||o(`common:untitled`)}));h.length&&d.push({text:o(`many.alsoBrings`,{list:p(h)})});let g=t.relations.filter(e=>e.state===`gone`||e.state===`other_board`).reduce((e,t)=>e+t.count,0);return g&&d.push({text:o(`many.lost`,{count:g}),tone:`warn`}),(0,L.jsx)(`p`,{className:i(`text-[12.5px] text-pretty text-ink-3`,n&&`opacity-60`),children:d.map((e,t)=>(0,L.jsxs)(`span`,{className:i(e.tone===`warn`&&`text-warn`,e.tone===`danger`&&`text-danger`),children:[t>0&&` · `,e.text]},e.text))})}function H(e){return e instanceof n&&e.code===`restore_incomplete`?e.details:null}function U(e,t){let n=B[e.kind]??300,r=e.kind===`attachment`?/\.[^.\s]{1,16}$/.exec(e.original)?.[0]??``:``,i=r?e.original.slice(0,-r.length):e.original,a=n-(t.length-8)-r.length;return t.replace(`{{name}}`,i.slice(0,Math.max(1,a)).trimEnd())+r}function W(e,t,n){let r={};for(let i of e.conflicts)i.taken&&!i.kept&&t.names?.[i.key]===void 0&&!(t.keepNames??[]).includes(i.key)&&(r[i.key]=U(i,n));return r}function G(e,t){if(!t.include?.length)return null;let n=new Set(e.relations.filter(e=>e.included&&e.key).map(e=>e.key)),r=t.include.filter(e=>n.has(e));return r.length===t.include.length?null:r}function K(e,t,n,r=new Set){let i=e.where,a=i.to&&i.to!==`other`?{kind:i.to}:void 0,o=W(e,{key:t},n),s=e.relations.filter(e=>e.state===`trash`&&e.canInclude&&e.key&&!r.has(e.key)).map(e=>e.key);return{key:t,...a&&{to:a},...Object.keys(o).length&&{names:o},...s.length&&{include:s}}}var q=(e,t)=>e===`other`&&t.to?.kind!==`other`;function J(e,t,n){let r=e.where,i=r.place!==`original`&&!r.canRecreate&&r.choose.length===0,a=Object.values(t.names??{}).some(e=>!e.trim());return!e.ready||i||q(n??r.to,t)||a}function ae({workspaceId:e,initial:t,onCancel:r,onDone:i}){let{t:a}=c([`trash`,`common`]),[o,s]=(0,I.useState)({plan:t.plan,planned:t.request}),l=o.plan,[u,d]=(0,I.useState)(t.request),[p,m]=(0,I.useState)(!1),[v,b]=(0,I.useState)(!1),[S,C]=(0,I.useState)(0),w=(0,I.useRef)(0),T=o.planned!==u;(0,I.useEffect)(()=>{if(!T&&S===0)return;let t=++w.current;b(!1);let n=setTimeout(()=>{x(e,u).then(e=>{t===w.current&&(s({plan:e,planned:u}),C(0))}).catch(()=>t===w.current&&b(!0))},250);return()=>clearTimeout(n)},[e,u,T,S]),(0,I.useEffect)(()=>{if(T)return;let e=G(l,u);e&&d(t=>({...t,include:e}))},[l,u,T]),(0,I.useEffect)(()=>{let e=W(l,u,a(`restoreDialog.suggested`,{name:`{{name}}`}));Object.keys(e).length&&d(t=>({...t,names:{...t.names,...e}}))},[l,u,a]);let E=l.node.title||a(`common:untitled`),D=l.where,[O,k]=(0,I.useState)(t.plan.where.to),A=D.place!==`original`&&!D.canRecreate&&D.choose.length===0,j=q(O??D.to,u);async function M(){m(!0);try{i(await y(e,u),l.node.title)}catch(e){let t=H(e);t?s({plan:t,planned:u}):e instanceof n&&e.code===`restore_changed`&&C(e=>e+1),g.error(f(e))}finally{m(!1)}}return(0,L.jsx)(h,{open:!0,onOpenChange:e=>!e&&r(),title:a(`restoreDialog.title`,{name:E}),width:`max-w-[560px]`,footer:(0,L.jsxs)(L.Fragment,{children:[v?(0,L.jsxs)(`p`,{className:`mr-auto flex min-w-0 items-center gap-2 text-[12.5px] text-danger`,role:`alert`,children:[a(`restoreDialog.planFailed`),(0,L.jsx)(_,{size:`xs`,variant:`ghost`,onClick:()=>C(e=>e+1),children:a(`restoreDialog.retry`)})]}):D.location&&!A&&!j&&(0,L.jsx)(`p`,{className:`mr-auto min-w-0 truncate text-[12.5px] text-ink-3`,children:a(`restoreDialog.goesTo`,{place:D.location})}),(0,L.jsx)(_,{variant:`ghost`,onClick:r,children:a(`common:actions.cancel`)}),(0,L.jsx)(_,{variant:`primary`,loading:p,disabled:T||v||J(l,u,O),onClick:()=>void M(),children:a(`restoreDialog.confirm`)})]}),children:(0,L.jsx)(Y,{workspaceId:e,plan:l,request:u,onChange:d,choice:O,onChoice:k})})}function Y({workspaceId:e,plan:t,request:n,onChange:r,choice:i,onChoice:a}){let{t:o}=c([`trash`,`common`]),s=t.where,l=i??s.to,u=n.to?.kind===`other`?n.to.parent:null,d=e=>n.names?.[e],f=e=>r(t=>({...t,...e})),m=s.place!==`original`&&!s.canRecreate&&s.choose.length===0;return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-6 text-[13.5px]`,children:[t.nodes.length>1&&(0,L.jsx)(X,{title:o(`restoreDialog.what`),hint:o(`restoreDialog.whatHint`),children:(0,L.jsx)(oe,{nodes:t.nodes,exclude:n.exclude??[],onChange:e=>f({exclude:e})})}),(0,L.jsx)(X,{title:o(`restoreDialog.where`),children:s.place===`original`&&s.choose.length===0?(0,L.jsx)(`p`,{className:`text-ink-2`,children:s.location?o(`restoreDialog.backTo`,{place:s.location}):o(`restoreDialog.backToTop`)}):s.place===`original`?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`radiogroup`,"aria-label":o(`restoreDialog.where`),children:[(0,L.jsx)(Z,{checked:l===`original`,onSelect:()=>{a(`original`),f({to:{kind:`original`}})},title:o(`restoreDialog.whereWas`),children:s.location?o(`restoreDialog.backTo`,{place:s.location}):o(`restoreDialog.backToTop`)}),(0,L.jsx)(Z,{checked:l===`other`,onSelect:()=>{a(`other`),f({to:u?{kind:`other`,parent:u}:void 0})},title:o(`restoreDialog.elsewhere`),children:l===`other`?(0,L.jsx)(Q,{workspaceId:e,choose:s.choose,value:u,onChange:e=>f({to:e?{kind:`other`,parent:e}:void 0})}):o(`restoreDialog.elsewhereHint`)})]}):m?(0,L.jsx)(`p`,{className:`text-danger`,children:o(`restoreDialog.nowhere`)}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`radiogroup`,"aria-label":o(`restoreDialog.where`),children:[(0,L.jsx)(`p`,{className:`text-ink-2`,children:o(s.place===`trash`?`place.trash`:`place.gone`)}),s.canRecreate&&(0,L.jsx)(Z,{checked:l===`recreate`,onSelect:()=>{a(`recreate`),f({to:{kind:`recreate`}})},title:o(`restoreDialog.recreate`),children:[s.create.length>0?o(`restoreDialog.recreateCreate`,{what:p(s.create.map(e=>o(`kindA.${e.kind}`,{name:e.title})))}):``,s.path.length>0?o(`restoreDialog.recreatePath`,{list:p(s.path.map(e=>o(`kindNamed.${e.kind}`,{name:e.title||o(`common:untitled`)})))}):``].filter(Boolean).join(` `)}),s.choose.length>0&&(0,L.jsx)(Z,{checked:l===`other`,onSelect:()=>{a(`other`),f({to:u?{kind:`other`,parent:u}:void 0})},title:o(`restoreDialog.elsewhere`),children:l===`other`||!s.canRecreate?(0,L.jsx)(Q,{workspaceId:e,choose:s.choose,value:u,onChange:e=>f({to:e?{kind:`other`,parent:e}:void 0})}):o(`restoreDialog.elsewhereHint`)})]})}),t.limits.length>0&&(0,L.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-1 rounded-[12px] border border-danger/30 bg-danger-soft px-3.5 py-3 text-[13px]`,children:[t.limits.map(e=>(0,L.jsx)(`p`,{children:o(`restoreDialog.tooManyColumns`,{board:e.board||o(`common:untitled`),count:e.count,max:e.max})},e.board)),(0,L.jsx)(`p`,{children:o(t.nodes.filter(e=>e.kind===`column`).length>1?`restoreDialog.roomHintMany`:`restoreDialog.roomHint`)})]}),t.conflicts.length>0&&(0,L.jsx)(X,{title:o(`restoreDialog.names`),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-3`,children:t.conflicts.map(e=>(0,L.jsx)(se,{conflict:e,value:d(e.key)??e.original,kept:(n.keepNames??[]).includes(e.key),onName:t=>f({names:{...n.names,[e.key]:t}}),onKeep:t=>{let r=new Set(n.keepNames??[]),i={...n.names};t?(r.add(e.key),delete i[e.key]):(r.delete(e.key),i[e.key]=U(e,o(`restoreDialog.suggested`,{name:`{{name}}`}))),f({keepNames:[...r],names:i})}},e.key))})}),t.relations.length>0&&(0,L.jsx)(X,{title:o(`restoreDialog.relations`),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:t.relations.map(e=>(0,L.jsx)(ce,{relation:e,onInclude:t=>{let r=new Set(n.include??[]);t?r.add(e.key):r.delete(e.key),f({include:[...r]})}},`${e.state}-${e.kind}-${e.key??e.title}`))})})]})})}function X({title:e,hint:t,children:n}){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-[12px] font-semibold tracking-[0.04em] text-ink-3 uppercase`,children:e}),t&&(0,L.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-ink-3`,children:t})]}),n]})}function Z({checked:e,onSelect:t,title:n,children:r}){return(0,L.jsxs)(`div`,{className:i(`rounded-[12px] border px-3.5 py-3 transition-colors`,e?`border-accent bg-accent-soft`:`border-line`),children:[(0,L.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5 font-medium`,children:[(0,L.jsx)(`input`,{type:`radio`,checked:e,onChange:t,className:`size-4 accent-[var(--accent)]`}),n]}),(0,L.jsx)(`div`,{className:`mt-1.5 pl-[26px] text-[13px] text-ink-2`,children:r})]})}function oe({nodes:e,exclude:n,onChange:r}){let{t:a}=c([`trash`,`common`]),o=(0,I.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.parentKey,[...t.get(n.parentKey)??[],n]);return t},[e]),s=e[0],[l,u]=(0,I.useState)(()=>new Set([s.key])),d=new Set(n),f=e=>r(e.included?[...d,e.key]:[...d].filter(t=>t!==e.key)),p=(e,n,r)=>{let c=o.get(e.key)??[],d=l.has(e.key),m=e.title||a(`common:untitled`);return(0,L.jsxs)(`li`,{children:[(0,L.jsxs)(`div`,{className:`flex min-h-8 items-center gap-2 rounded-[8px] pr-2 hover:bg-hover`,style:{paddingLeft:n*18},children:[c.length>0?(0,L.jsx)(`button`,{type:`button`,className:`grid size-6 place-items-center rounded-[6px] text-ink-3 hover:text-ink`,"aria-expanded":d,"aria-label":a(d?`collapse`:`expand`,{name:m}),onClick:()=>u(t=>new Set(d?[...t].filter(t=>t!==e.key):[...t,e.key])),children:(0,L.jsx)(t,{className:i(`size-3.5 transition-transform`,d&&`rotate-90`)})}):(0,L.jsx)(`span`,{className:`size-6`}),(0,L.jsx)(v,{checked:e.included,disabled:e===s||!r,onChange:()=>f(e),label:a(`restoreDialog.include`,{name:m}),size:16}),(0,L.jsx)(`span`,{className:`text-ink-3 [&_svg]:size-3.5`,children:(0,L.jsx)(z,{kind:e.kind})}),(0,L.jsx)(`span`,{className:i(`min-w-0 flex-1 truncate`,!e.included&&`text-ink-3 line-through decoration-ink-4`),children:m}),e.earlier&&(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-sunken px-2 py-0.5 text-[11px] text-ink-3`,children:a(`earlier`)})]}),c.length>0&&d&&(0,L.jsx)(`ul`,{children:c.map(t=>p(t,n+1,r&&e.included))})]},e.key)};return(0,L.jsx)(`ul`,{className:`max-h-[280px] overflow-y-auto rounded-[12px] border border-line p-1.5`,children:p(s,0,!0)})}function se({conflict:e,value:t,kept:n,onName:r,onKeep:i}){let{t:a}=c([`trash`,`common`]),o=a(`kindA.${e.kind}`,{name:e.original||a(`common:untitled`)}),s=B[e.kind]??300;return(0,L.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`p`,{children:e.where?a(`restoreDialog.nameTaken`,{what:o,where:e.where}):a(`restoreDialog.nameTakenTop`,{what:o})}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,L.jsx)(`input`,{className:`field h-9 min-w-[200px] flex-1`,value:n?e.original:t,maxLength:s,disabled:n,"aria-label":a(`restoreDialog.newName`,{name:e.original}),"aria-invalid":!n&&(!t.trim()||e.taken&&e.name===t)?!0:void 0,onChange:e=>r(e.target.value)}),(0,L.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-[13px] text-ink-2`,children:[(0,L.jsx)(v,{checked:n,onChange:i,label:a(`restoreDialog.keepName`),size:16}),(0,L.jsx)(`span`,{"aria-hidden":!0,children:a(`restoreDialog.keepName`)})]})]}),!n&&!t.trim()&&(0,L.jsx)(`p`,{className:`text-[12.5px] text-danger`,children:a(`restoreDialog.nameEmpty`)}),!n&&t.trim()&&e.taken&&e.name===t&&(0,L.jsx)(`p`,{className:`text-[12.5px] text-danger`,children:a(`restoreDialog.nameStillTaken`)})]})}function ce({relation:e,onInclude:t}){let{t:n}=c([`trash`,`common`]),r=n(`relationKind.${e.kind}`,{name:e.title||n(`common:untitled`)}),i=e.count>1?n(`restoreDialog.ofMany`,{count:e.count}):n(`restoreDialog.ofOne`,{name:e.first||n(`common:untitled`)});if(e.state===`trash`&&e.canInclude)return(0,L.jsxs)(`li`,{className:`flex items-start gap-2.5`,children:[(0,L.jsx)(v,{checked:e.included,onChange:t,label:n(`restoreDialog.bringToo`,{what:r}),size:16,className:`mt-0.5`}),(0,L.jsxs)(`p`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:r}),` `,(0,L.jsx)(`span`,{className:`text-ink-3`,children:i}),(0,L.jsx)(`br`,{}),(0,L.jsx)(`span`,{className:`text-[12.5px] text-ink-3`,children:e.included?n(`restoreDialog.comesToo`):n(`restoreDialog.waits`)})]})]});let a=e.state===`trash`?n(`restoreDialog.staysWaiting`,{what:r,of:i}):e.state===`gone`?n(`restoreDialog.gone.${e.kind}`,{of:i}):n(`restoreDialog.otherBoard`,{what:r,of:i});return(0,L.jsx)(`li`,{className:`text-ink-2`,children:a})}function Q({workspaceId:e,choose:t,value:n,onChange:r}){let{t:i}=c([`trash`,`common`]),a=l(e).data?.projects??[],[o,u]=(0,I.useState)(``),[d,f]=(0,I.useState)(``),[p,m]=(0,I.useState)(``),[h,g]=(0,I.useState)(t.includes(`card`)?`card`:t[0]),_=s(p||null),v=a.find(e=>e.id===o),y=e=>t.includes(e),b=(e,t,n,r,i)=>(0,L.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[12px] font-medium text-ink-3`,children:e}),(0,L.jsxs)(`select`,{className:`field h-9`,value:t,onChange:e=>r(e.target.value),children:[(0,L.jsx)(`option`,{value:``,children:i}),n.map(e=>(0,L.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}),x=(0,I.useMemo)(()=>{let e=v?.pages??[],t=[],n=(r,a)=>{for(let o of e.filter(e=>e.parentId===r).sort((e,t)=>e.position<t.position?-1:1))t.push({value:o.id,label:`${` `.repeat(a)}${o.title||i(`common:untitled`)}`}),a<20&&n(o.id,a+1)};return n(null,0),t},[v,i]),S=a.map(e=>({value:e.id,label:e.name}));return h===`card`||h===`checklist`||y(`checklist`)&&!y(`card`)?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[y(`card`)&&y(`page`)&&(0,L.jsx)($,{mode:h,setMode:e=>(g(e),r(null))}),(0,L.jsx)(ue,{workspaceId:e,value:p,onChange:e=>{m(e),r(e&&y(`card`)?{kind:`card`,id:e}:null)}}),y(`checklist`)&&p&&b(i(`picker.checklist`),n?.kind===`checklist`?n.id:``,(_.data?.checklists??[]).map(e=>({value:e.id,label:e.title})),e=>r(e?{kind:`checklist`,id:e}:null),i(`picker.chooseChecklist`))]}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[y(`card`)&&y(`page`)&&(0,L.jsx)($,{mode:h,setMode:e=>(g(e),r(null))}),b(i(`picker.project`),o,S,e=>{u(e),f(``),y(`project`)&&(h===`project`||h===`page`)?r(e?{kind:`project`,id:e}:null):r(null)},i(`picker.chooseProject`)),v&&(y(`board`)||y(`column`))&&b(i(`picker.board`),d,v.boards.map(e=>({value:e.id,label:e.name})),e=>{f(e),r(e&&y(`board`)?{kind:`board`,id:e}:null)},i(`picker.chooseBoard`)),d&&y(`column`)&&(0,L.jsx)(le,{boardId:d,render:e=>b(i(`picker.column`),n?.kind===`column`?n.id:``,e,e=>r(e?{kind:`column`,id:e}:null),i(`picker.chooseColumn`))}),v&&y(`page`)&&b(i(y(`project`)?`picker.parent`:`picker.page`),n?.kind===`page`?n.id:``,x,e=>r(e?{kind:`page`,id:e}:y(`project`)?{kind:`project`,id:v.id}:null),i(y(`project`)?`picker.atTop`:`picker.choosePage`))]})}function le({boardId:e,render:t}){return t((r(e).data?.columns??[]).map(e=>({value:e.id,label:e.name})))}function $({mode:e,setMode:t}){let{t:n}=c(`trash`);return(0,L.jsx)(`div`,{className:`flex gap-1.5`,role:`radiogroup`,"aria-label":n(`picker.in`),children:[`card`,`page`].map(r=>(0,L.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===r,onClick:()=>t(r),className:i(`rounded-[8px] px-2.5 py-1 text-[12.5px] font-medium`,e===r?`bg-surface text-ink shadow-sm ring-1 ring-line`:`text-ink-3 hover:text-ink`),children:n(`picker.${r}`)},r))})}function ue({workspaceId:e,value:t,onChange:n}){let{t:r}=c([`trash`,`common`]),[a,s]=(0,I.useState)(``),l=o(e,a,`card`),u=l.data??[];return(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[12px] font-medium text-ink-3`,children:r(`picker.card`)}),(0,L.jsx)(`input`,{className:`field h-9`,value:a,onChange:e=>s(e.target.value),placeholder:r(`picker.searchCard`)})]}),a.trim().length>=2&&(0,L.jsxs)(`ul`,{className:`max-h-[160px] overflow-y-auto rounded-[10px] border border-line p-1`,"aria-label":r(`picker.results`),children:[u.length===0&&!l.isFetching&&(0,L.jsx)(`li`,{className:`px-2 py-1.5 text-ink-3`,children:r(`picker.noCards`)}),u.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{type:`button`,"aria-pressed":t===e.id,onClick:()=>n(t===e.id?``:e.id),className:i(`flex w-full flex-col items-start rounded-[8px] px-2 py-1.5 text-left hover:bg-hover`,t===e.id&&`bg-accent-soft`),children:[(0,L.jsx)(`span`,{className:`truncate font-medium`,children:e.title||r(`common:untitled`)}),(0,L.jsx)(`span`,{className:`truncate text-[12px] text-ink-3`,children:[e.projectName,e.boardName,e.columnName].filter(Boolean).join(` › `)})]})},e.id))]})]})}export{ne as n,z as r,te as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./chevron-right-BGyQzokh.js";import{$ as n,D as r,Dt as i,Et as a,I as o,O as s,Ot as c,P as l,Zt as u,in as d,nt as f,o as p,rn as m}from"./format-Dk1nO38Z.js";import{a as h,n as g}from"./dist-DFO0RDUp.js";import{t as _}from"./Button-CHkkj3LG.js";import{t as v}from"./Checkbox-S2SJTJty.js";import{c as y,l as b,n as x,r as S}from"./trash-BtTKuFPT.js";import{a as C,i as w,r as T,t as E}from"./tag-CBK0qBXV.js";import{n as D,t as O}from"./square-kanban-Cd_tPOtx.js";import{n as k,t as A}from"./paperclip-BnASHXPW.js";import{t as j}from"./sticky-note-hvgZ-pol.js";var M={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};M.node;var N=a(M),P={name:`square-check`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-square-2`]};P.node;var F=a(P),I=e(d(),1),L=m(),R={project:N,board:O,column:C,card:j,page:D,attachment:A,label:E,checklist:T,checklist_item:F,link:w,comment:k};function z({kind:e}){let t=R[e];return(0,L.jsx)(t,{"aria-hidden":!0})}var B={project:80,board:80,column:60,label:40,card:300,page:200,attachment:180},ee=e=>e.ready&&e.nodes.length===1&&e.where.place===`original`&&e.conflicts.length===0&&e.relations.length===0;function te(e,t={}){let{t:n}=c([`trash`,`common`]),r=u(),[i,a]=(0,I.useState)(null),[o,s]=(0,I.useState)(null);function l(i,a){if(i.waitsFor!==void 0)return g.message(n(`linkWaits`,{name:i.waitsFor||n(`common:untitled`)})),t.onRestored?.(i);let o=[i.location?n(`restoredAt`,{place:i.location}):``,i.left?n(`leftInTrash`,{count:i.left}):``].filter(Boolean);g.success(n(`restored`,{name:a||n(`common:untitled`)}),{...o.length&&{description:o.join(` `)},...i.path&&{action:{label:n(`open`),onClick:()=>r(`/w/${e}/${i.path}`)}}}),t.onRestored?.(i)}async function d(t){s(t);try{let r=await x(e,{key:t}),i=r.where.to&&r.where.to!==`other`?{kind:r.where.to}:void 0;if(ee(r))try{return l(await y(e,{key:t,to:i}),r.node.title)}catch(e){let n=H(e);if(!n)throw e;return a({plan:n,request:{key:t,to:i}})}let o=K(r,t,n(`restoreDialog.suggested`,{name:`{{name}}`}));a({plan:o.names||o.include?await x(e,o):r,request:o})}catch(e){g.error(f(e))}finally{s(null)}}return{start:d,starting:o,dialog:i&&(0,L.jsx)(ae,{workspaceId:e,initial:i,onCancel:()=>a(null),onDone:(e,t)=>{a(null),l(e,t)}})}}function ne(e,t={}){let{t:n}=c([`trash`,`common`]),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(!1);async function s(t){o(!0);try{let r=n(`restoreDialog.suggested`,{name:`{{name}}`}),a=await S(e,t.map(e=>({key:e.key}))),o=new Map(a.plans.map(e=>[e.node.key,e])),s=new Set(t.map(e=>e.key)),c=t.map(e=>{let t=o.get(e.key),n=t?K(t,e.key,r,s):{key:e.key};for(let e of n.include??[])s.add(e);let i=!!a.missing?.includes(e.key);return{node:e,request:n,choice:t?.where.to??null,on:!i,gone:i}}),l=c.filter(e=>e.on);i({items:c,planned:l.length?await S(e,l.map(e=>e.request)):{plans:[],ready:!1}})}catch(e){g.error(f(e))}finally{o(!1)}}return{start:s,starting:a,dialog:r&&(0,L.jsx)(re,{workspaceId:e,initial:r,onCancel:()=>i(null),onDone:e=>{i(null);let r=e.filter(e=>e.waitsFor===void 0).length,a=e.length-r,o=a?{description:n(`many.waiting`,{count:a})}:void 0;r?g.success(n(`many.restored`,{count:r}),o):g.message(n(`many.waiting`,{count:a})),t.onRestored?.(e)}})}}function V(e){return e instanceof n&&e.code===`restore_incomplete`&&Array.isArray(e.details?.plans)?e.details:null}function re({workspaceId:e,initial:t,onCancel:r,onDone:a}){let{t:o}=c([`trash`,`common`]),[s,l]=(0,I.useState)(t.items),[u,d]=(0,I.useState)({result:t.planned,planned:t.items}),[p,m]=(0,I.useState)(null),[y,x]=(0,I.useState)(!1),[C,w]=(0,I.useState)(!1),[T,E]=(0,I.useState)(0),D=(0,I.useRef)(0),O=u.planned!==s,k=s.filter(e=>e.on),A=new Map(u.result.plans.map(e=>[e.node.key,e])),j=u.result.cameWith??{},M=new Set([...s.filter(e=>e.gone).map(e=>e.node.key),...u.result.missing??[]]),N=e=>s.find(t=>t.node.key===e)?.node.title||o(`common:untitled`);(0,I.useEffect)(()=>{if(!O&&T===0)return;let t=++D.current;w(!1);let n=s,r=n.filter(e=>e.on),i=setTimeout(()=>{if(r.length===0)return d({result:{plans:[],ready:!1},planned:n}),E(0);S(e,r.map(e=>e.request)).then(e=>{t===D.current&&(d({result:e,planned:n}),E(0))}).catch(()=>t===D.current&&w(!0))},250);return()=>clearTimeout(i)},[e,s,O,T]),(0,I.useEffect)(()=>{if(O)return;let e=o(`restoreDialog.suggested`,{name:`{{name}}`}),t=!1,n=s.map(n=>{if(!n.gone&&M.has(n.node.key))return t=!0,{...n,on:!1,gone:!0};let r=A.get(n.node.key);if(!n.on||!r)return n;let i=n.request,a=G(r,i);a&&(i={...i,include:a});let o=W(r,i,e);return Object.keys(o).length&&(i={...i,names:{...i.names,...o}}),i===n.request?n:(t=!0,{...n,request:i})});t&&l(n)});let P=(e,t)=>l(n=>n.map(n=>n.node.key===e?t(n):n)),F=(e,t)=>l(n=>n.map(n=>n.node.key===e?{...n,on:t}:t||!n.request.include?.includes(e)?n:{...n,request:{...n.request,include:n.request.include.filter(t=>t!==e)}})),R=k.filter(e=>{if(j[e.node.key])return!1;let t=A.get(e.node.key);return!t||J(t,e.request,e.choice)});async function B(){x(!0);try{a(await b(e,k.map(e=>e.request)))}catch(e){let t=V(e);t?d({result:t,planned:s}):e instanceof n&&e.code===`restore_changed`&&E(e=>e+1),g.error(f(e))}finally{x(!1)}}return(0,L.jsx)(h,{open:!0,onOpenChange:e=>!e&&r(),title:o(`many.title`,{count:s.length}),description:o(`many.body`),width:`max-w-[640px]`,footer:(0,L.jsxs)(L.Fragment,{children:[C?(0,L.jsxs)(`p`,{className:`mr-auto flex min-w-0 items-center gap-2 text-[12.5px] text-danger`,role:`alert`,children:[o(`restoreDialog.planFailed`),(0,L.jsx)(_,{size:`xs`,variant:`ghost`,onClick:()=>E(e=>e+1),children:o(`restoreDialog.retry`)})]}):!O&&R.length>0&&(0,L.jsx)(`p`,{className:`mr-auto min-w-0 text-[12.5px] text-warn`,children:o(`many.pending`,{count:R.length})}),(0,L.jsx)(_,{variant:`ghost`,onClick:r,children:o(`common:actions.cancel`)}),(0,L.jsx)(_,{variant:`primary`,loading:y,disabled:O||C||k.length===0||R.length>0,onClick:()=>void B(),children:o(`many.confirm`,{count:k.length})})]}),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-1.5`,"aria-label":o(`many.list`),children:s.map(t=>{let n=A.get(t.node.key),r=t.node.title||o(`common:untitled`),a=p===t.node.key&&t.on&&n!==void 0;return(0,L.jsxs)(`li`,{"aria-label":r,className:i(`rounded-[12px] border border-line`,a&&`border-line-strong`),children:[(0,L.jsxs)(`div`,{className:`flex min-h-11 items-center gap-2.5 px-2.5 py-1.5`,children:[(0,L.jsx)(v,{checked:t.on,disabled:M.has(t.node.key),onChange:e=>F(t.node.key,e),label:o(`many.include`,{name:r}),size:16}),(0,L.jsx)(`span`,{className:`text-ink-3 [&_svg]:size-4`,children:(0,L.jsx)(z,{kind:t.node.kind})}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`p`,{className:i(`truncate text-[13.5px] font-medium`,!t.on&&`text-ink-3 line-through decoration-ink-4`),children:r}),(0,L.jsx)(ie,{item:t,plan:n,stale:O,gone:M.has(t.node.key),comesWith:j[t.node.key]?N(j[t.node.key]):null})]}),t.on&&n&&(0,L.jsx)(_,{size:`xs`,variant:`ghost`,"aria-expanded":a,onClick:()=>m(a?null:t.node.key),"aria-label":o(a?`many.doneChanging`:`many.change`,{name:r}),children:o(a?`many.doneChangingShort`:`many.changeShort`)})]}),a&&(0,L.jsx)(`div`,{className:`border-t border-line px-3.5 py-3`,children:(0,L.jsx)(Y,{workspaceId:e,plan:n,request:t.request,onChange:e=>P(t.node.key,t=>({...t,request:e(t.request)})),choice:t.choice,onChoice:e=>P(t.node.key,t=>({...t,choice:e}))})})]},t.node.key)})})})}function ie({item:e,plan:t,stale:n,gone:r,comesWith:a}){let{t:o}=c([`trash`,`common`]);if(r)return(0,L.jsx)(`p`,{className:`text-[12.5px] text-warn`,children:o(`many.gone`)});if(!e.on)return(0,L.jsx)(`p`,{className:`text-[12.5px] text-ink-3`,children:o(`many.stays`)});if(a)return(0,L.jsx)(`p`,{className:`text-[12.5px] text-ink-3`,children:o(`many.comesWith`,{name:a})});if(!t)return(0,L.jsx)(`p`,{className:`skeleton mt-1 h-3 w-40 rounded`});let s=t.where,l=e.choice??s.to,u=s.place!==`original`&&!s.canRecreate&&s.choose.length===0,d=[];u?d.push({text:o(`restoreDialog.nowhere`),tone:`danger`}):q(l,e.request)||t.missing.includes(`place`)?d.push({text:o(`many.choosePlace`),tone:`warn`}):l===`recreate`?d.push({text:o(`many.recreate`,{place:s.location||o(`common:untitled`)})}):l===`other`?d.push({text:o(`many.other`,{place:s.location})}):d.push({text:s.location?o(`many.original`,{place:s.location}):o(`many.originalTop`)});for(let e of t.limits)d.push({text:o(`many.noRoom`,{board:e.board||o(`common:untitled`),count:e.count,max:e.max}),tone:`danger`});let f=t.conflicts.filter(t=>!(e.request.keepNames??[]).includes(t.key)&&e.request.names?.[t.key]);f.length===1?d.push({text:o(`many.renamed`,{name:e.request.names[f[0].key]})}):f.length>1&&d.push({text:o(`many.renamedMany`,{count:f.length})});let m=t.nodes.filter(e=>e.included).length-1;m>0&&d.push({text:o(`many.withInside`,{count:m})});let h=t.relations.filter(e=>e.state===`trash`&&e.included).map(e=>o(`many.quoted`,{name:e.title||o(`common:untitled`)}));h.length&&d.push({text:o(`many.alsoBrings`,{list:p(h)})});let g=t.relations.filter(e=>e.state===`gone`||e.state===`other_board`).reduce((e,t)=>e+t.count,0);return g&&d.push({text:o(`many.lost`,{count:g}),tone:`warn`}),(0,L.jsx)(`p`,{className:i(`text-[12.5px] text-pretty text-ink-3`,n&&`opacity-60`),children:d.map((e,t)=>(0,L.jsxs)(`span`,{className:i(e.tone===`warn`&&`text-warn`,e.tone===`danger`&&`text-danger`),children:[t>0&&` · `,e.text]},e.text))})}function H(e){return e instanceof n&&e.code===`restore_incomplete`?e.details:null}function U(e,t){let n=B[e.kind]??300,r=e.kind===`attachment`?/\.[^.\s]{1,16}$/.exec(e.original)?.[0]??``:``,i=r?e.original.slice(0,-r.length):e.original,a=n-(t.length-8)-r.length;return t.replace(`{{name}}`,i.slice(0,Math.max(1,a)).trimEnd())+r}function W(e,t,n){let r={};for(let i of e.conflicts)i.taken&&!i.kept&&t.names?.[i.key]===void 0&&!(t.keepNames??[]).includes(i.key)&&(r[i.key]=U(i,n));return r}function G(e,t){if(!t.include?.length)return null;let n=new Set(e.relations.filter(e=>e.included&&e.key).map(e=>e.key)),r=t.include.filter(e=>n.has(e));return r.length===t.include.length?null:r}function K(e,t,n,r=new Set){let i=e.where,a=i.to&&i.to!==`other`?{kind:i.to}:void 0,o=W(e,{key:t},n),s=e.relations.filter(e=>e.state===`trash`&&e.canInclude&&e.key&&!r.has(e.key)).map(e=>e.key);return{key:t,...a&&{to:a},...Object.keys(o).length&&{names:o},...s.length&&{include:s}}}var q=(e,t)=>e===`other`&&t.to?.kind!==`other`;function J(e,t,n){let r=e.where,i=r.place!==`original`&&!r.canRecreate&&r.choose.length===0,a=Object.values(t.names??{}).some(e=>!e.trim());return!e.ready||i||q(n??r.to,t)||a}function ae({workspaceId:e,initial:t,onCancel:r,onDone:i}){let{t:a}=c([`trash`,`common`]),[o,s]=(0,I.useState)({plan:t.plan,planned:t.request}),l=o.plan,[u,d]=(0,I.useState)(t.request),[p,m]=(0,I.useState)(!1),[v,b]=(0,I.useState)(!1),[S,C]=(0,I.useState)(0),w=(0,I.useRef)(0),T=o.planned!==u;(0,I.useEffect)(()=>{if(!T&&S===0)return;let t=++w.current;b(!1);let n=setTimeout(()=>{x(e,u).then(e=>{t===w.current&&(s({plan:e,planned:u}),C(0))}).catch(()=>t===w.current&&b(!0))},250);return()=>clearTimeout(n)},[e,u,T,S]),(0,I.useEffect)(()=>{if(T)return;let e=G(l,u);e&&d(t=>({...t,include:e}))},[l,u,T]),(0,I.useEffect)(()=>{let e=W(l,u,a(`restoreDialog.suggested`,{name:`{{name}}`}));Object.keys(e).length&&d(t=>({...t,names:{...t.names,...e}}))},[l,u,a]);let E=l.node.title||a(`common:untitled`),D=l.where,[O,k]=(0,I.useState)(t.plan.where.to),A=D.place!==`original`&&!D.canRecreate&&D.choose.length===0,j=q(O??D.to,u);async function M(){m(!0);try{i(await y(e,u),l.node.title)}catch(e){let t=H(e);t?s({plan:t,planned:u}):e instanceof n&&e.code===`restore_changed`&&C(e=>e+1),g.error(f(e))}finally{m(!1)}}return(0,L.jsx)(h,{open:!0,onOpenChange:e=>!e&&r(),title:a(`restoreDialog.title`,{name:E}),width:`max-w-[560px]`,footer:(0,L.jsxs)(L.Fragment,{children:[v?(0,L.jsxs)(`p`,{className:`mr-auto flex min-w-0 items-center gap-2 text-[12.5px] text-danger`,role:`alert`,children:[a(`restoreDialog.planFailed`),(0,L.jsx)(_,{size:`xs`,variant:`ghost`,onClick:()=>C(e=>e+1),children:a(`restoreDialog.retry`)})]}):D.location&&!A&&!j&&(0,L.jsx)(`p`,{className:`mr-auto min-w-0 truncate text-[12.5px] text-ink-3`,children:a(`restoreDialog.goesTo`,{place:D.location})}),(0,L.jsx)(_,{variant:`ghost`,onClick:r,children:a(`common:actions.cancel`)}),(0,L.jsx)(_,{variant:`primary`,loading:p,disabled:T||v||J(l,u,O),onClick:()=>void M(),children:a(`restoreDialog.confirm`)})]}),children:(0,L.jsx)(Y,{workspaceId:e,plan:l,request:u,onChange:d,choice:O,onChoice:k})})}function Y({workspaceId:e,plan:t,request:n,onChange:r,choice:i,onChoice:a}){let{t:o}=c([`trash`,`common`]),s=t.where,l=i??s.to,u=n.to?.kind===`other`?n.to.parent:null,d=e=>n.names?.[e],f=e=>r(t=>({...t,...e})),m=s.place!==`original`&&!s.canRecreate&&s.choose.length===0;return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-6 text-[13.5px]`,children:[t.nodes.length>1&&(0,L.jsx)(X,{title:o(`restoreDialog.what`),hint:o(`restoreDialog.whatHint`),children:(0,L.jsx)(oe,{nodes:t.nodes,exclude:n.exclude??[],onChange:e=>f({exclude:e})})}),(0,L.jsx)(X,{title:o(`restoreDialog.where`),children:s.place===`original`&&s.choose.length===0?(0,L.jsx)(`p`,{className:`text-ink-2`,children:s.location?o(`restoreDialog.backTo`,{place:s.location}):o(`restoreDialog.backToTop`)}):s.place===`original`?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`radiogroup`,"aria-label":o(`restoreDialog.where`),children:[(0,L.jsx)(Z,{checked:l===`original`,onSelect:()=>{a(`original`),f({to:{kind:`original`}})},title:o(`restoreDialog.whereWas`),children:s.location?o(`restoreDialog.backTo`,{place:s.location}):o(`restoreDialog.backToTop`)}),(0,L.jsx)(Z,{checked:l===`other`,onSelect:()=>{a(`other`),f({to:u?{kind:`other`,parent:u}:void 0})},title:o(`restoreDialog.elsewhere`),children:l===`other`?(0,L.jsx)(Q,{workspaceId:e,choose:s.choose,value:u,onChange:e=>f({to:e?{kind:`other`,parent:e}:void 0})}):o(`restoreDialog.elsewhereHint`)})]}):m?(0,L.jsx)(`p`,{className:`text-danger`,children:o(`restoreDialog.nowhere`)}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`radiogroup`,"aria-label":o(`restoreDialog.where`),children:[(0,L.jsx)(`p`,{className:`text-ink-2`,children:o(s.place===`trash`?`place.trash`:`place.gone`)}),s.canRecreate&&(0,L.jsx)(Z,{checked:l===`recreate`,onSelect:()=>{a(`recreate`),f({to:{kind:`recreate`}})},title:o(`restoreDialog.recreate`),children:[s.create.length>0?o(`restoreDialog.recreateCreate`,{what:p(s.create.map(e=>o(`kindA.${e.kind}`,{name:e.title})))}):``,s.path.length>0?o(`restoreDialog.recreatePath`,{list:p(s.path.map(e=>o(`kindNamed.${e.kind}`,{name:e.title||o(`common:untitled`)})))}):``].filter(Boolean).join(` `)}),s.choose.length>0&&(0,L.jsx)(Z,{checked:l===`other`,onSelect:()=>{a(`other`),f({to:u?{kind:`other`,parent:u}:void 0})},title:o(`restoreDialog.elsewhere`),children:l===`other`||!s.canRecreate?(0,L.jsx)(Q,{workspaceId:e,choose:s.choose,value:u,onChange:e=>f({to:e?{kind:`other`,parent:e}:void 0})}):o(`restoreDialog.elsewhereHint`)})]})}),t.limits.length>0&&(0,L.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-1 rounded-[12px] border border-danger/30 bg-danger-soft px-3.5 py-3 text-[13px]`,children:[t.limits.map(e=>(0,L.jsx)(`p`,{children:o(`restoreDialog.tooManyColumns`,{board:e.board||o(`common:untitled`),count:e.count,max:e.max})},e.board)),(0,L.jsx)(`p`,{children:o(t.nodes.filter(e=>e.kind===`column`).length>1?`restoreDialog.roomHintMany`:`restoreDialog.roomHint`)})]}),t.conflicts.length>0&&(0,L.jsx)(X,{title:o(`restoreDialog.names`),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-3`,children:t.conflicts.map(e=>(0,L.jsx)(se,{conflict:e,value:d(e.key)??e.original,kept:(n.keepNames??[]).includes(e.key),onName:t=>f({names:{...n.names,[e.key]:t}}),onKeep:t=>{let r=new Set(n.keepNames??[]),i={...n.names};t?(r.add(e.key),delete i[e.key]):(r.delete(e.key),i[e.key]=U(e,o(`restoreDialog.suggested`,{name:`{{name}}`}))),f({keepNames:[...r],names:i})}},e.key))})}),t.relations.length>0&&(0,L.jsx)(X,{title:o(`restoreDialog.relations`),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:t.relations.map(e=>(0,L.jsx)(ce,{relation:e,onInclude:t=>{let r=new Set(n.include??[]);t?r.add(e.key):r.delete(e.key),f({include:[...r]})}},`${e.state}-${e.kind}-${e.key??e.title}`))})})]})})}function X({title:e,hint:t,children:n}){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-[12px] font-semibold tracking-[0.04em] text-ink-3 uppercase`,children:e}),t&&(0,L.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-ink-3`,children:t})]}),n]})}function Z({checked:e,onSelect:t,title:n,children:r}){return(0,L.jsxs)(`div`,{className:i(`rounded-[12px] border px-3.5 py-3 transition-colors`,e?`border-accent bg-accent-soft`:`border-line`),children:[(0,L.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5 font-medium`,children:[(0,L.jsx)(`input`,{type:`radio`,checked:e,onChange:t,className:`size-4 accent-[var(--accent)]`}),n]}),(0,L.jsx)(`div`,{className:`mt-1.5 pl-[26px] text-[13px] text-ink-2`,children:r})]})}function oe({nodes:e,exclude:n,onChange:r}){let{t:a}=c([`trash`,`common`]),o=(0,I.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.parentKey,[...t.get(n.parentKey)??[],n]);return t},[e]),s=e[0],[l,u]=(0,I.useState)(()=>new Set([s.key])),d=new Set(n),f=e=>r(e.included?[...d,e.key]:[...d].filter(t=>t!==e.key)),p=(e,n,r)=>{let c=o.get(e.key)??[],d=l.has(e.key),m=e.title||a(`common:untitled`);return(0,L.jsxs)(`li`,{children:[(0,L.jsxs)(`div`,{className:`flex min-h-8 items-center gap-2 rounded-[8px] pr-2 hover:bg-hover`,style:{paddingLeft:n*18},children:[c.length>0?(0,L.jsx)(`button`,{type:`button`,className:`grid size-6 place-items-center rounded-[6px] text-ink-3 hover:text-ink`,"aria-expanded":d,"aria-label":a(d?`collapse`:`expand`,{name:m}),onClick:()=>u(t=>new Set(d?[...t].filter(t=>t!==e.key):[...t,e.key])),children:(0,L.jsx)(t,{className:i(`size-3.5 transition-transform`,d&&`rotate-90`)})}):(0,L.jsx)(`span`,{className:`size-6`}),(0,L.jsx)(v,{checked:e.included,disabled:e===s||!r,onChange:()=>f(e),label:a(`restoreDialog.include`,{name:m}),size:16}),(0,L.jsx)(`span`,{className:`text-ink-3 [&_svg]:size-3.5`,children:(0,L.jsx)(z,{kind:e.kind})}),(0,L.jsx)(`span`,{className:i(`min-w-0 flex-1 truncate`,!e.included&&`text-ink-3 line-through decoration-ink-4`),children:m}),e.earlier&&(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-sunken px-2 py-0.5 text-[11px] text-ink-3`,children:a(`earlier`)})]}),c.length>0&&d&&(0,L.jsx)(`ul`,{children:c.map(t=>p(t,n+1,r&&e.included))})]},e.key)};return(0,L.jsx)(`ul`,{className:`max-h-[280px] overflow-y-auto rounded-[12px] border border-line p-1.5`,children:p(s,0,!0)})}function se({conflict:e,value:t,kept:n,onName:r,onKeep:i}){let{t:a}=c([`trash`,`common`]),o=a(`kindA.${e.kind}`,{name:e.original||a(`common:untitled`)}),s=B[e.kind]??300;return(0,L.jsxs)(`li`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`p`,{children:e.where?a(`restoreDialog.nameTaken`,{what:o,where:e.where}):a(`restoreDialog.nameTakenTop`,{what:o})}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,L.jsx)(`input`,{className:`field h-9 min-w-[200px] flex-1`,value:n?e.original:t,maxLength:s,disabled:n,"aria-label":a(`restoreDialog.newName`,{name:e.original}),"aria-invalid":!n&&(!t.trim()||e.taken&&e.name===t)?!0:void 0,onChange:e=>r(e.target.value)}),(0,L.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 text-[13px] text-ink-2`,children:[(0,L.jsx)(v,{checked:n,onChange:i,label:a(`restoreDialog.keepName`),size:16}),(0,L.jsx)(`span`,{"aria-hidden":!0,children:a(`restoreDialog.keepName`)})]})]}),!n&&!t.trim()&&(0,L.jsx)(`p`,{className:`text-[12.5px] text-danger`,children:a(`restoreDialog.nameEmpty`)}),!n&&t.trim()&&e.taken&&e.name===t&&(0,L.jsx)(`p`,{className:`text-[12.5px] text-danger`,children:a(`restoreDialog.nameStillTaken`)})]})}function ce({relation:e,onInclude:t}){let{t:n}=c([`trash`,`common`]),r=n(`relationKind.${e.kind}`,{name:e.title||n(`common:untitled`)}),i=e.count>1?n(`restoreDialog.ofMany`,{count:e.count}):n(`restoreDialog.ofOne`,{name:e.first||n(`common:untitled`)});if(e.state===`trash`&&e.canInclude)return(0,L.jsxs)(`li`,{className:`flex items-start gap-2.5`,children:[(0,L.jsx)(v,{checked:e.included,onChange:t,label:n(`restoreDialog.bringToo`,{what:r}),size:16,className:`mt-0.5`}),(0,L.jsxs)(`p`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:r}),` `,(0,L.jsx)(`span`,{className:`text-ink-3`,children:i}),(0,L.jsx)(`br`,{}),(0,L.jsx)(`span`,{className:`text-[12.5px] text-ink-3`,children:e.included?n(`restoreDialog.comesToo`):n(`restoreDialog.waits`)})]})]});let a=e.state===`trash`?n(`restoreDialog.staysWaiting`,{what:r,of:i}):e.state===`gone`?n(`restoreDialog.gone.${e.kind}`,{of:i}):n(`restoreDialog.otherBoard`,{what:r,of:i});return(0,L.jsx)(`li`,{className:`text-ink-2`,children:a})}function Q({workspaceId:e,choose:t,value:n,onChange:r}){let{t:i}=c([`trash`,`common`]),a=l(e).data?.projects??[],[o,u]=(0,I.useState)(``),[d,f]=(0,I.useState)(``),[p,m]=(0,I.useState)(``),[h,g]=(0,I.useState)(t.includes(`card`)?`card`:t[0]),_=s(p||null),v=a.find(e=>e.id===o),y=e=>t.includes(e),b=(e,t,n,r,i)=>(0,L.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[12px] font-medium text-ink-3`,children:e}),(0,L.jsxs)(`select`,{className:`field h-9`,value:t,onChange:e=>r(e.target.value),children:[(0,L.jsx)(`option`,{value:``,children:i}),n.map(e=>(0,L.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}),x=(0,I.useMemo)(()=>{let e=v?.pages??[],t=[],n=(r,a)=>{for(let o of e.filter(e=>e.parentId===r).sort((e,t)=>e.position<t.position?-1:1))t.push({value:o.id,label:`${` `.repeat(a)}${o.title||i(`common:untitled`)}`}),a<20&&n(o.id,a+1)};return n(null,0),t},[v,i]),S=a.map(e=>({value:e.id,label:e.name}));return h===`card`||h===`checklist`||y(`checklist`)&&!y(`card`)?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[y(`card`)&&y(`page`)&&(0,L.jsx)($,{mode:h,setMode:e=>(g(e),r(null))}),(0,L.jsx)(ue,{workspaceId:e,value:p,onChange:e=>{m(e),r(e&&y(`card`)?{kind:`card`,id:e}:null)}}),y(`checklist`)&&p&&b(i(`picker.checklist`),n?.kind===`checklist`?n.id:``,(_.data?.checklists??[]).map(e=>({value:e.id,label:e.title})),e=>r(e?{kind:`checklist`,id:e}:null),i(`picker.chooseChecklist`))]}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[y(`card`)&&y(`page`)&&(0,L.jsx)($,{mode:h,setMode:e=>(g(e),r(null))}),b(i(`picker.project`),o,S,e=>{u(e),f(``),y(`project`)&&(h===`project`||h===`page`)?r(e?{kind:`project`,id:e}:null):r(null)},i(`picker.chooseProject`)),v&&(y(`board`)||y(`column`))&&b(i(`picker.board`),d,v.boards.map(e=>({value:e.id,label:e.name})),e=>{f(e),r(e&&y(`board`)?{kind:`board`,id:e}:null)},i(`picker.chooseBoard`)),d&&y(`column`)&&(0,L.jsx)(le,{boardId:d,render:e=>b(i(`picker.column`),n?.kind===`column`?n.id:``,e,e=>r(e?{kind:`column`,id:e}:null),i(`picker.chooseColumn`))}),v&&y(`page`)&&b(i(y(`project`)?`picker.parent`:`picker.page`),n?.kind===`page`?n.id:``,x,e=>r(e?{kind:`page`,id:e}:y(`project`)?{kind:`project`,id:v.id}:null),i(y(`project`)?`picker.atTop`:`picker.choosePage`))]})}function le({boardId:e,render:t}){return t((r(e).data?.columns??[]).map(e=>({value:e.id,label:e.name})))}function $({mode:e,setMode:t}){let{t:n}=c(`trash`);return(0,L.jsx)(`div`,{className:`flex gap-1.5`,role:`radiogroup`,"aria-label":n(`picker.in`),children:[`card`,`page`].map(r=>(0,L.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===r,onClick:()=>t(r),className:i(`rounded-[8px] px-2.5 py-1 text-[12.5px] font-medium`,e===r?`bg-surface text-ink shadow-sm ring-1 ring-line`:`text-ink-3 hover:text-ink`),children:n(`picker.${r}`)},r))})}function ue({workspaceId:e,value:t,onChange:n}){let{t:r}=c([`trash`,`common`]),[a,s]=(0,I.useState)(``),l=o(e,a,`card`),u=l.data??[];return(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`text-[12px] font-medium text-ink-3`,children:r(`picker.card`)}),(0,L.jsx)(`input`,{className:`field h-9`,value:a,onChange:e=>s(e.target.value),placeholder:r(`picker.searchCard`)})]}),a.trim().length>=2&&(0,L.jsxs)(`ul`,{className:`max-h-[160px] overflow-y-auto rounded-[10px] border border-line p-1`,"aria-label":r(`picker.results`),children:[u.length===0&&!l.isFetching&&(0,L.jsx)(`li`,{className:`px-2 py-1.5 text-ink-3`,children:r(`picker.noCards`)}),u.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{type:`button`,"aria-pressed":t===e.id,onClick:()=>n(t===e.id?``:e.id),className:i(`flex w-full flex-col items-start rounded-[8px] px-2 py-1.5 text-left hover:bg-hover`,t===e.id&&`bg-accent-soft`),children:[(0,L.jsx)(`span`,{className:`truncate font-medium`,children:e.title||r(`common:untitled`)}),(0,L.jsx)(`span`,{className:`truncate text-[12px] text-ink-3`,children:[e.projectName,e.boardName,e.columnName].filter(Boolean).join(` › `)})]})},e.id))]})]})}export{ne as n,z as r,te as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as router}from"./router-C3-WXlLY.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConsentPage-CXS-bOLl.js","assets/rolldown-runtime-XKyaHtl9.js","assets/format-Dk1nO38Z.js","assets/triangle-exclamation-point-BTUlFMkc.js","assets/shield-exclamation-point-sqW5yuTY.js","assets/States-D9T0E3QG.js","assets/Button-CHkkj3LG.js","assets/Avatar-B1img0gb.js","assets/theme-BfxBDblB.js","assets/AccessRows-BukzKFuJ.js","assets/Checkbox-S2SJTJty.js","assets/Segmented-BibQ5uCT.js","assets/destination-CEcYXsDA.js","assets/HomePage-Bm_gsAiP.js","assets/arrow-up-right-GSt0z737.js","assets/check-A2t_TRNF.js","assets/square-kanban-Cd_tPOtx.js","assets/lock-keyhole-DVrMCpqy.js","assets/Menu-CzgZwzmu.js","assets/ActivityList-TVMXixkB.js","assets/Trans-CA0OvHif.js","assets/activity-C0-uReAO.js","assets/Phrases-C89QdC4L.js","assets/CardItem-BAkxFtTs.js","assets/paperclip-BnASHXPW.js","assets/realtime-Dn6o1BHn.js","assets/PageHeader-DJdrnGpr.js","assets/ProjectPage-hVAuJHb8.js","assets/file-plus-B9m4uZcE.js","assets/pencil-C37OTkSN.js","assets/plus-DcOCeQtr.js","assets/trash-CkQBpprn.js","assets/ProjectSettingsDialog-ekHTFmaO.js","assets/dist-DFO0RDUp.js","assets/Field-BsUKJQ-4.js","assets/ColorPicker-DSVbH2ix.js","assets/actions-TwDLbdln.js","assets/trash-BtTKuFPT.js","assets/BoardPage-DiTjq46K.js","assets/EmptyState-D6CMbgBz.js","assets/Popover-BVPB22vZ.js","assets/chevron-down-MyAtFaeL.js","assets/tag-CBK0qBXV.js","assets/markdown-html-Bbis0Fwx.js","assets/chevron-right-BGyQzokh.js","assets/download-CRdduKx2.js","assets/markdown-html-3z2pX2_I.css","assets/search-6TSW8Big.js","assets/BoardPage-RiEPvGmp.css","assets/DocPage-8QmjOXZg.js","assets/folder-open-DCuG03EB.js","assets/download-CHH-5Z1W.js","assets/restore-CAzTqClb.js","assets/sticky-note-hvgZ-pol.js","assets/VaultPage-BXNKzLjV.js","assets/eye-CkYWwyJN.js","assets/clock-Dat3GIX9.js","assets/CopyButton-BDbxvAXk.js","assets/sync-Byk1kJR_.js","assets/session-BdZhhrrQ.js","assets/AgentsPage-lZ18h_Fd.js","assets/TokenCard-DcxUdsB4.js","assets/SettingsPage-BlACK1Ir.js","assets/AccessKeyReveal-BhGhJ9TO.js","assets/TrashPage-DtEce2C1.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{$ as t,$t as n,B as r,C as i,Dt as a,Et as o,Gt as s,H as c,I as l,Jt as u,K as d,Kt as f,L as p,N as m,Ot as h,P as g,Q as _,Qt as v,S as y,U as b,Wt as x,Xt as S,Zt as C,_t as w,at as T,f as E,gt as ee,in as te,nn as D,nt as O,o as k,ot as A,rn as ne,rt as j,vt as re,x as M,xt as ie}from"./format-Dk1nO38Z.js";import{a as ae,c as oe,d as se,f as ce,h as le,l as ue,m as de,n as fe,o as pe,p as me,s as he}from"./dist-DFO0RDUp.js";import{i as ge,n as N,r as _e,t as ve}from"./theme-BfxBDblB.js";import{n as ye,t as be}from"./eye-CkYWwyJN.js";import{t as P}from"./Trans-CA0OvHif.js";import{a as xe,i as Se,n as Ce,t as F}from"./States-D9T0E3QG.js";import{t as I}from"./Button-CHkkj3LG.js";import{t as we}from"./CopyButton-BDbxvAXk.js";import{t as Te}from"./Field-BsUKJQ-4.js";import{n as Ee,t as De}from"./AccessKeyReveal-BhGhJ9TO.js";import{n as Oe,t as ke}from"./TokenCard-DcxUdsB4.js";import{n as Ae,t as je}from"./Avatar-B1img0gb.js";import{a as Me}from"./activity-C0-uReAO.js";import{a as Ne,c as Pe,s as Fe}from"./realtime-Dn6o1BHn.js";import{V as L,Y as R,a as Ie,c as Le,d as Re,g as ze,i as Be,l as Ve,n as z,o as He,p as Ue,q as B,r as We,s as Ge,t as Ke,u as V}from"./Menu-CzgZwzmu.js";import{n as qe,t as Je}from"./square-kanban-Cd_tPOtx.js";import{t as Ye}from"./folder-open-DCuG03EB.js";import{t as Xe}from"./lock-keyhole-DVrMCpqy.js";import{t as H}from"./plus-DcOCeQtr.js";import{t as Ze}from"./search-6TSW8Big.js";import{t as Qe}from"./trash-CkQBpprn.js";import{n as $e,r as et,u as tt}from"./session-BdZhhrrQ.js";import{t as nt}from"./ColorPicker-DSVbH2ix.js";import{t as rt}from"./Checkbox-S2SJTJty.js";import{t as it}from"./check-A2t_TRNF.js";import{t as at}from"./chevron-right-BGyQzokh.js";import{t as ot}from"./pencil-C37OTkSN.js";import{n as st,t as ct}from"./ProjectSettingsDialog-ekHTFmaO.js";import{r as lt,t as ut}from"./actions-TwDLbdln.js";var dt={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};dt.node;var ft=o(dt),pt={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};pt.node;var mt=o(pt),ht={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};ht.node;var gt=o(ht),_t={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};_t.node;var vt=o(_t),yt={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};yt.node;var bt=o(yt),xt={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};xt.node;var St=o(xt),Ct={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Ct.node;var wt=o(Ct),U=e(te(),1);function Tt(e,t=window.location.origin){if(!e)return`/`;try{let n=new URL(e,t);return n.origin!==t||n.pathname.startsWith(`//`)?`/`:`${n.pathname}${n.search}${n.hash}`}catch{return`/`}}var W=ne();function Et(){let{t:e}=h(`auth`);return(0,W.jsxs)(`svg`,{viewBox:`0 0 420 420`,className:`h-auto w-full max-w-[420px]`,role:`img`,"aria-label":e(`orbit.label`),children:[(0,W.jsx)(`defs`,{children:(0,W.jsxs)(`radialGradient`,{id:`core`,cx:`50%`,cy:`40%`,r:`60%`,children:[(0,W.jsx)(`stop`,{offset:`0%`,stopColor:`var(--ink)`,stopOpacity:`0.92`}),(0,W.jsx)(`stop`,{offset:`100%`,stopColor:`var(--ink)`})]})}),(0,W.jsx)(`circle`,{cx:`210`,cy:`210`,r:`168`,fill:`none`,stroke:`var(--line-strong)`,strokeDasharray:`2 7`,strokeLinecap:`round`}),(0,W.jsx)(`circle`,{cx:`210`,cy:`210`,r:`104`,fill:`none`,stroke:`var(--line-strong)`}),(0,W.jsxs)(`g`,{className:`orbit-spin`,style:{transformOrigin:`210px 210px`},children:[(0,W.jsx)(`circle`,{cx:`210`,cy:`42`,r:`15`,fill:`var(--agent)`,opacity:`0.14`}),(0,W.jsx)(`circle`,{cx:`210`,cy:`42`,r:`8`,fill:`var(--agent)`}),(0,W.jsx)(`path`,{d:`M206.5 42h7M210 38.5v7`,stroke:`white`,strokeWidth:`1.6`,strokeLinecap:`round`})]}),(0,W.jsxs)(`g`,{children:[(0,W.jsx)(`circle`,{cx:`118`,cy:`162`,r:`25`,fill:`var(--surface)`,stroke:`var(--line-strong)`}),(0,W.jsx)(`rect`,{x:`106`,y:`152`,width:`7`,height:`19`,rx:`2`,fill:`var(--accent)`}),(0,W.jsx)(`rect`,{x:`115.5`,y:`152`,width:`7`,height:`13`,rx:`2`,fill:`var(--accent)`,opacity:`0.6`}),(0,W.jsx)(`rect`,{x:`125`,y:`152`,width:`7`,height:`9`,rx:`2`,fill:`var(--accent)`,opacity:`0.35`}),(0,W.jsx)(`text`,{x:`118`,y:`206`,textAnchor:`middle`,className:`fill-ink-2 text-[15px] font-medium`,children:e(`orbit.tasks`)})]}),(0,W.jsxs)(`g`,{children:[(0,W.jsx)(`circle`,{cx:`302`,cy:`162`,r:`25`,fill:`var(--surface)`,stroke:`var(--line-strong)`}),(0,W.jsx)(`rect`,{x:`291`,y:`150`,width:`22`,height:`25`,rx:`3`,fill:`none`,stroke:`var(--ink-2)`,strokeWidth:`1.8`}),(0,W.jsx)(`path`,{d:`M296 158h12M296 163h12M296 168h7`,stroke:`var(--ink-2)`,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,W.jsx)(`text`,{x:`302`,y:`206`,textAnchor:`middle`,className:`fill-ink-2 text-[15px] font-medium`,children:e(`orbit.docs`)})]}),(0,W.jsx)(`circle`,{cx:`210`,cy:`226`,r:`34`,fill:`url(#core)`}),(0,W.jsx)(`path`,{d:`M220.5 214.5A14 14 0 1 0 224.5 226`,fill:`none`,stroke:`var(--sheet)`,strokeWidth:`4.2`,strokeLinecap:`round`}),(0,W.jsx)(`circle`,{cx:`222.6`,cy:`212.6`,r:`3.6`,fill:`var(--accent)`}),(0,W.jsxs)(`g`,{children:[(0,W.jsx)(`circle`,{cx:`372`,cy:`356`,r:`34`,fill:`var(--sheet)`,stroke:`var(--ok)`,strokeWidth:`1.5`,strokeDasharray:`3 4`}),(0,W.jsx)(`rect`,{x:`359`,y:`352`,width:`26`,height:`20`,rx:`5`,fill:`var(--ink)`}),(0,W.jsx)(`path`,{d:`M364 352v-5a8 8 0 0 1 16 0v5`,fill:`none`,stroke:`var(--ink)`,strokeWidth:`3`}),(0,W.jsx)(`circle`,{cx:`372`,cy:`361`,r:`2.6`,fill:`var(--sheet)`}),(0,W.jsx)(`text`,{x:`372`,y:`408`,textAnchor:`middle`,className:`fill-ink-2 text-[15px] font-medium`,children:e(`orbit.vault`)})]}),(0,W.jsx)(`style`,{children:`
|
|
3
|
+
.orbit-spin { animation: orbit 18s linear infinite; }
|
|
4
|
+
@keyframes orbit { to { transform: rotate(360deg); } }
|
|
5
|
+
@media (prefers-reduced-motion: reduce) { .orbit-spin { animation: none; } }
|
|
6
|
+
`})]})}var Dt=[`tasks`,`docs`,`vault`,`agents`],Ot={docker:`docker compose exec app node dist/cli.js reset-access`,source:`pnpm cli reset-access`},kt=(e,t)=>`npx create-orqevio@latest ${e}${t&&t!==`orqevio`?` --name ${t}`:``}`;function G({value:e}){return(0,W.jsxs)(`div`,{className:`mt-2 flex items-center gap-2 rounded-[10px] border border-line bg-sheet py-1.5 pr-1.5 pl-3`,children:[(0,W.jsx)(`code`,{className:`min-w-0 flex-1 font-mono text-[12.5px] break-words text-ink`,children:e}),(0,W.jsx)(we,{value:e})]})}function At({title:e,subtitle:t,children:n}){let{t:r}=h(`auth`);return(0,W.jsxs)(`div`,{className:`grid min-h-dvh bg-desk lg:grid-cols-[minmax(0,1.1fr)_minmax(440px,0.9fr)]`,children:[(0,W.jsxs)(`aside`,{className:`grain relative hidden overflow-hidden border-r border-line lg:flex lg:flex-col lg:justify-between lg:p-12 xl:p-16`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,W.jsx)(Se,{size:30}),(0,W.jsx)(xe,{})]}),(0,W.jsxs)(`div`,{className:`grid items-center gap-10 xl:grid-cols-[1fr_minmax(0,380px)]`,children:[(0,W.jsxs)(`div`,{className:`animate-rise`,children:[(0,W.jsx)(`h1`,{className:`font-display text-[52px] leading-[1.02] font-medium tracking-[-0.03em] xl:text-[62px]`,children:(0,W.jsx)(P,{t:r,i18nKey:`hero.title`,components:{br:(0,W.jsx)(`br`,{}),accent:(0,W.jsx)(`span`,{className:`italic text-accent`})}})}),(0,W.jsx)(`p`,{className:`mt-6 max-w-[440px] text-[16px] leading-relaxed text-ink-2`,children:r(`hero.body`)})]}),(0,W.jsx)(`div`,{className:`hidden xl:block`,children:(0,W.jsx)(Et,{})})]}),(0,W.jsx)(`ul`,{className:`grid max-w-[720px] grid-cols-2 gap-x-10 gap-y-5`,children:Dt.map((e,t)=>(0,W.jsxs)(`li`,{className:`animate-rise`,style:{animationDelay:`${120+t*60}ms`},children:[(0,W.jsxs)(`p`,{className:`flex items-center gap-2 text-[13px] font-semibold`,children:[(0,W.jsxs)(`span`,{className:`font-mono text-[11px] text-ink-3`,children:[`0`,t+1]}),r(`pillars.${e}.title`)]}),(0,W.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-ink-2`,children:r(`pillars.${e}.body`)})]},e))})]}),(0,W.jsxs)(`main`,{className:`flex flex-col items-center justify-center bg-sheet px-6 py-12 sm:px-10`,children:[(0,W.jsxs)(`div`,{className:`mb-10 flex items-center gap-2.5 lg:hidden`,children:[(0,W.jsx)(Se,{size:30}),(0,W.jsx)(xe,{})]}),(0,W.jsxs)(`div`,{className:`animate-rise w-full max-w-[380px]`,children:[(0,W.jsx)(`h2`,{className:`font-display text-[30px] leading-tight font-medium tracking-[-0.02em]`,children:e}),(0,W.jsx)(`p`,{className:`mt-2 text-[14px] leading-relaxed text-ink-2`,children:t}),(0,W.jsx)(`div`,{className:`mt-8`,children:n})]}),(0,W.jsx)(Ee,{compact:!0,className:`mt-12`,onChange:e=>void c(e)})]})]})}function jt({children:e}){return(0,W.jsx)(`p`,{role:`alert`,className:`rounded-[10px] bg-danger-soft px-3 py-2.5 text-[13px] text-danger`,children:e})}function Mt({field:e,value:t,onChange:n,error:r,autoComplete:i,autoFocus:a,hint:o}){let{t:s}=h(`auth`),[c,l]=(0,U.useState)(!1);return(0,W.jsx)(Te,{label:s(`fields.${e}.label`),type:c?`text`:`password`,autoComplete:i,spellCheck:!1,value:t,onChange:e=>n(e.target.value),error:r,hint:o,autoFocus:a,className:`[&_input]:font-mono`,trailing:(0,W.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`grid size-8 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,"aria-label":s(c?`fields.${e}.hide`:`fields.${e}.show`),children:c?(0,W.jsx)(ye,{className:`size-4`}):(0,W.jsx)(be,{className:`size-4`})})})}function Nt({mode:e}){let{t}=h(`auth`),r=i(),a=C(),[o]=n(),c=D(),[l,u]=(0,U.useState)(null),d=Tt(o.get(`next`));async function f(){c.removeQueries({queryKey:M.me}),await c.invalidateQueries({queryKey:M.access}),a(d,{replace:!0})}if(l)return(0,W.jsx)(At,{title:t(`revealed.${l.kind}.title`),subtitle:t(`revealed.${l.kind}.subtitle`),children:(0,W.jsx)(De,{accessKey:l.accessKey,confirmLabel:t(`revealed.continue`),onDone:()=>void f(),children:l.reason&&(0,W.jsx)(Lt,{reason:l.reason})})});if(!r.isFetchedAfterMount)return(0,W.jsx)(F,{});let p=r.data;if(p&&!p.user&&p.uninstalled)return(0,W.jsx)(zt,{details:p.uninstalled});if(p?.user)return(0,W.jsx)(s,{to:d,replace:!0});let m=!p||p.claimed,g=o.toString()?`?${o.toString()}`:``;return e===`login`&&!m?(0,W.jsx)(s,{to:`/setup${g}`,replace:!0}):e===`setup`&&m?(0,W.jsx)(s,{to:`/login${g}`,replace:!0}):e===`setup`?(0,W.jsx)(Pt,{onClaimed:e=>u({accessKey:e,kind:`setup`})}):(0,W.jsx)(Ft,{copy:{install:p&&!p.user?p.install:`source`,copyName:p&&!p.user?p.copyName:null},onSignedIn:()=>void f(),onRecovered:(e,t)=>u({accessKey:e,kind:`recovery`,reason:t})})}function Pt({onClaimed:e}){let{t}=h(`auth`),[n,r]=(0,U.useState)(``),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)({}),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(!1);async function f(r){r.preventDefault(),l(null);let a=ee.safeParse({setupCode:n,name:i,locale:b()});if(a.success){s({}),d(!0);try{e((await A(`/auth/claim`,a.data)).accessKey)}catch(e){l(O(e))}finally{d(!1)}}else{let e={};for(let n of a.error.issues){let r=String(n.path[0]);e[r]??=t(r===`setupCode`?`setup.missingSetupCode`:`setup.missingName`)}s(e)}}return(0,W.jsx)(At,{title:t(`setup.title`),subtitle:t(`setup.subtitle`),children:(0,W.jsxs)(`form`,{onSubmit:f,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,W.jsx)(Mt,{field:`setupCode`,value:n,onChange:r,error:o.setupCode,autoComplete:`off`,autoFocus:!0}),(0,W.jsx)(Te,{label:t(`fields.name.label`),autoComplete:`name`,value:i,onChange:e=>a(e.target.value),error:o.name,hint:t(`fields.name.hint`),maxLength:80}),c&&(0,W.jsx)(jt,{children:c}),(0,W.jsx)(I,{type:`submit`,variant:`primary`,size:`lg`,loading:u,className:`mt-2 w-full`,children:t(`setup.submit`)})]})})}function Ft({copy:e,onSignedIn:t,onRecovered:n}){let{t:r}=h(`auth`),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(!1),[f,p]=(0,U.useState)(!1);async function m(e){e.preventDefault(),l(null);let n=re.safeParse({accessKey:i});if(!n.success)s(r(`login.missingAccessKey`));else{s(void 0),d(!0);try{await A(`/auth/login`,n.data),t()}catch(e){l(O(e))}finally{d(!1)}}}return(0,W.jsxs)(At,{title:r(`login.title`),subtitle:r(`login.subtitle`),children:[(0,W.jsxs)(`form`,{onSubmit:m,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,W.jsx)(Mt,{field:`accessKey`,value:i,onChange:a,error:o,autoComplete:`current-password`,autoFocus:!0}),c&&(0,W.jsx)(jt,{children:c}),(0,W.jsx)(I,{type:`submit`,variant:`primary`,size:`lg`,loading:u,className:`mt-2 w-full`,children:r(`login.submit`)})]}),(0,W.jsx)(`div`,{className:`mt-6 text-center`,children:(0,W.jsx)(`button`,{type:`button`,onClick:()=>p(e=>!e),"aria-expanded":f,className:`text-[13.5px] font-medium text-ink-2 underline decoration-line-strong underline-offset-4 hover:text-ink hover:decoration-accent`,children:r(`login.lostKey`)})}),f&&(0,W.jsx)(It,{copy:e,onRecovered:n})]})}function It({copy:e,onRecovered:t}){let{t:n}=h(`auth`),r=(0,W.jsx)(`code`,{className:`font-mono text-[12px] text-ink`}),i=Ot[e.install],[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(!1);async function m(e){if(e.preventDefault(),d(null),!o.trim()){d(n(`recovery.missingSetupCode`));return}let r=w.safeParse({setupCode:o,reason:c});if(!r.success)d(n(`recovery.missingReason`));else{p(!0);try{t((await A(`/auth/recover`,r.data)).accessKey,r.data.reason)}catch(e){d(O(e))}finally{p(!1)}}}return(0,W.jsxs)(`div`,{className:`mt-4 rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[e.install===`cli`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:n(`recovery.cli`)}),(0,W.jsx)(G,{value:kt(`recover`,e.copyName)})]}),e.install===`button`&&(0,W.jsx)(`p`,{children:(0,W.jsx)(P,{t:n,i18nKey:`recovery.button`,values:{name:e.copyName??`orqevio`},components:{code:r}})}),e.install===`cloudflare`&&(0,W.jsx)(`p`,{children:(0,W.jsx)(P,{t:n,i18nKey:`recovery.cloudflare`,components:{code:r}})}),i&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:n(`recovery.intro`)}),(0,W.jsxs)(`ul`,{className:`mt-2 flex list-disc flex-col gap-1.5 pl-5`,children:[(0,W.jsxs)(`li`,{children:[n(`recovery.withCommand`),(0,W.jsx)(G,{value:i})]}),(0,W.jsx)(`li`,{children:(0,W.jsx)(P,{t:n,i18nKey:`recovery.withNewCode`,components:{code:r}})})]})]}),(0,W.jsx)(`p`,{className:`mt-2`,children:n(`recovery.vaultUnaffected`)}),(0,W.jsxs)(`form`,{onSubmit:m,className:`mt-4 flex flex-col gap-3`,noValidate:!0,children:[(0,W.jsx)(Mt,{field:`newSetupCode`,value:o,onChange:s,autoComplete:`off`}),(0,W.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,W.jsx)(`legend`,{className:`mb-1 text-[13px] font-medium text-ink`,children:n(`recovery.reason.legend`)}),[`lost`,`compromised`].map(e=>(0,W.jsxs)(`label`,{className:a(`flex cursor-pointer items-start gap-3 rounded-[10px] border bg-sheet px-3 py-2.5`,c===e?`border-accent`:`border-line`),children:[(0,W.jsx)(`input`,{type:`radio`,name:`recovery-reason`,value:e,checked:c===e,onChange:()=>l(e),className:`mt-1 size-4 accent-[var(--accent)]`}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`block text-[13px] font-medium text-ink`,children:n(`recovery.reason.${e}.label`)}),(0,W.jsx)(`span`,{className:`block text-[12.5px] text-ink-3`,children:n(`recovery.reason.${e}.hint`)})]})]},e))]}),u&&(0,W.jsx)(jt,{children:u}),(0,W.jsx)(I,{type:`submit`,variant:`primary`,loading:f,children:n(`recovery.submit`)})]})]})}function Lt({reason:e}){let{t}=h(`auth`),n=p(),r=Oe();if(e===`compromised`)return(0,W.jsx)(`p`,{className:`mt-4 rounded-[12px] border border-line bg-sunken px-3.5 py-3 text-[13px] text-ink-2`,children:t(`revealed.agents.revoked`)});let i=(n.data??[]).filter(e=>!e.revokedAt&&(!e.expiresAt||new Date(e.expiresAt)>new Date));return(0,W.jsxs)(`section`,{className:`mt-4`,"aria-labelledby":`recovered-agents`,children:[(0,W.jsx)(`h2`,{id:`recovered-agents`,className:`text-[13px] font-medium text-ink`,children:t(`revealed.agents.title`)}),n.data&&i.length===0?(0,W.jsx)(`p`,{className:`mt-1 text-[12.5px] text-ink-3`,children:t(`revealed.agents.none`)}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`mt-1 text-[12.5px] text-ink-3`,children:t(`revealed.agents.review`)}),(0,W.jsx)(`div`,{className:`mt-2 flex max-h-[320px] flex-col gap-2 overflow-y-auto`,children:i.map(e=>(0,W.jsx)(ke,{token:e,onRevoke:()=>void r(e)},e.id))})]})]})}function Rt({backups:e,docker:t}){let{t:n}=h(`auth`),{kept:r,where:i}=e;if(!r&&i.kind===`folder`)return null;let a=(0,W.jsx)(`code`,{className:`font-mono text-[12px] break-words text-ink`}),o=r?i.kind===`folder`?`keptFolder`:`keptBucket`:`deletedBucket`;return(0,W.jsxs)(`div`,{className:`mt-3 rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[(0,W.jsx)(`p`,{children:(0,W.jsx)(P,{t:n,i18nKey:`uninstalled.backups.${o}`,values:{name:i.name},components:{code:a}})}),r&&i.kind===`folder`&&t&&(0,W.jsx)(G,{value:`docker compose cp app:${i.name} ./orqevio-backups`})]})}function zt({details:e}){let{t}=h([`auth`,`common`]),n=e.copyName??`orqevio`,r=e.bucket??`${n}-uploads`,i=e=>(0,W.jsx)(`ul`,{className:`mt-2 flex list-disc flex-col gap-1.5 pl-5`,children:e.map(e=>(0,W.jsx)(`li`,{children:t(`uninstalled.steps.${e}`,{name:n,bucket:r})},e))});return(0,W.jsxs)(At,{title:t(`uninstalled.title`),subtitle:t(`uninstalled.subtitle`),children:[(0,W.jsxs)(`div`,{className:`rounded-[14px] border border-line bg-sunken p-4 text-[13px] leading-relaxed text-ink-2`,children:[e.install===`cli`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:t(`uninstalled.cli`)}),(0,W.jsx)(G,{value:kt(`uninstall`,e.copyName)})]}),e.install===`button`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:t(`uninstalled.button`)}),i([`worker`,`bucket`,`repository`,`token`])]}),e.install===`cloudflare`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:t(`uninstalled.cloudflare`)}),i([`worker`,`bucket`])]}),e.install===`docker`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:t(`uninstalled.docker`)}),(0,W.jsx)(G,{value:`docker compose down -v`})]}),e.install===`source`&&(0,W.jsx)(`p`,{children:t(`uninstalled.source`)})]}),e.backups&&(0,W.jsx)(Rt,{backups:e.backups,docker:e.install===`docker`})]})}var Bt=1,Vt=.9,Ht=.8,Ut=.17,Wt=.1,Gt=.999,Kt=.9999,qt=.99,Jt=/[\\\/_+.#"@\[\(\{&]/,Yt=/[\\\/_+.#"@\[\(\{&]/g,Xt=/[\s-]/,Zt=/[\s-]/g;function Qt(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Bt:qt;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Qt(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Bt:Jt.test(e.charAt(l-1))?(d*=Ht,p=e.slice(i,l-1).match(Yt),p&&i>0&&(d*=Gt**+p.length)):Xt.test(e.charAt(l-1))?(d*=Vt,m=e.slice(i,l-1).match(Zt),m&&i>0&&(d*=Gt**+m.length)):(d*=Ut,i>0&&(d*=Gt**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Kt)),(d<Wt&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Qt(e,t,n,r,l+1,a+2,o),f*Wt>d&&(d=f*Wt)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function $t(e){return e.toLowerCase().replace(Zt,` `)}function en(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Qt(e,t,$t(e),$t(t),0,0,{})}var K=`[cmdk-group=""]`,tn=`[cmdk-group-items=""]`,nn=`[cmdk-group-heading=""]`,rn=`[cmdk-item=""]`,an=`${rn}:not([aria-disabled="true"])`,on=`cmdk-item-select`,q=`data-value`,sn=(e,t,n)=>en(e,t,n),cn=U.createContext(void 0),J=()=>U.useContext(cn),ln=U.createContext(void 0),un=()=>U.useContext(ln),dn=U.createContext(void 0),fn=U.forwardRef((e,t)=>{let n=Z(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Z(()=>new Set),i=Z(()=>new Map),a=Z(()=>new Map),o=Z(()=>new Set),s=Cn(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=L(),y=L(),b=L(),x=U.useRef(null),S=Tn();X(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),X(()=>{S(6,D)},[]);let C=U.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)te(),E(),S(1,ee);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=O()?.id,C.emit()}),r||S(5,D),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=U.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{te(),E(),n.current.value||ee(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=O();S(4,()=>{te(),t?.getAttribute(`id`)===e&&ee(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??sn;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;k().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(tn);t?t.appendChild(e.parentElement===t?e:e.closest(`${tn} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${tn} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${K}[${q}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function ee(){let e=k().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(q);C.setState(`value`,e||void 0)}function te(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function D(){var e;let t=O();t&&(t.parentElement?.firstChild===t&&((e=t.closest(K)?.querySelector(nn))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function O(){return x.current?.querySelector(`${rn}[aria-selected="true"]`)}function k(){return Array.from(x.current?.querySelectorAll(an)||[])}function A(e){let t=k()[e];t&&C.setState(`value`,t.getAttribute(q))}function ne(e){var t;let n=O(),r=k(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(q))}function j(e){let t=O()?.closest(K),n;for(;t&&!n;)t=e>0?xn(t,K):Sn(t,K),n=t?.querySelector(an);n?C.setState(`value`,n.getAttribute(q)):ne(e)}let re=()=>A(k().length-1),M=e=>{e.preventDefault(),e.metaKey?re():e.altKey?j(1):ne(1)},ie=e=>{e.preventDefault(),e.metaKey?A(0):e.altKey?j(-1):ne(-1)};return U.createElement(B.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&M(e);break;case`ArrowDown`:M(e);break;case`p`:case`k`:g&&e.ctrlKey&&ie(e);break;case`ArrowUp`:ie(e);break;case`Home`:e.preventDefault(),A(0);break;case`End`:e.preventDefault(),re();break;case`Enter`:{e.preventDefault();let t=O();if(t){let e=new Event(on);t.dispatchEvent(e)}}}}},U.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:On},c),Dn(e,e=>U.createElement(ln.Provider,{value:C},U.createElement(cn.Provider,{value:w},e))))}),pn=U.forwardRef((e,t)=>{let n=L(),r=U.useRef(null),i=U.useContext(dn),a=J(),o=Cn(e),s=o.current?.forceMount??i?.forceMount;X(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=wn(n,r,[e.value,e.children,r],e.keywords),l=un(),u=Q(e=>e.value&&e.value===c.current),d=Q(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);U.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(on,f),()=>t.removeEventListener(on,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return U.createElement(B.div,{ref:R(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),mn=U.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=L(),s=U.useRef(null),c=U.useRef(null),l=L(),u=J(),d=Q(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));X(()=>u.group(o),[]),wn(o,s,[e.value,e.heading,c]);let f=U.useMemo(()=>({id:o,forceMount:i}),[i]);return U.createElement(B.div,{ref:R(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&U.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),Dn(e,e=>U.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},U.createElement(dn.Provider,{value:f},e))))}),hn=U.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=U.useRef(null),a=Q(e=>!e.search);return!n&&!a?null:U.createElement(B.div,{ref:R(i,t),...r,"cmdk-separator":``,role:`separator`})}),gn=U.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=un(),o=Q(e=>e.search),s=Q(e=>e.selectedItemId),c=J();return U.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),U.createElement(B.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),_n=U.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=U.useRef(null),o=U.useRef(null),s=Q(e=>e.selectedItemId),c=J();return U.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),U.createElement(B.div,{ref:R(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Dn(e,e=>U.createElement(`div`,{ref:R(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),vn=U.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return U.createElement(ue,{open:n,onOpenChange:r},U.createElement(de,{container:o},U.createElement(me,{"cmdk-overlay":``,className:i}),U.createElement(se,{"aria-label":e.label,"cmdk-dialog":``,className:a},U.createElement(fn,{ref:t,...s}))))}),yn=U.forwardRef((e,t)=>Q(e=>e.filtered.count===0)?U.createElement(B.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),bn=U.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return U.createElement(B.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Dn(e,e=>U.createElement(`div`,{"aria-hidden":!0},e)))}),Y=Object.assign(fn,{List:_n,Item:pn,Input:gn,Group:mn,Separator:hn,Dialog:vn,Empty:yn,Loading:bn});function xn(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Sn(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Cn(e){let t=U.useRef(e);return X(()=>{t.current=e}),t}var X=typeof window>`u`?U.useEffect:U.useLayoutEffect;function Z(e){let t=U.useRef();return t.current===void 0&&(t.current=e()),t}function Q(e){let t=un(),n=()=>e(t.snapshot());return U.useSyncExternalStore(t.subscribe,n,n)}function wn(e,t,n,r=[]){let i=U.useRef(),a=J();return X(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(q,s),i.current=s}),i}var Tn=()=>{let[e,t]=U.useState(),n=Z(()=>new Map);return X(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function En(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Dn({asChild:e,children:t},n){return e&&U.isValidElement(t)?U.cloneElement(En(t),{ref:t.ref},n(t.props.children)):n(t)}var On={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},kn=e=>e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase(),An=(e,t,n)=>sn(kn(e),kn(t),n?.map(kn));function jn({open:e,onOpenChange:t}){let n=pe(e),{t:r}=h([`shell`,`common`]),{workspaceId:i,overview:a,openNewProject:o}=V(),s=C(),c=tt(),[u,d]=(0,U.useState)(``),[f,p]=(0,U.useState)(``),[m,g]=(0,U.useState)(!1),_=l(i,f,void 0,m),v=`/w/${i}`;(0,U.useEffect)(()=>{let e=setTimeout(()=>p(u),160);return()=>clearTimeout(e)},[u]),(0,U.useEffect)(()=>{e||d(``)},[e]);let y=e=>{t(!1),s(e)},b=e=>{t(!1),e()},x=a?.projects??[],S=(_.data??[]).filter(()=>f.trim().length>=2),w=document.documentElement.dataset.theme===`dark`;return(0,W.jsx)(ue,{open:e,onOpenChange:t,children:(0,W.jsxs)(de,{children:[(0,W.jsx)(me,{className:`fixed inset-0 z-40 bg-[rgb(20_18_14/0.28)] backdrop-blur-[2px] data-[state=open]:animate-[overlay-in_0.15s_ease-out]`}),(0,W.jsxs)(se,{"aria-label":r(`palette.label`),onCloseAutoFocus:n,onEscapeKeyDown:oe,className:`fixed top-[14vh] left-1/2 z-50 w-[calc(100vw-32px)] max-w-[620px] -translate-x-1/2 overflow-hidden rounded-[18px] border border-line bg-sheet shadow-lg outline-none data-[state=open]:animate-[pop_0.18s_var(--ease-out-quint)]`,children:[(0,W.jsx)(le,{className:`sr-only`,children:r(`palette.title`)}),(0,W.jsx)(ce,{className:`sr-only`,children:r(`palette.description`)}),(0,W.jsxs)(Y,{label:r(`palette.label`),loop:!0,filter:An,className:`flex max-h-[min(70vh,560px)] flex-col`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 border-b border-line px-4 pb-2.5 sm:flex-nowrap sm:pb-0`,children:[(0,W.jsx)(Ze,{className:`size-[18px] shrink-0 text-ink-3`}),(0,W.jsx)(Y.Input,{value:u,onValueChange:d,placeholder:r(`palette.placeholder`),className:`h-14 min-w-0 flex-1 bg-transparent text-[15.5px] outline-none placeholder:text-ink-3`}),(0,W.jsxs)(`label`,{className:`flex w-full shrink-0 cursor-pointer items-center gap-1.5 pl-[30px] text-[12px] text-ink-3 select-none sm:w-auto sm:pl-0`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>g(e.target.checked),className:`accent-[var(--accent)]`}),r(`palette.includeArchived`)]}),(0,W.jsx)(`kbd`,{className:`kbd hidden sm:inline-flex`,children:`esc`})]}),(0,W.jsxs)(Y.List,{className:`min-h-0 flex-1 overflow-y-auto p-2 [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:pt-2.5 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:tracking-[0.08em] [&_[cmdk-group-heading]]:text-ink-3 [&_[cmdk-group-heading]]:uppercase`,children:[(0,W.jsx)(Y.Empty,{className:`px-4 py-10 text-center text-[13.5px] text-ink-3`,children:_.isFetching?r(`palette.searching`):r(`palette.noResults`)}),S.length>0&&(0,W.jsx)(Y.Group,{heading:r(`palette.inContent`),children:S.map(e=>(0,W.jsxs)($,{value:`content ${e.type} ${e.id} ${e.title}`,keywords:[f],icon:e.type===`card`?(0,W.jsx)(Je,{}):e.icon?(0,W.jsx)(`span`,{className:`text-[14px]`,children:e.icon}):(0,W.jsx)(qe,{}),onSelect:()=>y(e.type===`card`?`${v}/b/${e.boardId}?card=${e.id}`:`${v}/d/${e.id}`),hint:e.type===`card`?`${e.archived?`${r(`palette.archived`)} · `:``}${e.boardName} · ${e.columnName}`:e.projectName,children:[(0,W.jsx)(`span`,{className:`block truncate`,children:e.title||r(`common:untitled`)}),e.excerpt&&(0,W.jsx)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:e.excerpt})]},`${e.type}-${e.id}`))}),(0,W.jsxs)(Y.Group,{heading:r(`palette.navigate`),children:[(0,W.jsx)($,{value:r(`palette.keywords.home`),icon:(0,W.jsx)(mt,{}),onSelect:()=>y(v),children:r(`nav.home`)}),(0,W.jsx)($,{value:r(`palette.keywords.vault`),icon:(0,W.jsx)(Xe,{}),onSelect:()=>y(`${v}/vault`),children:r(`nav.vault`)}),(0,W.jsx)($,{value:r(`palette.keywords.agents`),icon:(0,W.jsx)(Ae,{}),onSelect:()=>y(`${v}/agents`),children:r(`nav.agents`)}),(0,W.jsx)($,{value:r(`palette.keywords.trash`),icon:(0,W.jsx)(Qe,{}),onSelect:()=>y(`${v}/trash`),children:r(`nav.trash`)}),(0,W.jsx)($,{value:r(`palette.keywords.settings`),icon:(0,W.jsx)(St,{}),onSelect:()=>y(`${v}/settings`),children:r(`user.settings`)})]}),x.length>0&&(0,W.jsxs)(Y.Group,{heading:r(`palette.structure`),children:[x.map(e=>(0,W.jsx)($,{value:`${r(`palette.keywords.project`)} ${e.name} ${e.id}`,icon:(0,W.jsx)(Ye,{}),onSelect:()=>y(`${v}/p/${e.id}`),hint:r(`palette.project`),children:e.name},e.id)),x.flatMap(e=>e.boards.map(t=>(0,W.jsx)($,{value:`${r(`palette.keywords.board`)} ${t.name} ${e.name} ${t.id}`,icon:(0,W.jsx)(Je,{}),onSelect:()=>y(`${v}/b/${t.id}`),hint:e.name,children:t.name},t.id))),x.flatMap(e=>e.pages.map(t=>(0,W.jsx)($,{value:`${r(`palette.keywords.page`)} ${t.title||r(`common:untitled`)} ${e.name} ${t.id}`,icon:t.icon?(0,W.jsx)(`span`,{className:`text-[14px]`,children:t.icon}):(0,W.jsx)(qe,{}),onSelect:()=>y(`${v}/d/${t.id}`),hint:e.name,children:t.title||r(`common:untitled`)},t.id)))]}),(0,W.jsxs)(Y.Group,{heading:r(`palette.actions`),children:[(0,W.jsx)($,{value:r(`palette.keywords.newProject`),icon:(0,W.jsx)(H,{}),onSelect:()=>b(o),children:r(`palette.newProject`)}),(0,W.jsx)($,{value:r(`palette.keywords.theme`),icon:w?(0,W.jsx)(wt,{}):(0,W.jsx)(bt,{}),onSelect:()=>b(()=>{let e=w?`light`:`dark`;ve(e),T(`/account`,{theme:e}).catch(()=>{})}),children:r(w?`palette.lightTheme`:`palette.darkTheme`)}),!c&&(0,W.jsx)($,{value:r(`palette.keywords.lockVault`),icon:(0,W.jsx)(Xe,{}),onSelect:()=>b($e),children:r(`palette.lockVault`)})]})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-4 border-t border-line px-4 py-2 text-[11.5px] text-ink-3`,children:[(0,W.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,W.jsx)(`kbd`,{className:`kbd`,children:`↑`}),(0,W.jsx)(`kbd`,{className:`kbd`,children:`↓`}),` `,r(`palette.hintNavigate`)]}),(0,W.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,W.jsx)(`kbd`,{className:`kbd`,children:`↵`}),` `,r(`palette.hintOpen`)]}),_.isFetching&&(0,W.jsx)(`span`,{className:`ml-auto`,children:r(`palette.searching`)})]})]})]})]})})}function $({value:e,icon:t,children:n,onSelect:r,hint:i,keywords:a}){return(0,W.jsxs)(Y.Item,{value:e,keywords:a,onSelect:r,className:`flex min-h-10 cursor-default items-center gap-3 rounded-[10px] px-2.5 py-1.5 text-[13.5px] text-ink outline-none select-none data-[selected=true]:bg-hover [&>svg]:size-[16px] [&>svg]:shrink-0 [&>svg]:text-ink-3`,children:[(0,W.jsx)(`span`,{className:`grid size-[18px] shrink-0 place-items-center text-ink-3 [&>svg]:size-[16px]`,children:t}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col sm:flex-row sm:items-center sm:gap-3`,children:[(0,W.jsx)(`span`,{className:`min-w-0 flex-1`,children:n}),i&&(0,W.jsx)(`span`,{className:`truncate text-[12px] text-ink-3 sm:max-w-[40%] sm:shrink-0`,children:i})]})]})}function Mn({open:e,onOpenChange:t}){let{t:n}=h([`shell`,`common`]),{workspaceId:r}=V(),i=C(),[a,o]=(0,U.useState)(``),[s,c]=(0,U.useState)(`cobalt`),[l,u]=(0,U.useState)(!0),[d,f]=(0,U.useState)(!1);async function p(e){if(e.preventDefault(),a.trim()){f(!0);try{let e=await A(`/workspaces/${r}/projects`,{name:a.trim(),color:s}),c=`/w/${r}/p/${e.id}`;if(l){let t=await A(`/projects/${e.id}/boards`,{name:n(`newProject.boardName`)});c=`/w/${r}/b/${t.id}`}await y.invalidateQueries({queryKey:M.overview(r)}),t(!1),o(``),i(c)}catch(e){fe.error(O(e))}finally{f(!1)}}}return(0,W.jsx)(ae,{open:e,onOpenChange:t,title:n(`newProject.title`),description:n(`newProject.description`),children:(0,W.jsxs)(`form`,{onSubmit:p,className:`flex flex-col gap-5`,children:[(0,W.jsx)(Te,{label:n(`newProject.name`),value:a,onChange:e=>o(e.target.value),placeholder:n(`newProject.namePlaceholder`),maxLength:80,autoFocus:!0}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[12.5px] font-medium text-ink-2`,children:n(`newProject.color`)}),(0,W.jsx)(nt,{value:s,onChange:c,custom:!0})]}),(0,W.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 rounded-[12px] border border-line bg-surface p-3`,children:[(0,W.jsx)(rt,{checked:l,onChange:u,label:n(`newProject.withBoard`),className:`mt-0.5`}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`block text-[13.5px] font-medium`,children:n(`newProject.startWithBoard`)}),(0,W.jsx)(`span`,{className:`block text-[12.5px] text-ink-3`,children:n(`newProject.boardHint`,{columns:k(ie[b()].map(e=>n(`common:quoted`,{text:e})))})})]})]}),(0,W.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,W.jsx)(I,{variant:`ghost`,onClick:()=>t(!1),children:n(`common:actions.cancel`)}),(0,W.jsx)(I,{type:`submit`,variant:`primary`,loading:d,disabled:!a.trim(),children:n(`newProject.create`)})]})]})})}function Nn(){let{t:e}=h([`shell`,`common`]),{workspaceId:t,overview:n,openPalette:r,openNewProject:i}=V(),a=Fe(),o=tt(),s=`/w/${t}`;return(0,W.jsxs)(`nav`,{"aria-label":e(`nav.label`),className:`flex h-full flex-col px-2.5 pt-2.5 pb-2`,children:[(0,W.jsx)(In,{live:a}),(0,W.jsxs)(`button`,{type:`button`,onClick:r,className:`mt-2 flex h-8.5 items-center gap-2 rounded-[9px] border border-line bg-surface/70 px-2.5 text-[13px] text-ink-3 shadow-sm transition-colors hover:border-line-strong hover:text-ink-2`,children:[(0,W.jsx)(Ze,{className:`size-[15px]`}),(0,W.jsx)(`span`,{className:`flex-1 text-left`,children:e(`nav.search`)}),(0,W.jsx)(Ue,{keys:[`mod`,`K`]})]}),(0,W.jsxs)(`div`,{className:`mt-3 flex flex-col gap-px`,children:[(0,W.jsx)(Fn,{to:s,end:!0,icon:(0,W.jsx)(mt,{}),children:e(`nav.home`)}),(0,W.jsx)(Fn,{to:`${s}/vault`,icon:(0,W.jsx)(Xe,{}),trailing:(0,W.jsx)(Pn,{locked:o}),children:e(`nav.vault`)}),(0,W.jsx)(Fn,{to:`${s}/agents`,icon:(0,W.jsx)(Ae,{}),trailing:a?(0,W.jsx)(`span`,{className:`live-dot mr-1`,"aria-label":e(`nav.agentLive`)}):null,children:e(`nav.agents`)}),(0,W.jsx)(Fn,{to:`${s}/trash`,icon:(0,W.jsx)(Qe,{}),children:e(`nav.trash`)})]}),(0,W.jsxs)(`div`,{className:`mt-5 flex items-center justify-between pr-1 pl-2.5`,children:[(0,W.jsx)(`span`,{className:`text-[11px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`nav.projects`)}),(0,W.jsx)(Re,{label:e(`nav.newProject`),children:(0,W.jsx)(`button`,{type:`button`,onClick:i,"aria-label":e(`nav.newProject`),className:`grid size-6 place-items-center rounded-[7px] text-ink-3 hover:bg-hover hover:text-ink`,children:(0,W.jsx)(H,{className:`size-[15px]`})})})]}),(0,W.jsx)(`div`,{className:`-mx-1 mt-1 min-h-0 flex-1 overflow-y-auto px-1 pb-4`,children:n?n.projects.length?n.projects.map(e=>(0,W.jsx)(Rn,{project:e},e.id)):(0,W.jsxs)(`button`,{type:`button`,onClick:i,className:`mt-1 w-full rounded-[10px] border border-dashed border-line-strong px-3 py-4 text-left text-[12.5px] text-ink-3 transition-colors hover:border-ink-3 hover:text-ink-2`,children:[(0,W.jsx)(`span`,{className:`block font-medium text-ink-2`,children:e(`nav.firstProject.title`)}),e(`nav.firstProject.body`)]}):(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 px-2 pt-2`,children:[(0,W.jsx)(`div`,{className:`skeleton h-5 w-3/4`}),(0,W.jsx)(`div`,{className:`skeleton h-5 w-2/3`}),(0,W.jsx)(`div`,{className:`skeleton h-5 w-4/5`})]})}),(0,W.jsx)(Hn,{})]})}function Pn({locked:e}){let{t}=h([`shell`,`common`]);return(0,W.jsx)(`span`,{className:a(`mr-1 size-1.5 rounded-full transition-colors`,e?`bg-ink-4`:`bg-ok`),"aria-label":t(e?`nav.vaultLocked`:`nav.vaultUnlocked`),title:t(e?`nav.vaultLocked`:`nav.vaultUnlocked`)})}function Fn({to:e,end:t,icon:n,children:r,trailing:i}){return(0,W.jsxs)(x,{to:e,end:t,className:({isActive:e})=>a(`group relative flex h-8 items-center gap-2.5 rounded-[8px] px-2.5 text-[13.5px] transition-colors [&>svg]:size-[16px] [&>svg]:shrink-0`,e?`bg-surface font-medium text-ink shadow-sm [&>svg]:text-accent`:`text-ink-2 hover:bg-hover hover:text-ink [&>svg]:text-ink-3`),children:[n,(0,W.jsx)(`span`,{className:`flex-1 truncate`,children:r}),i]})}function In({live:e}){let{t}=h([`shell`,`common`]),{me:n,workspaceId:r}=V(),i=C(),a=lt(),o=D(),s=n.workspaces.find(e=>e.id===r);async function c(){let e=await a({title:t(`workspace.new`),description:t(`workspace.newDescription`),label:t(`workspace.name`),confirmLabel:t(`workspace.create`),maxLength:60});if(e)try{let t=await A(`/workspaces`,{name:e});await o.invalidateQueries({queryKey:M.me}),i(`/w/${t.id}`)}catch(e){fe.error(O(e))}}return(0,W.jsxs)(He,{children:[(0,W.jsx)(Le,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`flex h-10 items-center gap-2.5 rounded-[10px] px-1.5 text-left transition-colors hover:bg-hover data-[state=open]:bg-hover`,children:[(0,W.jsx)(Se,{size:28,live:e}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`span`,{className:`block truncate text-[13.5px] leading-tight font-semibold`,children:s?.name??t(`workspace.fallback`)}),(0,W.jsx)(`span`,{className:`block text-[11.5px] leading-tight text-ink-3`,children:`Orqevio`})]}),(0,W.jsx)(ft,{className:`size-[14px] text-ink-3`})]})}),(0,W.jsxs)(Ke,{align:`start`,className:`w-[240px]`,children:[(0,W.jsx)(We,{children:t(`workspace.heading`)}),n.workspaces.map(e=>(0,W.jsx)(z,{current:e.id===r,onSelect:()=>i(`/w/${e.id}`),icon:(0,W.jsx)(`span`,{className:`glyph c-slate size-5 text-[11px]`,children:E(e.name)}),children:(0,W.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,W.jsx)(`span`,{className:`truncate`,children:e.name}),e.id===r&&(0,W.jsx)(it,{className:`size-[14px] text-accent`})]})},e.id)),(0,W.jsx)(Ge,{}),(0,W.jsx)(z,{icon:(0,W.jsx)(H,{}),onSelect:c,children:t(`workspace.new`)}),(0,W.jsx)(z,{icon:(0,W.jsx)(St,{}),onSelect:()=>i(`/w/${r}/settings`),children:t(`workspace.settings`)})]})]})}function Ln(e,t){let[n,r]=(0,U.useState)(()=>N(`expanded`,{})[e]??t);return[n,t=>{let i=t??!n;r(i);let a=N(`expanded`,{});a[e]=i,_e(`expanded`,a)}]}function Rn({project:e}){let{t}=h([`shell`,`common`]),{workspaceId:n}=V(),r=S(),i=ut(n),[o,s]=Ln(e.id,!0),[c,l]=(0,U.useState)(!1),u=`/w/${n}`,d=e.pages.filter(e=>e.parentId===null),f=r.pathname===`${u}/p/${e.id}`;return(0,W.jsxs)(`div`,{className:`mt-0.5`,children:[(0,W.jsxs)(`div`,{className:a(`group flex h-8 items-center gap-1 rounded-[8px] pr-1 transition-colors`,f?`bg-surface shadow-sm`:`hover:bg-hover`),children:[(0,W.jsx)(`button`,{type:`button`,onClick:()=>s(),"aria-label":t(o?`project.collapse`:`project.expand`,{name:e.name}),"aria-expanded":o,className:`grid size-6 shrink-0 place-items-center rounded-[6px] text-ink-4 hover:text-ink`,children:(0,W.jsx)(at,{className:a(`size-[13px] transition-transform duration-200`,o&&`rotate-90`)})}),(0,W.jsxs)(x,{to:`${u}/p/${e.id}`,className:`flex min-w-0 flex-1 items-center gap-2 py-1 text-[13.5px]`,children:[(0,W.jsx)(st,{color:e.color,className:`size-[18px] text-[10.5px]`,children:E(e.name)}),(0,W.jsx)(`span`,{className:a(`truncate`,f?`font-medium text-ink`:`text-ink-2 group-hover:text-ink`),children:e.name})]}),(0,W.jsxs)(He,{children:[(0,W.jsx)(Le,{asChild:!0,children:(0,W.jsx)(`button`,{type:`button`,"aria-label":t(`project.actions`,{name:e.name}),className:`grid size-6 place-items-center rounded-[6px] text-ink-3 opacity-0 group-hover:opacity-100 hover:bg-press hover:text-ink focus-visible:opacity-100 data-[state=open]:opacity-100`,children:(0,W.jsx)(ze,{className:`size-[15px]`})})}),(0,W.jsxs)(Ke,{align:`start`,children:[(0,W.jsx)(z,{icon:(0,W.jsx)(Je,{}),onSelect:()=>void i.createBoard(e.id),children:t(`project.newBoard`)}),(0,W.jsx)(z,{icon:(0,W.jsx)(qe,{}),onSelect:()=>void i.createPage(e.id),children:t(`project.newPage`)}),(0,W.jsx)(Ge,{}),(0,W.jsx)(z,{icon:(0,W.jsx)(ot,{}),onSelect:()=>l(!0),children:t(`project.rename`)}),(0,W.jsx)(z,{icon:(0,W.jsx)(Qe,{}),danger:!0,onSelect:()=>void i.deleteProject(e),children:t(`project.delete`)})]})]}),(0,W.jsx)(Re,{label:t(`project.newPage`),children:(0,W.jsx)(`button`,{type:`button`,onClick:()=>void i.createPage(e.id),"aria-label":t(`project.newPageIn`,{name:e.name}),className:`grid size-6 place-items-center rounded-[6px] text-ink-3 opacity-0 group-hover:opacity-100 hover:bg-press hover:text-ink focus-visible:opacity-100`,children:(0,W.jsx)(H,{className:`size-[15px]`})})})]}),o&&(0,W.jsxs)(`div`,{className:`relative ml-[13px] border-l border-line pl-1.5`,children:[e.boards.map(e=>(0,W.jsx)(zn,{to:`${u}/b/${e.id}`,icon:(0,W.jsx)(Je,{}),label:e.name,trailing:e.cardCount?(0,W.jsx)(`span`,{className:`font-mono text-[10.5px] text-ink-3`,children:e.cardCount}):null},e.id)),d.map(t=>(0,W.jsx)(Vn,{page:t,all:e.pages,projectId:e.id,depth:0},t.id)),e.boards.length===0&&d.length===0&&(0,W.jsx)(`p`,{className:`px-2 py-1.5 text-[12px] text-ink-3`,children:t(`project.empty`)})]}),(0,W.jsx)(ct,{project:e,open:c,onOpenChange:l})]})}function zn({to:e,icon:t,label:n,trailing:r,onToggle:i,expanded:o,hasChildren:s,extra:c}){let{t:l}=h(`shell`);return(0,W.jsxs)(x,{to:e,className:({isActive:e})=>a(`group/tree relative flex h-7.5 items-center gap-2 rounded-[7px] pr-1 pl-1.5 text-[13px] transition-colors [&>svg]:size-[14px] [&>svg]:shrink-0`,e?`bg-surface font-medium text-ink shadow-sm [&>svg]:text-accent`:`text-ink-2 hover:bg-hover hover:text-ink [&>svg]:text-ink-3`),children:[s?(0,W.jsx)(`span`,{role:`button`,tabIndex:-1,"aria-label":l(o?`tree.collapse`:`tree.expand`),onClick:e=>{e.preventDefault(),e.stopPropagation(),i?.()},className:`-ml-0.5 grid size-4 shrink-0 place-items-center rounded-[4px] text-ink-4 hover:text-ink`,children:(0,W.jsx)(at,{className:a(`size-[11px] transition-transform`,o&&`rotate-90`)})}):null,t,(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:n}),c,r]})}function Bn(e){return e<3?`ml-[11px] border-l border-line pl-1.5`:e<7?`ml-[5px] border-l border-line`:``}function Vn({page:e,all:t,projectId:n,depth:r}){let{t:i}=h([`shell`,`common`]),{workspaceId:a}=V(),o=ut(a),s=t.filter(t=>t.parentId===e.id),[c,l]=Ln(e.id,!1);return(0,W.jsxs)(`div`,{children:[(0,W.jsx)(zn,{to:`/w/${a}/d/${e.id}`,icon:e.icon?(0,W.jsx)(`span`,{className:`w-[14px] text-center text-[13px] leading-none`,children:e.icon}):(0,W.jsx)(qe,{}),label:e.title||i(`common:untitled`),hasChildren:s.length>0,expanded:c,onToggle:()=>l(),extra:(0,W.jsx)(`span`,{role:`button`,tabIndex:-1,"aria-label":i(`tree.newSubpage`),title:i(`tree.newSubpage`),onClick:t=>{t.preventDefault(),t.stopPropagation(),l(!0),o.createPage(n,e.id)},className:`grid size-5 shrink-0 place-items-center rounded-[5px] text-ink-3 opacity-0 group-hover/tree:opacity-100 hover:bg-press hover:text-ink`,children:(0,W.jsx)(H,{className:`size-[13px]`})})}),c&&s.length>0&&(0,W.jsx)(`div`,{className:Bn(r),children:s.map(e=>(0,W.jsx)(Vn,{page:e,all:t,projectId:n,depth:r+1},e.id))})]})}function Hn(){let{t:e}=h([`shell`,`common`]),{me:t,workspaceId:n}=V(),i=r().data?.updateAvailable??!1,a=C(),o=D(),[s,c]=(0,U.useState)(t.user.theme);async function l(e){let t=e;c(t),ve(t);try{await T(`/account`,{theme:t}),await o.invalidateQueries({queryKey:M.me})}catch{}}async function u(){et(),await A(`/auth/logout`).catch(()=>{}),et(),o.clear(),d(),a(`/login`,{replace:!0})}return(0,W.jsxs)(He,{children:[(0,W.jsx)(Le,{asChild:!0,children:(0,W.jsxs)(`button`,{type:`button`,className:`flex h-10 items-center gap-2.5 rounded-[10px] px-1.5 text-left transition-colors hover:bg-hover data-[state=open]:bg-hover`,children:[(0,W.jsxs)(`span`,{className:`relative`,children:[(0,W.jsx)(je,{name:t.user.name,size:26}),i&&(0,W.jsx)(`span`,{"aria-label":e(`user.updateAvailable`),className:`absolute -top-0.5 -right-0.5 size-2.5 rounded-full bg-accent ring-2 ring-desk`})]}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] leading-tight font-medium`,children:t.user.name})]})}),(0,W.jsxs)(Ke,{align:`start`,side:`top`,className:`w-[240px]`,children:[(0,W.jsx)(z,{icon:(0,W.jsx)(St,{}),onSelect:()=>a(`/w/${n}/settings`),children:(0,W.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[e(`user.settings`),i&&(0,W.jsx)(`span`,{className:`rounded-full bg-accent-soft px-1.5 py-px text-[11px] font-medium text-accent`,children:e(`user.newVersion`)})]})}),(0,W.jsx)(Ge,{}),(0,W.jsx)(We,{children:e(`user.appearance`)}),(0,W.jsxs)(Be,{value:s,onValueChange:l,children:[(0,W.jsx)(Ie,{value:`system`,icon:(0,W.jsx)(vt,{}),children:e(`user.theme.system`)}),(0,W.jsx)(Ie,{value:`light`,icon:(0,W.jsx)(wt,{}),children:e(`user.theme.light`)}),(0,W.jsx)(Ie,{value:`dark`,icon:(0,W.jsx)(bt,{}),children:e(`user.theme.dark`)})]}),(0,W.jsx)(Ge,{}),(0,W.jsx)(z,{icon:(0,W.jsx)(gt,{}),onSelect:u,children:e(`user.signOut`)})]})]})}var Un=`(min-width: 900px)`,Wn=()=>typeof window<`u`&&window.matchMedia(Un).matches;function Gn(){let{t:e}=h(),{wid:n}=v(),r=m(),i=g(n),o=S(),c=C(),[l,u]=(0,U.useState)(()=>Wn()?N(`sidebar`,!0):!1),[d,p]=(0,U.useState)(!1),[_,y]=(0,U.useState)(!1),b=(0,U.useRef)(null),x=r.error instanceof t&&r.error.status===401,w=!!(n&&r.data?.workspaces.some(e=>e.id===n));Pe(w?n:void 0,x?void 0:r.data?.user.id),(0,U.useEffect)(()=>{n&&_e(`workspace`,n)},[n]),(0,U.useEffect)(()=>{let e=r.data?.user.theme;e&&e!==ge()&&ve(e)},[r.data?.user.theme]),(0,U.useEffect)(()=>{Wn()||u(!1)},[o.pathname]),(0,U.useEffect)(()=>{let e=window.matchMedia(Un),t=()=>{let t=e.matches?N(`sidebar`,!0):!1;!t&&b.current?.contains(document.activeElement)&&document.getElementById(`main`)?.focus({preventScroll:!0}),u(t)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,U.useEffect)(()=>{let e=e=>{let t=e.metaKey||e.ctrlKey;e.key===`Escape`&&!he(e)&&!Wn()&&u(!1),t&&e.key.toLowerCase()===`k`?(e.preventDefault(),p(e=>!e)):t&&e.key===`\\`&&(e.preventDefault(),u(e=>(Wn()&&_e(`sidebar`,!e),!e)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,U.useEffect)(()=>(Ne(t=>{fe(Me(t),{id:`agent-${t.actor.id}`,icon:(0,W.jsx)(je,{name:t.actor.name,kind:`agent`,size:22}),duration:3500,action:t.cardId&&t.action!==`card.archived`?{label:e(`actions.view`),onClick:()=>c(`/card/${t.cardId}`)}:t.pageId?{label:e(`actions.view`),onClick:()=>c(`/w/${n}/d/${t.pageId}`)}:void 0})}),()=>Ne(null)),[c,n,e]);let T=(0,U.useMemo)(()=>r.data&&n?{workspaceId:n,me:r.data,overview:i.data,sidebarOpen:l,toggleSidebar:()=>u(e=>(Wn()&&_e(`sidebar`,!e),!e)),openPalette:()=>p(!0),openNewProject:()=>y(!0)}:null,[r.data,n,i.data,l]);return r.isPending?(0,W.jsx)(F,{}):r.error?r.isFetching?(0,W.jsx)(F,{}):x?(0,W.jsx)(s,{to:`/login?next=${encodeURIComponent(o.pathname+o.search)}`,replace:!0}):(0,W.jsx)(F,{}):T?r.data.workspaces.some(e=>e.id===n)?(0,W.jsxs)(Ve.Provider,{value:T,children:[(0,W.jsx)(`a`,{href:`#main`,className:`sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-[60] focus:rounded-[8px] focus:bg-ink focus:px-3 focus:py-2 focus:text-sheet`,children:e(`skipToContent`)}),(0,W.jsxs)(`div`,{className:`flex h-dvh overflow-hidden bg-desk`,children:[(0,W.jsx)(`div`,{"aria-hidden":`true`,onClick:()=>u(!1),className:a(`fixed inset-0 z-30 bg-[rgb(20_18_14/0.3)] transition-opacity duration-300 min-[900px]:hidden`,l?`opacity-100`:`pointer-events-none opacity-0`)}),(0,W.jsx)(`div`,{className:a(`z-40 shrink-0 transition-[width,transform] duration-300 ease-[var(--ease-out-quint)]`,`max-[900px]:fixed max-[900px]:inset-y-0 max-[900px]:left-0 max-[900px]:w-[272px] max-[900px]:bg-desk max-[900px]:shadow-lg`,l?`max-[900px]:translate-x-0 min-[900px]:w-[260px]`:`max-[900px]:-translate-x-full min-[900px]:w-0`),children:(0,W.jsx)(`div`,{ref:b,className:a(`h-full w-[260px] max-[900px]:w-[272px]`,!l&&`min-[900px]:invisible`),inert:!l,children:(0,W.jsx)(Nn,{})})}),(0,W.jsx)(`main`,{id:`main`,tabIndex:-1,className:a(`sheet relative my-2 mr-2 flex min-w-0 flex-1 flex-col overflow-hidden rounded-[16px] outline-none max-[900px]:m-0 max-[900px]:rounded-none`,!l&&`min-[900px]:ml-2`),children:(0,W.jsx)(f,{})})]}),(0,W.jsx)(jn,{open:d,onOpenChange:p}),(0,W.jsx)(Mn,{open:_,onOpenChange:y})]}):(0,W.jsx)(Ce,{standalone:!0}):(0,W.jsx)(F,{})}function Kn(){let e=m();if(e.isPending)return(0,W.jsx)(F,{});if(e.isError||!e.data)return(0,W.jsx)(s,{to:`/login`,replace:!0});let t=N(`workspace`,null),n=e.data.workspaces.find(e=>e.id===t)??e.data.workspaces[0];return n?(0,W.jsx)(s,{to:`/w/${n.id}`,replace:!0}):(0,W.jsx)(s,{to:`/login`,replace:!0})}function qn({type:e}){let{id:n}=v(),r=C(),{t:i}=h(),[a,o]=(0,U.useState)(!1);return(0,U.useEffect)(()=>{o(!1);let i=!1;return(async()=>{try{if(e===`card`){let e=await j(`/cards/${n}`);i||r(`/w/${e.workspaceId}/b/${e.boardId}?card=${e.id}`,{replace:!0})}else{let e=await j(`/pages/${n}`);i||r(`/w/${e.workspaceId}/d/${e.id}`,{replace:!0})}}catch(a){if(!(a instanceof t)||a.status!==404&&a.status!==403){i||(fe.error(O(a)),r(`/`,{replace:!0}));return}let s=`${e===`card`?`card`:`page`}:${n}`,c=(await j(`/auth/me`).catch(()=>null))?.workspaces??[];for(let e of c)if(await j(`/workspaces/${e.id}/trash/${encodeURIComponent(s)}`).then(e=>e!==null,()=>!1)){i||r(`/w/${e.id}/trash?item=${encodeURIComponent(s)}`,{replace:!0});return}i||o(!0)}})(),()=>{i=!0}},[n,e,r]),a?(0,W.jsx)(Ce,{standalone:!0,title:i(e===`card`?`gone.card`:`gone.page`),body:i(e===`card`?`gone.cardBody`:`gone.pageBody`)}):(0,W.jsx)(F,{})}var Jn=u([{path:`/`,element:(0,W.jsx)(Kn,{})},{path:`/login`,element:(0,W.jsx)(Nt,{mode:`login`})},{path:`/setup`,element:(0,W.jsx)(Nt,{mode:`setup`})},{path:`/register`,element:(0,W.jsx)(s,{to:`/setup`,replace:!0})},{path:`/card/:id`,element:(0,W.jsx)(qn,{type:`card`})},{path:`/doc/:id`,element:(0,W.jsx)(qn,{type:`doc`})},{path:`/oauth/authorize`,lazy:async()=>({Component:(await _(async()=>{let{ConsentPage:e}=await import(`./ConsentPage-CXS-bOLl.js`);return{ConsentPage:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))).ConsentPage}),hydrateFallbackElement:(0,W.jsx)(F,{})},{path:`/w/:wid`,element:(0,W.jsx)(Gn,{}),hydrateFallbackElement:(0,W.jsx)(F,{}),children:[{index:!0,lazy:async()=>({Component:(await _(async()=>{let{HomePage:e}=await import(`./HomePage-Bm_gsAiP.js`);return{HomePage:e}},__vite__mapDeps([13,1,2,14,7,15,16,17,18,19,20,21,22,8,23,24,25,26]))).HomePage})},{path:`p/:projectId`,lazy:async()=>({Component:(await _(async()=>{let{ProjectPage:e}=await import(`./ProjectPage-hVAuJHb8.js`);return{ProjectPage:e}},__vite__mapDeps([27,1,28,2,16,29,30,31,22,32,6,33,18,34,35,15,26,36,37,5]))).ProjectPage})},{path:`b/:boardId`,lazy:async()=>({Component:(await _(async()=>{let{BoardPage:e}=await import(`./BoardPage-DiTjq46K.js`);return{BoardPage:e}},__vite__mapDeps([38,1,2,23,18,7,16,24,22,25,29,30,31,33,6,39,40,36,34,37,26,5,20,41,42,43,44,45,46,3,19,21,10,15,35,47,48]))).BoardPage})},{path:`d/:pageId`,lazy:async()=>({Component:(await _(async()=>{let{DocPage:e}=await import(`./DocPage-8QmjOXZg.js`);return{DocPage:e}},__vite__mapDeps([49,1,2,43,18,20,6,33,40,7,41,44,42,45,24,31,25,37,46,16,28,3,22,23,26,36,34,5,50,51,52,10,53]))).DocPage})},{path:`vault`,lazy:async()=>({Component:(await _(async()=>{let{VaultPage:e}=await import(`./VaultPage-BXNKzLjV.js`);return{VaultPage:e}},__vite__mapDeps([54,1,2,40,18,33,6,55,17,29,30,47,4,53,31,56,45,22,57,15,39,34,11,26,58,59,8]))).VaultPage})},{path:`agents`,lazy:async()=>({Component:(await _(async()=>{let{AgentsPage:e}=await import(`./AgentsPage-lZ18h_Fd.js`);return{AgentsPage:e}},__vite__mapDeps([60,1,2,7,41,17,30,4,19,20,21,6,57,15,33,18,26,34,11,9,10,61,56,31,12]))).AgentsPage})},{path:`settings`,lazy:async()=>({Component:(await _(async()=>{let{SettingsPage:e}=await import(`./SettingsPage-BlACK1Ir.js`);return{SettingsPage:e}},__vite__mapDeps([62,1,2,33,18,6,34,11,63,57,15,45,51,8,20,59,58,14,26]))).SettingsPage})},{path:`trash`,lazy:async()=>({Component:(await _(async()=>{let{TrashPage:e}=await import(`./TrashPage-DtEce2C1.js`);return{TrashPage:e}},__vite__mapDeps([64,1,2,44,18,42,31,33,6,7,10,39,37,26,52,16,24,53]))).TrashPage})},{path:`*`,element:(0,W.jsx)(Ce,{})}]},{path:`*`,element:(0,W.jsx)(Ce,{standalone:!0})}]);export{Jn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{S as t,in as n,it as r,x as i}from"./format-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{S as t,in as n,it as r,x as i}from"./format-Dk1nO38Z.js";var a=e(n(),1),o={key:null,keyVersion:null,userId:null,items:[],revisions:{},autoLockMinutes:15,lastActivity:Date.now()},s=new Set,c=null,l=0;function u(){for(let e of s)e()}var d=e=>(s.add(e),()=>s.delete(e)),f=()=>{o.lastActivity=Date.now()};function p(e,t,n,r,i,a={}){o={key:e,keyVersion:t,userId:n,items:r,revisions:a,autoLockMinutes:i,lastActivity:Date.now()},l++,window.addEventListener(`pointerdown`,f,{passive:!0}),window.addEventListener(`keydown`,f,{passive:!0}),c??=setInterval(()=>{o.key&&Date.now()-o.lastActivity>o.autoLockMinutes*6e4?m():u()},1e3),u()}function m(){o={key:null,keyVersion:null,userId:null,items:[],revisions:{},autoLockMinutes:o.autoLockMinutes,lastActivity:Date.now()},l++,window.removeEventListener(`pointerdown`,f),window.removeEventListener(`keydown`,f),c&&clearInterval(c),c=null,u()}var h=typeof BroadcastChannel>`u`?null:new BroadcastChannel(`orqevio-vault`);function g(){m(),h?.postMessage(`lock`)}h?.addEventListener(`message`,e=>{e.data===`lock`&&(m(),t.invalidateQueries({queryKey:i.me}))}),r(m);function _(e,t,n={}){if(o.key!==e)return!1;let r={...o.revisions};for(let[e,t]of Object.entries(n))t===null?delete r[e]:r[e]=t;return o={...o,items:t(o.items),revisions:r},l++,u(),!0}function v(e,t,n){return o.key===e&&(o={...o,items:t,revisions:n},l++,u(),!0)}function y(e){o={...o,autoLockMinutes:e},u()}var b=()=>o,x=()=>l;function S(){return(0,a.useSyncExternalStore)(d,()=>o)}function C(){return(0,a.useSyncExternalStore)(d,()=>o.key===null)}function w(){return(0,a.useSyncExternalStore)(d,()=>Math.floor(Date.now()/1e3)),o.key?Math.max(0,Math.round((o.lastActivity+o.autoLockMinutes*6e4-Date.now())/1e3)):0}export{x as a,_ as c,S as d,v as i,w as l,m as n,y as o,g as r,p as s,b as t,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};t.node;var n=e(t),r={name:`shield-exclamation-point`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]],aliases:[`shield-alert`]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};t.node;var n=e(t),r={name:`square-kanban`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 7v7`,key:`1x2jlm`}],[`path`,{d:`M12 7v4`,key:`xawao1`}],[`path`,{d:`M16 7v9`,key:`1hp2iy`}]],aliases:[`kanban-square`]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Ht as t,Q as n,S as r,rt as i,x as a}from"./format-
|
|
1
|
+
import{$ as e,Ht as t,Q as n,S as r,rt as i,x as a}from"./format-Dk1nO38Z.js";import{n as o}from"./dist-DFO0RDUp.js";import{a as s,c,i as l,n as u,o as d,t as f}from"./session-BdZhhrrQ.js";var p=new TextEncoder,m=new TextDecoder,h={algorithm:`argon2id`,memoryKiB:65536,iterations:3,parallelism:1},g=class extends Error{};function _(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function v(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`)+`===`.slice((e.length+3)%4),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}var y=e=>crypto.getRandomValues(new Uint8Array(e));async function b(e,t,r){let i={password:e,salt:r,memoryKiB:t.memoryKiB,iterations:t.iterations,parallelism:t.parallelism};if(typeof window<`u`&&typeof Worker<`u`){let e=new Worker(new URL(`/assets/kdf.worker-CzR7_kJp.js`,``+import.meta.url),{type:`module`});try{return await new Promise((t,n)=>{e.onmessage=e=>e.data.ok&&e.data.hash?t(e.data.hash):n(Error(e.data.error??`KDF failed`)),e.onerror=e=>n(Error(e.message)),e.postMessage(i)})}finally{e.terminate()}}let{argon2id:a}=await n(async()=>{let{argon2id:e}=await import(`./index.esm-JEo9WZbq.js`);return{argon2id:e}},[]);return await a({...i,memorySize:i.memoryKiB,hashLength:32,outputType:`binary`})}var x=e=>crypto.subtle.importKey(`raw`,e,{name:`AES-GCM`},!1,[`encrypt`,`decrypt`]);async function S(e,t){let n=await b(e.normalize(`NFKC`),t,v(t.salt));try{return await x(n)}finally{n.fill(0)}}async function C(e,t){let n=await crypto.subtle.importKey(`raw`,e,`HKDF`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`HKDF`,hash:`SHA-256`,salt:p.encode(`orqevio/recovery/v1`),info:p.encode(t)},n,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}async function w(e,t,n){let r=y(12),i=new Uint8Array(await crypto.subtle.encrypt({name:`AES-GCM`,iv:r,additionalData:p.encode(n)},e,t));return`v1.${_(r)}.${_(i)}`}async function T(e,t,n){let[r,i,a]=t.split(`.`);if(r!==`v1`||!i||!a)throw Error(`Unsupported envelope`);try{return new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:v(i),additionalData:p.encode(n)},e,v(a)))}catch{throw new g(`Decryption failed`)}}var E=e=>`orqevio/vault-key/v1/${e}`,D=`orqevio/vault-export/v1`,O=e=>`orqevio/vault-recovery/v1/${e}`,k=(e,t)=>`orqevio/item/v1/${e}/${t}`,A=`0123456789ABCDEFGHJKMNPQRSTVWXYZ`;function j(e){let t=0,n=0,r=``;for(let i of e)for(n=n<<8|i,t+=8;t>=5;)r+=A[n>>>t-5&31],t-=5;return t>0&&(r+=A[n<<5-t&31]),r.match(/.{1,4}/g).join(`-`)}function M(e){let t=e.toUpperCase().replace(/[^0-9A-Z]/g,``).replace(/O/g,`0`).replace(/[IL]/g,`1`);if(t.length!==32)return null;let n=new Uint8Array(20),r=0,i=0,a=0;for(let e of t){let t=A.indexOf(e);if(t<0)return null;i=i<<5|t,r+=5,r>=8&&(n[a++]=i>>>r-8&255,r-=8)}return n}async function N(e,t,n){let r={...h,salt:_(y(16))};return{kdf:r,wrappedKey:await w(await S(t,r),e,E(n))}}async function P(e,t){let n=y(32),r=y(20);try{let{kdf:i,wrappedKey:a}=await N(n,e,t);return{keys:{kdf:i,wrappedKey:a,recoveryWrappedKey:await w(await C(r,t),n,O(t))},vaultKey:await x(n),recoveryKey:j(r)}}finally{n.fill(0),r.fill(0)}}async function F(e,t,n){if(!e.kdf||!e.wrappedKey)throw Error(`Vault not initialised`);let r=await T(await S(t,e.kdf),e.wrappedKey,E(n));try{return await x(r)}finally{r.fill(0)}}async function I(e,t,n,r){if(!e.kdf||!e.wrappedKey||!e.recoveryWrappedKey)throw Error(`Vault not initialised`);let i=await T(await S(t,e.kdf),e.wrappedKey,E(r));try{let{kdf:t,wrappedKey:a}=await N(i,n,r);return{kdf:t,wrappedKey:a,recoveryWrappedKey:e.recoveryWrappedKey}}finally{i.fill(0)}}async function L(e,t,n,r){if(!e.recoveryWrappedKey)throw Error(`Vault not initialised`);let i=M(t);if(!i)throw new g(`Malformed recovery key`);let a=await T(await C(i,r),e.recoveryWrappedKey,O(r));try{let{kdf:t,wrappedKey:i}=await N(a,n,r);return{keys:{kdf:t,wrappedKey:i,recoveryWrappedKey:e.recoveryWrappedKey},vaultKey:await x(a)}}finally{a.fill(0),i.fill(0)}}function R(e){return 20+Math.ceil((p.encode(JSON.stringify(e)).length+16)*4/3)}async function z(e,t,n){return w(e,p.encode(JSON.stringify(n)),k(t,n.id))}async function B(e,t,n,r){let i=JSON.parse(m.decode(await T(e,r,k(t,n))));if(i.id!==n)throw new g(`Item identity mismatch`);return{...i,totp:i.totp??``}}async function V(e,t,n){let r={...h,salt:_(y(16))},i=await w(await S(t,r),p.encode(e),D);return{format:`orqevio-vault-export`,version:1,exportedAt:new Date().toISOString(),count:n,kdf:r,data:i}}async function H(e,t){return m.decode(await T(await S(t,e.kdf),e.data,D))}var U=typeof BroadcastChannel>`u`?null:new BroadcastChannel(`orqevio-vault`),W=()=>r.fetchQuery({queryKey:a.vault,queryFn:({signal:e})=>i(`/vault`,e),staleTime:0});async function G(){return r.isFetching({queryKey:a.vault})&&await W().catch(()=>{}),W()}function K(){U?.postMessage(`changed`)}function q(){U?.postMessage(`items`)}var J=null,Y=!1;function X(){return J?(Y=!0,J):(J=(async()=>{try{do Y=!1,await Q();while(Y)}finally{J=null}})(),J)}function Z(e,t,n,r={}){let i=s()!==t,a=c(e,n,r);return a&&i&&X().catch(()=>{}),a}async function Q(){let{key:e,userId:t}=f();if(!e||!t)return;let n=s(),r=await i(`/vault/items`),a=[],o={};for(let n of r)try{a.push(await B(e,t,n.id,n.data)),o[n.id]=n.updatedAt}catch{}s()===n?l(e,a,o):f().key===e&&(Y=!0)}U&&(U.onmessage=e=>void(e.data===`items`?X():e.data===`changed`?G():Promise.resolve()).catch(()=>{})),r.getQueryCache().subscribe(e=>{if(e.type!==`updated`||e.action.type!==`success`||e.query.queryKey[0]!==a.vault[0])return;let n=e.query.state.data,r=f();n&&r.key&&r.keyVersion!==null&&(n.keyVersion>r.keyVersion||n.keyVersion===r.keyVersion&&!n.initialized?(u(),o.info(t(`errors:codes.vault_key_changed`))):n.autoLockMinutes!==r.autoLockMinutes&&d(n.autoLockMinutes))});function $(t,n){return t instanceof e&&t.code===`vault_key_changed`&&(n&&f().key===n&&u(),G().catch(()=>{}),!0)}export{$ as a,I as c,z as d,R as f,F as g,V as h,G as i,P as l,L as m,q as n,X as o,H as p,Z as r,g as s,K as t,B as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`columns-3`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]],aliases:[`panels-left-right`]};t.node;var n=e(t),r={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};r.node;var i=e(r),a={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};a.node;var o=e(a),s={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};s.node;var c=e(s),l={name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]};l.node;var u=e(l);export{n as a,i,c as n,o as r,u as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/router-
|
|
2
|
-
import{$ as e,Ht as t,Q as n,S as r,nt as i,ot as a,tt as o}from"./format-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/router-BVJjZgrw.js","assets/router-C3-WXlLY.js","assets/rolldown-runtime-XKyaHtl9.js","assets/format-Dk1nO38Z.js","assets/dist-DFO0RDUp.js","assets/Menu-CzgZwzmu.js","assets/Button-CHkkj3LG.js","assets/theme-BfxBDblB.js","assets/eye-CkYWwyJN.js","assets/Trans-CA0OvHif.js","assets/States-D9T0E3QG.js","assets/CopyButton-BDbxvAXk.js","assets/check-A2t_TRNF.js","assets/Field-BsUKJQ-4.js","assets/AccessKeyReveal-BhGhJ9TO.js","assets/download-CRdduKx2.js","assets/TokenCard-DcxUdsB4.js","assets/clock-Dat3GIX9.js","assets/lock-keyhole-DVrMCpqy.js","assets/trash-CkQBpprn.js","assets/Avatar-B1img0gb.js","assets/Checkbox-S2SJTJty.js","assets/destination-CEcYXsDA.js","assets/activity-C0-uReAO.js","assets/realtime-Dn6o1BHn.js","assets/square-kanban-Cd_tPOtx.js","assets/folder-open-DCuG03EB.js","assets/plus-DcOCeQtr.js","assets/search-6TSW8Big.js","assets/session-BdZhhrrQ.js","assets/ColorPicker-DSVbH2ix.js","assets/chevron-right-BGyQzokh.js","assets/pencil-C37OTkSN.js","assets/ProjectSettingsDialog-ekHTFmaO.js","assets/actions-TwDLbdln.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,Ht as t,Q as n,S as r,nt as i,ot as a,tt as o}from"./format-Dk1nO38Z.js";import{n as s}from"./dist-DFO0RDUp.js";var c=()=>t(`trash:note`,{count:30}),l=e=>void n(async()=>{let{router:e}=await import(`./router-BVJjZgrw.js`);return{router:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34])).then(({router:t})=>t.navigate(e)),u=(e,t)=>`/w/${e}/trash?item=${encodeURIComponent(t)}`,d=(e,t)=>a(`/workspaces/${e}/trash/restore`,{...t,dryRun:!0}),f=()=>r.invalidateQueries(void 0,{cancelRefetch:!1});async function p(e,t){let n=await a(`/workspaces/${e}/trash/restore`,t);return await f(),n}var m=(e,t)=>a(`/workspaces/${e}/trash/restore-many`,{items:t,dryRun:!0});async function h(e,t){let n=await a(`/workspaces/${e}/trash/restore-many`,{items:t});return await f(),n.restored}var g=(e,t)=>a(`/workspaces/${e}/trash/purge`,{keys:t,dryRun:!0});async function _(e,t){let n=await a(`/workspaces/${e}/trash/purge`,{keys:t});return await f(),n}async function v(e,t){await o(`/workspaces/${e}/trash/${encodeURIComponent(t)}`),await f()}async function y(e){let t=await a(`/trash/${e}/restore`);return await f(),t}function b(t){if(!(t instanceof e)||t.code!==`restore_place_in_trash`)return null;let n=t.details;return{title:n?.title??``,key:n?.key}}function x(e,n){let r=n?n.trashId:null;s.success(e,{description:t(`trash:toast.description`),...r&&{action:{label:t(`trash:toast.undo`),onClick:()=>{y(r).catch(e=>{let n=b(e);if(!n)return s.error(i(e));let r=window.location.pathname.match(/^\/w\/([^/]+)/)?.[1];s.error(t(`trash:restoreFirst`,{name:n.title||t(`common:untitled`)}),{...n.key&&r&&{action:{label:t(`trash:openInTrash`),onClick:()=>l(u(r,n.key))}}})})}}}})}export{_ as a,p as c,u as d,c as f,v as i,h as l,d as n,g as o,m as r,y as s,l as t,x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};t.node;var n=e(t);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as e}from"./format-
|
|
1
|
+
import{Et as e}from"./format-Dk1nO38Z.js";var t={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};t.node;var n=e(t);export{n as t};
|
package/dist/web/index.html
CHANGED
|
@@ -11,42 +11,42 @@
|
|
|
11
11
|
<title>Orqevio</title>
|
|
12
12
|
<script src="/theme-init.js"></script>
|
|
13
13
|
<script src="/zod-init.js"></script>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DaNg7x81.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/format-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/Menu-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/Button-
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/assets/Field-
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/assets/trash-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/actions-
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/format-Dk1nO38Z.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/Menu-CzgZwzmu.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/Button-CHkkj3LG.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-DFO0RDUp.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/Field-BsUKJQ-4.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/trash-BtTKuFPT.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/actions-TwDLbdln.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/theme-BfxBDblB.js">
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/assets/eye-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/assets/Trans-
|
|
26
|
-
<link rel="modulepreload" crossorigin href="/assets/States-
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/check-
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/CopyButton-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/download-
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/AccessKeyReveal-
|
|
31
|
-
<link rel="modulepreload" crossorigin href="/assets/clock-
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/lock-keyhole-
|
|
33
|
-
<link rel="modulepreload" crossorigin href="/assets/trash-
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/Avatar-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/Checkbox-
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/eye-CkYWwyJN.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="/assets/Trans-CA0OvHif.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/States-D9T0E3QG.js">
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/check-A2t_TRNF.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/CopyButton-BDbxvAXk.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/download-CRdduKx2.js">
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/AccessKeyReveal-BhGhJ9TO.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/clock-Dat3GIX9.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/lock-keyhole-DVrMCpqy.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/trash-CkQBpprn.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/Avatar-B1img0gb.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/Checkbox-S2SJTJty.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/destination-CEcYXsDA.js">
|
|
37
|
-
<link rel="modulepreload" crossorigin href="/assets/TokenCard-
|
|
38
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/realtime-
|
|
40
|
-
<link rel="modulepreload" crossorigin href="/assets/square-kanban-
|
|
41
|
-
<link rel="modulepreload" crossorigin href="/assets/folder-open-
|
|
42
|
-
<link rel="modulepreload" crossorigin href="/assets/plus-
|
|
43
|
-
<link rel="modulepreload" crossorigin href="/assets/search-
|
|
44
|
-
<link rel="modulepreload" crossorigin href="/assets/session-
|
|
45
|
-
<link rel="modulepreload" crossorigin href="/assets/ColorPicker-
|
|
46
|
-
<link rel="modulepreload" crossorigin href="/assets/chevron-right-
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/pencil-
|
|
48
|
-
<link rel="modulepreload" crossorigin href="/assets/ProjectSettingsDialog-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/router-
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/TokenCard-DcxUdsB4.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-C0-uReAO.js">
|
|
39
|
+
<link rel="modulepreload" crossorigin href="/assets/realtime-Dn6o1BHn.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/square-kanban-Cd_tPOtx.js">
|
|
41
|
+
<link rel="modulepreload" crossorigin href="/assets/folder-open-DCuG03EB.js">
|
|
42
|
+
<link rel="modulepreload" crossorigin href="/assets/plus-DcOCeQtr.js">
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/assets/search-6TSW8Big.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/session-BdZhhrrQ.js">
|
|
45
|
+
<link rel="modulepreload" crossorigin href="/assets/ColorPicker-DSVbH2ix.js">
|
|
46
|
+
<link rel="modulepreload" crossorigin href="/assets/chevron-right-BGyQzokh.js">
|
|
47
|
+
<link rel="modulepreload" crossorigin href="/assets/pencil-C37OTkSN.js">
|
|
48
|
+
<link rel="modulepreload" crossorigin href="/assets/ProjectSettingsDialog-ekHTFmaO.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/router-C3-WXlLY.js">
|
|
50
50
|
<link rel="stylesheet" crossorigin href="/assets/index-NdrHk7JO.css">
|
|
51
51
|
</head>
|
|
52
52
|
<body>
|
package/dist/worker/index.js
CHANGED
|
@@ -50336,7 +50336,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
50336
50336
|
};
|
|
50337
50337
|
|
|
50338
50338
|
// src/version.ts
|
|
50339
|
-
var VERSION = "1.4.
|
|
50339
|
+
var VERSION = "1.4.1";
|
|
50340
50340
|
|
|
50341
50341
|
// src/mcp/server.ts
|
|
50342
50342
|
var MCP_SERVER_NAME = "orqevio";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orqevio",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Orqevio ready to deploy on Cloudflare: the Worker bundle, the web app and the base Wrangler configuration. Install it with `npx create-orqevio`.",
|
|
5
5
|
"license": "FSL-1.1-ALv2",
|
|
6
6
|
"repository": {
|