From 29a63a4b65d583bb329804512ee3155eb7aade34 Mon Sep 17 00:00:00 2001 From: falbany Date: Tue, 3 Nov 2026 00:47:25 +0100 Subject: [PATCH 1/2] fix(web): keep Tab trapped inside open modals (useModalA11y) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Tab half of the focus trap lived in the dialog-level onKeyDown, which only sees keys that bubble through the dialog element. When focus sat on document.body — after a backdrop click, or once a focused node unmounted — a Tab keydown never reached it and the browser moved focus into the app behind the modal, where Enter/Space could then activate scan/launch controls mid-workflow. The trap now owns every Tab press via a window-level capture listener installed while the modal is open: focus that drifted out is pulled back to the first (or last, with Shift) control inside the dialog, edges wrap in both directions, and traversal between a dialog's own controls stays native. One listener per open modal; for stacked dialogs the most recently opened one runs last and wins, resolving nesting in favor of the topmost modal. The returned onKeyDown handler keeps only Escape; its Tab branch is now redundant and removed. All six modals using the hook (workflow runner, shortcuts, barcode, camera, confirm, timer) inherit the fix. New useModalA11y.test.tsx covers pull-back from body, both wrap edges, repeated Tabs, and the unchanged Escape routing. --- .../{index-A7Dw9JEC.js => index-B4j21U4k.js} | 2 +- src/profiles/web/dist/index.html | 2 +- src/profiles/web/dist/sw.js | 2 +- .../web/src/utils/useModalA11y.test.tsx | 109 ++++++++++++++++++ src/profiles/web/src/utils/useModalA11y.ts | 64 +++++++--- src/profiles/web/tsconfig.tsbuildinfo | 2 +- 6 files changed, 158 insertions(+), 23 deletions(-) rename src/profiles/web/dist/assets/{index-A7Dw9JEC.js => index-B4j21U4k.js} (96%) create mode 100644 src/profiles/web/src/utils/useModalA11y.test.tsx diff --git a/src/profiles/web/dist/assets/index-A7Dw9JEC.js b/src/profiles/web/dist/assets/index-B4j21U4k.js similarity index 96% rename from src/profiles/web/dist/assets/index-A7Dw9JEC.js rename to src/profiles/web/dist/assets/index-B4j21U4k.js index 5b31354..57f9743 100644 --- a/src/profiles/web/dist/assets/index-A7Dw9JEC.js +++ b/src/profiles/web/dist/assets/index-B4j21U4k.js @@ -342,7 +342,7 @@ Error generating stack: `+i.message+` * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Kw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nl=Ee("X",Kw);function Zw(n){if(n<60)return`${n}s`;const r=Math.floor(n/60),a=n%60;return`${r}m${a.toString().padStart(2,"0")}s`}function $w(n){if(!n)return{label:"",cut:!1};const r=n.replace(/\\/g,"/").split("/").filter(Boolean);return r.length===0?{label:n,cut:!1}:{label:r[r.length-1],cut:r.length>1}}function Jw({directory:n}){const[r,a]=z.useState(0);z.useEffect(()=>{a(0);const d=window.setInterval(()=>{a(f=>f+1)},1e3);return()=>window.clearInterval(d)},[]);const{label:u,cut:s}=$w(n);return h.jsxs("div",{"data-testid":"scan-status-strip",className:"flex min-w-0 items-center gap-1.5 text-[11px] text-ink-muted",children:[h.jsx($i,{className:"h-3 w-3 shrink-0 animate-spin text-chip-indigo-text motion-reduce:animate-none","aria-hidden":"true"}),h.jsxs("span",{className:"min-w-0 truncate",children:["Scanning",n&&h.jsxs(h.Fragment,{children:[" ",h.jsxs("span",{className:"font-mono text-ink-secondary",title:n,children:[s?"…/":"",u]})]})," — ",h.jsx("span",{className:"font-mono tabular-nums text-ink-secondary",children:Zw(r)})]})]})}function Pw({onExecute:n,scanning:r,hasSelection:a,fileCount:u,totalCount:s,scanningDirectory:d="",toastMessage:f,onToastDismiss:m}){const p=(f==null?void 0:f.kind)==="error";return h.jsxs("div",{className:"relative flex items-center justify-between border-t border-line bg-surface-glass px-4 py-2.5 text-xs transition-colors duration-200",children:[f&&h.jsx("div",{role:"status","aria-live":p?"assertive":"polite","aria-atomic":"true",className:`animate-toast-in absolute left-1/2 top-1/2 z-[var(--z-toast)] max-w-[min(80vw,640px)] -translate-x-1/2 -translate-y-1/2 rounded-xl border px-4 py-2 text-xs font-medium glass-panel-strong ${p?"pointer-events-auto flex max-w-[min(70vw,560px)] items-center gap-2.5 border-status-danger-border text-left text-ink":"pointer-events-none max-w-[min(70vw,560px)] text-center text-ink"}`,children:p?h.jsxs(h.Fragment,{children:[h.jsx(md,{className:"h-3.5 w-3.5 shrink-0 text-status-danger-text/80","aria-hidden":"true"}),h.jsx("span",{className:"min-w-0 flex-1",children:f.message}),m&&h.jsx("button",{type:"button",onClick:m,"aria-label":"Dismiss error",className:"shrink-0 rounded-md p-0.5 text-status-danger-text/60 hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-danger-border transition-colors",children:h.jsx(nl,{className:"h-3.5 w-3.5"})})]}):f.message}),h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[r&&h.jsx(Jw,{directory:d}),s!==void 0&&s!==u&&h.jsxs("span",{"data-testid":"action-bar-count",className:"text-ink-muted",children:["Showing ",u," of ",s]})]}),h.jsxs("button",{onClick:n,disabled:!a||r,className:"flex shrink-0 items-center gap-2 rounded-xl border border-emerald-300/50 bg-gradient-to-b from-emerald-400/90 to-emerald-600/90 px-5 py-2 font-semibold text-white shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_8px_24px_-6px_rgb(16_185_129/0.55)] transition-[filter,box-shadow,transform] hover:-translate-y-px hover:brightness-110 hover:shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_12px_30px_-6px_rgb(16_185_129/0.7)] disabled:opacity-40 disabled:hover:translate-y-0 disabled:hover:brightness-100 disabled:hover:shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_8px_24px_-6px_rgb(16_185_129/0.55)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-400",children:[h.jsx(Ji,{className:"h-3.5 w-3.5 fill-current"}),h.jsx("span",{children:"Execute"}),h.jsx("kbd",{className:"rounded bg-emerald-800/60 px-1.5 py-0.5 text-[10px] text-emerald-200 shadow-[inset_0_1px_0_rgb(255_255_255/0.12)]",children:"↵"})]})]})}function Ww({position:n,onClose:r,onLaunch:a,onLaunchWithArgs:u,onReveal:s,onOpenFolder:d,onOpenTerminal:f,onScanDirectory:m,onFilterFolder:p,onFilterExtension:x,onCopyPath:y,onCopyFilename:g,onCopyUri:w,onComputeHash:v,onVerifyHash:N,onProperties:D,onClearFile:O,onGenerateBarcode:C,showToast:J}){const[G,P]=z.useState(!1),[ae,U]=z.useState(""),R=z.useRef(null),X=z.useRef(null),ie=z.useRef(null),[L,le]=z.useState(null);if(z.useEffect(()=>{var ne;G&&((ne=X.current)==null||ne.showModal())},[G]),z.useLayoutEffect(()=>{if(!n){le(null);return}const ne=()=>{const S=R.current;if(!S)return;const Fe=S.getBoundingClientRect(),Ve=8;le({left:Math.max(Ve,Math.min(n.x,window.innerWidth-Fe.width-Ve)),top:Math.max(Ve,Math.min(n.y,window.innerHeight-Fe.height-Ve))})};return ne(),window.addEventListener("resize",ne),()=>window.removeEventListener("resize",ne)},[n]),z.useEffect(()=>{if(!n)return;ie.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ne=window.requestAnimationFrame(()=>{var S,Fe;(Fe=(S=R.current)==null?void 0:S.querySelector("[role='menuitem']"))==null||Fe.focus()});return()=>{var S;window.cancelAnimationFrame(ne),(S=ie.current)==null||S.focus()}},[n]),!n)return null;const{file:V,x:ce,y:ye}=n,ue=()=>{u(V,ae),P(!1),r()},B=ne=>{const S=ne.lastIndexOf(".");return S!==-1?ne.slice(S):""},I=ne=>{const S=Math.max(ne.lastIndexOf("/"),ne.lastIndexOf("\\"));return S!==-1?ne.slice(0,S):ne},$=ne=>{const S=Math.max(ne.lastIndexOf("/"),ne.lastIndexOf("\\"));return S!==-1?ne.slice(0,S):""};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-[calc(var(--z-context-menu)-1)]",onClick:r,onContextMenu:ne=>{ne.preventDefault(),r()},"aria-hidden":"true"}),h.jsxs("div",{ref:R,role:"menu","aria-label":`Actions for ${V.filename}`,tabIndex:0,onKeyDown:ne=>{var Ve,A,_,re;["Escape","ArrowDown","ArrowUp","Home","End"].includes(ne.key)&&ne.stopPropagation();const S=Array.from(((Ve=R.current)==null?void 0:Ve.querySelectorAll("[role='menuitem']"))??[]),Fe=S.indexOf(document.activeElement);if(ne.key==="Escape")ne.preventDefault(),r();else if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const de=ne.key==="ArrowDown"?1:-1;(A=S[(Fe+de+S.length)%S.length])==null||A.focus()}else ne.key==="Home"?(ne.preventDefault(),(_=S[0])==null||_.focus()):ne.key==="End"&&(ne.preventDefault(),(re=S.at(-1))==null||re.focus())},className:"animate-modal-in fixed z-[var(--z-context-menu)] max-h-[calc(100dvh-16px)] w-56 max-w-[calc(100vw-16px)] overflow-y-auto rounded-lg border border-line bg-surface-glass py-1 text-xs text-ink shadow-2xl backdrop-blur-md",style:L??{left:ce,top:ye,visibility:"hidden"},children:[h.jsx("div",{className:"border-b border-line px-3 py-2 font-medium text-ink-muted truncate",children:V.filename}),h.jsxs("button",{role:"menuitem",onClick:()=>{a(V),r()},className:"flex w-full items-center gap-2 px-3 py-3 min-h-[44px] hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Launch ${V.filename}`,children:[h.jsx(Ji,{className:"h-3.5 w-3.5 fill-current text-status-success-text group-hover:text-white"}),h.jsx("span",{children:"Launch"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{P(!0)},className:"flex w-full items-center gap-2 px-3 py-3 min-h-[44px] hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Launch ${V.filename} with arguments`,children:[h.jsx(Ji,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Launch with arguments..."})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{s(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Reveal ${V.filename} in file manager`,children:[h.jsx(pd,{className:"h-3.5 w-3.5 text-chip-sky-text group-hover:text-white"}),h.jsx("span",{children:"Reveal in File Manager"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{d(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Open folder containing ${V.filename}`,children:[h.jsx(Ki,{className:"h-3.5 w-3.5 text-chip-amber-text group-hover:text-white"}),h.jsx("span",{children:"Open Folder"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{f(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Open terminal in directory containing ${V.filename}`,children:[h.jsx(xd,{className:"h-3.5 w-3.5 text-status-success-text group-hover:text-white"}),h.jsx("span",{children:"Open Terminal in Directory"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{C(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":"Generate QR Code",children:[h.jsx(Ud,{className:"h-3.5 w-3.5 text-chip-fuchsia-text group-hover:text-white"}),h.jsx("span",{children:"Generate QR Code"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{const ne=I(V.path);m(ne),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":"Scan to Directory",children:[h.jsx(Ki,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Scan to Directory"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{const ne=$(V.rel_path);ne&&p(ne),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Filter view to folder ${V.filename} is in`,children:[h.jsx(gd,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Filter to Folder"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{const ne=B(V.filename);ne&&x(ne),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Filter view by extension ${B(V.filename)}`,children:[h.jsx(gd,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Filter by Extension"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{y(V,!1),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy full path of ${V.filename}`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Full Path"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{y(V,!0),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy path of ${V.filename} with forward slashes`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Path (Forward Slashes)"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{g(V,!1),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy filename of ${V.filename}`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Filename"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{g(V,!0),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy filename of ${V.filename} without extension`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Filename (no ext)"})]}),h.jsxs("button",{role:"menuitem",onClick:async()=>{const ne=I(V.path);r();try{await navigator.clipboard.writeText(ne),J==null||J(`Copied: ${ne}`)}catch(S){J==null||J(`Copy failed: ${(S==null?void 0:S.message)??S}`,"error")}},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":"Copy Directory",children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Directory"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{w(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy URI of ${V.filename}`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy URI"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{v(V,"md5"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Compute MD5 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Compute MD5 Hash"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{v(V,"sha256"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Compute SHA256 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Compute SHA256 Hash"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{N(V,"md5"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Verify MD5 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Verify MD5 Hash"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{N(V,"sha256"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Verify SHA256 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Verify SHA256 Hash"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{D(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`View properties of ${V.filename}`,children:[h.jsx(pd,{className:"h-3.5 w-3.5 text-chip-sky-text group-hover:text-white"}),h.jsx("span",{children:"Properties"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{O(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Remove ${V.filename} from list`,children:[h.jsx(Zy,{className:"h-3.5 w-3.5 text-status-danger-text group-hover:text-white"}),h.jsx("span",{children:"Delete"})]})]}),G&&h.jsx("dialog",{ref:X,className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 rounded-xl","aria-labelledby":"args-modal-title",onClick:ne=>{ne.target===X.current&&P(!1)},onCancel:ne=>{ne.preventDefault(),P(!1)},children:h.jsxs("div",{className:"animate-modal-in w-96 rounded-xl border border-frame-line glass-panel p-4",children:[h.jsx("h3",{id:"args-modal-title",className:"mb-2 text-sm font-semibold text-ink",children:"Launch with Arguments"}),h.jsx("p",{className:"mb-3 text-xs text-ink-muted truncate",children:V.filename}),h.jsx("input",{type:"text",autoFocus:!0,placeholder:"Arguments (e.g. --verbose --port 80)",value:ae,onChange:ne=>U(ne.target.value),onKeyDown:ne=>{ne.key==="Enter"&&ue(),ne.key==="Escape"&&P(!1)},className:"mb-4 w-full rounded-md border border-line bg-elevated px-3 py-2 text-xs text-ink outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500","aria-label":"Command line arguments"}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{onClick:()=>P(!1),className:"rounded-md px-3 py-1.5 text-xs text-ink-muted hover:bg-elevated hover:text-ink focus:outline-none focus:ring-2 focus:ring-indigo-500","aria-label":"Cancel launch",children:"Cancel"}),h.jsx("button",{onClick:ue,className:"btn btn-primary px-3 py-1.5","aria-label":`Launch ${V.filename} with arguments`,children:"Launch"})]})]})})]})}var ek=Hy();const xl=8,pi=8,tk=400,Dx={top:"bottom",bottom:"top",left:"right",right:"left"},nk={top:"-bottom-1 left-1/2 -translate-x-1/2",bottom:"-top-1 left-1/2 -translate-x-1/2",left:"-right-1 top-1/2 -translate-y-1/2",right:"-left-1 top-1/2 -translate-y-1/2"},lk={top:"border-b border-r",bottom:"border-t border-l",left:"border-t border-r",right:"border-b border-l"},Mx=(n,r,a)=>{switch(n){case"top":return r.top-pi-a.h>=xl;case"bottom":return r.bottom+pi+a.h<=window.innerHeight-xl;case"left":return r.left-pi-a.w>=xl;default:return r.right+pi+a.w<=window.innerWidth-xl}},ik=(n,r,a)=>{if(n==="top"||n==="bottom"){const f=r.left+r.width/2-a.w/2,m=window.innerWidth-a.w-xl;return{x:Math.min(Math.max(f,xl),Math.max(xl,m))-f,y:0}}const u=r.top+r.height/2-a.h/2,s=window.innerHeight-a.h-xl;return{x:0,y:Math.min(Math.max(u,xl),Math.max(xl,s))-u}},Ue=({text:n,children:r,block:a=!0,placement:u="top",suppress:s=!1})=>{const d=z.useRef(null),f=z.useRef(null),m=z.useId(),p=z.useRef(null),[x,y]=z.useState(!1),[g,w]=z.useState(u),[v,N]=z.useState({x:0,y:0}),[D,O]=z.useState({left:-9999,top:-9999}),C=()=>{p.current!==null&&(window.clearTimeout(p.current),p.current=null)};z.useEffect(()=>{s&&(C(),y(!1))},[s]),z.useEffect(()=>()=>C(),[]);const J=z.useCallback(()=>{const U=d.current,R=f.current;if(!U||!R)return;const X=U.getBoundingClientRect(),ie={w:R.offsetWidth,h:R.offsetHeight},L=Mx(u,X,ie)?u:Mx(Dx[u],X,ie)?Dx[u]:u,le=ik(L,X,ie);w(L),N(le);const V=X.left+X.width/2,ce=X.top+X.height/2;O(L==="top"?{left:V,top:X.top-pi-ie.h}:L==="bottom"?{left:V,top:X.bottom+pi}:L==="left"?{left:X.left-pi-ie.w,top:ce}:{left:X.right+pi,top:ce})},[u]);z.useEffect(()=>{if(!x)return;const U=()=>y(!1);return window.addEventListener("resize",U),window.addEventListener("scroll",U,!0),()=>{window.removeEventListener("resize",U),window.removeEventListener("scroll",U,!0)}},[x]);const G=U=>{if(s)return;C();const R=()=>{J(),y(!0)};U?R():p.current=window.setTimeout(R,tk)},P=()=>{C(),y(!1)};z.useEffect(()=>{if(!x)return;const U=R=>{R.key==="Escape"&&y(!1)};return document.addEventListener("keydown",U,!0),()=>document.removeEventListener("keydown",U,!0)},[x]),z.useEffect(()=>{if(!x)return;const U=()=>!!document.querySelector('[role="dialog"][aria-modal="true"], dialog[open]');if(U()){y(!1);return}const R=new MutationObserver(()=>{U()&&y(!1)});return R.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["role","aria-modal","open","class"]}),()=>R.disconnect()},[x]);const ae={onMouseEnter:()=>G(!1),onMouseLeave:P,onFocus:()=>G(!0),onBlur:P,"aria-describedby":m};return h.jsxs("div",{ref:d,className:`group relative ${a?"flex min-w-0 flex-1 items-center":"inline-flex shrink-0 items-center"}`,onMouseEnter:()=>G(!1),onMouseLeave:P,onFocus:()=>G(!0),onBlur:P,children:[z.cloneElement(r,ae),ek.createPortal(h.jsxs("span",{ref:f,id:m,role:"tooltip",className:`pointer-events-none invisible fixed z-[var(--z-tooltip)] w-max max-w-[calc(100vw-16px)] rounded-md border border-line bg-elevated px-2 py-1 text-left text-[11px] leading-relaxed text-ink shadow-lg ${x?"visible opacity-100":"opacity-0"}`,style:{left:D.left,top:D.top,transform:g==="top"||g==="bottom"?`translateX(calc(-50% + ${v.x}px))`:`translateY(calc(-50% + ${v.y}px))`},children:[n,h.jsx("span",{className:`absolute h-2 w-2 rotate-45 border-line bg-elevated ${nk[g]} ${lk[g]}`,style:g==="top"||g==="bottom"?{left:`calc(50% - ${v.x}px)`}:void 0})]}),document.body)]})};function rk({isOpen:n,initialPath:r,onClose:a,onSelect:u}){const[s,d]=z.useState(null),[f,m]=z.useState(null),[p,x]=z.useState(""),[y,g]=z.useState(!1),[w,v]=z.useState(null),N=z.useRef(null),D=z.useRef(null),O=z.useRef(null);z.useEffect(()=>{var ae;if(!n){(ae=O.current)==null||ae.focus();return}O.current=document.activeElement instanceof HTMLElement?document.activeElement:null,v(null),C(r||"");const P=requestAnimationFrame(()=>{var U;return(U=D.current)==null?void 0:U.focus()});return()=>{var U;cancelAnimationFrame(P),(U=O.current)==null||U.focus()}},[n]);const C=async P=>{g(!0),v(null);try{const ae=await fetch(`/api/fs/browse?path=${encodeURIComponent(P)}`);if(!ae.ok)throw new Error("Failed to browse directory");const U=await ae.json();d(U),m(U.current_path),x(U.current_path)}catch(ae){v(ae.message||"Navigation failed")}finally{g(!1)}},J=()=>{const P=p.trim()||f;P&&(u(P),a())},G=P=>{var X;if(P.key==="Escape"){P.preventDefault(),a();return}if(P.key!=="Tab")return;const ae=(X=N.current)==null?void 0:X.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(ae!=null&&ae.length))return;const U=ae[0],R=ae[ae.length-1];P.shiftKey&&document.activeElement===U?(P.preventDefault(),R.focus()):!P.shiftKey&&document.activeElement===R&&(P.preventDefault(),U.focus())};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:a,children:h.jsxs("div",{ref:N,role:"dialog","aria-modal":"true","aria-labelledby":"directory-picker-title",onKeyDown:G,className:"animate-modal-in flex h-[min(84dvh,760px)] max-h-[calc(100dvh-1.5rem)] w-[min(94vw,960px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:P=>P.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line px-4 py-3 sm:px-5",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ki,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"directory-picker-title",className:"text-sm font-semibold text-ink",children:"Select a directory"}),h.jsx("p",{className:"truncate font-mono text-xs text-ink-muted",children:(s==null?void 0:s.current_path)||""})]})]}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{type:"button",onClick:a,"aria-label":"Close directory picker",className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-ink-muted transition-colors hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4"})})})]}),h.jsxs("div",{className:"border-b border-line px-4 py-3 sm:px-5",children:[h.jsx("label",{htmlFor:"directory-picker-path",className:"mb-1.5 block text-xs font-medium text-ink-secondary",children:"Location"}),h.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[h.jsx("input",{ref:D,id:"directory-picker-path",type:"text",value:p,onChange:P=>x(P.target.value),onKeyDown:P=>{P.key==="Enter"&&C(p.trim())},placeholder:"/path/to/directory",className:"h-10 min-w-0 flex-1 rounded-lg border border-line bg-elevated px-2.5 font-mono text-sm text-ink outline-none placeholder:text-ink-faint transition-colors hover:bg-surface-strong focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-indigo-500/30"}),h.jsx("button",{type:"button",onClick:()=>C(p.trim()),className:"inline-flex h-10 shrink-0 items-center gap-1.5 rounded-lg border border-line bg-elevated px-3.5 text-sm font-medium text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Go"}),h.jsx(Ue,{text:"Home directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>C(""),"aria-label":"Home directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Bd,{className:"h-4 w-4"})})}),(s==null?void 0:s.parent_path)&&h.jsx(Ue,{text:"Parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>C(s.parent_path),"aria-label":"Parent directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Ld,{className:"h-4 w-4 rotate-180"})})})]})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3 sm:py-3","aria-busy":y,children:y?h.jsxs("div",{className:"flex h-full items-center justify-center gap-2.5 text-sm text-ink-muted",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text"}),h.jsx("span",{role:"status",children:"Loading directories…"})]}):w?h.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-2.5 text-center",children:[h.jsx("p",{className:"text-sm text-status-danger-text",children:w}),h.jsx("button",{type:"button",onClick:()=>C(p||(s==null?void 0:s.current_path)||""),className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Retry"})]}):h.jsxs("ul",{className:"space-y-0.5",children:[s==null?void 0:s.items.filter(P=>P.is_dir).map(P=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>C(P.path),onDoubleClick:()=>{x(P.path),u(P.path),a()},className:`flex min-h-10 w-full items-center justify-between rounded-lg px-3 py-1.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${f===P.path?"bg-chip-indigo-bg text-chip-indigo-text":"text-ink-secondary hover:bg-elevated hover:text-ink"}`,children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx(us,{className:"h-5 w-5 shrink-0 text-chip-indigo-text"}),h.jsx("span",{className:"truncate",children:P.name})]}),f===P.path&&h.jsx(Ii,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"})]})},P.path)),(s==null?void 0:s.items.filter(P=>P.is_dir).length)===0&&h.jsxs("li",{className:"flex h-full min-h-36 flex-col items-center justify-center gap-2.5 text-center text-sm text-ink-muted",children:[h.jsx(Ki,{className:"h-7 w-7 text-ink-faint"}),"No subdirectories found"]})]})}),h.jsxs("div",{className:"flex flex-col gap-2 border-t border-line px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"mb-0.5 text-xs font-medium text-ink-muted",children:"Selected folder"}),h.jsx("p",{className:"truncate font-mono text-sm text-ink",title:f||p,children:f||p||"—"})]}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-1.5",children:[h.jsx("button",{type:"button",onClick:a,className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Cancel"}),h.jsxs("button",{type:"button",onClick:J,disabled:!p.trim(),className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ki,{className:"h-4 w-4"}),"Select folder"]})]})]})]})}):null}function ak({visible:n,onFileSelected:r}){const a=z.useRef(null);return n?h.jsxs("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-drop-overlay)] flex items-center justify-center bg-black/65 backdrop-blur-sm",onClick:()=>{var u;return(u=a.current)==null?void 0:u.click()},"data-testid":"drop-config-overlay",children:[h.jsx("input",{ref:a,type:"file",accept:".profiles,.profiles.yaml,.profiles.yml,.yaml,.yml",className:"hidden",onChange:u=>{var d;const s=(d=u.target.files)==null?void 0:d[0];s&&r(s),u.target.value=""}}),h.jsxs("div",{className:"rounded-xl border-2 border-dashed border-chip-indigo-border bg-surface px-8 py-6 text-center shadow-2xl",children:[h.jsx("span",{className:"mx-auto mb-3 grid h-9 w-9 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ir,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsx("p",{className:"text-sm font-semibold text-ink",children:"Drop configuration file"}),h.jsx("p",{className:"mt-1 text-xs text-ink-muted",children:".profiles, .profiles.yaml, .yml, .yaml — session-only preview"})]})]}):null}function uk({items:n,columnTemplate:r,resizePointerRef:a,resizeMovedRef:u}){return h.jsx("div",{className:"grid select-none items-center border-b border-l-2 border-l-transparent border-line/40 bg-surface/60 font-medium text-ink-muted shadow-sm backdrop-blur-md",role:"row","aria-rowindex":1,"data-file-list-header":!0,style:{gridTemplateColumns:r},children:n.map((s,d)=>{const f=!!(s.onSort&&s.sortKey),m=s.active?s.direction==="asc"?"ascending":"descending":"none";return h.jsxs("div",{role:"columnheader","data-column-key":s.sortKey,className:`group relative flex items-center gap-1.5 truncate px-3 py-2 ${f?"cursor-pointer hover:text-ink transition-colors":""} ${s.active?"text-ink":""}`,...f?{"aria-sort":m,tabIndex:0,onClick:s.onSort,onKeyDown:p=>{var x;(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),(x=s.onSort)==null||x.call(s))}}:{},children:[s.icon,h.jsx("span",{className:"truncate",children:s.label}),f?s.active?s.direction==="asc"?h.jsx(O2,{className:"ml-auto h-3 w-3 shrink-0 text-chip-indigo-text"}):h.jsx(Vy,{className:"ml-auto h-3 w-3 shrink-0 text-chip-indigo-text"}):h.jsx(Ax,{className:"ml-auto h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-40 hover:opacity-40"}):d>0&&h.jsx(Ax,{className:"ml-auto h-3 w-3 shrink-0 opacity-40"}),s.canResize&&s.onResizeBy&&h.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":`Resize ${s.label} column`,"aria-valuemin":Zr,"aria-valuemax":ts,"aria-valuenow":s.width??s.defaultWidth??Po,"aria-valuetext":`${s.width??s.defaultWidth??Po} pixels wide`,title:"Drag to resize; use arrow keys or click either side to adjust",tabIndex:0,onClick:p=>{var g;p.preventDefault(),p.stopPropagation();const x=u.current;if(u.current=!1,x)return;const y=p.currentTarget.getBoundingClientRect();(g=s.onResizeBy)==null||g.call(s,p.clientX{p.preventDefault(),p.stopPropagation();const x=p.currentTarget.parentElement;u.current=!1,a.current={pointerId:p.pointerId,startX:p.clientX,startWidth:s.width??(x==null?void 0:x.getBoundingClientRect().width)??s.defaultWidth??Po,resizeTo:s.onResizeTo},p.currentTarget.setPointerCapture(p.pointerId)},onPointerMove:p=>{const x=a.current;if(!x||x.pointerId!==p.pointerId)return;const y=p.clientX-x.startX;Math.abs(y)>2&&(u.current=!0),x.resizeTo(x.startWidth+y)},onPointerUp:p=>{var x;((x=a.current)==null?void 0:x.pointerId)===p.pointerId&&(p.currentTarget.releasePointerCapture(p.pointerId),a.current=null,window.setTimeout(()=>{u.current=!1},0))},onPointerCancel:()=>{a.current=null,u.current=!1},onKeyDown:p=>{var x,y;p.stopPropagation(),p.key==="ArrowLeft"||p.key==="ArrowRight"?(p.preventDefault(),(x=s.onResizeBy)==null||x.call(s,p.key==="ArrowLeft"?-Yo:Yo)):(p.key==="Home"||p.key==="End")&&(p.preventDefault(),(y=s.onResizeTo)==null||y.call(s,p.key==="Home"?Zr:ts))},className:"absolute inset-y-0 right-0 z-10 w-3 cursor-col-resize touch-none border-r border-transparent transition-colors hover:border-indigo-400 focus-visible:border-indigo-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500"})]},d)})})}const Wn=28,Vo=12,Zf=500,Zr=80,ts=960,Po=160,Yo=24,Ox=44,Go={File:2,Path:3,FileName:1,Type:1,Version:1};function ok({files:n,totalCount:r,rawLoadedCount:a,onLoadMore:u,loadingMore:s=!1,scanning:d=!1,hasScanned:f=!1,activeDirectory:m="",recursive:p=!1,onDisableRecursive:x,onOpenDirectory:y,onOpenConfig:g,filterText:w,onClearFilter:v,prefilterNote:N,columnHeaders:D,columnNames:O,selectedIndex:C,onSelectIndex:J,onLaunch:G,onContextMenu:P,rowColors:ae,sort:U,onSortChange:R}){const X=["File"],ie=O.length>0?O:X,L=D.length>0?D:ie,le=Array.from({length:Math.max(ie.length,L.length)},(me,Re)=>({key:ie[Re]??X[0],header:L[Re]??ie[Re]??X[0]})),V=z.useRef(null),[ce,ye]=z.useState(0),[ue,B]=z.useState(600),[I,$]=z.useState(0),[ne,S]=z.useState({}),Fe=z.useRef(null),Ve=z.useRef(!1),A=ie.reduce((me,Re)=>me+(Go[Re]??1),1),_=(me,Re)=>{const Me=Math.min(ts,Math.max(Zr,Math.round(Re)));S(lt=>({...lt,[me]:Me}))},re=(me,Re)=>{var Z;const Me=Array.from(((Z=V.current)==null?void 0:Z.querySelectorAll("[data-column-key]"))??[]).find(oe=>oe.dataset.columnKey===me),lt=ne[me]??(Me==null?void 0:Me.getBoundingClientRect().width)??Po;_(me,lt+Re)},de=[`${Ox}px`,...ie.map(me=>ne[me]?`${ne[me]}px`:`minmax(${Zr}px, ${Go[me]??1}fr)`)].join(" "),ge=z.useRef(!1),Ae=z.useRef(null),ke=n.length,ze=a??ke,pe=r??ze,Ne=ze{const me=V.current;if(!me)return;const Re=new ResizeObserver(Me=>{for(const lt of Me)B(lt.contentRect.height),$(lt.contentRect.width)});return Re.observe(me),B(me.clientHeight||600),$(me.clientWidth||0),()=>Re.disconnect()},[]),z.useEffect(()=>{var oe;const me=V.current;if(!me||C<0||C>=ke)return;const Re=((oe=me.querySelector("[data-file-list-header]"))==null?void 0:oe.offsetHeight)??0,Me=Re+C*Wn,lt=Me+Wn;let Z=me.scrollTop;Meme.scrollTop+me.clientHeight&&(Z=lt-me.clientHeight),Z!==me.scrollTop&&(me.scrollTop=Z,ye(Z))},[C,ke]),z.useEffect(()=>{const me=V.current;if(!me)return;const Re=()=>{if(ge.current||!ln||!u)return;const Me=me.scrollTop+me.clientHeight,lt=ke*Wn;lt-MeMe&&(ge.current=!0,window.setTimeout(()=>{ge.current=!1},200),u())};return me.addEventListener("scroll",Re,{passive:!0}),window.addEventListener("scroll",Re,{passive:!0}),()=>{me.removeEventListener("scroll",Re),window.removeEventListener("scroll",Re)}},[n,ln,u,ke]),z.useEffect(()=>{if(ge.current||!ln||!u)return;const me=ke*Wn,Re=ce+ue;if(!(me-ReRe))return;const lt=`${ke}:${ze}:${pe}`;Ae.current=lt,u()});const kn=z.useCallback(me=>{ye(me.currentTarget.scrollTop)},[]),kt=Math.max(0,Math.floor(ce/Wn)-Vo),tt=Math.ceil(ue/Wn)+Vo*2,Ke=Math.min(ke,kt+tt),Jt=kt*Wn,Sn=(me,Re)=>{if(Re)return{className:"bg-chip-indigo-bg border-l-4 border-chip-indigo-border text-ink",style:{}};for(const[Me,lt]of ae)if(me.toLowerCase().includes(Me.toLowerCase()))return{className:"hover:bg-elevated border-l-4 text-ink",style:{borderLeftColor:lt,borderLeftWidth:"4px"}};return{className:"border-l-4 border-transparent text-ink-secondary hover:bg-elevated/60",style:{borderLeftColor:"transparent",borderLeftWidth:"4px"}}},Pt=(ln?ke+tt:ke)*Wn,Lt="btn btn-secondary px-3 py-1.5";return h.jsxs("div",{ref:V,onScroll:kn,className:"flex-1 overflow-auto bg-app text-xs transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-indigo-500 focus-visible:outline-offset-[-2px]","data-testid":"file-list","data-loaded-count":ze,"aria-busy":d,role:"grid","aria-label":"Discovered files","aria-rowcount":Math.max(pe,ke===0?1:0)+1,"aria-colcount":ie.length+1,"aria-activedescendant":ke>0?`file-row-${C}`:void 0,tabIndex:0,children:[h.jsx("div",{className:"sticky top-0 z-10",role:"presentation",children:h.jsx(uk,{columnTemplate:de,resizePointerRef:Fe,resizeMovedRef:Ve,items:[{label:"#",icon:h.jsx(gd,{className:"h-3.5 w-3.5"})},...le.map(({key:me,header:Re})=>({label:Re,weight:Go[me]??1,width:ne[me],defaultWidth:Math.min(ts,Math.max(Zr,Math.round((I-Ox)*(Go[me]??1)/A))),canResize:!0,onResizeBy:Me=>re(me,Me),onResizeTo:Me=>_(me,Me),sortKey:me,active:(U==null?void 0:U.column)===me,direction:U==null?void 0:U.direction,onSort:()=>{(U==null?void 0:U.column)!==me?R({column:me,direction:"asc"}):U.direction==="asc"?R({column:me,direction:"desc"}):R(null)}}))]})}),N&&ke>0&&h.jsxs("div",{role:"note","data-testid":"prefilter-note",className:"flex items-center gap-1.5 border-b border-line/40 bg-surface px-3 py-1 text-[11px] text-ink-faint",children:[h.jsx(Qy,{className:"h-3 w-3 shrink-0 text-ink-faint","aria-hidden":"true"}),h.jsx("span",{className:"min-w-0 truncate",children:N})]}),ke===0?h.jsx("div",{role:"row","aria-rowindex":2,"data-testid":"file-list-empty",children:h.jsx("div",{role:"gridcell","aria-colspan":ie.length+1,className:"p-8 text-center text-ink-faint",children:d?h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text motion-reduce:animate-none"}),h.jsx("span",{children:"Scanning files..."})]}):!m.trim()&&g?h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsx("span",{children:"Select a directory first."}),h.jsx("button",{type:"button",onClick:g,className:Lt,children:"Choose configuration"})]}):f?w.trim()?h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsxs("span",{children:["No files match “",w,"”."]}),h.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[h.jsx("button",{type:"button",onClick:v,className:Lt,children:"Clear filter"}),p&&x&&h.jsx("button",{type:"button",onClick:x,className:Lt,children:"Turn off recursive"}),y&&h.jsx("button",{type:"button",onClick:y,className:Lt,children:"Open directory"})]})]}):h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsx("span",{children:"No files found for the current directory and extension."}),h.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[p&&x&&h.jsx("button",{type:"button",onClick:x,className:Lt,children:"Turn off recursive"}),y&&h.jsx("button",{type:"button",onClick:y,className:Lt,children:"Open directory"})]})]}):h.jsx("span",{children:"Select a directory and scan to find files."})})}):h.jsxs("div",{className:"relative",style:{height:Pt},role:"rowgroup",children:[s&&h.jsx("div",{className:"pointer-events-none absolute left-1/2 top-2 z-20 -translate-x-1/2","aria-hidden":"true",children:h.jsx($i,{className:"h-4 w-4 animate-spin text-chip-indigo-text"})}),h.jsx("div",{style:{transform:`translateY(${Jt}px)`},"data-testid":"file-list-window",role:"presentation",children:n.slice(kt,Ke).map((me,Re)=>{const Me=kt+Re,lt=Me===C,Z=Sn(me.filename,lt);return h.jsxs("div",{id:`file-row-${Me}`,"data-row-index":Me,role:"row","aria-rowindex":Me+2,"aria-selected":lt,onClick:()=>{var oe;J(Me),(oe=V.current)==null||oe.focus()},onDoubleClick:()=>G(me),onContextMenu:oe=>P(oe,me,Me),className:`grid cursor-pointer items-center transition-colors ${Z.className}`,style:{...Z.style,height:Wn,gridTemplateColumns:de},children:[h.jsxs("div",{className:"flex items-center justify-end gap-1 px-3 font-mono text-ink-faint",children:[me.has_hook&&h.jsx("span",{title:me.hook_pattern?`Launch workflow: ${me.hook_pattern}`:"Launch workflow configured","aria-label":"Workflow hook attached",className:"inline-flex items-center text-status-warning-text hover:brightness-95",children:h.jsx(Jy,{className:"h-3 w-3 shrink-0"})}),h.jsx("span",{className:"hidden sm:inline",children:Me+1})]}),ie.map((oe,be)=>{const Te=me.column_values[oe]||(oe==="File"?me.filename:"-");return h.jsx("div",{role:"gridcell","data-column-key":oe,className:"truncate px-3 font-mono",style:{minWidth:Zr},title:oe==="Path"?me.path:Te,children:Te},be)})]},me.path||Me)})}),Ne&&h.jsxs("div",{className:"pointer-events-none absolute bottom-2 left-1/2 -translate-x-1/2 rounded-full border border-line bg-surface-strong px-3 py-1 text-[11px] text-ink-muted shadow","data-testid":"file-list-paging",children:[s?h.jsx(_2,{className:"mr-1.5 h-4 w-4 animate-spin motion-reduce:animate-none text-ink-muted"}):null,"(",ze," of ",pe," loaded)"]})]})]})}function yd({id:n,ariaLabel:r,value:a,options:u,onChange:s,placeholder:d,className:f="",inputClassName:m="",optionLabel:p=y=>y,onOpenChange:x}){const y=z.useId(),g=z.useRef(null),[w,v]=z.useState(!1),[N,D]=z.useState(""),[O,C]=z.useState(-1),J=u.filter(R=>p(R).toLocaleLowerCase().includes(N.toLocaleLowerCase())),G=O>=0&&J[O]?`${y}-option-${O}`:void 0;z.useEffect(()=>{const R=X=>{var ie;(ie=g.current)!=null&&ie.contains(X.target)||v(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]),z.useEffect(()=>{x==null||x(w)},[w,x]),z.useEffect(()=>{var R;O<0||(R=document.getElementById(`${y}-option-${O}`))==null||R.scrollIntoView({block:"nearest"})},[O,y]);const P=()=>{D(""),C(-1),v(!0)},ae=R=>{s(R),D(""),C(-1),v(!1)},U=R=>{if(R.key==="ArrowDown"){if(R.preventDefault(),!w){P(),C(0);return}C(X=>Math.min(X+1,J.length-1))}else if(R.key==="ArrowUp"){if(R.preventDefault(),!w){P(),C(J.length-1);return}C(X=>X<=0?J.length-1:X-1)}else R.key==="Enter"&&w&&J[O]!==void 0?(R.preventDefault(),ae(J[O])):R.key==="Escape"&&v(!1)};return h.jsxs("div",{ref:g,onBlur:R=>{var X;(X=g.current)!=null&&X.contains(R.relatedTarget)||v(!1)},className:`relative flex min-w-0 ${f}`,children:[h.jsx("input",{id:n,type:"text",role:"combobox","aria-label":r,"aria-autocomplete":"list","aria-expanded":w,"aria-controls":y,"aria-activedescendant":G,value:a,placeholder:d,onChange:R=>{s(R.target.value),D(R.target.value),C(-1),v(!0)},onKeyDown:U,className:`min-w-0 flex-1 rounded-l-md border border-line bg-elevated px-3 py-1.5 text-ink outline-none transition-colors hover:bg-surface-strong focus:border-indigo-500 ${m}`}),h.jsx("button",{type:"button","aria-label":`Show ${r.toLowerCase()} options`,"aria-expanded":w,title:`Show ${r.toLowerCase()} options`,onMouseDown:R=>R.preventDefault(),onClick:()=>w?v(!1):P(),className:"shrink-0 rounded-r-md border border-l-0 border-line bg-elevated px-2 text-ink-muted hover:bg-surface-strong hover:text-ink focus-visible:z-10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-indigo-500 transition-colors",children:h.jsx(V2,{className:`h-3.5 w-3.5 transition-transform ${w?"rotate-180":""}`})}),w&&h.jsx("ul",{id:y,role:"listbox","aria-label":`${r} options`,className:"absolute left-0 top-full z-[var(--z-combobox-list)] mt-1 max-h-60 w-full min-w-48 overflow-y-auto rounded-md border border-line bg-surface py-1 text-ink shadow-xl",children:J.length>0?J.map((R,X)=>{const ie=p(R),L=X===O,le=R===a;return h.jsx("li",{id:`${y}-option-${X}`,role:"option","aria-selected":le,title:ie||void 0,onMouseEnter:()=>C(X),onMouseDown:V=>V.preventDefault(),onClick:()=>ae(R),className:`cursor-pointer truncate px-3 py-1.5 ${L?"bg-elevated text-ink":"text-ink-secondary"} ${le?"font-semibold":""}`,children:ie||"(No filter)"},`${R}-${X}`)}):h.jsx("li",{className:"px-3 py-1.5 text-ink-muted",children:"No matching presets"})})]})}function sk({title:n,release:r,directories:a,activeDirectory:u,onDirectoryChange:s,onBrowseDirectory:d,onGoToParentDirectory:f,onGoToHomeDirectory:m,onOpenActiveDirectory:p,onOpenTerminal:x}){const[y,g]=z.useState(!1);return h.jsxs("header",{className:"relative z-30 flex flex-wrap items-center gap-3 border-b border-line bg-app/90 px-5 py-2 text-xs backdrop-blur-xl shadow-xs transition-all duration-200",children:[h.jsx("div",{className:"flex shrink-0 items-center gap-3",children:h.jsxs("div",{className:"flex items-center gap-3.5",children:[h.jsxs("div",{className:"relative flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-chip-indigo-bg to-chip-purple-bg text-chip-indigo-text border border-chip-indigo-border shadow-xs",children:[h.jsx(xd,{className:"h-4 w-4"}),h.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-2.5 w-2.5 items-center justify-center rounded-full bg-emerald-500 ring-2 ring-app"})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h1",{className:"text-sm font-bold tracking-tight text-ink font-heading",children:"ProFiles"}),n&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-ink-faint",children:"/"}),h.jsx("span",{className:"text-xs font-medium text-chip-indigo-text bg-chip-indigo-bg px-2 py-0.5 rounded-md border border-chip-indigo-border/50",children:n})]})]}),h.jsxs("p",{className:"text-[11px] font-medium text-ink-muted tracking-wide mt-0.5",children:["Crafted by ",h.jsx("span",{className:"text-ink font-semibold",children:"Florent ALBANY"})," • ",h.jsxs("span",{className:"font-mono text-chip-indigo-text",children:["v",r||"0.11.0-rc.2"]})]})]})]})}),h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[h.jsxs("label",{className:"flex shrink-0 items-center gap-1.5 font-medium text-ink-secondary text-xs",children:[h.jsx(us,{className:"h-3.5 w-3.5 text-chip-indigo-text"}),h.jsx("span",{children:"Directory:"})]}),h.jsx(Ue,{text:"Select or type a directory path to scan files from.",suppress:y,children:h.jsx(yd,{id:"directory-combobox",ariaLabel:"Directory",value:u,options:a,onChange:s,onOpenChange:g,placeholder:"/path/to/directory",className:"w-full",inputClassName:"font-mono"})}),p&&h.jsx(Ue,{text:"Open the active directory in the OS file manager",block:!1,children:h.jsx("button",{type:"button",onClick:p,"aria-label":"Open active directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(z2,{className:"h-3.5 w-3.5"})})}),f&&h.jsx(Ue,{text:"Go to parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:f,"aria-label":"Go to parent directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Ld,{className:"h-3.5 w-3.5 rotate-180"})})}),d&&h.jsx(Ue,{text:"Browse for a folder on this system",block:!1,children:h.jsx("button",{type:"button",onClick:d,"aria-label":"Browse directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Ki,{className:"h-3.5 w-3.5"})})}),x&&h.jsx(Ue,{text:"Open the active directory in a terminal",block:!1,children:h.jsx("button",{type:"button",onClick:()=>x(u),"aria-label":"Open directory in terminal",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(xd,{className:"h-3.5 w-3.5"})})}),m&&h.jsx(Ue,{text:"Set directory to your home folder",block:!1,children:h.jsx("button",{type:"button",onClick:m,"aria-label":"Go to home directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Bd,{className:"h-3.5 w-3.5"})})})]})]})}function ck({message:n,onRetry:r,retrying:a=!1}){return h.jsx("div",{className:"flex flex-1 items-center justify-center p-8",role:"alert","data-testid":"init-error-panel",children:h.jsxs("div",{className:"w-full max-w-sm rounded-xl border border-line bg-surface p-6 text-center shadow-xl",children:[h.jsx("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-full border border-status-danger-border bg-status-danger-bg",children:h.jsx(eu,{className:"h-5 w-5 text-status-danger-text/80"})}),h.jsx("h3",{className:"text-sm font-semibold text-ink",children:"Couldn't load the app"}),h.jsx("p",{className:"mt-1 break-words text-xs text-ink-secondary",children:n}),h.jsxs("button",{type:"button",onClick:r,disabled:a,className:"btn btn-primary mx-auto mt-4 px-3.5 py-1.5 font-semibold shadow-sm",children:[h.jsx(os,{className:`h-3.5 w-3.5 ${a?"animate-spin motion-reduce:animate-none":""}`}),h.jsx("span",{children:a?"Retrying...":"Retry"})]})]})})}const Rx=/"([^"]*)"|(\S+)/g,Lx=/"([^"]*)"/g,fk="Unmatched quote";function dk(n){const r=[];let a;for(Rx.lastIndex=0;(a=Rx.exec(n))!==null;){const f=a[1]!==void 0?a[1]:a[2];f&&f.trim()&&r.push(f)}let u="",s=0;Lx.lastIndex=0;let d;for(;(d=Lx.exec(n))!==null;)u+=n.slice(s,d.index),s=d.index+d[0].length;return u+=n.slice(s),{terms:r,error:u.includes('"')?fk:null}}function Py(n){const r=n.trim();if(!r)return{error:null,groups:[]};const{terms:a,error:u}=dk(r);if(a.length===0)return{error:u,groups:[]};const s=[];let d={includes:[],excludes:[]};for(const f of a){if(f.toUpperCase()==="OR"){s.push(d),d={includes:[],excludes:[]};continue}f==="-"||f==="+"||(f.startsWith("-")&&f.length>1?d.excludes.push(f.slice(1)):f.startsWith("+")&&f.length>1?d.includes.push(f.slice(1)):d.includes.push(f))}return s.push(d),{error:u,groups:s}}const hk=256,Gi=new Map;function Bx(n){return n.toLowerCase()}function mk(n){const r=Gi.get(n);if(r)return Gi.delete(n),Gi.set(n,r),r;const{groups:a}=Py(n),u={groups:a.map(s=>({includes:s.includes.map(Bx),excludes:s.excludes.map(Bx)}))};if(Gi.size>=hk){const s=Gi.keys().next().value;s!==void 0&&Gi.delete(s)}return Gi.set(n,u),u}function pk(n,r){return r.includes.every(a=>n.includes(a))&&!r.excludes.some(a=>n.includes(a))}function gk(n,r){const{groups:a}=mk(r);if(a.length===0)return!0;const u=n.toLowerCase();return a.some(s=>pk(u,s))}function xk({query:n,visible:r}){if(!r)return null;const a=Py(n);return a.error?h.jsx("div",{"data-testid":"filter-syntax-helper",className:"pointer-events-none absolute left-0 right-0 top-full z-[var(--z-syntax-helper)] mt-1 rounded-md border border-status-danger-border bg-surface-strong px-3 py-2 text-[11px] leading-5 text-status-danger-text/90 shadow-xl",children:a.error}):a.groups.length===0?null:h.jsxs("div",{"data-testid":"filter-syntax-helper",className:"pointer-events-none absolute left-0 right-0 top-full z-[var(--z-syntax-helper)] mt-1 rounded-md border border-line bg-surface-strong px-3 py-2 text-[11px] leading-5 text-ink-secondary shadow-xl",children:[h.jsx("span",{className:"mr-1.5 align-[1px] text-[10px] uppercase tracking-wide text-ink-muted",children:"reads as"}),a.groups.map((u,s)=>h.jsxs("span",{"data-testid":"filter-syntax-group",children:[s>0&&h.jsx("span",{className:"mx-1 font-mono text-chip-indigo-text",children:"OR"}),u.includes.map((d,f)=>h.jsxs("span",{children:[f>0&&h.jsx("span",{className:"text-ink-muted",children:" · "}),h.jsx("span",{className:"font-mono text-chip-indigo-text",children:d})]},`i-${f}`)),u.includes.length>0&&u.excludes.length>0&&h.jsx("span",{className:"text-ink-muted",children:" · "}),u.excludes.map((d,f)=>h.jsxs("span",{children:[f>0&&h.jsx("span",{className:"text-ink-muted",children:" · "}),h.jsx("span",{className:"text-ink-muted",children:"✕ "}),h.jsx("span",{className:"font-mono text-status-danger-text/70 line-through",children:d})]},`x-${f}`))]},s))]})}const Ux=h.jsxs("span",{className:"flex flex-col gap-1 whitespace-nowrap text-left",children:[h.jsx("span",{className:"font-semibold",children:"Supported operators"}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"a b"})," — AND (both terms)"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"a OR b"})," — either term"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"-a"})," — NOT (exclude)"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"+a"})," — force include"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:'"a b"'})," — exact phrase"]})]});function yk({extensions:n,activeExtension:r,onExtensionChange:a,filterOptions:u,filterText:s,onFilterTextChange:d,recursive:f,onRecursiveChange:m,onScan:p,scanning:x,barcodeMode:y,onBarcodeToggle:g,onCameraBarcodeClick:w,autoRescanActive:v,onTimerClick:N}){const[D,O]=z.useState(!1),[C,J]=z.useState(!1),[G,P]=z.useState(!1);return h.jsxs("div",{className:"flex w-full flex-wrap items-center gap-3 border-b border-line bg-surface-glass p-3 text-xs",children:[h.jsx(Ue,{text:Ux,suppress:C,children:h.jsxs("div",{className:"relative min-w-0 flex-1 basis-64",onFocusCapture:ae=>{ae.target.tagName==="INPUT"&&O(!0)},onBlurCapture:ae=>{ae.target.tagName==="INPUT"&&O(!1)},children:[h.jsx(Iy,{className:"pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 text-ink-secondary"}),h.jsx(yd,{id:"filter-combobox",ariaLabel:"File filter",value:s,options:u||[],onChange:d,onOpenChange:J,placeholder:"Filter files: keyword, a OR b, -tag, exact phrase...",className:"w-full",inputClassName:"pl-9 pr-3",optionLabel:ae=>ae||"(No filter)"}),h.jsx(xk,{query:s,visible:D&&!C&&s.trim().length>0})]})}),h.jsx(Ue,{text:Ux,block:!1,suppress:G,children:h.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[h.jsx("span",{className:"text-ink-muted",children:"Ext:"}),h.jsx(yd,{id:"extension-combobox",ariaLabel:"Extension filter",value:r,options:n,onChange:a,onOpenChange:P,placeholder:".py OR .toml",className:"w-44",inputClassName:"font-mono px-2.5"})]})}),h.jsx(Ue,{text:"Include subdirectories when scanning",block:!1,children:h.jsxs("label",{className:"flex shrink-0 cursor-pointer select-none items-center gap-1.5 text-ink-secondary",children:[h.jsx("input",{type:"checkbox",checked:f,onChange:ae=>m(ae.target.checked),className:"rounded border-line text-chip-indigo-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-1 focus-visible:ring-offset-app"}),h.jsx("span",{children:"Recursive"})]})}),h.jsx(Ue,{text:"Run the scan with the current criteria (Enter)",block:!1,children:h.jsxs("button",{onClick:p,disabled:x,className:"btn btn-primary shrink-0 px-3.5 py-1.5 font-semibold shadow-sm",children:[x?h.jsx(os,{className:"h-3.5 w-3.5 animate-spin motion-reduce:animate-none"}):h.jsx(Ji,{className:"h-3.5 w-3.5 fill-current"}),h.jsx("span",{children:x?"Scanning...":"Scan"})]})}),h.jsx(Ue,{text:v?"Auto-rescan is active. Click to configure.":"Configure periodic auto-rescan (hot-folder mode)",block:!1,children:h.jsx("button",{type:"button",onClick:N,"aria-label":"Configure timer / auto-rescan",className:`flex shrink-0 items-center justify-center rounded-md border p-1.5 text-ink-secondary hover:border-indigo-500 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 transition-colors ${v?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated"}`,children:h.jsx(Ky,{className:`h-3.5 w-3.5 ${v?"animate-pulse":""}`})})}),h.jsx(Ue,{text:"Toggle barcode scanner mode (USB HID). When active, scan a barcode to auto-fill controls and trigger a scan.",block:!1,children:h.jsx("button",{type:"button",onClick:g,"aria-label":y?"Disable barcode mode":"Enable barcode mode",className:`flex shrink-0 items-center justify-center rounded-md border p-1.5 text-ink-secondary hover:border-indigo-500 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 transition-colors ${y?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated"}`,children:h.jsx(Ud,{className:`h-3.5 w-3.5 ${y?"animate-pulse":""}`})})}),w&&h.jsx(Ue,{text:"Scan barcode or QR code using webcam / camera (Ctrl + Shift + B)",block:!1,children:h.jsx("button",{type:"button",onClick:w,"aria-label":"Scan barcode with camera",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Yy,{className:"h-3.5 w-3.5"})})})]})}const bk=2e3,vk=500,wk=[{value:null,label:"ALL"},{value:"DEBUG",label:"DEBUG"},{value:"INFO",label:"INFO"},{value:"WARNING",label:"WARNING"},{value:"ERROR",label:"ERROR"},{value:"CRITICAL",label:"CRITICAL"}],Hx={DEBUG:{icon:L2,className:"text-chip-sky-text"},INFO:{icon:Qy,className:"text-status-success-text"},WARNING:{icon:$y,className:"text-status-warning-text"},ERROR:{icon:md,className:"text-status-danger-text"},CRITICAL:{icon:md,className:"text-status-danger-text"},UNKNOWN:{icon:Jr,className:"text-ink-faint"}};function kk({isOpen:n,onClose:r,onOpenExternally:a}){const[u,s]=z.useState([]),[d,f]=z.useState("profiles.log"),[m,p]=z.useState(0),[x,y]=z.useState(null),[g,w]=z.useState(""),[v,N]=z.useState(!1),[D,O]=z.useState(!0),[C,J]=z.useState(null),[G,P]=z.useState(!0),ae=z.useRef(null),U=z.useRef(null),R=z.useRef(null),X=z.useRef(null),ie=z.useRef(D),L=z.useRef({level:x,search:g});ie.current=D,L.current={level:x,search:g};const le=z.useCallback(async()=>{const{level:B,search:I}=L.current;N(!0);try{const $=await i2({limit:vk,level:B,search:I});s($.entries),f($.path),p($.size_bytes),J(null)}catch($){J(($==null?void 0:$.message)||"Failed to read the log file")}finally{N(!1)}},[]);z.useEffect(()=>{n&&le()},[n,le]),z.useEffect(()=>{if(!n||!D)return;const B=window.setInterval(()=>{le()},bk);return()=>window.clearInterval(B)},[n,D,le]),z.useEffect(()=>{if(!n)return;const B=window.setTimeout(()=>void le(),250);return()=>window.clearTimeout(B)},[n,x,g,le]),z.useEffect(()=>{if(!G)return;const B=R.current;B&&(B.scrollTop=B.scrollHeight)},[u,G]),z.useEffect(()=>{if(!n)return;const B=document.activeElement instanceof HTMLElement?document.activeElement:null,I=requestAnimationFrame(()=>{var $;return($=U.current)==null?void 0:$.focus()});return()=>{cancelAnimationFrame(I),B==null||B.focus()}},[n]);const V=B=>{var S;if(B.key==="Escape"){B.preventDefault(),r();return}if(B.key!=="Tab")return;const I=(S=ae.current)==null?void 0:S.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(I!=null&&I.length))return;const $=I[0],ne=I[I.length-1];B.shiftKey&&document.activeElement===$?(B.preventDefault(),ne.focus()):!B.shiftKey&&document.activeElement===ne&&(B.preventDefault(),$.focus())},ce=()=>{const B=R.current;if(!B)return;const I=B.scrollHeight-B.scrollTop-B.clientHeight<24;P(I)},ye=async()=>{try{await navigator.clipboard.writeText(u.map(B=>B.raw).join(` -`))}catch{}},ue=z.useMemo(()=>{const B=new Map;for(const I of u)B.set(I.level,(B.get(I.level)??0)+1);return B},[u]);return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:r,children:h.jsxs("div",{ref:ae,role:"dialog","aria-modal":"true","aria-labelledby":"log-viewer-title",onKeyDown:V,className:"animate-modal-in flex h-[min(84dvh,760px)] w-[clamp(560px,85vw,1500px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:B=>B.stopPropagation(),children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-line px-5 py-4 sm:px-6",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Jr,{className:"h-5 w-5 text-chip-indigo-text","aria-hidden":"true"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"log-viewer-title",className:"text-base font-semibold text-ink",children:"Application logs"}),h.jsxs("p",{className:"truncate font-mono text-xs text-ink-muted",children:[d,h.jsxs("span",{className:"text-ink-faint",children:[" · ",qx(m)]})]})]})]}),h.jsxs("div",{className:"relative min-w-[220px] flex-1",children:[h.jsx(Iy,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-faint","aria-hidden":"true"}),h.jsx("input",{ref:X,type:"search",value:g,onChange:B=>w(B.target.value),placeholder:"Filter log lines…","aria-label":"Filter log lines",className:"w-full rounded-lg border border-line bg-elevated py-1.5 pl-8 pr-2.5 font-mono text-xs text-ink placeholder:text-ink-faint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400"})]}),h.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[h.jsx(Ue,{text:D?"Pause live tail":"Resume live tail",block:!1,children:h.jsxs("button",{type:"button",onClick:()=>O(B=>!B),"aria-pressed":D,className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${D?"border-status-success-border bg-status-success-bg text-status-success-text":"border-line bg-elevated text-ink-muted hover:text-ink"}`,children:[h.jsx("span",{className:`h-2 w-2 rounded-full ${D?"bg-emerald-400":"bg-ink-faint"}`,"aria-hidden":"true"}),D?"Live":"Paused"]})}),h.jsx(Ue,{text:"Refresh now",block:!1,children:h.jsx("button",{type:"button",onClick:()=>void le(),disabled:v,className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(os,{className:`h-4 w-4 ${v?"animate-spin":""}`,"aria-hidden":"true"})})}),h.jsx(Ue,{text:"Copy visible lines",block:!1,children:h.jsx("button",{type:"button",onClick:()=>void ye(),disabled:u.length===0,className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Vn,{className:"h-4 w-4","aria-hidden":"true"})})}),h.jsx(Ue,{text:"Open log file in the default application",block:!1,children:h.jsx("button",{type:"button",onClick:()=>{a==null||a(),r()},className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nw,{className:"h-4 w-4","aria-hidden":"true"})})}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{ref:U,type:"button",onClick:r,className:"rounded-lg p-2 text-ink-muted hover:bg-hover-surface hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4","aria-hidden":"true"})})})]})]}),h.jsxs("div",{ref:R,onScroll:ce,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain bg-app px-2 py-2 font-mono text-xs leading-relaxed sm:px-3",children:[h.jsxs("div",{className:"sticky top-0 z-10 mb-1 flex items-center gap-2 rounded-md border border-line/40 bg-surface/60 px-2 py-1 text-[10px] font-bold uppercase tracking-wider text-ink-muted shadow-sm backdrop-blur-md",role:"row",children:[h.jsx("span",{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),h.jsx("span",{className:"w-[138px] shrink-0 text-ink/70",children:"Time"}),h.jsx("span",{className:"w-[52px] shrink-0 text-ink/70",children:"Level"}),h.jsx("span",{className:"w-[150px] shrink-0 text-ink/70",children:"Source"}),h.jsx("span",{className:"min-w-0 flex-1 text-ink/70",children:"Message"})]}),C&&h.jsx("p",{role:"alert",className:"px-3 py-6 text-center text-xs text-status-danger-text",children:C}),!C&&u.length===0&&!v&&h.jsx("p",{className:"px-3 py-6 text-center text-xs text-ink-faint",children:"No log entries match the current filters."}),h.jsx("ul",{className:"space-y-0.5",children:u.map((B,I)=>{const $=Hx[B.level]??Hx.UNKNOWN,ne=$.icon,S=B.level==="ERROR"||B.level==="CRITICAL";return h.jsxs("li",{className:`group flex items-start gap-2 rounded px-2 py-1 ${S?"bg-status-danger-bg/40":"hover:bg-elevated/50"}`,children:[h.jsx("span",{className:$.className,children:h.jsx(ne,{className:"mt-0.5 h-3.5 w-3.5","aria-hidden":"true"})}),h.jsx("span",{className:"w-[138px] shrink-0 text-ink-faint",children:B.timestamp}),h.jsx("span",{className:`w-[52px] shrink-0 text-[10px] font-semibold ${$.className}`,children:B.level}),h.jsx("span",{className:"w-[150px] shrink-0 truncate text-ink-faint",title:B.source,children:B.source}),h.jsx("span",{className:"min-w-0 flex-1 break-words text-ink-secondary",children:B.message})]},`${I}-${B.raw}`)})})]}),h.jsx("div",{className:"border-t border-line/60 bg-elevated/50 px-5 py-2.5 text-[11px] text-ink-faint shadow-sm backdrop-blur-md sm:px-6",children:h.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[h.jsx("span",{className:"mr-auto min-w-0 max-w-full basis-full truncate sm:basis-auto",role:"status","aria-atomic":"true",children:v&&u.length===0?"Loading log entries…":`${u.length} of ${qx(m)} shown`}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"flex overflow-hidden rounded-lg border border-line/60 text-[11px] backdrop-blur-sm",role:"group","aria-label":"Filter by log level",children:wk.map(B=>{const I=x===B.value,$=B.value?ue.get(B.value)??0:u.length;return h.jsxs("button",{type:"button",onClick:()=>y(B.value),"aria-pressed":I,title:B.value?`Show ${B.value} and above`:"Show all levels",className:`flex items-center gap-1 px-2.5 py-1 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${I?"bg-indigo-600 text-white":"text-ink-muted hover:bg-elevated hover:text-ink"}`,children:[B.label,h.jsx("span",{className:I?"text-chip-indigo-text":"text-ink-faint",children:$})]},B.label)})}),h.jsx(Ue,{text:"Scroll to the newest entry",block:!1,children:h.jsxs("button",{type:"button",onClick:()=>P(!0),"aria-pressed":G,className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${G?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated text-ink-muted hover:text-ink"}`,children:[h.jsx(Vy,{className:"h-3.5 w-3.5","aria-hidden":"true"}),h.jsx("span",{className:"hidden sm:inline",children:"Follow tail"})]})})]}),h.jsxs("span",{className:"hidden items-center gap-1.5 lg:flex",children:[h.jsx("span",{className:"hidden sm:inline",children:"Ctrl + Shift + L"}),h.jsx("span",{children:"opens externally"})]})]})})]})}):null}function qx(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const Fx='button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], video[tabindex], [tabindex]:not([tabindex="-1"])';function Pr({isOpen:n,onClose:r,dialogRef:a,initialFocusRef:u}){return z.useEffect(()=>{if(!n)return;const s=document.activeElement instanceof HTMLElement?document.activeElement:null,d=requestAnimationFrame(()=>{var m;const f=(u==null?void 0:u.current)??((m=a.current)==null?void 0:m.querySelector(Fx))??a.current;f==null||f.focus()});return()=>{cancelAnimationFrame(d),s==null||s.focus()}},[n]),s=>{var p;if(s.key==="Escape"){s.preventDefault(),s.stopPropagation(),r();return}if(s.key!=="Tab")return;const d=(p=a.current)==null?void 0:p.querySelectorAll(Fx);if(!(d!=null&&d.length))return;const f=d[0],m=d[d.length-1];s.shiftKey&&document.activeElement===f?(s.preventDefault(),m.focus()):!s.shiftKey&&document.activeElement===m&&(s.preventDefault(),f.focus())}}function Sk({isOpen:n,onClose:r}){const a=z.useRef(null),u=Pr({isOpen:n,onClose:r,dialogRef:a});if(!n)return null;const s=[{key:"F5",desc:"Refresh / re-scan file list"},{key:"Ctrl + R",desc:"Reload configuration & scan"},{key:"Enter",desc:"Execute / launch selected file"},{key:"P",desc:"Open properties for selected file"},{key:"↑ / ↓",desc:"Navigate file list"},{key:"Home / End",desc:"Jump to first / last file"},{key:"PageUp / PageDown",desc:"Page through the file list"},{key:"Ctrl + D",desc:"Focus Directory field"},{key:"Ctrl + E",desc:"Focus Extension field"},{key:"Ctrl + F",desc:"Focus Filter / Search field"},{key:"Ctrl + L",desc:"Focus File List"},{key:"Ctrl + Shift + L",desc:"Open the log viewer"},{key:"Ctrl + ,",desc:"Open config file"},{key:"Ctrl + Shift + T",desc:"Toggle theme (Dark / Light)"},{key:"Ctrl + B",desc:"Toggle barcode scanner mode"},{key:"Ctrl + Shift + B",desc:"Open webcam / camera barcode scanner"},{key:"Ctrl + T",desc:"Open auto-rescan timer modal"},{key:"Ctrl + H",desc:"Set directory to home folder"},{key:"? or Ctrl + /",desc:"Show keyboard shortcuts"},{key:"Y / S / N",desc:"Answer workflow guard: Yes / Skip / No (prompt open)"},{key:"Enter",desc:"Confirm active workflow prompt (prompt open)"},{key:"Escape",desc:"Close dialogs / context menu"}];return h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",children:h.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-label":"Keyboard Shortcuts",onKeyDown:u,className:"animate-modal-in w-[450px] max-w-full rounded-2xl border border-frame-line glass-panel p-5",children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Xy,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Keyboard Shortcuts"})]}),h.jsx("button",{onClick:r,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"max-h-[60vh] space-y-2 overflow-y-auto pr-1 text-xs",children:s.map(({key:d,desc:f})=>h.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-elevated/50 px-3 py-2",children:[h.jsx("span",{className:"text-ink-secondary",children:f}),h.jsx("kbd",{className:"rounded bg-app px-2 py-0.5 font-mono text-[11px] font-semibold text-chip-indigo-text border border-line",children:d})]},d))}),h.jsx("div",{className:"mt-5 flex justify-end",children:h.jsx("button",{onClick:r,className:"btn btn-primary rounded-lg px-4 py-2 font-semibold",children:"Close"})})]})})}function Nk({isOpen:n,activeConfigPath:r,configExists:a=!0,onClose:u,onLoaded:s}){const[d,f]=z.useState(null),[m,p]=z.useState(""),[x,y]=z.useState(null),[g,w]=z.useState(!1),[v,N]=z.useState(null),D=z.useRef(null),O=z.useRef(null),C=z.useRef(null),J=a===!1;z.useEffect(()=>{var le;if(!n){(le=C.current)==null||le.focus();return}C.current=document.activeElement instanceof HTMLElement?document.activeElement:null,N(null);const R=r??"",X=Math.max(R.lastIndexOf("/"),R.lastIndexOf("\\")),ie=X>0?R.slice(0,X):"";G(ie);const L=requestAnimationFrame(()=>{var V;return(V=O.current)==null?void 0:V.focus()});return()=>{var V;cancelAnimationFrame(L),(V=C.current)==null||V.focus()}},[n,r]);const G=async R=>{w(!0),N(null);try{const X=await s2(R);f(X),p(X.current_path),r&&X.items.some(ie=>ie.path===r)?y(r):y(null)}catch(X){N(X.message||"Navigation failed")}finally{w(!1)}},P=R=>{var le;if(R.key==="Escape"){R.preventDefault(),u();return}if(R.key!=="Tab")return;const X=(le=D.current)==null?void 0:le.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(X!=null&&X.length))return;const ie=X[0],L=X[X.length-1];R.shiftKey&&document.activeElement===ie?(R.preventDefault(),L.focus()):!R.shiftKey&&document.activeElement===L&&(R.preventDefault(),ie.focus())},ae=async()=>{var X;const R=x||(((X=d==null?void 0:d.items.find(ie=>ie.is_config))==null?void 0:X.path)??null);if(!R){N("Select a configuration file to load.");return}try{w(!0);const ie=await r2(R);s(ie),u()}catch(ie){N(ie.message||"Unable to load configuration")}finally{w(!1)}},U=async()=>{const R=(m||(d==null?void 0:d.current_path)||"").trim();if(!R){N("Choose a directory before creating a configuration.");return}try{w(!0);const X=await o2(R);s(X),u()}catch(X){N(X.message||"Unable to create configuration")}finally{w(!1)}};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:u,children:h.jsxs("div",{ref:D,role:"dialog","aria-modal":"true","aria-labelledby":"load-config-title",onKeyDown:P,className:"animate-modal-in flex h-[min(84dvh,760px)] max-h-[calc(100dvh-1.5rem)] w-[min(94vw,960px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:R=>R.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line px-4 py-3 sm:px-5",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ir,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"load-config-title",className:"text-sm font-semibold text-ink",children:J?"Create configuration":"Load configuration"}),h.jsx("p",{className:"truncate font-mono text-xs text-ink-muted",children:(d==null?void 0:d.current_path)||""})]})]}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{type:"button",onClick:u,"aria-label":"Close configuration modal",className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-ink-muted transition-colors hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4"})})})]}),J&&h.jsx("div",{className:"border-b border-line bg-chip-indigo-bg/20 px-4 py-3 text-xs text-ink-secondary",children:"No configuration file was found. Create one here?"}),h.jsxs("div",{className:"border-b border-line px-4 py-3 sm:px-5",children:[h.jsx("label",{htmlFor:"config-path-input",className:"mb-1.5 block text-xs font-medium text-ink-secondary",children:"Configuration directory"}),h.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[h.jsx("input",{ref:O,id:"config-path-input",type:"text",value:m,onChange:R=>p(R.target.value),onKeyDown:R=>{R.key==="Enter"&&G(m.trim())},placeholder:"/path/to/directory",className:"h-10 min-w-0 flex-1 rounded-lg border border-line bg-elevated px-2.5 font-mono text-sm text-ink outline-none placeholder:text-ink-faint transition-colors hover:bg-surface-strong focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-indigo-500/30"}),h.jsx("button",{type:"button",onClick:()=>G(m.trim()),className:"inline-flex h-10 shrink-0 items-center gap-1.5 rounded-lg border border-line bg-elevated px-3.5 text-sm font-medium text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Go"}),h.jsx(Ue,{text:"Home directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>G(""),"aria-label":"Home directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Bd,{className:"h-4 w-4"})})}),(d==null?void 0:d.parent_path)&&h.jsx(Ue,{text:"Parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>G(d.parent_path),"aria-label":"Parent directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Ld,{className:"h-4 w-4 rotate-180"})})})]})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3 sm:py-3","aria-busy":g,children:g?h.jsxs("div",{className:"flex h-full items-center justify-center gap-2.5 text-sm text-ink-muted",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text"}),h.jsx("span",{role:"status",children:"Loading configuration files…"})]}):v?h.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-2.5 text-center",children:[h.jsx("p",{className:"text-sm text-status-danger-text",children:v}),h.jsx("button",{type:"button",onClick:()=>G(m||(d==null?void 0:d.current_path)||""),className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Retry"})]}):h.jsxs("ul",{className:"space-y-1",children:[d==null?void 0:d.items.map(R=>{if(R.is_dir)return h.jsx("li",{children:h.jsx("button",{onClick:()=>G(R.path),onDoubleClick:()=>G(R.path),className:"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-left text-xs text-ink-secondary hover:bg-elevated",children:h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(us,{className:"h-3.5 w-3.5 text-chip-indigo-text"}),R.name]})})},R.path);const X=x===R.path;return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>y(R.path),"aria-pressed":X,className:`flex w-full items-center justify-between rounded-lg px-3 py-1.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${X?"bg-chip-indigo-bg text-chip-indigo-text":"text-ink-secondary hover:bg-elevated hover:text-ink"}`,children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx(Jr,{className:"h-5 w-5 shrink-0 text-chip-amber-text"}),h.jsx("span",{className:"truncate",children:R.name})]}),R.is_config&&h.jsx(Ir,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"}),X&&h.jsx(Ii,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"})]})},R.path)}),(d==null?void 0:d.items.filter(R=>R.is_config).length)===0&&h.jsxs("li",{className:"flex h-full min-h-36 flex-col items-center justify-center gap-2.5 text-center text-sm text-ink-muted",children:[h.jsx(Jr,{className:"h-7 w-7 text-ink-faint"}),"No configuration files found"]})]})}),h.jsxs("div",{className:"flex flex-col gap-2 border-t border-line px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"mb-0.5 text-xs font-medium text-ink-muted",children:"Selected file"}),h.jsx("p",{className:"truncate font-mono text-sm text-ink",title:x||m,children:x||m||"—"})]}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-1.5",children:[h.jsx("button",{type:"button",onClick:u,className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Cancel"}),J?h.jsxs("button",{type:"button",onClick:U,disabled:!m.trim(),className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ir,{className:"h-4 w-4"}),"Create configuration"]}):h.jsxs("button",{type:"button",onClick:ae,disabled:!x,className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ir,{className:"h-4 w-4"}),"Load configuration"]})]})]})]})}):null}function Wy({isOpen:n,onClose:r,initialFilePath:a,md5:u}){const[s,d]=z.useState(null),[f,m]=z.useState(""),[p,x]=z.useState([]),[y,g]=z.useState(!1),[w,v]=z.useState(null),[N,D]=z.useState(!1),[O,C]=z.useState(!1),[J,G]=z.useState(null),P=z.useRef(null),ae=Pr({isOpen:n,onClose:r,dialogRef:P});z.useEffect(()=>{if(!n)return;async function ue(){if(a){g(!0);try{const B=await Cx({filePath:a});d(B.image),m(B.content),U(B.content)}catch(B){v(B.message)}finally{g(!1)}}}ue()},[n,a]);const U=ue=>{const B=ue.split(";").map(I=>{const $=I.split("=");return{key:$[0]||"",value:$[1]||""}}).filter(I=>I.key||I.value);x(B)},R=async ue=>{const B=ue.filter(I=>I.key.trim()).map(I=>`${I.key.trim()}=${I.value.trim()}`).join(";");if(m(B),!B){d(null);return}try{const I=await Cx({content:B});d(I.image)}catch(I){console.error("Failed to re-generate barcode:",I)}},X=(ue,B,I)=>{const $=[...p];$[ue][B]=I,x($),R($)},ie=()=>{const ue=[...p,{key:"",value:""}];x(ue)},L=ue=>{const B=p.filter((I,$)=>$!==ue);x(B),R(B)},le=()=>{if(!u||p.some(B=>B.key.toLowerCase()==="md5"))return;const ue=[...p,{key:"md5",value:u}];x(ue),R(ue)},V=async()=>{if(s){G("Saving…");try{const ue=await p2(s,`profiles-qr-${Date.now()}.png`);G(ue.path||ue.message)}catch(ue){G(`Save failed: ${(ue==null?void 0:ue.message)??ue}`)}finally{setTimeout(()=>G(null),6e3)}}},ce=async()=>{try{await navigator.clipboard.writeText(f),D(!0),setTimeout(()=>D(!1),2e3)}catch(ue){console.error("Copy failed",ue)}},ye=async()=>{if(s)try{const B=await(await fetch(s)).blob();await navigator.clipboard.write([new ClipboardItem({[B.type]:B})]),C(!0),setTimeout(()=>C(!1),2e3)}catch(ue){console.error("Image copy failed",ue)}};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4",onClick:r,children:h.jsxs("div",{ref:P,role:"dialog","aria-modal":"true","aria-label":"QR Code Settings",onKeyDown:ae,className:"animate-modal-in w-full max-w-md rounded-xl border border-frame-line glass-panel p-6",onClick:ue=>ue.stopPropagation(),children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold text-ink",children:"QR Code Settings"}),h.jsx("button",{onClick:r,className:"focus-ring rounded-md p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),y?h.jsx("div",{className:"flex h-48 items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent"})}):w?h.jsx("div",{className:"rounded-md border border-status-danger-border bg-status-danger-bg p-4 text-center text-xs text-status-danger-text",children:w}):h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsxs("div",{className:"relative group",children:[h.jsx("div",{className:"h-48 w-48 overflow-hidden rounded-lg border border-line bg-white p-2",children:s?h.jsx("img",{src:s,alt:"QR Code",className:"h-full w-full object-contain"}):h.jsx("div",{className:"flex h-full items-center justify-center text-xs text-slate-400",children:"No content"})}),s&&h.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/20 rounded-lg",children:h.jsxs("button",{onClick:ye,className:"focus-ring flex items-center gap-2 rounded-md bg-white/90 p-2 text-xs font-medium text-slate-900 shadow-sm hover:bg-white",children:[O?h.jsx(Ii,{className:"h-3.5 w-3.5"}):h.jsx(Vn,{className:"h-3.5 w-3.5"}),O?"Copied":"Copy Image"]})})]}),h.jsxs("div",{className:"flex w-full gap-2",children:[h.jsxs("button",{onClick:ce,className:"btn btn-secondary flex-1 px-3 py-1.5",children:[N?h.jsx(Ii,{className:"h-3.5 w-3.5 text-status-success-text"}):h.jsx(Vn,{className:"h-3.5 w-3.5"}),"Copy Content"]}),h.jsxs("button",{onClick:V,disabled:!s,className:"btn btn-primary flex-1 px-3 py-1.5",children:[h.jsx(Gy,{className:"h-3.5 w-3.5"}),"Save Image"]})]}),J&&h.jsx("p",{className:"break-all text-center text-[11px] text-ink-muted",role:"status",children:J})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("label",{className:"text-xs font-medium text-ink-muted uppercase tracking-wider",children:"Payload Fields"}),h.jsxs("div",{className:"flex gap-2",children:[u&&!p.some(ue=>ue.key==="md5")&&h.jsxs("button",{onClick:le,className:"btn-chip flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-chip-purple-text border border-chip-purple-border",children:[h.jsx(Kr,{className:"h-3 w-3"})," Inc. MD5"]}),h.jsxs("button",{onClick:ie,className:"btn-chip flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-chip-indigo-text border border-chip-indigo-border",children:[h.jsx(_w,{className:"h-3 w-3"})," Add Field"]})]})]}),h.jsxs("div",{className:"max-h-48 space-y-2 overflow-y-auto pr-1 custom-scrollbar",children:[p.map((ue,B)=>h.jsxs("div",{className:"flex gap-2 items-center slide-in",children:[h.jsx("input",{type:"text",placeholder:"key",value:ue.key,onChange:I=>X(B,"key",I.target.value),className:"w-1/3 rounded border border-line bg-elevated px-2 py-1 text-xs text-ink focus:border-indigo-500 focus:outline-none"}),h.jsx("input",{type:"text",placeholder:"value",value:ue.value,onChange:I=>X(B,"value",I.target.value),className:"flex-1 rounded border border-line bg-elevated px-2 py-1 text-xs text-ink focus:border-indigo-500 focus:outline-none"}),h.jsx("button",{onClick:()=>L(B),className:"p-1 text-ink-muted hover:text-status-danger-text transition-colors","aria-label":"Remove field",children:h.jsx(Zy,{className:"h-3.5 w-3.5"})})]},B)),p.length===0&&h.jsx("p",{className:"text-center py-4 text-xs text-ink-muted italic",children:"No fields defined"})]})]}),h.jsxs("div",{className:"pt-2 border-t border-line",children:[h.jsx("label",{className:"text-[10px] font-medium text-ink-muted uppercase tracking-wider block mb-1.5",children:"Raw Preview"}),h.jsx("div",{className:"rounded bg-elevated p-2 font-mono text-[10px] text-ink-secondary break-all border border-line",children:f||h.jsx("span",{className:"italic text-ink-muted/50",children:"empty"})})]})]})]})}):null}const Vx=["Bytes","KB","MB","GB","TB"];function e0(n){if(n===0)return"0 Bytes";const r=1024,a=Math.max(0,Math.min(Vx.length-1,Math.floor(Math.log(n)/Math.log(r))));return parseFloat((n/Math.pow(r,a)).toFixed(2))+" "+Vx[a]}function Ek(n){const r=Math.max(n.lastIndexOf("\\"),n.lastIndexOf("/"));return r===-1?"":n.slice(0,r)}function jk(n){const r=[`File Properties: ${n.name}`,`Path: ${n.path}`,`Type: ${n.type}`,`Size: ${e0(n.size_bytes)}`,`Created: ${n.created}`,`Modified: ${n.modified}`];return n.md5&&r.push(`MD5: ${n.md5}`),n.sha256&&r.push(`SHA256: ${n.sha256}`),r.join(` +`))}catch{}},ue=z.useMemo(()=>{const B=new Map;for(const I of u)B.set(I.level,(B.get(I.level)??0)+1);return B},[u]);return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:r,children:h.jsxs("div",{ref:ae,role:"dialog","aria-modal":"true","aria-labelledby":"log-viewer-title",onKeyDown:V,className:"animate-modal-in flex h-[min(84dvh,760px)] w-[clamp(560px,85vw,1500px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:B=>B.stopPropagation(),children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-line px-5 py-4 sm:px-6",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Jr,{className:"h-5 w-5 text-chip-indigo-text","aria-hidden":"true"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"log-viewer-title",className:"text-base font-semibold text-ink",children:"Application logs"}),h.jsxs("p",{className:"truncate font-mono text-xs text-ink-muted",children:[d,h.jsxs("span",{className:"text-ink-faint",children:[" · ",qx(m)]})]})]})]}),h.jsxs("div",{className:"relative min-w-[220px] flex-1",children:[h.jsx(Iy,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-faint","aria-hidden":"true"}),h.jsx("input",{ref:X,type:"search",value:g,onChange:B=>w(B.target.value),placeholder:"Filter log lines…","aria-label":"Filter log lines",className:"w-full rounded-lg border border-line bg-elevated py-1.5 pl-8 pr-2.5 font-mono text-xs text-ink placeholder:text-ink-faint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400"})]}),h.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[h.jsx(Ue,{text:D?"Pause live tail":"Resume live tail",block:!1,children:h.jsxs("button",{type:"button",onClick:()=>O(B=>!B),"aria-pressed":D,className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${D?"border-status-success-border bg-status-success-bg text-status-success-text":"border-line bg-elevated text-ink-muted hover:text-ink"}`,children:[h.jsx("span",{className:`h-2 w-2 rounded-full ${D?"bg-emerald-400":"bg-ink-faint"}`,"aria-hidden":"true"}),D?"Live":"Paused"]})}),h.jsx(Ue,{text:"Refresh now",block:!1,children:h.jsx("button",{type:"button",onClick:()=>void le(),disabled:v,className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(os,{className:`h-4 w-4 ${v?"animate-spin":""}`,"aria-hidden":"true"})})}),h.jsx(Ue,{text:"Copy visible lines",block:!1,children:h.jsx("button",{type:"button",onClick:()=>void ye(),disabled:u.length===0,className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Vn,{className:"h-4 w-4","aria-hidden":"true"})})}),h.jsx(Ue,{text:"Open log file in the default application",block:!1,children:h.jsx("button",{type:"button",onClick:()=>{a==null||a(),r()},className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nw,{className:"h-4 w-4","aria-hidden":"true"})})}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{ref:U,type:"button",onClick:r,className:"rounded-lg p-2 text-ink-muted hover:bg-hover-surface hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4","aria-hidden":"true"})})})]})]}),h.jsxs("div",{ref:R,onScroll:ce,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain bg-app px-2 py-2 font-mono text-xs leading-relaxed sm:px-3",children:[h.jsxs("div",{className:"sticky top-0 z-10 mb-1 flex items-center gap-2 rounded-md border border-line/40 bg-surface/60 px-2 py-1 text-[10px] font-bold uppercase tracking-wider text-ink-muted shadow-sm backdrop-blur-md",role:"row",children:[h.jsx("span",{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),h.jsx("span",{className:"w-[138px] shrink-0 text-ink/70",children:"Time"}),h.jsx("span",{className:"w-[52px] shrink-0 text-ink/70",children:"Level"}),h.jsx("span",{className:"w-[150px] shrink-0 text-ink/70",children:"Source"}),h.jsx("span",{className:"min-w-0 flex-1 text-ink/70",children:"Message"})]}),C&&h.jsx("p",{role:"alert",className:"px-3 py-6 text-center text-xs text-status-danger-text",children:C}),!C&&u.length===0&&!v&&h.jsx("p",{className:"px-3 py-6 text-center text-xs text-ink-faint",children:"No log entries match the current filters."}),h.jsx("ul",{className:"space-y-0.5",children:u.map((B,I)=>{const $=Hx[B.level]??Hx.UNKNOWN,ne=$.icon,S=B.level==="ERROR"||B.level==="CRITICAL";return h.jsxs("li",{className:`group flex items-start gap-2 rounded px-2 py-1 ${S?"bg-status-danger-bg/40":"hover:bg-elevated/50"}`,children:[h.jsx("span",{className:$.className,children:h.jsx(ne,{className:"mt-0.5 h-3.5 w-3.5","aria-hidden":"true"})}),h.jsx("span",{className:"w-[138px] shrink-0 text-ink-faint",children:B.timestamp}),h.jsx("span",{className:`w-[52px] shrink-0 text-[10px] font-semibold ${$.className}`,children:B.level}),h.jsx("span",{className:"w-[150px] shrink-0 truncate text-ink-faint",title:B.source,children:B.source}),h.jsx("span",{className:"min-w-0 flex-1 break-words text-ink-secondary",children:B.message})]},`${I}-${B.raw}`)})})]}),h.jsx("div",{className:"border-t border-line/60 bg-elevated/50 px-5 py-2.5 text-[11px] text-ink-faint shadow-sm backdrop-blur-md sm:px-6",children:h.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[h.jsx("span",{className:"mr-auto min-w-0 max-w-full basis-full truncate sm:basis-auto",role:"status","aria-atomic":"true",children:v&&u.length===0?"Loading log entries…":`${u.length} of ${qx(m)} shown`}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"flex overflow-hidden rounded-lg border border-line/60 text-[11px] backdrop-blur-sm",role:"group","aria-label":"Filter by log level",children:wk.map(B=>{const I=x===B.value,$=B.value?ue.get(B.value)??0:u.length;return h.jsxs("button",{type:"button",onClick:()=>y(B.value),"aria-pressed":I,title:B.value?`Show ${B.value} and above`:"Show all levels",className:`flex items-center gap-1 px-2.5 py-1 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${I?"bg-indigo-600 text-white":"text-ink-muted hover:bg-elevated hover:text-ink"}`,children:[B.label,h.jsx("span",{className:I?"text-chip-indigo-text":"text-ink-faint",children:$})]},B.label)})}),h.jsx(Ue,{text:"Scroll to the newest entry",block:!1,children:h.jsxs("button",{type:"button",onClick:()=>P(!0),"aria-pressed":G,className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${G?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated text-ink-muted hover:text-ink"}`,children:[h.jsx(Vy,{className:"h-3.5 w-3.5","aria-hidden":"true"}),h.jsx("span",{className:"hidden sm:inline",children:"Follow tail"})]})})]}),h.jsxs("span",{className:"hidden items-center gap-1.5 lg:flex",children:[h.jsx("span",{className:"hidden sm:inline",children:"Ctrl + Shift + L"}),h.jsx("span",{children:"opens externally"})]})]})})]})}):null}function qx(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const Fx='button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], video[tabindex], [tabindex]:not([tabindex="-1"])';function Pr({isOpen:n,onClose:r,dialogRef:a,initialFocusRef:u}){return z.useEffect(()=>{if(!n)return;const s=document.activeElement instanceof HTMLElement?document.activeElement:null,d=requestAnimationFrame(()=>{var p;const m=(u==null?void 0:u.current)??((p=a.current)==null?void 0:p.querySelector(Fx))??a.current;m==null||m.focus()}),f=m=>{if(m.key!=="Tab")return;const p=a.current;if(!p)return;const x=Array.from(p.querySelectorAll(Fx));if(!x.length)return;const y=x[0],g=x[x.length-1],w=document.activeElement;if(!(w instanceof Node&&p.contains(w))){m.preventDefault(),(m.shiftKey?g:y).focus();return}m.shiftKey&&(w===y||w===p)?(m.preventDefault(),g.focus()):!m.shiftKey&&(w===g||w===p)&&(m.preventDefault(),y.focus())};return window.addEventListener("keydown",f,!0),()=>{cancelAnimationFrame(d),s==null||s.focus(),window.removeEventListener("keydown",f,!0)}},[n]),s=>{s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),r())}}function Sk({isOpen:n,onClose:r}){const a=z.useRef(null),u=Pr({isOpen:n,onClose:r,dialogRef:a});if(!n)return null;const s=[{key:"F5",desc:"Refresh / re-scan file list"},{key:"Ctrl + R",desc:"Reload configuration & scan"},{key:"Enter",desc:"Execute / launch selected file"},{key:"P",desc:"Open properties for selected file"},{key:"↑ / ↓",desc:"Navigate file list"},{key:"Home / End",desc:"Jump to first / last file"},{key:"PageUp / PageDown",desc:"Page through the file list"},{key:"Ctrl + D",desc:"Focus Directory field"},{key:"Ctrl + E",desc:"Focus Extension field"},{key:"Ctrl + F",desc:"Focus Filter / Search field"},{key:"Ctrl + L",desc:"Focus File List"},{key:"Ctrl + Shift + L",desc:"Open the log viewer"},{key:"Ctrl + ,",desc:"Open config file"},{key:"Ctrl + Shift + T",desc:"Toggle theme (Dark / Light)"},{key:"Ctrl + B",desc:"Toggle barcode scanner mode"},{key:"Ctrl + Shift + B",desc:"Open webcam / camera barcode scanner"},{key:"Ctrl + T",desc:"Open auto-rescan timer modal"},{key:"Ctrl + H",desc:"Set directory to home folder"},{key:"? or Ctrl + /",desc:"Show keyboard shortcuts"},{key:"Y / S / N",desc:"Answer workflow guard: Yes / Skip / No (prompt open)"},{key:"Enter",desc:"Confirm active workflow prompt (prompt open)"},{key:"Escape",desc:"Close dialogs / context menu"}];return h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",children:h.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-label":"Keyboard Shortcuts",onKeyDown:u,className:"animate-modal-in w-[450px] max-w-full rounded-2xl border border-frame-line glass-panel p-5",children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Xy,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Keyboard Shortcuts"})]}),h.jsx("button",{onClick:r,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"max-h-[60vh] space-y-2 overflow-y-auto pr-1 text-xs",children:s.map(({key:d,desc:f})=>h.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-elevated/50 px-3 py-2",children:[h.jsx("span",{className:"text-ink-secondary",children:f}),h.jsx("kbd",{className:"rounded bg-app px-2 py-0.5 font-mono text-[11px] font-semibold text-chip-indigo-text border border-line",children:d})]},d))}),h.jsx("div",{className:"mt-5 flex justify-end",children:h.jsx("button",{onClick:r,className:"btn btn-primary rounded-lg px-4 py-2 font-semibold",children:"Close"})})]})})}function Nk({isOpen:n,activeConfigPath:r,configExists:a=!0,onClose:u,onLoaded:s}){const[d,f]=z.useState(null),[m,p]=z.useState(""),[x,y]=z.useState(null),[g,w]=z.useState(!1),[v,N]=z.useState(null),D=z.useRef(null),O=z.useRef(null),C=z.useRef(null),J=a===!1;z.useEffect(()=>{var le;if(!n){(le=C.current)==null||le.focus();return}C.current=document.activeElement instanceof HTMLElement?document.activeElement:null,N(null);const R=r??"",X=Math.max(R.lastIndexOf("/"),R.lastIndexOf("\\")),ie=X>0?R.slice(0,X):"";G(ie);const L=requestAnimationFrame(()=>{var V;return(V=O.current)==null?void 0:V.focus()});return()=>{var V;cancelAnimationFrame(L),(V=C.current)==null||V.focus()}},[n,r]);const G=async R=>{w(!0),N(null);try{const X=await s2(R);f(X),p(X.current_path),r&&X.items.some(ie=>ie.path===r)?y(r):y(null)}catch(X){N(X.message||"Navigation failed")}finally{w(!1)}},P=R=>{var le;if(R.key==="Escape"){R.preventDefault(),u();return}if(R.key!=="Tab")return;const X=(le=D.current)==null?void 0:le.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(X!=null&&X.length))return;const ie=X[0],L=X[X.length-1];R.shiftKey&&document.activeElement===ie?(R.preventDefault(),L.focus()):!R.shiftKey&&document.activeElement===L&&(R.preventDefault(),ie.focus())},ae=async()=>{var X;const R=x||(((X=d==null?void 0:d.items.find(ie=>ie.is_config))==null?void 0:X.path)??null);if(!R){N("Select a configuration file to load.");return}try{w(!0);const ie=await r2(R);s(ie),u()}catch(ie){N(ie.message||"Unable to load configuration")}finally{w(!1)}},U=async()=>{const R=(m||(d==null?void 0:d.current_path)||"").trim();if(!R){N("Choose a directory before creating a configuration.");return}try{w(!0);const X=await o2(R);s(X),u()}catch(X){N(X.message||"Unable to create configuration")}finally{w(!1)}};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:u,children:h.jsxs("div",{ref:D,role:"dialog","aria-modal":"true","aria-labelledby":"load-config-title",onKeyDown:P,className:"animate-modal-in flex h-[min(84dvh,760px)] max-h-[calc(100dvh-1.5rem)] w-[min(94vw,960px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:R=>R.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line px-4 py-3 sm:px-5",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ir,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"load-config-title",className:"text-sm font-semibold text-ink",children:J?"Create configuration":"Load configuration"}),h.jsx("p",{className:"truncate font-mono text-xs text-ink-muted",children:(d==null?void 0:d.current_path)||""})]})]}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{type:"button",onClick:u,"aria-label":"Close configuration modal",className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-ink-muted transition-colors hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4"})})})]}),J&&h.jsx("div",{className:"border-b border-line bg-chip-indigo-bg/20 px-4 py-3 text-xs text-ink-secondary",children:"No configuration file was found. Create one here?"}),h.jsxs("div",{className:"border-b border-line px-4 py-3 sm:px-5",children:[h.jsx("label",{htmlFor:"config-path-input",className:"mb-1.5 block text-xs font-medium text-ink-secondary",children:"Configuration directory"}),h.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[h.jsx("input",{ref:O,id:"config-path-input",type:"text",value:m,onChange:R=>p(R.target.value),onKeyDown:R=>{R.key==="Enter"&&G(m.trim())},placeholder:"/path/to/directory",className:"h-10 min-w-0 flex-1 rounded-lg border border-line bg-elevated px-2.5 font-mono text-sm text-ink outline-none placeholder:text-ink-faint transition-colors hover:bg-surface-strong focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-indigo-500/30"}),h.jsx("button",{type:"button",onClick:()=>G(m.trim()),className:"inline-flex h-10 shrink-0 items-center gap-1.5 rounded-lg border border-line bg-elevated px-3.5 text-sm font-medium text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Go"}),h.jsx(Ue,{text:"Home directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>G(""),"aria-label":"Home directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Bd,{className:"h-4 w-4"})})}),(d==null?void 0:d.parent_path)&&h.jsx(Ue,{text:"Parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>G(d.parent_path),"aria-label":"Parent directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Ld,{className:"h-4 w-4 rotate-180"})})})]})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3 sm:py-3","aria-busy":g,children:g?h.jsxs("div",{className:"flex h-full items-center justify-center gap-2.5 text-sm text-ink-muted",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text"}),h.jsx("span",{role:"status",children:"Loading configuration files…"})]}):v?h.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-2.5 text-center",children:[h.jsx("p",{className:"text-sm text-status-danger-text",children:v}),h.jsx("button",{type:"button",onClick:()=>G(m||(d==null?void 0:d.current_path)||""),className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Retry"})]}):h.jsxs("ul",{className:"space-y-1",children:[d==null?void 0:d.items.map(R=>{if(R.is_dir)return h.jsx("li",{children:h.jsx("button",{onClick:()=>G(R.path),onDoubleClick:()=>G(R.path),className:"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-left text-xs text-ink-secondary hover:bg-elevated",children:h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(us,{className:"h-3.5 w-3.5 text-chip-indigo-text"}),R.name]})})},R.path);const X=x===R.path;return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>y(R.path),"aria-pressed":X,className:`flex w-full items-center justify-between rounded-lg px-3 py-1.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${X?"bg-chip-indigo-bg text-chip-indigo-text":"text-ink-secondary hover:bg-elevated hover:text-ink"}`,children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx(Jr,{className:"h-5 w-5 shrink-0 text-chip-amber-text"}),h.jsx("span",{className:"truncate",children:R.name})]}),R.is_config&&h.jsx(Ir,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"}),X&&h.jsx(Ii,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"})]})},R.path)}),(d==null?void 0:d.items.filter(R=>R.is_config).length)===0&&h.jsxs("li",{className:"flex h-full min-h-36 flex-col items-center justify-center gap-2.5 text-center text-sm text-ink-muted",children:[h.jsx(Jr,{className:"h-7 w-7 text-ink-faint"}),"No configuration files found"]})]})}),h.jsxs("div",{className:"flex flex-col gap-2 border-t border-line px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"mb-0.5 text-xs font-medium text-ink-muted",children:"Selected file"}),h.jsx("p",{className:"truncate font-mono text-sm text-ink",title:x||m,children:x||m||"—"})]}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-1.5",children:[h.jsx("button",{type:"button",onClick:u,className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Cancel"}),J?h.jsxs("button",{type:"button",onClick:U,disabled:!m.trim(),className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ir,{className:"h-4 w-4"}),"Create configuration"]}):h.jsxs("button",{type:"button",onClick:ae,disabled:!x,className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ir,{className:"h-4 w-4"}),"Load configuration"]})]})]})]})}):null}function Wy({isOpen:n,onClose:r,initialFilePath:a,md5:u}){const[s,d]=z.useState(null),[f,m]=z.useState(""),[p,x]=z.useState([]),[y,g]=z.useState(!1),[w,v]=z.useState(null),[N,D]=z.useState(!1),[O,C]=z.useState(!1),[J,G]=z.useState(null),P=z.useRef(null),ae=Pr({isOpen:n,onClose:r,dialogRef:P});z.useEffect(()=>{if(!n)return;async function ue(){if(a){g(!0);try{const B=await Cx({filePath:a});d(B.image),m(B.content),U(B.content)}catch(B){v(B.message)}finally{g(!1)}}}ue()},[n,a]);const U=ue=>{const B=ue.split(";").map(I=>{const $=I.split("=");return{key:$[0]||"",value:$[1]||""}}).filter(I=>I.key||I.value);x(B)},R=async ue=>{const B=ue.filter(I=>I.key.trim()).map(I=>`${I.key.trim()}=${I.value.trim()}`).join(";");if(m(B),!B){d(null);return}try{const I=await Cx({content:B});d(I.image)}catch(I){console.error("Failed to re-generate barcode:",I)}},X=(ue,B,I)=>{const $=[...p];$[ue][B]=I,x($),R($)},ie=()=>{const ue=[...p,{key:"",value:""}];x(ue)},L=ue=>{const B=p.filter((I,$)=>$!==ue);x(B),R(B)},le=()=>{if(!u||p.some(B=>B.key.toLowerCase()==="md5"))return;const ue=[...p,{key:"md5",value:u}];x(ue),R(ue)},V=async()=>{if(s){G("Saving…");try{const ue=await p2(s,`profiles-qr-${Date.now()}.png`);G(ue.path||ue.message)}catch(ue){G(`Save failed: ${(ue==null?void 0:ue.message)??ue}`)}finally{setTimeout(()=>G(null),6e3)}}},ce=async()=>{try{await navigator.clipboard.writeText(f),D(!0),setTimeout(()=>D(!1),2e3)}catch(ue){console.error("Copy failed",ue)}},ye=async()=>{if(s)try{const B=await(await fetch(s)).blob();await navigator.clipboard.write([new ClipboardItem({[B.type]:B})]),C(!0),setTimeout(()=>C(!1),2e3)}catch(ue){console.error("Image copy failed",ue)}};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4",onClick:r,children:h.jsxs("div",{ref:P,role:"dialog","aria-modal":"true","aria-label":"QR Code Settings",onKeyDown:ae,className:"animate-modal-in w-full max-w-md rounded-xl border border-frame-line glass-panel p-6",onClick:ue=>ue.stopPropagation(),children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold text-ink",children:"QR Code Settings"}),h.jsx("button",{onClick:r,className:"focus-ring rounded-md p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),y?h.jsx("div",{className:"flex h-48 items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent"})}):w?h.jsx("div",{className:"rounded-md border border-status-danger-border bg-status-danger-bg p-4 text-center text-xs text-status-danger-text",children:w}):h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsxs("div",{className:"relative group",children:[h.jsx("div",{className:"h-48 w-48 overflow-hidden rounded-lg border border-line bg-white p-2",children:s?h.jsx("img",{src:s,alt:"QR Code",className:"h-full w-full object-contain"}):h.jsx("div",{className:"flex h-full items-center justify-center text-xs text-slate-400",children:"No content"})}),s&&h.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/20 rounded-lg",children:h.jsxs("button",{onClick:ye,className:"focus-ring flex items-center gap-2 rounded-md bg-white/90 p-2 text-xs font-medium text-slate-900 shadow-sm hover:bg-white",children:[O?h.jsx(Ii,{className:"h-3.5 w-3.5"}):h.jsx(Vn,{className:"h-3.5 w-3.5"}),O?"Copied":"Copy Image"]})})]}),h.jsxs("div",{className:"flex w-full gap-2",children:[h.jsxs("button",{onClick:ce,className:"btn btn-secondary flex-1 px-3 py-1.5",children:[N?h.jsx(Ii,{className:"h-3.5 w-3.5 text-status-success-text"}):h.jsx(Vn,{className:"h-3.5 w-3.5"}),"Copy Content"]}),h.jsxs("button",{onClick:V,disabled:!s,className:"btn btn-primary flex-1 px-3 py-1.5",children:[h.jsx(Gy,{className:"h-3.5 w-3.5"}),"Save Image"]})]}),J&&h.jsx("p",{className:"break-all text-center text-[11px] text-ink-muted",role:"status",children:J})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("label",{className:"text-xs font-medium text-ink-muted uppercase tracking-wider",children:"Payload Fields"}),h.jsxs("div",{className:"flex gap-2",children:[u&&!p.some(ue=>ue.key==="md5")&&h.jsxs("button",{onClick:le,className:"btn-chip flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-chip-purple-text border border-chip-purple-border",children:[h.jsx(Kr,{className:"h-3 w-3"})," Inc. MD5"]}),h.jsxs("button",{onClick:ie,className:"btn-chip flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-chip-indigo-text border border-chip-indigo-border",children:[h.jsx(_w,{className:"h-3 w-3"})," Add Field"]})]})]}),h.jsxs("div",{className:"max-h-48 space-y-2 overflow-y-auto pr-1 custom-scrollbar",children:[p.map((ue,B)=>h.jsxs("div",{className:"flex gap-2 items-center slide-in",children:[h.jsx("input",{type:"text",placeholder:"key",value:ue.key,onChange:I=>X(B,"key",I.target.value),className:"w-1/3 rounded border border-line bg-elevated px-2 py-1 text-xs text-ink focus:border-indigo-500 focus:outline-none"}),h.jsx("input",{type:"text",placeholder:"value",value:ue.value,onChange:I=>X(B,"value",I.target.value),className:"flex-1 rounded border border-line bg-elevated px-2 py-1 text-xs text-ink focus:border-indigo-500 focus:outline-none"}),h.jsx("button",{onClick:()=>L(B),className:"p-1 text-ink-muted hover:text-status-danger-text transition-colors","aria-label":"Remove field",children:h.jsx(Zy,{className:"h-3.5 w-3.5"})})]},B)),p.length===0&&h.jsx("p",{className:"text-center py-4 text-xs text-ink-muted italic",children:"No fields defined"})]})]}),h.jsxs("div",{className:"pt-2 border-t border-line",children:[h.jsx("label",{className:"text-[10px] font-medium text-ink-muted uppercase tracking-wider block mb-1.5",children:"Raw Preview"}),h.jsx("div",{className:"rounded bg-elevated p-2 font-mono text-[10px] text-ink-secondary break-all border border-line",children:f||h.jsx("span",{className:"italic text-ink-muted/50",children:"empty"})})]})]})]})}):null}const Vx=["Bytes","KB","MB","GB","TB"];function e0(n){if(n===0)return"0 Bytes";const r=1024,a=Math.max(0,Math.min(Vx.length-1,Math.floor(Math.log(n)/Math.log(r))));return parseFloat((n/Math.pow(r,a)).toFixed(2))+" "+Vx[a]}function Ek(n){const r=Math.max(n.lastIndexOf("\\"),n.lastIndexOf("/"));return r===-1?"":n.slice(0,r)}function jk(n){const r=[`File Properties: ${n.name}`,`Path: ${n.path}`,`Type: ${n.type}`,`Size: ${e0(n.size_bytes)}`,`Created: ${n.created}`,`Modified: ${n.modified}`];return n.md5&&r.push(`MD5: ${n.md5}`),n.sha256&&r.push(`SHA256: ${n.sha256}`),r.join(` `)}function $f(n,r,a){return n.length<=r+a+1?n:`${n.slice(0,r)}…${n.slice(-a)}`}function Ck(n){const r=n.includes("\\")?"\\":"/",a=n.split(/[\\/]/);return a.length<=5?n:[a[0],a[1],"…",a[a.length-2],a[a.length-1]].join(r)}const Tk=[{ms:1e3*60,unit:"minute"},{ms:1e3*60*60,unit:"hour"},{ms:1e3*60*60*24,unit:"day"},{ms:1e3*60*60*24*30,unit:"month"},{ms:1e3*60*60*24*365,unit:"year"}];function Yx(n,r=new Date){const a=new Date(n.replace(" ","T"));if(Number.isNaN(a.getTime()))return"just now";const u=r.getTime()-a.getTime();if(u<6e4)return"just now";let s="just now";for(const{ms:d,unit:f}of Tk){if(u{var V;n||((V=G.current)==null||V.focus(),v(!1))},[n]),z.useEffect(()=>{if(!n||!r)return;const V=new AbortController;return P.current=V,d(null),C(null),m(!0),x(null),(async()=>{try{const ce=await h2(r.path,V.signal);if(P.current!==V)return;d(ce)}catch(ce){if(P.current!==V||ce instanceof DOMException&&ce.name==="AbortError")return;x(ce instanceof Error?ce.message:"Failed to load properties")}finally{P.current===V&&m(!1)}})(),()=>{P.current=null,V.abort()}},[n,r]),z.useEffect(()=>{if(!n)return;const V=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=V}},[n]),z.useEffect(()=>{if(!n)return;const V=ce=>{if(ce.key==="Escape"){if(w)return;a();return}if(ce.key!=="Tab")return;const ye=J.current;if(!ye)return;const ue=Array.from(ye.querySelectorAll('button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(ne=>ne.offsetParent!==null);if(ue.length===0)return;const B=ue[0],I=ue[ue.length-1],$=document.activeElement instanceof HTMLElement?document.activeElement:null;ce.shiftKey?($===B||!ye.contains($))&&(ce.preventDefault(),I.focus()):$===I&&(ce.preventDefault(),B.focus())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[n,w,a]),z.useEffect(()=>{if(!n)return;const V=document.activeElement instanceof HTMLElement?document.activeElement:null;G.current=V;const ce=requestAnimationFrame(()=>{var ye,ue;(ue=(ye=J.current)==null?void 0:ye.querySelector("button"))==null||ue.focus()});return()=>cancelAnimationFrame(ce)},[n]);const ae=async(V,ce)=>{try{await navigator.clipboard.writeText(V),g(ce),setTimeout(()=>g(null),2e3)}catch(ye){console.error("Failed to copy:",ye)}},U=async(V,ce,ye)=>{D(V),C(null);try{await ye(),C(ce)}catch{C("Action failed")}finally{D(null)}},R=V=>`btn btn-chip rounded-md border px-3 py-2 text-xs ${{reveal:"bg-chip-sky-bg text-chip-sky-text border-chip-sky-border",launch:"border-emerald-500/30 bg-emerald-600 font-semibold text-white hover:bg-emerald-500",folder:"bg-chip-amber-bg text-chip-amber-text border-chip-amber-border"}[V]??"bg-chip-indigo-bg text-chip-indigo-text border-chip-indigo-border"}`,X=(V,ce,ye,ue=!1,B)=>h.jsxs("div",{className:"flex items-start gap-2 py-1.5 group",children:[h.jsxs("span",{className:"text-ink-muted min-w-[100px] text-xs",children:[V,":"]}),h.jsx("div",{className:"flex-1 min-w-0",children:h.jsx("span",{className:`text-ink text-xs break-all ${ue?"font-mono":""}`,children:B??ce})}),h.jsx(Ue,{text:"Copy to clipboard",block:!1,children:h.jsx("button",{onClick:()=>ae(ce,ye),className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-elevated","aria-label":`Copy ${V}`,children:y===ye?h.jsx(Ii,{className:"h-3.5 w-3.5 text-status-success-text"}):h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted"})})})]}),ie=(V,ce,ye)=>h.jsxs("div",{className:"rounded-lg border border-line bg-elevated p-4",children:[h.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[ce,h.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-ink-muted",children:V})]}),ye]}),L=()=>h.jsx(Ue,{text:"Click to copy full path",children:h.jsxs("button",{onClick:()=>void ae(s.path,"path"),className:"group mb-3 flex w-full items-center gap-2 rounded-lg border border-line bg-elevated px-3 py-2 text-left hover:bg-surface",children:[h.jsx(us,{className:"text-chip-amber-text h-4 w-4 flex-shrink-0"}),h.jsx("span",{className:"text-ink min-w-0 flex-1 truncate font-mono text-xs",children:Ck(s.path)}),y==="path"?h.jsx(Ii,{className:"text-status-success-text h-3.5 w-3.5"}):h.jsx(Vn,{className:"text-ink-muted h-3.5 w-3.5"})]})});if(!n||!r)return null;const le=r;return h.jsxs("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 backdrop-blur-md p-4",role:"dialog","aria-modal":"true","aria-labelledby":"properties-modal-title",children:[h.jsx("div",{className:"absolute inset-0",onClick:a,onContextMenu:V=>{V.preventDefault(),a()}}),h.jsxs("div",{ref:J,className:"animate-modal-in relative w-full max-w-4xl max-h-[90vh] overflow-hidden rounded-xl border border-frame-line glass-panel flex flex-col",children:[h.jsx("div",{className:"flex-shrink-0 border-b border-line px-6 py-4",children:h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[h.jsx("div",{className:"rounded-lg bg-indigo-600 p-2 flex-shrink-0",children:h.jsx(Kf,{className:"h-5 w-5 text-white"})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("h3",{id:"properties-modal-title",className:"text-base font-semibold text-ink truncate",children:"File Properties"}),h.jsx("p",{className:"text-xs text-ink-muted truncate",children:r.filename})]}),h.jsx(Ue,{text:"Copy all properties to clipboard",block:!1,children:h.jsx("button",{onClick:()=>{s&&ae(jk(s),"all")},disabled:!s||f||p!==null,className:"btn-chip ml-2 flex items-center gap-1 rounded-md border border-chip-indigo-border bg-chip-indigo-bg p-1.5 text-chip-indigo-text","aria-label":"Copy all properties",children:y==="all"?h.jsx(Ii,{className:"h-4 w-4 text-status-success-text"}):h.jsx(Vn,{className:"h-4 w-4"})})}),h.jsx(Ue,{text:"Generate Barcode/QR Code",block:!1,children:h.jsx("button",{onClick:()=>v(!0),className:"btn-chip rounded-md border border-chip-indigo-border bg-chip-indigo-bg p-1.5 text-chip-indigo-text",children:h.jsx(Ud,{className:"h-4 w-4"})})})]}),h.jsx("button",{onClick:a,className:"focus-ring rounded-md p-1 text-ink-muted hover:bg-elevated hover:text-ink flex-shrink-0","aria-label":"Close",children:h.jsx(nl,{className:"h-4 w-4"})})]})}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[f&&h.jsx("div",{className:"flex items-center justify-center py-8",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent"}),h.jsx("p",{className:"text-xs text-ink-muted",children:"Loading properties..."})]})}),p&&h.jsx("div",{className:"rounded-lg border border-status-danger-border bg-status-danger-bg p-4 text-center",children:h.jsx("p",{className:"text-xs text-status-danger-text",children:p})}),s&&!f&&!p&&h.jsxs("div",{children:[h.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-x-4 gap-y-1.5 rounded-lg border border-line bg-elevated px-4 py-2.5",children:[h.jsx("span",{className:"inline-flex items-center gap-1 rounded-md border border-chip-indigo-border bg-chip-indigo-bg px-2 py-0.5 text-xs font-semibold text-chip-indigo-text",children:s.type}),s.attributes.extension&&h.jsx("span",{className:"inline-flex items-center rounded-md border border-line bg-surface px-2 py-0.5 text-xs font-medium text-ink-muted",children:s.attributes.extension}),h.jsxs("span",{className:"text-xs text-ink-muted",title:`${s.size_bytes} bytes`,children:["Size ",h.jsx("strong",{className:"text-ink font-medium",children:e0(s.size_bytes)})]}),h.jsxs("span",{className:"text-xs text-ink-muted",title:s.created,children:["Created ",h.jsx("strong",{className:"text-ink font-medium",children:Yx(s.created)})]}),h.jsxs("span",{className:"text-xs text-ink-muted",title:s.modified,children:["Modified ",h.jsx("strong",{className:"text-ink font-medium",children:Yx(s.modified)})]}),s.md5&&h.jsx("span",{className:"inline-flex items-center rounded-md border border-chip-purple-border bg-chip-purple-bg px-2 py-0.5 font-mono text-xs font-medium text-chip-purple-text",title:`MD5 ${s.md5}`,children:$f(s.md5,4,4)}),s.attributes.is_symlink&&h.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-chip-fuchsia-border bg-chip-fuchsia-bg px-2 py-0.5 text-xs font-medium text-chip-fuchsia-text",children:[h.jsx(ww,{className:"h-3 w-3"})," Symlink"]})]}),L(),h.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[ie("Hashes",h.jsx(Kr,{className:"text-chip-purple-text h-3.5 w-3.5"}),h.jsxs("div",{className:"space-y-0.5",children:[X("MD5",s.md5,"md5",!0,$f(s.md5,10,6)),X("SHA256",s.sha256,"sha256",!0,$f(s.sha256,10,6))]})),ie("Timestamps",h.jsx(U2,{className:"text-chip-sky-text h-3.5 w-3.5"}),h.jsxs("div",{className:"space-y-0.5",children:[X("Created",s.created,"created",!0),X("Modified",s.modified,"modified",!0)]})),ie("Identity",h.jsx(Kf,{className:"text-chip-indigo-text h-3.5 w-3.5"}),h.jsxs("div",{className:"space-y-0.5",children:[X("Type",s.type,"type"),s.attributes.stem&&X("Stem",s.attributes.stem,"attrStem"),X("Extension",s.name.includes(".")?s.name.slice(s.name.lastIndexOf(".")):"None","extension"),X("Directory",Ek(s.path)||"None","directory",!0)]})),ie("System",h.jsx(Kf,{className:"text-status-success-text h-3.5 w-3.5"}),h.jsxs("div",{children:[h.jsxs("div",{className:"mb-1 flex min-h-[24px] flex-wrap items-center gap-1.5",children:[s.attributes.is_readonly&&h.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-status-danger-border bg-status-danger-bg px-2 py-0.5 text-xs text-status-danger-text",children:[h.jsx(Nw,{className:"h-3 w-3"})," Read-only"]}),s.attributes.is_hidden&&h.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-slate-500/30 bg-slate-600/20 px-2 py-0.5 text-xs text-slate-300",children:[h.jsx(iw,{className:"h-3 w-3"})," Hidden"]}),!s.attributes.is_readonly&&!s.attributes.is_hidden&&!s.attributes.is_symlink&&h.jsx("span",{className:"text-xs text-ink-muted",children:"No special flags"})]}),h.jsxs("div",{className:"space-y-0.5",children:[X("File Type",s.attributes.is_file?"Regular File":s.attributes.is_dir?"Directory":"Other","fileType"),s.attributes.permissions&&X("Permissions",s.attributes.permissions,"permissions",!0),s.attributes.owner_uid!==void 0&&X("Owner UID",String(s.attributes.owner_uid),"ownerUid"),s.attributes.group_gid!==void 0&&X("Group GID",String(s.attributes.group_gid),"groupGid")]})]}))]})]})]}),h.jsx("div",{className:"flex-shrink-0 border-t border-line px-6 py-3",children:h.jsxs("div",{className:"flex justify-between items-center gap-2",children:[h.jsx("p",{className:"min-w-0 text-xs text-ink-muted truncate",children:O??"Click the copy icon next to any field to copy its value"}),h.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[h.jsx(Ue,{text:"Show file in Explorer",block:!1,children:h.jsxs("button",{onClick:()=>void U("reveal","Revealed in Explorer",()=>qy(le.path)),disabled:N!==null,className:R("reveal"),children:[h.jsx(pd,{className:"h-3.5 w-3.5"})," Reveal"]})}),h.jsx(Ue,{text:"Launch file with default association",block:!1,children:h.jsxs("button",{onClick:()=>{u&&(D("launch"),Promise.resolve(u(le)).finally(()=>D(null)))},disabled:N!==null||!u,className:R("launch"),children:[h.jsx(Ji,{className:"h-3.5 w-3.5"})," Launch"]})}),h.jsx(Ue,{text:"Open containing folder",block:!1,children:h.jsxs("button",{onClick:()=>void U("folder","Opened folder",()=>hd(le.path)),disabled:N!==null,className:R("folder"),children:[h.jsx(Ki,{className:"h-3.5 w-3.5"})," Open Folder"]})}),h.jsx("button",{onClick:a,className:"btn btn-primary px-4 py-2",children:"Close"})]})]})})]}),h.jsx(Wy,{isOpen:w,onClose:()=>v(!1),initialFilePath:r.path,md5:s==null?void 0:s.md5})]})}const Ak=["qr_code","code_128","code_39","ean_13","ean_8","upc_a","upc_e","data_matrix"],zk=250,Dk=400,Mk=.7;function Ok(n,r=Dk,a=Mk){const u=n.videoWidth,s=n.videoHeight;if(!u||!s)return null;const d=Math.min(u,s),f=document.createElement("canvas");f.width=Math.min(r,d),f.height=f.width;const m=f.getContext("2d");if(!m)return null;m.drawImage(n,(u-d)/2,(s-d)/2,d,d,0,0,f.width,f.height);const p=f.toDataURL("image/jpeg",a);return p.slice(p.indexOf(",")+1)}function Rk(n,r){const a=n.intervalMs??zk;let u=!1,s=!1;const d=()=>{u=!0,clearInterval(f)},f=setInterval(()=>{if(u||s)return;const m=n.capture();m&&(s=!0,n.decode(m).then(p=>{u||p.decoded&&(d(),r.onDetected(p.decoded))}).catch(p=>{u||(d(),r.onError(p instanceof Error?p.message:"Frame decoding failed"))}).finally(()=>{s=!1}))},a);return d}const Lk=8e3;function Bk({isOpen:n,onClose:r,onDetected:a}){const u=z.useRef(null),s=z.useRef(null),d=Pr({isOpen:n,onClose:r,dialogRef:s}),f=z.useRef(null),m=z.useRef(null),p=z.useRef(null),[x,y]=z.useState(null),[g,w]=z.useState(!1),v=()=>{p.current&&(p.current(),p.current=null),m.current&&(cancelAnimationFrame(m.current),m.current=null),f.current&&(f.current.getTracks().forEach(O=>O.stop()),f.current=null),u.current&&(u.current.srcObject=null)};z.useEffect(()=>{if(!n){v(),y(null);return}let O=!0;async function C(){var G,P,ae,U,R;if(y(null),w(!1),typeof window<"u"&&!window.isSecureContext&&window.location.hostname!=="localhost"&&window.location.hostname!=="127.0.0.1"){y("Camera access requires HTTPS or localhost. If connecting across a local network IP (e.g. 192.168.x.x), modern browsers disable camera access for insecure HTTP.");return}const J=((P=(G=navigator.mediaDevices)==null?void 0:G.getUserMedia)==null?void 0:P.bind(navigator.mediaDevices))||((ae=navigator.getUserMedia)==null?void 0:ae.bind(navigator))||((U=navigator.webkitGetUserMedia)==null?void 0:U.bind(navigator))||((R=navigator.mozGetUserMedia)==null?void 0:R.bind(navigator));if(!J){y(window.isSecureContext?"Camera access is not supported by your browser or environment.":"Camera access is blocked because the page is not served over a secure origin (HTTPS or localhost/127.0.0.1).");return}try{let X;const ie=await Promise.race([J({video:{facingMode:"environment",width:{ideal:1280},height:{ideal:720}}}),new Promise((L,le)=>{X=window.setTimeout(()=>le(new DOMException("Camera did not start in time","TimeoutError")),Lk)})]).finally(()=>{X!==void 0&&window.clearTimeout(X)});if(!O){ie.getTracks().forEach(L=>L.stop());return}f.current=ie,u.current&&(u.current.srcObject=ie,await u.current.play()),"BarcodeDetector"in window?D():N()}catch(X){if(!O)return;console.error("Camera access error:",X),y(X.name==="NotAllowedError"||X.name==="PermissionDeniedError"?"Camera permission denied. Please allow camera access in your browser settings.":X.name==="TimeoutError"?"The camera did not start in time. On macOS, camera capture needs the packaged desktop app — a bare Python process cannot access the camera. Alternatively, open ProFiles in Chrome, Edge or Safari.":`Could not access camera: ${X.message||"Unknown error"}`)}}return C(),()=>{O=!1,v()}},[n]);const N=()=>{w(!0),p.current=Rk({capture:()=>u.current?Ok(u.current):null,decode:O=>d2({imageBase64:O,formats:[...Ak]})},{onDetected:O=>{v(),a(O)},onError:O=>{v(),y(O)}})},D=()=>{const O=["qr_code","code_128","code_39","ean_13","ean_8","upc_a","upc_e","data_matrix"];let C;try{C=new window.BarcodeDetector({formats:O})}catch(G){console.warn("BarcodeDetector formats unsupported:",G),C=new window.BarcodeDetector}const J=async()=>{if(!u.current||u.current.readyState<2){m.current=requestAnimationFrame(J);return}try{const G=await C.detect(u.current);if(G&&G.length>0){const P=G[0].rawValue;if(P){v(),a(P);return}}}catch(G){console.debug("Frame detection error:",G)}m.current=requestAnimationFrame(J)};m.current=requestAnimationFrame(J)};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm",onClick:r,children:h.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-label":"Camera barcode scanner",onKeyDown:d,className:"relative w-full max-w-lg rounded-2xl border border-frame-line glass-panel p-6 flex flex-col",onClick:O=>O.stopPropagation(),children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Yy,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Scan with Camera"})]}),h.jsx("button",{onClick:r,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink transition-colors","aria-label":"Close",children:h.jsx(nl,{className:"h-4 w-4"})})]}),x?h.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[h.jsx("div",{className:"rounded-full bg-status-danger-bg p-3 text-status-danger-text mb-3",children:h.jsx(eu,{className:"h-6 w-6"})}),h.jsx("p",{className:"text-xs text-status-danger-text max-w-xs",children:x}),h.jsx("button",{onClick:r,className:"btn btn-secondary mt-6 px-4 py-2",children:"Close"})]}):h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"relative aspect-video w-full overflow-hidden rounded-xl bg-black border border-line flex items-center justify-center",children:[h.jsx("video",{ref:u,playsInline:!0,muted:!0,className:"h-full w-full object-cover"}),h.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:h.jsxs("div",{className:"relative h-48 w-48 rounded-lg border-2 border-dashed border-indigo-400/80 bg-indigo-500/5 shadow-[0_0_0_9999px_rgba(0,0,0,0.45)]",children:[h.jsx("div",{className:"absolute top-0 left-0 h-4 w-4 border-t-2 border-l-2 border-indigo-400"}),h.jsx("div",{className:"absolute top-0 right-0 h-4 w-4 border-t-2 border-r-2 border-indigo-400"}),h.jsx("div",{className:"absolute bottom-0 left-0 h-4 w-4 border-b-2 border-l-2 border-indigo-400"}),h.jsx("div",{className:"absolute bottom-0 right-0 h-4 w-4 border-b-2 border-r-2 border-indigo-400"})]})})]}),h.jsx("p",{className:"mt-4 text-center text-xs text-ink-muted",children:g?"Hold a QR code or barcode steady in front of your camera — frames are decoded by the local ProFiles server (no native Barcode Detector in this browser).":"Hold a QR code or barcode steady in front of your camera to auto-scan."})]})]})}):null}function Uk({isOpen:n,file:r,onConfirm:a,onDismiss:u}){const s=z.useRef(null);return z.useEffect(()=>{var d;if(n){const f=m=>{m.key==="Enter"?(m.preventDefault(),a()):m.key==="Escape"&&(m.preventDefault(),u())};return window.addEventListener("keydown",f),(d=s.current)==null||d.focus(),()=>window.removeEventListener("keydown",f)}},[n,a,u]),!n||!r?null:h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",onClick:u,children:h.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":`1 file matched: ${r.filename}`,className:"animate-modal-in w-full max-w-sm rounded-xl border border-frame-line glass-panel p-5 flex flex-col gap-4",onClick:d=>d.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink text-sm",children:[r.has_hook?h.jsx(Iw,{className:"h-4 w-4 text-chip-purple-text"}):h.jsx(Ji,{className:"h-4 w-4 text-status-success-text"}),h.jsx("span",{children:"1 File Matched"})]}),h.jsx("button",{onClick:u,className:"focus-ring rounded p-1 text-ink-muted hover:bg-elevated hover:text-ink","aria-label":"Dismiss",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-line bg-elevated/50 p-3",children:[h.jsx(Jr,{className:"h-5 w-5 text-chip-indigo-text shrink-0 mt-0.5"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("h4",{className:"text-xs font-semibold text-ink truncate",children:r.filename}),h.jsx("p",{className:"text-[11px] text-ink-muted truncate mt-0.5",children:r.rel_path||r.path}),r.has_hook&&h.jsx("span",{className:"inline-block mt-1 text-[10px] text-chip-purple-text bg-chip-purple-bg px-1.5 py-0.5 rounded border border-chip-purple-border/50 font-medium",children:"Workflow Hook Configured"})]})]}),h.jsx("p",{className:"text-xs text-ink-muted text-center",children:"Launch this file now?"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{type:"button",onClick:u,className:"btn btn-secondary flex-1 px-3 py-1.5",children:"Dismiss (Esc)"}),h.jsxs("button",{ref:s,type:"button",onClick:a,className:"btn btn-primary flex-1 px-3 py-1.5 shadow-md",children:[h.jsx(Ji,{className:"h-3 w-3 fill-current"}),"Launch (Enter)"]})]})]})})}function Hk({systemInfo:n,fileCount:r,theme:a,onToggleTheme:u,onOpenLog:s,onOpenConfig:d,onLoadConfig:f,onShowShortcuts:m,onReloadConfig:p,onExport:x,exportDisabled:y=!1,language:g="en",onLanguageChange:w,activeConfigName:v}){return h.jsxs("footer",{className:"flex items-center justify-between border-t border-line bg-app px-4 py-2 text-[11px] text-ink-muted transition-colors duration-200",children:[h.jsx("div",{className:"flex items-center gap-4",children:n&&h.jsxs("div",{className:"flex items-center gap-1.5 rounded-full border border-line bg-surface px-2.5 py-0.5 text-ink-secondary",children:[h.jsx(j2,{className:"h-3 w-3 text-status-success-text"}),h.jsx("a",{href:`http://${n.hostname}:${window.location.port}`,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ProFiles on ${n.hostname}`,className:"font-mono hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 rounded px-1 py-0.5",children:n.hostname}),h.jsx("span",{className:"text-ink-faint",children:"|"}),h.jsx("a",{href:`http://${n.ip}:${window.location.port}`,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ProFiles on ${n.ip}`,className:"font-mono hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 rounded px-1 py-0.5",children:n.ip}),h.jsx("span",{className:"text-ink-faint",children:"|"}),h.jsxs("span",{className:"flex items-center gap-1",title:"Session user",children:[h.jsx(Gw,{className:"h-3 w-3 text-ink-faint"}),h.jsx("span",{children:n.username||"operator"})]})]})}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("span",{children:[h.jsx("strong",{className:"text-ink",children:r})," files found"]}),h.jsx("span",{className:"text-ink-faint",children:"|"}),h.jsx(Ue,{text:"Keyboard shortcuts (?)",block:!1,children:h.jsxs("button",{onClick:m,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Xy,{className:"h-3 w-3"}),h.jsx("span",{children:"Shortcuts"})]})}),h.jsx(Ue,{text:"Open the application log viewer",block:!1,children:h.jsxs("button",{onClick:s,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Jr,{className:"h-3 w-3"}),h.jsx("span",{children:"Logs"})]})}),h.jsx("span",{className:"text-ink-faint",children:"|"}),p&&h.jsx(Ue,{text:"Reload configuration from disk",block:!1,children:h.jsxs("button",{onClick:p,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(os,{className:"h-3 w-3"}),h.jsx("span",{children:"Reload"})]})}),x&&h.jsx(Ue,{text:"Export the current results as CSV",block:!1,children:h.jsxs("button",{onClick:x,disabled:y,className:"focus-ring flex items-center gap-1 rounded text-ink-muted hover:text-ink disabled:opacity-40 disabled:hover:text-ink-muted",children:[h.jsx(Gy,{className:"h-3 w-3"}),h.jsx("span",{children:"Export CSV"})]})}),w&&h.jsxs("div",{className:"flex items-center overflow-hidden rounded border border-line text-[10px]",children:[h.jsx(Ue,{text:"English",block:!1,children:h.jsxs("button",{onClick:()=>w("en"),className:`flex items-center gap-1 px-1.5 py-0.5 transition-colors ${g==="en"?"bg-indigo-600 text-white focus-ring":"text-ink-muted hover:text-ink focus-ring"}`,children:[h.jsx(pw,{className:"h-3 w-3"}),h.jsx("span",{children:"EN"})]})}),h.jsx(Ue,{text:"Français",block:!1,children:h.jsx("button",{onClick:()=>w("fr"),className:`flex items-center gap-1 px-1.5 py-0.5 transition-colors ${g==="fr"?"bg-indigo-600 text-white focus-ring":"text-ink-muted hover:text-ink focus-ring"}`,children:h.jsx("span",{children:"FR"})})})]}),f&&h.jsx(Ue,{text:v?`Load a different .profiles file (active: ${v})`:"Load a .profiles file",block:!1,children:h.jsxs("button",{onClick:f,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Ir,{className:"h-3 w-3"}),h.jsx("span",{children:"Load config…"})]})}),h.jsx(Ue,{text:"Open configuration file",block:!1,children:h.jsxs("button",{onClick:d,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Lw,{className:"h-3 w-3"}),h.jsx("span",{children:"Config"})]})}),h.jsx(Ue,{text:`Switch to ${a==="dark"?"light":"dark"} mode`,block:!1,children:h.jsxs("button",{onClick:u,className:"focus-ring flex items-center gap-1 rounded px-1.5 py-0.5 text-ink-muted hover:bg-elevated hover:text-status-warning-text",children:[a==="dark"?h.jsx(Uw,{className:"h-3 w-3 text-status-warning-text"}):h.jsx(jw,{className:"h-3 w-3 text-chip-indigo-text"}),h.jsx("span",{children:a==="dark"?"Light":"Dark"})]})})]})]})}const qk=[{label:"5 seconds",seconds:5},{label:"10 seconds",seconds:10},{label:"30 seconds",seconds:30},{label:"1 minute",seconds:60},{label:"5 minutes",seconds:300}];function Fk({isOpen:n,currentInterval:r,onClose:a,onSetInterval:u}){const s=z.useRef(null),d=Pr({isOpen:n,onClose:a,dialogRef:s});if(!n)return null;const f=r>0,m=y=>{u(y)},p=y=>{y.preventDefault();const w=y.currentTarget.elements.namedItem("custom-interval"),v=parseInt(w.value,10);!isNaN(v)&&v>0&&u(v)},x=()=>{u(0)};return h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",children:h.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-label":"Auto-Rescan Timer",onKeyDown:d,className:"animate-modal-in w-[420px] max-w-full rounded-2xl border border-frame-line glass-panel p-5",children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Ky,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Auto-Rescan Timer"})]}),h.jsx("button",{onClick:a,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"mb-4 rounded-lg bg-elevated/50 px-3 py-2 text-xs",children:f?h.jsxs("div",{className:"flex items-center gap-2 text-status-success-text",children:[h.jsx(Z2,{className:"h-4 w-4 animate-pulse"}),h.jsxs("span",{children:["Auto-rescan every ",r,"s"]})]}):h.jsxs("div",{className:"flex items-center gap-2 text-ink-secondary",children:[h.jsx(I2,{className:"h-4 w-4"}),h.jsx("span",{children:"Auto-rescan is disabled"})]})}),h.jsxs("div",{className:"mb-4 space-y-1 text-xs",children:[h.jsx("p",{className:"text-ink-muted",children:"Presets:"}),h.jsx("div",{className:"grid grid-cols-2 gap-2",children:qk.map(y=>h.jsx("button",{onClick:()=>m(y.seconds),className:"rounded-lg border border-line bg-elevated/50 px-3 py-1.5 text-left font-medium text-ink-secondary hover:border-chip-indigo-border hover:bg-chip-indigo-bg/40 hover:text-chip-indigo-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:y.label},y.seconds))})]}),h.jsxs("form",{onSubmit:p,className:"mb-4",children:[h.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium text-ink-secondary",children:[h.jsx(P2,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:"Custom interval (seconds):"})]}),h.jsxs("div",{className:"mt-1 flex gap-2",children:[h.jsx("input",{type:"number",name:"custom-interval",min:"1",placeholder:"e.g. 45",className:"flex-1 rounded-lg border border-line bg-app px-2 py-1 text-xs text-ink placeholder-ink-faint focus:border-indigo-500 focus:outline-none"}),h.jsx("button",{type:"submit",className:"btn btn-primary rounded-lg px-3 py-1 font-semibold",children:"Set"})]})]}),f&&h.jsx("button",{onClick:x,className:"btn w-full rounded-lg border-line bg-elevated/50 px-3 py-2 text-status-warning-text hover:border-status-warning-border hover:bg-status-warning-bg/40",children:"Stop Auto-Rescan"}),h.jsx("div",{className:"flex justify-end gap-2 border-t border-line pt-3",children:h.jsx("button",{onClick:a,className:"rounded-lg border border-line bg-elevated px-4 py-2 text-xs font-semibold text-ink-secondary hover:bg-elevated/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"Close"})})]})})}function Vk(n,r){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const Yk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qk={};function Gx(n,r){return(Qk.jsx?Gk:Yk).test(n)}const Xk=/[ \t\n\f\r]/g;function Ik(n){return typeof n=="object"?n.type==="text"?Qx(n.value):!1:Qx(n)}function Qx(n){return n.replace(Xk,"")===""}class ru{constructor(r,a,u){this.normal=a,this.property=r,u&&(this.space=u)}}ru.prototype.normal={};ru.prototype.property={};ru.prototype.space=void 0;function t0(n,r){const a={},u={};for(const s of n)Object.assign(a,s.property),Object.assign(u,s.normal);return new ru(a,u,r)}function bd(n){return n.toLowerCase()}class wn{constructor(r,a){this.attribute=a,this.property=r}}wn.prototype.attribute="";wn.prototype.booleanish=!1;wn.prototype.boolean=!1;wn.prototype.commaOrSpaceSeparated=!1;wn.prototype.commaSeparated=!1;wn.prototype.defined=!1;wn.prototype.mustUseProperty=!1;wn.prototype.number=!1;wn.prototype.overloadedBoolean=!1;wn.prototype.property="";wn.prototype.spaceSeparated=!1;wn.prototype.space=void 0;let Kk=0;const Oe=Wi(),Mt=Wi(),vd=Wi(),se=Wi(),dt=Wi(),Zi=Wi(),Dn=Wi();function Wi(){return 2**++Kk}const wd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:Mt,commaOrSpaceSeparated:Dn,commaSeparated:Zi,number:se,overloadedBoolean:vd,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Jf=Object.keys(wd);class Hd extends wn{constructor(r,a,u,s){let d=-1;if(super(r,a),Xx(this,"space",s),typeof u=="number")for(;++d4&&a.slice(0,4)==="data"&&Wk.test(r)){if(r.charAt(4)==="-"){const d=r.slice(5).replace(Ix,nS);u="data"+d.charAt(0).toUpperCase()+d.slice(1)}else{const d=r.slice(4);if(!Ix.test(d)){let f=d.replace(Pk,tS);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}s=Hd}return new s(u,r)}function tS(n){return"-"+n.toLowerCase()}function nS(n){return n.charAt(1).toUpperCase()}const lS=t0([n0,Zk,r0,a0,u0],"html"),qd=t0([n0,$k,r0,a0,u0],"svg");function iS(n){return n.join(" ").trim()}var Kx=/\/\*(?:[^*]|\*(?!\/))*\*\//g,rS=/\n/g,aS=/^\s*/,uS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oS=/^:\s*/,sS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,cS=/^[;\s]*/,fS=` `,Zx="/",$x="*",Za="",dS="comment",hS="declaration";function mS(n,r){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];r=r||{};var a=1,u=1;function s(N){var D=N.match(rS);D&&(a+=D.length);var O=N.lastIndexOf(fS);u=~O?N.length-O:u+N.length}function d(){var N={line:a,column:u};return function(D){return D.position=new f(N),x(),D}}function f(N){this.start=N,this.end={line:a,column:u},this.source=r.source}f.prototype.content=n;function m(N){var D=new Error(r.source+":"+a+":"+u+": "+N);if(D.reason=N,D.filename=r.source,D.line=a,D.column=u,D.source=n,!r.silent)throw D}function p(N){var D=N.exec(n);if(D){var O=D[0];return s(O),n=n.slice(O.length),D}}function x(){p(aS)}function y(N){for(var D;D=g();)N.push(D);return N}function g(){var N=d();if(!(Zx!=n.charAt(0)||$x!=n.charAt(1))){for(var D=2;Za!=n.charAt(D)&&($x!=n.charAt(D)||Zx!=n.charAt(D+1));)++D;if(D+=2,Za===n.charAt(D-1))return m("End of comment missing");var O=n.slice(2,D-2);return u+=2,s(O),n=n.slice(D),u+=2,N({type:dS,comment:O})}}function w(){var N=d(),D=p(uS);if(D){if(g(),!p(oS))return m("property missing ':'");var O=p(sS),C=N({type:hS,property:D[0].replace(Kx,Za).trim(),value:O?O[0].replace(Kx,Za).trim():Za});return p(cS),C}}function v(){var N=[];y(N);for(var D;D=w();)N.push(D),y(N);return N}return x(),v()}function pS(n,r){let a=null;if(!n||typeof n!="string")return a;const u=mS(n),s=typeof r=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;s?r(f,m,d):m&&(a=a??{},a[f]=m)}),a}const o0=s0("end"),Fd=s0("start");function s0(n){return r;function r(a){const u=a&&a.position&&a.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function gS(n){const r=Fd(n),a=o0(n);if(r&&a)return{start:r,end:a}}function tu(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Jx(n.position):"start"in n||"end"in n?Jx(n):"line"in n||"column"in n?kd(n):""}function kd(n){return Px(n&&n.line)+":"+Px(n&&n.column)}function Jx(n){return kd(n&&n.start)+"-"+kd(n&&n.end)}function Px(n){return n&&typeof n=="number"?n:1}class nn extends Error{constructor(r,a,u){super(),typeof a=="string"&&(u=a,a=void 0);let s="",d={},f=!1;if(a&&("line"in a&&"column"in a?d={place:a}:"start"in a&&"end"in a?d={place:a}:"type"in a?d={ancestors:[a],place:a.position}:d={...a}),typeof r=="string"?s=r:!d.cause&&r&&(f=!0,s=r.message,d.cause=r),!d.ruleId&&!d.source&&typeof u=="string"){const p=u.indexOf(":");p===-1?d.ruleId=u:(d.source=u.slice(0,p),d.ruleId=u.slice(p+1))}if(!d.place&&d.ancestors&&d.ancestors){const p=d.ancestors[d.ancestors.length-1];p&&(d.place=p.position)}const m=d.place&&"start"in d.place?d.place.start:d.place;this.ancestors=d.ancestors||void 0,this.cause=d.cause||void 0,this.column=m?m.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=m?m.line:void 0,this.name=tu(d.place)||"1:1",this.place=d.place||void 0,this.reason=this.message,this.ruleId=d.ruleId||void 0,this.source=d.source||void 0,this.stack=f&&d.cause&&typeof d.cause.stack=="string"?d.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const Vd={}.hasOwnProperty,xS=new Map,yS=/[A-Z]/g,bS=/-([a-z])/g,vS=new Set(["table","tbody","thead","tfoot","tr"]),wS=new Set(["td","th"]),c0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function kS(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=r.filePath||void 0;let u;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=AS(a,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=_S(a,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:u,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?qd:lS,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},d=f0(s,n,void 0);return d&&typeof d!="string"?d:s.create(n,s.Fragment,{children:d||void 0},void 0)}function f0(n,r,a){if(r.type==="element")return SS(n,r,a);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return NS(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return jS(n,r,a);if(r.type==="mdxjsEsm")return ES(n,r);if(r.type==="root")return CS(n,r,a);if(r.type==="text")return TS(n,r)}function SS(n,r,a){const u=n.schema;let s=u;r.tagName.toLowerCase()==="svg"&&u.space==="html"&&(s=qd,n.schema=s),n.ancestors.push(r);const d=h0(n,r.tagName,!1),f=zS(n,r);let m=Gd(n,r);return vS.has(r.tagName)&&(m=m.filter(function(p){return typeof p=="string"?!Ik(p):!0})),d0(n,f,d,r),Yd(f,m),n.ancestors.pop(),n.schema=u,n.create(r,d,f,a)}function NS(n,r){if(r.data&&r.data.estree&&n.evaluater){const u=r.data.estree.body[0];return u.type,n.evaluater.evaluateExpression(u.expression)}iu(n,r.position)}function ES(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);iu(n,r.position)}function jS(n,r,a){const u=n.schema;let s=u;r.name==="svg"&&u.space==="html"&&(s=qd,n.schema=s),n.ancestors.push(r);const d=r.name===null?n.Fragment:h0(n,r.name,!0),f=DS(n,r),m=Gd(n,r);return d0(n,f,d,r),Yd(f,m),n.ancestors.pop(),n.schema=u,n.create(r,d,f,a)}function CS(n,r,a){const u={};return Yd(u,Gd(n,r)),n.create(r,n.Fragment,u,a)}function TS(n,r){return r.value}function d0(n,r,a,u){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(r.node=u)}function Yd(n,r){if(r.length>0){const a=r.length>1?r:r[0];a&&(n.children=a)}}function _S(n,r,a){return u;function u(s,d,f,m){const x=Array.isArray(f.children)?a:r;return m?x(d,f,m):x(d,f)}}function AS(n,r){return a;function a(u,s,d,f){const m=Array.isArray(d.children),p=Fd(u);return r(s,d,f,m,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function zS(n,r){const a={};let u,s;for(s in r.properties)if(s!=="children"&&Vd.call(r.properties,s)){const d=MS(n,s,r.properties[s]);if(d){const[f,m]=d;n.tableCellAlignToStyle&&f==="align"&&typeof m=="string"&&wS.has(r.tagName)?u=m:a[f]=m}}if(u){const d=a.style||(a.style={});d[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return a}function DS(n,r){const a={};for(const u of r.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&n.evaluater){const d=u.data.estree.body[0];d.type;const f=d.expression;f.type;const m=f.properties[0];m.type,Object.assign(a,n.evaluater.evaluateExpression(m.argument))}else iu(n,r.position);else{const{name:s}=u;let d;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&n.evaluater){const m=u.value.data.estree.body[0];m.type,d=n.evaluater.evaluateExpression(m.expression)}else iu(n,r.position);else d=u.value===null?!0:u.value;a[s]=d}return a}function Gd(n,r){const a=[];let u=-1;const s=n.passKeys?new Map:xS;for(;++us?0:s+r:r=r>s?s:r,a=a>0?a:0,u.length<1e4)f=Array.from(u),f.unshift(r,a),n.splice(...f);else for(a&&n.splice(r,a);d0?(el(n,n.length,0,r),n):r}const ty={}.hasOwnProperty;function p0(n){const r={};let a=-1;for(;++a13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function tl(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=xi(/[A-Za-z]/),Zt=xi(/[\dA-Za-z]/),YS=xi(/[#-'*+\--9=?A-Z^-~]/);function ns(n){return n!==null&&(n<32||n===127)}const Sd=xi(/\d/),GS=xi(/[\dA-Fa-f]/),x0=xi(/[!-/:-@[-`{-~]/);function Ce(n){return n!==null&&n<-2}function ht(n){return n!==null&&(n<0||n===32)}function qe(n){return n===-2||n===-1||n===32}const ss=xi(new RegExp("\\p{P}|\\p{S}","u")),Pi=xi(/\s/);function xi(n){return r;function r(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function ea(n){const r=[];let a=-1,u=0,s=0;for(;++a55295&&d<57344){const m=n.charCodeAt(a+1);d<56320&&m>56319&&m<57344?(f=String.fromCharCode(d,m),s=1):f="�"}else f=String.fromCharCode(d);f&&(r.push(n.slice(u,a),encodeURIComponent(f)),u=a+s+1,f=""),s&&(a+=s,s=0)}return r.join("")+n.slice(u)}function We(n,r,a,u){const s=u?u-1:1/0;let d=0;return f;function f(p){return qe(p)?(n.enter(a),m(p)):r(p)}function m(p){return qe(p)&&d++=s?r(y):a(y)}}const QS={tokenize:XS};function XS(n){const r=n.attempt(this.parser.constructs.contentInitial,u,s);let a;return r;function u(m){if(m===null){n.consume(m);return}return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),We(n,r,"linePrefix")}function s(m){return n.enter("paragraph"),d(m)}function d(m){const p=n.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,f(m)}function f(m){if(m===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(m);return}return Ce(m)?(n.consume(m),n.exit("chunkText"),d):(n.consume(m),f)}}let ls=class{constructor(){this.index=new Map,this.map=[]}add(r,a,u){ny(this,r,a,u,!1)}addBefore(r,a,u){ny(this,r,a,u,!0)}consume(r){if(this.map.sort(function(d,f){return d[0]-f[0]}),this.map.length===0)return;let a=this.map.length;const u=[];for(;a>0;)a-=1,u.push(r.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),r.length=this.map[a][0];u.push(r.slice()),r.length=0;let s=u.pop();for(;s;){for(const d of s)r.push(d);s=u.pop()}this.map.length=0,this.index.clear()}};function ny(n,r,a,u,s){if(a===0&&u.length===0)return;const d=n.index.get(r);if(d){d[1]+=a,s?(u.push(...d[2]),d[2]=u):d[2].push(...u);return}const f=[r,a,u];n.map.push(f),n.index.set(r,f)}const IS={tokenize:KS},ly={tokenize:ZS};function KS(n){const r=this,a=[];let u=0,s,d,f;return m;function m(G){if(uf))return;const R=r.events.length;let X=R,ie,L;for(;X--;)if(r.events[X][0]==="exit"&&r.events[X][1].type==="chunkFlow"){if(ie){L=r.events[X][1].end;break}ie=!0}for(C(u),U=R;UG;){const ae=a[P];r.containerState=ae[1],ae[0].exit.call(r,n)}a.length=G}function J(){s.write([null]),d=void 0,s=void 0,r.containerState._closeFlow=void 0}}function ZS(n,r,a){return We(n,n.attempt(this.parser.constructs.document,r,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(n){if(n===null||ht(n)||Pi(n))return 1;if(ss(n))return 2}function cs(n,r,a){const u=[];let s=-1;for(;++s1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1,f={...n[s][1].end},m={...n[a][1].start};iy(f,-d),iy(m,d);const p={type:d>1?"strongSequence":"emphasisSequence",start:f,end:{...n[s][1].end}},x={type:d>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:m},y={type:d>1?"strongText":"emphasisText",start:{...n[s][1].end},end:{...n[a][1].start}},g={type:d>1?"strong":"emphasis",start:{...p.start},end:{...x.end}};n[s][1].end={...p.start},n[a][1].start={...x.end},u=[],n[s][1].end.offset-n[s][1].start.offset&&(u=Yn(u,[["enter",n[s][1],r],["exit",n[s][1],r]])),u=Yn(u,[["enter",g,r],["enter",p,r],["exit",p,r],["enter",y,r]]),u=Yn(u,cs(r.parser.constructs.insideSpan.null,n.slice(s+1,a),r)),u=Yn(u,[["exit",y,r],["enter",x,r],["exit",x,r],["exit",g,r]]);let w=0;n[a][1].end.offset-n[a][1].start.offset&&(w=2,u=Yn(u,[["enter",n[a][1],r],["exit",n[a][1],r]])),el(n,s-1,a-s+3,u),a=s+u.length-w-2;break}}for(a=-1;++a0&&qe(U)?We(n,J,"linePrefix",d+1)(U):J(U)}function J(U){return U===null||Ce(U)?n.check(Ed,D,P)(U):(n.enter("codeFlowValue"),G(U))}function G(U){return U===null||Ce(U)?(n.exit("codeFlowValue"),J(U)):(n.consume(U),G)}function P(U){return n.exit("codeFenced"),r(U)}function ae(U,R,X){let ie=0;return L;function L(ue){return U.enter("lineEnding"),U.consume(ue),U.exit("lineEnding"),le}function le(ue){return U.enter("codeFencedFence"),qe(ue)?We(U,V,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ue):V(ue)}function V(ue){return ue===m?(U.enter("codeFencedFenceSequence"),ce(ue)):X(ue)}function ce(ue){return ue===m?(ie++,U.consume(ue),ce):ie>=f?(U.exit("codeFencedFenceSequence"),qe(ue)?We(U,ye,"whitespace")(ue):ye(ue)):X(ue)}function ye(ue){return ue===null||Ce(ue)?(U.exit("codeFencedFence"),R(ue)):X(ue)}}}const Wf={name:"codeIndented",tokenize:sN},oN={partial:!0,tokenize:cN};function sN(n,r,a){return u;function u(m){return n.enter("codeIndented"),y0(n,s,a,"linePrefix",4,4)(m)}function s(m){return m===null?f(m):Ce(m)?n.attempt(oN,s,f)(m):(n.enter("codeFlowValue"),d(m))}function d(m){return m===null||Ce(m)?(n.exit("codeFlowValue"),s(m)):(n.consume(m),d)}function f(m){return n.exit("codeIndented"),r(m)}}function cN(n,r,a){const u=this;return s;function s(f){return u.parser.lazy[u.now().line]?a(f):Ce(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):y0(n,r,d,"linePrefix",4,4)(f)}function d(f){return Ce(f)?s(f):a(f)}}const fN={name:"codeText",previous:hN,resolve:dN,tokenize:mN};function dN(n){let r=n.length-4,a=3,u,s;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(u=a;++u=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(r,a,u){const s=a||0;this.setCursor(Math.trunc(r));const d=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return u&&$a(this.left,u),d.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),$a(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),$a(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(f):n.interrupt(u.parser.constructs.flow,a,r)(f)}}function S0(n,r,a,u,s,d,f,m,p){const x=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(n.enter(u),n.enter(s),n.enter(d),n.consume(C),n.exit(d),w):C===null||C===32||C===41||ns(C)?a(C):(n.enter(u),n.enter(f),n.enter(m),n.enter("chunkString",{contentType:"string"}),D(C))}function w(C){return C===62?(n.enter(d),n.consume(C),n.exit(d),n.exit(s),n.exit(u),r):(n.enter(m),n.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(n.exit("chunkString"),n.exit(m),w(C)):C===null||C===60||Ce(C)?a(C):(n.consume(C),C===92?N:v)}function N(C){return C===60||C===62||C===92?(n.consume(C),v):v(C)}function D(C){return!y&&(C===null||C===41||ht(C))?(n.exit("chunkString"),n.exit(m),n.exit(f),n.exit(u),r(C)):y999||v===null||v===91||v===93&&!p||v===94&&!m&&"_hiddenFootnoteSupport"in f.parser.constructs?a(v):v===93?(n.exit(d),n.enter(s),n.consume(v),n.exit(s),n.exit(u),r):Ce(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),y):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Ce(v)||m++>999?(n.exit("chunkString"),y(v)):(n.consume(v),p||(p=!qe(v)),v===92?w:g)}function w(v){return v===91||v===92||v===93?(n.consume(v),m++,g):g(v)}}function E0(n,r,a,u,s,d){let f;return m;function m(w){return w===34||w===39||w===40?(n.enter(u),n.enter(s),n.consume(w),n.exit(s),f=w===40?41:w,p):a(w)}function p(w){return w===f?(n.enter(s),n.consume(w),n.exit(s),n.exit(u),r):(n.enter(d),x(w))}function x(w){return w===f?(n.exit(d),p(f)):w===null?a(w):Ce(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),We(n,x,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===f||w===null||Ce(w)?(n.exit("chunkString"),x(w)):(n.consume(w),w===92?g:y)}function g(w){return w===f||w===92?(n.consume(w),y):y(w)}}function nu(n,r){let a;return u;function u(s){return Ce(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),a=!0,u):qe(s)?We(n,u,a?"linePrefix":"lineSuffix")(s):r(s)}}const kN={name:"definition",tokenize:NN},SN={partial:!0,tokenize:EN};function NN(n,r,a){const u=this;let s;return d;function d(v){return n.enter("definition"),f(v)}function f(v){return N0.call(u,n,m,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function m(v){return s=tl(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),v===58?(n.enter("definitionMarker"),n.consume(v),n.exit("definitionMarker"),p):a(v)}function p(v){return ht(v)?nu(n,x)(v):x(v)}function x(v){return S0(n,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return n.attempt(SN,g,g)(v)}function g(v){return qe(v)?We(n,w,"whitespace")(v):w(v)}function w(v){return v===null||Ce(v)?(n.exit("definition"),u.parser.defined.push(s),r(v)):a(v)}}function EN(n,r,a){return u;function u(m){return ht(m)?nu(n,s)(m):a(m)}function s(m){return E0(n,d,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(m)}function d(m){return qe(m)?We(n,f,"whitespace")(m):f(m)}function f(m){return m===null||Ce(m)?r(m):a(m)}}const jN={name:"hardBreakEscape",tokenize:CN};function CN(n,r,a){return u;function u(d){return n.enter("hardBreakEscape"),n.consume(d),s}function s(d){return Ce(d)?(n.exit("hardBreakEscape"),r(d)):a(d)}}const TN={name:"headingAtx",resolve:_N,tokenize:AN};function _N(n,r){let a=n.length-2,u=3;if(n[u][1].type==="whitespace"&&(u+=2),a-2>u&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(u===a-1||a-4>u&&n[a-2][1].type==="whitespace")&&(a-=u+1===a?2:4),a>u){const s={type:"atxHeadingText",start:n[u][1].start,end:n[a][1].end},d={type:"chunkText",start:n[u][1].start,end:n[a][1].end,contentType:"text"};el(n,u,a-u+1,[["enter",s,r],["enter",d,r],["exit",d,r],["exit",s,r]])}return n}function AN(n,r,a){let u=0;return s;function s(y){return n.enter("atxHeading"),d(y)}function d(y){return n.enter("atxHeadingSequence"),f(y)}function f(y){return y===35&&u++<6?(n.consume(y),f):y===null||ht(y)?(n.exit("atxHeadingSequence"),m(y)):a(y)}function m(y){return y===35?(n.enter("atxHeadingSequence"),p(y)):y===null||Ce(y)?(n.exit("atxHeading"),r(y)):qe(y)?We(n,m,"whitespace")(y):(n.enter("atxHeadingText"),x(y))}function p(y){return y===35?(n.consume(y),p):(n.exit("atxHeadingSequence"),m(y))}function x(y){return y===null||y===35||ht(y)?(n.exit("atxHeadingText"),m(y)):(n.consume(y),x)}}const j0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],jd=["pre","script","style","textarea"],zN={concrete:!0,name:"htmlFlow",resolveTo:MN,tokenize:ON},DN={partial:!0,tokenize:RN};function MN(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function ON(n,r,a){const u=this;let s,d,f,m,p;return x;function x(A){return y(A)}function y(A){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(A),g}function g(A){return A===33?(n.consume(A),w):A===47?(n.consume(A),d=!0,D):A===63?(n.consume(A),s=3,u.interrupt?r:S):Kt(A)?(n.consume(A),f=String.fromCharCode(A),O):a(A)}function w(A){return A===45?(n.consume(A),s=2,v):A===91?(n.consume(A),s=5,m=0,N):Kt(A)?(n.consume(A),s=4,u.interrupt?r:S):a(A)}function v(A){return A===45?(n.consume(A),u.interrupt?r:S):a(A)}function N(A){const _="CDATA[";return A===_.charCodeAt(m++)?(n.consume(A),m===_.length?u.interrupt?r:V:N):a(A)}function D(A){return Kt(A)?(n.consume(A),f=String.fromCharCode(A),O):a(A)}function O(A){if(A===null||A===47||A===62||ht(A)){const _=A===47,re=f.toLowerCase();return!_&&!d&&jd.includes(re)?(s=1,u.interrupt?r(A):V(A)):j0.includes(f.toLowerCase())?(s=6,_?(n.consume(A),C):u.interrupt?r(A):V(A)):(s=7,u.interrupt&&!u.parser.lazy[u.now().line]?a(A):d?J(A):G(A))}return A===45||Zt(A)?(n.consume(A),f+=String.fromCharCode(A),O):a(A)}function C(A){return A===62?(n.consume(A),u.interrupt?r:V):a(A)}function J(A){return qe(A)?(n.consume(A),J):L(A)}function G(A){return A===47?(n.consume(A),L):A===58||A===95||Kt(A)?(n.consume(A),P):qe(A)?(n.consume(A),G):L(A)}function P(A){return A===45||A===46||A===58||A===95||Zt(A)?(n.consume(A),P):ae(A)}function ae(A){return A===61?(n.consume(A),U):qe(A)?(n.consume(A),ae):G(A)}function U(A){return A===null||A===60||A===61||A===62||A===96?a(A):A===34||A===39?(n.consume(A),p=A,R):qe(A)?(n.consume(A),U):X(A)}function R(A){return A===p?(n.consume(A),p=null,ie):A===null||Ce(A)?a(A):(n.consume(A),R)}function X(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||ht(A)?ae(A):(n.consume(A),X)}function ie(A){return A===47||A===62||qe(A)?G(A):a(A)}function L(A){return A===62?(n.consume(A),le):a(A)}function le(A){return A===null||Ce(A)?V(A):qe(A)?(n.consume(A),le):a(A)}function V(A){return A===45&&s===2?(n.consume(A),B):A===60&&s===1?(n.consume(A),I):A===62&&s===4?(n.consume(A),Fe):A===63&&s===3?(n.consume(A),S):A===93&&s===5?(n.consume(A),ne):Ce(A)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(DN,Ve,ce)(A)):A===null||Ce(A)?(n.exit("htmlFlowData"),ce(A)):(n.consume(A),V)}function ce(A){return n.check(Ed,ye,Ve)(A)}function ye(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),ue}function ue(A){return A===null||Ce(A)?ce(A):(n.enter("htmlFlowData"),V(A))}function B(A){return A===45?(n.consume(A),S):V(A)}function I(A){return A===47?(n.consume(A),f="",$):V(A)}function $(A){if(A===62){const _=f.toLowerCase();return jd.includes(_)?(n.consume(A),Fe):V(A)}return Kt(A)&&f.length<8?(n.consume(A),f+=String.fromCharCode(A),$):V(A)}function ne(A){return A===93?(n.consume(A),S):V(A)}function S(A){return A===62?(n.consume(A),Fe):A===45&&s===2?(n.consume(A),S):V(A)}function Fe(A){return A===null||Ce(A)?(n.exit("htmlFlowData"),Ve(A)):(n.consume(A),Fe)}function Ve(A){return n.exit("htmlFlow"),r(A)}}function RN(n,r,a){return u;function u(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(au,r,a)}}const LN={name:"htmlText",tokenize:BN};function BN(n,r,a){const u=this;let s,d,f;return m;function m(S){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(S),p}function p(S){return S===33?(n.consume(S),x):S===47?(n.consume(S),ae):S===63?(n.consume(S),G):Kt(S)?(n.consume(S),X):a(S)}function x(S){return S===45?(n.consume(S),y):S===91?(n.consume(S),d=0,N):Kt(S)?(n.consume(S),J):a(S)}function y(S){return S===45?(n.consume(S),v):a(S)}function g(S){return S===null?a(S):S===45?(n.consume(S),w):Ce(S)?(f=g,I(S)):(n.consume(S),g)}function w(S){return S===45?(n.consume(S),v):g(S)}function v(S){return S===62?B(S):S===45?w(S):g(S)}function N(S){const Fe="CDATA[";return S===Fe.charCodeAt(d++)?(n.consume(S),d===Fe.length?D:N):a(S)}function D(S){return S===null?a(S):S===93?(n.consume(S),O):Ce(S)?(f=D,I(S)):(n.consume(S),D)}function O(S){return S===93?(n.consume(S),C):D(S)}function C(S){return S===62?B(S):S===93?(n.consume(S),C):D(S)}function J(S){return S===null||S===62?B(S):Ce(S)?(f=J,I(S)):(n.consume(S),J)}function G(S){return S===null?a(S):S===63?(n.consume(S),P):Ce(S)?(f=G,I(S)):(n.consume(S),G)}function P(S){return S===62?B(S):G(S)}function ae(S){return Kt(S)?(n.consume(S),U):a(S)}function U(S){return S===45||Zt(S)?(n.consume(S),U):R(S)}function R(S){return Ce(S)?(f=R,I(S)):qe(S)?(n.consume(S),R):B(S)}function X(S){return S===45||Zt(S)?(n.consume(S),X):S===47||S===62||ht(S)?ie(S):a(S)}function ie(S){return S===47?(n.consume(S),B):S===58||S===95||Kt(S)?(n.consume(S),L):Ce(S)?(f=ie,I(S)):qe(S)?(n.consume(S),ie):B(S)}function L(S){return S===45||S===46||S===58||S===95||Zt(S)?(n.consume(S),L):le(S)}function le(S){return S===61?(n.consume(S),V):Ce(S)?(f=le,I(S)):qe(S)?(n.consume(S),le):ie(S)}function V(S){return S===null||S===60||S===61||S===62||S===96?a(S):S===34||S===39?(n.consume(S),s=S,ce):Ce(S)?(f=V,I(S)):qe(S)?(n.consume(S),V):(n.consume(S),ye)}function ce(S){return S===s?(n.consume(S),s=void 0,ue):S===null?a(S):Ce(S)?(f=ce,I(S)):(n.consume(S),ce)}function ye(S){return S===null||S===34||S===39||S===60||S===61||S===96?a(S):S===47||S===62||ht(S)?ie(S):(n.consume(S),ye)}function ue(S){return S===47||S===62||ht(S)?ie(S):a(S)}function B(S){return S===62?(n.consume(S),n.exit("htmlTextData"),n.exit("htmlText"),r):a(S)}function I(S){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),$}function $(S){return qe(S)?We(n,ne,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return n.enter("htmlTextData"),f(S)}}const Id={name:"labelEnd",resolveAll:FN,resolveTo:VN,tokenize:YN},UN={tokenize:GN},HN={tokenize:QN},qN={tokenize:XN};function FN(n){let r=-1;const a=[];for(;++r0&&s[s.length-1]._balanced;)s.pop();d=s[s.length-1]}return m;function m(w){return d?d._inactive?g(w):(f=u.parser.defined.includes(tl(u.sliceSerialize({start:d.end,end:u.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(w),n.exit("labelMarker"),n.exit("labelEnd"),p):a(w)}function p(w){return w===40?n.attempt(UN,y,f?y:g)(w):w===91?n.attempt(HN,y,f?x:g)(w):f?y(w):g(w)}function x(w){return n.attempt(qN,y,g)(w)}function y(w){return s.pop(),r(w)}function g(w){return d._balanced=!0,a(w)}}function GN(n,r,a){return u;function u(g){return n.enter("resource"),n.enter("resourceMarker"),n.consume(g),n.exit("resourceMarker"),s}function s(g){return ht(g)?nu(n,d)(g):d(g)}function d(g){return g===41?y(g):S0(n,f,m,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function f(g){return ht(g)?nu(n,p)(g):y(g)}function m(g){return a(g)}function p(g){return g===34||g===39||g===40?E0(n,x,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function x(g){return ht(g)?nu(n,y)(g):y(g)}function y(g){return g===41?(n.enter("resourceMarker"),n.consume(g),n.exit("resourceMarker"),n.exit("resource"),r):a(g)}}function QN(n,r,a){const u=this;return s;function s(m){return N0.call(u,n,d,f,"reference","referenceMarker","referenceString")(m)}function d(m){return u.parser.defined.includes(tl(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?r(m):a(m)}function f(m){return a(m)}}function XN(n,r,a){return u;function u(d){return n.enter("reference"),n.enter("referenceMarker"),n.consume(d),n.exit("referenceMarker"),s}function s(d){return d===93?(n.enter("referenceMarker"),n.consume(d),n.exit("referenceMarker"),n.exit("reference"),r):a(d)}}const IN={name:"labelStartImage",resolveAll:Id.resolveAll,tokenize:KN};function KN(n,r,a){const u=this;let s;return d;function d(p){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(p),n.exit("labelImageMarker"),f}function f(p){return p===91?(n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),s=n.exit("labelImage"),m):a(p)}function m(p){return p===94&&"_hiddenFootnoteSupport"in u.parser.constructs?a(p):(u._labelStarts=u._labelStarts||[],u._labelStarts.push(s),r(p))}}const ZN={name:"labelStartLink",resolveAll:Id.resolveAll,tokenize:$N};function $N(n,r,a){const u=this;let s;return d;function d(m){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),s=n.exit("labelLink"),f}function f(m){return m===94&&"_hiddenFootnoteSupport"in u.parser.constructs?a(m):(u._labelStarts=u._labelStarts||[],u._labelStarts.push(s),r(m))}}const ed={name:"lineEnding",tokenize:JN};function JN(n,r){return a;function a(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),We(n,r,"linePrefix")}}const Wo={name:"thematicBreak",tokenize:PN};function PN(n,r,a){let u=0,s;return d;function d(x){return n.enter("thematicBreak"),f(x)}function f(x){return s=x,m(x)}function m(x){return x===s?(n.enter("thematicBreakSequence"),p(x)):u>=3&&(x===null||Ce(x))?(n.exit("thematicBreak"),r(x)):a(x)}function p(x){return x===s?(n.consume(x),u++,p):(n.exit("thematicBreakSequence"),qe(x)?We(n,m,"whitespace")(x):m(x))}}const vn={continuation:{tokenize:n3},exit:i3,name:"list",tokenize:t3},WN={partial:!0,tokenize:r3},e3={partial:!0,tokenize:l3};function t3(n,r,a){const u=this,s=u.events[u.events.length-1];let d=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return m;function m(v){const N=u.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!u.containerState.marker||v===u.containerState.marker:Sd(v)){if(u.containerState.type||(u.containerState.type=N,n.enter(N,{_container:!0})),N==="listUnordered")return n.enter("listItemPrefix"),v===42||v===45?n.check(Wo,a,x)(v):x(v);if(!u.interrupt||v===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(v)}return a(v)}function p(v){return Sd(v)&&++f<10?(n.consume(v),p):(!u.interrupt||f<2)&&(u.containerState.marker?v===u.containerState.marker:v===41||v===46)?(n.exit("listItemValue"),x(v)):a(v)}function x(v){return n.enter("listItemMarker"),n.consume(v),n.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||v,n.check(au,u.interrupt?a:y,n.attempt(WN,w,g))}function y(v){return u.containerState.initialBlankLine=!0,d++,w(v)}function g(v){return qe(v)?(n.enter("listItemPrefixWhitespace"),n.consume(v),n.exit("listItemPrefixWhitespace"),w):a(v)}function w(v){return u.containerState.size=d+u.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(v)}}function n3(n,r,a){const u=this;return u.containerState._closeFlow=void 0,n.check(au,s,d);function s(m){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,We(n,r,"listItemIndent",u.containerState.size+1)(m)}function d(m){return u.containerState.furtherBlankLines||!qe(m)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(m)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,n.attempt(e3,r,f)(m))}function f(m){return u.containerState._closeFlow=!0,u.interrupt=void 0,We(n,n.attempt(vn,r,a),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m)}}function l3(n,r,a){const u=this;return We(n,s,"listItemIndent",u.containerState.size+1);function s(d){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?r(d):a(d)}}function i3(n){n.exit(this.containerState.type)}function r3(n,r,a){const u=this;return We(n,s,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(d){const f=u.events[u.events.length-1];return!qe(d)&&f&&f[1].type==="listItemPrefixWhitespace"?r(d):a(d)}}const ay={name:"setextUnderline",resolveTo:a3,tokenize:u3};function a3(n,r){const a=new ls;let u=n.length,s,d,f;for(;u--;)if(n[u][0]==="enter"){if(n[u][1].type==="content"){s=u;break}n[u][1].type==="paragraph"&&(d=u)}else n[u][1].type==="content"&&a.add(u,1,[]),!f&&n[u][1].type==="definition"&&(f=u);const m={type:"setextHeading",start:{...n[s][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",f?(a.add(d,0,[["enter",m,r]]),a.add(f+1,0,[["exit",n[s][1],r]]),n[s][1].end={...n[f][1].end}):n[s][1]=m,a.add(n.length,0,[["exit",m,r]]),a.consume(n),n}function u3(n,r,a){const u=this;let s;return d;function d(x){let y=u.events.length,g;for(;y--;)if(u.events[y][1].type!=="lineEnding"&&u.events[y][1].type!=="linePrefix"&&u.events[y][1].type!=="content"){g=u.events[y][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||g)?(n.enter("setextHeadingLine"),s=x,f(x)):a(x)}function f(x){return n.enter("setextHeadingLineSequence"),m(x)}function m(x){return x===s?(n.consume(x),m):(n.exit("setextHeadingLineSequence"),qe(x)?We(n,p,"lineSuffix")(x):p(x))}function p(x){return x===null||Ce(x)?(n.exit("setextHeadingLine"),r(x)):a(x)}}const o3={tokenize:s3};function s3(n){const r=this,a=n.attempt(au,u,n.attempt(this.parser.constructs.flowInitial,s,We(n,n.attempt(this.parser.constructs.flow,s,n.attempt(xN,s)),"linePrefix")));return a;function u(d){if(d===null){n.consume(d);return}return n.enter("lineEndingBlank"),n.consume(d),n.exit("lineEndingBlank"),r.currentConstruct=void 0,a}function s(d){if(d===null){n.consume(d);return}return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),r.currentConstruct=void 0,a}}const c3={resolveAll:T0()},f3=C0("string"),d3=C0("text");function C0(n){return{resolveAll:T0(n==="text"?h3:void 0),tokenize:r};function r(a){const u=this,s=this.parser.constructs[n],d=a.attempt(s,f,m);return f;function f(y){return x(y)?d(y):m(y)}function m(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return x(y)?(a.exit("data"),d(y)):(a.consume(y),p)}function x(y){if(y===null)return!0;const g=s[y];let w=-1;if(g)for(;++w-1){const m=f[0];typeof m=="string"?f[0]=m.slice(u):f.shift()}d>0&&f.push(n[s].slice(0,d))}return f}function j3(n,r){let a=-1;const u=[];let s;for(;++a ProFiles - + diff --git a/src/profiles/web/dist/sw.js b/src/profiles/web/dist/sw.js index 46fb25d..59f86b5 100644 --- a/src/profiles/web/dist/sw.js +++ b/src/profiles/web/dist/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,t)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let o={};const d=e=>i(e,r),l={module:{uri:r},exports:o,require:d};s[r]=Promise.all(n.map(e=>l[e]||d(e))).then(e=>(t(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"d35a4a5d33a2542f9c9fbad4cf9f142b"},{url:"assets/index-CYtEXweO.css",revision:null},{url:"assets/index-A7Dw9JEC.js",revision:null},{url:"manifest.webmanifest",revision:"5a42ebe8b55b07b5831cbbddda834829"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,t)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let o={};const l=e=>i(e,r),d={module:{uri:r},exports:o,require:l};s[r]=Promise.all(n.map(e=>d[e]||l(e))).then(e=>(t(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"3e773be502b9c76b4119cb66779582b5"},{url:"assets/index-CYtEXweO.css",revision:null},{url:"assets/index-B4j21U4k.js",revision:null},{url:"manifest.webmanifest",revision:"5a42ebe8b55b07b5831cbbddda834829"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); diff --git a/src/profiles/web/src/utils/useModalA11y.test.tsx b/src/profiles/web/src/utils/useModalA11y.test.tsx new file mode 100644 index 0000000..fb217f2 --- /dev/null +++ b/src/profiles/web/src/utils/useModalA11y.test.tsx @@ -0,0 +1,109 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it, vi } from "vitest"; +import { cleanup, render, screen } from "@testing-library/react"; +import { useRef } from "react"; +import { useModalA11y } from "./useModalA11y"; + +/** Minimal dialog wired through the hook, with an app button "behind" it. */ +function Fixture({ onClose }: { onClose: () => void }) { + const dialogRef = useRef(null); + const handleDialogKeyDown = useModalA11y({ isOpen: true, onClose, dialogRef }); + return ( +
+ +
+ + + +
+
+ ); +} + +function pressTab(shift = false): void { + document.body.dispatchEvent( + new KeyboardEvent("keydown", { key: "Tab", bubbles: true, cancelable: true, shiftKey: shift }), + ); +} + +afterEach(() => { + cleanup(); + document.body.innerHTML = ""; +}); + +describe("useModalA11y focus trap", () => { + it("pulls focus into the dialog when Tab is pressed while focus is on body", () => { + render(); + screen.getByText("behind-app-button"); + (document.activeElement as HTMLElement | null)?.blur?.(); + expect(document.activeElement).toBe(document.body); + + pressTab(); + + // Focus lands on the first control INSIDE the dialog — never on the + // app behind the modal. + expect(document.activeElement?.id).toBe("first"); + }); + + it("Shift+Tab from body pulls focus to the last control", () => { + render(); + screen.getByText("behind-app-button"); + (document.activeElement as HTMLElement | null)?.blur?.(); + + pressTab(true); + + expect(document.activeElement?.id).toBe("last"); + }); + + it("wraps forward from the last focusable back to the first", () => { + render(); + screen.getByText("behind-app-button"); + (document.getElementById("last") as HTMLElement).focus(); + + pressTab(); + + expect(document.activeElement?.id).toBe("first"); + }); + + it("wraps backward with Shift+Tab from the first focusable", () => { + render(); + screen.getByText("behind-app-button"); + (document.getElementById("first") as HTMLElement).focus(); + + pressTab(true); + + expect(document.activeElement?.id).toBe("last"); + }); + + it("keeps focus inside the dialog across repeated Tabs", () => { + render(); + screen.getByText("behind-app-button"); + (document.activeElement as HTMLElement | null)?.blur?.(); + + pressTab(); + pressTab(); // last wrap edge (first → last) + pressTab(); + + const dialog = screen.getByRole("dialog"); + expect(dialog.contains(document.activeElement)).toBe(true); + }); + + it("Escape still closes when focus is inside the dialog", () => { + const onClose = vi.fn(); + render(); + screen.getByText("behind-app-button"); + (document.getElementById("first") as HTMLElement).focus(); + + document.getElementById("first")!.dispatchEvent( + new KeyboardEvent("keydown", { key: "Escape", bubbles: true, cancelable: true }), + ); + + expect(onClose).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/profiles/web/src/utils/useModalA11y.ts b/src/profiles/web/src/utils/useModalA11y.ts index c017f4a..776b2b1 100644 --- a/src/profiles/web/src/utils/useModalA11y.ts +++ b/src/profiles/web/src/utils/useModalA11y.ts @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import type { KeyboardEvent, RefObject } from "react"; +import type { KeyboardEvent as ReactKeyboardEvent, RefObject } from "react"; const FOCUSABLE_SELECTOR = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], video[tabindex], [tabindex]:not([tabindex="-1"])'; @@ -17,14 +17,20 @@ export interface UseModalA11yOptions { /** * Shared dialog a11y: focus trap, initial focus and focus restore * (issue #62). Attach the returned handler to the dialog element's - * `onKeyDown` so Escape and Tab are handled while focus is inside. + * `onKeyDown` so Escape is handled while focus is inside. + * + * The Tab half of the trap deliberately runs at the window capture level + * (see the effect), not in this handler: a dialog-level onKeyDown never + * sees a Tab pressed while focus sits on document.body — e.g. after a + * backdrop click or an unmounted focused node — and the browser would + * then happily move focus into the app behind the modal. */ export function useModalA11y({ isOpen, onClose, dialogRef, initialFocusRef, -}: UseModalA11yOptions): (event: KeyboardEvent) => void { +}: UseModalA11yOptions): (event: ReactKeyboardEvent) => void { useEffect(() => { if (!isOpen) return; @@ -39,34 +45,54 @@ export function useModalA11y({ target?.focus(); }); + // Window-capture Tab trap: owns every Tab press while the modal is + // open, wherever focus currently sits. One listener per open modal; + // for stacked dialogs the most recently opened modal's handler runs + // last and wins, which resolves nesting in favor of the topmost one. + const trapTab = (event: KeyboardEvent) => { + if (event.key !== "Tab") return; + const dialog = dialogRef.current; + if (!dialog) return; + const focusable = Array.from(dialog.querySelectorAll(FOCUSABLE_SELECTOR)); + if (!focusable.length) return; + const first = focusable[0]; + const last = focusable[focusable.length - 1]; + const active = document.activeElement; + const inside = active instanceof Node && dialog.contains(active); + + if (!inside) { + // Focus drifted out: pull it back instead of traversing the app + // behind the modal. + event.preventDefault(); + (event.shiftKey ? last : first).focus(); + return; + } + if (event.shiftKey && (active === first || active === dialog)) { + event.preventDefault(); + last.focus(); + } else if (!event.shiftKey && (active === last || active === dialog)) { + event.preventDefault(); + first.focus(); + } + // Anywhere else inside: leave Tab to native traversal between the + // dialog's own controls. + }; + window.addEventListener("keydown", trapTab, true); + return () => { cancelAnimationFrame(frame); previousFocus?.focus(); + window.removeEventListener("keydown", trapTab, true); }; // Re-run when isOpen flips; refs are stable. // eslint-disable-next-line react-hooks/exhaustive-deps }, [isOpen]); - return (event: KeyboardEvent) => { + return (event: ReactKeyboardEvent) => { if (event.key === "Escape") { event.preventDefault(); event.stopPropagation(); onClose(); - return; - } - if (event.key !== "Tab") return; - - const focusable = dialogRef.current?.querySelectorAll(FOCUSABLE_SELECTOR); - if (!focusable?.length) return; - - const first = focusable[0]; - const last = focusable[focusable.length - 1]; - if (event.shiftKey && document.activeElement === first) { - event.preventDefault(); - last.focus(); - } else if (!event.shiftKey && document.activeElement === last) { - event.preventDefault(); - first.focus(); } }; } diff --git a/src/profiles/web/tsconfig.tsbuildinfo b/src/profiles/web/tsconfig.tsbuildinfo index a57db8b..f2925d6 100644 --- a/src/profiles/web/tsconfig.tsbuildinfo +++ b/src/profiles/web/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/client.test.ts","./src/api/client.ts","./src/api/types.ts","./src/components/actionbar.tsx","./src/components/barcodemodal.tsx","./src/components/camerabarcodemodal.tsx","./src/components/confirmdialog.tsx","./src/components/contextmenu.tsx","./src/components/directorypickermodal.tsx","./src/components/dropconfigoverlay.tsx","./src/components/editablecombobox.tsx","./src/components/errorboundary.tsx","./src/components/filelisttable.tsx","./src/components/filepropertiesmodal.tsx","./src/components/filtersyntaxhelper.tsx","./src/components/headerbar.tsx","./src/components/initerrorpanel.tsx","./src/components/loadconfigmodal.tsx","./src/components/logviewermodal.tsx","./src/components/markdownmessage.test.tsx","./src/components/markdownmessage.tsx","./src/components/scanstatusstrip.tsx","./src/components/searchbar.tsx","./src/components/shortcutsmodal.tsx","./src/components/singlematchpromptmodal.tsx","./src/components/statusbar.tsx","./src/components/timermodal.tsx","./src/components/tooltip.tsx","./src/components/workflowrunnermodal.test.tsx","./src/components/workflowrunnermodal.tsx","./src/utils/barcodedecoder.test.ts","./src/utils/barcodedecoder.ts","./src/utils/barcodescanner.ts","./src/utils/configdrop.test.ts","./src/utils/configdrop.ts","./src/utils/exportcsv.ts","./src/utils/fileproperties.test.ts","./src/utils/fileproperties.ts","./src/utils/searchsyntax.test.ts","./src/utils/searchsyntax.ts","./src/utils/theme.test.ts","./src/utils/theme.ts","./src/utils/usemodala11y.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/client.test.ts","./src/api/client.ts","./src/api/types.ts","./src/components/actionbar.tsx","./src/components/barcodemodal.tsx","./src/components/camerabarcodemodal.tsx","./src/components/confirmdialog.tsx","./src/components/contextmenu.tsx","./src/components/directorypickermodal.tsx","./src/components/dropconfigoverlay.tsx","./src/components/editablecombobox.tsx","./src/components/errorboundary.tsx","./src/components/filelisttable.tsx","./src/components/filepropertiesmodal.tsx","./src/components/filtersyntaxhelper.tsx","./src/components/headerbar.tsx","./src/components/initerrorpanel.tsx","./src/components/loadconfigmodal.tsx","./src/components/logviewermodal.tsx","./src/components/markdownmessage.test.tsx","./src/components/markdownmessage.tsx","./src/components/scanstatusstrip.tsx","./src/components/searchbar.tsx","./src/components/shortcutsmodal.tsx","./src/components/singlematchpromptmodal.tsx","./src/components/statusbar.tsx","./src/components/timermodal.tsx","./src/components/tooltip.tsx","./src/components/workflowrunnermodal.test.tsx","./src/components/workflowrunnermodal.tsx","./src/utils/barcodedecoder.test.ts","./src/utils/barcodedecoder.ts","./src/utils/barcodescanner.ts","./src/utils/configdrop.test.ts","./src/utils/configdrop.ts","./src/utils/exportcsv.ts","./src/utils/fileproperties.test.ts","./src/utils/fileproperties.ts","./src/utils/searchsyntax.test.ts","./src/utils/searchsyntax.ts","./src/utils/theme.test.ts","./src/utils/theme.ts","./src/utils/usemodala11y.test.tsx","./src/utils/usemodala11y.ts"],"version":"5.7.3"} \ No newline at end of file From 8e52d091af2c38c75895fee996ea2972013bd2fe Mon Sep 17 00:00:00 2001 From: falbany Date: Tue, 3 Nov 2026 00:57:15 +0100 Subject: [PATCH 2/2] fix(web): baseline keyboard focus outline for all interactive elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Buttons not carrying the .btn class (workflow step rows, context-menu items, header icon buttons, ...) had no focus indicator at all — with the Tab trap now keeping keyboard focus inside modals, those elements were focused invisibly. One :where() baseline rule in index.css gives every interactive element a visible 2px indigo outline on :focus-visible (WCAG 2.4.7). Zero specificity by design: elements that handle focus locally via focus-visible:ring utilities keep their ring and suppress the outline, so existing visuals are untouched and the rule only fills the gaps. --- .../assets/{index-B4j21U4k.js => index-BRlfnag_.js} | 0 .../{index-CYtEXweO.css => index-CcQFM_iR.css} | 2 +- src/profiles/web/dist/index.html | 4 ++-- src/profiles/web/dist/sw.js | 2 +- src/profiles/web/src/index.css | 12 ++++++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) rename src/profiles/web/dist/assets/{index-B4j21U4k.js => index-BRlfnag_.js} (100%) rename src/profiles/web/dist/assets/{index-CYtEXweO.css => index-CcQFM_iR.css} (86%) diff --git a/src/profiles/web/dist/assets/index-B4j21U4k.js b/src/profiles/web/dist/assets/index-BRlfnag_.js similarity index 100% rename from src/profiles/web/dist/assets/index-B4j21U4k.js rename to src/profiles/web/dist/assets/index-BRlfnag_.js diff --git a/src/profiles/web/dist/assets/index-CYtEXweO.css b/src/profiles/web/dist/assets/index-CcQFM_iR.css similarity index 86% rename from src/profiles/web/dist/assets/index-CYtEXweO.css rename to src/profiles/web/dist/assets/index-CcQFM_iR.css index fefad79..8d687d9 100644 --- a/src/profiles/web/dist/assets/index-CYtEXweO.css +++ b/src/profiles/web/dist/assets/index-CcQFM_iR.css @@ -1 +1 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-900:oklch(20.8% .042 265.755);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.glass-panel{background:var(--app-glass-panel);-webkit-backdrop-filter:blur(24px)saturate(160%);backdrop-filter:blur(24px)saturate(160%);box-shadow:var(--app-panel-shadow),inset 0 1px 0 var(--app-glass-highlight)}.glass-panel-strong{background:var(--app-glass-panel-strong);-webkit-backdrop-filter:blur(28px)saturate(180%);backdrop-filter:blur(28px)saturate(180%);box-shadow:var(--app-panel-shadow),inset 0 1px 0 var(--app-glass-highlight)}.btn{justify-content:center;align-items:center;gap:calc(var(--spacing) * 1.5);border-radius:var(--radius-md);border-style:var(--tw-border-style);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-width:1px;display:inline-flex}.btn:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.btn:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.btn:focus-visible{--tw-outline-style:none;outline-style:none}.btn:disabled{cursor:not-allowed;opacity:.4}.btn-primary{background-color:var(--color-indigo-600);color:var(--color-white);border-color:#0000}@media(hover:hover){.btn-primary:hover{background-color:var(--color-indigo-500)}}.btn-secondary{border-color:var(--app-border);background-color:var(--app-elevated);color:var(--app-text-secondary)}@media(hover:hover){.btn-secondary:hover{border-color:var(--color-indigo-500);color:var(--app-text-primary)}.btn-chip:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.btn-chip:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.btn-chip:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.btn-chip:focus-visible{--tw-outline-style:none;outline-style:none}.btn-chip:disabled{cursor:not-allowed;opacity:.4}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.focus-ring:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.focus-ring:focus-visible{--tw-outline-style:none;outline-style:none}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.-right-1{right:calc(var(--spacing) * -1)}.right-0{right:0}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-2{bottom:calc(var(--spacing) * 2)}.-left-1{left:calc(var(--spacing) * -1)}.left-0{left:0}.left-1\/2{left:50%}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\[calc\(var\(--z-context-menu\)-1\)\]{z-index:calc(var(--z-context-menu) - 1)}.z-\[var\(--z-combobox-list\)\]{z-index:var(--z-combobox-list)}.z-\[var\(--z-context-menu\)\]{z-index:var(--z-context-menu)}.z-\[var\(--z-drop-overlay\)\]{z-index:var(--z-drop-overlay)}.z-\[var\(--z-modal\)\]{z-index:var(--z-modal)}.z-\[var\(--z-syntax-helper\)\]{z-index:var(--z-syntax-helper)}.z-\[var\(--z-toast\)\]{z-index:var(--z-toast)}.z-\[var\(--z-tooltip\)\]{z-index:var(--z-tooltip)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-auto{margin-right:auto}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-video{aspect-ratio:var(--aspect-video)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-48{height:calc(var(--spacing) * 48)}.h-\[80vh\]{height:80vh}.h-\[min\(84dvh\,760px\)\]{height:min(84dvh,760px)}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100dvh-1\.5rem\)\]{max-height:calc(100dvh - 1.5rem)}.max-h-\[calc\(100dvh-16px\)\]{max-height:calc(100dvh - 16px)}.min-h-0{min-height:0}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-36{min-height:calc(var(--spacing) * 36)}.min-h-\[24px\]{min-height:24px}.min-h-\[44px\]{min-height:44px}.min-h-screen{min-height:100vh}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[52px\]{width:52px}.w-\[138px\]{width:138px}.w-\[150px\]{width:150px}.w-\[400px\]{width:400px}.w-\[420px\]{width:420px}.w-\[450px\]{width:450px}.w-\[clamp\(560px\,85vw\,1500px\)\]{width:clamp(560px,85vw,1500px)}.w-\[min\(94vw\,960px\)\]{width:min(94vw,960px)}.w-full{width:100%}.w-max{width:max-content}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[calc\(100vw-16px\)\]{max-width:calc(100vw - 16px)}.max-w-\[min\(70vw\,560px\)\]{max-width:min(70vw,560px)}.max-w-\[min\(80vw\,640px\)\]{max-width:min(80vw,640px)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-\[100px\]{min-width:100px}.min-w-\[220px\]{min-width:220px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-64{flex-basis:calc(var(--spacing) * 64)}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-chip-amber-border{border-color:var(--chip-amber-border)}.border-chip-fuchsia-border{border-color:var(--chip-fuchsia-border)}.border-chip-indigo-border,.border-chip-indigo-border\/50{border-color:var(--chip-indigo-border)}@supports (color:color-mix(in lab,red,red)){.border-chip-indigo-border\/50{border-color:color-mix(in oklab,var(--chip-indigo-border) 50%,transparent)}}.border-chip-purple-border,.border-chip-purple-border\/50{border-color:var(--chip-purple-border)}@supports (color:color-mix(in lab,red,red)){.border-chip-purple-border\/50{border-color:color-mix(in oklab,var(--chip-purple-border) 50%,transparent)}}.border-chip-sky-border{border-color:var(--chip-sky-border)}.border-emerald-300\/50{border-color:#5ee9b580}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/50{border-color:color-mix(in oklab,var(--color-emerald-300) 50%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-frame-line{border-color:var(--app-frame-border)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-400\/80{border-color:#7d87ffcc}@supports (color:color-mix(in lab,red,red)){.border-indigo-400\/80{border-color:color-mix(in oklab,var(--color-indigo-400) 80%,transparent)}}.border-indigo-600{border-color:var(--color-indigo-600)}.border-line,.border-line\/40{border-color:var(--app-border)}@supports (color:color-mix(in lab,red,red)){.border-line\/40{border-color:color-mix(in oklab,var(--app-border) 40%,transparent)}}.border-line\/60{border-color:var(--app-border)}@supports (color:color-mix(in lab,red,red)){.border-line\/60{border-color:color-mix(in oklab,var(--app-border) 60%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-status-danger-border{border-color:var(--status-danger-border)}.border-status-success-border{border-color:var(--status-success-border)}.border-status-warning-border{border-color:var(--status-warning-border)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-app,.bg-app\/90{background-color:var(--app-bg)}@supports (color:color-mix(in lab,red,red)){.bg-app\/90{background-color:color-mix(in oklab,var(--app-bg) 90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/65{background-color:#000000a6}@supports (color:color-mix(in lab,red,red)){.bg-black\/65{background-color:color-mix(in oklab,var(--color-black) 65%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-chip-amber-bg{background-color:var(--chip-amber-bg)}.bg-chip-fuchsia-bg{background-color:var(--chip-fuchsia-bg)}.bg-chip-indigo-bg,.bg-chip-indigo-bg\/20{background-color:var(--chip-indigo-bg)}@supports (color:color-mix(in lab,red,red)){.bg-chip-indigo-bg\/20{background-color:color-mix(in oklab,var(--chip-indigo-bg) 20%,transparent)}}.bg-chip-purple-bg{background-color:var(--chip-purple-bg)}.bg-chip-sky-bg{background-color:var(--chip-sky-bg)}.bg-elevated,.bg-elevated\/30{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/30{background-color:color-mix(in oklab,var(--app-elevated) 30%,transparent)}}.bg-elevated\/50{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/50{background-color:color-mix(in oklab,var(--app-elevated) 50%,transparent)}}.bg-elevated\/60{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/60{background-color:color-mix(in oklab,var(--app-elevated) 60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-800\/60{background-color:#005f4699}@supports (color:color-mix(in lab,red,red)){.bg-emerald-800\/60{background-color:color-mix(in oklab,var(--color-emerald-800) 60%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-ink-faint{background-color:var(--app-text-faint)}.bg-slate-600\/20{background-color:#45556c33}@supports (color:color-mix(in lab,red,red)){.bg-slate-600\/20{background-color:color-mix(in oklab,var(--color-slate-600) 20%,transparent)}}.bg-status-danger-bg,.bg-status-danger-bg\/30{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.bg-status-danger-bg\/30{background-color:color-mix(in oklab,var(--status-danger-bg) 30%,transparent)}}.bg-status-danger-bg\/40{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.bg-status-danger-bg\/40{background-color:color-mix(in oklab,var(--status-danger-bg) 40%,transparent)}}.bg-status-success-bg{background-color:var(--status-success-bg)}.bg-status-warning-bg{background-color:var(--status-warning-bg)}.bg-surface{background-color:var(--app-surface)}.bg-surface-glass{background-color:var(--app-glass)}.bg-surface-strong,.bg-surface-strong\/20{background-color:var(--app-glass-strong)}@supports (color:color-mix(in lab,red,red)){.bg-surface-strong\/20{background-color:color-mix(in oklab,var(--app-glass-strong) 20%,transparent)}}.bg-surface-strong\/30{background-color:var(--app-glass-strong)}@supports (color:color-mix(in lab,red,red)){.bg-surface-strong\/30{background-color:color-mix(in oklab,var(--app-glass-strong) 30%,transparent)}}.bg-surface\/50{background-color:var(--app-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/50{background-color:color-mix(in oklab,var(--app-surface) 50%,transparent)}}.bg-surface\/60{background-color:var(--app-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/60{background-color:color-mix(in oklab,var(--app-surface) 60%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-chip-indigo-bg{--tw-gradient-from:var(--chip-indigo-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-400\/90{--tw-gradient-from:#00d294e6}@supports (color:color-mix(in lab,red,red)){.from-emerald-400\/90{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-400) 90%, transparent)}}.from-emerald-400\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-chip-purple-bg{--tw-gradient-to:var(--chip-purple-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600\/90{--tw-gradient-to:#009767e6}@supports (color:color-mix(in lab,red,red)){.to-emerald-600\/90{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-600) 90%, transparent)}}.to-emerald-600\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.align-\[1px\]{vertical-align:1px}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-chip-amber-text{color:var(--chip-amber-text)}.text-chip-fuchsia-text{color:var(--chip-fuchsia-text)}.text-chip-indigo-text{color:var(--chip-indigo-text)}.text-chip-purple-text{color:var(--chip-purple-text)}.text-chip-sky-text{color:var(--chip-sky-text)}.text-emerald-200{color:var(--color-emerald-200)}.text-ink{color:var(--app-text-primary)}.text-ink-faint{color:var(--app-text-faint)}.text-ink-muted,.text-ink-muted\/50{color:var(--app-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-ink-muted\/50{color:color-mix(in oklab,var(--app-text-muted) 50%,transparent)}}.text-ink-secondary{color:var(--app-text-secondary)}.text-ink\/70{color:var(--app-text-primary)}@supports (color:color-mix(in lab,red,red)){.text-ink\/70{color:color-mix(in oklab,var(--app-text-primary) 70%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-900{color:var(--color-slate-900)}.text-status-danger-text,.text-status-danger-text\/60{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/60{color:color-mix(in oklab,var(--status-danger-text) 60%,transparent)}}.text-status-danger-text\/70{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/70{color:color-mix(in oklab,var(--status-danger-text) 70%,transparent)}}.text-status-danger-text\/80{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/80{color:color-mix(in oklab,var(--status-danger-text) 80%,transparent)}}.text-status-danger-text\/90{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/90{color:color-mix(in oklab,var(--status-danger-text) 90%,transparent)}}.text-status-success-text{color:var(--status-success-text)}.text-status-warning-text{color:var(--status-warning-text)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-ink-faint::placeholder{color:var(--app-text-faint)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_9999px_rgba\(0\,0\,0\,0\.45\)\]{--tw-shadow:0 0 0 9999px var(--tw-shadow-color,#00000073);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_6px_rgb\(0_0_0\/0\.35\)\]{--tw-shadow:0 2px 6px var(--tw-shadow-color,#00000059);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.12\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_8px_24px_-6px_rgb\(16_185_129\/0\.55\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 8px 24px -6px var(--tw-shadow-color,#10b9818c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-app{--tw-ring-color:var(--app-bg)}.ring-chip-indigo-border\/40{--tw-ring-color:var(--chip-indigo-border)}@supports (color:color-mix(in lab,red,red)){.ring-chip-indigo-border\/40{--tw-ring-color:color-mix(in oklab, var(--chip-indigo-border) 40%, transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[filter\,box-shadow\,transform\]{transition-property:filter,box-shadow,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-40:is(:where(.group):hover *){opacity:.4}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.selection\:bg-indigo-500 ::selection{background-color:var(--color-indigo-500)}.selection\:bg-indigo-500::selection{background-color:var(--color-indigo-500)}.selection\:text-white ::selection{color:var(--color-white)}.selection\:text-white::selection{color:var(--color-white)}.placeholder\:text-ink-faint::placeholder{color:var(--app-text-faint)}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.hover\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-chip-indigo-border:hover{border-color:var(--chip-indigo-border)}.hover\:border-indigo-400:hover{border-color:var(--color-indigo-400)}.hover\:border-indigo-500:hover{border-color:var(--color-indigo-500)}.hover\:border-status-warning-border:hover{border-color:var(--status-warning-border)}.hover\:bg-chip-indigo-bg\/40:hover{background-color:var(--chip-indigo-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-chip-indigo-bg\/40:hover{background-color:color-mix(in oklab,var(--chip-indigo-bg) 40%,transparent)}}.hover\:bg-elevated:hover,.hover\:bg-elevated\/50:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/50:hover{background-color:color-mix(in oklab,var(--app-elevated) 50%,transparent)}}.hover\:bg-elevated\/60:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/60:hover{background-color:color-mix(in oklab,var(--app-elevated) 60%,transparent)}}.hover\:bg-elevated\/70:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/70:hover{background-color:color-mix(in oklab,var(--app-elevated) 70%,transparent)}}.hover\:bg-elevated\/80:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/80:hover{background-color:color-mix(in oklab,var(--app-elevated) 80%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-hover-surface:hover{background-color:var(--app-hover)}.hover\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\:bg-indigo-600:hover{background-color:var(--color-indigo-600)}.hover\:bg-status-danger-bg:hover,.hover\:bg-status-danger-bg\/60:hover{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-status-danger-bg\/60:hover{background-color:color-mix(in oklab,var(--status-danger-bg) 60%,transparent)}}.hover\:bg-status-warning-bg:hover,.hover\:bg-status-warning-bg\/40:hover{background-color:var(--status-warning-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-status-warning-bg\/40:hover{background-color:color-mix(in oklab,var(--status-warning-bg) 40%,transparent)}}.hover\:bg-surface:hover{background-color:var(--app-surface)}.hover\:bg-surface-strong:hover{background-color:var(--app-glass-strong)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:text-chip-indigo-text:hover{color:var(--chip-indigo-text)}.hover\:text-ink:hover{color:var(--app-text-primary)}.hover\:text-status-danger-text:hover{color:var(--status-danger-text)}.hover\:text-status-warning-text:hover{color:var(--status-warning-text)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-40:hover{opacity:.4}.hover\:shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_12px_30px_-6px_rgb\(16_185_129\/0\.7\)\]:hover{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 12px 30px -6px var(--tw-shadow-color,#10b981b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-indigo-400:focus-visible{border-color:var(--color-indigo-400)}.focus-visible\:border-indigo-500:focus-visible{border-color:var(--color-indigo-500)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-emerald-400:focus-visible{--tw-ring-color:var(--color-emerald-400)}.focus-visible\:ring-indigo-400:focus-visible{--tw-ring-color:var(--color-indigo-400)}.focus-visible\:ring-indigo-500:focus-visible{--tw-ring-color:var(--color-indigo-500)}.focus-visible\:ring-indigo-500\/30:focus-visible{--tw-ring-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-indigo-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.focus-visible\:ring-status-danger-border:focus-visible{--tw-ring-color:var(--status-danger-border)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-app:focus-visible{--tw-ring-offset-color:var(--app-bg)}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-indigo-500:focus-visible{outline-color:var(--color-indigo-500)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover){.disabled\:hover\:translate-y-0:disabled:hover{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:hover\:text-ink-muted:disabled:hover{color:var(--app-text-muted)}.disabled\:hover\:shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_8px_24px_-6px_rgb\(16_185_129\/0\.55\)\]:disabled:hover{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 8px 24px -6px var(--tw-shadow-color,#10b9818c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\:hover\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:rounded-2xl{border-radius:var(--radius-2xl)}.sm\:rounded-xl{border-radius:var(--radius-xl)}.sm\:p-1\.5{padding:calc(var(--spacing) * 1.5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}}@media(min-width:64rem){.lg\:flex{display:flex}}.\[\&_code\]\:bg-transparent code{background-color:#0000}.\[\&_code\]\:px-0 code{padding-inline:0}.\[\&_code\]\:py-0 code{padding-block:0}.\[\&_code\]\:text-inherit code{color:inherit}.animate-modal-in{animation:.15s cubic-bezier(.2,.8,.2,1) modal-in}.animate-overlay-in{animation:.15s ease-out overlay-in}.animate-toast-in{animation:.12s ease-out toast-in}}:root{color-scheme:light dark;--z-combobox-list:60;--z-syntax-helper:65;--z-context-menu:70;--z-modal:80;--z-drop-overlay:85;--z-toast:90;--z-tooltip:100}:root,[data-theme=dark]{--app-bg:#020617;--app-surface:#0f172a;--app-elevated:#1e293b;--app-hover:#334155;--app-border:#334155;--app-frame-border:#94a3b84d;--app-text-primary:#f8fafc;--app-text-secondary:#cbd5e1;--app-text-muted:#94a3b8;--app-text-faint:#94a3b8;--app-glass:#0f172a99;--app-glass-strong:#020617e6;--app-glass-panel:#0f172ac7;--app-glass-panel-strong:#020617e0;--app-glass-highlight:#ffffff17;--app-panel-shadow:0 24px 60px -12px #0206178c;color-scheme:dark;--chip-indigo-bg:#6366f140;--chip-indigo-border:#818cf880;--chip-indigo-text:#c7d2fe;--chip-purple-bg:#a855f740;--chip-purple-border:#c084fc80;--chip-purple-text:#f3e8ff;--chip-fuchsia-bg:#c026d340;--chip-fuchsia-border:#e879f980;--chip-fuchsia-text:#f5d0fe;--chip-sky-bg:#0ea5e940;--chip-sky-border:#38bdf880;--chip-sky-text:#bae6fd;--chip-amber-bg:#f59e0b40;--chip-amber-border:#fbbf2480;--chip-amber-text:#fde68a;--status-success-bg:#10b98140;--status-success-border:#34d39980;--status-success-text:#a7f3d0;--status-warning-bg:#f59e0b40;--status-warning-border:#fbbf2480;--status-warning-text:#fde68a;--status-danger-bg:#f43f5e40;--status-danger-border:#fb718580;--status-danger-text:#fecdd3}[data-theme=light]{--chip-indigo-bg:#e0e7ff;--chip-indigo-border:#a5b4fc;--chip-indigo-text:#3730a3;--chip-purple-bg:#f3e8ff;--chip-purple-border:#d8b4fe;--chip-purple-text:#6b21a8;--chip-fuchsia-bg:#fae8ff;--chip-fuchsia-border:#f0abfc;--chip-fuchsia-text:#86198f;--chip-sky-bg:#e0f2fe;--chip-sky-border:#7dd3fc;--chip-sky-text:#0369a1;--chip-amber-bg:#fef3c7;--chip-amber-border:#fcd34d;--chip-amber-text:#92400e;--status-success-bg:#d1fae5;--status-success-border:#6ee7b7;--status-success-text:#065f46;--status-warning-bg:#fef3c7;--status-warning-border:#fcd34d;--status-warning-text:#92400e;--status-danger-bg:#ffe4e6;--status-danger-border:#fda4af;--status-danger-text:#9f1239;--app-bg:#f8fafc;--app-surface:#fff;--app-elevated:#f1f5f9;--app-hover:#e2e8f0;--app-border:#cbd5e1;--app-frame-border:#0f172a29;--app-text-primary:#0f172a;--app-text-secondary:#334155;--app-text-muted:#475569;--app-text-faint:#475569;--app-glass:#ffffffb3;--app-glass-strong:#f8fafcf2;--app-glass-panel:#fffc;--app-glass-panel-strong:#f8fafceb;--app-glass-highlight:#ffffffe6;--app-panel-shadow:0 24px 60px -18px #0f172a47;color-scheme:light}body{background-color:var(--app-bg);min-height:100vh;color:var(--app-text-primary);margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;transition:background-color .2s,color .2s}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@keyframes modal-in{0%{opacity:0;transform:translateY(4px)scale(.995)}to{opacity:1;transform:none}}@keyframes overlay-in{0%{opacity:0}to{opacity:1}}@keyframes toast-in{0%{opacity:0;translate:-50% calc(6px - 50%)}to{opacity:1;translate:-50% -50%}}*{scrollbar-color:var(--app-border) transparent;scrollbar-width:thin}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--app-border);background-clip:content-box;border:2px solid #0000;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--app-text-faint)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-900:oklch(20.8% .042 265.755);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.glass-panel{background:var(--app-glass-panel);-webkit-backdrop-filter:blur(24px)saturate(160%);backdrop-filter:blur(24px)saturate(160%);box-shadow:var(--app-panel-shadow),inset 0 1px 0 var(--app-glass-highlight)}.glass-panel-strong{background:var(--app-glass-panel-strong);-webkit-backdrop-filter:blur(28px)saturate(180%);backdrop-filter:blur(28px)saturate(180%);box-shadow:var(--app-panel-shadow),inset 0 1px 0 var(--app-glass-highlight)}.btn{justify-content:center;align-items:center;gap:calc(var(--spacing) * 1.5);border-radius:var(--radius-md);border-style:var(--tw-border-style);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-width:1px;display:inline-flex}.btn:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.btn:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.btn:focus-visible{--tw-outline-style:none;outline-style:none}.btn:disabled{cursor:not-allowed;opacity:.4}.btn-primary{background-color:var(--color-indigo-600);color:var(--color-white);border-color:#0000}@media(hover:hover){.btn-primary:hover{background-color:var(--color-indigo-500)}}.btn-secondary{border-color:var(--app-border);background-color:var(--app-elevated);color:var(--app-text-secondary)}@media(hover:hover){.btn-secondary:hover{border-color:var(--color-indigo-500);color:var(--app-text-primary)}.btn-chip:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.btn-chip:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.btn-chip:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.btn-chip:focus-visible{--tw-outline-style:none;outline-style:none}.btn-chip:disabled{cursor:not-allowed;opacity:.4}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.focus-ring:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.focus-ring:focus-visible{--tw-outline-style:none;outline-style:none}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.-right-1{right:calc(var(--spacing) * -1)}.right-0{right:0}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-2{bottom:calc(var(--spacing) * 2)}.-left-1{left:calc(var(--spacing) * -1)}.left-0{left:0}.left-1\/2{left:50%}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\[calc\(var\(--z-context-menu\)-1\)\]{z-index:calc(var(--z-context-menu) - 1)}.z-\[var\(--z-combobox-list\)\]{z-index:var(--z-combobox-list)}.z-\[var\(--z-context-menu\)\]{z-index:var(--z-context-menu)}.z-\[var\(--z-drop-overlay\)\]{z-index:var(--z-drop-overlay)}.z-\[var\(--z-modal\)\]{z-index:var(--z-modal)}.z-\[var\(--z-syntax-helper\)\]{z-index:var(--z-syntax-helper)}.z-\[var\(--z-toast\)\]{z-index:var(--z-toast)}.z-\[var\(--z-tooltip\)\]{z-index:var(--z-tooltip)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-auto{margin-right:auto}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-video{aspect-ratio:var(--aspect-video)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-48{height:calc(var(--spacing) * 48)}.h-\[80vh\]{height:80vh}.h-\[min\(84dvh\,760px\)\]{height:min(84dvh,760px)}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100dvh-1\.5rem\)\]{max-height:calc(100dvh - 1.5rem)}.max-h-\[calc\(100dvh-16px\)\]{max-height:calc(100dvh - 16px)}.min-h-0{min-height:0}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-36{min-height:calc(var(--spacing) * 36)}.min-h-\[24px\]{min-height:24px}.min-h-\[44px\]{min-height:44px}.min-h-screen{min-height:100vh}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[52px\]{width:52px}.w-\[138px\]{width:138px}.w-\[150px\]{width:150px}.w-\[400px\]{width:400px}.w-\[420px\]{width:420px}.w-\[450px\]{width:450px}.w-\[clamp\(560px\,85vw\,1500px\)\]{width:clamp(560px,85vw,1500px)}.w-\[min\(94vw\,960px\)\]{width:min(94vw,960px)}.w-full{width:100%}.w-max{width:max-content}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[calc\(100vw-16px\)\]{max-width:calc(100vw - 16px)}.max-w-\[min\(70vw\,560px\)\]{max-width:min(70vw,560px)}.max-w-\[min\(80vw\,640px\)\]{max-width:min(80vw,640px)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-\[100px\]{min-width:100px}.min-w-\[220px\]{min-width:220px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-64{flex-basis:calc(var(--spacing) * 64)}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-chip-amber-border{border-color:var(--chip-amber-border)}.border-chip-fuchsia-border{border-color:var(--chip-fuchsia-border)}.border-chip-indigo-border,.border-chip-indigo-border\/50{border-color:var(--chip-indigo-border)}@supports (color:color-mix(in lab,red,red)){.border-chip-indigo-border\/50{border-color:color-mix(in oklab,var(--chip-indigo-border) 50%,transparent)}}.border-chip-purple-border,.border-chip-purple-border\/50{border-color:var(--chip-purple-border)}@supports (color:color-mix(in lab,red,red)){.border-chip-purple-border\/50{border-color:color-mix(in oklab,var(--chip-purple-border) 50%,transparent)}}.border-chip-sky-border{border-color:var(--chip-sky-border)}.border-emerald-300\/50{border-color:#5ee9b580}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/50{border-color:color-mix(in oklab,var(--color-emerald-300) 50%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-frame-line{border-color:var(--app-frame-border)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-400\/80{border-color:#7d87ffcc}@supports (color:color-mix(in lab,red,red)){.border-indigo-400\/80{border-color:color-mix(in oklab,var(--color-indigo-400) 80%,transparent)}}.border-indigo-600{border-color:var(--color-indigo-600)}.border-line,.border-line\/40{border-color:var(--app-border)}@supports (color:color-mix(in lab,red,red)){.border-line\/40{border-color:color-mix(in oklab,var(--app-border) 40%,transparent)}}.border-line\/60{border-color:var(--app-border)}@supports (color:color-mix(in lab,red,red)){.border-line\/60{border-color:color-mix(in oklab,var(--app-border) 60%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-status-danger-border{border-color:var(--status-danger-border)}.border-status-success-border{border-color:var(--status-success-border)}.border-status-warning-border{border-color:var(--status-warning-border)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-app,.bg-app\/90{background-color:var(--app-bg)}@supports (color:color-mix(in lab,red,red)){.bg-app\/90{background-color:color-mix(in oklab,var(--app-bg) 90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/65{background-color:#000000a6}@supports (color:color-mix(in lab,red,red)){.bg-black\/65{background-color:color-mix(in oklab,var(--color-black) 65%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-chip-amber-bg{background-color:var(--chip-amber-bg)}.bg-chip-fuchsia-bg{background-color:var(--chip-fuchsia-bg)}.bg-chip-indigo-bg,.bg-chip-indigo-bg\/20{background-color:var(--chip-indigo-bg)}@supports (color:color-mix(in lab,red,red)){.bg-chip-indigo-bg\/20{background-color:color-mix(in oklab,var(--chip-indigo-bg) 20%,transparent)}}.bg-chip-purple-bg{background-color:var(--chip-purple-bg)}.bg-chip-sky-bg{background-color:var(--chip-sky-bg)}.bg-elevated,.bg-elevated\/30{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/30{background-color:color-mix(in oklab,var(--app-elevated) 30%,transparent)}}.bg-elevated\/50{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/50{background-color:color-mix(in oklab,var(--app-elevated) 50%,transparent)}}.bg-elevated\/60{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/60{background-color:color-mix(in oklab,var(--app-elevated) 60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-800\/60{background-color:#005f4699}@supports (color:color-mix(in lab,red,red)){.bg-emerald-800\/60{background-color:color-mix(in oklab,var(--color-emerald-800) 60%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-ink-faint{background-color:var(--app-text-faint)}.bg-slate-600\/20{background-color:#45556c33}@supports (color:color-mix(in lab,red,red)){.bg-slate-600\/20{background-color:color-mix(in oklab,var(--color-slate-600) 20%,transparent)}}.bg-status-danger-bg,.bg-status-danger-bg\/30{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.bg-status-danger-bg\/30{background-color:color-mix(in oklab,var(--status-danger-bg) 30%,transparent)}}.bg-status-danger-bg\/40{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.bg-status-danger-bg\/40{background-color:color-mix(in oklab,var(--status-danger-bg) 40%,transparent)}}.bg-status-success-bg{background-color:var(--status-success-bg)}.bg-status-warning-bg{background-color:var(--status-warning-bg)}.bg-surface{background-color:var(--app-surface)}.bg-surface-glass{background-color:var(--app-glass)}.bg-surface-strong,.bg-surface-strong\/20{background-color:var(--app-glass-strong)}@supports (color:color-mix(in lab,red,red)){.bg-surface-strong\/20{background-color:color-mix(in oklab,var(--app-glass-strong) 20%,transparent)}}.bg-surface-strong\/30{background-color:var(--app-glass-strong)}@supports (color:color-mix(in lab,red,red)){.bg-surface-strong\/30{background-color:color-mix(in oklab,var(--app-glass-strong) 30%,transparent)}}.bg-surface\/50{background-color:var(--app-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/50{background-color:color-mix(in oklab,var(--app-surface) 50%,transparent)}}.bg-surface\/60{background-color:var(--app-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/60{background-color:color-mix(in oklab,var(--app-surface) 60%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-chip-indigo-bg{--tw-gradient-from:var(--chip-indigo-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-400\/90{--tw-gradient-from:#00d294e6}@supports (color:color-mix(in lab,red,red)){.from-emerald-400\/90{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-400) 90%, transparent)}}.from-emerald-400\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-chip-purple-bg{--tw-gradient-to:var(--chip-purple-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600\/90{--tw-gradient-to:#009767e6}@supports (color:color-mix(in lab,red,red)){.to-emerald-600\/90{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-600) 90%, transparent)}}.to-emerald-600\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.align-\[1px\]{vertical-align:1px}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-chip-amber-text{color:var(--chip-amber-text)}.text-chip-fuchsia-text{color:var(--chip-fuchsia-text)}.text-chip-indigo-text{color:var(--chip-indigo-text)}.text-chip-purple-text{color:var(--chip-purple-text)}.text-chip-sky-text{color:var(--chip-sky-text)}.text-emerald-200{color:var(--color-emerald-200)}.text-ink{color:var(--app-text-primary)}.text-ink-faint{color:var(--app-text-faint)}.text-ink-muted,.text-ink-muted\/50{color:var(--app-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-ink-muted\/50{color:color-mix(in oklab,var(--app-text-muted) 50%,transparent)}}.text-ink-secondary{color:var(--app-text-secondary)}.text-ink\/70{color:var(--app-text-primary)}@supports (color:color-mix(in lab,red,red)){.text-ink\/70{color:color-mix(in oklab,var(--app-text-primary) 70%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-900{color:var(--color-slate-900)}.text-status-danger-text,.text-status-danger-text\/60{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/60{color:color-mix(in oklab,var(--status-danger-text) 60%,transparent)}}.text-status-danger-text\/70{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/70{color:color-mix(in oklab,var(--status-danger-text) 70%,transparent)}}.text-status-danger-text\/80{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/80{color:color-mix(in oklab,var(--status-danger-text) 80%,transparent)}}.text-status-danger-text\/90{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/90{color:color-mix(in oklab,var(--status-danger-text) 90%,transparent)}}.text-status-success-text{color:var(--status-success-text)}.text-status-warning-text{color:var(--status-warning-text)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-ink-faint::placeholder{color:var(--app-text-faint)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_9999px_rgba\(0\,0\,0\,0\.45\)\]{--tw-shadow:0 0 0 9999px var(--tw-shadow-color,#00000073);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_6px_rgb\(0_0_0\/0\.35\)\]{--tw-shadow:0 2px 6px var(--tw-shadow-color,#00000059);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.12\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_8px_24px_-6px_rgb\(16_185_129\/0\.55\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 8px 24px -6px var(--tw-shadow-color,#10b9818c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-app{--tw-ring-color:var(--app-bg)}.ring-chip-indigo-border\/40{--tw-ring-color:var(--chip-indigo-border)}@supports (color:color-mix(in lab,red,red)){.ring-chip-indigo-border\/40{--tw-ring-color:color-mix(in oklab, var(--chip-indigo-border) 40%, transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[filter\,box-shadow\,transform\]{transition-property:filter,box-shadow,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-40:is(:where(.group):hover *){opacity:.4}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.selection\:bg-indigo-500 ::selection{background-color:var(--color-indigo-500)}.selection\:bg-indigo-500::selection{background-color:var(--color-indigo-500)}.selection\:text-white ::selection{color:var(--color-white)}.selection\:text-white::selection{color:var(--color-white)}.placeholder\:text-ink-faint::placeholder{color:var(--app-text-faint)}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.hover\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-chip-indigo-border:hover{border-color:var(--chip-indigo-border)}.hover\:border-indigo-400:hover{border-color:var(--color-indigo-400)}.hover\:border-indigo-500:hover{border-color:var(--color-indigo-500)}.hover\:border-status-warning-border:hover{border-color:var(--status-warning-border)}.hover\:bg-chip-indigo-bg\/40:hover{background-color:var(--chip-indigo-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-chip-indigo-bg\/40:hover{background-color:color-mix(in oklab,var(--chip-indigo-bg) 40%,transparent)}}.hover\:bg-elevated:hover,.hover\:bg-elevated\/50:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/50:hover{background-color:color-mix(in oklab,var(--app-elevated) 50%,transparent)}}.hover\:bg-elevated\/60:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/60:hover{background-color:color-mix(in oklab,var(--app-elevated) 60%,transparent)}}.hover\:bg-elevated\/70:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/70:hover{background-color:color-mix(in oklab,var(--app-elevated) 70%,transparent)}}.hover\:bg-elevated\/80:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/80:hover{background-color:color-mix(in oklab,var(--app-elevated) 80%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-hover-surface:hover{background-color:var(--app-hover)}.hover\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\:bg-indigo-600:hover{background-color:var(--color-indigo-600)}.hover\:bg-status-danger-bg:hover,.hover\:bg-status-danger-bg\/60:hover{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-status-danger-bg\/60:hover{background-color:color-mix(in oklab,var(--status-danger-bg) 60%,transparent)}}.hover\:bg-status-warning-bg:hover,.hover\:bg-status-warning-bg\/40:hover{background-color:var(--status-warning-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-status-warning-bg\/40:hover{background-color:color-mix(in oklab,var(--status-warning-bg) 40%,transparent)}}.hover\:bg-surface:hover{background-color:var(--app-surface)}.hover\:bg-surface-strong:hover{background-color:var(--app-glass-strong)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:text-chip-indigo-text:hover{color:var(--chip-indigo-text)}.hover\:text-ink:hover{color:var(--app-text-primary)}.hover\:text-status-danger-text:hover{color:var(--status-danger-text)}.hover\:text-status-warning-text:hover{color:var(--status-warning-text)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-40:hover{opacity:.4}.hover\:shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_12px_30px_-6px_rgb\(16_185_129\/0\.7\)\]:hover{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 12px 30px -6px var(--tw-shadow-color,#10b981b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-indigo-400:focus-visible{border-color:var(--color-indigo-400)}.focus-visible\:border-indigo-500:focus-visible{border-color:var(--color-indigo-500)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-emerald-400:focus-visible{--tw-ring-color:var(--color-emerald-400)}.focus-visible\:ring-indigo-400:focus-visible{--tw-ring-color:var(--color-indigo-400)}.focus-visible\:ring-indigo-500:focus-visible{--tw-ring-color:var(--color-indigo-500)}.focus-visible\:ring-indigo-500\/30:focus-visible{--tw-ring-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-indigo-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.focus-visible\:ring-status-danger-border:focus-visible{--tw-ring-color:var(--status-danger-border)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-app:focus-visible{--tw-ring-offset-color:var(--app-bg)}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-indigo-500:focus-visible{outline-color:var(--color-indigo-500)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover){.disabled\:hover\:translate-y-0:disabled:hover{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:hover\:text-ink-muted:disabled:hover{color:var(--app-text-muted)}.disabled\:hover\:shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_8px_24px_-6px_rgb\(16_185_129\/0\.55\)\]:disabled:hover{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 8px 24px -6px var(--tw-shadow-color,#10b9818c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\:hover\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:rounded-2xl{border-radius:var(--radius-2xl)}.sm\:rounded-xl{border-radius:var(--radius-xl)}.sm\:p-1\.5{padding:calc(var(--spacing) * 1.5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}}@media(min-width:64rem){.lg\:flex{display:flex}}.\[\&_code\]\:bg-transparent code{background-color:#0000}.\[\&_code\]\:px-0 code{padding-inline:0}.\[\&_code\]\:py-0 code{padding-block:0}.\[\&_code\]\:text-inherit code{color:inherit}.animate-modal-in{animation:.15s cubic-bezier(.2,.8,.2,1) modal-in}.animate-overlay-in{animation:.15s ease-out overlay-in}.animate-toast-in{animation:.12s ease-out toast-in}}:where(button,[role=button],input,select,textarea,a,summary,video[tabindex],[tabindex]):focus-visible{outline:2px solid var(--color-indigo-500,#6366f1);outline-offset:2px}:root{color-scheme:light dark;--z-combobox-list:60;--z-syntax-helper:65;--z-context-menu:70;--z-modal:80;--z-drop-overlay:85;--z-toast:90;--z-tooltip:100}:root,[data-theme=dark]{--app-bg:#020617;--app-surface:#0f172a;--app-elevated:#1e293b;--app-hover:#334155;--app-border:#334155;--app-frame-border:#94a3b84d;--app-text-primary:#f8fafc;--app-text-secondary:#cbd5e1;--app-text-muted:#94a3b8;--app-text-faint:#94a3b8;--app-glass:#0f172a99;--app-glass-strong:#020617e6;--app-glass-panel:#0f172ac7;--app-glass-panel-strong:#020617e0;--app-glass-highlight:#ffffff17;--app-panel-shadow:0 24px 60px -12px #0206178c;color-scheme:dark;--chip-indigo-bg:#6366f140;--chip-indigo-border:#818cf880;--chip-indigo-text:#c7d2fe;--chip-purple-bg:#a855f740;--chip-purple-border:#c084fc80;--chip-purple-text:#f3e8ff;--chip-fuchsia-bg:#c026d340;--chip-fuchsia-border:#e879f980;--chip-fuchsia-text:#f5d0fe;--chip-sky-bg:#0ea5e940;--chip-sky-border:#38bdf880;--chip-sky-text:#bae6fd;--chip-amber-bg:#f59e0b40;--chip-amber-border:#fbbf2480;--chip-amber-text:#fde68a;--status-success-bg:#10b98140;--status-success-border:#34d39980;--status-success-text:#a7f3d0;--status-warning-bg:#f59e0b40;--status-warning-border:#fbbf2480;--status-warning-text:#fde68a;--status-danger-bg:#f43f5e40;--status-danger-border:#fb718580;--status-danger-text:#fecdd3}[data-theme=light]{--chip-indigo-bg:#e0e7ff;--chip-indigo-border:#a5b4fc;--chip-indigo-text:#3730a3;--chip-purple-bg:#f3e8ff;--chip-purple-border:#d8b4fe;--chip-purple-text:#6b21a8;--chip-fuchsia-bg:#fae8ff;--chip-fuchsia-border:#f0abfc;--chip-fuchsia-text:#86198f;--chip-sky-bg:#e0f2fe;--chip-sky-border:#7dd3fc;--chip-sky-text:#0369a1;--chip-amber-bg:#fef3c7;--chip-amber-border:#fcd34d;--chip-amber-text:#92400e;--status-success-bg:#d1fae5;--status-success-border:#6ee7b7;--status-success-text:#065f46;--status-warning-bg:#fef3c7;--status-warning-border:#fcd34d;--status-warning-text:#92400e;--status-danger-bg:#ffe4e6;--status-danger-border:#fda4af;--status-danger-text:#9f1239;--app-bg:#f8fafc;--app-surface:#fff;--app-elevated:#f1f5f9;--app-hover:#e2e8f0;--app-border:#cbd5e1;--app-frame-border:#0f172a29;--app-text-primary:#0f172a;--app-text-secondary:#334155;--app-text-muted:#475569;--app-text-faint:#475569;--app-glass:#ffffffb3;--app-glass-strong:#f8fafcf2;--app-glass-panel:#fffc;--app-glass-panel-strong:#f8fafceb;--app-glass-highlight:#ffffffe6;--app-panel-shadow:0 24px 60px -18px #0f172a47;color-scheme:light}body{background-color:var(--app-bg);min-height:100vh;color:var(--app-text-primary);margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;transition:background-color .2s,color .2s}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@keyframes modal-in{0%{opacity:0;transform:translateY(4px)scale(.995)}to{opacity:1;transform:none}}@keyframes overlay-in{0%{opacity:0}to{opacity:1}}@keyframes toast-in{0%{opacity:0;translate:-50% calc(6px - 50%)}to{opacity:1;translate:-50% -50%}}*{scrollbar-color:var(--app-border) transparent;scrollbar-width:thin}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--app-border);background-clip:content-box;border:2px solid #0000;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--app-text-faint)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/src/profiles/web/dist/index.html b/src/profiles/web/dist/index.html index 22a3afc..26da138 100644 --- a/src/profiles/web/dist/index.html +++ b/src/profiles/web/dist/index.html @@ -5,8 +5,8 @@ ProFiles - - + +
diff --git a/src/profiles/web/dist/sw.js b/src/profiles/web/dist/sw.js index 59f86b5..c0fd788 100644 --- a/src/profiles/web/dist/sw.js +++ b/src/profiles/web/dist/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,t)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let o={};const l=e=>i(e,r),d={module:{uri:r},exports:o,require:l};s[r]=Promise.all(n.map(e=>d[e]||l(e))).then(e=>(t(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"3e773be502b9c76b4119cb66779582b5"},{url:"assets/index-CYtEXweO.css",revision:null},{url:"assets/index-B4j21U4k.js",revision:null},{url:"manifest.webmanifest",revision:"5a42ebe8b55b07b5831cbbddda834829"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); +if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()}).then(()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(i[t])return;let o={};const l=e=>s(e,t),c={module:{uri:t},exports:o,require:l};i[t]=Promise.all(n.map(e=>c[e]||l(e))).then(e=>(r(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"3cd75bc1a240d63a2c86c9f36eb45ee5"},{url:"assets/index-CcQFM_iR.css",revision:null},{url:"assets/index-BRlfnag_.js",revision:null},{url:"manifest.webmanifest",revision:"5a42ebe8b55b07b5831cbbddda834829"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); diff --git a/src/profiles/web/src/index.css b/src/profiles/web/src/index.css index 985418c..47ef9b5 100644 --- a/src/profiles/web/src/index.css +++ b/src/profiles/web/src/index.css @@ -1,5 +1,17 @@ @import "tailwindcss"; +/* Baseline keyboard focus indicator: every interactive element shows a + visible outline on keyboard focus, even raw buttons that carry no + explicit focus utilities (WCAG 2.4.7). :where() keeps specificity at + zero, so elements that already handle focus locally — the .btn / + .focus-ring / focus-visible:ring utilities, which set + focus-visible:outline-none — keep their ring and suppress this one. + Outline follows border radius in modern browsers. */ +:where(button, [role="button"], input, select, textarea, a, summary, video[tabindex], [tabindex]):focus-visible { + outline: 2px solid var(--color-indigo-500, #6366f1); + outline-offset: 2px; +} + :root { color-scheme: dark light; }