@inkeep/open-knowledge 0.51.4 → 0.51.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-D8RqFpOJ.mjs → acp-harness-probe-DNfyJSyV.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-B31gJMU-.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/init-CubgvDjJ.mjs +1 -0
- package/dist/{init-D4zSpp5N.mjs → init-Vv3gEflM.mjs} +3 -3
- package/dist/{launch-json-removal-DK0AKJEu.mjs → launch-json-removal-kfVAzK2F.mjs} +2 -2
- package/dist/loader-BU_aZOV_.mjs +1 -0
- package/dist/{loader-kKLRoz7l.mjs → loader-CL63YkWQ.mjs} +2 -2
- package/dist/{open-browser-De70N-tU.mjs → open-browser-F_Q44toi.mjs} +2 -2
- package/dist/preview-N3xTkzX1.mjs +1 -0
- package/dist/{preview-DZ2RmcLH.mjs → preview-dPcINETL.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-Dm6HZpzn.js → ActivityModeContent-CjLkC3OR.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CKf6Z_1P.js → AgentDiffPane-CsFl8Z5a.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-CDYBGlu-.js → ChangedOutsideBadge-ayB1siCV.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-jiYTT-vF.js → CodeMirrorPropInput-DfGAqVE2.js} +1 -1
- package/dist/public/assets/{DocumentContext-DDvPxhWz.js → DocumentContext-DnKfTpmg.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-q2qO9VhT.js → EditorModeToggle-CO_om036.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DTR328JC.js → EnableSyncConfirmDialog-5tBIHX6Z.js} +1 -1
- package/dist/public/assets/FeedbackForm-Cj4LsbD9.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-C9BHc4ek.js → ImportSkillDialog-CennJlsL.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BE8W0Enb.js → LintConfigEditor-BdOIj6Lp.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-HIrwICTi.js → ManagedArtifactProperties-CE_CYfVl.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-gHUxVdf6.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-BDP4cIfm.js → MermaidDocEditor-9a3rJ6Yx.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-nNhEpct1.js → SchemaConfigEditor-CxRw1h73.js} +1 -1
- package/dist/public/assets/{SessionsHost-CVpbrhLp.js → SessionsHost-B380Iepa.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-00G52CzT.js → SettingsDialogBody-m-dM0Hvi.js} +1 -1
- package/dist/public/assets/ShareBranchSwitchDialog-ClrT-3XL.js +1 -0
- package/dist/public/assets/{ShareReceiveMissDialog-LYyFyj4_.js → ShareReceiveMissDialog-B40fjSmr.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-7rCq1EMz.js → SkillToolbarControls-C4FyBpeC.js} +1 -1
- package/dist/public/assets/{SourceEditor-CGXgBgxj.js → SourceEditor-Bji79MEj.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-B305tWwd.js → TerminalWindowApp-DZ9SMowT.js} +1 -1
- package/dist/public/assets/{TextDocEditor-D0dvsaik.js → TextDocEditor-C9PDu-kP.js} +1 -1
- package/dist/public/assets/{ThreadView-DmgDzyjw.js → ThreadView-B35kTuTN.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-B5cFw3s5.js → TimelineDiffPane-CIe5iIe0.js} +1 -1
- package/dist/public/assets/{agent-diff-store-DUic-yHj.js → agent-diff-store-iX_f1eWT.js} +1 -1
- package/dist/public/assets/{auth-state-cache-DltqKLFv.js → auth-state-cache-BVvyn4q8.js} +1 -1
- package/dist/public/assets/{comment-chips-Y8HApoMO.js → comment-chips-C1VVNIzh.js} +1 -1
- package/dist/public/assets/{config-provider-C26mA0gS.js → config-provider-Dc9oWWUW.js} +3 -3
- package/dist/public/assets/{follow-file-cEdYRfgQ.js → follow-file-D1bxvLt8.js} +1 -1
- package/dist/public/assets/i18n-0lGbQDuK.js +1 -0
- package/dist/public/assets/{index-Z0OjnzO4.js → index-xvXn-G-j.js} +8 -8
- package/dist/public/assets/messages-BXYuvXAP.js +1 -0
- package/dist/public/assets/messages-Bb6dZ_AH.js +1 -0
- package/dist/public/assets/messages-BhH556Jt.js +1 -0
- package/dist/public/assets/messages-C-uAYj-o.js +1 -0
- package/dist/public/assets/messages-CuacW5EK.js +1 -0
- package/dist/public/assets/messages-Cx93o4KA.js +1 -0
- package/dist/public/assets/messages-DURwsA-P.js +1 -0
- package/dist/public/assets/messages-DXvEjyhw.js +1 -0
- package/dist/public/assets/messages-DvOjqSzw.js +1 -0
- package/dist/public/assets/messages-DxYQuv6u.js +1 -0
- package/dist/public/assets/messages-PC6GXgsj.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-Dj8HbLVt.js → pending-receive-nav-store-V_ABC7EU.js} +1 -1
- package/dist/public/assets/{selection-context-fe0D7UqI.js → selection-context-BTaBjE1x.js} +1 -1
- package/dist/public/assets/{skill-actions-BfzaYHap.js → skill-actions-BLgjn8Lg.js} +1 -1
- package/dist/public/assets/{src-CpTLscFS.js → src-ECkYJZtm.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BXKVdG-0.js → typing-burst-detector-BIG5gJhk.js} +1 -1
- package/dist/public/assets/{uninstall-DgBAaN00.js → uninstall-BnhCjTyl.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BaS6vcbe.js → use-activity-panel-r04ocY2D.js} +1 -1
- package/dist/public/assets/{use-open-skill-BO5ZkZEI.js → use-open-skill-o7lsQu4C.js} +1 -1
- package/dist/public/assets/{use-popular-skills-BvWh9NuP.js → use-popular-skills-BqnXOXvQ.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-B4PzXLX0.js → use-terminal-enabled-C3bQIY8k.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-BFz8HPKg.js → use-timeline-entry-diff-0Hk0QZo4.js} +1 -1
- package/dist/public/index.html +20 -20
- package/dist/public/uninstall.html +3 -3
- package/dist/{repair-launch-json-BxhfCDpS.mjs → repair-launch-json-BXK_QZY7.mjs} +2 -2
- package/dist/{repair-mcp-configs-C2uur9mS.mjs → repair-mcp-configs-BMN_8qPI.mjs} +2 -2
- package/dist/repair-skills-BCfSAxpT.mjs +1 -0
- package/dist/{repair-skills-BFfQjF9F.mjs → repair-skills-CHo08MZF.mjs} +2 -2
- package/dist/{skill-teardown-BppNXkpR.mjs → skill-teardown-Bg01dmvX.mjs} +2 -2
- package/dist/{src-CwuSSZyu.mjs → src-BhlDoN_j.mjs} +394 -393
- package/dist/{src-PiVzjY7p.mjs → src-Bx4CeCkU.mjs} +2 -2
- package/dist/{src-DR51i3QD.mjs → src-C7oaYvaI.mjs} +1 -1
- package/dist/src-DmaHDzt-.mjs +1 -0
- package/dist/{start-BPNxEmbr.mjs → start-9GMT55r5.mjs} +4 -4
- package/dist/start-BGGNbYXq.mjs +1 -0
- package/dist/ui-C6oh6Jzr.mjs +1 -0
- package/dist/{ui-CNA2d6cp.mjs → ui-aYQtsARJ.mjs} +3 -3
- package/dist/{write-project-skill-DHsuRyv9.mjs → write-project-skill-BklBDWC_.mjs} +2 -2
- package/package.json +5 -5
- package/dist/constants-CXkeghQk.mjs +0 -2
- package/dist/init-CUQnd_ex.mjs +0 -1
- package/dist/loader-HYKzS0QO.mjs +0 -1
- package/dist/preview-4v9UzS2T.mjs +0 -1
- package/dist/public/assets/FeedbackForm-g7KpfoLi.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-vWxTD-_o.js +0 -1
- package/dist/public/assets/ShareBranchSwitchDialog--krRpj9M.js +0 -1
- package/dist/public/assets/i18n-CQXk5Cpq.js +0 -1
- package/dist/public/assets/messages-6Ep41Xl-.js +0 -1
- package/dist/public/assets/messages-BeL4TmOn.js +0 -1
- package/dist/public/assets/messages-BmNourzM.js +0 -1
- package/dist/public/assets/messages-C5-_nwo9.js +0 -1
- package/dist/public/assets/messages-CKS0t00R.js +0 -1
- package/dist/public/assets/messages-CoDOYaZF.js +0 -1
- package/dist/public/assets/messages-D-hK7iwf.js +0 -1
- package/dist/public/assets/messages-DR8BtG96.js +0 -1
- package/dist/public/assets/messages-dgqhlzTN.js +0 -1
- package/dist/public/assets/messages-gPUoT9ag.js +0 -1
- package/dist/public/assets/messages-t6EQlGoL.js +0 -1
- package/dist/repair-skills-Dz417BMs.mjs +0 -1
- package/dist/src-BPCwP_Kk.mjs +0 -1
- package/dist/start-CmcTogte.mjs +0 -1
- package/dist/ui-BBGFVQDX.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as e,ft as t,l as n,m as r,u as i}from"./sleep-ChZE9826.mjs";import{Ps as a}from"./src-DMpGVIiQ.mjs";import{_ as o}from"./src-
|
|
2
|
-
//# sourceMappingURL=loader-
|
|
1
|
+
import{d as e,ft as t,l as n,m as r,u as i}from"./sleep-ChZE9826.mjs";import{Ps as a}from"./src-DMpGVIiQ.mjs";import{_ as o}from"./src-BhlDoN_j.mjs";import{I as s,k as c}from"./fs-traced-RPXwxrA5.mjs";import{t as l}from"./constants-B31gJMU-.mjs";import{t as u}from"./is-object-ByG7RnjH.mjs";import{resolve as d}from"node:path";import{existsSync as f,readFileSync as p}from"node:fs";import{realpath as m}from"node:fs/promises";var h=t();async function g(e){let t=d(e);try{return await m(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function _(e){if(!f(e))return{value:null,path:e,source:null,doc:null};let t;try{t=p(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,h.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function v(t,n){return t.map(t=>{let r=t.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:t.message,issueCode:t.code};if(n.doc!==null&&n.source!==null){let t=e({file:n.path,source:n.source,doc:n.doc,path:r});if(t!==void 0)return{...i,source:t}}return i})}function y(e){let t=e??process.cwd(),u=[],f=[],p=[],m=c(`user`,t),h=s({absPath:m});f.push(...h.diagnostics),!h.valid&&h.sidelinedTo!==void 0&&p.push({from:m,to:h.sidelinedTo}),h.valid&&h.source!==void 0&&u.push(m);let g=e=>{let t=_(e);if(t.diagnostic!==void 0&&f.push(t.diagnostic),t.value===null)return{};let r=n({value:t.value,file:t.path,source:t.source,doc:t.doc});return f.push(...r),u.push(e),r.length>0?i(t.value):t.value},y=d(t,`.ok`,l),b=g(y),x=g(c(`project-local`,t)),S=a(h.value,b,x),C=o.safeParse(S);if(!C.success){let e=_(y),t={code:`SCHEMA_INVALID`,issues:v(C.error.issues,e)};throw Error(r(t))}return{config:C.data,sources:u,diagnostics:f,sidelined:p}}function b(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??y,r=new Map,i=new Map,a=g(e.startupCwd);return async o=>{let s=await g(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{y as n,b as t};
|
|
2
|
+
//# sourceMappingURL=loader-CL63YkWQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ei as e}from"./src-
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
1
|
+
import{ei as e}from"./src-BhlDoN_j.mjs";import{execFile as t}from"node:child_process";const n=new Set([`http:`,`https:`]),r=/[\u0000-\u0020\u007F-\u009F"'`\\&|<>^()$;{}[\]*?!~]/;function i(e,t){console.warn(`Could not auto-open browser (${t}); visit ${e} manually`)}function a(a){let o;try{o=new URL(a)}catch{i(a,`invalid URL`);return}if(!n.has(o.protocol)){i(a,`unsupported scheme '${o.protocol}'`);return}if(r.test(a)){i(a,`URL contains unsafe characters`);return}t(process.platform===`darwin`?`open`:process.platform===`win32`?`cmd`:`xdg-open`,process.platform===`win32`?[`/c`,`start`,``,a]:[a],e({}),e=>{e&&console.warn(`Could not auto-open browser (${e.message}); visit ${a} manually`)})}export{a as openBrowser};
|
|
2
|
+
//# sourceMappingURL=open-browser-F_Q44toi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-dPcINETL.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Wr as e}from"./src-
|
|
1
|
+
import{Wr as e}from"./src-BhlDoN_j.mjs";import"./constants-B31gJMU-.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);return a.push(``),r(t(i,`.ok`,`config.yml`))?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-dPcINETL.mjs.map
|
package/dist/public/assets/{ActivityModeContent-Dm6HZpzn.js → ActivityModeContent-CjLkC3OR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{a as n,o as r}from"./DocumentContext-DDvPxhWz.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./button-CA0dewJJ.js";import{i as l,n as u,t as d}from"./tooltip-DHXgxWLL.js";import{a as f,c as p,i as m,o as h,s as g,t as _}from"./dialog-DztIj-ZS.js";import{t as v}from"./dist-DUfEoSbR.js";import{n as y}from"./dist-B6jB2qbD2.js";import{c as b}from"./Mermaid-BHfANkja.js";import{r as x}from"./CopyButton-ByR_1gcU.js";import{i as S}from"./prop-types-BuByQU-C.js";import{t as C}from"./spinner-BqySY7qY.js";import{t as w}from"./undo-2-WGCwknr8.js";import{c as T}from"./navigation-targets-CmqNPgrG.js";import{a as E,i as D,n as O,o as k,t as A}from"./agent-diff-store-DUic-yHj.js";import{t as j}from"./timeline-diff-store-DnRthkM7.js";import{n as M}from"./use-activity-panel-BaS6vcbe.js";var N=s(),P=e(i(),1),F=t();function I(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function ee(e){let t=(0,N.c)(86),{burst:n,docName:r,editCount:i,sessionAlive:s,inFlight:v,onOpenDiff:y,onRestore:b}=e,{_:x}=o(),[S,T]=(0,P.useState)(te),D,O;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{let e=setInterval(()=>T(Date.now()),3e4);return()=>clearInterval(e)},O=[],t[0]=D,t[1]=O):(D=t[0],O=t[1]),(0,P.useEffect)(D,O);let[k,A]=(0,P.useState)(!1),j=E(),M=n.stackIndex+1,ee=j?.docName===r&&j.keptCount===M,L=i-M,ne=!s||v||L<=0,re;t[2]!==L||t[3]!==b?(re=function(){A(!1),b(L)},t[2]=L,t[3]=b,t[4]=re):re=t[4];let ie=re,R;t[5]!==n||t[6]!==y?(R=()=>y(n),t[5]=n,t[6]=y,t[7]=R):R=t[7];let z;t[8]!==x||t[9]!==M||t[10]!==r?(z=x({id:`Z79bnE`,values:{burstNumber:M,docName:r}}),t[8]=x,t[9]=M,t[10]=r,t[11]=z):z=t[11];let ae=ee?`bg-muted`:`hover:bg-muted/40`,oe;t[12]===ae?oe=t[13]:(oe=[`flex min-w-0 flex-1 items-center gap-2 px-4 py-1.5 text-xs text-muted-foreground transition-colors`,ae],t[12]=ae,t[13]=oe);let se=oe.join(` `),B;t[14]!==n.ts||t[15]!==S?(B=I(n.ts,S),t[14]=n.ts,t[15]=S,t[16]=B):B=t[16];let V;t[17]===B?V=t[18]:(V=(0,F.jsx)(`span`,{className:`font-mono`,children:B}),t[17]=B,t[18]=V);let H;t[19]===n.additions?H=t[20]:(H=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additions]}),t[19]=n.additions,t[20]=H);let U;t[21]===n.deletions?U=t[22]:(U=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletions]}),t[21]=n.deletions,t[22]=U);let W;t[23]!==H||t[24]!==U?(W=(0,F.jsxs)(`span`,{className:`ml-auto font-mono`,children:[H,` `,U]}),t[23]=H,t[24]=U,t[25]=W):W=t[25];let G;t[26]!==ee||t[27]!==V||t[28]!==W||t[29]!==R||t[30]!==z||t[31]!==se?(G=(0,F.jsxs)(`button`,{type:`button`,onClick:R,"aria-pressed":ee,"aria-label":z,"data-testid":`activity-panel-burst-open`,className:se,children:[V,W]}),t[26]=ee,t[27]=V,t[28]=W,t[29]=R,t[30]=z,t[31]=se,t[32]=G):G=t[32];let ce;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1.5 h-3 w-px shrink-0 bg-border`}),t[33]=ce):ce=t[33];let K;t[34]!==x||t[35]!==M||t[36]!==r?(K=x({id:`Zhe80e`,values:{burstNumber:M,docName:r}}),t[34]=x,t[35]=M,t[36]=r,t[37]=K):K=t[37];let le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>A(!0),t[38]=le):le=t[38];let q;t[39]===v?q=t[40]:(q=v?(0,F.jsx)(C,{className:`size-3`,"aria-hidden":`true`}):(0,F.jsx)(w,{className:`size-3`,"aria-hidden":`true`}),t[39]=v,t[40]=q);let J;t[41]!==ne||t[42]!==K||t[43]!==q?(J=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`activity-panel-burst-restore`,"aria-label":K,disabled:ne,onClick:le,children:q})}),t[41]=ne,t[42]=K,t[43]=q,t[44]=J):J=t[44];let Y;t[45]!==x||t[46]!==L||t[47]!==s?(Y=x(s?L>0?{id:`SOPwPh`}:{id:`62bOuM`}:{id:`NzFvyK`}),t[45]=x,t[46]=L,t[47]=s,t[48]=Y):Y=t[48];let X;t[49]===Y?X=t[50]:(X=(0,F.jsx)(u,{side:`left`,children:Y}),t[49]=Y,t[50]=X);let Z;t[51]!==J||t[52]!==X?(Z=(0,F.jsxs)(d,{children:[J,X]}),t[51]=J,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==G||t[55]!==Z?(Q=(0,F.jsxs)(`div`,{className:`flex items-center border-t border-border/50 pr-3`,children:[G,ce,Z]}),t[54]=G,t[55]=Z,t[56]=Q):Q=t[56];let ue;t[57]===v?ue=t[58]:(ue=e=>{!e&&!v?A(!1):e&&A(!0)},t[57]=v,t[58]=ue);let de;t[59]===x?de=t[60]:(de=x({id:`a4FRQv`}),t[59]=x,t[60]=de);let fe;t[61]===de?fe=t[62]:(fe=(0,F.jsx)(p,{children:de}),t[61]=de,t[62]=fe);let pe;t[63]===L?pe=t[64]:(pe=(0,F.jsx)(f,{children:(0,F.jsx)(a,{id:`LKIPzv`,values:{laterEdits:L}})}),t[63]=L,t[64]=pe);let $;t[65]!==fe||t[66]!==pe?($=(0,F.jsxs)(g,{children:[fe,pe]}),t[65]=fe,t[66]=pe,t[67]=$):$=t[67];let me;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,F.jsx)(c,{variant:`outline`,"data-testid":`activity-panel-burst-restore-cancel`,onClick:()=>A(!1),children:(0,F.jsx)(a,{id:`dEgA5A`})}),t[68]=me):me=t[68];let he;t[69]===v?he=t[70]:(he=v?(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}):null,t[69]=v,t[70]=he);let ge;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,F.jsx)(a,{id:`9uI_rE`}),t[71]=ge):ge=t[71];let _e;t[72]!==ie||t[73]!==v||t[74]!==he?(_e=(0,F.jsxs)(h,{children:[me,(0,F.jsxs)(c,{variant:`destructive`,"data-testid":`activity-panel-burst-restore-confirm`,disabled:v,onClick:ie,children:[he,ge]})]}),t[72]=ie,t[73]=v,t[74]=he,t[75]=_e):_e=t[75];let ve;t[76]!==$||t[77]!==_e?(ve=(0,F.jsxs)(m,{children:[$,_e]}),t[76]=$,t[77]=_e,t[78]=ve):ve=t[78];let ye;t[79]!==k||t[80]!==ue||t[81]!==ve?(ye=(0,F.jsx)(_,{open:k,onOpenChange:ue,children:ve}),t[79]=k,t[80]=ue,t[81]=ve,t[82]=ye):ye=t[82];let be;return t[83]!==Q||t[84]!==ye?(be=(0,F.jsxs)(F.Fragment,{children:[Q,ye]}),t[83]=Q,t[84]=ye,t[85]=be):be=t[85],be}function te(){return Date.now()}function L(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let r=Math.round(n/36e5);return v._({id:`nYeBmY`,values:{hours:r}})}function ne(e){let t=(0,N.c)(56),{file:n,sessionAlive:r,isWriting:i,onNavigate:s,onUndoDrop:c,onSetVersion:l}=e,{_:u}=o(),{docName:d}=n,[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(re),g,_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{let e=setInterval(()=>h(Date.now()),3e4);return()=>clearInterval(e)},_=[],t[0]=g,t[1]=_):(g=t[0],_=t[1]),(0,P.useEffect)(g,_);let v=n.bursts.length,y;t[2]!==n.docName||t[3]!==c||t[4]!==r||t[5]!==f?(y=e=>{e<=0||!r||f||(p(!0),Promise.resolve(c(n.docName,e)).finally(()=>{p(!1),A()}))},t[2]=n.docName,t[3]=c,t[4]=r,t[5]=f,t[6]=y):y=t[6];let b=y;if(n.bursts.length===0)return null;let x;t[7]!==n.docName||t[8]!==s?(x=()=>s(n.docName),t[7]=n.docName,t[8]=s,t[9]=x):x=t[9];let S;t[10]!==u||t[11]!==d?(S=u({id:`QcpeeE`,values:{docName:d}}),t[10]=u,t[11]=d,t[12]=S):S=t[12];let C;t[13]!==n.docName||t[14]!==x||t[15]!==S?(C=(0,F.jsx)(`button`,{type:`button`,onClick:x,className:`min-w-0 flex-1 truncate text-left text-foreground hover:underline focus-visible:outline-ring`,"aria-label":S,"data-testid":`activity-panel-file-row-filename`,title:n.docName,children:n.docName}),t[13]=n.docName,t[14]=x,t[15]=S,t[16]=C):C=t[16];let w;t[17]===n.additionsTotal?w=t[18]:(w=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additionsTotal]}),t[17]=n.additionsTotal,t[18]=w);let T;t[19]===n.deletionsTotal?T=t[20]:(T=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletionsTotal]}),t[19]=n.deletionsTotal,t[20]=T);let E;t[21]!==w||t[22]!==T?(E=(0,F.jsxs)(`span`,{className:`shrink-0 font-mono text-xs`,children:[w,` `,T]}),t[21]=w,t[22]=T,t[23]=E):E=t[23];let D;t[24]!==n.lastTs||t[25]!==m?(D=L(n.lastTs,m),t[24]=n.lastTs,t[25]=m,t[26]=D):D=t[26];let O;t[27]===D?O=t[28]:(O=(0,F.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:D}),t[27]=D,t[28]=O);let k;t[29]===i?k=t[30]:(k=i?(0,F.jsx)(`span`,{className:`shrink-0 text-[11px] text-primary animate-pulse`,role:`status`,children:(0,F.jsx)(a,{id:`6q0rnH`})}):null,t[29]=i,t[30]=k);let j;t[31]!==O||t[32]!==k||t[33]!==C||t[34]!==E?(j=(0,F.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[C,E,O,k]}),t[31]=O,t[32]=k,t[33]=C,t[34]=E,t[35]=j):j=t[35];let M;if(t[36]!==b||t[37]!==v||t[38]!==n.bursts||t[39]!==n.docName||t[40]!==l||t[41]!==r||t[42]!==f){let e;t[44]!==b||t[45]!==v||t[46]!==n.docName||t[47]!==l||t[48]!==r||t[49]!==f?(e=e=>(0,F.jsx)(ee,{burst:e,docName:n.docName,editCount:v,sessionAlive:r,inFlight:f,onOpenDiff:e=>l(e.stackIndex+1),onRestore:b},`${n.docName}:${e.stackIndex}`),t[44]=b,t[45]=v,t[46]=n.docName,t[47]=l,t[48]=r,t[49]=f,t[50]=e):e=t[50],M=n.bursts.map(e),t[36]=b,t[37]=v,t[38]=n.bursts,t[39]=n.docName,t[40]=l,t[41]=r,t[42]=f,t[43]=M}else M=t[43];let I;t[51]===M?I=t[52]:(I=(0,F.jsx)(`div`,{children:M}),t[51]=M,t[52]=I);let te;return t[53]!==j||t[54]!==I?(te=(0,F.jsxs)(`div`,{className:`border-b border-border`,"data-testid":`activity-panel-file-row`,children:[j,I]}),t[53]=j,t[54]=I,t[55]=te):te=t[55],te}function re(){return Date.now()}async function ie(e){let t=await fetch(`/api/agent-undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,agentId:e.connectionId})});if(!t.ok)throw Error(`agent-undo failed: HTTP ${t.status}`)}function R(e){return`#/${e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`}function z(e){typeof window>`u`||(window.location.hash=R(e))}function ae(){let e=(0,N.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,role:`status`,"aria-busy":`true`,children:[t,(0,F.jsx)(`span`,{className:`text-sm`,children:(0,F.jsx)(a,{id:`ONPvOb`})})]}),e[1]=n):n=e[1],n}function oe(e){let t=(0,N.c)(10),{error:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(x,{className:`size-6 text-destructive`,"aria-hidden":`true`}),t[0]=i):i=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,F.jsx)(`p`,{className:`text-sm font-medium`,children:(0,F.jsx)(a,{id:`DhLHEb`})}),t[1]=o):o=t[1];let s;t[2]===n?s=t[3]:(s=(0,F.jsxs)(`div`,{className:`space-y-1`,children:[o,(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),t[2]=n,t[3]=s);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(a,{id:`6gRgw8`}),t[4]=l):l=t[4];let u;t[5]===r?u=t[6]:(u=(0,F.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:l}),t[5]=r,t[6]=u);let d;return t[7]!==s||t[8]!==u?(d=(0,F.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center`,role:`alert`,"data-testid":`activity-panel-error`,children:[i,s,u]}),t[7]=s,t[8]=u,t[9]=d):d=t[9],d}function se(){let e=(0,N.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,"data-testid":`activity-panel-empty`,children:(0,F.jsx)(`p`,{className:`text-sm italic`,children:(0,F.jsx)(a,{id:`iuTKci`})})}),e[0]=t):t=e[0],t}function B(e){let t=(0,N.c)(12),{onExit:n,showBackButton:r}=e,{_:i}=o(),s;t[0]===i?s=t[1]:(s=i({id:`kYL1lH`}),t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==r?(c=r?(0,F.jsx)(V,{onClick:n}):null,t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})}),t[5]=l):l=t[5];let u;t[6]===c?u=t[7]:(u=(0,F.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-2 border-b border-border px-3 py-2`,children:[c,l]}),t[6]=c,t[7]=u);let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,F.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-muted-foreground`,children:(0,F.jsx)(`p`,{className:`text-center text-sm italic`,children:(0,F.jsx)(a,{id:`D_WKe_`})})}),t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==u?(f=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel-no-agent`,"aria-label":s,children:[u,d]}),t[9]=s,t[10]=u,t[11]=f):f=t[11],f}function V(e){let t=(0,N.c)(9),{onClick:n}=e,{_:r}=o(),i;t[0]===r?i=t[1]:(i=r({id:`ogAuyr`}),t[0]=r,t[1]=i);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(b,{}),t[2]=s):s=t[2];let f;t[3]!==n||t[4]!==i?(f=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:n,"aria-label":i,"data-testid":`docpanel-exit-agent-mode`,children:s})}),t[3]=n,t[4]=i,t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,F.jsx)(u,{side:`bottom`,children:(0,F.jsx)(a,{id:`ogAuyr`})}),t[6]=p):p=t[6];let m;return t[7]===f?m=t[8]:(m=(0,F.jsxs)(d,{children:[f,p]}),t[7]=f,t[8]=m),m}function H(e){let t=(0,N.c)(9),{lastTs:n}=e,[r]=(0,P.useState)(U),i;t[0]!==n||t[1]!==r?(i=n?W(r-n):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let o=i,s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(`span`,{className:`font-medium`,children:(0,F.jsx)(a,{id:`LCUy_N`})}),t[3]=s):s=t[3];let c;t[4]===o?c=t[5]:(c=o?(0,F.jsxs)(`span`,{children:[` · `,o]}):null,t[4]=o,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`div`,{className:`mt-1 opacity-80`,children:(0,F.jsx)(a,{id:`GK-IRZ`})}),t[6]=l):l=t[6];let u;return t[7]===c?u=t[8]:(u=(0,F.jsxs)(`div`,{className:`border-b border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,"data-testid":`activity-panel-session-ended`,children:[s,c,l]}),t[7]=c,t[8]=u),u}function U(){return Date.now()}function W(e){let t=Math.max(0,e);if(t<6e4){let e=Math.round(t/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(t<36e5){let e=Math.round(t/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let n=Math.round(t/36e5);return v._({id:`nYeBmY`,values:{hours:n}})}function G(e){let t=(0,N.c)(10),{agent:n,size:r}=e,i=r===void 0?28:r,a;t[0]!==n.color||t[1]!==i?(a={backgroundColor:n.color,width:i,height:i},t[0]=n.color,t[1]=i,t[2]=a):a=t[2];let o=i*.57,s=i*.57,c;t[3]!==n.icon||t[4]!==o||t[5]!==s?(c=(0,F.jsx)(k,{icon:n.icon,width:o,height:s}),t[3]=n.icon,t[4]=o,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==c?(l=(0,F.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-full text-white ring-2 ring-background`,style:a,"aria-hidden":`true`,children:c}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function ce(e){let t=(0,N.c)(25),{data:n,status:r,error:i,reload:s,onExit:c,onNavigate:l,onUndoDrop:u,onSetVersion:d,showBackButton:f}=e,{_:p}=o(),m=n?.files?.[0]?.lastTs??null,h=n?.files?.length??0,g;t[0]===p?g=t[1]:(g=p({id:`kYL1lH`}),t[0]=p,t[1]=g);let _;t[2]!==c||t[3]!==f?(_=f?(0,F.jsx)(V,{onClick:c}):null,t[2]=c,t[3]=f,t[4]=_):_=t[4];let v;t[5]!==n||t[6]!==h||t[7]!==m?(v=n?.agent?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(G,{agent:n.agent}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:n.agent.displayName}),(0,F.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[n.sessionAlive?(0,F.jsx)(a,{id:`F6pfE9`}):m===null?(0,F.jsx)(a,{id:`PMyJ9C`}):(0,F.jsx)(a,{id:`237hSL`}),n.files.length>0?(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(a,{id:`u3BOHd`,values:{fileCount:h}})]}):null]})]})]}):(0,F.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})})}),t[5]=n,t[6]=h,t[7]=m,t[8]=v):v=t[8];let y;t[9]!==_||t[10]!==v?(y=(0,F.jsxs)(`div`,{className:`flex flex-row items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[_,v]}),t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]!==n||t[13]!==i||t[14]!==m||t[15]!==l||t[16]!==d||t[17]!==u||t[18]!==s||t[19]!==r?(b=(0,F.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`activity-panel-body`,children:r===`loading`&&n===null?(0,F.jsx)(ae,{}):r===`error`&&i?(0,F.jsx)(oe,{error:i,onRetry:s}):n===null?(0,F.jsx)(se,{}):(0,F.jsxs)(F.Fragment,{children:[!n.sessionAlive&&m!==null?(0,F.jsx)(H,{lastTs:m}):null,n.files.length===0?(0,F.jsx)(se,{}):n.files.map(e=>(0,F.jsx)(ne,{file:e,sessionAlive:n.sessionAlive,isWriting:n.writingDocs.has(e.docName),onNavigate:l,onUndoDrop:u,onSetVersion:t=>d(e,t)},e.docName))]})}),t[12]=n,t[13]=i,t[14]=m,t[15]=l,t[16]=d,t[17]=u,t[18]=s,t[19]=r,t[20]=b):b=t[20];let x;return t[21]!==g||t[22]!==y||t[23]!==b?(x=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel`,"aria-label":g,children:[y,b]}),t[21]=g,t[22]=y,t[23]=b,t[24]=x):x=t[24],x}function K(e){let t=(0,N.c)(30),i;t[0]===e?i=t[1]:(i=e===void 0?{}:e,t[0]=e,t[1]=i);let{showBackButton:a}=i,s=a===void 0?!0:a,{_:c}=o(),{docPanelAgentId:l,closeActivityPanel:u}=n(),{openTargetTransition:d}=r(),{pageMeta:f}=S(),{data:p,status:m,error:h,reload:g}=M(l),_,v;if(t[2]!==p||t[3]!==l?(_=()=>{if(!(!p||l===null))for(let e of p.files)D(l,e.docName,e.bursts.length)},v=[p,l],t[2]=p,t[3]=l,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,P.useEffect)(_,v),l===null){let e;return t[6]!==u||t[7]!==s?(e=(0,F.jsx)(B,{onExit:u,showBackButton:s}),t[6]=u,t[7]=s,t[8]=e):e=t[8],e}let b;t[9]!==d||t[10]!==f?(b=e=>{d(T({kind:`doc`,target:e,docName:e},f),{disposition:`permanent`,consumeActiveNewTab:!0}),z(e)},t[9]=d,t[10]=f,t[11]=b):b=t[11];let x=b,C;t[12]!==p||t[13]!==l?(C=(e,t)=>{if(!p?.agent||l===null)return;j();let n=e.bursts.length;O({agentId:l,agentName:p.agent.displayName,agentColor:p.agent.color,agentIcon:p.agent.icon,docName:e.docName,keptCount:Math.max(0,Math.min(t,n)),maxVersions:n})},t[12]=p,t[13]=l,t[14]=C):C=t[14];let w=C,E;t[15]!==c||t[16]!==p||t[17]!==l||t[18]!==g?(E=async(e,t)=>{if(!(t<=0))try{await ie({connectionId:l,docName:e,scope:`count`,count:t,agentName:p?.agent?.displayName}),y.success(c(t===1?{id:`-dNlfM`,values:{docName:e}}:{id:`ApeA0n`,values:{dropCount:t,docName:e}})),g()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);y.error(c({id:`EqrC_R`,values:{message:n}})),g()}},t[15]=c,t[16]=p,t[17]=l,t[18]=g,t[19]=E):E=t[19];let k=E,A;return t[20]!==u||t[21]!==p||t[22]!==h||t[23]!==x||t[24]!==w||t[25]!==k||t[26]!==g||t[27]!==s||t[28]!==m?(A=(0,F.jsx)(ce,{data:p,status:m,error:h,reload:g,onExit:u,onNavigate:x,onUndoDrop:k,onSetVersion:w,showBackButton:s}),t[20]=u,t[21]=p,t[22]=h,t[23]=x,t[24]=w,t[25]=k,t[26]=g,t[27]=s,t[28]=m,t[29]=A):A=t[29],A}export{K as ActivityModeContent};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{a as n,o as r}from"./DocumentContext-DnKfTpmg.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./button-CA0dewJJ.js";import{i as l,n as u,t as d}from"./tooltip-DHXgxWLL.js";import{a as f,c as p,i as m,o as h,s as g,t as _}from"./dialog-DztIj-ZS.js";import{t as v}from"./dist-DUfEoSbR.js";import{n as y}from"./dist-B6jB2qbD2.js";import{c as b}from"./Mermaid-BHfANkja.js";import{r as x}from"./CopyButton-ByR_1gcU.js";import{i as S}from"./prop-types-BuByQU-C.js";import{t as C}from"./spinner-BqySY7qY.js";import{t as w}from"./undo-2-WGCwknr8.js";import{c as T}from"./navigation-targets-CmqNPgrG.js";import{a as E,i as D,n as O,o as k,t as A}from"./agent-diff-store-iX_f1eWT.js";import{t as j}from"./timeline-diff-store-DnRthkM7.js";import{n as M}from"./use-activity-panel-r04ocY2D.js";var N=s(),P=e(i(),1),F=t();function I(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function ee(e){let t=(0,N.c)(86),{burst:n,docName:r,editCount:i,sessionAlive:s,inFlight:v,onOpenDiff:y,onRestore:b}=e,{_:x}=o(),[S,T]=(0,P.useState)(te),D,O;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{let e=setInterval(()=>T(Date.now()),3e4);return()=>clearInterval(e)},O=[],t[0]=D,t[1]=O):(D=t[0],O=t[1]),(0,P.useEffect)(D,O);let[k,A]=(0,P.useState)(!1),j=E(),M=n.stackIndex+1,ee=j?.docName===r&&j.keptCount===M,L=i-M,ne=!s||v||L<=0,re;t[2]!==L||t[3]!==b?(re=function(){A(!1),b(L)},t[2]=L,t[3]=b,t[4]=re):re=t[4];let ie=re,R;t[5]!==n||t[6]!==y?(R=()=>y(n),t[5]=n,t[6]=y,t[7]=R):R=t[7];let z;t[8]!==x||t[9]!==M||t[10]!==r?(z=x({id:`Z79bnE`,values:{burstNumber:M,docName:r}}),t[8]=x,t[9]=M,t[10]=r,t[11]=z):z=t[11];let ae=ee?`bg-muted`:`hover:bg-muted/40`,oe;t[12]===ae?oe=t[13]:(oe=[`flex min-w-0 flex-1 items-center gap-2 px-4 py-1.5 text-xs text-muted-foreground transition-colors`,ae],t[12]=ae,t[13]=oe);let se=oe.join(` `),B;t[14]!==n.ts||t[15]!==S?(B=I(n.ts,S),t[14]=n.ts,t[15]=S,t[16]=B):B=t[16];let V;t[17]===B?V=t[18]:(V=(0,F.jsx)(`span`,{className:`font-mono`,children:B}),t[17]=B,t[18]=V);let H;t[19]===n.additions?H=t[20]:(H=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additions]}),t[19]=n.additions,t[20]=H);let U;t[21]===n.deletions?U=t[22]:(U=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletions]}),t[21]=n.deletions,t[22]=U);let W;t[23]!==H||t[24]!==U?(W=(0,F.jsxs)(`span`,{className:`ml-auto font-mono`,children:[H,` `,U]}),t[23]=H,t[24]=U,t[25]=W):W=t[25];let G;t[26]!==ee||t[27]!==V||t[28]!==W||t[29]!==R||t[30]!==z||t[31]!==se?(G=(0,F.jsxs)(`button`,{type:`button`,onClick:R,"aria-pressed":ee,"aria-label":z,"data-testid":`activity-panel-burst-open`,className:se,children:[V,W]}),t[26]=ee,t[27]=V,t[28]=W,t[29]=R,t[30]=z,t[31]=se,t[32]=G):G=t[32];let ce;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1.5 h-3 w-px shrink-0 bg-border`}),t[33]=ce):ce=t[33];let K;t[34]!==x||t[35]!==M||t[36]!==r?(K=x({id:`Zhe80e`,values:{burstNumber:M,docName:r}}),t[34]=x,t[35]=M,t[36]=r,t[37]=K):K=t[37];let le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>A(!0),t[38]=le):le=t[38];let q;t[39]===v?q=t[40]:(q=v?(0,F.jsx)(C,{className:`size-3`,"aria-hidden":`true`}):(0,F.jsx)(w,{className:`size-3`,"aria-hidden":`true`}),t[39]=v,t[40]=q);let J;t[41]!==ne||t[42]!==K||t[43]!==q?(J=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`activity-panel-burst-restore`,"aria-label":K,disabled:ne,onClick:le,children:q})}),t[41]=ne,t[42]=K,t[43]=q,t[44]=J):J=t[44];let Y;t[45]!==x||t[46]!==L||t[47]!==s?(Y=x(s?L>0?{id:`SOPwPh`}:{id:`62bOuM`}:{id:`NzFvyK`}),t[45]=x,t[46]=L,t[47]=s,t[48]=Y):Y=t[48];let X;t[49]===Y?X=t[50]:(X=(0,F.jsx)(u,{side:`left`,children:Y}),t[49]=Y,t[50]=X);let Z;t[51]!==J||t[52]!==X?(Z=(0,F.jsxs)(d,{children:[J,X]}),t[51]=J,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==G||t[55]!==Z?(Q=(0,F.jsxs)(`div`,{className:`flex items-center border-t border-border/50 pr-3`,children:[G,ce,Z]}),t[54]=G,t[55]=Z,t[56]=Q):Q=t[56];let ue;t[57]===v?ue=t[58]:(ue=e=>{!e&&!v?A(!1):e&&A(!0)},t[57]=v,t[58]=ue);let de;t[59]===x?de=t[60]:(de=x({id:`a4FRQv`}),t[59]=x,t[60]=de);let fe;t[61]===de?fe=t[62]:(fe=(0,F.jsx)(p,{children:de}),t[61]=de,t[62]=fe);let pe;t[63]===L?pe=t[64]:(pe=(0,F.jsx)(f,{children:(0,F.jsx)(a,{id:`LKIPzv`,values:{laterEdits:L}})}),t[63]=L,t[64]=pe);let $;t[65]!==fe||t[66]!==pe?($=(0,F.jsxs)(g,{children:[fe,pe]}),t[65]=fe,t[66]=pe,t[67]=$):$=t[67];let me;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,F.jsx)(c,{variant:`outline`,"data-testid":`activity-panel-burst-restore-cancel`,onClick:()=>A(!1),children:(0,F.jsx)(a,{id:`dEgA5A`})}),t[68]=me):me=t[68];let he;t[69]===v?he=t[70]:(he=v?(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}):null,t[69]=v,t[70]=he);let ge;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,F.jsx)(a,{id:`9uI_rE`}),t[71]=ge):ge=t[71];let _e;t[72]!==ie||t[73]!==v||t[74]!==he?(_e=(0,F.jsxs)(h,{children:[me,(0,F.jsxs)(c,{variant:`destructive`,"data-testid":`activity-panel-burst-restore-confirm`,disabled:v,onClick:ie,children:[he,ge]})]}),t[72]=ie,t[73]=v,t[74]=he,t[75]=_e):_e=t[75];let ve;t[76]!==$||t[77]!==_e?(ve=(0,F.jsxs)(m,{children:[$,_e]}),t[76]=$,t[77]=_e,t[78]=ve):ve=t[78];let ye;t[79]!==k||t[80]!==ue||t[81]!==ve?(ye=(0,F.jsx)(_,{open:k,onOpenChange:ue,children:ve}),t[79]=k,t[80]=ue,t[81]=ve,t[82]=ye):ye=t[82];let be;return t[83]!==Q||t[84]!==ye?(be=(0,F.jsxs)(F.Fragment,{children:[Q,ye]}),t[83]=Q,t[84]=ye,t[85]=be):be=t[85],be}function te(){return Date.now()}function L(e,t){let n=Math.max(0,t-e);if(n<6e4){let e=Math.round(n/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(n<36e5){let e=Math.round(n/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let r=Math.round(n/36e5);return v._({id:`nYeBmY`,values:{hours:r}})}function ne(e){let t=(0,N.c)(56),{file:n,sessionAlive:r,isWriting:i,onNavigate:s,onUndoDrop:c,onSetVersion:l}=e,{_:u}=o(),{docName:d}=n,[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(re),g,_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{let e=setInterval(()=>h(Date.now()),3e4);return()=>clearInterval(e)},_=[],t[0]=g,t[1]=_):(g=t[0],_=t[1]),(0,P.useEffect)(g,_);let v=n.bursts.length,y;t[2]!==n.docName||t[3]!==c||t[4]!==r||t[5]!==f?(y=e=>{e<=0||!r||f||(p(!0),Promise.resolve(c(n.docName,e)).finally(()=>{p(!1),A()}))},t[2]=n.docName,t[3]=c,t[4]=r,t[5]=f,t[6]=y):y=t[6];let b=y;if(n.bursts.length===0)return null;let x;t[7]!==n.docName||t[8]!==s?(x=()=>s(n.docName),t[7]=n.docName,t[8]=s,t[9]=x):x=t[9];let S;t[10]!==u||t[11]!==d?(S=u({id:`QcpeeE`,values:{docName:d}}),t[10]=u,t[11]=d,t[12]=S):S=t[12];let C;t[13]!==n.docName||t[14]!==x||t[15]!==S?(C=(0,F.jsx)(`button`,{type:`button`,onClick:x,className:`min-w-0 flex-1 truncate text-left text-foreground hover:underline focus-visible:outline-ring`,"aria-label":S,"data-testid":`activity-panel-file-row-filename`,title:n.docName,children:n.docName}),t[13]=n.docName,t[14]=x,t[15]=S,t[16]=C):C=t[16];let w;t[17]===n.additionsTotal?w=t[18]:(w=(0,F.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additionsTotal]}),t[17]=n.additionsTotal,t[18]=w);let T;t[19]===n.deletionsTotal?T=t[20]:(T=(0,F.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletionsTotal]}),t[19]=n.deletionsTotal,t[20]=T);let E;t[21]!==w||t[22]!==T?(E=(0,F.jsxs)(`span`,{className:`shrink-0 font-mono text-xs`,children:[w,` `,T]}),t[21]=w,t[22]=T,t[23]=E):E=t[23];let D;t[24]!==n.lastTs||t[25]!==m?(D=L(n.lastTs,m),t[24]=n.lastTs,t[25]=m,t[26]=D):D=t[26];let O;t[27]===D?O=t[28]:(O=(0,F.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:D}),t[27]=D,t[28]=O);let k;t[29]===i?k=t[30]:(k=i?(0,F.jsx)(`span`,{className:`shrink-0 text-[11px] text-primary animate-pulse`,role:`status`,children:(0,F.jsx)(a,{id:`6q0rnH`})}):null,t[29]=i,t[30]=k);let j;t[31]!==O||t[32]!==k||t[33]!==C||t[34]!==E?(j=(0,F.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[C,E,O,k]}),t[31]=O,t[32]=k,t[33]=C,t[34]=E,t[35]=j):j=t[35];let M;if(t[36]!==b||t[37]!==v||t[38]!==n.bursts||t[39]!==n.docName||t[40]!==l||t[41]!==r||t[42]!==f){let e;t[44]!==b||t[45]!==v||t[46]!==n.docName||t[47]!==l||t[48]!==r||t[49]!==f?(e=e=>(0,F.jsx)(ee,{burst:e,docName:n.docName,editCount:v,sessionAlive:r,inFlight:f,onOpenDiff:e=>l(e.stackIndex+1),onRestore:b},`${n.docName}:${e.stackIndex}`),t[44]=b,t[45]=v,t[46]=n.docName,t[47]=l,t[48]=r,t[49]=f,t[50]=e):e=t[50],M=n.bursts.map(e),t[36]=b,t[37]=v,t[38]=n.bursts,t[39]=n.docName,t[40]=l,t[41]=r,t[42]=f,t[43]=M}else M=t[43];let I;t[51]===M?I=t[52]:(I=(0,F.jsx)(`div`,{children:M}),t[51]=M,t[52]=I);let te;return t[53]!==j||t[54]!==I?(te=(0,F.jsxs)(`div`,{className:`border-b border-border`,"data-testid":`activity-panel-file-row`,children:[j,I]}),t[53]=j,t[54]=I,t[55]=te):te=t[55],te}function re(){return Date.now()}async function ie(e){let t=await fetch(`/api/agent-undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,agentId:e.connectionId})});if(!t.ok)throw Error(`agent-undo failed: HTTP ${t.status}`)}function R(e){return`#/${e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`}function z(e){typeof window>`u`||(window.location.hash=R(e))}function ae(){let e=(0,N.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(C,{className:`mr-2 size-4`,"aria-hidden":`true`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,role:`status`,"aria-busy":`true`,children:[t,(0,F.jsx)(`span`,{className:`text-sm`,children:(0,F.jsx)(a,{id:`ONPvOb`})})]}),e[1]=n):n=e[1],n}function oe(e){let t=(0,N.c)(10),{error:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(x,{className:`size-6 text-destructive`,"aria-hidden":`true`}),t[0]=i):i=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,F.jsx)(`p`,{className:`text-sm font-medium`,children:(0,F.jsx)(a,{id:`DhLHEb`})}),t[1]=o):o=t[1];let s;t[2]===n?s=t[3]:(s=(0,F.jsxs)(`div`,{className:`space-y-1`,children:[o,(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),t[2]=n,t[3]=s);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(a,{id:`6gRgw8`}),t[4]=l):l=t[4];let u;t[5]===r?u=t[6]:(u=(0,F.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:l}),t[5]=r,t[6]=u);let d;return t[7]!==s||t[8]!==u?(d=(0,F.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center`,role:`alert`,"data-testid":`activity-panel-error`,children:[i,s,u]}),t[7]=s,t[8]=u,t[9]=d):d=t[9],d}function se(){let e=(0,N.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,"data-testid":`activity-panel-empty`,children:(0,F.jsx)(`p`,{className:`text-sm italic`,children:(0,F.jsx)(a,{id:`iuTKci`})})}),e[0]=t):t=e[0],t}function B(e){let t=(0,N.c)(12),{onExit:n,showBackButton:r}=e,{_:i}=o(),s;t[0]===i?s=t[1]:(s=i({id:`kYL1lH`}),t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==r?(c=r?(0,F.jsx)(V,{onClick:n}):null,t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})}),t[5]=l):l=t[5];let u;t[6]===c?u=t[7]:(u=(0,F.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-2 border-b border-border px-3 py-2`,children:[c,l]}),t[6]=c,t[7]=u);let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,F.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-muted-foreground`,children:(0,F.jsx)(`p`,{className:`text-center text-sm italic`,children:(0,F.jsx)(a,{id:`D_WKe_`})})}),t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==u?(f=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel-no-agent`,"aria-label":s,children:[u,d]}),t[9]=s,t[10]=u,t[11]=f):f=t[11],f}function V(e){let t=(0,N.c)(9),{onClick:n}=e,{_:r}=o(),i;t[0]===r?i=t[1]:(i=r({id:`ogAuyr`}),t[0]=r,t[1]=i);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(b,{}),t[2]=s):s=t[2];let f;t[3]!==n||t[4]!==i?(f=(0,F.jsx)(l,{asChild:!0,children:(0,F.jsx)(c,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:n,"aria-label":i,"data-testid":`docpanel-exit-agent-mode`,children:s})}),t[3]=n,t[4]=i,t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,F.jsx)(u,{side:`bottom`,children:(0,F.jsx)(a,{id:`ogAuyr`})}),t[6]=p):p=t[6];let m;return t[7]===f?m=t[8]:(m=(0,F.jsxs)(d,{children:[f,p]}),t[7]=f,t[8]=m),m}function H(e){let t=(0,N.c)(9),{lastTs:n}=e,[r]=(0,P.useState)(U),i;t[0]!==n||t[1]!==r?(i=n?W(r-n):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let o=i,s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,F.jsx)(`span`,{className:`font-medium`,children:(0,F.jsx)(a,{id:`LCUy_N`})}),t[3]=s):s=t[3];let c;t[4]===o?c=t[5]:(c=o?(0,F.jsxs)(`span`,{children:[` · `,o]}):null,t[4]=o,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,F.jsx)(`div`,{className:`mt-1 opacity-80`,children:(0,F.jsx)(a,{id:`GK-IRZ`})}),t[6]=l):l=t[6];let u;return t[7]===c?u=t[8]:(u=(0,F.jsxs)(`div`,{className:`border-b border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,"data-testid":`activity-panel-session-ended`,children:[s,c,l]}),t[7]=c,t[8]=u),u}function U(){return Date.now()}function W(e){let t=Math.max(0,e);if(t<6e4){let e=Math.round(t/1e3);return v._({id:`pbwTg6`,values:{seconds:e}})}if(t<36e5){let e=Math.round(t/6e4);return v._({id:`_rP3HI`,values:{minutes:e}})}let n=Math.round(t/36e5);return v._({id:`nYeBmY`,values:{hours:n}})}function G(e){let t=(0,N.c)(10),{agent:n,size:r}=e,i=r===void 0?28:r,a;t[0]!==n.color||t[1]!==i?(a={backgroundColor:n.color,width:i,height:i},t[0]=n.color,t[1]=i,t[2]=a):a=t[2];let o=i*.57,s=i*.57,c;t[3]!==n.icon||t[4]!==o||t[5]!==s?(c=(0,F.jsx)(k,{icon:n.icon,width:o,height:s}),t[3]=n.icon,t[4]=o,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==c?(l=(0,F.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-full text-white ring-2 ring-background`,style:a,"aria-hidden":`true`,children:c}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function ce(e){let t=(0,N.c)(25),{data:n,status:r,error:i,reload:s,onExit:c,onNavigate:l,onUndoDrop:u,onSetVersion:d,showBackButton:f}=e,{_:p}=o(),m=n?.files?.[0]?.lastTs??null,h=n?.files?.length??0,g;t[0]===p?g=t[1]:(g=p({id:`kYL1lH`}),t[0]=p,t[1]=g);let _;t[2]!==c||t[3]!==f?(_=f?(0,F.jsx)(V,{onClick:c}):null,t[2]=c,t[3]=f,t[4]=_):_=t[4];let v;t[5]!==n||t[6]!==h||t[7]!==m?(v=n?.agent?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(G,{agent:n.agent}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:n.agent.displayName}),(0,F.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[n.sessionAlive?(0,F.jsx)(a,{id:`F6pfE9`}):m===null?(0,F.jsx)(a,{id:`PMyJ9C`}):(0,F.jsx)(a,{id:`237hSL`}),n.files.length>0?(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(a,{id:`u3BOHd`,values:{fileCount:h}})]}):null]})]})]}):(0,F.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,F.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:(0,F.jsx)(a,{id:`kYL1lH`})})}),t[5]=n,t[6]=h,t[7]=m,t[8]=v):v=t[8];let y;t[9]!==_||t[10]!==v?(y=(0,F.jsxs)(`div`,{className:`flex flex-row items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[_,v]}),t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]!==n||t[13]!==i||t[14]!==m||t[15]!==l||t[16]!==d||t[17]!==u||t[18]!==s||t[19]!==r?(b=(0,F.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`activity-panel-body`,children:r===`loading`&&n===null?(0,F.jsx)(ae,{}):r===`error`&&i?(0,F.jsx)(oe,{error:i,onRetry:s}):n===null?(0,F.jsx)(se,{}):(0,F.jsxs)(F.Fragment,{children:[!n.sessionAlive&&m!==null?(0,F.jsx)(H,{lastTs:m}):null,n.files.length===0?(0,F.jsx)(se,{}):n.files.map(e=>(0,F.jsx)(ne,{file:e,sessionAlive:n.sessionAlive,isWriting:n.writingDocs.has(e.docName),onNavigate:l,onUndoDrop:u,onSetVersion:t=>d(e,t)},e.docName))]})}),t[12]=n,t[13]=i,t[14]=m,t[15]=l,t[16]=d,t[17]=u,t[18]=s,t[19]=r,t[20]=b):b=t[20];let x;return t[21]!==g||t[22]!==y||t[23]!==b?(x=(0,F.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel`,"aria-label":g,children:[y,b]}),t[21]=g,t[22]=y,t[23]=b,t[24]=x):x=t[24],x}function K(e){let t=(0,N.c)(30),i;t[0]===e?i=t[1]:(i=e===void 0?{}:e,t[0]=e,t[1]=i);let{showBackButton:a}=i,s=a===void 0?!0:a,{_:c}=o(),{docPanelAgentId:l,closeActivityPanel:u}=n(),{openTargetTransition:d}=r(),{pageMeta:f}=S(),{data:p,status:m,error:h,reload:g}=M(l),_,v;if(t[2]!==p||t[3]!==l?(_=()=>{if(!(!p||l===null))for(let e of p.files)D(l,e.docName,e.bursts.length)},v=[p,l],t[2]=p,t[3]=l,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,P.useEffect)(_,v),l===null){let e;return t[6]!==u||t[7]!==s?(e=(0,F.jsx)(B,{onExit:u,showBackButton:s}),t[6]=u,t[7]=s,t[8]=e):e=t[8],e}let b;t[9]!==d||t[10]!==f?(b=e=>{d(T({kind:`doc`,target:e,docName:e},f),{disposition:`permanent`,consumeActiveNewTab:!0}),z(e)},t[9]=d,t[10]=f,t[11]=b):b=t[11];let x=b,C;t[12]!==p||t[13]!==l?(C=(e,t)=>{if(!p?.agent||l===null)return;j();let n=e.bursts.length;O({agentId:l,agentName:p.agent.displayName,agentColor:p.agent.color,agentIcon:p.agent.icon,docName:e.docName,keptCount:Math.max(0,Math.min(t,n)),maxVersions:n})},t[12]=p,t[13]=l,t[14]=C):C=t[14];let w=C,E;t[15]!==c||t[16]!==p||t[17]!==l||t[18]!==g?(E=async(e,t)=>{if(!(t<=0))try{await ie({connectionId:l,docName:e,scope:`count`,count:t,agentName:p?.agent?.displayName}),y.success(c(t===1?{id:`-dNlfM`,values:{docName:e}}:{id:`ApeA0n`,values:{dropCount:t,docName:e}})),g()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);y.error(c({id:`EqrC_R`,values:{message:n}})),g()}},t[15]=c,t[16]=p,t[17]=l,t[18]=g,t[19]=E):E=t[19];let k=E,A;return t[20]!==u||t[21]!==p||t[22]!==h||t[23]!==x||t[24]!==w||t[25]!==k||t[26]!==g||t[27]!==s||t[28]!==m?(A=(0,F.jsx)(ce,{data:p,status:m,error:h,reload:g,onExit:u,onNavigate:x,onUndoDrop:k,onSetVersion:w,showBackButton:s}),t[20]=u,t[21]=p,t[22]=h,t[23]=x,t[24]=w,t[25]=k,t[26]=g,t[27]=s,t[28]=m,t[29]=A):A=t[29],A}export{K as ActivityModeContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActivityPanelDiffView-GFnvFJPJ.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./compiler-runtime-BfE3aGVn.js","./ActivityPanelDiffView-legcy4jI.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./overlay-layers-Bj-TVfKw.js";import{t as ee}from"./button-CA0dewJJ.js";import{i as te,n as ne,t as re}from"./tooltip-DHXgxWLL.js";import{n as c,t as l}from"./toggle-group-CZcn-1gX.js";import{t as u}from"./spinner-BqySY7qY.js";import{n as d,t as ie}from"./panel-right-open-B66oA9M1.js";import{t as ae}from"./x-DS57FvHW.js";import{o as oe,r as se,t as ce}from"./agent-diff-store-
|
|
2
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./overlay-layers-Bj-TVfKw.js";import{t as ee}from"./button-CA0dewJJ.js";import{i as te,n as ne,t as re}from"./tooltip-DHXgxWLL.js";import{n as c,t as l}from"./toggle-group-CZcn-1gX.js";import{t as u}from"./spinner-BqySY7qY.js";import{n as d,t as ie}from"./panel-right-open-B66oA9M1.js";import{t as ae}from"./x-DS57FvHW.js";import{o as oe,r as se,t as ce}from"./agent-diff-store-iX_f1eWT.js";import{t as f}from"./lru-string-cache-Ckr1Pjrr.js";import{t as le}from"./use-activity-panel-r04ocY2D.js";import{a as ue,o as de,r as fe,t as pe}from"./use-timeline-entry-diff-0Hk0QZo4.js";var me=o(),p=e(r(),1),m=n(),he=(0,p.lazy)(async()=>({default:(await t(()=>import(`./ActivityPanelDiffView-GFnvFJPJ.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)).ActivityPanelDiffView})),h=64;function g(e){let t=(0,me.c)(115),{view:n,isPanelCollapsed:r,onTogglePanel:o}=e,{_:f}=a(),{agentId:h,agentName:g,agentColor:_,agentIcon:v,docName:y,keptCount:b}=n,[x]=(0,p.useState)(_e),ve=(0,p.useRef)(null),[S,ye]=(0,p.useState)(`rendered`),be;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(be={status:`loading`,diff:``,before:``,after:``},t[0]=be):be=t[0];let[C,xe]=(0,p.useState)(be),Se,Ce;t[1]!==h||t[2]!==x||t[3]!==y||t[4]!==b?(Se=()=>{let e=!1;xe({status:`loading`,diff:``,before:``,after:``});let t=`${y}\0${b}`,n=x.get(t);if(n!==void 0){xe({status:`ready`,...JSON.parse(n)});return}return le(h,y,b).then(n=>{e||(x.set(t,JSON.stringify(n)),xe({status:`ready`,...n}))}).catch(t=>{e||(console.error(`[agent-diff] failed to load burst diff`,{agentId:h,docName:y,keptCount:b,err:t}),xe({status:`error`,diff:``,before:``,after:``}))}),()=>{e=!0}},Ce=[h,y,b,x],t[1]=h,t[2]=x,t[3]=y,t[4]=b,t[5]=Se,t[6]=Ce):(Se=t[5],Ce=t[6]),(0,p.useEffect)(Se,Ce);let w;t[7]!==C.after||t[8]!==C.before||t[9]!==C.status?(w=C.status===`ready`?de(C.before,C.after):null,t[7]=C.after,t[8]=C.before,t[9]=C.status,t[10]=w):w=t[10];let T=w,E=C.status===`ready`&&C.diff!==``?`${S}:${C.diff}`:``,D,O;t[11]===E?(D=t[12],O=t[13]):(D=()=>{let e=ve.current;if(E===``||!e)return;let t=!1,n=null,r,i,a=()=>{if(t)return;let r=e.querySelector(`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`)??fe(e)[0];if(!r)return;t=!0,n?.disconnect();let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollIntoView({block:`center`,behavior:i?`auto`:`smooth`})},o=()=>{t||(r!==void 0&&clearTimeout(r),r=setTimeout(()=>{i!==void 0&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=requestAnimationFrame(a)})},120))};n=new MutationObserver(o),n.observe(e,{childList:!0,subtree:!0}),o();let s=setTimeout(()=>n?.disconnect(),5e3);return()=>{n?.disconnect(),r!==void 0&&clearTimeout(r),i!==void 0&&cancelAnimationFrame(i),clearTimeout(s)}},O=[E],t[11]=E,t[12]=D,t[13]=O),(0,p.useEffect)(D,O);let k,A;t[14]===b?(k=t[15],A=t[16]):(k=()=>{let e=e=>{if(e.key===`Escape`&&e.defaultPrevented||s())return;let t=e.target;t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable)||(e.key===`Escape`?ce():e.key===`j`||e.key===`ArrowRight`?(e.preventDefault(),se(b+1)):(e.key===`k`||e.key===`ArrowLeft`)&&(e.preventDefault(),se(b-1)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},A=[b],t[14]=b,t[15]=k,t[16]=A),(0,p.useEffect)(k,A);let j,M,N,P,F,I,L,R;if(t[17]!==f||t[18]!==_||t[19]!==v||t[20]!==g||t[21]!==y||t[22]!==C.diff||t[23]!==C.status){let e=C.status===`ready`?pe(C.diff):{additions:0,deletions:0},n=e.additions>0||e.deletions>0;I=`absolute inset-0 z-20 flex flex-col bg-background`,L=`agent-diff-pane`,M=`flex flex-wrap items-center gap-x-2 gap-y-1.5 border-b border-border px-3 py-2`;let r;t[32]===f?r=t[33]:(r=f({id:`b18t0_`}),t[32]=f,t[33]=r);let i;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,m.jsx)(ae,{className:`size-4`}),t[34]=i):i=t[34];let a;t[35]===r?a=t[36]:(a=(0,m.jsx)(te,{asChild:!0,children:(0,m.jsx)(ee,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`agent-diff-close`,"aria-label":r,onClick:ge,children:i})}),t[35]=r,t[36]=a);let o;t[37]===f?o=t[38]:(o=f({id:`b18t0_`}),t[37]=f,t[38]=o);let s;t[39]===o?s=t[40]:(s=(0,m.jsx)(ne,{side:`bottom`,children:o}),t[39]=o,t[40]=s),t[41]!==a||t[42]!==s?(N=(0,m.jsxs)(re,{children:[a,s]}),t[41]=a,t[42]=s,t[43]=N):N=t[43];let c;t[44]===_?c=t[45]:(c={backgroundColor:_},t[44]=_,t[45]=c);let l;t[46]===v?l=t[47]:(l=(0,m.jsx)(oe,{icon:v,width:13,height:13}),t[46]=v,t[47]=l),t[48]!==c||t[49]!==l?(P=(0,m.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full text-white`,style:c,children:l}),t[48]=c,t[49]=l,t[50]=P):P=t[50];let u;t[51]===y?u=t[52]:(u=(0,m.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,children:y}),t[51]=y,t[52]=u);let d;t[53]===g?d=t[54]:(d=(0,m.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:g}),t[53]=g,t[54]=d),t[55]!==u||t[56]!==d?(F=(0,m.jsxs)(`div`,{className:`min-w-0 max-w-[14rem] shrink`,children:[u,d]}),t[55]=u,t[56]=d,t[57]=F):F=t[57],R=`ml-auto flex flex-wrap items-center justify-end gap-2`,j=n&&(0,m.jsxs)(`span`,{role:`img`,className:`shrink-0 text-xs tabular-nums`,"data-testid":`agent-diff-stat`,"aria-label":f({id:`8lwQlE`,values:{0:e.additions,1:e.deletions}}),children:[(0,m.jsxs)(`span`,{"aria-hidden":`true`,className:`text-emerald-600 dark:text-emerald-500`,children:[`+`,e.additions]}),` `,(0,m.jsxs)(`span`,{"aria-hidden":`true`,className:`text-red-600 dark:text-red-500`,children:[`−`,e.deletions]})]}),t[17]=f,t[18]=_,t[19]=v,t[20]=g,t[21]=y,t[22]=C.diff,t[23]=C.status,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I,t[30]=L,t[31]=R}else j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29],L=t[30],R=t[31];let z;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{(e===`rendered`||e===`source`)&&ye(e)},t[58]=z):z=t[58];let B;t[59]===f?B=t[60]:(B=f({id:`ZW3mlR`}),t[59]=f,t[60]=B);let we;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,m.jsx)(c,{value:`rendered`,className:`h-6 px-2 text-xs`,"data-testid":`agent-diff-render-rendered`,children:(0,m.jsx)(i,{id:`4z_1j2`})}),t[61]=we):we=t[61];let Te;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,m.jsx)(c,{value:`source`,className:`h-6 px-2 text-xs`,"data-testid":`agent-diff-render-source`,children:(0,m.jsx)(i,{id:`wdxz7K`})}),t[62]=Te):Te=t[62];let V;t[63]!==S||t[64]!==B?(V=(0,m.jsxs)(l,{type:`single`,value:S,onValueChange:z,"aria-label":B,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 rounded-md bg-muted p-0.5 dark:bg-background`,children:[we,Te]}),t[63]=S,t[64]=B,t[65]=V):V=t[65];let H;t[66]!==f||t[67]!==r?(H=f(r?{id:`6iDEWA`}:{id:`170Js2`}),t[66]=f,t[67]=r,t[68]=H):H=t[68];let Ee=!r,U;t[69]===r?U=t[70]:(U=r?(0,m.jsx)(ie,{className:`size-4`}):(0,m.jsx)(d,{className:`size-4`}),t[69]=r,t[70]=U);let W;t[71]!==o||t[72]!==H||t[73]!==Ee||t[74]!==U?(W=(0,m.jsx)(te,{asChild:!0,children:(0,m.jsx)(ee,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`agent-diff-toggle-panel`,"aria-label":H,"aria-expanded":Ee,onClick:o,children:U})}),t[71]=o,t[72]=H,t[73]=Ee,t[74]=U,t[75]=W):W=t[75];let G;t[76]!==f||t[77]!==r?(G=f(r?{id:`6iDEWA`}:{id:`170Js2`}),t[76]=f,t[77]=r,t[78]=G):G=t[78];let K;t[79]===G?K=t[80]:(K=(0,m.jsx)(ne,{side:`bottom`,children:G}),t[79]=G,t[80]=K);let q;t[81]!==W||t[82]!==K?(q=(0,m.jsxs)(re,{children:[W,K]}),t[81]=W,t[82]=K,t[83]=q):q=t[83];let J;t[84]!==j||t[85]!==V||t[86]!==q||t[87]!==R?(J=(0,m.jsxs)(`div`,{className:R,children:[j,V,q]}),t[84]=j,t[85]=V,t[86]=q,t[87]=R,t[88]=J):J=t[88];let Y;t[89]!==M||t[90]!==N||t[91]!==P||t[92]!==F||t[93]!==J?(Y=(0,m.jsxs)(`div`,{className:M,children:[N,P,F,J]}),t[89]=M,t[90]=N,t[91]=P,t[92]=F,t[93]=J,t[94]=Y):Y=t[94];let X;t[95]===C.status?X=t[96]:(X=C.status===`loading`&&(0,m.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,m.jsx)(u,{"aria-hidden":`true`,className:`size-3`}),(0,m.jsx)(i,{id:`38foVZ`})]}),t[95]=C.status,t[96]=X);let Z;t[97]===C.status?Z=t[98]:(Z=C.status===`error`&&(0,m.jsx)(`p`,{className:`px-4 py-3 text-xs text-destructive`,children:(0,m.jsx)(i,{id:`vvWZnu`})}),t[97]=C.status,t[98]=Z);let Q;t[99]!==b||t[100]!==S||t[101]!==T||t[102]!==C.after||t[103]!==C.diff||t[104]!==C.status?(Q=C.status===`ready`&&(S===`rendered`&&T?.ok?(0,m.jsx)(ue,{diff:T}):C.diff===``?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`p`,{className:`border-b border-border px-4 py-2 text-xs text-muted-foreground italic`,children:b===0?(0,m.jsx)(i,{id:`klPS-L`}):(0,m.jsx)(i,{id:`k7Hoig`})}),(0,m.jsx)(`pre`,{className:`whitespace-pre-wrap px-4 py-3 font-mono text-xs text-foreground/90`,children:C.after})]}):(0,m.jsx)(p.Suspense,{fallback:(0,m.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,m.jsx)(u,{"aria-hidden":`true`,className:`size-3`}),(0,m.jsx)(i,{id:`EDm3wJ`})]}),children:(0,m.jsx)(he,{diff:C.diff,viewType:`unified`})})),t[99]=b,t[100]=S,t[101]=T,t[102]=C.after,t[103]=C.diff,t[104]=C.status,t[105]=Q):Q=t[105];let $;t[106]!==X||t[107]!==Z||t[108]!==Q?($=(0,m.jsxs)(`div`,{ref:ve,className:`min-h-0 flex-1 overflow-auto subtle-scrollbar`,children:[X,Z,Q]}),t[106]=X,t[107]=Z,t[108]=Q,t[109]=$):$=t[109];let De;return t[110]!==I||t[111]!==L||t[112]!==Y||t[113]!==$?(De=(0,m.jsxs)(`div`,{className:I,"data-testid":L,children:[Y,$]}),t[110]=I,t[111]=L,t[112]=Y,t[113]=$,t[114]=De):De=t[114],De}function ge(){return ce()}function _e(){return new f(h)}export{g as AgentDiffPane};
|
package/dist/public/assets/{ChangedOutsideBadge-CDYBGlu-.js → ChangedOutsideBadge-ayB1siCV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{wn as n}from"./DocumentContext-DDvPxhWz.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./mascot-outline-CtS592mc.js";import{t as l}from"./button-CA0dewJJ.js";import{a as u,r as d}from"./dist-mv8e6dBX.js";import{c as f,o as p}from"./dist-DsLZcVyZ.js";import{i as m,n as h,t as g}from"./tooltip-DHXgxWLL.js";import{_,d as v,f as y,g as b,h as x,l as S,m as C,p as w,u as T,v as E}from"./dialog-DztIj-ZS.js";import{p as D,r as O}from"./terminal-cli-display-ceeLXdxI.js";import{La as k}from"./dist-DoYGOGZp.js";import{t as A}from"./createLucideIcon-Bhw2PmPp.js";import{t as j}from"./folder-CopDpuy5.js";import{t as ee}from"./spinner-BqySY7qY.js";var M=t(),N=e(r(),1),P=o(),te=3100,ne=3;function re(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??ne;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var ie={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},ae=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function oe(e,t={}){let n=t.rng??Math.random,r=t.colors??ae,i=ie[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var se=1.8,ce=90,le=16,ue=380,de=.025,fe=.1,pe=.18,me=400,he=9.2736,ge=18.1799,F=14.5244,_e={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function ve(e,t){let{halfWidth:n,apexLift:r}=_e[t];return`M${e-n} ${F+.3} Q${e} ${F-r}, ${e+n} ${F+.3}`}function ye(e){let t=1.5,n=.3;return`M${e-t} ${F-n} Q${e} ${F+1.4}, ${e+t} ${F-n}`}var be=15,xe=15;function I(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function L(e){let t=(0,P.c)(73),{size:n,className:r,style:i,trackMouse:a,variant:o,celebrateSignal:l,onRage:u}=e,d=n===void 0?48:n,f=a===void 0?!0:a,p=o===void 0?`default`:o,m=l===void 0?0:l,h=(0,N.useRef)(null),g=(0,N.useRef)(null),_=(0,N.useRef)(null),v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={x:0,y:0},t[0]=v):v=t[0];let y=(0,N.useRef)(v),[b,x]=(0,N.useState)(0),[S,C]=(0,N.useState)(0),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=[],t[1]=w):w=t[1];let[T,E]=(0,N.useState)(w),D=(0,N.useRef)(0),O=(0,N.useRef)(void 0),k=p===`sleeping`,A;t[2]!==b||t[3]!==k||t[4]!==u?(A=function(){if(k)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=D.current===0?1/0:e-D.current;D.current=e;let n=re(b,t);n===3&&u?.(),x(n),C(Te),E(oe(n)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te)},t[2]=b,t[3]=k,t[4]=u,t[5]=A):A=t[5];let j=A,ee,ne;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>()=>clearTimeout(O.current),ne=[],t[6]=ee,t[7]=ne):(ee=t[6],ne=t[7]),(0,N.useEffect)(ee,ne);let ie,ae;t[8]!==m||t[9]!==k?(ie=()=>{m===0||k||(x(3),C(we),E(oe(3)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te))},ae=[m,k],t[8]=m,t[9]=k,t[10]=ie,t[11]=ae):(ie=t[10],ae=t[11]),(0,N.useEffect)(ie,ae);let _e,be;t[12]!==k||t[13]!==f?(_e=()=>{if(!f||k||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,c=function(){s===0&&(s=requestAnimationFrame(u))},l=function(r){e=r.clientX,t=r.clientY,n=!0,c()};function u(){s=0;let l=g.current,u=h.current;if(!l||!u){c();return}let d=n;n=!1;let f=l.getBoundingClientRect(),p=f.left+f.width/2,m=f.top+f.height*.48,v=e-p,b=t-m,x=Math.hypot(v,b),S=Math.max(-1,Math.min(1,v/ue)),C=-Math.max(-1,Math.min(1,b/ue))*le,w=S*le,T=0,E=0;if(x>=1){let e=Math.min(x/ce,1)*se;T=v/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!d&&D)return;c(),r+=(C-r)*fe,i+=(w-i)*fe,u.style.transform=`perspective(${me}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*pe,o+=(E-o)*pe;let O=i*de,k=-r*de,A=a+O,j=o+k;y.current.x=A,y.current.y=j,_.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,l,{passive:!0}),c(),()=>{document.removeEventListener(`mousemove`,l),s!==0&&cancelAnimationFrame(s),s=0,h.current&&(h.current.style.transform=``),y.current={x:0,y:0},_.current?.removeAttribute(`transform`)}},be=[f,k],t[12]=k,t[13]=f,t[14]=_e,t[15]=be):(_e=t[14],be=t[15]),(0,N.useEffect)(_e,be);let xe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(xe=()=>{let e=_.current;if(!e)return;let{x:t,y:n}=y.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[16]=xe):xe=t[16],(0,N.useLayoutEffect)(xe);let I=b>0,L=I?b:1,Ee=I?`ok-blob-clicked-${b}`:null,R;t[17]===r?R=t[18]:(R=s(`ok-blob-3d-wrapper`,r),t[17]=r,t[18]=R);let De=k?`cursor-default`:`cursor-pointer`,z=`body-${S}`,Oe=k&&`ok-blob-sleeping`,B;t[19]!==Ee||t[20]!==Oe?(B=s(`ok-blob-group`,Oe,Ee),t[19]=Ee,t[20]=Oe,t[21]=B):B=t[21];let ke;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,M.jsx)(`path`,{d:c,className:`ok-blob-body`}),t[22]=ke):ke=t[22];let Ae=(I||k)&&`ok-blob-eye-hidden`,V;t[23]===Ae?V=t[24]:(V=s(`ok-blob-eye`,Ae),t[23]=Ae,t[24]=V);let H;t[25]===V?H=t[26]:(H=(0,M.jsx)(`ellipse`,{cx:he,cy:F,rx:1.2722,ry:1.9083,className:V}),t[25]=V,t[26]=H);let je=(I||k)&&`ok-blob-eye-hidden`,U;t[27]===je?U=t[28]:(U=s(`ok-blob-eye ok-blob-eye-right`,je),t[27]=je,t[28]=U);let W;t[29]===U?W=t[30]:(W=(0,M.jsx)(`ellipse`,{cx:ge,cy:F,rx:1.2722,ry:1.9083,className:U}),t[29]=U,t[30]=W);let G;t[31]===L?G=t[32]:(G=ve(he,L),t[31]=L,t[32]=G);let Me=(!I||k)&&`ok-blob-eye-hidden`,K;t[33]===Me?K=t[34]:(K=s(`ok-blob-happy-eye`,Me),t[33]=Me,t[34]=K);let q;t[35]!==G||t[36]!==K?(q=(0,M.jsx)(`path`,{d:G,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:K}),t[35]=G,t[36]=K,t[37]=q):q=t[37];let J;t[38]===L?J=t[39]:(J=ve(ge,L),t[38]=L,t[39]=J);let Ne=(!I||k)&&`ok-blob-eye-hidden`,Y;t[40]===Ne?Y=t[41]:(Y=s(`ok-blob-happy-eye`,Ne),t[40]=Ne,t[41]=Y);let X;t[42]!==J||t[43]!==Y?(X=(0,M.jsx)(`path`,{d:J,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:Y}),t[42]=J,t[43]=Y,t[44]=X):X=t[44];let Z;t[45]===k?Z=t[46]:(Z=k?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:ye(he),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,M.jsx)(`path`,{d:ye(ge),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[45]=k,t[46]=Z);let Q;t[47]!==H||t[48]!==W||t[49]!==q||t[50]!==X||t[51]!==Z?(Q=(0,M.jsxs)(`g`,{ref:_,children:[H,W,q,X,Z]}),t[47]=H,t[48]=W,t[49]=q,t[50]=X,t[51]=Z,t[52]=Q):Q=t[52];let $;t[53]!==z||t[54]!==B||t[55]!==Q?($=(0,M.jsxs)(`g`,{className:B,children:[ke,Q]},z),t[53]=z,t[54]=B,t[55]=Q,t[56]=$):$=t[56];let Pe;t[57]===k?Pe=t[58]:(Pe=k?(0,M.jsxs)(`g`,{children:[(0,M.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,M.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[57]=k,t[58]=Pe);let Fe;t[59]!==S||t[60]!==T?(Fe=T.length>0&&(0,M.jsx)(`g`,{children:T.map(Se)},`firework-${S}`),t[59]=S,t[60]=T,t[61]=Fe):Fe=t[61];let Ie;t[62]!==j||t[63]!==d||t[64]!==De||t[65]!==$||t[66]!==Pe||t[67]!==Fe?(Ie=(0,M.jsxs)(`svg`,{ref:g,width:d,height:d,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:De,"aria-hidden":`true`,onClick:j,onMouseDown:Ce,children:[$,Pe,Fe]}),t[62]=j,t[63]=d,t[64]=De,t[65]=$,t[66]=Pe,t[67]=Fe,t[68]=Ie):Ie=t[68];let Le;return t[69]!==i||t[70]!==R||t[71]!==Ie?(Le=(0,M.jsx)(`span`,{ref:h,className:R,style:i,children:Ie}),t[69]=i,t[70]=R,t[71]=Ie,t[72]=Le):Le=t[72],Le}function Se(e){return(0,M.jsx)(`circle`,{cx:be+e.originDx,cy:xe+e.originDy,r:e.size,className:`ok-blob-firework`,style:I(e)},e.id)}function Ce(e){return e.preventDefault()}function we(e){return e+1}function Te(e){return e+1}var Ee=`AlertDialog`,[R,De]=f(Ee,[E]),z=E(),Oe=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(C,{...r,...n,modal:!0})};Oe.displayName=Ee;var B=`AlertDialogTrigger`,ke=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(b,{...i,...r,ref:t})});ke.displayName=B;var Ae=`AlertDialogPortal`,V=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(w,{...r,...n})};V.displayName=Ae;var H=`AlertDialogOverlay`,je=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(y,{...i,...r,ref:t})});je.displayName=H;var U=`AlertDialogContent`,[W,G]=R(U),Me=d(`AlertDialogContent`),K=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=z(n),o=N.useRef(null),s=u(t,o),c=N.useRef(null);return(0,M.jsx)(_,{contentName:U,titleName:q,docsSlug:`alert-dialog`,children:(0,M.jsx)(W,{scope:n,cancelRef:c,children:(0,M.jsxs)(T,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:p(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,M.jsx)(Me,{children:r}),(0,M.jsx)(Pe,{contentRef:o})]})})})});K.displayName=U;var q=`AlertDialogTitle`,J=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(x,{...i,...r,ref:t})});J.displayName=q;var Ne=`AlertDialogDescription`,Y=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(v,{...i,...r,ref:t})});Y.displayName=Ne;var X=`AlertDialogAction`,Z=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(S,{...i,...r,ref:t})});Z.displayName=X;var Q=`AlertDialogCancel`,$=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=G(Q,n),a=z(n),o=u(t,i);return(0,M.jsx)(S,{...a,...r,ref:o})});$.displayName=Q;var Pe=({contentRef:e})=>{let t=`\`${U}\` requires a description for the component to be accessible for screen reader users.
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{wn as n}from"./DocumentContext-DnKfTpmg.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./mascot-outline-CtS592mc.js";import{t as l}from"./button-CA0dewJJ.js";import{a as u,r as d}from"./dist-mv8e6dBX.js";import{c as f,o as p}from"./dist-DsLZcVyZ.js";import{i as m,n as h,t as g}from"./tooltip-DHXgxWLL.js";import{_,d as v,f as y,g as b,h as x,l as S,m as C,p as w,u as T,v as E}from"./dialog-DztIj-ZS.js";import{p as D,r as O}from"./terminal-cli-display-ceeLXdxI.js";import{La as k}from"./dist-DoYGOGZp.js";import{t as A}from"./createLucideIcon-Bhw2PmPp.js";import{t as j}from"./folder-CopDpuy5.js";import{t as ee}from"./spinner-BqySY7qY.js";var M=t(),N=e(r(),1),P=o(),te=3100,ne=3;function re(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??ne;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var ie={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},ae=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function oe(e,t={}){let n=t.rng??Math.random,r=t.colors??ae,i=ie[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var se=1.8,ce=90,le=16,ue=380,de=.025,fe=.1,pe=.18,me=400,he=9.2736,ge=18.1799,F=14.5244,_e={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function ve(e,t){let{halfWidth:n,apexLift:r}=_e[t];return`M${e-n} ${F+.3} Q${e} ${F-r}, ${e+n} ${F+.3}`}function ye(e){let t=1.5,n=.3;return`M${e-t} ${F-n} Q${e} ${F+1.4}, ${e+t} ${F-n}`}var be=15,xe=15;function I(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function L(e){let t=(0,P.c)(73),{size:n,className:r,style:i,trackMouse:a,variant:o,celebrateSignal:l,onRage:u}=e,d=n===void 0?48:n,f=a===void 0?!0:a,p=o===void 0?`default`:o,m=l===void 0?0:l,h=(0,N.useRef)(null),g=(0,N.useRef)(null),_=(0,N.useRef)(null),v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={x:0,y:0},t[0]=v):v=t[0];let y=(0,N.useRef)(v),[b,x]=(0,N.useState)(0),[S,C]=(0,N.useState)(0),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=[],t[1]=w):w=t[1];let[T,E]=(0,N.useState)(w),D=(0,N.useRef)(0),O=(0,N.useRef)(void 0),k=p===`sleeping`,A;t[2]!==b||t[3]!==k||t[4]!==u?(A=function(){if(k)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=D.current===0?1/0:e-D.current;D.current=e;let n=re(b,t);n===3&&u?.(),x(n),C(Te),E(oe(n)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te)},t[2]=b,t[3]=k,t[4]=u,t[5]=A):A=t[5];let j=A,ee,ne;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>()=>clearTimeout(O.current),ne=[],t[6]=ee,t[7]=ne):(ee=t[6],ne=t[7]),(0,N.useEffect)(ee,ne);let ie,ae;t[8]!==m||t[9]!==k?(ie=()=>{m===0||k||(x(3),C(we),E(oe(3)),clearTimeout(O.current),O.current=setTimeout(()=>{x(0),E([])},te))},ae=[m,k],t[8]=m,t[9]=k,t[10]=ie,t[11]=ae):(ie=t[10],ae=t[11]),(0,N.useEffect)(ie,ae);let _e,be;t[12]!==k||t[13]!==f?(_e=()=>{if(!f||k||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,c=function(){s===0&&(s=requestAnimationFrame(u))},l=function(r){e=r.clientX,t=r.clientY,n=!0,c()};function u(){s=0;let l=g.current,u=h.current;if(!l||!u){c();return}let d=n;n=!1;let f=l.getBoundingClientRect(),p=f.left+f.width/2,m=f.top+f.height*.48,v=e-p,b=t-m,x=Math.hypot(v,b),S=Math.max(-1,Math.min(1,v/ue)),C=-Math.max(-1,Math.min(1,b/ue))*le,w=S*le,T=0,E=0;if(x>=1){let e=Math.min(x/ce,1)*se;T=v/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!d&&D)return;c(),r+=(C-r)*fe,i+=(w-i)*fe,u.style.transform=`perspective(${me}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*pe,o+=(E-o)*pe;let O=i*de,k=-r*de,A=a+O,j=o+k;y.current.x=A,y.current.y=j,_.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,l,{passive:!0}),c(),()=>{document.removeEventListener(`mousemove`,l),s!==0&&cancelAnimationFrame(s),s=0,h.current&&(h.current.style.transform=``),y.current={x:0,y:0},_.current?.removeAttribute(`transform`)}},be=[f,k],t[12]=k,t[13]=f,t[14]=_e,t[15]=be):(_e=t[14],be=t[15]),(0,N.useEffect)(_e,be);let xe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(xe=()=>{let e=_.current;if(!e)return;let{x:t,y:n}=y.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[16]=xe):xe=t[16],(0,N.useLayoutEffect)(xe);let I=b>0,L=I?b:1,Ee=I?`ok-blob-clicked-${b}`:null,R;t[17]===r?R=t[18]:(R=s(`ok-blob-3d-wrapper`,r),t[17]=r,t[18]=R);let De=k?`cursor-default`:`cursor-pointer`,z=`body-${S}`,Oe=k&&`ok-blob-sleeping`,B;t[19]!==Ee||t[20]!==Oe?(B=s(`ok-blob-group`,Oe,Ee),t[19]=Ee,t[20]=Oe,t[21]=B):B=t[21];let ke;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,M.jsx)(`path`,{d:c,className:`ok-blob-body`}),t[22]=ke):ke=t[22];let Ae=(I||k)&&`ok-blob-eye-hidden`,V;t[23]===Ae?V=t[24]:(V=s(`ok-blob-eye`,Ae),t[23]=Ae,t[24]=V);let H;t[25]===V?H=t[26]:(H=(0,M.jsx)(`ellipse`,{cx:he,cy:F,rx:1.2722,ry:1.9083,className:V}),t[25]=V,t[26]=H);let je=(I||k)&&`ok-blob-eye-hidden`,U;t[27]===je?U=t[28]:(U=s(`ok-blob-eye ok-blob-eye-right`,je),t[27]=je,t[28]=U);let W;t[29]===U?W=t[30]:(W=(0,M.jsx)(`ellipse`,{cx:ge,cy:F,rx:1.2722,ry:1.9083,className:U}),t[29]=U,t[30]=W);let G;t[31]===L?G=t[32]:(G=ve(he,L),t[31]=L,t[32]=G);let Me=(!I||k)&&`ok-blob-eye-hidden`,K;t[33]===Me?K=t[34]:(K=s(`ok-blob-happy-eye`,Me),t[33]=Me,t[34]=K);let q;t[35]!==G||t[36]!==K?(q=(0,M.jsx)(`path`,{d:G,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:K}),t[35]=G,t[36]=K,t[37]=q):q=t[37];let J;t[38]===L?J=t[39]:(J=ve(ge,L),t[38]=L,t[39]=J);let Ne=(!I||k)&&`ok-blob-eye-hidden`,Y;t[40]===Ne?Y=t[41]:(Y=s(`ok-blob-happy-eye`,Ne),t[40]=Ne,t[41]=Y);let X;t[42]!==J||t[43]!==Y?(X=(0,M.jsx)(`path`,{d:J,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:Y}),t[42]=J,t[43]=Y,t[44]=X):X=t[44];let Z;t[45]===k?Z=t[46]:(Z=k?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:ye(he),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,M.jsx)(`path`,{d:ye(ge),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[45]=k,t[46]=Z);let Q;t[47]!==H||t[48]!==W||t[49]!==q||t[50]!==X||t[51]!==Z?(Q=(0,M.jsxs)(`g`,{ref:_,children:[H,W,q,X,Z]}),t[47]=H,t[48]=W,t[49]=q,t[50]=X,t[51]=Z,t[52]=Q):Q=t[52];let $;t[53]!==z||t[54]!==B||t[55]!==Q?($=(0,M.jsxs)(`g`,{className:B,children:[ke,Q]},z),t[53]=z,t[54]=B,t[55]=Q,t[56]=$):$=t[56];let Pe;t[57]===k?Pe=t[58]:(Pe=k?(0,M.jsxs)(`g`,{children:[(0,M.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,M.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[57]=k,t[58]=Pe);let Fe;t[59]!==S||t[60]!==T?(Fe=T.length>0&&(0,M.jsx)(`g`,{children:T.map(Se)},`firework-${S}`),t[59]=S,t[60]=T,t[61]=Fe):Fe=t[61];let Ie;t[62]!==j||t[63]!==d||t[64]!==De||t[65]!==$||t[66]!==Pe||t[67]!==Fe?(Ie=(0,M.jsxs)(`svg`,{ref:g,width:d,height:d,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:De,"aria-hidden":`true`,onClick:j,onMouseDown:Ce,children:[$,Pe,Fe]}),t[62]=j,t[63]=d,t[64]=De,t[65]=$,t[66]=Pe,t[67]=Fe,t[68]=Ie):Ie=t[68];let Le;return t[69]!==i||t[70]!==R||t[71]!==Ie?(Le=(0,M.jsx)(`span`,{ref:h,className:R,style:i,children:Ie}),t[69]=i,t[70]=R,t[71]=Ie,t[72]=Le):Le=t[72],Le}function Se(e){return(0,M.jsx)(`circle`,{cx:be+e.originDx,cy:xe+e.originDy,r:e.size,className:`ok-blob-firework`,style:I(e)},e.id)}function Ce(e){return e.preventDefault()}function we(e){return e+1}function Te(e){return e+1}var Ee=`AlertDialog`,[R,De]=f(Ee,[E]),z=E(),Oe=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(C,{...r,...n,modal:!0})};Oe.displayName=Ee;var B=`AlertDialogTrigger`,ke=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(b,{...i,...r,ref:t})});ke.displayName=B;var Ae=`AlertDialogPortal`,V=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,M.jsx)(w,{...r,...n})};V.displayName=Ae;var H=`AlertDialogOverlay`,je=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(y,{...i,...r,ref:t})});je.displayName=H;var U=`AlertDialogContent`,[W,G]=R(U),Me=d(`AlertDialogContent`),K=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=z(n),o=N.useRef(null),s=u(t,o),c=N.useRef(null);return(0,M.jsx)(_,{contentName:U,titleName:q,docsSlug:`alert-dialog`,children:(0,M.jsx)(W,{scope:n,cancelRef:c,children:(0,M.jsxs)(T,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:p(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,M.jsx)(Me,{children:r}),(0,M.jsx)(Pe,{contentRef:o})]})})})});K.displayName=U;var q=`AlertDialogTitle`,J=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(x,{...i,...r,ref:t})});J.displayName=q;var Ne=`AlertDialogDescription`,Y=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(v,{...i,...r,ref:t})});Y.displayName=Ne;var X=`AlertDialogAction`,Z=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,M.jsx)(S,{...i,...r,ref:t})});Z.displayName=X;var Q=`AlertDialogCancel`,$=N.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=G(Q,n),a=z(n),o=u(t,i);return(0,M.jsx)(S,{...a,...r,ref:o})});$.displayName=Q;var Pe=({contentRef:e})=>{let t=`\`${U}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${U}\` by passing a \`${Ne}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|