@minimaxclaw/cli 1.0.44 → 1.0.45

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.
Files changed (75) hide show
  1. package/README.md +17 -19
  2. package/package.json +9 -9
  3. package/web/dist/assets/{AssistantsView-Y4TXobGE.js → AssistantsView-Y3nFezhd.js} +1 -1
  4. package/web/dist/assets/AutomationView-bf7_zU_p.js +4 -0
  5. package/web/dist/assets/Button-B43HsIQ3.js +1 -0
  6. package/web/dist/assets/{ChannelConfigView-WJ-zUV8p.js → ChannelConfigView---Dwl3Fk.js} +3 -3
  7. package/web/dist/assets/ChartsView-Dw6G-jf3.js +1 -0
  8. package/web/dist/assets/{ConnectorsView-DaHmxnGE.js → ConnectorsView-BWvdrpyK.js} +2 -2
  9. package/web/dist/assets/{DiffPreview-D8tIj_aF.js → DiffPreview-WQihq3bK.js} +57 -56
  10. package/web/dist/assets/{FileContextMenu-C5WYeBNu.js → FileContextMenu-CyjXlSHp.js} +1 -1
  11. package/web/dist/assets/FileTreeView-Cafy33nT.js +1 -0
  12. package/web/dist/assets/HookConfigView-D-lASVju.js +2 -0
  13. package/web/dist/assets/InboxView-BWajw-Yx.js +1 -0
  14. package/web/dist/assets/InputArea-CSqaA55j.js +31 -0
  15. package/web/dist/assets/Install-ClEm4oGX.js +2 -0
  16. package/web/dist/assets/MemoryView-DLri75dm.js +1 -0
  17. package/web/dist/assets/ModelsView-BBLUMzR5.js +1 -0
  18. package/web/dist/assets/PluginsView-C-fnbDGZ.js +1 -0
  19. package/web/dist/assets/ProjectsView-BruI2W_l.js +1 -0
  20. package/web/dist/assets/{SessionGrid-BQSrCDqQ.js → SessionGrid-7GLpwn6d.js} +4 -4
  21. package/web/dist/assets/SettingsModal-cc9Qu2QU.js +4 -0
  22. package/web/dist/assets/SkillsView-Bf-2-U_q.js +1 -0
  23. package/web/dist/assets/TemplatesTab-CKul8nbL.js +2 -0
  24. package/web/dist/assets/{ToolsView-CjdYiaNz.js → ToolsView-D_aluOsK.js} +1 -1
  25. package/web/dist/assets/WorkspaceDirPicker-Z42YqE4a.js +5 -0
  26. package/web/dist/assets/{agentIconSet-CDeMxTHf.js → agentIconSet-Cqhm4UOl.js} +1 -1
  27. package/web/dist/assets/api-BW4-5gtM.js +1 -0
  28. package/web/dist/assets/chatStore-D8Zzr1hE.js +242 -0
  29. package/web/dist/assets/cn-CoHJgTJ5.js +1 -0
  30. package/web/dist/assets/{common-CPZxdYLs.js → common-CP2UB8TN.js} +99 -99
  31. package/web/dist/assets/icons-CittejKL.js +1 -0
  32. package/web/dist/assets/imageUrl-BVgcEm7e.js +2 -0
  33. package/web/dist/assets/index-CEUbTcNL.css +1 -0
  34. package/web/dist/assets/index-CxrzleFg.js +122 -0
  35. package/web/dist/assets/{markdown-Cps-36Z5.js → markdown-DZQBOzWk.js} +1 -1
  36. package/web/dist/assets/{panels-DCwx2Pbu.js → panels-CuDz4aqU.js} +1 -1
  37. package/web/dist/assets/projectsStore-B7fdKRzl.js +1 -0
  38. package/web/dist/assets/{react-vendor-CXI113IS.js → react-vendor-BEA-EtI-.js} +1 -1
  39. package/web/dist/assets/{settingsStore-BSdi9gNd.js → settingsStore-DYqiXodu.js} +1 -1
  40. package/web/dist/assets/src-55YckF5W.js +2 -0
  41. package/web/dist/assets/{state-pOTP5BEk.js → state-A4wJ8QgR.js} +1 -1
  42. package/web/dist/assets/{statusAxesRefresh--2evRuAU.js → statusAxesRefresh-BBqszCp-.js} +1 -1
  43. package/web/dist/assets/sttLanguages-jnSk4aqg.js +6 -0
  44. package/web/dist/assets/threadStore-CQi4OzSe.js +1 -0
  45. package/web/dist/assets/useConfirm-kTv3x0H6.js +1 -0
  46. package/web/dist/assets/{useTranslation-gGKZZfux.js → useTranslation-2BGEBvJE.js} +1 -1
  47. package/web/dist/assets/websocket-DCs7f54y.js +1 -0
  48. package/web/dist/assets/whatsNewStore-DoCQvcMq.js +1 -0
  49. package/web/dist/index.html +27 -23
  50. package/web/dist/assets/AutomationView-DfAF2L92.js +0 -3
  51. package/web/dist/assets/Button-D-g7PgYh.js +0 -1
  52. package/web/dist/assets/ChartsView-CSAfGqTC.js +0 -1
  53. package/web/dist/assets/FileTreeView-B7IN0KmE.js +0 -1
  54. package/web/dist/assets/HookConfigView-9gqvrRhQ.js +0 -2
  55. package/web/dist/assets/InboxView-BcEfijbj.js +0 -1
  56. package/web/dist/assets/InputArea-D5F91Uwk.js +0 -14
  57. package/web/dist/assets/Install-Cuelo0If.js +0 -2
  58. package/web/dist/assets/MemoryView-BvZSh5-T.js +0 -1
  59. package/web/dist/assets/ModelsView-BgvMN8xv.js +0 -1
  60. package/web/dist/assets/PluginsView-C3d6e8vV.js +0 -1
  61. package/web/dist/assets/ProjectsView-CM7GOsoK.js +0 -1
  62. package/web/dist/assets/SettingsModal-BvGXq5EE.js +0 -4
  63. package/web/dist/assets/SkillsView-87kGRliE.js +0 -1
  64. package/web/dist/assets/TemplatesTab-8MLwVNwV.js +0 -1
  65. package/web/dist/assets/api-ZQf0Ys8y.js +0 -1
  66. package/web/dist/assets/icons-B8Ngx6rM.js +0 -1
  67. package/web/dist/assets/imageUrl-CrQM4gmf.js +0 -74
  68. package/web/dist/assets/index-Bm7r92T3.css +0 -1
  69. package/web/dist/assets/index-STsyoFCk.js +0 -145
  70. package/web/dist/assets/src-BK8SoTFV.js +0 -1
  71. package/web/dist/assets/sttLanguages-BPcOF0nQ.js +0 -2
  72. package/web/dist/assets/useConfirm-CQjBnYuP.js +0 -1
  73. package/web/dist/assets/websocket-CeKJTCdp.js +0 -1
  74. package/web/dist/assets/whatsNewStore-C0hbStfc.js +0 -1
  75. package/web/dist/assets/workspaceSemantics-CW8ytHq2.js +0 -3
@@ -0,0 +1,5 @@
1
+ import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{Ar as t,Cn as n,En as r,Jr as i,Or as a,dt as o,ii as s,n as c,pn as l,qt as u}from"./icons-CittejKL.js";import{r as d}from"./react-vendor-BEA-EtI-.js";import{t as f}from"./useTranslation-2BGEBvJE.js";import{n as p,t as m}from"./Button-B43HsIQ3.js";import{n as h,t as g}from"./projectsStore-B7fdKRzl.js";import{t as _}from"./api-BW4-5gtM.js";import{r as v}from"./settingsStore-DYqiXodu.js";import{I as y}from"./markdown-DZQBOzWk.js";import{t as b}from"./cn-CoHJgTJ5.js";import"./common-CP2UB8TN.js";var x=e(s(),1),S=d(),C=y();function w(e,t){if(!e)return t;let n=e.includes(`\\`)?`\\`:`/`;return e.endsWith(n)?e+t:e+n+t}function T(e,t=48){let n=e.replace(/[\\/]+$/,``);if(n.length<=t)return n;let r=n.includes(`\\`)?`\\`:`/`;return`…${r}${n.split(/[\\/]+/).filter(Boolean).slice(-2).join(r)}`}function E(e){return e.replace(/[\\/]+/g,`/`).replace(/\/+$/,``).toLowerCase()}function D({isOpen:e,initial:t,onClose:o,onConfirm:s}){let{t:d}=f(),{visible:h,phase:g}=p(e),[v,y]=(0,x.useState)(t),[b,S]=(0,x.useState)(null),[T,E]=(0,x.useState)([]),[D,O]=(0,x.useState)(!1),[k,A]=(0,x.useState)(``),[j,M]=(0,x.useState)(t),N=(0,x.useRef)(null),P=(0,x.useCallback)(async e=>{O(!0),A(``);try{let t=await _.dirs.list(e);if(!t.success||!t.data){A(t.error||d(`chat.dirPickerLoadError`));return}y(t.data.path),S(t.data.parent),E(t.data.dirs||[]),M(t.data.path)}catch(e){A(e instanceof Error?e.message:d(`chat.dirPickerLoadError`))}finally{O(!1)}},[d]);(0,x.useEffect)(()=>{e&&P(t)},[e,t,P]),(0,x.useEffect)(()=>{N.current?.focus()},[]),(0,x.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),o())};return document.addEventListener(`keydown`,t),document.body.style.overflow=`hidden`,()=>{document.removeEventListener(`keydown`,t),document.body.style.overflow=``}},[e,o]);let F=(0,x.useCallback)(()=>{let e=j.trim();e&&P(e)},[j,P]),I=(0,x.useCallback)(()=>{b&&P(b)},[b,P]);return h?(0,C.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center overflow-hidden p-4`,role:`dialog`,"aria-modal":`true`,children:[(0,C.jsx)(`div`,{className:`absolute inset-0 ui-scrim ui-overlay-backdrop`,"data-phase":g,onClick:o}),(0,C.jsxs)(`div`,{className:`relative w-full max-w-lg mx-4 bg-dark-overlay ui-surface-overlay border border-dark-border rounded-xl shadow-pop flex flex-col max-h-[70vh] ui-overlay-panel`,"data-phase":g,children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2.5 border-b border-dark-border shrink-0`,children:[(0,C.jsxs)(`span`,{className:`flex items-center gap-2 text-compact font-semibold text-dark-text`,children:[(0,C.jsx)(r,{size:15,className:`text-accent-blue`,"aria-hidden":`true`}),d(`chat.dirPickerTitle`)]}),(0,C.jsx)(`button`,{type:`button`,onClick:o,className:`rounded p-1 text-dark-muted hover:bg-dark-hover hover:text-dark-text transition-colors`,"aria-label":d(`a11y.close`),children:(0,C.jsx)(c,{size:15,"aria-hidden":`true`})})]}),(0,C.jsxs)(`div`,{className:`p-4 flex flex-col gap-3 min-h-0 flex-1`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,C.jsxs)(`div`,{className:`relative flex-1`,children:[(0,C.jsx)(l,{size:13,className:`absolute start-2.5 top-1/2 -translate-y-1/2 text-dark-muted/60`,"aria-hidden":`true`}),(0,C.jsx)(`input`,{ref:N,value:j,onChange:e=>M(e.target.value),onKeyDown:e=>{e.key===`Enter`&&F()},placeholder:d(`chat.dirPickerEnterPath`),spellCheck:!1,className:`w-full rounded-lg border border-dark-border bg-dark-surface ps-8 pe-2.5 py-1.5 text-xs font-mono text-dark-text
2
+ placeholder-dark-muted/50 focus:outline-none focus:border-accent-blue/50 focus:ring-2 focus:ring-accent-blue/10`})]}),(0,C.jsx)(`button`,{type:`button`,onClick:F,disabled:D||!j.trim(),className:`shrink-0 rounded-lg border border-dark-border px-2.5 py-1.5 text-xs text-dark-muted
3
+ hover:bg-dark-hover hover:text-dark-text disabled:opacity-40 transition-colors`,children:d(`chat.dirPickerGo`)})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(`span`,{className:`flex-1 truncate font-mono text-meta text-dark-muted bg-dark-surface rounded-md px-2 py-1 border border-dark-border`,title:v,children:v||d(`chat.noWorkspaceDir`)}),(0,C.jsxs)(`button`,{type:`button`,onClick:()=>void I(),disabled:D||!v,className:`shrink-0 flex items-center gap-1 rounded-md border border-dark-border px-2 py-1 text-meta text-dark-muted
4
+ hover:bg-dark-hover hover:text-dark-text disabled:opacity-40 transition-colors`,children:[(0,C.jsx)(i,{size:12,"aria-hidden":`true`}),d(`chat.dirPickerUp`)]})]}),(0,C.jsx)(`div`,{className:`flex-1 min-h-0 overflow-y-auto custom-scrollbar rounded-lg border border-dark-border bg-dark-surface divide-y divide-dark-border/60`,children:D?(0,C.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-xs text-dark-muted`,children:[(0,C.jsx)(u,{size:14,className:`animate-spin`,"aria-hidden":`true`}),d(`chat.loading`)]}):k?(0,C.jsx)(`div`,{className:`px-3 py-4 text-xs text-accent-red`,children:k}):T.length===0?(0,C.jsx)(`div`,{className:`px-3 py-4 text-xs text-dark-muted/60 text-center`,children:d(`chat.dirPickerNoDirs`)}):T.map(e=>{let t=w(v,e);return(0,C.jsxs)(`button`,{type:`button`,onClick:()=>void P(t),className:`w-full flex items-center gap-2 px-3 py-1.5 text-start text-xs text-dark-text
5
+ hover:bg-dark-hover transition-colors group`,children:[(0,C.jsx)(n,{size:13,className:`shrink-0 text-accent-yellow/80 group-hover:text-accent-yellow`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:`truncate`,children:e}),(0,C.jsx)(a,{size:12,className:`shrink-0 ms-auto text-dark-muted/40`,"aria-hidden":`true`})]},e)})}),(0,C.jsx)(m,{variant:`accent`,className:`w-full`,onClick:()=>s(v),disabled:!v,loading:D,children:d(`chat.dirPickerConfirm`)})]})]})]}):null}var O=288,k=8,A=8;function j(e){let t=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,i=Math.min(Math.max(t.width,O),n-16),a=Math.max(A,Math.min(t.right-i,n-i-A)),o=r-t.bottom-k-A,s=t.top-k-A,c=o<320&&s>o,l=Math.max(160,Math.min(r*.7,c?s:o));return c?{left:a,width:i,maxHeight:l,bottom:r-t.top+k}:{left:a,width:i,maxHeight:l,top:t.bottom+k}}var M=(0,x.memo)(function({workspaceDir:e,onSelect:i,onNewSessionInDir:s,compact:c=!1,variant:l=`chip`,placeholder:u,ariaLabel:d}){let{t:p}=f(),m=v(e=>e.recentDirs),_=h(e=>e.projects),y=h(e=>e.hidden),w=h(e=>e.sort),O=h(e=>e.disabled),k=h(e=>e.lastError),A=l===`field`,[M,N]=(0,x.useState)(!1),[P,F]=(0,x.useState)(!1),[I,L]=(0,x.useState)(null),R=(0,x.useRef)(null),z=(0,x.useRef)(null),B=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(!M)return;let e=h.getState();e.disabled||e.lastFetchedAt>0||e.refresh()},[M]),(0,x.useEffect)(()=>{let e=z.current;if(!M||!e){L(null);return}let t=()=>L(t=>{let n=j(e);return t&&t.left===n.left&&t.width===n.width&&t.maxHeight===n.maxHeight&&t.top===n.top&&t.bottom===n.bottom?t:n});return t(),document.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,t),()=>{document.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,t)}},[M]),(0,x.useEffect)(()=>{if(!M)return;let e=e=>{let t=e.target;R.current?.contains(t)||B.current?.contains(t)||N(!1)},t=e=>{e.key===`Escape`&&N(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[M]);let V=(0,x.useCallback)(e=>{let t=e?.trim?.()||``;t&&(N(!1),F(!1),i(t))},[i]),H=(0,x.useCallback)(e=>{let t=e?.trim?.()||``;t&&s&&(N(!1),F(!1),s(t))},[s]),U=new Set(y),W=O?[]:g(_.filter(e=>e.rootExists&&!U.has(e.projectId)),w),G=new Set(W.map(e=>E(e.root))),K=m.filter(e=>!G.has(E(e))),q=e?E(e):null,J=W.length>0||_.length===0&&!O&&k!==null;return(0,C.jsxs)(`div`,{className:b(`min-w-0`,c||A?`w-full`:`relative max-w-[min(70%,26rem)]`),ref:R,children:[(0,C.jsxs)(`button`,{ref:z,type:`button`,onClick:()=>N(e=>!e),className:b(`flex w-full items-center whitespace-nowrap transition-colors cursor-pointer`,A?b(`gap-1.5 rounded-lg border bg-dark-bg px-3 py-2 text-sm text-start text-dark-text`,M?`border-accent-blue/60 ring-1 ring-accent-blue/20`:`border-dark-border hover:bg-dark-hover`):b(`gap-1 py-0.5 rounded-full border text-xs`,c?`px-1.5`:`px-2`,M?`border-accent-blue/40 text-accent-blue bg-accent-blue/10`:`border-dark-border text-dark-muted hover:bg-dark-hover hover:text-dark-text`)),title:e?`${e}\n${p(`chat.clickToSwitchDir`)}`:p(`chat.clickToSwitchDir`),"aria-label":d??p(`chat.clickToSwitchDir`),"aria-expanded":M,"aria-haspopup":`menu`,children:[(0,C.jsx)(r,{size:A?14:12,className:`shrink-0 text-accent-blue/80`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:b(`truncate font-mono`,A?`text-xs`:`text-meta`,c&&`max-sm:hidden`,A&&!e&&`text-dark-muted/60`),children:e?T(e,A?64:48):u??p(`chat.noWorkspaceDir`)}),(0,C.jsx)(t,{size:11,className:b(`shrink-0 transition-transform`,M&&`rotate-180`),"aria-hidden":`true`})]}),M&&I&&(0,S.createPortal)((0,C.jsxs)(`div`,{ref:B,role:`menu`,"data-testid":`dir-picker-panel`,style:{position:`fixed`,left:I.left,width:I.width,maxHeight:I.maxHeight,...I.top===void 0?{bottom:I.bottom}:{top:I.top}},className:`overflow-y-auto custom-scrollbar rounded-xl border border-dark-border bg-dark-overlay ui-surface-overlay shadow-pop z-[60] animate-fade-in`,children:[J&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`px-3 pt-2.5 pb-1 text-badge font-semibold uppercase tracking-wide text-dark-muted/50 select-none`,children:p(`chat.projectDirs`)}),W.length===0?(0,C.jsx)(`div`,{className:`px-3 pb-2 text-meta text-accent-red/80 select-none`,children:p(`chat.projectsLoadFailed`)}):(0,C.jsx)(`div`,{className:`max-h-44 overflow-y-auto custom-scrollbar`,"data-testid":`dir-picker-projects`,children:W.map(e=>{let t=q!==null&&E(e.root)===q;return(0,C.jsxs)(`div`,{className:`flex items-stretch`,children:[(0,C.jsxs)(`button`,{type:`button`,role:`menuitem`,"data-testid":`dir-picker-project-row`,"data-project-id":e.projectId,onClick:()=>V(e.root),className:b(`min-w-0 flex-1 flex items-center gap-2 px-3 py-1.5 text-start text-xs transition-colors group`,t?`text-accent-blue bg-accent-blue/5`:`text-dark-text hover:bg-dark-hover`),title:`${p(`chat.dirSwitchHere`)}\n${e.root}`,children:[(0,C.jsx)(n,{size:12,className:b(`shrink-0`,t?`text-accent-blue`:`text-accent-yellow/80 group-hover:text-accent-yellow`),"aria-hidden":`true`}),(0,C.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,C.jsx)(`span`,{className:`block truncate`,children:e.name}),(0,C.jsx)(`span`,{className:`block truncate font-mono text-meta text-dark-muted/60`,children:e.root})]}),t&&(0,C.jsx)(`span`,{className:`shrink-0 text-badge text-accent-blue`,children:`✓`})]}),s&&(0,C.jsx)(`button`,{type:`button`,"data-testid":`dir-picker-project-new-session`,"data-project-id":e.projectId,onClick:t=>{t.stopPropagation(),H(e.root)},className:`shrink-0 px-2 text-dark-muted hover:text-accent-blue hover:bg-dark-hover transition-colors`,title:p(`chat.dirNewSessionHere`),"aria-label":`${p(`chat.dirNewSessionHere`)}:${e.name}`,children:(0,C.jsx)(o,{size:12,"aria-hidden":`true`})})]},e.projectId)})}),(0,C.jsx)(`div`,{className:`border-t border-dark-border`})]}),(0,C.jsx)(`div`,{className:`px-3 pt-2.5 pb-1 text-badge font-semibold uppercase tracking-wide text-dark-muted/50 select-none`,children:p(`chat.recentDirs`)}),K.length===0?(0,C.jsx)(`div`,{className:`px-3 pb-2 text-meta text-dark-muted/50 select-none`,children:p(`chat.noRecentDirs`)}):(0,C.jsx)(`div`,{className:`max-h-56 overflow-y-auto custom-scrollbar`,children:K.map(e=>{let t=q!==null&&E(e)===q;return(0,C.jsxs)(`div`,{className:`flex items-stretch`,children:[(0,C.jsxs)(`button`,{type:`button`,role:`menuitem`,"data-testid":`dir-picker-recent-row`,onClick:()=>V(e),className:b(`min-w-0 flex-1 flex items-center gap-2 px-3 py-1.5 text-start text-xs transition-colors group`,t?`text-accent-blue bg-accent-blue/5`:`text-dark-text hover:bg-dark-hover`),title:`${p(`chat.dirSwitchHere`)}\n${e}`,children:[(0,C.jsx)(n,{size:12,className:b(`shrink-0`,t?`text-accent-blue`:`text-accent-yellow/80 group-hover:text-accent-yellow`),"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-meta`,children:e}),t&&(0,C.jsx)(`span`,{className:`ms-auto shrink-0 text-badge text-accent-blue`,children:`✓`})]}),s&&(0,C.jsx)(`button`,{type:`button`,"data-testid":`dir-picker-recent-new-session`,onClick:t=>{t.stopPropagation(),H(e)},className:`shrink-0 px-2 text-dark-muted hover:text-accent-blue hover:bg-dark-hover transition-colors`,title:p(`chat.dirNewSessionHere`),"aria-label":`${p(`chat.dirNewSessionHere`)}:${e}`,children:(0,C.jsx)(o,{size:12,"aria-hidden":`true`})})]},e)})}),(0,C.jsx)(`div`,{className:`border-t border-dark-border`}),(0,C.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{N(!1),F(!0)},className:`w-full flex items-center gap-2 px-3 py-2 text-start text-xs text-accent-blue hover:bg-dark-hover transition-colors`,children:[(0,C.jsx)(a,{size:13,"aria-hidden":`true`}),p(`chat.chooseOtherDir`)]})]}),document.body),(0,S.createPortal)((0,C.jsx)(D,{isOpen:P,initial:e||``,onClose:()=>F(!1),onConfirm:V}),document.body)]})});export{M as n,D as t};
@@ -1 +1 @@
1
- import{I as e}from"./markdown-Cps-36Z5.js";var t=e(),n=[{id:`normal`,label:`灵动`,emoji:`👀`},{id:`sleepy`,label:`困困`,emoji:`😴`},{id:`surprised`,label:`惊讶`,emoji:`😳`},{id:`happy`,label:`开心`,emoji:`😊`},{id:`kiss`,label:`飞吻`,emoji:`😘`},{id:`love`,label:`爱心眼`,emoji:`😍`},{id:`angry`,label:`认真`,emoji:`😠`}],r=[{id:`midnight`,name:`午夜小团子`,cat:`经典`,desc:`安静 · 专注`,colors:[`#111722`,`#4a5262`,`#03060b`],acc:`🪽`},{id:`berry`,name:`莓果甜心`,cat:`可爱`,desc:`甜甜 · 俏皮`,colors:[`#ff78ad`,`#ffb7d2`,`#8d2d61`],acc:`🎀`},{id:`jade`,name:`翡翠王子`,cat:`奇幻`,desc:`优雅 · 沉稳`,colors:[`#075c47`,`#4ba58a`,`#021d1a`],acc:`👑`},{id:`blaze`,name:`烈焰明星`,cat:`潮流`,desc:`热烈 · 自信`,colors:[`#ff171d`,`#ff8a80`,`#8a0010`],acc:`🪶`},{id:`blues`,name:`蓝调玩家`,cat:`潮流`,desc:`酷感 · 松弛`,colors:[`#164eaa`,`#4f91f8`,`#06142f`],acc:`🕶️`},{id:`bride`,name:`白纱新娘`,cat:`可爱`,desc:`温柔 · 梦幻`,colors:[`#fff3d9`,`#ffffff`,`#d4c5b2`],acc:`👰`},{id:`galaxy`,name:`银河幽灵`,cat:`奇幻`,desc:`神秘 · 漂浮`,colors:[`#8e7bff`,`#c4baff`,`#382a81`],acc:`✨`},{id:`lemon`,name:`柠檬汽水`,cat:`自然`,desc:`清爽 · 元气`,colors:[`#b5d92e`,`#f0ff9c`,`#4e6411`],acc:`🍋`},{id:`cream`,name:`奶油云朵`,cat:`可爱`,desc:`软糯 · 治愈`,colors:[`#f2e9dd`,`#ffffff`,`#c7b7a8`],acc:`☁️`},{id:`sakura`,name:`樱花武士`,cat:`奇幻`,desc:`勇敢 · 温柔`,colors:[`#e45f91`,`#ffb5cf`,`#7e244c`],acc:`🎎`},{id:`cyber`,name:`赛博像素`,cat:`潮流`,desc:`未来 · 高能`,colors:[`#18d8d0`,`#a1fff7`,`#075a70`],acc:`🤖`},{id:`pumpkin`,name:`南瓜精灵`,cat:`节日`,desc:`古灵精怪`,colors:[`#ff7b25`,`#ffc078`,`#8b3000`],acc:`🎃`},{id:`snow`,name:`雪夜旅人`,cat:`自然`,desc:`冷静 · 清透`,colors:[`#8fc9e8`,`#e0f8ff`,`#326b91`],acc:`❄️`},{id:`devil`,name:`小恶魔`,cat:`奇幻`,desc:`调皮 · 狡黠`,colors:[`#a83254`,`#f56e83`,`#4a0b23`],acc:`😈`},{id:`mushroom`,name:`森林蘑菇`,cat:`自然`,desc:`自然 · 慢活`,colors:[`#6b8f52`,`#c6d9a2`,`#2a4525`],acc:`🍄`},{id:`gold`,name:`黄金会员`,cat:`奢华`,desc:`闪耀 · 稀有`,colors:[`#d69c27`,`#ffe6a0`,`#71440c`],acc:`👑`},{id:`astro`,name:`宇航员`,cat:`奇幻`,desc:`探索 · 好奇`,colors:[`#64758c`,`#e2ecff`,`#263348`],acc:`🚀`},{id:`catcap`,name:`猫耳队长`,cat:`可爱`,desc:`敏捷 · 机灵`,colors:[`#6b6de2`,`#b7b8ff`,`#2d2b7a`],acc:`🐱`},{id:`mintbot`,name:`薄荷机器人`,cat:`科技`,desc:`理性 · 可靠`,colors:[`#3cbda2`,`#b1f5e4`,`#126858`],acc:`🤖`},{id:`vinyl`,name:`复古唱片`,cat:`潮流`,desc:`复古 · 慵懒`,colors:[`#9c6d51`,`#e7b99a`,`#4d2e23`],acc:`🎧`},{id:`seal`,name:`海盐海豹`,cat:`自然`,desc:`软萌 · 平和`,colors:[`#729fb9`,`#cce9f7`,`#31526d`],acc:`🐚`},{id:`rainbow`,name:`彩虹糖豆`,cat:`可爱`,desc:`快乐 · 多彩`,colors:[`#df66d4`,`#ffc5f5`,`#792c7d`],acc:`🌈`},{id:`count`,name:`暗夜伯爵`,cat:`奢华`,desc:`神秘 · 高贵`,colors:[`#28213f`,`#71658e`,`#0b0914`],acc:`🎩`},{id:`birthday`,name:`生日派对`,cat:`节日`,desc:`庆祝 · 欢腾`,colors:[`#ff9b58`,`#ffe4a8`,`#b44b7a`],acc:`🎉`},{id:`wizard`,name:`代码巫师`,cat:`科技`,desc:`聪明 · 专注`,colors:[`#3867db`,`#92b5ff`,`#172d72`],acc:`🪄`},{id:`desert`,name:`沙漠旅者`,cat:`自然`,desc:`自由 · 坚韧`,colors:[`#c58b5a`,`#f2d0a5`,`#754629`],acc:`🧢`},{id:`bubble`,name:`泡泡糖`,cat:`可爱`,desc:`活泼 · 甜酷`,colors:[`#fa8bc8`,`#ffd3e9`,`#a52e73`],acc:`🫧`},{id:`bolt`,name:`雷电侠`,cat:`潮流`,desc:`速度 · 能量`,colors:[`#f1c928`,`#fff1a3`,`#8d6800`],acc:`⚡`},{id:`deepsea`,name:`深海潜行者`,cat:`自然`,desc:`沉静 · 深邃`,colors:[`#126b83`,`#61d0df`,`#04303e`],acc:`🐠`},{id:`gelato`,name:`冰淇淋骑士`,cat:`可爱`,desc:`甜品 · 勇气`,colors:[`#e6a6cb`,`#ffe3f3`,`#a45a89`],acc:`🍦`},{id:`halloween`,name:`万圣夜`,cat:`节日`,desc:`怪趣 · 暗黑`,colors:[`#5e347e`,`#bd81e9`,`#251038`],acc:`🦇`},{id:`angel`,name:`晨光天使`,cat:`奇幻`,desc:`希望 · 温暖`,colors:[`#f5d9a4`,`#fff8dc`,`#b99858`],acc:`😇`},{id:`rocker`,name:`摇滚主唱`,cat:`潮流`,desc:`自由 · 不羁`,colors:[`#4b4b58`,`#a8a8bd`,`#181820`],acc:`🎸`},{id:`gardener`,name:`小小园丁`,cat:`自然`,desc:`生长 · 友善`,colors:[`#70aa65`,`#c9e8b9`,`#2d6031`],acc:`🌱`},{id:`pearl`,name:`珍珠公主`,cat:`奢华`,desc:`优雅 · 闪亮`,colors:[`#d6c9ec`,`#fff6ff`,`#8e7da8`],acc:`💎`},{id:`xmas`,name:`圣诞精灵`,cat:`节日`,desc:`温暖 · 欢乐`,colors:[`#247d58`,`#a3e0b8`,`#10412d`],acc:`🎄`},{id:`mars`,name:`火星来客`,cat:`科技`,desc:`奇妙 · 外星`,colors:[`#db6b52`,`#ffc1a9`,`#843523`],acc:`👽`},{id:`tea`,name:`茶茶大师`,cat:`自然`,desc:`松弛 · 清醒`,colors:[`#94734d`,`#d9bd92`,`#503c26`],acc:`🍵`},{id:`koi`,name:`幸运锦鲤`,cat:`奇幻`,desc:`好运 · 闪耀`,colors:[`#ef8159`,`#ffd2a3`,`#9e3c2d`],acc:`🍀`},{id:`ghost`,name:`像素幽灵`,cat:`科技`,desc:`轻巧 · 数字`,colors:[`#8ca2a9`,`#e4f3f6`,`#3c535a`],acc:`👾`}],i=[[`#111722`,`#4a5262`,`#03060b`],[`#ff78ad`,`#ffb7d2`,`#8d2d61`],[`#075c47`,`#4ba58a`,`#021d1a`],[`#164eaa`,`#4f91f8`,`#06142f`],[`#8e7bff`,`#c4baff`,`#382a81`],[`#ff7b25`,`#ffc078`,`#8b3000`],[`#f2e9dd`,`#ffffff`,`#c7b7a8`],[`#18d8d0`,`#a1fff7`,`#075a70`],[`#d69c27`,`#ffe6a0`,`#71440c`],[`#df66d4`,`#ffc5f5`,`#792c7d`]],a=[{id:`none`,label:`无配件`},{id:`bow`,label:`蝴蝶结`},{id:`crown`,label:`王冠`},{id:`glasses`,label:`太阳镜`,layer:`front`},{id:`wings`,label:`天使翅膀`},{id:`feather`,label:`羽毛围脖`},{id:`ears`,label:`猫耳`},{id:`horns`,label:`恶魔角`},{id:`halo`,label:`光环`},{id:`headphones`,label:`耳机`},{id:`hat`,label:`魔法帽`},{id:`star`,label:`星星`},{id:`gem`,label:`皇冠宝石`},{id:`party`,label:`派对帽`},{id:`scarf`,label:`围巾`},{id:`sprout`,label:`小芽`},{id:`flower`,label:`花朵`},{id:`flame`,label:`小火焰`},{id:`snow`,label:`雪花`},{id:`fish`,label:`小鱼`},{id:`coffee`,label:`咖啡杯`},{id:`rocket`,label:`火箭`},{id:`mask`,label:`面具`,layer:`front`},{id:`ghost`,label:`小幽灵`}],o={"🎀":`bow`,"👑":`crown`,"🕶️":`glasses`,"🤓":`glasses`,"🪽":`wings`,"🪶":`feather`,"🐱":`ears`,"🐰":`ears`,"😈":`horns`,"🦇":`horns`,"😇":`halo`,"🎧":`headphones`,"🎸":`headphones`,"🧙":`hat`,"🪄":`hat`,"🎩":`hat`,"⭐":`star`,"✨":`star`,"⚡":`star`,"🚀":`star`,"🌈":`star`,"🫧":`star`,"💎":`gem`,"🐚":`gem`,"🐠":`gem`,"🥳":`party`,"🎉":`party`,"🍦":`party`,"🧣":`scarf`,"🍃":`sprout`,"🌱":`sprout`,"🍀":`sprout`,"🎄":`sprout`,"🍄":`sprout`,"🍋":`sprout`,"☁️":`wings`,"👰":`bow`,"🎎":`bow`,"🎃":`horns`,"👽":`ears`,"👾":`glasses`,"🍵":`sprout`,"🧢":`feather`},s={经典:`feather`,可爱:`bow`,奇幻:`star`,潮流:`glasses`,自然:`sprout`,科技:`headphones`,奢华:`gem`,节日:`party`};function c(e){return o[e.acc]??s[e.cat]}var l=`M40 11C25 11 17 22 19 35C7 43 7 59 14 71C21 84 30 88 40 88C54 88 66 78 68 62C71 49 65 39 61 34C63 20 53 11 40 11Z`,u=`M40 12C27 12 21 23 22 34C15 42 13 54 18 65C21 73 28 79 35 80C25 65 26 52 31 43C35 34 46 28 55 31C56 19 49 12 40 12Z`;function d(e){return e<=26?`small`:`large`}function f(e){return Math.min(7.5,Math.max(1.8,116/e))}var p=1.35,m=1.16,h=`#3f3646`;function g(e){let t=Number.parseInt(e.replace(`#`,``),16),n=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(t&255)}function _(e,t){let n=g(e),r=g(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function v(e,t){let n=Number.parseInt(e.replace(`#`,``),16),r=e=>Math.round(e+(255-e)*t).toString(16).padStart(2,`0`);return`#${r(n>>16&255)}${r(n>>8&255)}${r(n&255)}`}function y(e){let[t,n]=e,r=v(n,.22);return _(r,t)>=_(h,t)?r:h}function b(e,n){switch(e){case`happy`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M22 39Q29 30 36 39`,fill:`none`,stroke:n,strokeWidth:3.5,strokeLinecap:`round`}),(0,t.jsx)(`path`,{d:`M44 39Q51 30 58 39`,fill:`none`,stroke:n,strokeWidth:3.5,strokeLinecap:`round`})]});case`love`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M29 44C14 34 22 25 29 33C36 25 44 34 29 44Z`,fill:`#ff7eaa`}),(0,t.jsx)(`path`,{d:`M51 44C36 34 44 25 51 33C58 25 66 34 51 44Z`,fill:`#ff7eaa`})]});case`angry`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M22 35L35 39`,stroke:n,strokeWidth:4,strokeLinecap:`round`}),(0,t.jsx)(`path`,{d:`M45 39L58 35`,stroke:n,strokeWidth:4,strokeLinecap:`round`})]});case`surprised`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`ellipse`,{cx:29,cy:37,rx:6.5,ry:8,fill:n}),(0,t.jsx)(`ellipse`,{cx:51,cy:37,rx:6.5,ry:8,fill:n})]});default:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`ellipse`,{cx:29,cy:38,rx:6.5,ry:7.5,fill:n}),(0,t.jsx)(`ellipse`,{cx:51,cy:38,rx:6.5,ry:7.5,fill:n})]})}}function x(e,n){switch(e){case`sleepy`:return(0,t.jsx)(`path`,{d:`M37 51Q40 48 43 51`,fill:`none`,stroke:n,strokeWidth:2.4,strokeLinecap:`round`});case`surprised`:return(0,t.jsx)(`ellipse`,{cx:40,cy:51,rx:3.2,ry:4.2,fill:n});case`happy`:return(0,t.jsx)(`path`,{d:`M33 48Q40 57 47 48`,fill:`none`,stroke:n,strokeWidth:2.5,strokeLinecap:`round`});case`love`:return(0,t.jsx)(`path`,{d:`M35 49Q40 54 45 49`,fill:`none`,stroke:n,strokeWidth:2.4,strokeLinecap:`round`});case`angry`:return(0,t.jsx)(`path`,{d:`M34 52H46`,stroke:n,strokeWidth:2.5,strokeLinecap:`round`});case`kiss`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M38 49Q40 46 43 49Q40 54 38 49Z`,fill:`#ff8caf`,stroke:n,strokeWidth:1}),(0,t.jsx)(`path`,{d:`M60 34C54 27 64 23 67 30C70 23 80 27 73 34L67 40Z`,fill:`#ff5f9a`}),(0,t.jsx)(`path`,{d:`M63 48C58 43 65 39 68 44C71 39 78 43 72 48L68 52Z`,fill:`#ff8caf`})]});default:return(0,t.jsx)(`path`,{d:`M39 49Q43 52 47 49`,fill:`none`,stroke:n,strokeWidth:2.4,strokeLinecap:`round`})}}function S(e){return a.find(t=>t.id===e)?.layer===`front`?`front`:`behind`}function C(e,n,r){switch(e){case`bow`:return(0,t.jsxs)(`g`,{transform:`translate(60 13)`,children:[(0,t.jsx)(`path`,{d:`M0 0Q-18 -13 -16 1Q-11 10 0 3Q12 12 17 1Q17 -12 0 0`,fill:`#ff86b8`,stroke:`#f7d5e5`,strokeWidth:r*.5}),(0,t.jsx)(`circle`,{r:4,fill:`#ffc6df`})]});case`crown`:return(0,t.jsxs)(`g`,{transform:`translate(39 11)`,stroke:`#e8b847`,strokeWidth:r*.7,strokeLinejoin:`round`,children:[(0,t.jsx)(`path`,{d:`M-15 5L-19 -8 -7 0 0 -13 7 0 19 -8 15 5Z`,fill:`#f7d778`}),(0,t.jsx)(`path`,{d:`M-15 5H15V10H-15Z`,fill:`#dba72f`}),(0,t.jsx)(`circle`,{cx:0,cy:-13,r:2,fill:`#fff1b5`})]});case`glasses`:return(0,t.jsxs)(`g`,{transform:`translate(39 38)`,stroke:`#e9eef7`,strokeWidth:r*.7,children:[(0,t.jsx)(`path`,{d:`M-27 -4Q-12 -10 -3 -3L-5 7Q-14 13 -23 6Z`,fill:`#172335`,fillOpacity:.92}),(0,t.jsx)(`path`,{d:`M3 -3Q14 -10 27 -4L23 6Q14 13 5 7Z`,fill:`#172335`,fillOpacity:.92}),(0,t.jsx)(`path`,{d:`M-4 0H4`,strokeWidth:r})]});case`wings`:return(0,t.jsxs)(`g`,{fill:`#fff`,fillOpacity:.78,stroke:`#d7d5e4`,strokeWidth:r*.25,children:[(0,t.jsx)(`path`,{d:`M16 31Q-4 9 0 23Q-4 14 8 39L19 49Z`}),(0,t.jsx)(`path`,{d:`M62 31Q82 9 78 23Q82 14 70 39L59 49Z`})]});case`feather`:return(0,t.jsxs)(`g`,{fill:`#fff5f7`,stroke:`#e8dce1`,strokeWidth:r*.28,children:[(0,t.jsx)(`path`,{d:`M16 54Q-1 45 7 57L16 64 10 65 20 68 25 63Z`}),(0,t.jsx)(`path`,{d:`M62 54Q79 45 71 57L62 64 68 65 58 68 53 63Z`})]});case`ears`:return(0,t.jsxs)(`g`,{fill:n[0],stroke:n[1],strokeWidth:r*.7,children:[(0,t.jsx)(`path`,{d:`M19 25L16 5Q29 12 32 22Z`}),(0,t.jsx)(`path`,{d:`M59 22Q62 12 75 5L72 25Z`})]});case`horns`:return(0,t.jsxs)(`g`,{fill:`#c73b5d`,stroke:`#ffb3bd`,strokeWidth:r*.35,children:[(0,t.jsx)(`path`,{d:`M19 25Q8 3 18 9L31 22Z`}),(0,t.jsx)(`path`,{d:`M59 22L72 9Q82 3 71 25Z`})]});case`halo`:return(0,t.jsx)(`ellipse`,{cx:39,cy:7,rx:18,ry:5,fill:`none`,stroke:`#f3d578`,strokeWidth:r});case`headphones`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M13 40V33Q13 8 39 8Q65 8 65 33V40`,fill:`none`,stroke:`#b5a5ff`,strokeWidth:r*1.7}),(0,t.jsx)(`rect`,{x:10,y:34,width:9,height:17,rx:4,fill:`#9e8aff`}),(0,t.jsx)(`rect`,{x:59,y:34,width:9,height:17,rx:4,fill:`#9e8aff`})]});case`hat`:return(0,t.jsxs)(`g`,{children:[(0,t.jsx)(`path`,{d:`M19 23L32 -5Q36 -12 41 -4L61 23Z`,fill:`#4b327e`,stroke:`#bca4ff`,strokeWidth:r*.5}),(0,t.jsx)(`ellipse`,{cx:40,cy:23,rx:23,ry:5,fill:`#7456ad`}),(0,t.jsx)(`path`,{d:`M31 8L37 4 42 10 48 5`,fill:`none`,stroke:`#ffe68c`,strokeWidth:r*.7})]});case`star`:return(0,t.jsx)(`g`,{fill:`#ffe27d`,stroke:`#fff4c4`,strokeWidth:r*.35,children:(0,t.jsx)(`path`,{d:`M63 15L66 22 74 23 68 28 70 36 63 31 56 36 58 28 52 23 60 22Z`})});case`gem`:return(0,t.jsx)(`path`,{d:`M27 13L34 7H44L51 13 39 25Z`,fill:`#a4eaff`,stroke:`#eaffff`,strokeWidth:r*.5});case`party`:return(0,t.jsxs)(`g`,{children:[(0,t.jsx)(`path`,{d:`M20 22L30 0 41 18 51 -2 61 22Z`,fill:`#ffce5b`}),(0,t.jsx)(`circle`,{cx:30,cy:0,r:2,fill:`#ff7ca8`}),(0,t.jsx)(`circle`,{cx:51,cy:-2,r:2,fill:`#8d80ff`})]});case`scarf`:return(0,t.jsx)(`path`,{d:`M19 58Q39 66 60 57L65 66Q40 77 17 67Z`,fill:`#dc4d63`,stroke:`#ffb2bd`,strokeWidth:r*.35});case`sprout`:return(0,t.jsx)(`path`,{d:`M60 23Q58 4 75 7Q76 23 60 23M60 23Q44 8 42 20Q48 29 60 23`,fill:`#83c77d`,stroke:`#d4f2bc`,strokeWidth:r*.5});case`flower`:return(0,t.jsxs)(`g`,{transform:`translate(64 16)`,children:[[0,72,144,216,288].map(e=>(0,t.jsx)(`ellipse`,{cx:0,cy:-6,rx:4.2,ry:5,fill:`#ffb3d1`,stroke:`#fff0f6`,strokeWidth:r*.25,transform:`rotate(${e})`},e)),(0,t.jsx)(`circle`,{r:3,fill:`#ffd166`})]});case`flame`:return(0,t.jsxs)(`g`,{transform:`translate(63 8)`,children:[(0,t.jsx)(`path`,{d:`M0 6C-7 0 -4 -8 0 -14C4 -8 7 0 0 6Z`,fill:`#ff7a3d`,stroke:`#ffd7a8`,strokeWidth:r*.3}),(0,t.jsx)(`path`,{d:`M0 4C-3.4 1 -2 -4 0 -7C2 -4 3.4 1 0 4Z`,fill:`#ffd166`})]});case`snow`:return(0,t.jsx)(`g`,{transform:`translate(64 15)`,stroke:`#bce7ff`,strokeWidth:r*.45,strokeLinecap:`round`,children:[0,60,120].map(e=>(0,t.jsx)(`path`,{d:`M0 -8V8`,transform:`rotate(${e})`},e))});case`fish`:return(0,t.jsxs)(`g`,{transform:`translate(65 52)`,children:[(0,t.jsx)(`path`,{d:`M-6 0Q0 -6 6 0Q0 6 -6 0Z`,fill:`#7fd8ea`,stroke:`#d7f6ff`,strokeWidth:r*.3}),(0,t.jsx)(`path`,{d:`M6 0L11 -4V4Z`,fill:`#7fd8ea`})]});case`coffee`:return(0,t.jsxs)(`g`,{transform:`translate(65 70)`,children:[(0,t.jsx)(`path`,{d:`M-7 -5H5V6Q-1 10 -7 6Z`,fill:`#f0e3d2`,stroke:`#c9b79f`,strokeWidth:r*.3}),(0,t.jsx)(`path`,{d:`M5 -3Q10 -1 5 3`,fill:`none`,stroke:`#c9b79f`,strokeWidth:r*.5})]});case`rocket`:return(0,t.jsxs)(`g`,{transform:`translate(65 18) rotate(28)`,children:[(0,t.jsx)(`path`,{d:`M0 -12C6 -6 6 4 0 8C-6 4 -6 -6 0 -12Z`,fill:`#eef2f8`,stroke:`#c3ccd9`,strokeWidth:r*.3}),(0,t.jsx)(`circle`,{cy:-2,r:2.4,fill:`#7cc7ff`}),(0,t.jsx)(`path`,{d:`M0 8L-3.4 12H3.4Z`,fill:`#ff8a80`})]});case`mask`:return(0,t.jsxs)(`g`,{transform:`translate(62 46)`,children:[(0,t.jsx)(`path`,{d:`M-8 -6Q0 -10 8 -6Q7 6 0 9Q-7 6 -8 -6Z`,fill:`#f6f1ff`,stroke:`#c9bce6`,strokeWidth:r*.35}),(0,t.jsx)(`circle`,{cx:-3,cy:-2,r:1.6,fill:`#3f3646`}),(0,t.jsx)(`circle`,{cx:3,cy:-2,r:1.6,fill:`#3f3646`}),(0,t.jsx)(`path`,{d:`M-3 3Q0 5 3 3`,fill:`none`,stroke:`#3f3646`,strokeWidth:r*.35,strokeLinecap:`round`})]});case`ghost`:return(0,t.jsx)(`g`,{transform:`translate(64 24)`,children:(0,t.jsx)(`path`,{d:`M-6 -2Q-6 -10 0 -10Q6 -10 6 -2V6L3 3.6 0 6 -3 3.6 -6 6Z`,fill:`#f2f4ff`,fillOpacity:.92,stroke:`#cfd6ee`,strokeWidth:r*.3})});default:return null}}function w({colors:e,expression:n=`normal`,accessory:r=`none`,tier:i=`large`,uid:a,size:o}){let s=e,c=i===`small`?`translate(40 46) scale(${i===`small`?p:1}) translate(-40 -46)`:void 0,d=i===`small`?`translate(40 44) scale(${i===`small`?m:1}) translate(-40 -44)`:void 0,h=f(o),g=i===`large`,_=`bg${a}`,v=y(s),w=S(r)===`front`;return(0,t.jsxs)(`svg`,{viewBox:`0 0 80 94`,width:o,height:o,"aria-hidden":`true`,style:{overflow:`visible`},children:[(0,t.jsxs)(`defs`,{children:[(0,t.jsxs)(`radialGradient`,{id:`${_}a`,cx:`30%`,cy:`22%`,r:`78%`,children:[(0,t.jsx)(`stop`,{stopColor:s[1]}),(0,t.jsx)(`stop`,{offset:.36,stopColor:s[0]}),(0,t.jsx)(`stop`,{offset:1,stopColor:s[2]})]}),g&&(0,t.jsxs)(`linearGradient`,{id:`${_}b`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,t.jsx)(`stop`,{stopColor:`#fff`,stopOpacity:.6}),(0,t.jsx)(`stop`,{offset:.5,stopColor:`#fff`,stopOpacity:0}),(0,t.jsx)(`stop`,{offset:1,stopColor:`#fff`,stopOpacity:.05})]})]}),!w&&(0,t.jsx)(`g`,{className:`ag-deco`,transform:c,children:C(r,s,h)}),(0,t.jsx)(`path`,{d:l,fill:`url(#${_}a)`,stroke:v,strokeOpacity:.26,strokeWidth:g?1.2:h*.45}),g&&(0,t.jsx)(`path`,{d:u,fill:`url(#${_}b)`}),w&&(0,t.jsx)(`g`,{className:`ag-deco`,transform:c,children:C(r,s,h)}),(0,t.jsx)(`g`,{className:`ag-eye`,transform:d,children:b(n,v)}),x(n,v),g&&(0,t.jsx)(`ellipse`,{cx:40,cy:88,rx:23,ry:3,fill:s[2],opacity:.12})]})}var T=r.map(e=>({id:e.id,cat:e.cat,name:e.name,desc:e.desc,colors:e.colors,accessory:c(e)}));T.map(e=>e.id);function E(e){let t=5381;for(let n=0;n<e.length;n++)t=t*33^e.charCodeAt(n);return(t%2147483647+2147483647)%2147483647}function D(e){return e?T[E(`${e}:icon`)%T.length]:T[0]}function O(e){return T.find(t=>t.id===e)??T[0]}var k={running:`normal`,waiting:`surprised`,done:`happy`,failed:`angry`};function A(e){return e?k[e]:`normal`}export{a,i as c,y as d,d as f,D as i,r as l,O as n,l as o,A as r,n as s,T as t,w as u};
1
+ import{I as e}from"./markdown-DZQBOzWk.js";var t=e(),n=[{id:`normal`,label:`灵动`,emoji:`👀`},{id:`sleepy`,label:`困困`,emoji:`😴`},{id:`surprised`,label:`惊讶`,emoji:`😳`},{id:`happy`,label:`开心`,emoji:`😊`},{id:`kiss`,label:`飞吻`,emoji:`😘`},{id:`love`,label:`爱心眼`,emoji:`😍`},{id:`angry`,label:`认真`,emoji:`😠`}],r=[{id:`midnight`,name:`午夜小团子`,cat:`经典`,desc:`安静 · 专注`,colors:[`#111722`,`#4a5262`,`#03060b`],acc:`🪽`},{id:`berry`,name:`莓果甜心`,cat:`可爱`,desc:`甜甜 · 俏皮`,colors:[`#ff78ad`,`#ffb7d2`,`#8d2d61`],acc:`🎀`},{id:`jade`,name:`翡翠王子`,cat:`奇幻`,desc:`优雅 · 沉稳`,colors:[`#075c47`,`#4ba58a`,`#021d1a`],acc:`👑`},{id:`blaze`,name:`烈焰明星`,cat:`潮流`,desc:`热烈 · 自信`,colors:[`#ff171d`,`#ff8a80`,`#8a0010`],acc:`🪶`},{id:`blues`,name:`蓝调玩家`,cat:`潮流`,desc:`酷感 · 松弛`,colors:[`#164eaa`,`#4f91f8`,`#06142f`],acc:`🕶️`},{id:`bride`,name:`白纱新娘`,cat:`可爱`,desc:`温柔 · 梦幻`,colors:[`#fff3d9`,`#ffffff`,`#d4c5b2`],acc:`👰`},{id:`galaxy`,name:`银河幽灵`,cat:`奇幻`,desc:`神秘 · 漂浮`,colors:[`#8e7bff`,`#c4baff`,`#382a81`],acc:`✨`},{id:`lemon`,name:`柠檬汽水`,cat:`自然`,desc:`清爽 · 元气`,colors:[`#b5d92e`,`#f0ff9c`,`#4e6411`],acc:`🍋`},{id:`cream`,name:`奶油云朵`,cat:`可爱`,desc:`软糯 · 治愈`,colors:[`#f2e9dd`,`#ffffff`,`#c7b7a8`],acc:`☁️`},{id:`sakura`,name:`樱花武士`,cat:`奇幻`,desc:`勇敢 · 温柔`,colors:[`#e45f91`,`#ffb5cf`,`#7e244c`],acc:`🎎`},{id:`cyber`,name:`赛博像素`,cat:`潮流`,desc:`未来 · 高能`,colors:[`#18d8d0`,`#a1fff7`,`#075a70`],acc:`🤖`},{id:`pumpkin`,name:`南瓜精灵`,cat:`节日`,desc:`古灵精怪`,colors:[`#ff7b25`,`#ffc078`,`#8b3000`],acc:`🎃`},{id:`snow`,name:`雪夜旅人`,cat:`自然`,desc:`冷静 · 清透`,colors:[`#8fc9e8`,`#e0f8ff`,`#326b91`],acc:`❄️`},{id:`devil`,name:`小恶魔`,cat:`奇幻`,desc:`调皮 · 狡黠`,colors:[`#a83254`,`#f56e83`,`#4a0b23`],acc:`😈`},{id:`mushroom`,name:`森林蘑菇`,cat:`自然`,desc:`自然 · 慢活`,colors:[`#6b8f52`,`#c6d9a2`,`#2a4525`],acc:`🍄`},{id:`gold`,name:`黄金会员`,cat:`奢华`,desc:`闪耀 · 稀有`,colors:[`#d69c27`,`#ffe6a0`,`#71440c`],acc:`👑`},{id:`astro`,name:`宇航员`,cat:`奇幻`,desc:`探索 · 好奇`,colors:[`#64758c`,`#e2ecff`,`#263348`],acc:`🚀`},{id:`catcap`,name:`猫耳队长`,cat:`可爱`,desc:`敏捷 · 机灵`,colors:[`#6b6de2`,`#b7b8ff`,`#2d2b7a`],acc:`🐱`},{id:`mintbot`,name:`薄荷机器人`,cat:`科技`,desc:`理性 · 可靠`,colors:[`#3cbda2`,`#b1f5e4`,`#126858`],acc:`🤖`},{id:`vinyl`,name:`复古唱片`,cat:`潮流`,desc:`复古 · 慵懒`,colors:[`#9c6d51`,`#e7b99a`,`#4d2e23`],acc:`🎧`},{id:`seal`,name:`海盐海豹`,cat:`自然`,desc:`软萌 · 平和`,colors:[`#729fb9`,`#cce9f7`,`#31526d`],acc:`🐚`},{id:`rainbow`,name:`彩虹糖豆`,cat:`可爱`,desc:`快乐 · 多彩`,colors:[`#df66d4`,`#ffc5f5`,`#792c7d`],acc:`🌈`},{id:`count`,name:`暗夜伯爵`,cat:`奢华`,desc:`神秘 · 高贵`,colors:[`#28213f`,`#71658e`,`#0b0914`],acc:`🎩`},{id:`birthday`,name:`生日派对`,cat:`节日`,desc:`庆祝 · 欢腾`,colors:[`#ff9b58`,`#ffe4a8`,`#b44b7a`],acc:`🎉`},{id:`wizard`,name:`代码巫师`,cat:`科技`,desc:`聪明 · 专注`,colors:[`#3867db`,`#92b5ff`,`#172d72`],acc:`🪄`},{id:`desert`,name:`沙漠旅者`,cat:`自然`,desc:`自由 · 坚韧`,colors:[`#c58b5a`,`#f2d0a5`,`#754629`],acc:`🧢`},{id:`bubble`,name:`泡泡糖`,cat:`可爱`,desc:`活泼 · 甜酷`,colors:[`#fa8bc8`,`#ffd3e9`,`#a52e73`],acc:`🫧`},{id:`bolt`,name:`雷电侠`,cat:`潮流`,desc:`速度 · 能量`,colors:[`#f1c928`,`#fff1a3`,`#8d6800`],acc:`⚡`},{id:`deepsea`,name:`深海潜行者`,cat:`自然`,desc:`沉静 · 深邃`,colors:[`#126b83`,`#61d0df`,`#04303e`],acc:`🐠`},{id:`gelato`,name:`冰淇淋骑士`,cat:`可爱`,desc:`甜品 · 勇气`,colors:[`#e6a6cb`,`#ffe3f3`,`#a45a89`],acc:`🍦`},{id:`halloween`,name:`万圣夜`,cat:`节日`,desc:`怪趣 · 暗黑`,colors:[`#5e347e`,`#bd81e9`,`#251038`],acc:`🦇`},{id:`angel`,name:`晨光天使`,cat:`奇幻`,desc:`希望 · 温暖`,colors:[`#f5d9a4`,`#fff8dc`,`#b99858`],acc:`😇`},{id:`rocker`,name:`摇滚主唱`,cat:`潮流`,desc:`自由 · 不羁`,colors:[`#4b4b58`,`#a8a8bd`,`#181820`],acc:`🎸`},{id:`gardener`,name:`小小园丁`,cat:`自然`,desc:`生长 · 友善`,colors:[`#70aa65`,`#c9e8b9`,`#2d6031`],acc:`🌱`},{id:`pearl`,name:`珍珠公主`,cat:`奢华`,desc:`优雅 · 闪亮`,colors:[`#d6c9ec`,`#fff6ff`,`#8e7da8`],acc:`💎`},{id:`xmas`,name:`圣诞精灵`,cat:`节日`,desc:`温暖 · 欢乐`,colors:[`#247d58`,`#a3e0b8`,`#10412d`],acc:`🎄`},{id:`mars`,name:`火星来客`,cat:`科技`,desc:`奇妙 · 外星`,colors:[`#db6b52`,`#ffc1a9`,`#843523`],acc:`👽`},{id:`tea`,name:`茶茶大师`,cat:`自然`,desc:`松弛 · 清醒`,colors:[`#94734d`,`#d9bd92`,`#503c26`],acc:`🍵`},{id:`koi`,name:`幸运锦鲤`,cat:`奇幻`,desc:`好运 · 闪耀`,colors:[`#ef8159`,`#ffd2a3`,`#9e3c2d`],acc:`🍀`},{id:`ghost`,name:`像素幽灵`,cat:`科技`,desc:`轻巧 · 数字`,colors:[`#8ca2a9`,`#e4f3f6`,`#3c535a`],acc:`👾`}],i=[[`#111722`,`#4a5262`,`#03060b`],[`#ff78ad`,`#ffb7d2`,`#8d2d61`],[`#075c47`,`#4ba58a`,`#021d1a`],[`#164eaa`,`#4f91f8`,`#06142f`],[`#8e7bff`,`#c4baff`,`#382a81`],[`#ff7b25`,`#ffc078`,`#8b3000`],[`#f2e9dd`,`#ffffff`,`#c7b7a8`],[`#18d8d0`,`#a1fff7`,`#075a70`],[`#d69c27`,`#ffe6a0`,`#71440c`],[`#df66d4`,`#ffc5f5`,`#792c7d`]],a=[{id:`none`,label:`无配件`},{id:`bow`,label:`蝴蝶结`},{id:`crown`,label:`王冠`},{id:`glasses`,label:`太阳镜`,layer:`front`},{id:`wings`,label:`天使翅膀`},{id:`feather`,label:`羽毛围脖`},{id:`ears`,label:`猫耳`},{id:`horns`,label:`恶魔角`},{id:`halo`,label:`光环`},{id:`headphones`,label:`耳机`},{id:`hat`,label:`魔法帽`},{id:`star`,label:`星星`},{id:`gem`,label:`皇冠宝石`},{id:`party`,label:`派对帽`},{id:`scarf`,label:`围巾`},{id:`sprout`,label:`小芽`},{id:`flower`,label:`花朵`},{id:`flame`,label:`小火焰`},{id:`snow`,label:`雪花`},{id:`fish`,label:`小鱼`},{id:`coffee`,label:`咖啡杯`},{id:`rocket`,label:`火箭`},{id:`mask`,label:`面具`,layer:`front`},{id:`ghost`,label:`小幽灵`}],o={"🎀":`bow`,"👑":`crown`,"🕶️":`glasses`,"🤓":`glasses`,"🪽":`wings`,"🪶":`feather`,"🐱":`ears`,"🐰":`ears`,"😈":`horns`,"🦇":`horns`,"😇":`halo`,"🎧":`headphones`,"🎸":`headphones`,"🧙":`hat`,"🪄":`hat`,"🎩":`hat`,"⭐":`star`,"✨":`star`,"⚡":`star`,"🚀":`star`,"🌈":`star`,"🫧":`star`,"💎":`gem`,"🐚":`gem`,"🐠":`gem`,"🥳":`party`,"🎉":`party`,"🍦":`party`,"🧣":`scarf`,"🍃":`sprout`,"🌱":`sprout`,"🍀":`sprout`,"🎄":`sprout`,"🍄":`sprout`,"🍋":`sprout`,"☁️":`wings`,"👰":`bow`,"🎎":`bow`,"🎃":`horns`,"👽":`ears`,"👾":`glasses`,"🍵":`sprout`,"🧢":`feather`},s={经典:`feather`,可爱:`bow`,奇幻:`star`,潮流:`glasses`,自然:`sprout`,科技:`headphones`,奢华:`gem`,节日:`party`};function c(e){return o[e.acc]??s[e.cat]}var l=`M40 11C25 11 17 22 19 35C7 43 7 59 14 71C21 84 30 88 40 88C54 88 66 78 68 62C71 49 65 39 61 34C63 20 53 11 40 11Z`,u=`M40 12C27 12 21 23 22 34C15 42 13 54 18 65C21 73 28 79 35 80C25 65 26 52 31 43C35 34 46 28 55 31C56 19 49 12 40 12Z`;function d(e){return e<=26?`small`:`large`}function f(e){return Math.min(7.5,Math.max(1.8,116/e))}var p=1.35,m=1.16,h=`#3f3646`;function g(e){let t=Number.parseInt(e.replace(`#`,``),16),n=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*n(t>>16&255)+.7152*n(t>>8&255)+.0722*n(t&255)}function _(e,t){let n=g(e),r=g(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function v(e,t){let n=Number.parseInt(e.replace(`#`,``),16),r=e=>Math.round(e+(255-e)*t).toString(16).padStart(2,`0`);return`#${r(n>>16&255)}${r(n>>8&255)}${r(n&255)}`}function y(e){let[t,n]=e,r=v(n,.22);return _(r,t)>=_(h,t)?r:h}function b(e,n){switch(e){case`happy`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M22 39Q29 30 36 39`,fill:`none`,stroke:n,strokeWidth:3.5,strokeLinecap:`round`}),(0,t.jsx)(`path`,{d:`M44 39Q51 30 58 39`,fill:`none`,stroke:n,strokeWidth:3.5,strokeLinecap:`round`})]});case`love`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M29 44C14 34 22 25 29 33C36 25 44 34 29 44Z`,fill:`#ff7eaa`}),(0,t.jsx)(`path`,{d:`M51 44C36 34 44 25 51 33C58 25 66 34 51 44Z`,fill:`#ff7eaa`})]});case`angry`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M22 35L35 39`,stroke:n,strokeWidth:4,strokeLinecap:`round`}),(0,t.jsx)(`path`,{d:`M45 39L58 35`,stroke:n,strokeWidth:4,strokeLinecap:`round`})]});case`surprised`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`ellipse`,{cx:29,cy:37,rx:6.5,ry:8,fill:n}),(0,t.jsx)(`ellipse`,{cx:51,cy:37,rx:6.5,ry:8,fill:n})]});default:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`ellipse`,{cx:29,cy:38,rx:6.5,ry:7.5,fill:n}),(0,t.jsx)(`ellipse`,{cx:51,cy:38,rx:6.5,ry:7.5,fill:n})]})}}function x(e,n){switch(e){case`sleepy`:return(0,t.jsx)(`path`,{d:`M37 51Q40 48 43 51`,fill:`none`,stroke:n,strokeWidth:2.4,strokeLinecap:`round`});case`surprised`:return(0,t.jsx)(`ellipse`,{cx:40,cy:51,rx:3.2,ry:4.2,fill:n});case`happy`:return(0,t.jsx)(`path`,{d:`M33 48Q40 57 47 48`,fill:`none`,stroke:n,strokeWidth:2.5,strokeLinecap:`round`});case`love`:return(0,t.jsx)(`path`,{d:`M35 49Q40 54 45 49`,fill:`none`,stroke:n,strokeWidth:2.4,strokeLinecap:`round`});case`angry`:return(0,t.jsx)(`path`,{d:`M34 52H46`,stroke:n,strokeWidth:2.5,strokeLinecap:`round`});case`kiss`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M38 49Q40 46 43 49Q40 54 38 49Z`,fill:`#ff8caf`,stroke:n,strokeWidth:1}),(0,t.jsx)(`path`,{d:`M60 34C54 27 64 23 67 30C70 23 80 27 73 34L67 40Z`,fill:`#ff5f9a`}),(0,t.jsx)(`path`,{d:`M63 48C58 43 65 39 68 44C71 39 78 43 72 48L68 52Z`,fill:`#ff8caf`})]});default:return(0,t.jsx)(`path`,{d:`M39 49Q43 52 47 49`,fill:`none`,stroke:n,strokeWidth:2.4,strokeLinecap:`round`})}}function S(e){return a.find(t=>t.id===e)?.layer===`front`?`front`:`behind`}function C(e,n,r){switch(e){case`bow`:return(0,t.jsxs)(`g`,{transform:`translate(60 13)`,children:[(0,t.jsx)(`path`,{d:`M0 0Q-18 -13 -16 1Q-11 10 0 3Q12 12 17 1Q17 -12 0 0`,fill:`#ff86b8`,stroke:`#f7d5e5`,strokeWidth:r*.5}),(0,t.jsx)(`circle`,{r:4,fill:`#ffc6df`})]});case`crown`:return(0,t.jsxs)(`g`,{transform:`translate(39 11)`,stroke:`#e8b847`,strokeWidth:r*.7,strokeLinejoin:`round`,children:[(0,t.jsx)(`path`,{d:`M-15 5L-19 -8 -7 0 0 -13 7 0 19 -8 15 5Z`,fill:`#f7d778`}),(0,t.jsx)(`path`,{d:`M-15 5H15V10H-15Z`,fill:`#dba72f`}),(0,t.jsx)(`circle`,{cx:0,cy:-13,r:2,fill:`#fff1b5`})]});case`glasses`:return(0,t.jsxs)(`g`,{transform:`translate(39 38)`,stroke:`#e9eef7`,strokeWidth:r*.7,children:[(0,t.jsx)(`path`,{d:`M-27 -4Q-12 -10 -3 -3L-5 7Q-14 13 -23 6Z`,fill:`#172335`,fillOpacity:.92}),(0,t.jsx)(`path`,{d:`M3 -3Q14 -10 27 -4L23 6Q14 13 5 7Z`,fill:`#172335`,fillOpacity:.92}),(0,t.jsx)(`path`,{d:`M-4 0H4`,strokeWidth:r})]});case`wings`:return(0,t.jsxs)(`g`,{fill:`#fff`,fillOpacity:.78,stroke:`#d7d5e4`,strokeWidth:r*.25,children:[(0,t.jsx)(`path`,{d:`M16 31Q-4 9 0 23Q-4 14 8 39L19 49Z`}),(0,t.jsx)(`path`,{d:`M62 31Q82 9 78 23Q82 14 70 39L59 49Z`})]});case`feather`:return(0,t.jsxs)(`g`,{fill:`#fff5f7`,stroke:`#e8dce1`,strokeWidth:r*.28,children:[(0,t.jsx)(`path`,{d:`M16 54Q-1 45 7 57L16 64 10 65 20 68 25 63Z`}),(0,t.jsx)(`path`,{d:`M62 54Q79 45 71 57L62 64 68 65 58 68 53 63Z`})]});case`ears`:return(0,t.jsxs)(`g`,{fill:n[0],stroke:n[1],strokeWidth:r*.7,children:[(0,t.jsx)(`path`,{d:`M19 25L16 5Q29 12 32 22Z`}),(0,t.jsx)(`path`,{d:`M59 22Q62 12 75 5L72 25Z`})]});case`horns`:return(0,t.jsxs)(`g`,{fill:`#c73b5d`,stroke:`#ffb3bd`,strokeWidth:r*.35,children:[(0,t.jsx)(`path`,{d:`M19 25Q8 3 18 9L31 22Z`}),(0,t.jsx)(`path`,{d:`M59 22L72 9Q82 3 71 25Z`})]});case`halo`:return(0,t.jsx)(`ellipse`,{cx:39,cy:7,rx:18,ry:5,fill:`none`,stroke:`#f3d578`,strokeWidth:r});case`headphones`:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(`path`,{d:`M13 40V33Q13 8 39 8Q65 8 65 33V40`,fill:`none`,stroke:`#b5a5ff`,strokeWidth:r*1.7}),(0,t.jsx)(`rect`,{x:10,y:34,width:9,height:17,rx:4,fill:`#9e8aff`}),(0,t.jsx)(`rect`,{x:59,y:34,width:9,height:17,rx:4,fill:`#9e8aff`})]});case`hat`:return(0,t.jsxs)(`g`,{children:[(0,t.jsx)(`path`,{d:`M19 23L32 -5Q36 -12 41 -4L61 23Z`,fill:`#4b327e`,stroke:`#bca4ff`,strokeWidth:r*.5}),(0,t.jsx)(`ellipse`,{cx:40,cy:23,rx:23,ry:5,fill:`#7456ad`}),(0,t.jsx)(`path`,{d:`M31 8L37 4 42 10 48 5`,fill:`none`,stroke:`#ffe68c`,strokeWidth:r*.7})]});case`star`:return(0,t.jsx)(`g`,{fill:`#ffe27d`,stroke:`#fff4c4`,strokeWidth:r*.35,children:(0,t.jsx)(`path`,{d:`M63 15L66 22 74 23 68 28 70 36 63 31 56 36 58 28 52 23 60 22Z`})});case`gem`:return(0,t.jsx)(`path`,{d:`M27 13L34 7H44L51 13 39 25Z`,fill:`#a4eaff`,stroke:`#eaffff`,strokeWidth:r*.5});case`party`:return(0,t.jsxs)(`g`,{children:[(0,t.jsx)(`path`,{d:`M20 22L30 0 41 18 51 -2 61 22Z`,fill:`#ffce5b`}),(0,t.jsx)(`circle`,{cx:30,cy:0,r:2,fill:`#ff7ca8`}),(0,t.jsx)(`circle`,{cx:51,cy:-2,r:2,fill:`#8d80ff`})]});case`scarf`:return(0,t.jsx)(`path`,{d:`M19 58Q39 66 60 57L65 66Q40 77 17 67Z`,fill:`#dc4d63`,stroke:`#ffb2bd`,strokeWidth:r*.35});case`sprout`:return(0,t.jsx)(`path`,{d:`M60 23Q58 4 75 7Q76 23 60 23M60 23Q44 8 42 20Q48 29 60 23`,fill:`#83c77d`,stroke:`#d4f2bc`,strokeWidth:r*.5});case`flower`:return(0,t.jsxs)(`g`,{transform:`translate(64 16)`,children:[[0,72,144,216,288].map(e=>(0,t.jsx)(`ellipse`,{cx:0,cy:-6,rx:4.2,ry:5,fill:`#ffb3d1`,stroke:`#fff0f6`,strokeWidth:r*.25,transform:`rotate(${e})`},e)),(0,t.jsx)(`circle`,{r:3,fill:`#ffd166`})]});case`flame`:return(0,t.jsxs)(`g`,{transform:`translate(63 8)`,children:[(0,t.jsx)(`path`,{d:`M0 6C-7 0 -4 -8 0 -14C4 -8 7 0 0 6Z`,fill:`#ff7a3d`,stroke:`#ffd7a8`,strokeWidth:r*.3}),(0,t.jsx)(`path`,{d:`M0 4C-3.4 1 -2 -4 0 -7C2 -4 3.4 1 0 4Z`,fill:`#ffd166`})]});case`snow`:return(0,t.jsx)(`g`,{transform:`translate(64 15)`,stroke:`#bce7ff`,strokeWidth:r*.45,strokeLinecap:`round`,children:[0,60,120].map(e=>(0,t.jsx)(`path`,{d:`M0 -8V8`,transform:`rotate(${e})`},e))});case`fish`:return(0,t.jsxs)(`g`,{transform:`translate(65 52)`,children:[(0,t.jsx)(`path`,{d:`M-6 0Q0 -6 6 0Q0 6 -6 0Z`,fill:`#7fd8ea`,stroke:`#d7f6ff`,strokeWidth:r*.3}),(0,t.jsx)(`path`,{d:`M6 0L11 -4V4Z`,fill:`#7fd8ea`})]});case`coffee`:return(0,t.jsxs)(`g`,{transform:`translate(65 70)`,children:[(0,t.jsx)(`path`,{d:`M-7 -5H5V6Q-1 10 -7 6Z`,fill:`#f0e3d2`,stroke:`#c9b79f`,strokeWidth:r*.3}),(0,t.jsx)(`path`,{d:`M5 -3Q10 -1 5 3`,fill:`none`,stroke:`#c9b79f`,strokeWidth:r*.5})]});case`rocket`:return(0,t.jsxs)(`g`,{transform:`translate(65 18) rotate(28)`,children:[(0,t.jsx)(`path`,{d:`M0 -12C6 -6 6 4 0 8C-6 4 -6 -6 0 -12Z`,fill:`#eef2f8`,stroke:`#c3ccd9`,strokeWidth:r*.3}),(0,t.jsx)(`circle`,{cy:-2,r:2.4,fill:`#7cc7ff`}),(0,t.jsx)(`path`,{d:`M0 8L-3.4 12H3.4Z`,fill:`#ff8a80`})]});case`mask`:return(0,t.jsxs)(`g`,{transform:`translate(62 46)`,children:[(0,t.jsx)(`path`,{d:`M-8 -6Q0 -10 8 -6Q7 6 0 9Q-7 6 -8 -6Z`,fill:`#f6f1ff`,stroke:`#c9bce6`,strokeWidth:r*.35}),(0,t.jsx)(`circle`,{cx:-3,cy:-2,r:1.6,fill:`#3f3646`}),(0,t.jsx)(`circle`,{cx:3,cy:-2,r:1.6,fill:`#3f3646`}),(0,t.jsx)(`path`,{d:`M-3 3Q0 5 3 3`,fill:`none`,stroke:`#3f3646`,strokeWidth:r*.35,strokeLinecap:`round`})]});case`ghost`:return(0,t.jsx)(`g`,{transform:`translate(64 24)`,children:(0,t.jsx)(`path`,{d:`M-6 -2Q-6 -10 0 -10Q6 -10 6 -2V6L3 3.6 0 6 -3 3.6 -6 6Z`,fill:`#f2f4ff`,fillOpacity:.92,stroke:`#cfd6ee`,strokeWidth:r*.3})});default:return null}}function w({colors:e,expression:n=`normal`,accessory:r=`none`,tier:i=`large`,uid:a,size:o}){let s=e,c=i===`small`?`translate(40 46) scale(${i===`small`?p:1}) translate(-40 -46)`:void 0,d=i===`small`?`translate(40 44) scale(${i===`small`?m:1}) translate(-40 -44)`:void 0,h=f(o),g=i===`large`,_=`bg${a}`,v=y(s),w=S(r)===`front`;return(0,t.jsxs)(`svg`,{viewBox:`0 0 80 94`,width:o,height:o,"aria-hidden":`true`,style:{overflow:`visible`},children:[(0,t.jsxs)(`defs`,{children:[(0,t.jsxs)(`radialGradient`,{id:`${_}a`,cx:`30%`,cy:`22%`,r:`78%`,children:[(0,t.jsx)(`stop`,{stopColor:s[1]}),(0,t.jsx)(`stop`,{offset:.36,stopColor:s[0]}),(0,t.jsx)(`stop`,{offset:1,stopColor:s[2]})]}),g&&(0,t.jsxs)(`linearGradient`,{id:`${_}b`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,t.jsx)(`stop`,{stopColor:`#fff`,stopOpacity:.6}),(0,t.jsx)(`stop`,{offset:.5,stopColor:`#fff`,stopOpacity:0}),(0,t.jsx)(`stop`,{offset:1,stopColor:`#fff`,stopOpacity:.05})]})]}),!w&&(0,t.jsx)(`g`,{className:`ag-deco`,transform:c,children:C(r,s,h)}),(0,t.jsx)(`path`,{d:l,fill:`url(#${_}a)`,stroke:v,strokeOpacity:.26,strokeWidth:g?1.2:h*.45}),g&&(0,t.jsx)(`path`,{d:u,fill:`url(#${_}b)`}),w&&(0,t.jsx)(`g`,{className:`ag-deco`,transform:c,children:C(r,s,h)}),(0,t.jsx)(`g`,{className:`ag-eye`,transform:d,children:b(n,v)}),x(n,v),g&&(0,t.jsx)(`ellipse`,{cx:40,cy:88,rx:23,ry:3,fill:s[2],opacity:.12})]})}var T=r.map(e=>({id:e.id,cat:e.cat,name:e.name,desc:e.desc,colors:e.colors,accessory:c(e)}));T.map(e=>e.id);function E(e){let t=5381;for(let n=0;n<e.length;n++)t=t*33^e.charCodeAt(n);return(t%2147483647+2147483647)%2147483647}function D(e){return e?T[E(`${e}:icon`)%T.length]:T[0]}function O(e){return T.find(t=>t.id===e)??T[0]}var k={running:`normal`,waiting:`surprised`,done:`happy`,failed:`angry`};function A(e){return e?k[e]:`normal`}export{a,i as c,y as d,d as f,D as i,r as l,O as n,l as o,A as r,n as s,T as t,w as u};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-COiEfhsA.js";var t=``;function n(e){t=typeof e==`string`?e.trim():``}function r(){return t}function i(e){return`${e}`}function a(){return r()}function o(){let e=a();return e?`&sessionId=${encodeURIComponent(e)}`:``}var s=new class{baseUrl;constructor(e){this.baseUrl=e}async request(e,t={}){try{let n=sessionStorage.getItem(`auth_token`)??localStorage.getItem(`auth_token`),r={"Content-Type":`application/json`,...t.headers};n&&(r.Authorization=`Bearer ${n}`);let i=a();i&&!r[`X-Session-Id`]&&(r[`X-Session-Id`]=i);let o=await fetch(`${this.baseUrl}${e}`,{headers:r,...t}),s=await o.json();return o.ok?s&&typeof s.success==`boolean`?{success:s.success,data:s.data,error:s.error,...typeof s.code==`string`?{code:s.code}:{}}:{success:!0,data:s}:{success:!1,error:s.error||`HTTP ${o.status}`,...typeof s.code==`string`?{code:s.code}:{},data:s.data}}catch(e){return{success:!1,error:e instanceof Error?e.message:`Network error`}}}get(e){return this.request(e,{method:`GET`})}post(e,t){return this.request(e,{method:`POST`,body:t?JSON.stringify(t):void 0})}put(e,t){return this.request(e,{method:`PUT`,body:t?JSON.stringify(t):void 0})}delete(e,t){return this.request(e,{method:`DELETE`,body:t?JSON.stringify(t):void 0})}patch(e,t){return this.request(e,{method:`PATCH`,body:t?JSON.stringify(t):void 0})}}(``),c={get:()=>s.get(`/api/config/sandbox`),save:e=>s.post(`/api/config/sandbox`,e)},l=e({api:()=>u,apiClient:()=>s,default:()=>u}),u={providers:{presets:()=>s.get(`/api/providers/presets`),refresh:()=>s.post(`/api/providers/refresh`),testConnection:(e,t,n)=>s.post(`/api/providers/test-connection`,{baseUrl:e,apiKey:t,model:n})},models:{list:async()=>{let e=await s.get(`/api/models`);return e.success&&e.data?.models&&(e.data.models=e.data.models.map(e=>({...e,isGlobalDefault:e.isDefault===!0}))),e},get:e=>s.get(`/api/models/${e}`),create:e=>s.post(`/api/models`,e),update:(e,t,n)=>s.post(`/api/models/update`,{provider:e,modelId:t,...n}),delete:(e,t)=>s.post(`/api/models/delete`,{provider:e,modelId:t}),test:e=>s.post(`/api/models/${e}/test`),fetch:(e,t,n,r)=>s.post(`/api/models/fetch`,{baseUrl:e,apiKey:t,fullPath:n,preset:r}),byProvider:(e,t)=>{let n=new URLSearchParams({provider:e});return t&&n.set(`q`,t),s.get(`/api/models/by-provider?${n.toString()}`)},catalogSearch:e=>{let t=new URLSearchParams;e.q&&t.set(`q`,e.q),e.toolCall&&t.set(`toolCall`,`1`),e.reasoning&&t.set(`reasoning`,`1`),e.minContext&&t.set(`minContext`,String(e.minContext)),e.limit&&t.set(`limit`,String(e.limit));let n=t.toString();return s.get(`/api/models/catalog${n?`?${n}`:``}`)},toggle:(e,t)=>s.post(`/api/models/toggle`,{provider:e,modelId:t}),setDefaults:e=>s.post(`/api/models/defaults`,e),getSessionModel:e=>s.get(`/api/sessions/${encodeURIComponent(e)}/model`),setSessionModel:(e,t,n)=>s.put(`/api/sessions/${encodeURIComponent(e)}/model`,{provider:t,model:n}),clearSessionModel:e=>s.delete(`/api/sessions/${encodeURIComponent(e)}/model`)},tools:{list:()=>s.get(`/api/tools`),get:e=>s.get(`/api/tools/${e}`),update:(e,t)=>s.put(`/api/tools/${encodeURIComponent(e)}`,t),toggle:(e,t)=>s.post(`/api/tools/${encodeURIComponent(e)}/toggle`,{enabled:t}),reset:e=>s.post(`/api/tools/${encodeURIComponent(e)}/reset`,{}),exportConfig:()=>s.get(`/api/tools/config`),importConfig:(e,t=`merge`)=>s.put(`/api/tools/config`,{config:e,mode:t})},connectors:{list:()=>s.get(`/api/connectors`),get:e=>s.get(`/api/connectors/${encodeURIComponent(e)}`),toggle:(e,t,n)=>s.post(`/api/connectors/${encodeURIComponent(e)}/toggle`,{enabled:t,env:n}),connect:(e,t)=>s.post(`/api/connectors/${encodeURIComponent(e)}/connect`,{env:t}),accounts:e=>s.get(`/api/connectors/${encodeURIComponent(e)}/accounts`),addAccount:(e,t)=>s.post(`/api/connectors/${encodeURIComponent(e)}/accounts`,t),updateAccount:(e,t,n)=>s.patch(`/api/connectors/${encodeURIComponent(e)}/accounts/${encodeURIComponent(t)}`,n),removeAccount:(e,t)=>s.delete(`/api/connectors/${encodeURIComponent(e)}/accounts/${encodeURIComponent(t)}`),addCustom:e=>s.post(`/api/connectors/custom`,e),removeCustom:e=>s.delete(`/api/connectors/custom/${encodeURIComponent(e)}`),authorize:e=>s.post(`/api/connectors/${encodeURIComponent(e)}/authorize`,{})},device:{androidStatus:()=>s.get(`/api/device/android`)},skills:{list:()=>s.get(`/api/skills`),get:e=>s.get(`/api/skills/${e}`),create:e=>s.post(`/api/skills`,e),update:(e,t)=>s.put(`/api/skills/${e}`,t),toggle:(e,t)=>s.post(`/api/skills/${e}/toggle`,{enabled:t}),delete:e=>s.delete(`/api/skills/${e}`),import:e=>s.post(`/api/skills/import`,e),marketplaces:{list:()=>s.get(`/api/skills/marketplaces`),add:e=>s.post(`/api/skills/marketplaces`,e),remove:e=>s.delete(`/api/skills/marketplaces/${e}`),get:e=>s.get(`/api/skills/marketplaces/${e}`),refresh:e=>s.post(`/api/skills/marketplaces/${e}/refresh`,{}),install:(e,t)=>s.post(`/api/skills/marketplaces/${e}/install`,{skillId:t})},workshop:{list:e=>s.get(`/api/skills/workshop${e?`?status=${e}`:``}`),propose:e=>s.post(`/api/skills/workshop`,e),apply:e=>s.post(`/api/skills/workshop/${e}/apply`,{}),reject:e=>s.post(`/api/skills/workshop/${e}/reject`,{})},config:{get:e=>s.get(`/api/skills/${e}/config`),update:(e,t)=>s.put(`/api/skills/${e}/config`,t)}},installs:{get:e=>s.get(`/api/installs/${e}`)},shell:{exec:(e,t,n)=>s.post(`/api/shell/exec`,{command:e,workspaceDir:t,timeoutMs:n})},terminalFigure:{generate:e=>s.post(`/api/terminal-figure`,e)},visualArtifacts:{list:(e={})=>{let t=Object.entries(e).filter(([,e])=>typeof e==`string`&&e!==``).map(([e,t])=>`${e}=${encodeURIComponent(String(t))}`).join(`&`);return s.get(`/api/visual-artifacts${t?`?${t}`:``}`)},remove:e=>s.delete(`/api/visual-artifacts/${encodeURIComponent(e)}`),builtins:()=>s.get(`/api/visual-artifacts/builtins`),installBuiltin:e=>s.post(`/api/visual-artifacts/builtins`,{id:e}),content:e=>s.get(`/api/visual-artifacts/content?path=${encodeURIComponent(e)}`)},pendingArtifacts:{list:e=>s.get(`/api/pending-artifacts${e?`?status=${e}`:``}`),approve:(e,t)=>s.post(`/api/pending-artifacts/${e}/approve`,{note:t}),reject:(e,t)=>s.post(`/api/pending-artifacts/${e}/reject`,{note:t})},board:{view:(e={})=>{let t=new URLSearchParams;e.kind&&t.set(`kind`,e.kind),e.workspaceDir&&t.set(`workspace`,e.workspaceDir);let n=t.toString();return s.get(`/api/board${n?`?${n}`:``}`)}},files:{list:(e,t)=>s.get(`/api/files${e?`?path=${encodeURIComponent(e)}${t?.optional?`&optional=1`:``}`:``}`),search:e=>s.get(`/api/files/search?query=${encodeURIComponent(e)}`),read:e=>s.get(`/api/files/read?path=${encodeURIComponent(e)}`),previewDocx:e=>s.get(`/api/files/preview-docx?path=${encodeURIComponent(e)}`),previewXlsx:e=>s.get(`/api/files/preview-xlsx?path=${encodeURIComponent(e)}`),previewTicket:(e,t)=>s.post(`/api/files/preview-ticket`,{path:e,endpoint:t}),create:(e,t)=>s.post(`/api/files`,{path:e,content:t}),update:(e,t)=>s.put(`/api/files/write`,{path:e,content:t}),delete:e=>s.delete(`/api/files?path=${encodeURIComponent(e)}`),download:async e=>{try{let t={},n=sessionStorage.getItem(`auth_token`)??localStorage.getItem(`auth_token`);n&&(t.Authorization=`Bearer ${n}`);let r=await fetch(i(`/api/files/download?path=${encodeURIComponent(e)}${o()}`),{headers:t});if(!r.ok){let e=`HTTP ${r.status}`;try{let t=await r.json();t?.error&&(e=t.error)}catch{}return{success:!1,error:e}}let a=await r.blob(),s=URL.createObjectURL(a),c=document.createElement(`a`);return c.href=s,c.download=e.split(/[\\/]/).pop()||`download`,c.click(),URL.revokeObjectURL(s),{success:!0}}catch(e){return{success:!1,error:e instanceof Error?e.message:`Download failed`}}},upload:async(e,t)=>{try{let n=await d(e);return s.post(`/api/files/upload`,{path:t,content:n,base64:!0})}catch(e){return{success:!1,error:e instanceof Error?e.message:`Upload failed`}}}},dirs:{list:e=>s.get(`/api/dirs${e?`?path=${encodeURIComponent(e)}`:``}`)},fs:{open:(e,t)=>s.post(`/api/fs/open`,{path:e,mode:t}),openFolder:e=>s.post(`/api/fs/open-folder`,{dir:e})},sessions:{list:()=>s.get(`/api/sessions`),get:e=>s.get(`/api/sessions/${e}`),create:(e,t,n)=>s.post(`/api/sessions`,{...e?{title:e}:{},...t?{workspaceDir:t}:{},...n?{sessionId:n}:{}}),delete:e=>s.delete(`/api/sessions/${e}`),resume:e=>s.get(`/api/sessions/${encodeURIComponent(e)}/resume`),messages:(e,t={})=>{let n=new URLSearchParams;return t.before&&n.set(`before`,t.before),n.set(`limit`,String(t.limit??200)),s.get(`/api/sessions/${encodeURIComponent(e)}/messages?${n.toString()}`)},fork:(e,t)=>s.post(`/api/sessions/${encodeURIComponent(e)}/fork`,t?{title:t}:{}),rename:(e,t)=>s.patch(`/api/sessions/${encodeURIComponent(e)}`,{title:t}),setPinned:(e,t)=>s.patch(`/api/sessions/${encodeURIComponent(e)}`,{pinned:t})},agentRuns:{list:e=>s.get(e?`/api/agent-runs?sessionId=${encodeURIComponent(e)}`:`/api/agent-runs`),get:e=>s.get(`/api/agent-runs/${encodeURIComponent(e)}`),stop:e=>s.post(`/api/agent-runs/${encodeURIComponent(e)}/stop`),kill:e=>s.post(`/api/agent-runs/${encodeURIComponent(e)}/kill`),pause:e=>s.post(`/api/agent-runs/${encodeURIComponent(e)}/pause`),resume:e=>s.post(`/api/agent-runs/${encodeURIComponent(e)}/resume`),transcript:(e,t)=>s.get(`/api/agent-runs/${encodeURIComponent(e)}/transcript${t?`?sessionId=${encodeURIComponent(t)}`:``}`)},config:{get:()=>s.get(`/api/config`),provider:{get:()=>s.get(`/api/config/provider`),save:e=>s.post(`/api/config/provider`,e),delete:e=>s.post(`/api/config/provider/remove`,{provider:e}),setDefault:e=>s.post(`/api/config/provider`,{provider:e,setDefault:!0})},files:{list:()=>s.get(`/api/config/files`),read:e=>s.get(`/api/config/files/read?file=${encodeURIComponent(e)}`),write:(e,t)=>s.put(`/api/config/files/write`,{file:e,content:t})},desktop:()=>s.get(`/api/config/desktop`),setDesktop:e=>s.post(`/api/config/desktop`,e),context:{get:()=>s.get(`/api/config/context`),save:e=>s.post(`/api/config/context`,e)},sandbox:c,language:{get:()=>s.get(`/api/config/language`),set:e=>s.post(`/api/config/language`,{language:e})},profile:{get:()=>s.get(`/api/config/profile`),set:e=>s.post(`/api/config/profile`,e)}},profile:{get:()=>s.get(`/api/profile`),raw:()=>s.get(`/api/profile/raw`),set:e=>s.put(`/api/profile`,e),clear:()=>s.delete(`/api/profile`),draft:()=>s.get(`/api/profile/draft`),ignore:e=>s.post(`/api/profile/ignore`,{itemId:e.itemId,text:e.text,...e.subject?{subject:e.subject}:{},...e.layer?{layer:e.layer}:{}}),unignore:e=>{let t=typeof e==`string`?{itemId:e}:e;return s.post(`/api/profile/ignore/remove`,{...t.itemId?{itemId:t.itemId}:{},...t.fingerprint?{fingerprint:t.fingerprint}:{}})}},git:{status:()=>s.get(`/api/git/status`),branches:()=>s.get(`/api/git/branches`),checkout:e=>s.post(`/api/git/checkout`,{branch:e}),fetch:()=>s.post(`/api/git/fetch`),diff:(e,t)=>{let n=new URLSearchParams({path:e});return t?.mode&&n.set(`mode`,t.mode),t?.context!=null&&n.set(`context`,String(t.context)),s.get(`/api/git/diff?${n.toString()}`)}},fileJob:{parse:e=>s.post(`/api/filejob/parse`,{files:e}),parsePaths:e=>s.post(`/api/filejob/parse`,{paths:e}),importPaths:e=>s.post(`/api/filejob/import`,{paths:e}),render:e=>s.post(`/api/filejob/render`,e)},system:{status:()=>s.get(`/api/system/status`),metrics:()=>s.get(`/api/metrics`),restart:()=>s.post(`/api/system/restart`),shutdown:()=>s.post(`/api/system/shutdown`),network:()=>s.get(`/api/system/network`),setNetwork:e=>s.put(`/api/system/network`,{allowLanAccess:e}),setTailscale:e=>s.post(`/api/system/tailscale`,{enabled:e}),daemon:()=>s.get(`/api/system/daemon`),setDaemon:e=>s.put(`/api/system/daemon`,{daemonEnabled:e}),desktopDownload:()=>s.get(`/api/system/desktop-download`)},observability:{summary:()=>s.get(`/api/observability/summary`),contextAdvice:e=>s.get(`/api/context/advice?sessionId=${encodeURIComponent(e)}`),costs:e=>s.get(`/api/observability/costs${e?`?sessionId=${encodeURIComponent(e)}`:``}`),resetCosts:()=>s.post(`/api/observability/costs/reset`,{})},templates:{list:()=>s.get(`/api/templates`),get:e=>s.get(`/api/templates/${encodeURIComponent(e)}`),create:e=>s.post(`/api/templates`,e),update:(e,t)=>s.put(`/api/templates/${encodeURIComponent(e)}`,t),remove:e=>s.delete(`/api/templates/${encodeURIComponent(e)}`),versions:e=>s.get(`/api/templates/${encodeURIComponent(e)}/versions`),getVersion:(e,t)=>s.get(`/api/templates/${encodeURIComponent(e)}/versions/${t}`),render:(e,t)=>s.post(`/api/templates/${encodeURIComponent(e)}/render`,{inputs:t}),createFromRun:(e,t)=>s.post(`/api/templates`,{sourceRunId:e,generalize:t?.generalize===!0,name:t?.name,message:t?.message})},workflows:{list:()=>s.get(`/api/workflows`),start:e=>s.post(`/api/workflows`,e),get:e=>s.get(`/api/workflows/${encodeURIComponent(e)}`),events:e=>s.get(`/api/workflows/${encodeURIComponent(e)}/events`),synthesize:e=>s.post(`/api/workflows/synthesize`,{message:e})},plans:{list:()=>s.get(`/api/plans`),read:e=>s.get(`/api/plans/${encodeURIComponent(e)}`),delete:e=>s.delete(`/api/plans/${encodeURIComponent(e)}`)},logs:{list:()=>s.get(`/api/logs`),read:(e,t)=>s.get(`/api/logs/read?file=${encodeURIComponent(e)}${t?`&maxLines=${t}`:``}`),downloadUrl:e=>`/api/logs/download?file=${encodeURIComponent(e)}`,remove:e=>s.delete(`/api/logs?file=${encodeURIComponent(e)}`),cleanup:e=>s.delete(`/api/logs?olderThanDays=${encodeURIComponent(String(e))}`),querySessions:e=>{let t=new URLSearchParams;e.sessionIds?.length&&t.set(`sessionIds`,e.sessionIds.join(`,`)),e.levels?.length&&t.set(`levels`,e.levels.join(`,`)),e.from!==void 0&&t.set(`from`,String(e.from)),e.to!==void 0&&t.set(`to`,String(e.to)),e.q&&t.set(`q`,e.q),e.limit!==void 0&&t.set(`limit`,String(e.limit));let n=t.toString();return s.get(`/api/logs/session${n?`?${n}`:``}`)},sessionIndex:()=>s.get(`/api/logs/sessions`)},stt:{status:()=>s.get(`/api/stt/status`),transcribe:(e,t,n=`wav`)=>s.post(`/api/stt/transcribe`,{language:e,audio:t,format:n}),install:()=>s.post(`/api/stt/install`),installStatus:()=>s.get(`/api/stt/install/status`),cancelInstall:()=>s.post(`/api/stt/install/cancel`),getConfig:()=>s.get(`/api/stt/config`),setConfig:e=>s.put(`/api/stt/config`,e)},tts:{status:()=>s.get(`/api/tts/status`),synthesize:e=>s.post(`/api/tts/synthesize`,e),install:()=>s.post(`/api/tts/install`),installStatus:()=>s.get(`/api/tts/install/status`),cancelInstall:()=>s.post(`/api/tts/install/cancel`)},hooks:{list:()=>s.get(`/api/hooks/rules`),get:e=>s.get(`/api/hooks/rules/${encodeURIComponent(e)}`),create:e=>s.post(`/api/hooks/rules`,e),update:(e,t)=>s.put(`/api/hooks/rules/${encodeURIComponent(e)}`,t),delete:e=>s.delete(`/api/hooks/rules/${encodeURIComponent(e)}`),batchDelete:e=>s.post(`/api/hooks/rules/batch-delete`,{names:e}),toggle:(e,t)=>s.patch(`/api/hooks/rules/${encodeURIComponent(e)}/toggle`,{enabled:t}),batchToggle:(e,t)=>s.post(`/api/hooks/rules/batch-toggle`,{names:e,enabled:t}),dryRun:e=>s.post(`/api/hooks/dry-run`,e),stats:()=>s.get(`/api/hooks/stats`),events:()=>s.get(`/api/hooks/events`),agents:()=>s.get(`/api/hooks/agents`),templates:()=>s.get(`/api/hooks/templates`),export:()=>s.get(`/api/hooks/export`),import:e=>s.post(`/api/hooks/import`,e)},assistants:{list:()=>s.get(`/api/assistants`),get:e=>s.get(`/api/assistants/${encodeURIComponent(e)}`),create:(e={})=>s.post(`/api/assistants`,e),rename:(e,t)=>s.patch(`/api/assistants/${encodeURIComponent(e)}`,{title:t}),update:(e,t)=>s.patch(`/api/assistants/${encodeURIComponent(e)}`,t),remove:e=>s.delete(`/api/assistants/${encodeURIComponent(e)}`)},channels:{list:()=>s.get(`/api/channels`),types:()=>s.get(`/api/channels/types`),catalog:()=>s.get(`/api/channels/catalog`),create:e=>s.post(`/api/channels`,e),update:(e,t)=>s.put(`/api/channels/${encodeURIComponent(e)}`,t),delete:e=>s.delete(`/api/channels/${encodeURIComponent(e)}`),toggle:(e,t)=>s.patch(`/api/channels/${encodeURIComponent(e)}/toggle`,{enabled:t}),test:e=>s.post(`/api/channels/${encodeURIComponent(e)}/test`),wechat:{qrcode:(e,t)=>s.get(`/api/channels/${encodeURIComponent(e)}/wechat/qrcode?token=${encodeURIComponent(t)}`),qrcodeStatus:(e,t,n)=>s.get(`/api/channels/${encodeURIComponent(e)}/wechat/qrcode/status?token=${encodeURIComponent(t)}&qrcode=${encodeURIComponent(n)}`)},weixin:{bind:()=>s.get(`/api/weixin/bind`),bindStatus:e=>s.get(`/api/weixin/bind/status?qrcode=${encodeURIComponent(e)}`)}},automations:{list:()=>s.get(`/api/automations`),create:e=>s.post(`/api/automations`,e),update:(e,t)=>s.put(`/api/automations/${encodeURIComponent(e)}`,t),remove:e=>s.delete(`/api/automations/${encodeURIComponent(e)}`),toggle:(e,t)=>s.post(`/api/automations/${encodeURIComponent(e)}/toggle`,{enabled:t}),run:e=>s.post(`/api/automations/${encodeURIComponent(e)}/run`),runs:e=>s.get(`/api/automations/${encodeURIComponent(e)}/runs`),addPermission:(e,t,n)=>s.post(`/api/automations/${encodeURIComponent(e)}/permissions`,{tool:t,target:n}),revokePermission:(e,t)=>s.delete(`/api/automations/${encodeURIComponent(e)}/permissions`,{entry:t})},inbox:{list:()=>s.get(`/api/inbox`),drain:()=>s.get(`/api/inbox/drain`),remove:e=>s.delete(`/api/inbox/${encodeURIComponent(e)}`),touchPeople:(e,t)=>s.post(`/api/inbox/people/${encodeURIComponent(e)}/touch`,t?{at:t}:{})}};function d(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result,n=e.indexOf(`,`);t(n>=0?e.slice(n+1):e)},r.onerror=()=>n(r.error||Error(`Failed to read file`)),r.readAsDataURL(e)})}export{o as a,i,l as n,n as o,s as r,u as t};