cli-link 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -5
- package/bin/agentpilot.js +3 -2
- package/dist/client/assets/{History-DR_K6WbO.js → History-BxJVDFpN.js} +1 -1
- package/dist/client/assets/{MarkdownRenderer-D9IwexPM.js → MarkdownRenderer-BO-KS_L1.js} +1 -1
- package/dist/client/assets/{PageTopBar-SnTIrSb5.js → PageTopBar-C8j-5s_3.js} +1 -1
- package/dist/client/assets/{Session-EFYFIC_X.js → Session-CQFXA2Sr.js} +1 -1
- package/dist/client/assets/{Settings-DgmHC_Hw.js → Settings-DYmjRmoN.js} +1 -1
- package/dist/client/assets/Workspace-D8kv9euM.js +8 -0
- package/dist/client/assets/{WorkspaceLinkedText-D6hNg0T9.js → WorkspaceLinkedText-DQyPLk-X.js} +2 -2
- package/dist/client/assets/index-BXT2BylN.css +1 -0
- package/dist/client/assets/index-DOgH1Kf3.js +2 -0
- package/dist/client/assets/{vendor-icons-S_ObYVVf.js → vendor-icons-CNN4EKVi.js} +1 -1
- package/dist/client/index.html +4 -4
- package/dist/client/manifest.webmanifest +1 -1
- package/dist/server/index.js +190 -3
- package/package.json +1 -1
- package/dist/client/assets/Workspace-CJvVQVzU.js +0 -8
- package/dist/client/assets/index-Bk4_acsd.css +0 -1
- package/dist/client/assets/index-C89UCwGk.js +0 -2
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e,R as O,h as nt}from"./vendor-react-DSV5aFEg.js";import{c as p,u as lt,a as j}from"./index-C89UCwGk.js";import{c as it}from"./code-highlight-CEcsuMpw.js";import{M as ct,r as ot}from"./vendor-markdown-BDwu-Ux6.js";import{P as dt}from"./PageTopBar-SnTIrSb5.js";import{a as xt,G as _,R as mt,g as ne,k,L as E,f as gt,F as Ee,t as Ie,u as de,v as ht,w as ut,X as pt,h as Be,x as ft,y as bt,z as $e,D as yt,E as kt,I as jt,J as wt,K as Ae,N as Nt,O as vt,Q as Ct,U as St,V as Ft,W as Lt,Y as Pt,Z as Et}from"./vendor-icons-S_ObYVVf.js";import{A as le,m as We}from"./vendor-motion-n6Lx6G4a.js";const It=[[ot,it]];function $t(t){var a;const s=((a=t.match(/~{3,}/g))==null?void 0:a.reduce((c,n)=>Math.max(c,n.length),2))??2;return"~".repeat(s+1)}function At(t){return t.replace(/[^\w#+.-]/g,"")}function Wt(t,s){const a=$t(t),c=At(s),n=t.endsWith(`
|
|
2
|
-
`)?"":`
|
|
3
|
-
`;return`${a}${c?` ${c}`:""}
|
|
4
|
-
${t}${n}${a}`}function Rt(t,s){return t==null||typeof t=="boolean"?[[]]:typeof t=="string"||typeof t=="number"?String(t).split(`
|
|
5
|
-
`).map(a=>a?[a]:[]):Array.isArray(t)?xe(t,s):O.isValidElement(t)?xe(t.props.children,s).map((c,n)=>c.length>0?[O.cloneElement(t,{key:`${s}-${n}`},c)]:[]):[[t]]}function xe(t,s="code"){const a=[[]];return O.Children.forEach(t,(c,n)=>{Rt(c,`${s}-${n}`).forEach((d,l)=>{l===0?a[a.length-1].push(...d):a.push([...d])})}),a}function Mt(t,s){const a=[...t];for(;a.length>s&&a[a.length-1].length===0;)a.pop();for(;a.length<s;)a.push([]);return a}function zt({children:t,className:s,expectedLineCount:a,lineNumberWidth:c,targetLine:n,targetLineRef:x}){const d=i.useMemo(()=>Mt(xe(t),a),[t,a]);return e.jsx("div",{className:"min-w-max py-3 font-mono text-[12px] leading-5",children:d.map((l,m)=>{const h=m+1,y=n===h;return e.jsxs("div",{ref:y?x:void 0,className:p("grid min-w-max",y?"bg-primary-50 text-primary-950 dark:bg-primary-950/45 dark:text-primary-100":"text-gray-800 dark:text-gray-200"),style:{gridTemplateColumns:`${c}ch minmax(0, 1fr)`},children:[e.jsx("div",{className:p("select-none border-r px-2 text-right text-[11px]",y?"border-primary-200 text-primary-600 dark:border-primary-800 dark:text-primary-300":"border-gray-100 text-gray-400 dark:border-gray-800 dark:text-gray-600"),children:h}),e.jsx("code",{className:p("whitespace-pre px-3 font-mono tabular-nums",s),children:l.length>0?l:" "})]},h)})})}function Bt({content:t,language:s,lineNumberWidth:a,targetLine:c,targetLineRef:n}){const x=i.useMemo(()=>t.split(`
|
|
6
|
-
`).length,[t]),d=i.useMemo(()=>Wt(t,s),[t,s]),l=i.useMemo(()=>({pre({children:m}){return e.jsx(e.Fragment,{children:m})},code({children:m,className:h}){return e.jsx(zt,{className:h,expectedLineCount:x,lineNumberWidth:a,targetLine:c,targetLineRef:n,children:m})}}),[x,a,c,n]);return e.jsx(ct,{rehypePlugins:It,components:l,children:d})}const Dt={".bash":"bash",".c":"c",".cc":"cpp",".conf":"ini",".cpp":"cpp",".cs":"csharp",".css":"css",".dart":"dart",".diff":"diff",".dockerfile":"dockerfile",".go":"go",".graphql":"graphql",".groovy":"groovy",".h":"cpp",".hpp":"cpp",".html":"html",".ini":"ini",".java":"java",".js":"javascript",".json":"json",".jsx":"jsx",".kt":"kotlin",".less":"less",".lua":"lua",".md":"markdown",".mjs":"javascript",".php":"php",".plist":"xml",".properties":"ini",".py":"python",".rb":"ruby",".rs":"rust",".scss":"scss",".sh":"bash",".sql":"sql",".svelte":"xml",".swift":"swift",".toml":"ini",".ts":"typescript",".tsx":"tsx",".vue":"xml",".xml":"xml",".yaml":"yaml",".yml":"yaml",".zsh":"bash"},Re={dockerfile:"dockerfile",makefile:"makefile","package.json":"json","pnpm-lock.yaml":"yaml","tsconfig.json":"json",vite:"typescript"};function me(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}function A(t){const s=t.split("/").filter(Boolean);return s[s.length-1]||t||"工作目录"}function ie(t){return t?t.replace(/^\/Users\/[^/]+/,"~"):"未选择工作目录"}function Me(t){return t||"."}function De(t){const s=[];for(const a of t.replace(/\\/g,"/").replace(/^\/+/,"").split("/"))if(!(!a||a===".")){if(a===".."){if(s.length===0)return"";s.pop();continue}s.push(a)}return s.join("/")}function Tt(t){const s=De(t),a=s.lastIndexOf("/");return a>0?s.slice(0,a):""}function Gt(t){if(!t)return null;const s=Number(t);return Number.isSafeInteger(s)&&s>0?s:null}function Te(t){const s=A(t).toLowerCase(),a=s.lastIndexOf(".");return a>0?s.slice(a):""}function Ut(t){const s=A(t).toLowerCase();return Re[s]?Re[s]:s.startsWith("dockerfile")?"dockerfile":s.endsWith("rc")||s.startsWith(".env")?"ini":Dt[Te(t)]||""}function ge(t){const s=A(t).toLowerCase(),a=Te(t);return s==="package.json"||s.endsWith("lock.json")||s==="pnpm-lock.yaml"?{Icon:bt,className:"text-orange-500 dark:text-orange-400",label:"包配置"}:s.startsWith("dockerfile")?{Icon:$e,className:"text-blue-600 dark:text-blue-400",label:"Dockerfile"}:s==="makefile"||[".sh",".bash",".zsh"].includes(a)?{Icon:$e,className:"text-slate-700 dark:text-slate-300",label:"脚本"}:s.startsWith(".env")||[".ini",".conf",".toml",".properties",".plist"].includes(a)?{Icon:yt,className:"text-gray-600 dark:text-gray-400",label:"配置"}:[".json"].includes(a)?{Icon:kt,className:"text-yellow-600 dark:text-yellow-400",label:"JSON"}:[".ts",".tsx",".js",".jsx",".mjs",".vue",".svelte"].includes(a)?{Icon:jt,className:"text-sky-600 dark:text-sky-400",label:"前端代码"}:[".go",".rs",".py",".rb",".php",".java",".kt",".swift",".c",".cc",".cpp",".h",".hpp",".cs",".lua",".dart"].includes(a)?{Icon:wt,className:"text-primary-600 dark:text-primary-400",label:"代码"}:[".css",".scss",".less"].includes(a)?{Icon:Ae,className:"text-pink-600 dark:text-pink-400",label:"样式"}:[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".avif",".svg"].includes(a)?{Icon:Nt,className:"text-emerald-600 dark:text-emerald-400",label:a===".svg"?"SVG":"图片"}:[".html",".xml"].includes(a)?{Icon:vt,className:"text-orange-600 dark:text-orange-400",label:"标记"}:[".md",".mdx",".txt",".log",".rst"].includes(a)?{Icon:Ct,className:"text-gray-600 dark:text-gray-400",label:"文档"}:[".sql",".db",".sqlite"].includes(a)?{Icon:St,className:"text-indigo-600 dark:text-indigo-400",label:"数据"}:[".zip",".gz",".tar",".tgz",".rar",".7z"].includes(a)?{Icon:Ft,className:"text-amber-600 dark:text-amber-400",label:"压缩包"}:[".mp3",".wav",".ogg",".m4a"].includes(a)?{Icon:Lt,className:"text-purple-600 dark:text-purple-400",label:"音频"}:[".mp4",".mov",".avi",".webm"].includes(a)?{Icon:Pt,className:"text-purple-600 dark:text-purple-400",label:"视频"}:[".csv",".tsv",".xls",".xlsx"].includes(a)?{Icon:Et,className:"text-green-700 dark:text-green-400",label:"表格"}:[".yaml",".yml"].includes(a)?{Icon:Ae,className:"text-red-600 dark:text-red-400",label:"YAML"}:{Icon:Be,className:"text-gray-500 dark:text-gray-400",label:"文件"}}function Ht(t){return t.includes("D")?"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/50 border-red-100 dark:border-red-900":t.includes("A")||t==="??"?"text-green-700 dark:text-green-400 bg-green-50 dark:bg-green-950/50 border-green-100 dark:border-green-900":t.includes("R")||t.includes("C")?"text-blue-700 dark:text-blue-400 bg-blue-50 dark:bg-blue-950/50 border-blue-100 dark:border-blue-900":t.includes("U")?"text-orange-700 dark:text-orange-400 bg-orange-50 dark:bg-orange-950/50 border-orange-100 dark:border-orange-900":"text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-950/50 border-amber-100 dark:border-amber-900"}function ce(t){return t.status==="??"||t.worktreeStatus!==" "&&t.worktreeStatus!=="?"&&t.worktreeStatus!=="!"}function V(t){return t.indexStatus!==" "&&t.indexStatus!=="?"&&t.indexStatus!=="!"}function q(t){return t.replace(/^"|"$/g,"").replace(/^[ab]\//,"").replace(/^\/dev\/null$/,"/dev/null")}function Vt(t){const s=t.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?/);return s?{oldLine:Number(s[1]),newLine:Number(s[2])}:{oldLine:0,newLine:0}}function qt(t){const s=[];let a=null,c=null,n=0,x=0;const d=()=>(a||(a={oldPath:"",newPath:"",meta:[],hunks:[],additions:0,deletions:0},s.push(a)),a);for(const l of t.split(`
|
|
7
|
-
`)){if(l.startsWith("diff --git ")){const h=l.split(" ");a={oldPath:q(h[2]||""),newPath:q(h[3]||h[2]||""),meta:[],hunks:[],additions:0,deletions:0},s.push(a),c=null;continue}if(l.startsWith("--- ")&&!l.startsWith("--- 已")){d().oldPath=q(l.slice(4).trim());continue}if(l.startsWith("+++ ")){d().newPath=q(l.slice(4).trim());continue}if(l.startsWith("@@")){const h=d();c={header:l,lines:[]},h.hunks.push(c);const y=Vt(l);n=y.oldLine,x=y.newLine;continue}if(!c){l.trim()&&d().meta.push(l);continue}const m=d();l.startsWith("+")?(c.lines.push({kind:"add",newLine:x,content:l.slice(1)}),m.additions+=1,x+=1):l.startsWith("-")?(c.lines.push({kind:"delete",oldLine:n,content:l.slice(1)}),m.deletions+=1,n+=1):l.startsWith(" ")?(c.lines.push({kind:"context",oldLine:n,newLine:x,content:l.slice(1)}),n+=1,x+=1):l.startsWith("\\")?c.lines.push({kind:"note",content:l}):l.trim()&&c.lines.push({kind:"meta",content:l})}return s.filter(l=>l.hunks.length>0||l.meta.length>0)}const ze=({path:t,className:s="w-4 h-4 flex-shrink-0"})=>{const a=ge(t),c=a.Icon;return e.jsx(c,{className:p(s,a.className),"aria-label":a.label})},ra=()=>{const{cliConfig:t,connectionStatus:s}=lt(),[a,c]=nt(),[n,x]=i.useState("files"),[d,l]=i.useState(""),[m,h]=i.useState(null),[y,z]=i.useState(!1),[he,ue]=i.useState(""),[B,K]=i.useState(null),[Ge,Y]=i.useState(null),[f,J]=i.useState(null),[Ue,pe]=i.useState(!1),[fe,be]=i.useState(""),[g,He]=i.useState(null),[X,ye]=i.useState(!1),[ke,je]=i.useState(""),[we,I]=i.useState(""),[S,Q]=i.useState(null),[F,Z]=i.useState(null),[Ve,ee]=i.useState(!1),[te,D]=i.useState(""),[qe,Ne]=i.useState(!1),[_e,ve]=i.useState(!1),[Oe,w]=i.useState(""),[Ke,W]=i.useState(""),[b,T]=i.useState(null),[Ye,Ce]=i.useState(!1),[Se,Fe]=i.useState(""),[L,G]=i.useState(null),P=(t==null?void 0:t.workDir)||"",N=s==="connected",U=De(a.get("file")||""),Le=Gt(a.get("line")),Je=(f==null?void 0:f.name)||(B?A(B):""),Xe=b?A(b):"",ae=b?(g==null?void 0:g.files.find(r=>r.path===b))||(L==null?void 0:L.files.find(r=>r.path===b)):void 0,Qe=!!(g!=null&&g.files.some(ce)),Ze=!!(g!=null&&g.files.some(V)),R=(g==null?void 0:g.files.filter(V).length)||0;i.useEffect(()=>{l(""),K(null),Y(null),T(null),J(null),G(null),I(""),Q(null),Z(null),ee(!1),D(""),w(""),W("")},[P]);const se=i.useCallback(async(r=d)=>{z(!0),ue("");try{const o=await j.listWorkdir(r);h({workDir:o.workDir,path:o.path||"",parent:o.parent||"",isRoot:!!o.isRoot,dirs:o.dirs||[],files:o.files||[]}),l(o.path||"")}catch(o){ue(o instanceof Error?o.message:"加载失败")}finally{z(!1)}},[d]),v=i.useCallback(async()=>{ye(!0),je(""),I("");try{const r=await j.getWorkdirChanges();He({workDir:r.workDir,isGitRepo:!!r.isGitRepo,branch:r.branch||"",files:r.files||[],diff:r.diff||"",diffPath:r.diffPath,truncated:!!r.truncated})}catch(r){je(r instanceof Error?r.message:"加载失败")}finally{ye(!1)}},[]);i.useEffect(()=>{!N||n!=="files"||se(d)},[N,n,d,P,se]),i.useEffect(()=>{!N||n!=="changes"||v()},[N,n,P,v]);const re=i.useCallback(async(r,o=null)=>{K(r),Y(o),J(null),be(""),pe(!0);try{const C=await j.readWorkdirFile(r);J(C)}catch(C){be(C instanceof Error?C.message:"读取失败")}finally{pe(!1)}},[]);i.useEffect(()=>{!N||!U||(x("files"),T(null),G(null),l(Tt(U)),re(U,Le))},[N,Le,U,re,P]);const et=i.useCallback(()=>{if(K(null),Y(null),!a.has("file")&&!a.has("line"))return;const r=new URLSearchParams(a);r.delete("file"),r.delete("line"),c(r,{replace:!0})},[a,c]),M=i.useCallback(async r=>{T(r),G(null),Fe(""),Ce(!0);try{const o=await j.getWorkdirChanges(r);G({workDir:o.workDir,isGitRepo:!!o.isGitRepo,branch:o.branch||"",files:o.files||[],diff:o.diff||"",diffPath:o.diffPath,truncated:!!o.truncated})}catch(o){Fe(o instanceof Error?o.message:"读取失败")}finally{Ce(!1)}},[]),H=i.useCallback(async(r,o)=>{Q(`${o}:${r}`),I("");try{o==="stage"?await j.stageWorkdirChanges(r):await j.unstageWorkdirChanges(r),await v(),b===r&&await M(r)}catch(C){I(C instanceof Error?C.message:o==="stage"?"暂存失败":"取消暂存失败")}finally{Q(null)}},[v,M,b]),Pe=i.useCallback(async r=>{Z(r),I("");try{r==="stage"?await j.stageWorkdirChanges():await j.unstageWorkdirChanges(),await v(),b&&await M(b)}catch(o){I(o instanceof Error?o.message:r==="stage"?"暂存失败":"取消暂存失败")}finally{Z(null)}},[v,M,b]),tt=i.useCallback(()=>{ee(!0),w(""),W("")},[]),at=i.useCallback(async()=>{if(R===0){w("请先暂存要提交的文件");return}ve(!0),w(""),W("");try{const r=await j.generateWorkdirCommitMessage();D(r.message||"")}catch(r){w(r instanceof Error?r.message:"生成提交信息失败")}finally{ve(!1)}},[R]),st=i.useCallback(async()=>{const r=te.trim();if(!r){w("提交信息不能为空");return}if(R===0){w("请先暂存要提交的文件");return}Ne(!0),w(""),W("");try{const o=await j.commitWorkdirChanges(r);W(`已提交 ${o.commitHash}`),D(""),await v()}catch(o){w(o instanceof Error?o.message:"提交失败")}finally{Ne(!1)}},[te,v,R]),rt=i.useMemo(()=>{const r=d.split("/").filter(Boolean);return r.map((o,C)=>({label:o,path:r.slice(0,C+1).join("/")}))},[d]);return e.jsxs("div",{className:"flex flex-col h-full bg-gray-50 dark:bg-gray-950 relative",children:[e.jsx(dt,{title:A(P),meta:e.jsx("span",{className:"text-[10px] text-gray-500 dark:text-gray-400 font-mono truncate max-w-[220px]",title:ie(P),children:ie(P)}),actions:e.jsx("button",{onClick:()=>n==="files"?se(d):v(),disabled:!N||y||X,className:"w-9 h-9 rounded-full border border-gray-200 dark:border-gray-800 flex items-center justify-center text-gray-500 dark:text-gray-400 disabled:opacity-40 active:scale-95 transition-all",title:"刷新",children:e.jsx(mt,{className:p("w-4 h-4",(y||X)&&"animate-spin")})}),bottom:e.jsx("div",{className:"px-4 pb-3",children:e.jsxs("div",{className:"grid grid-cols-2 p-1 rounded-xl bg-gray-100 dark:bg-gray-800",children:[e.jsxs("button",{type:"button",onClick:()=>x("files"),className:p("h-9 rounded-lg flex items-center justify-center gap-2 text-sm font-medium transition-colors",n==="files"?"bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 shadow-sm":"text-gray-500 dark:text-gray-400"),children:[e.jsx(xt,{className:"w-4 h-4"}),"代码"]}),e.jsxs("button",{type:"button",onClick:()=>x("changes"),className:p("h-9 rounded-lg flex items-center justify-center gap-2 text-sm font-medium transition-colors",n==="changes"?"bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 shadow-sm":"text-gray-500 dark:text-gray-400"),children:[e.jsx(_,{className:"w-4 h-4"}),"变更"]})]})})}),n==="files"?e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"px-4 py-2 bg-white dark:bg-gray-900 border-b border-gray-100 dark:border-gray-800 overflow-x-auto hide-scrollbar flex items-center gap-1 text-xs",children:[e.jsx("button",{onClick:()=>l(""),className:p("px-2 py-1 rounded-md flex-shrink-0",d?"text-gray-500 dark:text-gray-400":"text-primary-600 bg-primary-50 dark:bg-primary-950"),children:"."}),rt.map(r=>e.jsxs(O.Fragment,{children:[e.jsx(ne,{className:"w-3 h-3 text-gray-300 flex-shrink-0"}),e.jsx("button",{onClick:()=>l(r.path),className:"px-2 py-1 rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 whitespace-nowrap",children:r.label})]},r.path))]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:N?y?e.jsx(u,{icon:e.jsx(E,{className:"w-5 h-5 animate-spin"}),title:"正在加载"}):he?e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:he,danger:!0}):m&&(m.dirs.length>0||m.files.length>0||!m.isRoot)?e.jsxs("div",{className:"py-2",children:[!m.isRoot&&e.jsxs("button",{onClick:()=>l(m.parent),className:"w-full px-4 py-3 flex items-center gap-3 text-left hover:bg-white dark:hover:bg-gray-900 transition-colors",children:[e.jsx(gt,{className:"w-4 h-4 text-gray-400"}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"返回上级"})]}),m.dirs.map(r=>e.jsxs("button",{onClick:()=>l(r.path),className:"w-full px-4 py-3 flex items-center gap-3 text-left hover:bg-white dark:hover:bg-gray-900 transition-colors",children:[e.jsx(Ee,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),e.jsx("span",{className:"text-sm text-gray-800 dark:text-gray-200 flex-1 truncate",children:r.name}),e.jsx(ne,{className:"w-4 h-4 text-gray-300 dark:text-gray-600 flex-shrink-0"})]},r.path)),m.files.map(r=>e.jsxs("button",{onClick:()=>re(r.path),className:"w-full px-4 py-3 flex items-center gap-3 text-left hover:bg-white dark:hover:bg-gray-900 transition-colors",children:[e.jsx(ze,{path:r.path}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-200 truncate",children:r.name}),e.jsxs("div",{className:"text-[11px] text-gray-400 dark:text-gray-500 font-mono truncate",children:[me(r.size),r.ext?` · ${r.ext}`:""]})]})]},r.path))]}):e.jsx(u,{icon:e.jsx(Ee,{className:"w-5 h-5"}),title:"空目录"}):e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:"连接已断开"})})]}):e.jsx("div",{className:"flex-1 overflow-y-auto",children:N?X?e.jsx(u,{icon:e.jsx(E,{className:"w-5 h-5 animate-spin"}),title:"正在加载"}):ke?e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:ke,danger:!0}):g&&!g.isGitRepo?e.jsx(u,{icon:e.jsx(Ie,{className:"w-5 h-5"}),title:"非 Git 仓库"}):g&&g.files.length>0?e.jsxs("div",{className:"py-2",children:[e.jsxs("div",{className:"px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(Ie,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:g.branch||"HEAD"})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap",children:[e.jsxs("span",{children:[g.files.length," 个文件"]}),Qe&&e.jsx($,{variant:"stage",label:"全部暂存",loading:F==="stage",disabled:F!==null,onClick:()=>Pe("stage")}),Ze&&e.jsx($,{variant:"unstage",label:"全部取消",loading:F==="unstage",disabled:F!==null,onClick:()=>Pe("unstage")}),e.jsxs("button",{type:"button",onClick:tt,className:"h-7 px-2.5 rounded-md border border-primary-200 dark:border-primary-900 bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 flex items-center gap-1.5 text-xs font-medium active:scale-95 transition-all",title:"提交代码","aria-label":"提交代码",children:[e.jsx(de,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"提交"})]})]})]}),we&&e.jsxs("div",{className:"mx-4 mb-2 px-3 py-2 rounded-md border border-red-100 dark:border-red-900 bg-red-50 dark:bg-red-950/40 flex items-center gap-2 text-xs text-red-600 dark:text-red-300",children:[e.jsx(k,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"min-w-0 truncate",children:we})]}),g.files.map(r=>e.jsxs("div",{className:"w-full px-4 py-3 flex items-center gap-3 text-left hover:bg-white dark:hover:bg-gray-900 transition-colors",children:[e.jsxs("button",{type:"button",onClick:()=>M(r.path),className:"min-w-0 flex-1 flex items-center gap-3 text-left",children:[e.jsx("span",{className:p("w-14 h-6 rounded-full border flex items-center justify-center text-[11px] font-medium flex-shrink-0",Ht(r.status)),children:r.label}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ze,{path:r.path,className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-200 truncate",children:r.name})]}),e.jsx("div",{className:"text-[11px] text-gray-400 dark:text-gray-500 font-mono truncate",children:r.path})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[ce(r)&&e.jsx($,{variant:"stage",label:"暂存",loading:S===`stage:${r.path}`,disabled:S!==null||F!==null,onClick:o=>{o.stopPropagation(),H(r.path,"stage")}}),V(r)&&e.jsx($,{variant:"unstage",label:"取消",loading:S===`unstage:${r.path}`,disabled:S!==null||F!==null,onClick:o=>{o.stopPropagation(),H(r.path,"unstage")}})]}),e.jsx(ne,{className:"w-4 h-4 text-gray-300 dark:text-gray-600 flex-shrink-0"})]},`${r.status}-${r.path}`))]}):e.jsx(u,{icon:e.jsx(_,{className:"w-5 h-5"}),title:"工作区干净"}):e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:"连接已断开"})}),e.jsx(le,{children:B&&e.jsx(oe,{title:Je,subtitle:Me(B),onClose:et,children:Ue?e.jsx(u,{icon:e.jsx(E,{className:"w-5 h-5 animate-spin"}),title:"正在读取",compact:!0}):fe?e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:fe,danger:!0,compact:!0}):f!=null&&f.tooLarge?e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:`文件过大:${me(f.size)}`,compact:!0}):f!=null&&f.isImage?f.dataUrl?e.jsx(Ot,{file:f}):e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:"图片预览不可用",compact:!0}):f!=null&&f.isBinary?e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:"二进制文件",compact:!0}):e.jsx(Kt,{file:f,targetLine:Ge})})}),e.jsx(le,{children:b&&e.jsx(oe,{title:Xe,subtitle:Me(b),onClose:()=>T(null),actions:ae?e.jsxs("div",{className:"flex items-center gap-1.5",children:[ce(ae)&&e.jsx($,{variant:"stage",label:"暂存",loading:S===`stage:${b}`,disabled:S!==null||F!==null,onClick:()=>H(b,"stage")}),V(ae)&&e.jsx($,{variant:"unstage",label:"取消",loading:S===`unstage:${b}`,disabled:S!==null||F!==null,onClick:()=>H(b,"unstage")})]}):void 0,children:Ye?e.jsx(u,{icon:e.jsx(E,{className:"w-5 h-5 animate-spin"}),title:"正在读取",compact:!0}):Se?e.jsx(u,{icon:e.jsx(k,{className:"w-5 h-5"}),title:Se,danger:!0,compact:!0}):L!=null&&L.diff?e.jsx(Yt,{diff:L.diff,truncated:L.truncated}):e.jsx(u,{icon:e.jsx(_,{className:"w-5 h-5"}),title:"暂无 diff 内容",compact:!0})})}),e.jsx(le,{children:Ve&&e.jsx(oe,{title:"提交代码",subtitle:g!=null&&g.branch?`当前分支:${g.branch}`:ie(P),onClose:()=>ee(!1),children:e.jsx(_t,{message:te,onMessageChange:D,onGenerate:at,onCommit:st,aiLoading:_e,commitLoading:qe,error:Oe,result:Ke,changedCount:(g==null?void 0:g.files.length)||0,stagedCount:R})})})]})},u=({icon:t,title:s,danger:a=!1,compact:c=!1})=>e.jsxs("div",{className:p("flex flex-col items-center justify-center gap-2 text-center",c?"h-full min-h-[220px]":"h-full min-h-[360px]"),children:[e.jsx("div",{className:p(a?"text-red-500 dark:text-red-400":"text-gray-400 dark:text-gray-600"),children:t}),e.jsx("div",{className:p("text-sm",a?"text-red-500 dark:text-red-400":"text-gray-400 dark:text-gray-600"),children:s})]}),_t=({message:t,onMessageChange:s,onGenerate:a,onCommit:c,aiLoading:n,commitLoading:x,error:d,result:l,changedCount:m,stagedCount:h})=>{const y=n||x;return e.jsxs("div",{className:"h-full bg-white dark:bg-gray-950 flex flex-col",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/70 flex items-center justify-between gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 text-xs text-gray-500 dark:text-gray-400",children:[e.jsx(_,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("span",{className:"truncate",children:[h," 个已暂存 / ",m," 个文件"]})]}),e.jsxs("button",{type:"button",onClick:a,disabled:y||h===0,className:"h-8 px-3 rounded-md border border-violet-200 dark:border-violet-900 bg-violet-50 dark:bg-violet-950/40 text-violet-700 dark:text-violet-300 flex items-center gap-1.5 text-xs font-medium disabled:opacity-60 active:scale-95 transition-all",title:"AI 生成提交信息","aria-label":"AI 生成提交信息",children:[n?e.jsx(E,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(ft,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"AI 生成"})]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-4 flex flex-col gap-3",children:[e.jsx("label",{className:"text-xs font-medium text-gray-500 dark:text-gray-400",htmlFor:"workspace-commit-message",children:"Commit 信息"}),e.jsx("textarea",{id:"workspace-commit-message",value:t,onChange:z=>s(z.target.value),placeholder:"feat(scope): describe the change",className:"flex-1 min-h-[220px] resize-none rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950 px-3 py-2 text-sm leading-6 font-mono text-gray-900 dark:text-gray-100 placeholder:text-gray-400 dark:placeholder:text-gray-600 focus:outline-none focus:ring-2 focus:ring-primary-500/40"}),d&&e.jsxs("div",{className:"px-3 py-2 rounded-md border border-red-100 dark:border-red-900 bg-red-50 dark:bg-red-950/40 flex items-center gap-2 text-xs text-red-600 dark:text-red-300",children:[e.jsx(k,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"min-w-0",children:d})]}),l&&e.jsxs("div",{className:"px-3 py-2 rounded-md border border-green-100 dark:border-green-900 bg-green-50 dark:bg-green-950/40 flex items-center gap-2 text-xs text-green-700 dark:text-green-300",children:[e.jsx(de,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"min-w-0",children:l})]}),e.jsxs("button",{type:"button",onClick:c,disabled:y||!t.trim()||h===0,className:"h-10 rounded-lg bg-primary-600 text-white text-sm font-medium flex items-center justify-center gap-2 disabled:opacity-50 active:scale-[0.99] transition-all",children:[x?e.jsx(E,{className:"w-4 h-4 animate-spin"}):e.jsx(de,{className:"w-4 h-4"}),e.jsx("span",{children:"提交代码"})]})]})]})},$=({variant:t,label:s,loading:a,disabled:c=!1,onClick:n})=>{const x=t==="stage";return e.jsxs("button",{type:"button",onClick:n,disabled:c||a,className:p("h-7 px-2.5 rounded-md border flex items-center gap-1.5 text-xs font-medium flex-shrink-0 disabled:opacity-60 active:scale-95 transition-all",x?"border-green-200 dark:border-green-900 bg-green-50 dark:bg-green-950/40 text-green-700 dark:text-green-300":"border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900 text-gray-600 dark:text-gray-300"),title:s,"aria-label":s,children:[a?e.jsx(E,{className:"w-3.5 h-3.5 animate-spin"}):x?e.jsx(ht,{className:"w-3.5 h-3.5"}):e.jsx(ut,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:s})]})},Ot=({file:t})=>{const s=ge(t.path||t.name||""),a=s.Icon;return e.jsxs("div",{className:"h-full overflow-hidden bg-white dark:bg-gray-950 flex flex-col",children:[e.jsxs("div",{className:"px-4 py-2 border-b border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/70 flex items-center justify-between gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(a,{className:p("w-4 h-4 flex-shrink-0",s.className)}),e.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:s.label})]}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0 text-[11px] font-mono text-gray-400 dark:text-gray-500",children:[t.mimeType&&e.jsx("span",{className:"truncate",children:t.mimeType}),e.jsx("span",{className:"flex-shrink-0",children:me(t.size)})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto workspace-image-canvas p-4",children:e.jsx("div",{className:"h-full min-h-[320px] flex items-center justify-center",children:e.jsx("img",{src:t.dataUrl,alt:t.name,className:"max-w-full max-h-[calc(86vh-132px)] object-contain rounded border border-gray-200/80 dark:border-gray-800/80 bg-white/80 dark:bg-gray-950/80 shadow-sm",draggable:!1})})})]})},Kt=({file:t,targetLine:s})=>{const a=Ut((t==null?void 0:t.path)||(t==null?void 0:t.name)||""),c=ge((t==null?void 0:t.path)||(t==null?void 0:t.name)||""),n=c.Icon,x=i.useMemo(()=>((t==null?void 0:t.content)??"").split(`
|
|
8
|
-
`),[t==null?void 0:t.content]),d=Math.max(2,String(x.length).length)+1,l=i.useRef(null);return i.useEffect(()=>{if(!t||!s)return;const m=requestAnimationFrame(()=>{var h;(h=l.current)==null||h.scrollIntoView({block:"center",inline:"nearest"})});return()=>cancelAnimationFrame(m)},[t,s]),t?e.jsxs("div",{className:"h-full overflow-hidden bg-white dark:bg-gray-950 flex flex-col",children:[e.jsxs("div",{className:"px-4 py-2 border-b border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/70 flex items-center justify-between gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(n,{className:p("w-4 h-4 flex-shrink-0",c.className)}),e.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:c.label})]}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0 text-[11px] font-mono text-gray-400 dark:text-gray-500",children:[s&&e.jsxs("span",{className:"flex-shrink-0",children:["L",s]}),a&&e.jsx("span",{className:"flex-shrink-0",children:a})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto bg-white dark:bg-gray-950 workspace-code-preview",children:e.jsx(Bt,{content:t.content,language:a,lineNumberWidth:d,targetLine:s,targetLineRef:l})})]}):e.jsx(u,{icon:e.jsx(Be,{className:"w-5 h-5"}),title:"暂无文件内容",compact:!0})},Yt=({diff:t,truncated:s})=>{const a=i.useMemo(()=>qt(t),[t]),c=i.useMemo(()=>a.reduce((n,x)=>({additions:n.additions+x.additions,deletions:n.deletions+x.deletions}),{additions:0,deletions:0}),[a]);return a.length===0?e.jsx("pre",{className:"min-h-full overflow-auto p-4 text-[12px] leading-5 font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-words bg-white dark:bg-gray-950",children:t}):e.jsxs("div",{className:"h-full overflow-y-auto bg-white dark:bg-gray-950",children:[e.jsxs("div",{className:"sticky top-0 z-10 border-b border-gray-100 dark:border-gray-800 bg-white/95 dark:bg-gray-950/95 backdrop-blur px-4 py-2 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:[a.length," 个文件"]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium",children:[e.jsxs("span",{className:"text-green-700 dark:text-green-400",children:["+",c.additions]}),e.jsxs("span",{className:"text-red-700 dark:text-red-400",children:["-",c.deletions]})]})]}),s&&e.jsx("div",{className:"mx-4 mt-3 rounded-lg border border-amber-200 dark:border-amber-900 bg-amber-50 dark:bg-amber-950/40 px-3 py-2 text-xs text-amber-800 dark:text-amber-300",children:"diff 内容过长,已截断。"}),e.jsx("div",{className:"pb-4",children:a.map((n,x)=>e.jsxs("div",{className:"border-b border-gray-100 dark:border-gray-800 last:border-b-0",children:[e.jsxs("div",{className:"px-4 py-3 bg-gray-50 dark:bg-gray-900/70 border-b border-gray-100 dark:border-gray-800",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:n.newPath||n.oldPath||"变更文件"}),n.oldPath&&n.newPath&&n.oldPath!==n.newPath&&e.jsxs("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 font-mono truncate mt-1",children:[n.oldPath," ","->"," ",n.newPath]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium flex-shrink-0",children:[e.jsxs("span",{className:"text-green-700 dark:text-green-400",children:["+",n.additions]}),e.jsxs("span",{className:"text-red-700 dark:text-red-400",children:["-",n.deletions]})]})]}),n.meta.length>0&&e.jsx("div",{className:"mt-2 space-y-1",children:n.meta.map((d,l)=>e.jsx("div",{className:"text-[11px] leading-4 text-gray-500 dark:text-gray-400 font-mono truncate",children:d},`${d}-${l}`))})]}),n.hunks.map((d,l)=>e.jsxs("div",{children:[e.jsx("div",{className:"px-4 py-2 bg-primary-50 dark:bg-primary-950/30 text-[11px] font-mono text-primary-700 dark:text-primary-300 border-b border-primary-100 dark:border-primary-900 overflow-x-auto hide-scrollbar",children:d.header}),e.jsx("div",{className:"font-mono text-[12px] leading-5",children:d.lines.map((m,h)=>e.jsx(Jt,{line:m},`${m.kind}-${m.oldLine}-${m.newLine}-${h}`))})]},`${d.header}-${l}`))]},`${n.newPath||n.oldPath}-${x}`))})]})},Jt=({line:t})=>{const s=t.kind==="add",a=t.kind==="delete",c=t.kind==="note",n=s?"+":a?"-":c?"\\":" ";return e.jsxs("div",{className:p("grid grid-cols-[3.25rem_3.25rem_1.5rem_minmax(0,1fr)] min-w-0 border-b border-transparent",s&&"bg-green-50 dark:bg-green-950/35",a&&"bg-red-50 dark:bg-red-950/35",t.kind==="meta"&&"bg-gray-50 dark:bg-gray-900/70",c&&"bg-gray-50 dark:bg-gray-900/70 text-gray-500 dark:text-gray-400 italic"),children:[e.jsx("div",{className:"px-2 py-0.5 text-right text-[11px] text-gray-400 dark:text-gray-600 select-none border-r border-gray-100 dark:border-gray-800",children:t.oldLine??""}),e.jsx("div",{className:"px-2 py-0.5 text-right text-[11px] text-gray-400 dark:text-gray-600 select-none border-r border-gray-100 dark:border-gray-800",children:t.newLine??""}),e.jsx("div",{className:p("px-1.5 py-0.5 text-center select-none",s&&"text-green-700 dark:text-green-400",a&&"text-red-700 dark:text-red-400",!s&&!a&&"text-gray-400 dark:text-gray-600"),children:n}),e.jsx("div",{className:p("py-0.5 pr-4 overflow-x-auto whitespace-pre",s&&"text-green-900 dark:text-green-100",a&&"text-red-900 dark:text-red-100",!s&&!a&&"text-gray-800 dark:text-gray-200"),children:t.content||" "})]})},oe=({title:t,subtitle:s,onClose:a,actions:c,children:n})=>e.jsxs(e.Fragment,{children:[e.jsx(We.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:a,className:"absolute inset-0 bg-black/40 z-40"}),e.jsxs(We.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:220},className:"absolute bottom-0 left-0 right-0 h-[86%] bg-white dark:bg-gray-950 rounded-t-2xl z-50 flex flex-col shadow-xl overflow-hidden",children:[e.jsx("div",{className:"flex justify-center pt-3 pb-2 flex-shrink-0",onClick:a,children:e.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),e.jsxs("div",{className:"px-4 pb-3 border-b border-gray-100 dark:border-gray-800 flex items-start justify-between gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-gray-100 truncate",children:t}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 font-mono truncate mt-0.5",children:s})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[c,e.jsx("button",{onClick:a,className:"w-8 h-8 rounded-full flex items-center justify-center text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-900 flex-shrink-0",title:"关闭","aria-label":"关闭",children:e.jsx(pt,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:n})]})]});export{ra as Workspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-4{left:1rem;right:1rem}.-left-8{left:-2rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\/2{top:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-0\.5{margin-left:.125rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[60px\]{height:60px}.h-\[85\%\]{height:85%}.h-\[86\%\]{height:86%}.h-full{height:100%}.h-screen{height:100vh}.max-h-24{max-height:6rem}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-60{max-height:15rem}.max-h-72{max-height:18rem}.max-h-\[120px\]{max-height:120px}.max-h-\[calc\(86vh-132px\)\]{max-height:calc(86vh - 132px)}.min-h-0{min-height:0px}.min-h-14{min-height:3.5rem}.min-h-\[220px\]{min-height:220px}.min-h-\[320px\]{min-height:320px}.min-h-\[360px\]{min-height:360px}.min-h-\[42px\]{min-height:42px}.min-h-\[44px\]{min-height:44px}.min-h-\[88px\]{min-height:88px}.min-h-full{min-height:100%}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[95\%\]{width:95%}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-2xl{max-width:42rem}.max-w-\[120px\]{max-width:120px}.max-w-\[220px\]{max-width:220px}.max-w-\[85\%\]{max-width:85%}.max-w-\[88\%\]{max-width:88%}.max-w-\[94\%\]{max-width:94%}.max-w-\[95\%\]{max-width:95%}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[3\.25rem_3\.25rem_1\.5rem_minmax\(0\,1fr\)\]{grid-template-columns:3.25rem 3.25rem 1.5rem minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200\/70>:not([hidden])~:not([hidden]){border-color:#e5e7ebb3}.divide-gray-50>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(249 250 251 / var(--tw-divide-opacity, 1))}.divide-primary-100\/70>:not([hidden])~:not([hidden]){border-color:#ede9feb3}.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}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-100{--tw-border-opacity: 1;border-color:rgb(254 243 199 / var(--tw-border-opacity, 1))}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-200\/40{border-color:#fde68a66}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-200\/40{border-color:#bfdbfe66}.border-blue-200\/50{border-color:#bfdbfe80}.border-blue-200\/60{border-color:#bfdbfe99}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-200\/40{border-color:#e5e7eb66}.border-gray-200\/80{border-color:#e5e7ebcc}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1))}.border-green-100{--tw-border-opacity: 1;border-color:rgb(220 252 231 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-200\/40{border-color:#bbf7d066}.border-green-200\/60{border-color:#bbf7d099}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-indigo-200\/60{border-color:#c7d2fe99}.border-orange-100{--tw-border-opacity: 1;border-color:rgb(255 237 213 / var(--tw-border-opacity, 1))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-primary-100{--tw-border-opacity: 1;border-color:rgb(237 233 254 / var(--tw-border-opacity, 1))}.border-primary-100\/60{border-color:#ede9fe99}.border-primary-100\/80{border-color:#ede9fecc}.border-primary-200{--tw-border-opacity: 1;border-color:rgb(221 214 254 / var(--tw-border-opacity, 1))}.border-primary-50{--tw-border-opacity: 1;border-color:rgb(245 243 255 / var(--tw-border-opacity, 1))}.border-primary-600{--tw-border-opacity: 1;border-color:rgb(124 58 237 / var(--tw-border-opacity, 1))}.border-purple-200\/40{border-color:#e9d5ff66}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-200\/30{border-color:#fecaca4d}.border-transparent{border-color:transparent}.border-violet-200{--tw-border-opacity: 1;border-color:rgb(221 214 254 / var(--tw-border-opacity, 1))}.border-white\/25{border-color:#ffffff40}.border-t-transparent{border-top-color:transparent}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-50\/50{background-color:#fffbeb80}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-100\/60{background-color:#dbeafe99}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-50\/80{background-color:#eff6ffcc}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-cyan-50{--tw-bg-opacity: 1;background-color:rgb(236 254 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-200\/70{background-color:#e5e7ebb3}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-50\/90{background-color:#f9fafbe6}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-50\/50{background-color:#f0fdf480}.bg-green-50\/80{background-color:#f0fdf4cc}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-indigo-50\/80{background-color:#eef2ffcc}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-primary-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-primary-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-primary-50\/90{background-color:#f5f3ffe6}.bg-primary-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(124 58 237 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-50\/50{background-color:#faf5ff80}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-50\/50{background-color:#fef2f280}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/25{background-color:#ef444440}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/50{background-color:#ffffff80}.bg-white\/70{background-color:#ffffffb3}.bg-white\/80{background-color:#fffc}.bg-white\/95{background-color:#fffffff2}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[15px\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.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)}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-wider{letter-spacing:.05em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-500\/70{color:#f59e0bb3}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-500\/70{color:#3b82f6b3}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-500\/70{color:#6b7280b3}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-500\/70{color:#22c55eb3}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800\/80{color:#3730a3cc}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-pink-600{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity, 1))}.text-primary-100{--tw-text-opacity: 1;color:rgb(237 233 254 / var(--tw-text-opacity, 1))}.text-primary-200{--tw-text-opacity: 1;color:rgb(221 214 254 / var(--tw-text-opacity, 1))}.text-primary-500{--tw-text-opacity: 1;color:rgb(139 92 246 / var(--tw-text-opacity, 1))}.text-primary-600{--tw-text-opacity: 1;color:rgb(124 58 237 / var(--tw-text-opacity, 1))}.text-primary-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-primary-800{--tw-text-opacity: 1;color:rgb(91 33 182 / var(--tw-text-opacity, 1))}.text-purple-500\/70{color:#a855f7b3}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-100{--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.text-sky-600{--tw-text-opacity: 1;color:rgb(2 132 199 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-white\/70{text-decoration-color:#ffffffb3}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-\[0_-1px_8px_rgba\(0\,0\,0\,0\.04\)\]{--tw-shadow: 0 -1px 8px rgba(0,0,0,.04);--tw-shadow-colored: 0 -1px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-primary-200{--tw-shadow-color: #ddd6fe;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-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,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}html,body,#root{height:100%;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pb-safe{padding-bottom:env(safe-area-inset-bottom,0px)}.pt-safe{padding-top:env(safe-area-inset-top,0px)}.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}.markdown-body{font-size:15px;line-height:1.6;overflow-wrap:anywhere;word-break:break-word}.markdown-body p{margin:.35em 0}.markdown-body p:first-child{margin-top:0}.markdown-body p:last-child{margin-bottom:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4{font-weight:600;margin:.75em 0 .35em;line-height:1.35}.markdown-body h1{font-size:1.25em}.markdown-body h2{font-size:1.15em}.markdown-body h3{font-size:1.05em}.markdown-body code{background:#f1f5f9;border-radius:4px;padding:.15em .35em;font-size:.9em;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;white-space:break-spaces}.markdown-body pre{background:#0f172a;color:#e2e8f0;border:1px solid #334155;border-radius:10px;padding:.75em .875em;overflow-x:auto;-webkit-overflow-scrolling:touch;margin:.6em 0;font-size:.82em;line-height:1.55;word-break:normal;overflow-wrap:normal;white-space:pre;max-width:100%;scrollbar-width:thin}.markdown-body pre code{background:none;padding:0;font-size:inherit;color:inherit;border-radius:0;white-space:inherit;display:block;min-width:-moz-max-content;min-width:max-content}.workspace-code-preview pre{margin:0;min-height:100%;border-radius:8px}.workspace-code-preview pre code,.workspace-code-preview code{-moz-tab-size:2;-o-tab-size:2;tab-size:2}.workspace-image-canvas{background-color:#f8fafc;background-image:linear-gradient(45deg,rgba(148,163,184,.2) 25%,transparent 25%),linear-gradient(-45deg,rgba(148,163,184,.2) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(148,163,184,.2) 75%),linear-gradient(-45deg,transparent 75%,rgba(148,163,184,.2) 75%);background-position:0 0,0 10px,10px -10px,-10px 0;background-size:20px 20px}.dark .workspace-image-canvas{background-color:#0f172a;background-image:linear-gradient(45deg,rgba(71,85,105,.35) 25%,transparent 25%),linear-gradient(-45deg,rgba(71,85,105,.35) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(71,85,105,.35) 75%),linear-gradient(-45deg,transparent 75%,rgba(71,85,105,.35) 75%)}.markdown-body pre code.hljs,.markdown-body-sm pre code.hljs{color:#e6edf3}.hljs-comment,.hljs-quote{color:#8b949e;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#ff7b72}.hljs-string,.hljs-addition{color:#a5d6ff}.hljs-number,.hljs-literal{color:#79c0ff}.hljs-built_in{color:#ffa657}.hljs-function .hljs-title,.hljs-title.function_{color:#d2a8ff}.hljs-variable,.hljs-attr{color:#79c0ff}.hljs-property{color:#7ee787}.hljs-meta,.hljs-meta .hljs-keyword{color:#ffa657}.hljs-operator{color:#ff7b72}.hljs-deletion{color:#ffa198;background:#f851491a}.hljs-addition{color:#7ee787;background:#2ea0431a}.hljs-symbol,.hljs-bullet{color:#f2cc60}.hljs-regexp{color:#a5d6ff}.hljs-name,.hljs-selector-class{color:#7ee787}.hljs-selector-id{color:#ffa657}.hljs-section{color:#d2a8ff;font-weight:700}.hljs-link{color:#a5d6ff;text-decoration:underline}.hljs-params{color:#e6edf3}.hljs-attribute{color:#79c0ff}.workspace-code-preview code.hljs{color:inherit}.workspace-code-preview .hljs-comment,.workspace-code-preview .hljs-quote{color:#6e7781;font-style:italic}.workspace-code-preview .hljs-keyword,.workspace-code-preview .hljs-selector-tag,.workspace-code-preview .hljs-type,.workspace-code-preview .hljs-operator{color:#cf222e}.workspace-code-preview .hljs-string,.workspace-code-preview .hljs-regexp{color:#0a3069}.workspace-code-preview .hljs-number,.workspace-code-preview .hljs-literal,.workspace-code-preview .hljs-variable,.workspace-code-preview .hljs-attr,.workspace-code-preview .hljs-attribute{color:#0550ae}.workspace-code-preview .hljs-built_in,.workspace-code-preview .hljs-meta,.workspace-code-preview .hljs-meta .hljs-keyword{color:#953800}.workspace-code-preview .hljs-function .hljs-title,.workspace-code-preview .hljs-title.function_,.workspace-code-preview .hljs-section{color:#8250df}.workspace-code-preview .hljs-property,.workspace-code-preview .hljs-name,.workspace-code-preview .hljs-selector-class{color:#116329}.workspace-code-preview .hljs-deletion{color:#82071e;background:#cf222e14}.workspace-code-preview .hljs-addition{color:#116329;background:#1a7f3714}.workspace-code-preview .hljs-symbol,.workspace-code-preview .hljs-bullet{color:#9a6700}.workspace-code-preview .hljs-selector-id{color:#953800}.workspace-code-preview .hljs-link{color:#0a3069;text-decoration:underline}.workspace-code-preview .hljs-params{color:inherit}.dark .workspace-code-preview .hljs-comment,.dark .workspace-code-preview .hljs-quote{color:#8b949e}.dark .workspace-code-preview .hljs-keyword,.dark .workspace-code-preview .hljs-selector-tag,.dark .workspace-code-preview .hljs-type,.dark .workspace-code-preview .hljs-operator{color:#ff7b72}.dark .workspace-code-preview .hljs-string,.dark .workspace-code-preview .hljs-regexp{color:#a5d6ff}.dark .workspace-code-preview .hljs-number,.dark .workspace-code-preview .hljs-literal,.dark .workspace-code-preview .hljs-variable,.dark .workspace-code-preview .hljs-attr,.dark .workspace-code-preview .hljs-attribute{color:#79c0ff}.dark .workspace-code-preview .hljs-built_in,.dark .workspace-code-preview .hljs-meta,.dark .workspace-code-preview .hljs-meta .hljs-keyword{color:#ffa657}.dark .workspace-code-preview .hljs-function .hljs-title,.dark .workspace-code-preview .hljs-title.function_,.dark .workspace-code-preview .hljs-section{color:#d2a8ff}.dark .workspace-code-preview .hljs-property,.dark .workspace-code-preview .hljs-name,.dark .workspace-code-preview .hljs-selector-class{color:#7ee787}.dark .workspace-code-preview .hljs-deletion{color:#ffa198;background:#f851491a}.dark .workspace-code-preview .hljs-addition{color:#7ee787;background:#2ea0431a}.dark .workspace-code-preview .hljs-symbol,.dark .workspace-code-preview .hljs-bullet{color:#f2cc60}.dark .workspace-code-preview .hljs-selector-id{color:#ffa657}.dark .workspace-code-preview .hljs-link{color:#a5d6ff}.markdown-body ul,.markdown-body ol{margin:.35em 0;padding-left:1.5em}.markdown-body li{margin:.15em 0}.markdown-body li>p{margin:.2em 0}.markdown-body blockquote{border-left:3px solid #cbd5e1;padding-left:.75em;margin:.45em 0;color:#64748b}.markdown-body blockquote p{margin:.2em 0}.markdown-body hr{border:none;border-top:1px solid #e2e8f0;margin:.75em 0}.markdown-body a{color:#8b5cf6;text-decoration:none}.markdown-body a:hover{text-decoration:underline}.markdown-body strong{font-weight:600}.markdown-body table{border-collapse:collapse;min-width:100%;width:-moz-max-content;width:max-content;max-width:100%;margin:.5em 0;font-size:.9em;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}.markdown-body th,.markdown-body td{border:1px solid #e2e8f0;padding:.35em .6em;text-align:left}.markdown-body th{background:#f8fafc;font-weight:600}.dark .markdown-body code{background:#334155}.dark .markdown-body pre{background:#111827;border-color:#374151}.dark .markdown-body blockquote{border-left-color:#475569;color:#94a3b8}.dark .markdown-body hr{border-top-color:#334155}.dark .markdown-body th,.dark .markdown-body td{border-color:#334155}.dark .markdown-body th{background:#1e293b}.markdown-body-sm{font-size:12px;line-height:1.5}.markdown-body-sm p{margin:.2em 0}.markdown-body-sm code{font-size:.9em;padding:.1em .25em;white-space:break-spaces}.markdown-body-sm pre{margin:.3em 0;padding:.6em .85em;font-size:.9em;border-radius:6px;background:#0f172a;border:1px solid #334155;color:#e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch;word-break:normal;overflow-wrap:normal;white-space:pre;scrollbar-width:thin}.markdown-body-sm pre code{background:none;padding:0;font-size:inherit;color:inherit;border-radius:0;white-space:inherit;display:block;min-width:-moz-max-content;min-width:max-content}.dark .markdown-body-sm pre{background:#111827;border-color:#374151}@keyframes messageIn{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.message-animate-in{animation:messageIn .2s ease-out both}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.placeholder\:text-primary-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(237 233 254 / var(--tw-text-opacity, 1))}.placeholder\:text-primary-100::placeholder{--tw-text-opacity: 1;color:rgb(237 233 254 / var(--tw-text-opacity, 1))}.last\:mb-0:last-child{margin-bottom:0}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:border-primary-200:hover{--tw-border-opacity: 1;border-color:rgb(221 214 254 / var(--tw-border-opacity, 1))}.hover\:border-primary-500:hover{--tw-border-opacity: 1;border-color:rgb(139 92 246 / var(--tw-border-opacity, 1))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-100\/60:hover{background-color:#e0e7ff99}.hover\:bg-primary-100\/50:hover{background-color:#ede9fe80}.hover\:bg-primary-100\/60:hover{background-color:#ede9fe99}.hover\:bg-primary-50:hover{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.hover\:bg-primary-700:hover{--tw-bg-opacity: 1;background-color:rgb(109 40 217 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/15:hover{background-color:#ffffff26}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-primary-600:hover{--tw-text-opacity: 1;color:rgb(124 58 237 / var(--tw-text-opacity, 1))}.hover\:text-primary-900:hover{--tw-text-opacity: 1;color:rgb(76 29 149 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:decoration-current:hover{text-decoration-color:currentColor}.hover\:opacity-100:hover{opacity:1}.focus\:border-blue-400:focus{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.focus\:border-primary-400:focus{--tw-border-opacity: 1;border-color:rgb(167 139 250 / var(--tw-border-opacity, 1))}.focus\:border-primary-500:focus{--tw-border-opacity: 1;border-color:rgb(139 92 246 / var(--tw-border-opacity, 1))}.focus\:border-white\/60:focus{border-color:#fff9}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[3px\]:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(219 234 254 / var(--tw-ring-opacity, 1))}.focus\:ring-primary-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(237 233 254 / var(--tw-ring-opacity, 1))}.focus\:ring-primary-500\/40:focus{--tw-ring-color: rgb(139 92 246 / .4)}.focus\:ring-white\/20:focus{--tw-ring-color: rgb(255 255 255 / .2)}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.99\]:active{--tw-scale-x: .99;--tw-scale-y: .99;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:bg-gray-100:active{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.active\:bg-green-100:active{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.active\:bg-purple-100:active{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.group:hover .group-hover\:opacity-100{opacity:1}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity, 1))}.dark\:divide-gray-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(31 41 55 / var(--tw-divide-opacity, 1))}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-amber-800\/40:is(.dark *){border-color:#92400e66}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-blue-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-blue-800\/40:is(.dark *){border-color:#1e40af66}.dark\:border-blue-800\/50:is(.dark *){border-color:#1e40af80}.dark\:border-blue-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.dark\:border-gray-800\/40:is(.dark *){border-color:#1f293766}.dark\:border-gray-800\/80:is(.dark *){border-color:#1f2937cc}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.dark\:border-green-800\/40:is(.dark *){border-color:#16653466}.dark\:border-green-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(20 83 45 / var(--tw-border-opacity, 1))}.dark\:border-indigo-800\/40:is(.dark *){border-color:#3730a366}.dark\:border-orange-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(154 52 18 / var(--tw-border-opacity, 1))}.dark\:border-orange-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(124 45 18 / var(--tw-border-opacity, 1))}.dark\:border-primary-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(91 33 182 / var(--tw-border-opacity, 1))}.dark\:border-primary-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(76 29 149 / var(--tw-border-opacity, 1))}.dark\:border-purple-800\/40:is(.dark *){border-color:#6b21a866}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.dark\:border-violet-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(76 29 149 / var(--tw-border-opacity, 1))}.dark\:bg-amber-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(120 53 15 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(69 26 3 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:bg-amber-950\/50:is(.dark *){background-color:#451a0380}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-900\/60:is(.dark *){background-color:#1e3a8a99}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950\/40:is(.dark *){background-color:#17255466}.dark\:bg-blue-950\/50:is(.dark *){background-color:#17255480}.dark\:bg-cyan-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(8 51 68 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/80:is(.dark *){background-color:#1f2937cc}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-900\/50:is(.dark *){background-color:#11182780}.dark\:bg-gray-900\/70:is(.dark *){background-color:#111827b3}.dark\:bg-gray-900\/80:is(.dark *){background-color:#111827cc}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-950\/50:is(.dark *){background-color:#03071280}.dark\:bg-gray-950\/80:is(.dark *){background-color:#030712cc}.dark\:bg-gray-950\/95:is(.dark *){background-color:#030712f2}.dark\:bg-green-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.dark\:bg-green-950\/35:is(.dark *){background-color:#052e1659}.dark\:bg-green-950\/40:is(.dark *){background-color:#052e1666}.dark\:bg-green-950\/50:is(.dark *){background-color:#052e1680}.dark\:bg-indigo-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 27 75 / var(--tw-bg-opacity, 1))}.dark\:bg-indigo-950\/40:is(.dark *){background-color:#1e1b4b66}.dark\:bg-orange-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(67 20 7 / var(--tw-bg-opacity, 1))}.dark\:bg-orange-950\/50:is(.dark *){background-color:#43140780}.dark\:bg-primary-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(167 139 250 / var(--tw-bg-opacity, 1))}.dark\:bg-primary-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(76 29 149 / var(--tw-bg-opacity, 1))}.dark\:bg-purple-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 7 100 / var(--tw-bg-opacity, 1))}.dark\:bg-purple-950\/50:is(.dark *){background-color:#3b076480}.dark\:bg-red-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity, 1))}.dark\:bg-red-950\/35:is(.dark *){background-color:#450a0a59}.dark\:bg-red-950\/40:is(.dark *){background-color:#450a0a66}.dark\:bg-red-950\/50:is(.dark *){background-color:#450a0a80}.dark\:bg-violet-950\/40:is(.dark *){background-color:#2e106566}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-amber-400\/70:is(.dark *){color:#fbbf24b3}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-blue-400\/70:is(.dark *){color:#60a5fab3}.dark\:text-cyan-300:is(.dark *){--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400:is(.dark *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-400\/70:is(.dark *){color:#9ca3afb3}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.dark\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-green-400\/70:is(.dark *){color:#4ade80b3}.dark\:text-indigo-200\/80:is(.dark *){color:#c7d2fecc}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 215 170 / var(--tw-text-opacity, 1))}.dark\:text-orange-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.dark\:text-orange-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity, 1))}.dark\:text-primary-100:is(.dark *){--tw-text-opacity: 1;color:rgb(237 233 254 / var(--tw-text-opacity, 1))}.dark\:text-primary-300:is(.dark *){--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.dark\:text-purple-400\/70:is(.dark *){color:#c084fcb3}.dark\:text-red-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-sky-400:is(.dark *){--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-violet-300:is(.dark *){--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:shadow-\[0_-1px_8px_rgba\(0\,0\,0\,0\.2\)\]:is(.dark *){--tw-shadow: 0 -1px 8px rgba(0,0,0,.2);--tw-shadow-colored: 0 -1px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:shadow-primary-900:is(.dark *){--tw-shadow-color: #4c1d95;--tw-shadow: var(--tw-shadow-colored)}.dark\:placeholder\:text-gray-600:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-gray-600:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:hover\:border-primary-800:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(91 33 182 / var(--tw-border-opacity, 1))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-green-950\/50:hover:is(.dark *){background-color:#052e1680}.dark\:hover\:bg-indigo-950\/60:hover:is(.dark *){background-color:#1e1b4b99}.dark\:hover\:bg-purple-950\/50:hover:is(.dark *){background-color:#3b076480}.dark\:hover\:bg-red-950:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:hover\:text-primary-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(221 214 254 / var(--tw-text-opacity, 1))}.dark\:hover\:text-primary-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.dark\:focus\:bg-gray-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:focus\:ring-blue-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 58 138 / var(--tw-ring-opacity, 1))}.dark\:focus\:ring-primary-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(76 29 149 / var(--tw-ring-opacity, 1))}.dark\:active\:bg-gray-700:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:active\:bg-green-950:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.dark\:active\:bg-purple-950:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 7 100 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.sm\:opacity-0{opacity:0}.group:hover .sm\:group-hover\:opacity-100{opacity:1}}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Session-EFYFIC_X.js","assets/vendor-react-DSV5aFEg.js","assets/vendor-virtual-CcftJrIC.js","assets/WorkspaceLinkedText-D6hNg0T9.js","assets/PageTopBar-SnTIrSb5.js","assets/vendor-icons-S_ObYVVf.js","assets/History-DR_K6WbO.js","assets/vendor-motion-n6Lx6G4a.js","assets/Workspace-CJvVQVzU.js","assets/code-highlight-CEcsuMpw.js","assets/vendor-markdown-BDwu-Ux6.js","assets/Settings-DgmHC_Hw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Xe=Object.defineProperty;var Qe=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var L=(e,t,r)=>Qe(e,typeof t!="symbol"?t+"":t,r);import{u as Ze,b as et,j as f,r as h,O as tt,R as de,B as rt,d as nt,e as F,N as Te,f as ot}from"./vendor-react-DSV5aFEg.js";import{M as st,C as it,a as at,S as ct}from"./vendor-icons-S_ObYVVf.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();const lt="modulepreload",dt=function(e){return"/"+e},Ie={},we=function(t,r,o){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(r.map(p=>{if(p=dt(p),p in Ie)return;Ie[p]=!0;const w=p.endsWith(".css"),I=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${I}`))return;const g=document.createElement("link");if(g.rel=w?"stylesheet":lt,w||(g.as="script"),g.crossOrigin="",g.href=p,c&&g.setAttribute("nonce",c),document.head.appendChild(g),w)return new Promise((A,R)=>{g.addEventListener("load",A),g.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function Pe(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Pe(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ut(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Pe(e))&&(o&&(o+=" "),o+=t);return o}const Se="-";function pt(e){const t=ht(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;function i(a){const c=a.split(Se);return c[0]===""&&c.length!==1&&c.shift(),je(c,t)||ft(a)}function s(a,c){const p=r[a]||[];return c&&o[a]?[...p,...o[a]]:p}return{getClassGroupId:i,getConflictingClassGroupIds:s}}function je(e,t){var a;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?je(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Se);return(a=t.validators.find(({validator:c})=>c(s)))==null?void 0:a.classGroupId}const Re=/^\[(.+)\]$/;function ft(e){if(Re.test(e)){const t=Re.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function ht(e){const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return mt(Object.entries(e.classGroups),r).forEach(([s,a])=>{xe(a,o,s,t)}),o}function xe(e,t,r,o){e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:_e(t,i);s.classGroupId=r;return}if(typeof i=="function"){if(gt(i)){xe(i(o),t,r,o);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([s,a])=>{xe(a,_e(t,s),r,o)})})}function _e(e,t){let r=e;return t.split(Se).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r}function gt(e){return e.isThemeGetter}function mt(e,t){return t?e.map(([r,o])=>{const i=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,c])=>[t+a,c])):s);return[r,i]}):e}function bt(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;function i(s,a){r.set(s,a),t++,t>e&&(t=0,o=r,r=new Map)}return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=o.get(s))!==void 0)return i(s,a),a},set(s,a){r.has(s)?r.set(s,a):i(s,a)}}}const Ue="!";function yt(e){const t=e.separator,r=t.length===1,o=t[0],i=t.length;return function(a){const c=[];let p=0,w=0,I;for(let _=0;_<a.length;_++){let m=a[_];if(p===0){if(m===o&&(r||a.slice(_,_+i)===t)){c.push(a.slice(w,_)),w=_+i;continue}if(m==="/"){I=_;continue}}m==="["?p++:m==="]"&&p--}const g=c.length===0?a:a.substring(w),A=g.startsWith(Ue),R=A?g.substring(1):g,j=I&&I>w?I-w:void 0;return{modifiers:c,hasImportantModifier:A,baseClassName:R,maybePostfixModifierPosition:j}}}function wt(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t}function kt(e){return{cache:bt(e.cacheSize),splitModifiers:yt(e),...pt(e)}}const xt=/\s+/;function vt(e,t){const{splitModifiers:r,getClassGroupId:o,getConflictingClassGroupIds:i}=t,s=new Set;return e.trim().split(xt).map(a=>{const{modifiers:c,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:I}=r(a);let g=o(I?w.substring(0,I):w),A=!!I;if(!g){if(!I)return{isTailwindClass:!1,originalClassName:a};if(g=o(w),!g)return{isTailwindClass:!1,originalClassName:a};A=!1}const R=wt(c).join(":");return{isTailwindClass:!0,modifierId:p?R+Ue:R,classGroupId:g,originalClassName:a,hasPostfixModifier:A}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:c,classGroupId:p,hasPostfixModifier:w}=a,I=c+p;return s.has(I)?!1:(s.add(I),i(p,w).forEach(g=>s.add(c+g)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function St(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Oe(t))&&(o&&(o+=" "),o+=r);return o}function Oe(e){if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Oe(e[o]))&&(r&&(r+=" "),r+=t);return r}function Ct(e,...t){let r,o,i,s=a;function a(p){const w=t.reduce((I,g)=>g(I),e());return r=kt(w),o=r.cache.get,i=r.cache.set,s=c,c(p)}function c(p){const w=o(p);if(w)return w;const I=vt(p,r);return i(p,I),I}return function(){return s(St.apply(null,arguments))}}function T(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const We=/^\[(?:([a-z-]+):)?(.+)\]$/i,Tt=/^\d+\/\d+$/,It=new Set(["px","full","screen"]),Rt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_t=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Et=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function z(e){return B(e)||It.has(e)||Tt.test(e)}function G(e){return Z(e,"length",Wt)}function B(e){return!!e&&!Number.isNaN(Number(e))}function ge(e){return Z(e,"number",B)}function ie(e){return!!e&&Number.isInteger(Number(e))}function At(e){return e.endsWith("%")&&B(e.slice(0,-1))}function l(e){return We.test(e)}function H(e){return Rt.test(e)}const Lt=new Set(["length","size","percentage"]);function Nt(e){return Z(e,Lt,ze)}function Pt(e){return Z(e,"position",ze)}const jt=new Set(["image","url"]);function Ut(e){return Z(e,jt,Gt)}function Ot(e){return Z(e,"",zt)}function ae(){return!0}function Z(e,t,r){const o=We.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1}function Wt(e){return _t.test(e)&&!Et.test(e)}function ze(){return!1}function zt(e){return qt.test(e)}function Gt(e){return Mt.test(e)}function Ht(){const e=T("colors"),t=T("spacing"),r=T("blur"),o=T("brightness"),i=T("borderColor"),s=T("borderRadius"),a=T("borderSpacing"),c=T("borderWidth"),p=T("contrast"),w=T("grayscale"),I=T("hueRotate"),g=T("invert"),A=T("gap"),R=T("gradientColorStops"),j=T("gradientColorStopPositions"),_=T("inset"),m=T("margin"),M=T("opacity"),N=T("padding"),J=T("saturate"),$=T("scale"),U=T("sepia"),O=T("skew"),ee=T("space"),ue=T("translate"),te=()=>["auto","contain","none"],re=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",l,t],S=()=>[l,t],pe=()=>["",z,G],K=()=>["auto",B,l],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",l],d=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[B,ge],b=()=>[B,l];return{cacheSize:500,separator:":",theme:{colors:[ae],spacing:[z,G],blur:["none","",H,l],brightness:k(),borderColor:[e],borderRadius:["none","","full",H,l],borderSpacing:S(),borderWidth:pe(),contrast:k(),grayscale:D(),hueRotate:b(),invert:D(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[At,G],inset:ne(),margin:ne(),opacity:k(),padding:S(),saturate:k(),scale:k(),sepia:D(),skew:b(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",l]}],container:["container"],columns:[{columns:[H]}],"break-after":[{"break-after":d()}],"break-before":[{"break-before":d()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),l]}],overflow:[{overflow:re()}],"overflow-x":[{"overflow-x":re()}],"overflow-y":[{"overflow-y":re()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ie,l]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",l]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ie,l]}],"grid-cols":[{"grid-cols":[ae]}],"col-start-end":[{col:["auto",{span:["full",ie,l]},l]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[ae]}],"row-start-end":[{row:["auto",{span:[ie,l]},l]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",l]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",l]}],gap:[{gap:[A]}],"gap-x":[{"gap-x":[A]}],"gap-y":[{"gap-y":[A]}],"justify-content":[{justify:["normal",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",l,t]}],"min-w":[{"min-w":[l,t,"min","max","fit"]}],"max-w":[{"max-w":[l,t,"none","full","min","max","fit","prose",{screen:[H]},H]}],h:[{h:[l,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[l,t,"auto","min","max","fit"]}],"font-size":[{text:["base",H,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ge]}],"font-family":[{font:[ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",l]}],"line-clamp":[{"line-clamp":["none",B,ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,l]}],"list-image":[{"list-image":["none",l]}],"list-style-type":[{list:["none","disc","decimal",l]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[M]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",z,G]}],"underline-offset":[{"underline-offset":["auto",z,l]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[M]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),Pt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Nt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ut]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[M]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[M]}],"divide-style":[{divide:Y()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[z,l]}],"outline-w":[{outline:[z,G]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[M]}],"ring-offset-w":[{"ring-offset":[z,G]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",H,Ot]}],"shadow-color":[{shadow:[ae]}],opacity:[{opacity:[M]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",H,l]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[I]}],invert:[{invert:[g]}],saturate:[{saturate:[J]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[M]}],"backdrop-saturate":[{"backdrop-saturate":[J]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",l]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",l]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",l]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[ie,l]}],"translate-x":[{"translate-x":[ue]}],"translate-y":[{"translate-y":[ue]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",l]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",l]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",l]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[z,G,ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const $t=Ct(Ht);function Dt(...e){return $t(ut(e))}const Ft=()=>{const e=Ze(),t=et(),r=[{id:"session",path:"/session",icon:st,label:"对话"},{id:"history",path:"/history",icon:it,label:"记录"},{id:"workspace",path:"/workspace",icon:at,label:"代码"},{id:"settings",path:"/settings",icon:ct,label:"设置"}];return f.jsxs("div",{className:"flex flex-col h-screen w-full bg-gray-50 dark:bg-gray-950 overflow-hidden",children:[f.jsx("div",{className:"flex-1 overflow-hidden relative",children:f.jsx(h.Suspense,{fallback:f.jsx(Bt,{}),children:f.jsx(tt,{})})}),f.jsx("div",{className:"h-[60px] bg-white dark:bg-gray-900 border-t border-gray-200 dark:border-gray-800 flex items-center justify-around px-2 pb-safe flex-shrink-0",children:r.map(o=>{const i=t.pathname.startsWith(o.path);return f.jsxs("button",{onClick:()=>e(o.path+t.search),className:Dt("flex flex-col items-center justify-center w-16 h-full gap-1 transition-colors",i?"text-primary-600":"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"),children:[f.jsx(o.icon,{className:"w-6 h-6"}),f.jsx("span",{className:"text-[10px] font-medium",children:o.label})]},o.id)})})]})};function Bt(){return f.jsx("div",{className:"flex h-full items-center justify-center bg-gray-50 dark:bg-gray-950 text-xs text-gray-400 dark:text-gray-600",children:"加载中..."})}const Ge=["token","agentpilot_token"],He="agentpilot_auth_token";function Vt(e){var t;for(const r of Ge){const o=(t=e.searchParams.get(r))==null?void 0:t.trim();if(o)return o}return null}function Jt(e){let t=!1;for(const r of Ge)e.searchParams.has(r)&&(e.searchParams.delete(r),t=!0);return t}function Kt(){const e=new URL(window.location.href),t=Vt(e);if(t&&sessionStorage.setItem(He,t),Jt(e)){const r=`${e.pathname}${e.search}${e.hash}`;window.history.replaceState(null,"",r)}}function $e(){return sessionStorage.getItem(He)}function Yt(){const e=$e();return e?{"X-AgentPilot-Token":e}:{}}function Xt(e){const t=$e();if(!t)return e;const r=new URL(e,window.location.href);return r.searchParams.set("token",t),r.toString()}const Qt=3e3,Zt=10,Ee="agentpilot_client_id";function er(){let e=localStorage.getItem(Ee);return e||(e=`client-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,localStorage.setItem(Ee,e)),e}class tr{constructor(t){L(this,"ws",null);L(this,"url");L(this,"handlers",new Set);L(this,"_status","disconnected");L(this,"reconnectAttempts",0);L(this,"reconnectTimer",null);L(this,"intentionalClose",!1);L(this,"statusHandlers",new Set);L(this,"requestIdCounter",0);L(this,"pendingRequests",new Map);L(this,"REQUEST_TIMEOUT",1e4);L(this,"clientId");this.url=t||this.getDefaultUrl(),this.clientId=er()}getDefaultUrl(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`}get status(){return this._status}setStatus(t){this._status=t,this.statusHandlers.forEach(r=>r(t))}onStatusChange(t){return this.statusHandlers.add(t),()=>this.statusHandlers.delete(t)}onMessage(t){return this.handlers.add(t),()=>this.handlers.delete(t)}connect(){var t,r;((t=this.ws)==null?void 0:t.readyState)===WebSocket.OPEN||((r=this.ws)==null?void 0:r.readyState)===WebSocket.CONNECTING||(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.intentionalClose=!1,this.reconnectAttempts=0,this.doConnect())}doConnect(){var t,r;if(!(((t=this.ws)==null?void 0:t.readyState)===WebSocket.OPEN||((r=this.ws)==null?void 0:r.readyState)===WebSocket.CONNECTING)){this.setStatus("connecting");try{this.ws=new WebSocket(Xt(this.url))}catch{this.setStatus("disconnected"),this.scheduleReconnect();return}this.ws.onopen=()=>{console.log("[WS] Connected to server"),this.reconnectAttempts=0,this.setStatus("connected")},this.ws.onmessage=o=>{try{const i=JSON.parse(o.data);if(i.requestId&&this.pendingRequests.has(i.requestId)){const s=this.pendingRequests.get(i.requestId);clearTimeout(s.timer),this.pendingRequests.delete(i.requestId),s.resolve(i)}this.handlers.forEach(s=>s(i))}catch(i){console.error("[WS] Failed to parse message:",i)}},this.ws.onclose=o=>{console.log(`[WS] Disconnected from ${this.url} (code=${o.code}, reason=${o.reason||"none"})`),this.setStatus("disconnected"),this.intentionalClose||this.scheduleReconnect()},this.ws.onerror=o=>{console.error(`[WS] Error connecting to ${this.url}:`,o)}}}scheduleReconnect(){if(!this.intentionalClose){if(this.reconnectAttempts>=Zt){console.log("[WS] Max reconnect attempts reached");return}this.setStatus("reconnecting"),this.reconnectAttempts++,console.log(`[WS] Reconnecting... attempt ${this.reconnectAttempts}`),this.reconnectTimer=setTimeout(()=>{this.doConnect()},Qt)}}disconnect(){this.intentionalClose=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.onopen=null,this.ws.onmessage=null,this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);for(const[t,r]of this.pendingRequests)clearTimeout(r.timer),r.reject(new Error("Disconnected"));this.pendingRequests.clear(),this.setStatus("disconnected")}send(t){var r;((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(t)):console.warn("[WS] Cannot send, not connected")}waitUntilConnected(t){var r;return((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN?Promise.resolve():(this.connect(),new Promise((o,i)=>{var c;let s=()=>{};const a=setTimeout(()=>{s(),i(new Error("Not connected"))},t);s=this.onStatusChange(()=>{var p;((p=this.ws)==null?void 0:p.readyState)===WebSocket.OPEN&&(clearTimeout(a),s(),o())}),((c=this.ws)==null?void 0:c.readyState)===WebSocket.OPEN&&(clearTimeout(a),s(),o())}))}async sendRequest(t,r=this.REQUEST_TIMEOUT){return await this.waitUntilConnected(r),new Promise((o,i)=>{var p;const s=`req_${++this.requestIdCounter}_${Date.now()}`,a={...t,requestId:s,clientId:this.clientId},c=setTimeout(()=>{this.pendingRequests.delete(s),i(new Error(`Request timeout: ${t}`))},r);this.pendingRequests.set(s,{resolve:o,reject:i,timer:c}),((p=this.ws)==null?void 0:p.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(a)):(clearTimeout(c),this.pendingRequests.delete(s),i(new Error("Not connected")))})}sendMessage(t){this.send({type:"send_message",content:t})}sendConfirmResponse(t){this.send({type:"confirm_response",approved:t})}sendQuestionResponse(t,r){this.send({type:"question_response",answer:t,toolUseId:r})}sendInterrupt(){this.send({type:"interrupt"})}sendStartCLI(t){this.send({type:"start_cli",...t})}sendRestartCLI(){this.send({type:"restart_cli"})}sendSetConfirmMode(t){this.send({type:"set_confirm_mode",mode:t})}sendGetConfig(){this.send({type:"get_config"})}sendGetSkills(){return this.sendRequest({type:"get_skills"})}sendGetSession(t={}){return this.sendRequest({type:"get_session",...t})}sendGetHistory(){return this.sendRequest({type:"get_history"})}sendGetHistoryTask(t){return this.sendRequest({type:"get_history_task",id:t})}sendResumeHistory(t,r){return this.sendRequest({type:"resume_history",id:t,content:r})}sendEditUserMessage(t,r){return this.sendRequest({type:"edit_user_message",messageId:t,content:r})}sendDeleteHistory(t){return this.sendRequest({type:"delete_history",id:t})}sendClearHistory(){return this.sendRequest({type:"clear_history"})}sendMigrateLocalData(t,r){return this.sendRequest({type:"migrate_local_data",messages:t,historyTasks:r})}sendListDir(t){return this.sendRequest({type:"list_dir",dir:t})}sendListFiles(t){return this.sendRequest({type:"list_dir",dir:t,includeFiles:!0})}sendListWorkdir(t=""){return this.sendRequest({type:"list_workdir",path:t})}sendReadWorkdirFile(t){return this.sendRequest({type:"read_workdir_file",path:t})}sendGetWorkdirChanges(t){return this.sendRequest({type:"get_workdir_changes",path:t})}sendTrackWorkdirFile(t){return this.sendRequest({type:"track_workdir_file",path:t})}sendGenerateWorkdirCommitMessage(){return this.sendRequest({type:"generate_workdir_commit_message"},12e4)}sendCommitWorkdirChanges(t){return this.sendRequest({type:"commit_workdir_changes",message:t},3e4)}destroy(){this.disconnect(),this.handlers.clear(),this.statusHandlers.clear()}}let ke=null;function De(){return ke||(ke=new tr),ke}function rr(){return window.location.origin}const nr=rr();function ce(e,t){const r=new URLSearchParams;for(const[i,s]of Object.entries(t))s!==void 0&&s!==""&&r.set(i,String(s));const o=r.toString();return o?`${e}?${o}`:e}async function P(e,t={}){const r=await fetch(`${nr}${e}`,{...t,headers:{...t.body?{"Content-Type":"application/json"}:{},...Yt(),...t.headers}}),o=await r.text(),i=o?JSON.parse(o):{};if(!r.ok)throw new Error(i.error||`HTTP ${r.status}`);return i}function X(e,t){return P(e,{method:"POST",body:JSON.stringify(t)})}function qe(e,t=!1){return P(ce("/api/dir",{dir:e,includeFiles:t}))}const Q={getConfig(){return P("/api/config")},getSkills(){return P("/api/skills")},fetchSession(e={}){return P(ce("/api/session",{afterSeq:e.afterSeq,beforeSeq:e.beforeSeq,limit:e.limit}))},fetchHistory(){return P("/api/history")},fetchHistoryTask(e){return P(`/api/history/${encodeURIComponent(e)}`)},deleteHistoryTask(e){return P(`/api/history/${encodeURIComponent(e)}`,{method:"DELETE"})},clearHistory(){return P("/api/history",{method:"DELETE"})},migrateLocalData(e,t){return X("/api/migrate-local-data",{messages:e,historyTasks:t})},listDir:qe,listFiles(e){return qe(e,!0)},listWorkdir(e=""){return P(ce("/api/workdir/tree",{path:e}))},readWorkdirFile(e){return P(ce("/api/workdir/file",{path:e}))},getWorkdirChanges(e){return P(ce("/api/workdir/changes",{path:e}))},trackWorkdirFile(e){return X("/api/workdir/track",{path:e})},stageWorkdirChanges(e){return X("/api/workdir/stage",{path:e})},unstageWorkdirChanges(e){return X("/api/workdir/unstage",{path:e})},generateWorkdirCommitMessage(){return X("/api/workdir/commit-message",{})},commitWorkdirChanges(e){return X("/api/workdir/commit",{message:e})}};function Fe(e){return{id:String(e.id),seq:typeof e.seq=="number"?e.seq:void 0,type:e.type,content:e.content||"",time:e.time||"",status:e.status||void 0,toolName:e.toolName||void 0,toolDetails:e.toolDetails||void 0,toolUseId:e.toolUseId||void 0,toolResult:e.toolResult||void 0,permission:e.permission||void 0,question:e.question||void 0,details:e.details||void 0}}function Me(e){const t=Array.isArray(e.messages);return{id:e.id,workDir:e.workDir||e.work_dir||void 0,status:e.status,title:e.title,confirmCount:e.confirmCount||e.confirm_count||0,toolCount:e.toolCount||e.tool_count||0,duration:e.duration||void 0,startTime:e.startTime||e.start_time||0,endTime:e.endTime||e.end_time||0,canResume:!!e.canResume,messagesLoaded:t,messages:t?e.messages.map(Fe):[]}}const me={async fetchSession(e={}){const t=await Q.fetchSession(e),r=(t.messages||[]).map(Fe);return{sessionId:t.sessionId,messages:r,lastSeq:t.lastSeq||0,firstSeq:t.firstSeq||0,hasMoreBefore:!!t.hasMoreBefore,tokenUsage:t.tokenUsage||{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0}}},async fetchHistory(){return((await Q.fetchHistory()).tasks||[]).map(Me)},async fetchHistoryTask(e){const t=await Q.fetchHistoryTask(e);return t.task?Me(t.task):null},async resumeHistoryTask(e,t){const o=await De().sendResumeHistory(e,t);if(!o.success)throw new Error(o.error||"恢复会话记录失败")},async deleteHistoryTask(e){await Q.deleteHistoryTask(e)},async clearHistory(){await Q.clearHistory()},async migrateFromLocal(e,t){try{return(await Q.migrateLocalData(e,t)).success}catch(r){return console.error("[Storage] Migration failed:",r),!1}}};function or(e){return e.reduce((t,r)=>{var o;return r.type!=="system"||((o=r.details)==null?void 0:o.subtype)!=="result"?t:{inputTokens:t.inputTokens+Number(r.details.inputTokens||0),outputTokens:t.outputTokens+Number(r.details.outputTokens||0),cacheReadTokens:t.cacheReadTokens+Number(r.details.cacheReadTokens||0),cacheCreationTokens:t.cacheCreationTokens+Number(r.details.cacheCreationTokens||0),costUsd:t.costUsd+Number(r.details.costUsd||0)}},{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0})}const sr=["idle","running","confirm","question","disconnected"];function be(e){return typeof e=="string"&&sr.includes(e)?e:"disconnected"}function y(e,t=""){return typeof e=="string"?e:t}const Be="agentpilot_messages",Ve="agentpilot_history",Ae=80,ir=80;function ar(){try{const e=localStorage.getItem(Be);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function cr(){try{const e=localStorage.getItem(Ve);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function lr(){localStorage.removeItem(Be),localStorage.removeItem(Ve)}const Je=h.createContext(null);function Cr(){const e=h.useContext(Je);if(!e)throw new Error("useSession must be used within SessionProvider");return e}class dr extends h.Component{constructor(){super(...arguments);L(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(r){return{hasError:!0,error:r}}render(){var r;return this.state.hasError?f.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-gray-50 p-6 text-center",children:[f.jsx("div",{className:"text-red-500 text-lg font-semibold mb-2",children:"渲染错误"}),f.jsx("div",{className:"text-gray-600 text-sm mb-4",children:(r=this.state.error)==null?void 0:r.message}),f.jsx("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"px-4 py-2 bg-primary-600 text-white rounded-lg text-sm",children:"重试"})]}):this.props.children}}function ur({children:e}){const t=h.useRef(De()),[r,o]=h.useState("disconnected"),[i,s]=h.useState([]),[a,c]=h.useState("disconnected"),[p,w]=h.useState(null),[I,g]=h.useState({inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0}),[A,R]=h.useState(!1),[j,_]=h.useState(!1),m=h.useRef(0),M=h.useRef(!0),N=h.useRef(0),J=h.useRef(!1),$=h.useRef(!1),U=h.useCallback(d=>{const k=typeof d.id=="string"&&d.id?d.id:void 0;k||(m.current+=1);const b={...d,id:k||String(m.current),content:y(d.content),time:y(d.time)},n=parseInt(b.id,10);return Number.isNaN(n)||(m.current=Math.max(m.current,n)),s(W=>[...W,b]),b},[]),O=h.useCallback(d=>{const k=[];for(const b of d){const n=k[k.length-1];(n==null?void 0:n.type)==="ai"&&b.type==="ai"||(n==null?void 0:n.type)==="thinking"&&b.type==="thinking"?n.content+=b.content:k.push({...b})}return k},[]),ee=h.useCallback(async()=>{try{const d=await me.fetchSession({limit:Ae});if(!M.current)return;if(d.messages.length>0){const k=O(d.messages);s(k),g(d.tokenUsage),R(d.hasMoreBefore);const b=Math.max(...k.map(n=>parseInt(n.id,10)||0));m.current=b}else if(J.current)R(!1);else{const k=ar(),b=cr();if(k.length>0||b.length>0){if(await me.migrateFromLocal(k,b)){lr(),J.current=!0;const W=await me.fetchSession({limit:Ae});if(M.current&&W.messages.length>0){const u=O(W.messages);s(u),g(W.tokenUsage),R(W.hasMoreBefore);const C=Math.max(...u.map(q=>parseInt(q.id,10)||0));m.current=C}}}else J.current=!0,R(!1),g({inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0})}N.current=d.lastSeq,$.current=!0}catch(d){console.error("[Session] Failed to load session from server:",d)}},[O]),ue=h.useCallback(async()=>{var k;if(j||!A)return;const d=(k=i.find(b=>typeof b.seq=="number"))==null?void 0:k.seq;if(!d){R(!1);return}_(!0);try{const b=await me.fetchSession({beforeSeq:d,limit:ir});if(!M.current)return;if(b.messages.length===0){R(!1);return}s(n=>O([...b.messages,...n])),R(b.hasMoreBefore)}catch(b){console.error("[Session] Failed to load older messages:",b)}finally{M.current&&_(!1)}},[A,j,O,i]);h.useEffect(()=>{M.current=!0;const d=t.current,k=d.onStatusChange(n=>{M.current&&(c(n),n==="disconnected"&&o("disconnected"))}),b=d.onMessage(n=>{var W;if(M.current)try{switch(n.type){case"connected":n.config&&w(n.config),o(be(n.status)),ee();break;case"config":n.config&&w(n.config),o(be(n.status));break;case"status":o(be(n.status));break;case"session_reset":s([]),m.current=0,N.current=0,$.current=!0,R(!1),o("idle"),g({inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0}),n.config&&w(n.config);break;case"session_restored":{const u=O(Array.isArray(n.messages)?n.messages:[]);s(u);const C=u.length>0?Math.max(...u.map(q=>parseInt(q.id,10)||0)):0;m.current=C,N.current=typeof n.lastSeq=="number"?n.lastSeq:0,$.current=!0,R(!1),g(or(u)),n.config&&w(n.config),o(be(n.status||"idle"));break}case"user_message":U({id:typeof n.id=="string"?n.id:void 0,seq:typeof n.seq=="number"?n.seq:void 0,type:"user",content:y(n.content),time:y(n.time)});break;case"ai_message":{const u=y(n.content),C=typeof n.id=="string"&&n.id?n.id:void 0;C||(m.current+=1);const q=C||String(m.current);s(E=>{const x=E[E.length-1];return(x==null?void 0:x.type)==="ai"?E.map((v,se)=>se===E.length-1?{...v,content:v.content+u}:v):[...E,{id:q,seq:typeof n.seq=="number"?n.seq:void 0,type:"ai",content:u,time:y(n.time)}]});break}case"thinking_message":{const u=y(n.content),C=typeof n.id=="string"&&n.id?n.id:void 0;C||(m.current+=1);const q=C||String(m.current);s(E=>{const x=E[E.length-1];return(x==null?void 0:x.type)==="thinking"?E.map((v,se)=>se===E.length-1?{...v,content:v.content+u}:v):[...E,{id:q,seq:typeof n.seq=="number"?n.seq:void 0,type:"thinking",content:u,time:y(n.time)}]});break}case"tool_call":{const u=y(n.toolUseId,void 0),C=n.status;u&&(C==="success"||C==="failed")?s(q=>{const E=q.findIndex(v=>v.toolUseId===u&&v.status==="running");if(E!==-1)return q.map((v,se)=>se===E?{...v,status:C,toolResult:y(n.details,void 0)}:v);const x=typeof n.id=="string"&&n.id?n.id:void 0;return x||(m.current+=1),[...q,{id:x||String(m.current),seq:typeof n.seq=="number"?n.seq:void 0,type:"tool",content:y(n.content),toolName:y(n.toolName),status:C,toolDetails:y(n.details,void 0),toolUseId:u,time:y(n.time)}]}):u&&C==="running"?s(q=>{const E=q.find(v=>v.toolUseId===u&&v.type==="tool");if(E)return!E.toolDetails&&n.details?q.map(v=>v.id===E.id?{...v,toolDetails:y(n.details,void 0)}:v):q;const x=typeof n.id=="string"&&n.id?n.id:void 0;return x||(m.current+=1),[...q,{id:x||String(m.current),seq:typeof n.seq=="number"?n.seq:void 0,type:"tool",content:y(n.content),toolName:y(n.toolName),status:C,toolDetails:y(n.details,void 0),toolUseId:u,time:y(n.time)}]}):U({id:typeof n.id=="string"?n.id:void 0,seq:typeof n.seq=="number"?n.seq:void 0,type:"tool",content:y(n.content),toolName:y(n.toolName),status:C,toolDetails:y(n.details,void 0),toolUseId:u,time:y(n.time)});break}case"confirm_request":U({id:typeof n.id=="string"?n.id:void 0,seq:typeof n.seq=="number"?n.seq:void 0,type:"confirm",content:y(n.content),time:y(n.time),status:"pending",permission:n.permission||void 0});break;case"confirm_result":s(u=>u.map(C=>C.type==="confirm"&&C.status==="pending"?{...C,status:n.approved?"approved":"rejected"}:C));break;case"ask_question":U({id:typeof n.id=="string"?n.id:void 0,seq:typeof n.seq=="number"?n.seq:void 0,type:"question",content:y(n.content),time:y(n.time),status:"pending",question:{questions:n.questions||[],toolUseId:n.toolUseId}});break;case"ask_question_result":s(u=>{var E;const C=typeof n.toolUseId=="string"?n.toolUseId:void 0;if(C)return u.map(x=>{var v;return x.type==="question"&&x.status==="pending"&&((v=x.question)==null?void 0:v.toolUseId)===C?{...x,status:"answered"}:x});const q=(E=u.map((x,v)=>({m:x,i:v})).filter(({m:x})=>x.type==="question"&&x.status==="pending").pop())==null?void 0:E.i;return u.map((x,v)=>v===q?{...x,status:"answered"}:x)});break;case"confirm_mode_changed":w(u=>u&&{...u,confirmMode:n.mode==="auto"?"auto":"key"});break;case"system":U({id:typeof n.id=="string"?n.id:void 0,seq:typeof n.seq=="number"?n.seq:void 0,type:"system",content:y(n.content),time:y(n.time),details:n.details||void 0}),((W=n.details)==null?void 0:W.subtype)==="result"&&g(u=>({inputTokens:u.inputTokens+(n.details.inputTokens||0),outputTokens:u.outputTokens+(n.details.outputTokens||0),cacheReadTokens:u.cacheReadTokens+(n.details.cacheReadTokens||0),cacheCreationTokens:u.cacheCreationTokens+(n.details.cacheCreationTokens||0),costUsd:u.costUsd+(n.details.costUsd||0)}));break;case"error":U({id:typeof n.id=="string"?n.id:void 0,seq:typeof n.seq=="number"?n.seq:void 0,type:"error",content:y(n.content),time:y(n.time)});break;case"session_data":case"history_resumed":case"user_message_edited":case"history_data":case"history_deleted":case"history_cleared":case"migration_done":break}}catch(u){console.error("[Session] Error handling message:",u,n)}});return d.connect(),()=>{M.current=!1,k(),b(),d.disconnect()}},[U,ee]);const te=h.useCallback(d=>{t.current.sendMessage(d)},[]),re=h.useCallback(d=>{t.current.sendConfirmResponse(d)},[]),ne=h.useCallback((d,k)=>{t.current.sendQuestionResponse(d,k)},[]),S=h.useCallback(()=>{t.current.sendInterrupt()},[]),pe=h.useCallback(d=>{t.current.sendStartCLI(d||{})},[]),K=h.useCallback(()=>{s([]),m.current=0,R(!1),g({inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0}),t.current.sendRestartCLI()},[]),fe=h.useCallback(d=>{t.current.sendSetConfirmMode(d)},[]),Y=h.useCallback(()=>{s([]),R(!1)},[]),he=h.useCallback(()=>{s([]),m.current=0,R(!1),g({inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,costUsd:0}),t.current.sendRestartCLI()},[]),oe=h.useCallback(async(d,k)=>{const b=await t.current.sendEditUserMessage(d,k);if(!b.success)throw new Error(b.error||"编辑消息失败")},[]),D={status:r,messages:i,connectionStatus:a,cliConfig:p,tokenUsage:I,hasMoreMessagesBefore:A,isLoadingOlderMessages:j,loadOlderMessages:ue,sendMessage:te,confirmResponse:re,questionResponse:ne,interrupt:S,startCLI:pe,restartCLI:K,newSession:he,editUserMessage:oe,setConfirmMode:fe,clearMessages:Y};return f.jsx(dr,{children:f.jsx(Je.Provider,{value:D,children:e})})}const Ke=h.createContext({theme:"dark",toggleTheme:()=>{}}),pr=({children:e})=>{const[t,r]=h.useState(()=>{const i=localStorage.getItem("theme");return i==="light"||i==="dark"?i:"dark"});h.useLayoutEffect(()=>{const i=document.documentElement;t==="dark"?i.classList.add("dark"):i.classList.remove("dark"),localStorage.setItem("theme",t)},[t]);const o=()=>{r(i=>i==="dark"?"light":"dark")};return f.jsx(Ke.Provider,{value:{theme:t,toggleTheme:o},children:e})},Tr=()=>h.useContext(Ke),fr=de.lazy(()=>we(()=>import("./Session-EFYFIC_X.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.Session}))),hr=de.lazy(()=>we(()=>import("./History-DR_K6WbO.js"),__vite__mapDeps([6,1,3,4,5,7])).then(e=>({default:e.History}))),gr=de.lazy(()=>we(()=>import("./Workspace-CJvVQVzU.js"),__vite__mapDeps([8,1,9,10,4,5,7])).then(e=>({default:e.Workspace}))),mr=de.lazy(()=>we(()=>import("./Settings-DgmHC_Hw.js"),__vite__mapDeps([11,1,7,5,4])).then(e=>({default:e.Settings}))),br=()=>f.jsx(pr,{children:f.jsx(ur,{children:f.jsx(rt,{children:f.jsxs(nt,{children:[f.jsxs(F,{path:"/",element:f.jsx(Ft,{}),children:[f.jsx(F,{index:!0,element:f.jsx(Te,{to:"/session",replace:!0})}),f.jsx(F,{path:"session",element:f.jsx(fr,{})}),f.jsx(F,{path:"history",element:f.jsx(hr,{})}),f.jsx(F,{path:"workspace",element:f.jsx(gr,{})}),f.jsx(F,{path:"settings",element:f.jsx(mr,{})})]}),f.jsx(F,{path:"*",element:f.jsx(Te,{to:"/session",replace:!0})})]})})})});let V=null,ye=!1,Le=!1;const ve=new Set;function Ce(){return typeof window<"u"&&typeof window.matchMedia=="function"}function yr(){return Ce()?window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.navigator.standalone===!0:!1}function wr(){return Ce()?/iphone|ipad|ipod/i.test(window.navigator.userAgent):!1}function le(){ve.forEach(e=>e())}function Ne(e,t){var o;if(typeof e.addEventListener=="function")return e.addEventListener("change",t),()=>e.removeEventListener("change",t);const r=e;return(o=r.addListener)==null||o.call(r,t),()=>{var i;return(i=r.removeListener)==null?void 0:i.call(r,t)}}function Ye(){if(!Ce()||Le)return;Le=!0;const e=()=>{le()},t=o=>{o.preventDefault(),V=o,le()},r=()=>{V=null,le()};window.addEventListener("beforeinstallprompt",t),window.addEventListener("appinstalled",r),Ne(window.matchMedia("(display-mode: standalone)"),e),Ne(window.matchMedia("(display-mode: fullscreen)"),e)}function Ir(){const e=yr();return{canPromptInstall:!!V&&!e,isInstalled:e,isInstalling:ye,isIos:wr()}}function Rr(e){return Ye(),ve.add(e),()=>{ve.delete(e)}}async function _r(){if(!V||ye)return"unavailable";ye=!0,le();try{await V.prompt();const e=await V.userChoice;return V=null,e.outcome}finally{ye=!1,le()}}function kr(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js",{scope:"/"}).catch(e=>{console.warn("[PWA] Service worker registration failed:",e)})})}Ye();Kt();kr();ot.createRoot(document.getElementById("root")).render(f.jsx(de.StrictMode,{children:f.jsx(br,{})}));export{we as _,Q as a,Ir as b,Dt as c,Rr as d,Tr as e,De as g,_r as p,me as s,Cr as u};
|