@yuriai/web 0.2.12-beta.1 → 0.2.12

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/dist/assets/AgentAvatar-DJCC3Aqe.js +1 -0
  2. package/dist/assets/AssistantView-DU3Q-GKG.js +3 -0
  3. package/dist/assets/{DiagramView-uXRgHwPJ.js → DiagramView-YnLo2AT2.js} +1 -1
  4. package/dist/assets/{GuiPluginSurface-BvqTFEHC.js → GuiPluginSurface-d2b15A6E.js} +1 -1
  5. package/dist/assets/{GuiPluginWindow-C_4UCN15.js → GuiPluginWindow-X2qtGb-7.js} +1 -1
  6. package/dist/assets/MarkdownRenderer-Fn6_Gozt.js +2 -0
  7. package/dist/assets/{MarkdownRendererImpl-sX2gsKdk.js → MarkdownRendererImpl-DzjvFzLO.js} +1 -1
  8. package/dist/assets/{MarkstreamRendererImpl-BTpFp4v9.js → MarkstreamRendererImpl-DzM6YvFv.js} +1 -1
  9. package/dist/assets/{MobileDetailNavigation-S5rvNlSw.js → MobileDetailNavigation-BLTmtkxn.js} +1 -1
  10. package/dist/assets/{MobileResizableSheet-BGOvJkaP.js → MobileResizableSheet-CVZyFmiP.js} +1 -1
  11. package/dist/assets/{MobileShareBridge-ByOex64p.js → MobileShareBridge-DmFvN9Yu.js} +1 -1
  12. package/dist/assets/{MobileTabPageHeader-CGJV-jLT.js → MobileTabPageHeader-B_IlXMaq.js} +1 -1
  13. package/dist/assets/{MultiRunWindow-DT81Yvu2.js → MultiRunWindow-B-z-Hlxt.js} +1 -1
  14. package/dist/assets/{SettingsView-r_-tw_wf.js → SettingsView-DZaVLtN_.js} +8 -8
  15. package/dist/assets/{SettingsWindow-Dp4UefGQ.js → SettingsWindow-Dk7zBIhW.js} +1 -1
  16. package/dist/assets/{TerminalView-D2EL5uEI.js → TerminalView-BRZXzdsv.js} +1 -1
  17. package/dist/assets/{ToolOutputDialog-D3DPQCI-.js → ToolOutputDialog-u_nwyfmh.js} +1 -1
  18. package/dist/assets/{appThemeRegistry-Br1Y4kMh.js → appThemeRegistry-DQncRaH8.js} +1 -1
  19. package/dist/assets/{capgoAdapter-MylXZ4IG.js → capgoAdapter-oYpF3Iys.js} +1 -1
  20. package/dist/assets/{device-B7GyZCPd.js → device-VqNjblDR.js} +1 -1
  21. package/dist/assets/{dropdown-menu.styles-BfEkQov6.js → dropdown-menu.styles-BneT70Wd.js} +1 -1
  22. package/dist/assets/fileMentionTouchSelection-DLB9NaT8.js +2 -0
  23. package/dist/assets/{gitApi-JgIRgqCy.js → gitApi-DmsP48X9.js} +4 -4
  24. package/dist/assets/grok-recipes-CGfuXW4M.json +8309 -0
  25. package/dist/assets/insertionBoundaries-CdkyD16g.js +1 -0
  26. package/dist/assets/{main-C3aeL1x1.js → main-CizaES-l.js} +13 -13
  27. package/dist/assets/{main-CJK9gObM.js → main-DGdMB0a9.js} +2 -2
  28. package/dist/assets/{mcpQueries-D4WzRCEf.js → mcpQueries-D-ACeQhU.js} +1 -1
  29. package/dist/assets/miniChat-DFw_Yk31.js +2 -0
  30. package/dist/assets/{mobile-CPqhIAEq.js → mobile-D-9RyRP2.js} +2 -2
  31. package/dist/assets/{mobileBackNavigation-DQMX_niL.js → mobileBackNavigation-PW9PKRp9.js} +1 -1
  32. package/dist/assets/{multirun-Vnl8MPmG.js → multirun-CkF_yWhp.js} +1 -1
  33. package/dist/assets/{native-config-Ci8to5sR.js → native-config-eNF46MQE.js} +1 -1
  34. package/dist/assets/{platform-DXeTzJHG.js → platform-DUe-qtEp.js} +1 -1
  35. package/dist/assets/{projectMeta-BJQWTMtw.js → projectMeta-paQJnzSj.js} +1 -1
  36. package/dist/assets/{readiness-C5z74Apg.js → readiness-CD8PmDO8.js} +1 -1
  37. package/dist/assets/{renderElectronMiniChatApp-CfIulG-U.js → renderElectronMiniChatApp-B7G6Pb13.js} +2 -2
  38. package/dist/assets/renderMobileApp-Cfw5ds5r.js +28 -0
  39. package/dist/assets/{runtimeConfig-52a7OLrA.js → runtimeConfig-OWlkIGor.js} +1 -1
  40. package/dist/assets/runtimeEndpointReset-2OM4_xI2.js +149 -0
  41. package/dist/assets/{scheduledTaskNavigation-JfDZws7P.js → scheduledTaskNavigation-fnceJcDf.js} +1 -1
  42. package/dist/assets/{sessionChangeSummary-BbgIDcOI.js → sessionChangeSummary-BsydkEi-.js} +1 -1
  43. package/dist/assets/{sessionLookup-D8693snn.js → sessionLookup-C4d1itBe.js} +1 -1
  44. package/dist/assets/{sortable-tabs-strip-h-raXfd8.js → sortable-tabs-strip-DR90BVpO.js} +1 -1
  45. package/dist/assets/speechSettingsQueries-DLQhKWB7.js +4 -0
  46. package/dist/assets/src-dSUmXLC4.css +2 -0
  47. package/dist/assets/{terminalApi-CIbkfDkE.js → terminalApi-BuoB9-0z.js} +1 -1
  48. package/dist/assets/types-BC9_N4bU.js +2 -0
  49. package/dist/assets/{useAppFontEffects-CTOXRBGw.js → useAppFontEffects-BR5PcExE.js} +48 -48
  50. package/dist/assets/{useDesktopWindowControlsLayout-DFeMqtSs.js → useDesktopWindowControlsLayout-BXU-GCDJ.js} +1 -1
  51. package/dist/assets/{useEffectiveDirectory-CecIEYsD.js → useEffectiveDirectory-BKQn4QdT.js} +1 -1
  52. package/dist/assets/{useFontPreferences-51P_6ZRi.js → useFontPreferences-B4l7mbDx.js} +1 -1
  53. package/dist/assets/{useMobileNavigationStore-CPjPkSWE.js → useMobileNavigationStore-DiH8EKl-.js} +22 -22
  54. package/dist/assets/{useWorkerHighlightedLines-CHbIxbid.js → useWorkerHighlightedLines-D5244yEp.js} +1 -1
  55. package/dist/assets/{vendor-framer-motion-DsGBcZHB.js → vendor-framer-motion-D8hQsul-.js} +1 -1
  56. package/dist/assets/vendor-motion-DufQFNcM.js +1 -0
  57. package/dist/index.html +8 -8
  58. package/dist/mini-chat.html +8 -8
  59. package/dist/mobile.html +8 -8
  60. package/package.json +1 -1
  61. package/server/lib/git/DOCUMENTATION.md +1 -0
  62. package/server/lib/git/routes.js +10 -1
  63. package/server/lib/git/routes.test.js +76 -0
  64. package/dist/assets/AgentAvatar-C2FL0Qg-.js +0 -22
  65. package/dist/assets/AssistantView-B8ijrLf8.js +0 -3
  66. package/dist/assets/MarkdownRenderer-JZtxgA3l.js +0 -2
  67. package/dist/assets/fileMentionTouchSelection-BUTfQOa7.js +0 -2
  68. package/dist/assets/insertionBoundaries-DJn6sacB.js +0 -1
  69. package/dist/assets/miniChat-B0j7f5Gr.js +0 -2
  70. package/dist/assets/renderMobileApp-CXUJdxZW.js +0 -28
  71. package/dist/assets/runtimeEndpointReset-CsdwEKof.js +0 -149
  72. package/dist/assets/speechSettingsQueries-CVzYcD_d.js +0 -4
  73. package/dist/assets/src-D4rfdktg.css +0 -2
  74. package/dist/assets/types-Dy7vKiLX.js +0 -2
  75. package/dist/assets/vendor-motion-CIQx6DBb.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{v as r}from"./useUIStore-NMQx_cnG.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{f as a,r as o,t as s}from"./button-DFX-UCuQ.js";import{n as c}from"./useThemeSystem-8jhE4Zyk.js";import{n as l}from"./Icon-C1nXIg7J.js";import{i as u,n as d,t as f}from"./tooltip-Byl6nrXB.js";import{n as p}from"./MarkdownRenderer-JZtxgA3l.js";import{n as m,r as h}from"./toolHelpers-DL452NVK.js";import{t as g}from"./vendor-tanstack-react-virtual-B_EO--9t.js";import{n as _}from"./markdownTheme-DHoKvD6O.js";import{n as v,t as y}from"./markdown-worker-oBGEB9Eg.js";var b=e(t(),1),x=i(),S=n(),C=`w-[min(30rem,calc(100cqw-1rem))] min-w-[280px] max-w-full overflow-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,w={maxWidth:`min(28rem, calc(100cqw - 4ch))`,backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},T=`flex items-center justify-between gap-3 border-b border-[var(--surface-subtle)] px-3 py-2.5`,E=`text-xs font-medium leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,D=`text-xs tabular-nums leading-4 text-muted-foreground md:text-[0.8125rem] md:leading-5`,O=`m-0 list-none divide-y divide-[var(--surface-subtle)] p-0`,k=`${O} max-h-[min(22rem,50vh)] overflow-y-auto`,A=`${O} w-full`,ee={className:`p-0 rounded-none`,maxHeightClass:`max-h-[46vh]`,disableHorizontal:!0},j=`px-2.5 py-1.5 text-xs leading-4 md:py-2 md:text-[0.8125rem] md:leading-5`,M=`flex min-w-0 items-center gap-1 text-xs leading-4 text-muted-foreground md:gap-1.5 md:text-[0.8125rem] md:leading-5`,te=`min-w-0 truncate text-xs leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,ne=`inline-flex shrink-0 items-center gap-1 text-xs leading-4 tabular-nums text-muted-foreground md:text-[0.8125rem] md:leading-5`,re=`h-3 w-3 shrink-0 md:h-3.5 md:w-3.5`,ie={in_progress:`text-foreground`,pending:`text-foreground`,completed:`text-muted-foreground line-through`,cancelled:`text-muted-foreground line-through`},ae={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},N=e=>{let t=(0,x.c)(26),{todo:n,isActive:r,activeRef:i}=e,{t:s}=a(),c=oe.has(n.status)?n.status:`pending`,p=ae[c],m;t[0]!==s||t[1]!==p?(m=s(p),t[0]=s,t[1]=p,t[2]=m):m=t[2];let h=m,g;t[3]===c?g=t[4]:(g=c===`in_progress`?(0,S.jsx)(l,{name:`record-circle`,className:`h-3.5 w-3.5 text-[var(--status-info)]`,"aria-hidden":`true`}):c===`completed`?(0,S.jsx)(l,{name:`checkbox-circle`,className:`h-3.5 w-3.5 text-[var(--status-success)]`,"aria-hidden":`true`}):(0,S.jsx)(l,{name:`time`,className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),t[3]=c,t[4]=g);let _=g,v=r?`step`:void 0,y=r&&`bg-[var(--surface-muted)] before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-[var(--status-info)]`,b;t[5]===y?b=t[6]:(b=o(`group relative grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] items-start gap-2.5`,j,y),t[5]=y,t[6]=b);let C;t[7]!==_||t[8]!==h?(C=(0,S.jsx)(u,{asChild:!0,children:(0,S.jsx)(`span`,{className:`flex size-4 items-center justify-center`,"aria-label":h,children:_})}),t[7]=_,t[8]=h,t[9]=C):C=t[9];let w;t[10]===h?w=t[11]:(w=(0,S.jsx)(d,{side:`left`,sideOffset:6,children:h}),t[10]=h,t[11]=w);let T;t[12]!==C||t[13]!==w?(T=(0,S.jsxs)(f,{children:[C,w]}),t[12]=C,t[13]=w,t[14]=T):T=t[14];let E=ie[c],D;t[15]===E?D=t[16]:(D=o(`block whitespace-normal break-words`,E),t[15]=E,t[16]=D);let O;t[17]!==D||t[18]!==n.content?(O=(0,S.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,S.jsx)(`span`,{className:D,children:n.content})}),t[17]=D,t[18]=n.content,t[19]=O):O=t[19];let k;return t[20]!==i||t[21]!==O||t[22]!==v||t[23]!==b||t[24]!==T?(k=(0,S.jsxs)(`li`,{ref:i,"aria-current":v,className:b,children:[T,O]}),t[20]=i,t[21]=O,t[22]=v,t[23]=b,t[24]=T,t[25]=k):k=t[25],k},oe=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),P=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),F=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,I=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=F(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},L=e=>`<pre><code>${P(e)}</code></pre>`,R=e=>{let t=(0,x.c)(21),{code:n,language:r,className:i,style:a,codeStyle:s,wrap:l}=e,u=l!==void 0&&l,{currentTheme:d}=c(),f=b.useRef(null),p;t[0]===d?p=t[1]:(p=_(d),t[0]=d,t[1]=p);let m=p,h,g;t[2]!==n||t[3]!==s||t[4]!==u?(h=()=>{let e=f.current;e&&(e.innerHTML=L(n),I(e,u,s))},g=[n,u,s],t[2]=n,t[3]=s,t[4]=u,t[5]=h,t[6]=g):(h=t[5],g=t[6]),b.useLayoutEffect(h,g);let v,C;t[7]!==n||t[8]!==s||t[9]!==r||t[10]!==u?(v=()=>{let e=f.current;if(!e)return;let t=!0,i=new AbortController;return y(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,I(e,u,s))}),()=>{t=!1,i.abort()}},C=[n,r,u,s],t[7]=n,t[8]=s,t[9]=r,t[10]=u,t[11]=v,t[12]=C):(v=t[11],C=t[12]),b.useEffect(v,C);let w;t[13]===i?w=t[14]:(w=o(`typography-code`,i),t[13]=i,t[14]=w);let T=m,E;t[15]!==a||t[16]!==T?(E={...T,...a},t[15]=a,t[16]=T,t[17]=E):E=t[17];let D;return t[18]!==w||t[19]!==E?(D=(0,S.jsx)(`div`,{ref:f,className:w,style:E}),t[18]=w,t[19]=E,t[20]=D):D=t[20],D},z=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},B=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},V=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,H=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,U=(e,t)=>!e||typeof e!=`object`?String(e):h(e,t||``),W=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},G=e=>{if(!e||typeof e!=`object`)return;let t=W(e.patch)??W(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=W(e.patch)??W(e.diff);if(t)return t}},K=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},q=(e,t,n)=>{let r=z(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&V(r)&&(r=H(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=G(n);if(e)return e}return r},se=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{v as r}from"./useUIStore-NMQx_cnG.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{f as a,r as o,t as s}from"./button-DFX-UCuQ.js";import{n as c}from"./useThemeSystem-8jhE4Zyk.js";import{n as l}from"./Icon-C1nXIg7J.js";import{i as u,n as d,t as f}from"./tooltip-Byl6nrXB.js";import{n as p}from"./MarkdownRenderer-Fn6_Gozt.js";import{n as m,r as h}from"./toolHelpers-DL452NVK.js";import{t as g}from"./vendor-tanstack-react-virtual-B_EO--9t.js";import{n as _}from"./markdownTheme-DHoKvD6O.js";import{n as v,t as y}from"./markdown-worker-oBGEB9Eg.js";var b=e(t(),1),x=i(),S=n(),C=`w-[min(30rem,calc(100cqw-1rem))] min-w-[280px] max-w-full overflow-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,w={maxWidth:`min(28rem, calc(100cqw - 4ch))`,backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},T=`flex items-center justify-between gap-3 border-b border-[var(--surface-subtle)] px-3 py-2.5`,E=`text-xs font-medium leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,D=`text-xs tabular-nums leading-4 text-muted-foreground md:text-[0.8125rem] md:leading-5`,O=`m-0 list-none divide-y divide-[var(--surface-subtle)] p-0`,k=`${O} max-h-[min(22rem,50vh)] overflow-y-auto`,A=`${O} w-full`,ee={className:`p-0 rounded-none`,maxHeightClass:`max-h-[46vh]`,disableHorizontal:!0},j=`px-2.5 py-1.5 text-xs leading-4 md:py-2 md:text-[0.8125rem] md:leading-5`,M=`flex min-w-0 items-center gap-1 text-xs leading-4 text-muted-foreground md:gap-1.5 md:text-[0.8125rem] md:leading-5`,te=`min-w-0 truncate text-xs leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,ne=`inline-flex shrink-0 items-center gap-1 text-xs leading-4 tabular-nums text-muted-foreground md:text-[0.8125rem] md:leading-5`,re=`h-3 w-3 shrink-0 md:h-3.5 md:w-3.5`,ie={in_progress:`text-foreground`,pending:`text-foreground`,completed:`text-muted-foreground line-through`,cancelled:`text-muted-foreground line-through`},ae={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},N=e=>{let t=(0,x.c)(26),{todo:n,isActive:r,activeRef:i}=e,{t:s}=a(),c=oe.has(n.status)?n.status:`pending`,p=ae[c],m;t[0]!==s||t[1]!==p?(m=s(p),t[0]=s,t[1]=p,t[2]=m):m=t[2];let h=m,g;t[3]===c?g=t[4]:(g=c===`in_progress`?(0,S.jsx)(l,{name:`record-circle`,className:`h-3.5 w-3.5 text-[var(--status-info)]`,"aria-hidden":`true`}):c===`completed`?(0,S.jsx)(l,{name:`checkbox-circle`,className:`h-3.5 w-3.5 text-[var(--status-success)]`,"aria-hidden":`true`}):(0,S.jsx)(l,{name:`time`,className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),t[3]=c,t[4]=g);let _=g,v=r?`step`:void 0,y=r&&`bg-[var(--surface-muted)] before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-[var(--status-info)]`,b;t[5]===y?b=t[6]:(b=o(`group relative grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] items-start gap-2.5`,j,y),t[5]=y,t[6]=b);let C;t[7]!==_||t[8]!==h?(C=(0,S.jsx)(u,{asChild:!0,children:(0,S.jsx)(`span`,{className:`flex size-4 items-center justify-center`,"aria-label":h,children:_})}),t[7]=_,t[8]=h,t[9]=C):C=t[9];let w;t[10]===h?w=t[11]:(w=(0,S.jsx)(d,{side:`left`,sideOffset:6,children:h}),t[10]=h,t[11]=w);let T;t[12]!==C||t[13]!==w?(T=(0,S.jsxs)(f,{children:[C,w]}),t[12]=C,t[13]=w,t[14]=T):T=t[14];let E=ie[c],D;t[15]===E?D=t[16]:(D=o(`block whitespace-normal break-words`,E),t[15]=E,t[16]=D);let O;t[17]!==D||t[18]!==n.content?(O=(0,S.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,S.jsx)(`span`,{className:D,children:n.content})}),t[17]=D,t[18]=n.content,t[19]=O):O=t[19];let k;return t[20]!==i||t[21]!==O||t[22]!==v||t[23]!==b||t[24]!==T?(k=(0,S.jsxs)(`li`,{ref:i,"aria-current":v,className:b,children:[T,O]}),t[20]=i,t[21]=O,t[22]=v,t[23]=b,t[24]=T,t[25]=k):k=t[25],k},oe=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),P=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),F=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,I=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=F(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},L=e=>`<pre><code>${P(e)}</code></pre>`,R=e=>{let t=(0,x.c)(21),{code:n,language:r,className:i,style:a,codeStyle:s,wrap:l}=e,u=l!==void 0&&l,{currentTheme:d}=c(),f=b.useRef(null),p;t[0]===d?p=t[1]:(p=_(d),t[0]=d,t[1]=p);let m=p,h,g;t[2]!==n||t[3]!==s||t[4]!==u?(h=()=>{let e=f.current;e&&(e.innerHTML=L(n),I(e,u,s))},g=[n,u,s],t[2]=n,t[3]=s,t[4]=u,t[5]=h,t[6]=g):(h=t[5],g=t[6]),b.useLayoutEffect(h,g);let v,C;t[7]!==n||t[8]!==s||t[9]!==r||t[10]!==u?(v=()=>{let e=f.current;if(!e)return;let t=!0,i=new AbortController;return y(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,I(e,u,s))}),()=>{t=!1,i.abort()}},C=[n,r,u,s],t[7]=n,t[8]=s,t[9]=r,t[10]=u,t[11]=v,t[12]=C):(v=t[11],C=t[12]),b.useEffect(v,C);let w;t[13]===i?w=t[14]:(w=o(`typography-code`,i),t[13]=i,t[14]=w);let T=m,E;t[15]!==a||t[16]!==T?(E={...T,...a},t[15]=a,t[16]=T,t[17]=E):E=t[17];let D;return t[18]!==w||t[19]!==E?(D=(0,S.jsx)(`div`,{ref:f,className:w,style:E}),t[18]=w,t[19]=E,t[20]=D):D=t[20],D},z=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},B=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},V=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,H=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,U=(e,t)=>!e||typeof e!=`object`?String(e):h(e,t||``),W=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},G=e=>{if(!e||typeof e!=`object`)return;let t=W(e.patch)??W(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=W(e.patch)??W(e.diff);if(t)return t}},K=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},q=(e,t,n)=>{let r=z(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&V(r)&&(r=H(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=G(n);if(e)return e}return r},se=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `),r=e=>/\(\s*File has more lines\..*offset.*\)/i.test(e.trim());return{type:t,lines:n.map(e=>{let n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);if(t!==`directory`){let t=e.match(/^(\d+):\s?(.*)$/);if(t){let e=t[2],n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);return{lineNumber:i?null:Number(t[1]),text:e,isInfo:i}}}return{lineNumber:null,text:e,isInfo:i}}).filter((e,t,n)=>{if(e.text.trim().length>0)return!0;let r=n[t-1],i=n[t+1],a=!!(r?.isInfo||i?.isInfo),o=e.lineNumber!==null;return!(a&&o)})}},ce=(e,t)=>{try{let n=e.trim().split(`
4
4
  `).filter(Boolean);if(n.length===0)return null;let i=[];return n.forEach(e=>{let t=e.match(/^(\s*)(.+)$/);if(t){let[,e,n]=t,r=Math.floor(e.length/2),a=!n.endsWith(`/`);i.push({name:n.replace(/\/$/,``),depth:r,isFile:a})}}),(0,S.jsx)(`div`,{className:o(`w-full min-w-0 font-mono space-y-0.5`,t?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:r.tool.popup,children:i.map((e,t)=>(0,S.jsx)(`div`,{className:`min-w-0`,style:{paddingLeft:`${e.depth*20}px`},children:e.isFile?(0,S.jsx)(`span`,{className:`text-foreground/90 block truncate`,children:e.name}):(0,S.jsxs)(`span`,{className:`font-semibold text-foreground block truncate`,children:[e.name,`/`]})},t))})}catch{return null}},le={backgroundColor:`var(--status-info)`,opacity:.6},ue=(e,t,n)=>{try{let i=e.trim().split(`
@@ -6,4 +6,4 @@ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from".
6
6
  ${v}px !important;
7
7
  ${y}px !important;
8
8
  }
9
- `),()=>{g.removeAttribute(`data-motion-pop-id`),S.contains(x)&&S.removeChild(x)}},[t]),(0,Q.jsx)(lu,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:$.cloneElement(e,{ref:d})})}var du=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=nu(fu),d=(0,$.useId)(),f=(0,$.useRef)(),p=(0,$.useRef)(n),m=(0,$.useRef)(r);ru(()=>{p.current=n,m.current=r});let h=!0,g=(0,$.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,$.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),$.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,Q.jsx)(uu,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,Q.jsx)(iu.Provider,{value:g,children:e})};function fu(){return new Map}function pu(e=!0){let t=(0,$.useContext)(iu);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,$.useId)();(0,$.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,$.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var mu=e=>e.key||``;function hu(e){let t=[];return $.Children.forEach(e,e=>{(0,$.isValidElement)(e)&&t.push(e)}),t}var gu=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=pu(o),f=(0,$.useMemo)(()=>hu(e),[e]),p=o&&!u?[]:f.map(mu),m=(0,$.useRef)(!0),h=nu(()=>new Map),g=(0,$.useRef)(new Set),[_,v]=(0,$.useState)(f),[y,b]=(0,$.useState)(f);ru(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]);let x=(0,$.useRef)();(0,$.useEffect)(()=>()=>{let e=x.current;x.current=void 0,e?.()},[y]),ru(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=mu(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let S=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(mu(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>h.get(mu(e)))?e=f:a===`wait`&&(e=S),b(hu(e)),v(f),null}let{forceRender:C}=(0,$.useContext)(tu);return(0,Q.jsx)(Q.Fragment,{children:y.map(e=>{let _=mu(e),b=o&&!u?!1:f===y||p.includes(_);return(0,Q.jsx)(du,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(C?.(),v([]),o&&d?.(),x.current=r)},anchorX:s,anchorY:c,children:e},_)})})},_u=(0,$.createContext)({strict:!1}),vu={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},yu=!1;function bu(){if(yu)return;let e={};for(let t in vu)e[t]={isEnabled:e=>vu[t].some(t=>!!e[t])};ec(e),yu=!0}function xu(){return bu(),tc()}function Su(e){let t=xu();for(let n in e)t[n]={...t[n],...e[n]};ec(t)}var Cu=(0,$.createContext)({});function wu(e,t){if(Gs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Hs(t)?t:void 0,animate:Hs(n)?n:void 0}}return e.inherit===!1?{}:t}function Tu(e){let{initial:t,animate:n}=wu(e,(0,$.useContext)(Cu));return(0,$.useMemo)(()=>({initial:t,animate:n}),[Eu(t),Eu(n)])}function Eu(e){return Array.isArray(e)?e.join(` `):e}var Du=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ou(e,t,n){for(let r in t)!W(t[r])&&!ac(r,n)&&(e[r]=t[r])}function ku({transformTemplate:e},t){return(0,$.useMemo)(()=>{let n=Du();return ha(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Au(e,t){let n=e.style||{},r={};return Ou(r,n,e),Object.assign(r,ku(e,t)),r}function ju(e,t){let n={},r=Au(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Mu=()=>({...Du(),attrs:{}});function Nu(e,t,n,r){let i=(0,$.useMemo)(()=>{let n=Mu();return ba(n,t,xl(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ou(t,e.style,e),i.style={...t,...i.style}}return i}var Pu=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Fu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Pu.has(e)}function Iu(e,t){return e.startsWith(`on`)?!Fu(e):t?.(e)??!Fu(e)}function Lu(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(W(e[a])||(Iu(a,r)||n===!0&&Fu(a)||!t&&!Fu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Ru=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function zu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ru.indexOf(e)>-1||/[A-Z]/u.test(e))}function Bu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??zu(e)?Nu:ju)(t,r,i,e),l=Lu(t,typeof e==`string`,a,s),u=e===$.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,$.useMemo)(()=>W(d)?d.get():d,[d]);return(0,$.createElement)(e,{...u,children:f})}function Vu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Hu(n,r,i,e),renderState:t()}}function Hu(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=io(a[e]);let{initial:o,animate:s}=e,c=Gs(e),l=Ks(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Vs(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=_i(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Uu=e=>(t,n)=>{let r=(0,$.useContext)(Cu),i=(0,$.useContext)(iu),a=()=>Vu(e,t,r,i);return n?a():nu(a)},Wu=Uu({scrapeMotionValuesFromProps:oc,createRenderState:Du}),Gu=Uu({scrapeMotionValuesFromProps:Cl,createRenderState:Mu}),Ku=Symbol.for(`motionComponentSymbol`);function qu(e,t,n){let r=(0,$.useRef)(n);(0,$.useInsertionEffect)(()=>{r.current=n});let i=(0,$.useRef)(null);return(0,$.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var Ju=(0,$.createContext)({});function Yu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Xu(e,t,n,r,i,a){let{visualElement:o}=(0,$.useContext)(Cu),s=(0,$.useContext)(_u),c=(0,$.useContext)(iu),l=(0,$.useContext)(au),u=l.reducedMotion,d=l.skipAnimations,f=(0,$.useRef)(null),p=(0,$.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,$.useContext)(Ju);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Zu(f.current,n,i,h),(0,$.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Oi],_=(0,$.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ru(()=>{!p.current||!m||(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),ru(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,$.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function Zu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Qu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Yu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Qu(e){if(e)return e.options.allowProjection===!1?Qu(e.parent):e.projection}function $u(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Su(r);let a=n?n===`svg`:zu(e),o=a?Gu:Wu;function s(n,s){let c,l={...(0,$.useContext)(au),...n,layoutId:ed(n)},{isStatic:u,isValidProp:d}=l,f=Tu(n),p=o(n,u);if(!u&&typeof window<`u`){td(l,r);let t=nd(l);c=t.MeasureLayout,f.visualElement=Xu(e,p,l,i,t.ProjectionNode,a)}return(0,Q.jsxs)(Cu.Provider,{value:f,children:[c&&f.visualElement?(0,Q.jsx)(c,{visualElement:f.visualElement,...l}):null,Bu(e,n,qu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,$.forwardRef)(s);return c[Ku]=e,c}function ed({layoutId:e}){let t=(0,$.useContext)(tu).id;return t&&e!==void 0?t+`-`+e:e}function td(e,t){(0,$.useContext)(_u).strict}function nd(e){let{drag:t,layout:n}=xu();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rd(e,t){if(typeof Proxy>`u`)return $u;let n=new Map,r=(n,r)=>$u(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,$u(a,void 0,e,t)),n.get(a))})}var id=(e,t)=>t.isSVG??zu(e)?new wl(t):new cc(t,{allowProjection:e!==$.Fragment}),ad=class extends Z{constructor(e){super(e),e.animationState||=Dl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Vs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},od=0,sd={animation:{Feature:ad},exit:{Feature:class extends Z{constructor(){super(...arguments),this.id=od++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=vi(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},cd=class extends Z{constructor(e){super(e),this.removeGroupControls=d,this.removeListeners=d,this.controls=new tl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||d}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ld=({current:e})=>e?e.ownerDocument.defaultView:null,ud=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)},dd=class extends Z{constructor(){super(...arguments),this.removePointerDownListener=d}onPointerDown(e){this.session=new Ac(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ld(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ud(e),onStart:ud(t),onMove:ud(n),onEnd:(e,t)=>{delete this.session,r&&F.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=fc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},fd=!1,pd=({layout:e,layoutDependency:t})=>({layout:e,layoutDependency:t,animationType:typeof e==`string`?e:`both`}),md=class extends $.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),fd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,...pd(this.props),onExitComplete:()=>this.safeToRemove()})),es.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layout:t,layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o?(o.isPresent=a,(e.layoutDependency!==n||e.layout!==t)&&o.setOptions({...o.options,...pd(this.props)}),fd=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||F.postRender(()=>{let e=o.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Za.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;fd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function hd(e){let[t,n]=pu(),r=(0,$.useContext)(tu);return(0,Q.jsx)(md,{...e,layoutGroup:r,switchLayoutGroup:(0,$.useContext)(Ju),isPresent:t,safeToRemove:n})}var gd={pan:{Feature:dd},drag:{Feature:cd,ProjectionNode:zs,MeasureLayout:hd}};function _d(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&F.postRender(()=>i(t,uc(t)))}var vd=class extends Z{mount(){let{current:e}=this.node;e&&(this.unmount=ul(e,(e,t)=>(_d(this.node,t,`Start`),e=>_d(this.node,e,`End`))))}unmount(){}},yd=class extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=f(Is(this.node.current,`focus`,()=>this.onFocus()),Is(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function bd(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&F.postRender(()=>i(t,uc(t)))}var xd=class extends Z{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=vl(e,(e,t)=>(bd(this.node,t,`Start`),(e,{success:t})=>bd(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Sd=new WeakMap,Cd=new WeakMap,wd=e=>{let t=Sd.get(e.target);t&&t(e)},Td=e=>{e.forEach(wd)};function Ed({root:e,...t}){let n=e||document;Cd.has(n)||Cd.set(n,{});let r=Cd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Td,{root:e,...t})),r[i]}function Dd(e,t,n){let r=Ed(t);return Sd.set(e,n),r.observe(e),()=>{Sd.delete(e),r.unobserve(e)}}var Od={some:0,all:1},kd=class extends Z{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Od[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Dd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ad(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ad({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var jd={inView:{Feature:kd},tap:{Feature:xd},focus:{Feature:yd},hover:{Feature:vd}},Md={layout:{ProjectionNode:zs,MeasureLayout:hd}},Nd=rd({...sd,...jd,...gd,...Md},id);function Pd(e){let t=nu(()=>U(e)),{isStatic:n}=(0,$.useContext)(au);if(n){let[,n]=(0,$.useState)(e);(0,$.useEffect)(()=>t.on(`change`,n),[])}return t}function Fd(){!Ys.current&&Zs();let[e]=(0,$.useState)(Js.current);return e}export{eu as a,b as c,gu as i,Pd as n,Ql as o,Nd as r,Ht as s,Fd as t};
9
+ `),()=>{g.removeAttribute(`data-motion-pop-id`),S.contains(x)&&S.removeChild(x)}},[t]),(0,Q.jsx)(lu,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:$.cloneElement(e,{ref:d})})}var du=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=nu(fu),d=(0,$.useId)(),f=(0,$.useRef)(),p=(0,$.useRef)(n),m=(0,$.useRef)(r);ru(()=>{p.current=n,m.current=r});let h=!0,g=(0,$.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,$.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),$.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,Q.jsx)(uu,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,Q.jsx)(iu.Provider,{value:g,children:e})};function fu(){return new Map}function pu(e=!0){let t=(0,$.useContext)(iu);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,$.useId)();(0,$.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,$.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var mu=e=>e.key||``;function hu(e){let t=[];return $.Children.forEach(e,e=>{(0,$.isValidElement)(e)&&t.push(e)}),t}var gu=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=pu(o),f=(0,$.useMemo)(()=>hu(e),[e]),p=o&&!u?[]:f.map(mu),m=(0,$.useRef)(!0),h=nu(()=>new Map),g=(0,$.useRef)(new Set),[_,v]=(0,$.useState)(f),[y,b]=(0,$.useState)(f);ru(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]);let x=(0,$.useRef)();(0,$.useEffect)(()=>()=>{let e=x.current;x.current=void 0,e?.()},[y]),ru(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=mu(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let S=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(mu(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>h.get(mu(e)))?e=f:a===`wait`&&(e=S),b(hu(e)),v(f),null}let{forceRender:C}=(0,$.useContext)(tu);return(0,Q.jsx)(Q.Fragment,{children:y.map(e=>{let _=mu(e),b=o&&!u?!1:f===y||p.includes(_);return(0,Q.jsx)(du,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(C?.(),v([]),o&&d?.(),x.current=r)},anchorX:s,anchorY:c,children:e},_)})})},_u=(0,$.createContext)({strict:!1}),vu={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},yu=!1;function bu(){if(yu)return;let e={};for(let t in vu)e[t]={isEnabled:e=>vu[t].some(t=>!!e[t])};ec(e),yu=!0}function xu(){return bu(),tc()}function Su(e){let t=xu();for(let n in e)t[n]={...t[n],...e[n]};ec(t)}var Cu=(0,$.createContext)({});function wu(e,t){if(Gs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Hs(t)?t:void 0,animate:Hs(n)?n:void 0}}return e.inherit===!1?{}:t}function Tu(e){let{initial:t,animate:n}=wu(e,(0,$.useContext)(Cu));return(0,$.useMemo)(()=>({initial:t,animate:n}),[Eu(t),Eu(n)])}function Eu(e){return Array.isArray(e)?e.join(` `):e}var Du=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ou(e,t,n){for(let r in t)!W(t[r])&&!ac(r,n)&&(e[r]=t[r])}function ku({transformTemplate:e},t){return(0,$.useMemo)(()=>{let n=Du();return ha(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Au(e,t){let n=e.style||{},r={};return Ou(r,n,e),Object.assign(r,ku(e,t)),r}function ju(e,t){let n={},r=Au(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Mu=()=>({...Du(),attrs:{}});function Nu(e,t,n,r){let i=(0,$.useMemo)(()=>{let n=Mu();return ba(n,t,xl(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ou(t,e.style,e),i.style={...t,...i.style}}return i}var Pu=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Fu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Pu.has(e)}function Iu(e,t){return e.startsWith(`on`)?!Fu(e):t?.(e)??!Fu(e)}function Lu(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(W(e[a])||(Iu(a,r)||n===!0&&Fu(a)||!t&&!Fu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Ru=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function zu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ru.indexOf(e)>-1||/[A-Z]/u.test(e))}function Bu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??zu(e)?Nu:ju)(t,r,i,e),l=Lu(t,typeof e==`string`,a,s),u=e===$.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,$.useMemo)(()=>W(d)?d.get():d,[d]);return(0,$.createElement)(e,{...u,children:f})}function Vu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Hu(n,r,i,e),renderState:t()}}function Hu(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=io(a[e]);let{initial:o,animate:s}=e,c=Gs(e),l=Ks(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Vs(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=_i(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Uu=e=>(t,n)=>{let r=(0,$.useContext)(Cu),i=(0,$.useContext)(iu),a=()=>Vu(e,t,r,i);return n?a():nu(a)},Wu=Uu({scrapeMotionValuesFromProps:oc,createRenderState:Du}),Gu=Uu({scrapeMotionValuesFromProps:Cl,createRenderState:Mu}),Ku=Symbol.for(`motionComponentSymbol`);function qu(e,t,n){let r=(0,$.useRef)(n);(0,$.useInsertionEffect)(()=>{r.current=n});let i=(0,$.useRef)(null);return(0,$.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var Ju=(0,$.createContext)({});function Yu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Xu(e,t,n,r,i,a){let{visualElement:o}=(0,$.useContext)(Cu),s=(0,$.useContext)(_u),c=(0,$.useContext)(iu),l=(0,$.useContext)(au),u=l.reducedMotion,d=l.skipAnimations,f=(0,$.useRef)(null),p=(0,$.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,$.useContext)(Ju);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Zu(f.current,n,i,h),(0,$.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Oi],_=(0,$.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ru(()=>{!p.current||!m||(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),ru(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,$.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function Zu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Qu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Yu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Qu(e){if(e)return e.options.allowProjection===!1?Qu(e.parent):e.projection}function $u(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Su(r);let a=n?n===`svg`:zu(e),o=a?Gu:Wu;function s(n,s){let c,l={...(0,$.useContext)(au),...n,layoutId:ed(n)},{isStatic:u,isValidProp:d}=l,f=Tu(n),p=o(n,u);if(!u&&typeof window<`u`){td(l,r);let t=nd(l);c=t.MeasureLayout,f.visualElement=Xu(e,p,l,i,t.ProjectionNode,a)}return(0,Q.jsxs)(Cu.Provider,{value:f,children:[c&&f.visualElement?(0,Q.jsx)(c,{visualElement:f.visualElement,...l}):null,Bu(e,n,qu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,$.forwardRef)(s);return c[Ku]=e,c}function ed({layoutId:e}){let t=(0,$.useContext)(tu).id;return t&&e!==void 0?t+`-`+e:e}function td(e,t){(0,$.useContext)(_u).strict}function nd(e){let{drag:t,layout:n}=xu();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rd(e,t){if(typeof Proxy>`u`)return $u;let n=new Map,r=(n,r)=>$u(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,$u(a,void 0,e,t)),n.get(a))})}var id=(e,t)=>t.isSVG??zu(e)?new wl(t):new cc(t,{allowProjection:e!==$.Fragment}),ad=class extends Z{constructor(e){super(e),e.animationState||=Dl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Vs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},od=0,sd={animation:{Feature:ad},exit:{Feature:class extends Z{constructor(){super(...arguments),this.id=od++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=vi(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},cd=class extends Z{constructor(e){super(e),this.removeGroupControls=d,this.removeListeners=d,this.controls=new tl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||d}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ld=({current:e})=>e?e.ownerDocument.defaultView:null,ud=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)},dd=class extends Z{constructor(){super(...arguments),this.removePointerDownListener=d}onPointerDown(e){this.session=new Ac(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ld(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ud(e),onStart:ud(t),onMove:ud(n),onEnd:(e,t)=>{delete this.session,r&&F.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=fc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},fd=!1,pd=({layout:e,layoutDependency:t})=>({layout:e,layoutDependency:t,animationType:typeof e==`string`?e:`both`}),md=class extends $.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),fd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,...pd(this.props),onExitComplete:()=>this.safeToRemove()})),es.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layout:t,layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o?(o.isPresent=a,(e.layoutDependency!==n||e.layout!==t)&&o.setOptions({...o.options,...pd(this.props)}),fd=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||F.postRender(()=>{let e=o.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Za.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;fd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function hd(e){let[t,n]=pu(),r=(0,$.useContext)(tu);return(0,Q.jsx)(md,{...e,layoutGroup:r,switchLayoutGroup:(0,$.useContext)(Ju),isPresent:t,safeToRemove:n})}var gd={pan:{Feature:dd},drag:{Feature:cd,ProjectionNode:zs,MeasureLayout:hd}};function _d(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&F.postRender(()=>i(t,uc(t)))}var vd=class extends Z{mount(){let{current:e}=this.node;e&&(this.unmount=ul(e,(e,t)=>(_d(this.node,t,`Start`),e=>_d(this.node,e,`End`))))}unmount(){}},yd=class extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=f(Is(this.node.current,`focus`,()=>this.onFocus()),Is(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function bd(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&F.postRender(()=>i(t,uc(t)))}var xd=class extends Z{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=vl(e,(e,t)=>(bd(this.node,t,`Start`),(e,{success:t})=>bd(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Sd=new WeakMap,Cd=new WeakMap,wd=e=>{let t=Sd.get(e.target);t&&t(e)},Td=e=>{e.forEach(wd)};function Ed({root:e,...t}){let n=e||document;Cd.has(n)||Cd.set(n,{});let r=Cd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Td,{root:e,...t})),r[i]}function Dd(e,t,n){let r=Ed(t);return Sd.set(e,n),r.observe(e),()=>{Sd.delete(e),r.unobserve(e)}}var Od={some:0,all:1},kd=class extends Z{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Od[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Dd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ad(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ad({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var jd={inView:{Feature:kd},tap:{Feature:xd},focus:{Feature:yd},hover:{Feature:vd}},Md={layout:{ProjectionNode:zs,MeasureLayout:hd}},Nd=rd({...sd,...jd,...gd,...Md},id);function Pd(e){let t=nu(()=>U(e)),{isStatic:n}=(0,$.useContext)(au);if(n){let[,n]=(0,$.useState)(e);(0,$.useEffect)(()=>t.on(`change`,n),[])}return t}function Fd(){!Ys.current&&Zs();let[e]=(0,$.useState)(Js.current);return e}export{eu as a,I as c,gu as i,F as l,Pd as n,Ql as o,Nd as r,Ht as s,Fd as t,b as u};
@@ -0,0 +1 @@
1
+ import{r as e}from"./vendor-framer-motion-D8hQsul-.js";var t=e;export{t};
package/dist/index.html CHANGED
@@ -560,7 +560,7 @@
560
560
  opacity: 0.72;
561
561
  }
562
562
  </style>
563
- <script type="module" crossorigin src="/assets/main-CJK9gObM.js"></script>
563
+ <script type="module" crossorigin src="/assets/main-DGdMB0a9.js"></script>
564
564
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
565
565
  <link rel="modulepreload" crossorigin href="/assets/runtime-auth-ef9W7A43.js">
566
566
  <link rel="modulepreload" crossorigin href="/assets/runtime-switch-CAZiOV2G.js">
@@ -588,14 +588,14 @@
588
588
  <link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
589
589
  <link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
590
590
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-D3k0hKDj.js">
591
- <link rel="modulepreload" crossorigin href="/assets/platform-DXeTzJHG.js">
592
- <link rel="modulepreload" crossorigin href="/assets/terminalApi-CIbkfDkE.js">
591
+ <link rel="modulepreload" crossorigin href="/assets/platform-DUe-qtEp.js">
592
+ <link rel="modulepreload" crossorigin href="/assets/terminalApi-BuoB9-0z.js">
593
593
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-BzblfnMx.js">
594
- <link rel="modulepreload" crossorigin href="/assets/types-Dy7vKiLX.js">
595
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-MylXZ4IG.js">
596
- <link rel="modulepreload" crossorigin href="/assets/native-config-Ci8to5sR.js">
597
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-52a7OLrA.js">
598
- <link rel="stylesheet" crossorigin href="/assets/src-D4rfdktg.css">
594
+ <link rel="modulepreload" crossorigin href="/assets/types-BC9_N4bU.js">
595
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-oYpF3Iys.js">
596
+ <link rel="modulepreload" crossorigin href="/assets/native-config-eNF46MQE.js">
597
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-OWlkIGor.js">
598
+ <link rel="stylesheet" crossorigin href="/assets/src-dSUmXLC4.css">
599
599
  </head>
600
600
  <body class="h-full bg-background text-foreground">
601
601
  <!-- Keep the startup layer outside #root. React replaces every child of
@@ -77,7 +77,7 @@
77
77
  .dark #initial-loading img { filter: invert(1); }
78
78
  </style>
79
79
 
80
- <script type="module" crossorigin src="/assets/miniChat-B0j7f5Gr.js"></script>
80
+ <script type="module" crossorigin src="/assets/miniChat-DFw_Yk31.js"></script>
81
81
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
82
82
  <link rel="modulepreload" crossorigin href="/assets/runtime-auth-ef9W7A43.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/runtime-switch-CAZiOV2G.js">
@@ -105,14 +105,14 @@
105
105
  <link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
106
106
  <link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
107
107
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-D3k0hKDj.js">
108
- <link rel="modulepreload" crossorigin href="/assets/platform-DXeTzJHG.js">
109
- <link rel="modulepreload" crossorigin href="/assets/terminalApi-CIbkfDkE.js">
108
+ <link rel="modulepreload" crossorigin href="/assets/platform-DUe-qtEp.js">
109
+ <link rel="modulepreload" crossorigin href="/assets/terminalApi-BuoB9-0z.js">
110
110
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-BzblfnMx.js">
111
- <link rel="modulepreload" crossorigin href="/assets/types-Dy7vKiLX.js">
112
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-MylXZ4IG.js">
113
- <link rel="modulepreload" crossorigin href="/assets/native-config-Ci8to5sR.js">
114
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-52a7OLrA.js">
115
- <link rel="stylesheet" crossorigin href="/assets/src-D4rfdktg.css">
111
+ <link rel="modulepreload" crossorigin href="/assets/types-BC9_N4bU.js">
112
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-oYpF3Iys.js">
113
+ <link rel="modulepreload" crossorigin href="/assets/native-config-eNF46MQE.js">
114
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-OWlkIGor.js">
115
+ <link rel="stylesheet" crossorigin href="/assets/src-dSUmXLC4.css">
116
116
  </head>
117
117
  <body class="h-full bg-background text-foreground">
118
118
  <div id="root" class="h-full">
package/dist/mobile.html CHANGED
@@ -64,7 +64,7 @@
64
64
  </script>
65
65
 
66
66
  <style>.dark #mobile-startup-logo img { filter: invert(1); }</style>
67
- <script type="module" crossorigin src="/assets/mobile-CPqhIAEq.js"></script>
67
+ <script type="module" crossorigin src="/assets/mobile-D-9RyRP2.js"></script>
68
68
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
69
69
  <link rel="modulepreload" crossorigin href="/assets/runtime-auth-ef9W7A43.js">
70
70
  <link rel="modulepreload" crossorigin href="/assets/runtime-switch-CAZiOV2G.js">
@@ -92,14 +92,14 @@
92
92
  <link rel="modulepreload" crossorigin href="/assets/path-utils-jGozTg9d.js">
93
93
  <link rel="modulepreload" crossorigin href="/assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js">
94
94
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-resource-D3k0hKDj.js">
95
- <link rel="modulepreload" crossorigin href="/assets/platform-DXeTzJHG.js">
96
- <link rel="modulepreload" crossorigin href="/assets/terminalApi-CIbkfDkE.js">
95
+ <link rel="modulepreload" crossorigin href="/assets/platform-DUe-qtEp.js">
96
+ <link rel="modulepreload" crossorigin href="/assets/terminalApi-BuoB9-0z.js">
97
97
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-BzblfnMx.js">
98
- <link rel="modulepreload" crossorigin href="/assets/types-Dy7vKiLX.js">
99
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-MylXZ4IG.js">
100
- <link rel="modulepreload" crossorigin href="/assets/native-config-Ci8to5sR.js">
101
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-52a7OLrA.js">
102
- <link rel="stylesheet" crossorigin href="/assets/src-D4rfdktg.css">
98
+ <link rel="modulepreload" crossorigin href="/assets/types-BC9_N4bU.js">
99
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-oYpF3Iys.js">
100
+ <link rel="modulepreload" crossorigin href="/assets/native-config-eNF46MQE.js">
101
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-OWlkIGor.js">
102
+ <link rel="stylesheet" crossorigin href="/assets/src-dSUmXLC4.css">
103
103
  </head>
104
104
  <body class="h-full bg-background text-foreground">
105
105
  <div id="root" class="h-full">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuriai/web",
3
- "version": "0.2.12-beta.1",
3
+ "version": "0.2.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./server/index.js",
@@ -116,6 +116,7 @@ The following functions are internal helpers used by exported functions:
116
116
  - `diffStats`: Object mapping file paths to `{ insertions, deletions }`. Omitted by light mode and by oversized change sets.
117
117
  - `mergeInProgress`: Object with `{ head, message }` if merge in progress.
118
118
  - `rebaseInProgress`: Object with `{ headName, onto }` if rebase in progress.
119
+ - `revision`: `/api/git/status` only. Content revision `<light|full>:<sha1 base64url>` of the serialized status for that mode. Clients may echo it as `?since=<revision>`; when the freshly computed snapshot has the same revision the route answers `{ unchanged: true, revision }` without the file list. `getStatus` is still executed on every request, so `unchanged` is authoritative for current state. The shared HTTP client keeps the last snapshot per directory/mode, bound to transport identity and its invalidation version, and drops it on any local mutation. The VS Code runtime computes status in the extension host and never uses this field.
119
120
 
120
121
  ### Staged and unstaged change handling
121
122
  - `status.files` exposes both `index` and `working_dir` codes. Shared UI uses these as separate scopes: staged rows are derived from non-empty `index` statuses, while unstaged rows are derived from `working_dir` statuses and untracked files.
@@ -1,3 +1,5 @@
1
+ import { createHash } from 'node:crypto';
2
+
1
3
  export function registerGitRoutes(app, { messageQueueService = null, createRequestID = () => globalThis.crypto.randomUUID(), broadcastWorktreeTopologyChanged = () => {}, releaseWorktreeLocation } = {}) {
2
4
  const normalizeWorktreePath = (value) => typeof value === 'string' ? value.trim().replace(/\\/g, '/').replace(/\/+$/, '') : '';
3
5
  const lifecycleOperations = new Map();
@@ -250,7 +252,14 @@ export function registerGitRoutes(app, { messageQueueService = null, createReque
250
252
 
251
253
  const mode = req.query.mode === 'light' ? 'light' : undefined;
252
254
  const status = await getStatus(directory, { mode });
253
- res.json(status);
255
+ // Content revision: clients echo it as `since`; an identical snapshot is
256
+ // answered without re-sending (and re-parsing) the full file list.
257
+ const serialized = JSON.stringify(status);
258
+ const revision = `${mode ?? 'full'}:${createHash('sha1').update(serialized).digest('base64url')}`;
259
+ if (typeof req.query.since === 'string' && req.query.since === revision) {
260
+ return res.json({ unchanged: true, revision });
261
+ }
262
+ res.json({ ...status, revision });
254
263
  } catch (error) {
255
264
  const errorText = extractGitErrorText(error);
256
265
  if (/not a git repository/i.test(errorText)) {
@@ -8,6 +8,7 @@ const gitLibraries = {
8
8
  getWorktrees: vi.fn(),
9
9
  isGitRepository: vi.fn(),
10
10
  resolvePrimaryWorktreeRoot: vi.fn(),
11
+ getStatus: vi.fn(),
11
12
  };
12
13
 
13
14
  vi.mock('./index.js', () => ({
@@ -18,6 +19,7 @@ vi.mock('./index.js', () => ({
18
19
  getWorktrees: gitLibraries.getWorktrees,
19
20
  isGitRepository: gitLibraries.isGitRepository,
20
21
  resolvePrimaryWorktreeRoot: gitLibraries.resolvePrimaryWorktreeRoot,
22
+ getStatus: gitLibraries.getStatus,
21
23
  }));
22
24
 
23
25
  const { registerGitRoutes } = await import('./routes.js');
@@ -205,6 +207,80 @@ describe('git routes batch discover', () => {
205
207
  });
206
208
  });
207
209
 
210
+ describe('git routes status revision', () => {
211
+ const statusPayload = (overrides = {}) => ({
212
+ current: 'main',
213
+ tracking: null,
214
+ ahead: 0,
215
+ behind: 0,
216
+ files: [{ path: 'a.ts', index: ' ', working_dir: 'M' }],
217
+ isClean: false,
218
+ oversized: false,
219
+ ...overrides,
220
+ });
221
+
222
+ beforeEach(() => {
223
+ gitLibraries.isGitRepository.mockReset();
224
+ gitLibraries.getStatus.mockReset();
225
+ gitLibraries.isGitRepository.mockResolvedValue(true);
226
+ });
227
+
228
+ const requestStatus = async (query) => {
229
+ const { app, getRoute } = createRouteRegistry();
230
+ registerGitRoutes(app);
231
+ const response = createMockResponse();
232
+ await getRoute('GET', '/api/git/status')({ query: { directory: '/repo', ...query } }, response);
233
+ return response;
234
+ };
235
+
236
+ it('returns the full status with a stable content revision', async () => {
237
+ gitLibraries.getStatus.mockResolvedValue(statusPayload());
238
+ const first = await requestStatus();
239
+ const second = await requestStatus();
240
+
241
+ expect(first.statusCode).toBe(200);
242
+ expect(first.body).toMatchObject(statusPayload());
243
+ expect(typeof first.body.revision).toBe('string');
244
+ expect(first.body.revision.length).toBeGreaterThan(0);
245
+ expect(second.body.revision).toBe(first.body.revision);
246
+ });
247
+
248
+ it('answers unchanged without the file list when the client revision matches', async () => {
249
+ gitLibraries.getStatus.mockResolvedValue(statusPayload());
250
+ const { body: full } = await requestStatus();
251
+
252
+ const response = await requestStatus({ since: full.revision });
253
+
254
+ expect(response.statusCode).toBe(200);
255
+ expect(response.body).toEqual({ unchanged: true, revision: full.revision });
256
+ });
257
+
258
+ it('returns the full status when content changed since the client revision', async () => {
259
+ gitLibraries.getStatus.mockResolvedValueOnce(statusPayload());
260
+ const { body: full } = await requestStatus();
261
+ const changed = statusPayload({ files: [{ path: 'a.ts', index: 'M', working_dir: ' ' }] });
262
+ gitLibraries.getStatus.mockResolvedValueOnce(changed);
263
+
264
+ const response = await requestStatus({ since: full.revision });
265
+
266
+ expect(response.body).toMatchObject(changed);
267
+ expect(response.body.unchanged).toBeUndefined();
268
+ expect(response.body.revision).not.toBe(full.revision);
269
+ });
270
+
271
+ it('gives light and full payloads distinct revisions', async () => {
272
+ gitLibraries.getStatus.mockImplementation(async (_directory, options) => (
273
+ options?.mode === 'light' ? statusPayload() : statusPayload({ diffStats: { 'a.ts': { insertions: 1, deletions: 0 } } })
274
+ ));
275
+ const { body: full } = await requestStatus();
276
+
277
+ const light = await requestStatus({ mode: 'light', since: full.revision });
278
+
279
+ expect(light.body.unchanged).toBeUndefined();
280
+ expect(light.body.files).toHaveLength(1);
281
+ });
282
+ });
283
+
208
284
  describe('git routes index mutations', () => {
209
285
  beforeEach(() => {
210
286
  gitLibraries.stageFiles.mockReset();
@@ -1,22 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{n as r}from"./vendor-react-BP2cRVqX.js";import{a as i,n as a,r as o,u as s}from"./vendor-reactuses-core-BJ-jJ4YM.js";import{r as c}from"./button-DFX-UCuQ.js";import{t as l}from"./agentColors-DWSbQXy2.js";import{n as u,t as d}from"./vendor-dicebear-core-CV95S5Pg.js";import{t as f}from"./vendor-dicebear-styles-C4OfoX7R.js";import{t as p}from"./dualLimitLru-D8Sphgua.js";import{t as m}from"./useThemeSystem-8jhE4Zyk.js";var h=e(t(),1),g=r(),_=Object.freeze({round:Object.freeze({width:220,height:220}),soft:Object.freeze({width:220,height:270}),tall:Object.freeze({width:196,height:286}),wide:Object.freeze({width:252,height:210}),compact:Object.freeze({width:188,height:220}),large:Object.freeze({width:250,height:300}),drop:Object.freeze({width:202,height:236})}),v=e=>Object.hasOwn(_,e),y=e=>{let t=_[e];if(!t)throw Error(`Unknown blob preset: ${e}`);return{...t}},b=`open-mascot/definition`,x=e=>JSON.parse(JSON.stringify(e)),S=(e=1,t=1,n=0,r=0,i=0)=>({scaleX:e,scaleY:t,x:n,y:r,rotation:i}),C=(e=`none`,t=`none`)=>({body:e,eyes:t}),w=({pitch:e=0,yaw:t=0,roll:n=0,squash:r=0,lift:i=0,gazeX:a=0,gazeY:o=0,leftEye:s=S(),rightEye:c=S()}={})=>({blob:{pitch:e,yaw:t,roll:n,squash:r,lift:i},gaze:{x:a,y:o},eyes:{left:s,right:c}}),T={schema:b,schemaVersion:2,name:`New mascot`,blob:{shape:`soft`,renderMode:`projected-3d`,width:220,height:270,color:`#6fcf97`},face:{eyeShape:`capsule`,eyeColor:`#18332a`,eyeWidth:23,eyeHeight:56,eyeGap:42,eyeY:-10},stage:{color:`#f3efe7`},expressions:{neutral:{label:`Neutral`,pose:w()},focused:{label:`Focused`,pose:w({pitch:-3,yaw:10,roll:4,gazeX:3,leftEye:S(.95,1.13),rightEye:S(.95,1.13)})},curious:{label:`Curious`,pose:w({pitch:-7,yaw:-14,roll:-7,gazeX:-4,gazeY:-2,leftEye:S(.92,1.06,0,0,17),rightEye:S(.82,.88,0,1,-13)})},skyward:{label:`Skyward`,pose:w({pitch:6,yaw:20,roll:-10,gazeX:5,gazeY:-10,leftEye:S(1.02,.88),rightEye:S(1.02,.88)})},"soft-gaze":{label:`Soft gaze`,pose:w({pitch:-10,yaw:-6,roll:-5,gazeY:5,leftEye:S(1.08,.82),rightEye:S(1.08,.82)})},"side-eye":{label:`Side-eye`,pose:w({pitch:-7,yaw:12,roll:-6,gazeX:4,leftEye:S(1.1,.34,0,-1,-4),rightEye:S(.9,1.08,0,1,3)})},beaming:{label:`Beaming`,pose:w({pitch:-4,yaw:-11,roll:8,squash:.05,lift:-5,leftEye:S(1.32,1.4,0,-2,-5),rightEye:S(1.32,1.4,0,-2,5)})},cheeky:{label:`Cheeky`,pose:w({pitch:2,yaw:15,roll:-12,lift:-3,gazeX:3,leftEye:S(.85,.86,0,0,22),rightEye:S(.85,.86,0,0,-18)})},surprised:{label:`Surprised`,pose:w({pitch:-3,yaw:-8,roll:-5,squash:-.03,lift:-4,leftEye:S(1.55,.72),rightEye:S(1.55,.72)})},shy:{label:`Shy`,pose:w({pitch:-12,yaw:7,roll:5,gazeX:-2,gazeY:10,leftEye:S(.92,.66),rightEye:S(.92,.66)})},sad:{label:`Sad`,pose:w({pitch:-13,yaw:-5,roll:-4,squash:.02,gazeY:8,leftEye:S(1.12,.48,0,2,-8),rightEye:S(1.12,.48,0,2,8)})},sleepy:{label:`Sleepy`,pose:w({pitch:5,yaw:3,roll:5,squash:.03,gazeY:4,leftEye:S(1.25,.18),rightEye:S(1.25,.18)})},confident:{label:`Confident`,pose:w({pitch:8,yaw:17,roll:-6,lift:-2,gazeX:5,gazeY:-5,leftEye:S(.94,.82),rightEye:S(.94,.82)})},angry:{label:`Angry`,pose:w({pitch:5,yaw:6,roll:3,squash:.03,gazeY:-1,leftEye:S(1.18,1.22,0,0,-31),rightEye:S(1.18,1.22,0,0,31)}),motion:C(`tremble`)},uneasy:{label:`Uneasy`,pose:w({pitch:-7,yaw:-11,roll:4,gazeX:-4,gazeY:2,leftEye:S(1.02,.96,0,0,19),rightEye:S(1.02,.96,0,0,-21)}),motion:C(`slow-drift`,`tremble`)}},animations:{idle:{label:`Idle`,playback:`loop`,ambient:.42,blink:`normal`,steps:[{expression:`neutral`,holdMs:4400,transitionMs:640,easing:`gentle`},{expression:`curious`,holdMs:3200,transitionMs:760,easing:`gentle`},{expression:`neutral`,holdMs:5100,transitionMs:720,easing:`gentle`}]},listening:{label:`Listening`,playback:`loop`,ambient:.28,blink:`calm`,steps:[{expression:`focused`,holdMs:2600,transitionMs:560,easing:`gentle`},{expression:`soft-gaze`,holdMs:2200,transitionMs:680,easing:`gentle`},{expression:`focused`,holdMs:3100,transitionMs:610,easing:`gentle`}]},thinking:{label:`Thinking`,playback:`loop`,ambient:.34,blink:`normal`,steps:[{expression:`curious`,holdMs:1750,transitionMs:690,easing:`gentle`},{expression:`side-eye`,holdMs:2100,transitionMs:610,easing:`gentle`},{expression:`skyward`,holdMs:2500,transitionMs:780,easing:`gentle`},{expression:`curious`,holdMs:1850,transitionMs:640,easing:`gentle`}]},happy:{label:`Happy`,playback:`loop`,ambient:.48,blink:`bright`,steps:[{expression:`soft-gaze`,holdMs:1300,transitionMs:520,easing:`spring`},{expression:`beaming`,holdMs:2100,transitionMs:620,easing:`spring`},{expression:`cheeky`,holdMs:1700,transitionMs:570,easing:`gentle`}]},curious:{label:`Curious`,playback:`loop`,ambient:.38,blink:`normal`,steps:[{expression:`curious`,holdMs:2300,transitionMs:650,easing:`gentle`},{expression:`skyward`,holdMs:2700,transitionMs:710,easing:`gentle`},{expression:`focused`,holdMs:1900,transitionMs:580,easing:`gentle`}]},surprised:{label:`Surprised`,playback:`once`,ambient:.22,blink:`bright`,steps:[{expression:`neutral`,holdMs:180,transitionMs:120,easing:`quick`},{expression:`surprised`,holdMs:1450,transitionMs:360,easing:`spring`},{expression:`curious`,holdMs:900,transitionMs:820,easing:`gentle`}]},shy:{label:`Shy`,playback:`loop`,ambient:.2,blink:`calm`,steps:[{expression:`soft-gaze`,holdMs:2400,transitionMs:720,easing:`gentle`},{expression:`shy`,holdMs:3300,transitionMs:810,easing:`gentle`}]},sad:{label:`Sad`,playback:`loop`,ambient:.16,blink:`sleepy`,steps:[{expression:`sad`,holdMs:3900,transitionMs:920,easing:`gentle`},{expression:`sleepy`,holdMs:2800,transitionMs:980,easing:`gentle`},{expression:`soft-gaze`,holdMs:3500,transitionMs:880,easing:`gentle`}]},"stand-tall":{label:`Stand tall`,playback:`loop`,ambient:.32,blink:`normal`,steps:[{expression:`focused`,holdMs:1600,transitionMs:560,easing:`gentle`},{expression:`confident`,holdMs:2900,transitionMs:680,easing:`spring`},{expression:`soft-gaze`,holdMs:1800,transitionMs:760,easing:`gentle`}]},"victory-bounce":{label:`Victory bounce`,playback:`once`,ambient:.54,blink:`bright`,steps:[{expression:`shy`,holdMs:240,transitionMs:180,easing:`quick`},{expression:`beaming`,holdMs:1050,transitionMs:390,easing:`spring`},{expression:`cheeky`,holdMs:950,transitionMs:430,easing:`spring`},{expression:`confident`,holdMs:1500,transitionMs:760,easing:`gentle`}]},sleeping:{label:`Sleeping`,playback:`loop`,ambient:.1,blink:`sleepy`,steps:[{expression:`sleepy`,holdMs:4700,transitionMs:1100,easing:`gentle`},{expression:`sad`,holdMs:2100,transitionMs:1250,easing:`gentle`}]}}},E=(e={})=>{let t=x(T);for(let e of Object.values(t.expressions))e.motion={...C(),...e.motion};let n=e.shape??t.blob.shape,r=v(n)?y(n):t.blob;return t.name=e.name??t.name,t.blob.shape=n,t.blob.renderMode=e.renderMode??t.blob.renderMode,t.blob.width=e.width??r.width,t.blob.height=e.height??r.height,t.blob.color=e.color??t.blob.color,t.face.eyeShape=e.eyeShape??t.face.eyeShape,t.face.eyeColor=e.eyeColor??t.face.eyeColor,t.stage.color=e.stageColor??t.stage.color,t},D=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),O={gentle(e){let t=D(e);return t*t*t*(t*(t*6-15)+10)},quick(e){return 1-(1-D(e))**4},spring(e){let t=D(e);return D(1-(1-t)**4+Math.sin(t*Math.PI*2.45)*(1-t)**3*.13)}},k=(e,t,n)=>typeof e==`number`&&typeof t==`number`?e+(t-e)*n:e&&t&&typeof e==`object`&&typeof t==`object`?Object.fromEntries(Object.keys(e).map(r=>[r,k(e[r],t[r],n)])):n<1?e:t,A=(e,t,n,r=`gentle`)=>k(e,t,(O[r]??O.gentle)(n)),j={body:`none`,eyes:`none`},M=e=>({...j,...e?.motion}),N=[[0,0],[.72,-.28],[-.34,.54],[.28,.18],[-.62,-.12],[.12,-.48]],P=e=>{let t=1240,n=Math.floor(Math.max(0,e)/t),r=Math.max(0,e)-n*t,i=O.gentle(Math.min(1,r/125)),a=N[n%N.length],o=N[(n+1)%N.length];return{x:a[0]+(o[0]-a[0])*i,y:a[1]+(o[1]-a[1])*i}},F=(e,t)=>{let n=(t%e.length+e.length)%e.length,r=Math.floor(n),i=(r+1)%e.length,a=O.gentle(n-r);return Object.fromEntries(Object.keys(e[r]).map(t=>[t,e[r][t]+(e[i][t]-e[r][t])*a]))},I=[{yaw:-.82,pitch:.38,roll:-.28,lift:.62},{yaw:.54,pitch:-.66,roll:.43,lift:-.44},{yaw:1.08,pitch:.2,roll:-.24,lift:.86},{yaw:-.46,pitch:.72,roll:.34,lift:-.58},{yaw:.16,pitch:-.31,roll:-.49,lift:.22}],L=[{x:-1.12,y:.44},{x:.67,y:-.74},{x:1.28,y:.2},{x:-.48,y:.8},{x:.2,y:-.36}],R=(e,t,n,r=1)=>{let i=JSON.parse(JSON.stringify(e)),a={...j,...t},o=Math.max(0,n)/1e3,s=D(r);if(a.body===`slow-drift`)i.blob.yaw+=Math.sin(o*.73)*1.4*s,i.blob.pitch+=Math.sin(o*.51)*.85*s,i.blob.roll+=Math.sin(o*.39)*.72*s,i.blob.lift+=Math.sin(o*.88)*1.9*s;else if(a.body===`tremble`){let e=F(I,o*8.4);i.blob.yaw+=e.yaw*s,i.blob.pitch+=e.pitch*s,i.blob.roll+=e.roll*s,i.blob.lift+=e.lift*s}else if(a.body===`boing`){let e=o*Math.PI*2*1.25,t=Math.sin(e),n=Math.sin(e*2)*.18;i.blob.squash+=(t+n)*.075*s,i.blob.lift+=t*5.4*s}if(a.eyes===`micro-saccades`){let e=P(n);i.gaze.x+=e.x*2.1*s,i.gaze.y+=e.y*1.5*s}else if(a.eyes===`tremble`){let e=F(L,o*10.6);i.gaze.x+=e.x*s,i.gaze.y+=e.y*s}return i},ee=e=>e.steps.reduce((t,n,r)=>{let i=e.playback===`loop`||r<e.steps.length-1;return t+n.holdMs+(i?n.transitionMs:0)},0),te=(e,t)=>{let n=ee(e),r=e.playback===`once`&&t>=n,i=e.playback===`loop`&&n>0?(t%n+n)%n:D(t,0,n),a=0;for(let t=0;t<e.steps.length;t+=1){let o=e.steps[t],s=e.playback===`loop`||t<e.steps.length-1,c=a+o.holdMs,l=c+(s?o.transitionMs:0);if(i<=c||!s)return{index:t,phase:`hold`,progress:0,done:r,duration:n};if(i<=l)return{index:t,phase:`transition`,progress:o.transitionMs?(i-c)/o.transitionMs:1,done:r,duration:n};a=l}return{index:e.steps.length-1,phase:`hold`,progress:0,done:r,duration:n}},ne={calm:[6800,5300,7900,6100],normal:[5100,7200,4300,6400,5600],bright:[3900,5700,4500,6900],sleepy:[7600,9100,6800],none:[]},re=e=>e<.23?O.quick(e/.23):e<.39?1:1-O.gentle((e-.39)/.61),ie=(e,t)=>{let n=t===!1?`none`:t===!0?`normal`:t,r=ne[n]??ne.normal;if(!r.length||e<0)return 0;let i=1700+r[0]*.32,a=0;for(;i<=e&&a<1e4;){let t=n===`sleepy`?320:a%7==4?250:205,o=e-i;if(o>=0&&o<=t)return re(o/t);if(n===`bright`&&a%5==2){let n=e-(i+t+118);if(n>=0&&n<=170)return re(n/170)*.88}i+=r[a%r.length],a+=1}return 0},ae=(e,t,n,r)=>{let i=JSON.parse(JSON.stringify(e)),a=t/1e3,o=D(n??0);i.blob.lift+=Math.sin(a*.79+.4)*2.1*o,i.blob.roll+=Math.sin(a*.53+1.1)*.72*o,i.blob.pitch+=Math.sin(a*.41+2.3)*.5*o,i.blob.squash+=Math.sin(a*1.06)*.006*o,i.gaze.x+=Math.sin(a*.29+.7)*.42*o,i.gaze.y+=Math.sin(a*.23+2.7)*.3*o;let s=ie(t,r),c=r===`bright`?.04:0;return i.eyes.left.scaleY*=Math.max(.055,1-s*(.95-c)),i.eyes.right.scaleY*=Math.max(.055,1-s*.96),i.eyes.left.y+=s*1.25,i.eyes.right.y+=s*1.05,{pose:i,blink:s}},oe=(e,t,n,r={})=>{let i=e.animations[t];if(!i)throw Error(`Unknown animation: ${t}`);let a=te(i,Math.max(0,n)),o=i.steps[a.index],s=e.expressions[o.expression],c=s.pose,l=c,u=[{expression:s,strength:1}];if(a.phase===`transition`){let t=(a.index+1)%i.steps.length,n=i.steps[t],r=e.expressions[n.expression],d=(O[o.easing]??O.gentle)(a.progress);l=A(c,r.pose,a.progress,o.easing),u=[{expression:s,strength:1-d},{expression:r,strength:d}]}let d=r.reducedMotion?{pose:JSON.parse(JSON.stringify(l)),blink:0}:ae(l,n,i.ambient,i.blink);if(!r.reducedMotion)for(let e of u)d.pose=R(d.pose,M(e.expression),n,e.strength);return{...a,...d,animationKey:t}},se=(e,t,n=0,r={})=>{let i=e.expressions[t];if(!i)throw Error(`Unknown expression: ${t}`);return r.reducedMotion?JSON.parse(JSON.stringify(i.pose)):R(i.pose,M(i),n)},z={width:560,height:560},B=1.28,V=650,H=280,U=e=>Number((Number.isFinite(e)?e:0).toFixed(3)),W=e=>Math.PI*e/180,ce=e=>({pitch:e.pitch??0,yaw:e.yaw??0,roll:e.roll??0,squash:e.squash??0,lift:e.lift??0}),G=([e,t,n],r)=>{let i=ce(r),a=W(i.pitch),o=W(i.yaw),s=W(i.roll),c=[e,t*Math.cos(a)-n*Math.sin(a),t*Math.sin(a)+n*Math.cos(a)],l=[c[0]*Math.cos(o)+c[2]*Math.sin(o),c[1],-c[0]*Math.sin(o)+c[2]*Math.cos(o)];return[l[0]*Math.cos(s)-l[1]*Math.sin(s),l[0]*Math.sin(s)+l[1]*Math.cos(s),l[2]]},le=(e,t)=>{let n=ce(t),[r,i,a]=G([e[0],e[1]*(1-n.squash),e[2]],n),o=V/(V-a);return{x:z.width/2+r*B*o,y:H+i*B*o+n.lift,z:a}},ue=e=>{if(e.length<3)return``;let t=t=>e[(t+e.length)%e.length],n={x:(t(-1).x+t(0).x)/2,y:(t(-1).y+t(0).y)/2},r=`M ${U(n.x)} ${U(n.y)}`;for(let n=0;n<e.length;n+=1){let e=t(n),i=t(n+1);r+=` Q ${U(e.x)} ${U(e.y)}, ${U((e.x+i.x)/2)} ${U((e.y+i.y)/2)}`}return`${r} Z`},de=(e,t,n)=>{if(e===`oval`)return Array.from({length:72},(e,r)=>{let i=r/72*Math.PI*2;return[t/2*Math.cos(i),n/2*Math.sin(i)]});let r=t/2,i=n/2,a=Math.min(r,i);return[{x:r-a,y:-i+a,start:-Math.PI/2},{x:r-a,y:i-a,start:0},{x:-r+a,y:i-a,start:Math.PI/2},{x:-r+a,y:-i+a,start:Math.PI}].flatMap(e=>Array.from({length:6},(t,n)=>{let r=e.start+Math.PI/2*(n/5);return[e.x+Math.cos(r)*a,e.y+Math.sin(r)*a]}))},fe=(e,t,n,r,i)=>{let a=r>=n,o=Math.min(n,r),s=o/2,c=Math.max(0,(Math.max(n,r)-o)/2),l=a?Math.max(0,Math.abs(t)-c):Math.max(0,Math.abs(e)-c),u=Math.sqrt(Math.max(0,1-(l/s)**2)),d=a?e:t,f=Math.max(.001,s*u);return i/2*u*Math.sqrt(Math.max(0,1-(d/f)**2))},pe=(e,t,n)=>{let{blob:r,face:i}=e,a=t.eyes[n],o=(n===`left`?-1:1)*i.eyeGap/2+t.gaze.x+a.x,s=i.eyeY+t.gaze.y+a.y,c=Math.max(2,i.eyeWidth*a.scaleX),l=Math.max(2,i.eyeHeight*a.scaleY),u=W(a.rotation),d=Math.min(r.width,r.height)*(150/220);return be(i,de(i.eyeShape??`capsule`,c,l).map(([e,n])=>{let i=e*Math.cos(u)-n*Math.sin(u),a=e*Math.sin(u)+n*Math.cos(u),c=o+i,l=s+a;return le([c,l,fe(c,l,r.width,r.height,d)+1.4],t.blob)}))},me=(e,t)=>{let n=e.height>=e.width,r=Math.max(0,(Math.max(e.width,e.height)-Math.min(e.width,e.height))/2),i=G(n?[0,r,0]:[r,0,0],t);return[i[0],i[1]]},he=(e,t)=>{let n=ce(t),r=Math.min(e.width,e.height)/2,i=Math.min(e.width,e.height)*(150/220),a=1-n.squash,o=[G([r,0,0],n),G([0,r*a,0],n),G([0,0,i/2],n)].map(([e,t])=>[e,t]),s=o.reduce((e,t)=>e+t[0]**2,0),c=o.reduce((e,t)=>e+t[0]*t[1],0),l=o.reduce((e,t)=>e+t[1]**2,0),u=me(e,n).map(e=>e*a);return ue(Array.from({length:92},(e,t)=>{let r=t*Math.PI*2/92,i=[Math.cos(r),Math.sin(r)],a=[s*i[0]+c*i[1],c*i[0]+l*i[1]],o=Math.sqrt(i[0]*a[0]+i[1]*a[1])||1,d=i[0]*u[0]+i[1]*u[1],f=Math.abs(d)<1e-8?0:Math.sign(d);return{x:z.width/2+(a[0]/o+u[0]*f)*B,y:H+(a[1]/o+u[1]*f)*B+n.lift}}))},ge=([e,t],n,r)=>{let i=ce(r),a=Math.max(.8,1-Math.abs(i.yaw)*.005),o=Math.max(.9,1-Math.abs(i.pitch)*.0025),s=t/Math.max(1,n.height/2),c=e*a+i.yaw*s*.18,l=t*(1-i.squash)*o,u=W(i.roll);return{x:z.width/2+(c*Math.cos(u)-l*Math.sin(u))*B+i.yaw*.16,y:H+(c*Math.sin(u)+l*Math.cos(u))*B+i.lift}},_e=(e,t)=>{let n=t>=e,r=Math.min(e,t)/2,i=Math.max(0,(Math.max(e,t)-Math.min(e,t))/2);return Array.from({length:88},(e,t)=>{let a=t*Math.PI*2/88,o=Math.cos(a),s=Math.sin(a);return n?[r*o,r*s+(Math.abs(s)<1e-8?0:Math.sign(s))*i]:[r*o+(Math.abs(o)<1e-8?0:Math.sign(o))*i,r*s]})},ve=(e,t,n,r,i)=>{let a=1-i;return[a**3*e[0]+3*a**2*i*t[0]+3*a*i**2*n[0]+i**3*r[0],a**3*e[1]+3*a**2*i*t[1]+3*a*i**2*n[1]+i**3*r[1]]},ye=(e,t)=>{let n=e/2,r=t/2;return[[[0,-r],[n*.16,-r*.68],[n,-r*.23],[n,r*.26]],[[n,r*.26],[n,r*.78],[n*.55,r],[0,r]],[[0,r],[-n*.55,r],[-n,r*.78],[-n,r*.26]],[[-n,r*.26],[-n,-r*.23],[-n*.16,-r*.68],[0,-r]]].flatMap(e=>Array.from({length:24},(t,n)=>ve(...e,n/24)))},be=(e,t)=>{let n=t.map(e=>e.x),r=t.map(e=>e.y);return{shape:e.eyeShape??`capsule`,cx:U((Math.min(...n)+Math.max(...n))/2),cy:U((Math.min(...r)+Math.max(...r))/2),rx:U((Math.max(...n)-Math.min(...n))/2),ry:U((Math.max(...r)-Math.min(...r))/2),path:ue(t),rotation:0,fill:e.eyeColor}},xe=(e,t,n)=>{let{blob:r,face:i}=e,a=t.eyes[n],o=[(n===`left`?-1:1)*i.eyeGap/2+t.gaze.x+a.x,i.eyeY+t.gaze.y+a.y],s=W(a.rotation),c=V/(V-Math.min(r.width,r.height)*(150/220)/2);return be(i,de(i.eyeShape??`capsule`,Math.max(2,i.eyeWidth*a.scaleX),Math.max(2,i.eyeHeight*a.scaleY)).map(([e,n])=>ge([o[0]+e*Math.cos(s)-n*Math.sin(s),o[1]+e*Math.sin(s)+n*Math.cos(s)],r,t.blob)).map(e=>({x:z.width/2+(e.x-z.width/2)*c,y:H+(e.y-H-t.blob.lift)*c+t.blob.lift})))},Se=(e,t)=>{let{blob:n,stage:r}=e,i=n.renderMode!==`rigged-2d`,a=n.shape===`drop`?ye(n.width,n.height):_e(n.width,n.height),o=i&&n.shape!==`drop`?he(n,t.blob):ue(a.map(e=>ge(e,n,t.blob))),s=i?[pe(e,t,`left`),pe(e,t,`right`)]:[xe(e,t,`left`),xe(e,t,`right`)],c=le([0,0,0],t.blob);return{viewBox:`0 0 ${z.width} ${z.height}`,width:z.width,height:z.height,background:r.color,transform:``,shadow:{cx:U(c.x*.18+z.width/2*.82),cy:480,rx:U(n.width/2*B*.78),ry:17,fill:`#000000`,opacity:.24},blob:{path:o,fill:n.color},eyes:s}},K=e=>Number(e.toFixed(3));function Ce(e,t=.16){let n=(e,n)=>`${K(e[0]+(n[0]-e[0])*t)} ${K(e[1]+(n[1]-e[1])*t)}`;return e.map((t,r)=>{let i=e[(r+e.length-1)%e.length],a=e[(r+1)%e.length];return`${r===0?`M`:`L`} ${n(t,i)} Q ${t[0]} ${t[1]} ${n(t,a)}`}).join(` `)+` Z`}function q(e,t,n=t){let r=e*(n===t?1:2);return Ce(Array.from({length:r},(e,i)=>{let a=-Math.PI/2+i*Math.PI*2/r,o=i%2==0?t:n;return[K(280+o*Math.cos(a)),K(280+o*Math.sin(a))]}))}function we(e,t,n){return Ce(Array.from({length:96},(r,i)=>{let a=i*Math.PI*2/96,o=t+n*Math.cos(e*a);return[K(280+o*Math.cos(a)),K(280+o*Math.sin(a))]}),.5)}var Te={square:{path:`M 186 136 H 374 Q 424 136 424 186 V 374 Q 424 424 374 424 H 186 Q 136 424 136 374 V 186 Q 136 136 186 136 Z`,eyeY:0},cloud:{path:`M 172 390 C 105 390 102 292 151 275 C 124 207 184 160 235 185 C 266 113 363 130 377 207 C 449 201 473 282 432 318 C 463 373 410 405 364 390 Z`,eyeY:6},flower:{path:we(6,131,29),eyeY:0},star:{path:q(5,174,101),eyeY:4},heart:{path:`M 280 422 C 246 391 128 315 132 231 C 136 149 231 124 280 190 C 329 124 424 149 428 231 C 432 315 314 391 280 422 Z`,eyeY:6},clover:{path:we(4,123,39),eyeY:16},hexagon:{path:q(6,164),eyeY:0},diamond:{path:q(4,175),eyeY:0},triangle:{path:Ce([[280,114],[449,419],[111,419]],.12),eyeY:20},shield:{path:`M 280 133 C 322 153 364 162 417 166 L 407 298 C 402 358 348 407 280 432 C 212 407 158 358 153 298 L 143 166 C 196 162 238 153 280 133 Z`,eyeY:-2},leaf:{path:`M 420 132 C 441 281 391 419 256 424 C 162 429 122 359 144 275 C 169 186 282 145 420 132 Z`,eyeY:6},sparkle:{path:q(4,181,82),eyeY:16}},Ee=Object.keys(Te);function De(e){return Te[e].eyeY}function Oe(e,t,n){let r=Se(e,{...t,blob:{pitch:0,yaw:0,roll:0,squash:0,lift:0}}),i=t.blob.roll*Math.PI/180,a=Math.max(.8,Math.cos(t.blob.yaw*Math.PI/180)),o=Math.max(.65,(1-t.blob.squash)*Math.cos(t.blob.pitch*Math.PI/180)),s=Math.cos(i)*a,c=Math.sin(i)*a,l=-Math.sin(i)*o,u=Math.cos(i)*o;return r.transform=`matrix(${[s,c,l,u,280-s*280-l*280,280-c*280-u*280+t.blob.lift].map(K).join(` `)})`,r.blob.path=Te[n].path,r}var ke=`MIT License
2
-
3
- Copyright (c) 2026 0oooh
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
- `,Ae=[`round`,`soft`,`tall`,`wide`,`compact`,`large`,`drop`],je=[`round`,...Ee,`drop`,`soft`,`tall`,`wide`,`compact`,`large`],Me=je.filter(e=>e!==`tall`&&e!==`compact`&&e!==`large`),Ne=[`capsule`,`oval`],J=[`mint`,`iris`,`coral`,`sky`,`sand`,`graphite`],Pe=[`neutral`,`curious`,`focused`,`beaming`],Y={width:24,height:58,gap:38,rotation:-10,offsetX:16,offsetY:-6,staggerY:7},Fe={mint:{body:`#9ed8bf`,eyes:`#193c37`},iris:{body:`#c4b9ee`,eyes:`#352c53`},coral:{body:`#edb0a0`,eyes:`#56352f`},sky:{body:`#a5cbe7`,eyes:`#253e55`},sand:{body:`#e2c99b`,eyes:`#51432d`},graphite:{body:`#555c67`,eyes:`#f2f4f7`}},Ie=e=>Fe[e].body,Le=`yuri-avatar:v1:`,X=(e,t)=>t.includes(e);function Re(e=`default`){if(e||=`default`,e.startsWith(Le)){let[t,n,r,i,a,o,...s]=e.slice(15).split(`:`);if(!s.length&&X(t,je)&&X(n,Ne)&&X(r,J)&&X(i,Pe)&&(a===`0`||a===`1`)&&/^[a-zA-Z0-9-]{1,64}$/.test(o??``))return{shape:t,eyes:n,color:r,expression:i,animate:a===`1`}}let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619)>>>0;return{shape:Ae[t%Ae.length],eyes:`capsule`,color:J[(t>>>8)%J.length],expression:`neutral`,animate:!0}}function ze(e,t=`custom`){let n=`${Le}${e.shape}:${e.eyes}:${e.color}:${e.expression}:${+!!e.animate}:${t}`;if(!X(e.shape,je)||!X(e.eyes,Ne)||!X(e.color,J)||!X(e.expression,Pe)||typeof e.animate!=`boolean`||!/^[a-zA-Z0-9-]{1,64}$/.test(t))throw Error(`Invalid assistant avatar recipe`);return n}function Be(e){return ze({shape:`round`,eyes:`capsule`,color:Re(e).color,expression:`neutral`,animate:!0},e)}function Ve(e){let t=Re(e),n=Fe[t.color],r=Ae.find(e=>e===t.shape),i=E({name:`Yuri`,shape:r??`round`,eyeShape:`capsule`,color:n.body,eyeColor:n.eyes,stageColor:n.body});i.animations.idle.steps[0].expression=`neutral`,i.face.eyeWidth=Y.width,i.face.eyeHeight=Y.height,i.face.eyeGap=Y.gap,t.shape===`drop`&&(i.blob.renderMode=`rigged-2d`,i.face.eyeY=10);for(let e of Object.values(i.expressions))for(let t of[`left`,`right`])Object.assign(e.pose.eyes[t],{scaleX:1,scaleY:1,x:Y.offsetX,y:Y.offsetY+(t===`left`?1:-1)*Y.staggerY,rotation:Y.rotation});return!r&&X(t.shape,Ee)&&(i.silhouette=t.shape,i.blob.renderMode=`rigged-2d`,i.face.eyeY=De(t.shape)),i}function He(e,t){return e.silhouette?Oe(e,t,e.silhouette):Se(e,t)}function Ue(e){let t=Ve(e);return He(t,se(t,`neutral`,0,{reducedMotion:!0}))}function We(e){let t=Ue(e);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="64 64 432 432" width="128" height="128"><metadata>Yuri avatar; Open Mascot Studio (MIT)\n${ke.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`)}</metadata><g transform="${t.transform}"><path d="${t.blob.path}" fill="${t.blob.fill}"/>${t.eyes.map(e=>`<path d="${e.path}" fill="${e.fill}"/>`).join(``)}</g></svg>`}var Ge={background:`#c1f2c4`},Ke={agent:new u(f)},qe=new p({maxEntries:128,maxBytes:1048576});function Je(e,t,n=!1,r){let i=e===`agent`?t?.trim().toLowerCase()||`default`:t||`default`,a=e===`agent`?(r??Ge).background.replace(`#`,``):`00000000`,o=JSON.stringify([e,i,a]),s=qe.get(o);if(s!==void 0)return s;let c;return c=e===`agent`?new d(Ke.agent,{seed:i,size:128,idRandomization:!1,borderRadius:0,backgroundColor:[a]}).toDataUri():`data:image/svg+xml,${encodeURIComponent(We(i))}`,qe.set(o,c,(o.length+c.length)*2),c}var Ye=(e,t)=>({background:t(e)||Ge.background}),Xe=e=>{let t=(0,g.c)(5),n;t[0]===e?n=t[1]:(n=l(e),t[0]=e,t[1]=n);let r=n.var,i=m()?.currentTheme.colors,a;if(t[2]!==r||t[3]!==i){let e=i?{"--status-success":i.status.success,"--status-info":i.status.info,"--status-warning":i.status.warning,"--syntax-keyword":i.syntax.base.keyword,"--syntax-type":i.syntax.base.type,"--syntax-function":i.syntax.base.function,"--syntax-number":i.syntax.base.number,"--syntax-variable":i.syntax.base.variable}:{};a=Ye(r,t=>e[t]??``),t[2]=r,t[3]=i,t[4]=a}else a=t[4];return a},Z=new Set,Q=null,Ze=-1/0;function Qe(e){Q=null,e-Ze>=1e3/30-.5&&(Ze=e,Z.forEach(t=>t(e))),Z.size&&(Q=requestAnimationFrame(Qe))}function $e(e){return Z.add(e),Q===null&&(Q=requestAnimationFrame(Qe)),()=>{Z.delete(e),!Z.size&&Q!==null&&(cancelAnimationFrame(Q),Q=null,Ze=-1/0)}}var $=n();function et(e){let t=(0,g.c)(38),{seed:n,motion:r}=e,c=h.useRef(null),l=h.useRef(null),u=h.useRef(null),d=h.useRef(null),f=h.useRef(null),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p={x:0,y:0},t[0]=p):p=t[0];let m=h.useRef(p),[_,v]=h.useState(!1),y=a(`visible`),b=s(`(prefers-reduced-motion: reduce)`,!0),x;t[1]===n?x=t[2]:(x=Ve(n),t[1]=n,t[2]=x);let S=x,C;t[3]===n?C=t[4]:(C=Ue(n),t[3]=n,t[4]=C);let w=C,T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{let[t]=e;return v(!!t?.isIntersecting)},t[5]=T):T=t[5],i(l,T);let E;t[6]===b?E=t[7]:(E=e=>{if(e.pointerType!==`mouse`||b)return;let t=e.currentTarget.getBoundingClientRect();!t.width||!t.height||(m.current={x:Math.max(-1,Math.min(1,((e.clientX-t.left)/t.width-.5)*2)),y:Math.max(-1,Math.min(1,((e.clientY-t.top)/t.height-.5)*2))})},t[6]=b,t[7]=E);let D=o(E),O;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{m.current={x:0,y:0}},t[8]=O):O=t[8];let k=o(O),A,j;t[9]!==S||t[10]!==_||t[11]!==r||t[12]!==b||t[13]!==w||t[14]!==y?(A=()=>{let e=e=>{c.current?.setAttribute(`transform`,e.transform),u.current?.setAttribute(`d`,e.blob.path),d.current?.setAttribute(`d`,e.eyes[0].path),f.current?.setAttribute(`d`,e.eyes[1].path)};if(e(w),!_||y!==`visible`||b)return;let t=performance.now(),n={x:0,y:0};return $e(i=>{let a=oe(S,r,i-t).pose;n.x+=(m.current.x-n.x)*.2,n.y+=(m.current.y-n.y)*.2,a.gaze.x=a.gaze.x+n.x*10,a.gaze.y=a.gaze.y+n.y*8,a.blob.yaw=a.blob.yaw+n.x*10,e(He(S,a))})},j=[S,_,r,b,w,y],t[9]=S,t[10]=_,t[11]=r,t[12]=b,t[13]=w,t[14]=y,t[15]=A,t[16]=j):(A=t[15],j=t[16]),h.useEffect(A,j);let M=_&&y===`visible`&&!b?`true`:`false`,N;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(`metadata`,{children:ke}),t[17]=N):N=t[17];let P;t[18]!==w.blob.fill||t[19]!==w.blob.path?(P=(0,$.jsx)(`path`,{ref:u,d:w.blob.path,fill:w.blob.fill}),t[18]=w.blob.fill,t[19]=w.blob.path,t[20]=P):P=t[20];let F;t[21]!==w.eyes[0].fill||t[22]!==w.eyes[0].path?(F=(0,$.jsx)(`path`,{ref:d,d:w.eyes[0].path,fill:w.eyes[0].fill}),t[21]=w.eyes[0].fill,t[22]=w.eyes[0].path,t[23]=F):F=t[23];let I;t[24]!==w.eyes[1].fill||t[25]!==w.eyes[1].path?(I=(0,$.jsx)(`path`,{ref:f,d:w.eyes[1].path,fill:w.eyes[1].fill}),t[24]=w.eyes[1].fill,t[25]=w.eyes[1].path,t[26]=I):I=t[26];let L;t[27]!==w.transform||t[28]!==P||t[29]!==F||t[30]!==I?(L=(0,$.jsxs)(`g`,{ref:c,transform:w.transform,children:[P,F,I]}),t[27]=w.transform,t[28]=P,t[29]=F,t[30]=I,t[31]=L):L=t[31];let R;return t[32]!==D||t[33]!==r||t[34]!==k||t[35]!==L||t[36]!==M?(R=(0,$.jsxs)(`svg`,{ref:l,viewBox:`64 64 432 432`,className:`block h-full w-full`,"aria-hidden":`true`,"data-avatar-motion":r,"data-avatar-active":M,onPointerMove:D,onPointerLeave:k,children:[N,L]}),t[32]=D,t[33]=r,t[34]=k,t[35]=L,t[36]=M,t[37]=R):R=t[37],R}var tt=h.memo(function(e){let t=(0,g.c)(20),{seed:n,size:r,label:i,className:a,motion:o}=e,s=`calc(${r}px * var(--dpt-n, 1))`,l;t[0]===n?l=t[1]:(l=Re(n),t[0]=n,t[1]=l);let u=l,d;t[2]===n?d=t[3]:(d=Je(`assistant`,n),t[2]=n,t[3]=d);let f=d,p;t[4]===a?p=t[5]:(p=c(`inline-flex aspect-square shrink-0 overflow-clip rounded-[0.5rem]`,a),t[4]=a,t[5]=p);let m;t[6]===s?m=t[7]:(m={width:s,minWidth:s,maxWidth:s,height:s,minHeight:s,maxHeight:s},t[6]=s,t[7]=m);let h=i?`img`:void 0,_=!i||void 0,v;t[8]!==f||t[9]!==o||t[10]!==u||t[11]!==n?(v=o&&u.animate?(0,$.jsx)(et,{seed:n,motion:o}):(0,$.jsx)(`img`,{src:f,alt:``,draggable:!1,className:`block h-full w-full object-contain`,"aria-hidden":`true`}),t[8]=f,t[9]=o,t[10]=u,t[11]=n,t[12]=v):v=t[12];let y;return t[13]!==i||t[14]!==p||t[15]!==m||t[16]!==h||t[17]!==_||t[18]!==v?(y=(0,$.jsx)(`span`,{className:p,style:m,"data-agent-avatar":``,"data-avatar-kind":`assistant`,"data-agent-avatar-shape":`rounded`,"data-procedural-avatar":``,role:h,"aria-label":i,"aria-hidden":_,children:v}),t[13]=i,t[14]=p,t[15]=m,t[16]=h,t[17]=_,t[18]=v,t[19]=y):y=t[19],y}),nt=h.memo(e=>{let t=(0,g.c)(33),{name:n,kind:r,animated:i,emoji:a,size:o,shape:s,className:u,label:d}=e,f=r===void 0?`agent`:r,p=i!==void 0&&i,m=o===void 0?16:o,h=s===void 0?`rounded`:s,_=l(n),v=Xe(n),y;bb0:{if(a){y=void 0;break bb0}if(f!==`agent`){let e;t[0]!==p||t[1]!==f||t[2]!==n?(e=Je(f,n,p),t[0]=p,t[1]=f,t[2]=n,t[3]=e):e=t[3],y=e;break bb0}let e;t[4]!==p||t[5]!==f||t[6]!==n||t[7]!==v?(e=Je(f,n,p,v),t[4]=p,t[5]=f,t[6]=n,t[7]=v,t[8]=e):e=t[8],y=e}let b=y,x=c(`inline-flex aspect-square shrink-0 overflow-clip`,h===`square`?`rounded-none`:h===`circle`?`rounded-full`:`rounded-sm`,a&&`items-center justify-center select-none`,_.class,u),S=`calc(${m}px * var(--dpt-n, 1))`,C=`calc(${m}px * var(--dpt-n, 1))`,w=`calc(${m}px * var(--dpt-n, 1))`,T=`calc(${m}px * var(--dpt-n, 1))`,E=`calc(${m}px * var(--dpt-n, 1))`,D=`calc(${m}px * var(--dpt-n, 1))`,O=`var(${_.var})`,k;t[9]===a?k=t[10]:(k=a?{display:`inline-flex`,alignItems:`center`,justifyContent:`center`}:null,t[9]=a,t[10]=k);let A;t[11]!==T||t[12]!==E||t[13]!==D||t[14]!==O||t[15]!==k||t[16]!==S||t[17]!==C||t[18]!==w?(A={width:S,minWidth:C,maxWidth:w,height:T,minHeight:E,maxHeight:D,color:O,...k},t[11]=T,t[12]=E,t[13]=D,t[14]=O,t[15]=k,t[16]=S,t[17]=C,t[18]=w,t[19]=A):A=t[19];let j=d?`img`:void 0,M=!d||void 0,N;t[20]!==b||t[21]!==a||t[22]!==m?(N=a?(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-full w-full items-center justify-center leading-none`,style:{fontSize:`calc(${m*.75}px * var(--dpt-n, 1))`,lineHeight:1,transform:`translateY(0.06em)`},children:a}):(0,$.jsx)(`img`,{src:b,alt:``,draggable:!1,className:`block h-full w-full max-h-full max-w-full object-contain`,"aria-hidden":`true`}),t[20]=b,t[21]=a,t[22]=m,t[23]=N):N=t[23];let P;return t[24]!==f||t[25]!==d||t[26]!==h||t[27]!==A||t[28]!==j||t[29]!==M||t[30]!==N||t[31]!==x?(P=(0,$.jsx)(`span`,{className:x,style:A,"data-agent-avatar":``,"data-avatar-kind":f,"data-agent-avatar-shape":h,role:j,"aria-label":d,"aria-hidden":M,children:N}),t[24]=f,t[25]=d,t[26]=h,t[27]=A,t[28]=j,t[29]=M,t[30]=N,t[31]=x,t[32]=P):P=t[32],P}),rt=h.memo(function(e){let t=(0,g.c)(8);if(e.kind===`assistant`&&!e.emoji){let n=e.size??16,r=e.motion??(e.animated?`thinking`:void 0),i;return t[0]!==e.className||t[1]!==e.label||t[2]!==e.name||t[3]!==n||t[4]!==r?(i=(0,$.jsx)(tt,{seed:e.name,size:n,label:e.label,className:e.className,motion:r}),t[0]=e.className,t[1]=e.label,t[2]=e.name,t[3]=n,t[4]=r,t[5]=i):i=t[5],i}let n;return t[6]===e?n=t[7]:(n=(0,$.jsx)(nt,{...e}),t[6]=e,t[7]=n),n});export{J as a,Be as c,Ye as i,ze as l,Xe as n,Me as o,Je as r,Ie as s,rt as t,Re as u};