geneseed 4.9.2 → 4.9.3

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 (31) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/SHIPPED.md +1 -1
  3. package/adapters/opencode/plugins/geneseed-guard.js +105 -2
  4. package/docs/concepts/enforcement-table.md +1 -1
  5. package/docs/concepts/exclusions.md +1 -2
  6. package/docs/concepts/hooks.md +2 -1
  7. package/docs/guides/upgrade.md +1 -1
  8. package/harness.config.json +1 -1
  9. package/js/hosts/hooks.mjs +13 -3
  10. package/js/hosts/loss.mjs +98 -0
  11. package/js/hosts/settings.mjs +1 -1
  12. package/js/inspect/checks-probe.mjs +1 -1
  13. package/js/inspect/diff.mjs +28 -9
  14. package/js/web/api.mjs +5 -1
  15. package/package.json +1 -1
  16. package/web/dist/assets/{Activity-D7Igwuoo.js → Activity-C8sZVIUU.js} +1 -1
  17. package/web/dist/assets/{ActivityDetail-53rp05hx.js → ActivityDetail-Cc6vWUS4.js} +1 -1
  18. package/web/dist/assets/{Dashboard-BoEH5qyY.js → Dashboard-C5ATa3ow.js} +2 -2
  19. package/web/dist/assets/{Docs-BM56RCT8.js → Docs-tDW7i7mo.js} +1 -1
  20. package/web/dist/assets/{GreenhouseView-BTMvGVco.js → GreenhouseView-zk2Uzc3A.js} +1 -1
  21. package/web/dist/assets/{Installs-Dh1tB1NK.js → Installs-CB_rvbBP.js} +3 -2
  22. package/web/dist/assets/{JournalView-F4hlWTVB.js → JournalView-Bfj27XHC.js} +1 -1
  23. package/web/dist/assets/{Laws-iEheocNI.js → Laws-BA3CzUf5.js} +1 -1
  24. package/web/dist/assets/{Library-d4_uOGmC.js → Library-BWwiy9Vb.js} +1 -1
  25. package/web/dist/assets/{Loops-BbYeWl70.js → Loops-DaPk-ckL.js} +1 -1
  26. package/web/dist/assets/{OperatorHudView-Dki9Q6W3.js → OperatorHudView-CyiGhiHk.js} +1 -1
  27. package/web/dist/assets/{Personal-B_YQJjA_.js → Personal-Bwd27CmT.js} +1 -1
  28. package/web/dist/assets/{Tabs-CAl6oFwG.js → Tabs-BOD7Kaz1.js} +1 -1
  29. package/web/dist/assets/{drawable-BdTDG5oI.js → drawable-CyLe1gtW.js} +1 -1
  30. package/web/dist/assets/{index-BZgEGRbL.js → index-DQXG_mqo.js} +2 -2
  31. package/web/dist/index.html +1 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-BoEH5qyY.js","assets/sections-BET3c1WT.js","assets/react-BOF6yL40.js","assets/api-CiXlkbe0.js","assets/Activity-D7Igwuoo.js","assets/activity-DvPxoS4Y.js","assets/usePoll-NSTzLOF4.js","assets/ActivityDetail-53rp05hx.js","assets/Library-d4_uOGmC.js","assets/Markdown-iHvBrpRN.js","assets/FilterInput-zLFXoSt6.js","assets/Loops-BbYeWl70.js","assets/Laws-iEheocNI.js","assets/Personal-B_YQJjA_.js","assets/Tabs-CAl6oFwG.js","assets/Installs-Dh1tB1NK.js","assets/Docs-BM56RCT8.js"])))=>i.map(i=>d[i]);
2
- import{i as e,n as t,r as n,s as r}from"./sections-BET3c1WT.js";import{i,n as a,r as o,t as s}from"./react-BOF6yL40.js";import{t as c}from"./api-CiXlkbe0.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=typeof window<`u`,u=l?window:null,d=l?document:null,f={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},p={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},m={NONE:0,AUTO:1,FORCE:2},h={replace:0,none:1,blend:2},g=Symbol(),_=Symbol(),v=Symbol(),y=Symbol(),b=Symbol(),x=1e-11,S=0xe8d4a51000,C=1e3,w=[],T=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),E=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],D=E.reduce((e,t)=>({...e,[t]:t+`(`}),{}),O=()=>{},ee=e=>e,k=/\)\s*[-.\d]/,te=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,ne=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,A=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,j=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,M=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,N=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,P=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,F=/([a-z])([A-Z])/g,re=/(\*=|\+=|-=)/,ie=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,ae={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:C,delay:0,loopDelay:0,ease:`out(2)`,composition:h.replace,modifier:ee,onBegin:O,onBeforeUpdate:O,onUpdate:O,onLoop:O,onPause:O,onComplete:O,onRender:O},oe={current:null,root:d},I={defaults:ae,precision:4,timeScale:1,tickThreshold:200,editor:null},se={version:`4.5.0`,engine:null};l&&(u.AnimeJS||=[],u.AnimeJS.push(se));var ce=e=>e.replace(F,`$1-$2`).toLowerCase(),L=(e,t)=>e.indexOf(t)===0,le=Date.now,ue=Array.isArray,de=e=>e&&e.constructor===Object,fe=e=>typeof e==`number`&&!isNaN(e),pe=e=>typeof e==`string`,me=e=>typeof e==`function`,R=e=>e===void 0,he=e=>R(e)||e===null,z=e=>l&&e instanceof SVGElement,ge=e=>te.test(e),_e=e=>L(e,`rgb`),ve=e=>L(e,`hsl`),ye=e=>ge(e)||(_e(e)||ve(e))&&(e[e.length-1]===`)`||!k.test(e)),be=e=>!I.defaults.hasOwnProperty(e),xe=[`opacity`,`rotate`,`overflow`,`color`],B=(e,t)=>{if(xe.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},Se=e=>pe(e)?parseFloat(e):e,Ce=Math.pow,we=Math.sqrt,Te=Math.sin,Ee=Math.cos,De=Math.abs,Oe=Math.floor,ke=Math.asin,Ae=Math.PI,je=Math.round,Me=(e,t,n)=>e<t?t:e>n?n:e,V=(e,t)=>{if(t<0)return e;if(!t)return je(e);let n=10**t;return je(e*n)/n},Ne=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,Pe=e=>e===1/0?S:e===-1/0?-S:e,Fe=e=>e<=1e-11?x:Pe(V(e,11)),H=e=>ue(e)?[...e]:e,Ie=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=R(i)?t[r]:i}return n},U=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Le=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},Re=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},ze=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[y],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!R(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:L(t,`scale`)?`1`:L(t,`rotate`)||L(t,`skew`)?`0deg`:`0px`},Be=e=>{let t=``;for(let n=0,r=E.length;n<r;n++){let r=E[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${D[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Ve=[];function He(e,t){if(!e)return null;let n=Ve.length;outer:for(let r=0;r<n;r++){let n=Ve[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=Ve[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Ue=e=>{let t=ne.exec(e)||A.exec(e),n=R(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},We=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},Ge=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Ke=e=>{let t=j.exec(e)||M.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=R(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=V(Ge(t,e,n+1/3)*255,0),s=V(Ge(t,e,n)*255,0),c=V(Ge(t,e,n-1/3)*255,0)}return[o,s,c,a]},qe=e=>_e(e)?Ue(e):ge(e)?We(e):ve(e)?Ke(e):[0,0,0,1],W=(e,t)=>R(e)?t:e,Je=(e,t)=>{let n=e.match(ie),r=t[_]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},Ye=(e,t,n,r,i,a)=>{if(me(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(pe(e)&&L(e,`var(`)){if(!i)return Je(e,t);let n=()=>Je(e,t);return i.func=n,n()}return e},Xe=(e,t)=>e[_]?e[v]&&B(e,t)?f.ATTRIBUTE:E.includes(t)||T.get(t)?f.TRANSFORM:L(t,`--`)?f.CSS_VAR:t in e.style?f.CSS:t in e?f.OBJECT:f.ATTRIBUTE:f.OBJECT,Ze=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[b]||e).getPropertyValue(t);return i===`auto`?`0`:i},Qe=(e,t,n,r)=>{let i=R(n)?Xe(e,t):n,a=He(e,t);if(a){let n=a.get(e);return n&&r&&(r[t]=n),n??0}if(i===f.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===f.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===f.TRANSFORM?ze(e,t,r):i===f.CSS_VAR?Ze(e,t,r).trimStart():Ze(e,t,r)},$e=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,et=()=>({t:p.NUMBER,n:0,u:null,o:null,d:null,s:null}),G=(e,t)=>{if(t.t=p.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&P.exec(r);if(i)return t.t=p.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(ye(r))return t.t=p.COLOR,t.d=qe(r),t;{let e=r.match(N);return t.t=p.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(N)||[],t}},tt=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=H(e._toNumbers),t.s=H(e._strings),t),nt=et(),rt=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(V(Ne(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},it=(e,t,n,r,i)=>{let a=e.parent,o=e.duration,s=e.completed,c=e.iterationDuration,l=e.iterationCount,u=e._currentIteration,d=e._loopDelay,g=e._reversed,_=e._alternate,v=e._hasChildren,b=e._delay,S=e._currentTime,C=b+c,w=t-b,T=Me(S,-b,o),E=Me(w,-b,o),D=w-S,O=E>0,ee=E>=o,k=o<=x,te=i===m.FORCE,ne=0,A=w,j=0;if(l>1){let t=c+(ee?0:d),n=~~(E/t);e._currentIteration=Me(n,0,l),ee&&e._currentIteration--,ne=e._currentIteration%2,A=E-n*t||0}let M=g^(_&&ne),N=e._ease,P=ee?M?0:o:M?c-A:A;N&&(P=c*N(P/c)||0);let F=(a?a.backwards:w<S)?!M:!!M;if(e._currentTime=w,e._iterationTime=P,e.backwards=F,O&&!e.began?(e.began=!0,!n&&(!a||!F&&a.began)&&e.onBegin(e)):w<=0&&(e.began=!1),!n&&!v&&O&&e._currentIteration!==u&&e.onLoop(e),te||i===m.AUTO&&(t>=(a&&b>0?0:b)&&t<=C||t<=b&&T>b||t>=C&&T!==o)||P>=C&&T!==o||P<=b&&T>0&&!ee||t<=T&&T===o&&s||ee&&!s&&k){if(O&&(e.computeDeltaTime(T),n||e.onBeforeUpdate(e)),!v){let t=te||(F?D*-1:D)>=I.tickThreshold,i=V(e._offset+(a?a._offset:0)+b+P,12),o=e._head,s,c,l,u,d=0;for(;o;){let e=o._composition,n=o._currentTime,a=o._changeDuration,m=o._absoluteStartTime+o._changeDuration,g=o._nextRep,_=o._prevRep,v=e!==h.none,b=_?_._absoluteStartTime+_._changeDuration:0,x=_&&_.parent!==o.parent,S=!g||g._isOverridden?m:g.parent===o.parent?m+g._delay:g._absoluteStartTime<g._absoluteUpdateStartTime?g._absoluteStartTime:g._absoluteUpdateStartTime;if((t||(n!==a||i<=S||_&&!x&&(!g||g.parent!==o.parent))&&(n!==0||i>=o._absoluteStartTime||x&&!o._hasFromValue&&!_._isOverridden&&i>=b||g&&!g._isOverridden&&g.parent===o.parent&&g._currentTime!==0&&P<g._startTime))&&(!_||x||P>=o._startTime)&&(!v||!o._isOverridden&&(!o._isOverlapped||i<=m)&&(!g||g._isOverridden||i<=S)&&(!_||_._isOverridden||(x?i>=o._absoluteStartTime||!o._hasFromValue&&i>=b:i>=b+o._delay)))){let t=o._currentTime=Me(P-o._startTime,0,a),n=o._ease(t/o._updateDuration),i=o._modifier,m=o._valueType,g=o._tweenType,_=g===f.OBJECT,b=m===p.NUMBER,x=b&&_||n===0||n===1?-1:I.precision,S,C;if(b)S=C=i(V(Ne(o._fromNumber,o._toNumber,n),x));else if(m===p.UNIT)C=i(V(Ne(o._fromNumber,o._toNumber,n),x)),S=`${C}${o._unit}`;else if(m===p.COLOR){let e=o._numbers,t=o._fromNumbers,a=o._toNumbers,s=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*s+d*d*n)),e[1]=i(Math.sqrt(l*l*s+f*f*n)),e[2]=i(Math.sqrt(u*u*s+p*p*n)),e[3]=i(Ne(t[3],a[3],n)),(!o._setter||r)&&(S=`rgba(${V(e[0],0)},${V(e[1],0)},${V(e[2],0)},${e[3]})`)}else m===p.COMPLEX&&(S=rt(o,n,x));if(v&&(o._number=C),!r&&e!==h.blend){let e=o.property;s=o.target,o._setter?o._setter(s,C,o):_?s[e]=S:g===f.ATTRIBUTE?s.setAttribute(e,S):(c=s.style,g===f.TRANSFORM?(s!==l&&(l=s,u=s[y]),u[e]=S,d=1):g===f.CSS?c[e]=S:g===f.CSS_VAR&&c.setProperty(e,S)),O&&(j=1)}else o._value=S}else n&&_&&!x&&P<o._startTime&&(o._currentTime=0);d&&o._renderTransforms&&(c.transform=Be(u),d=0),o=o._next}!n&&j&&e.onRender(e)}!n&&O&&e.onUpdate(e)}return a&&k?!n&&(a.began&&!F&&w>0&&!s||F&&w<=1e-11&&s)&&(e.onComplete(e),e.completed=!F):O&&ee?l===1/0?e._startTime+=e.duration:e._currentIteration>=l-1&&(e.paused=!0,!s&&!v&&(e.completed=!0,!n&&(!a||!F&&a.began)&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,j},at=(e,t,n,r,i)=>{let a=e._currentIteration;if(it(e,t,n,r,i),e._hasChildren){let o=e,s=o.backwards,c=r?t:o._iterationTime,l=le(),u=0,d=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;U(o,t=>{if(!s)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&it(t,e,n,1,m.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}U(o,e=>{let t=V((c-e._offset)*e._speed,12);if(s&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(l):i;u+=it(e,t,n,r,a),!e.completed&&d&&(d=!1)},s),!n&&u&&o.onRender(o),(d||s)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},ot={},st=(e,t,n)=>{if(n===f.TRANSFORM)return T.get(e)||e;if(n===f.CSS||n===f.ATTRIBUTE&&z(t)&&e in t.style){let t=ot[e];if(t)return t;{let t=e&&ce(e);return ot[e]=t,t}}return e},ct=(e,t=!1)=>{if(e._hasChildren)U(e,e=>ct(e,t),!0);else{let n=e;n.pause(),U(n,e=>{let r=e.property,i=e.target,a=e._tweenType,o=e._inlineValue,s=he(o)||o===``;if(e._setter){if(!t&&!s){if(G(o,nt),nt.d){let t=nt.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=nt.n;e._setter(e.target,e._number,e)}}else if(a===f.OBJECT)!t&&!s&&(i[r]=o);else if(i[_]){if(a===f.ATTRIBUTE)t||(s?i.removeAttribute(r):i.setAttribute(r,o));else{let t=i.style;if(a===f.TRANSFORM){let n=i[y];s?delete n[r]:n[r]=o,e._renderTransforms&&(Object.keys(n).length?t.transform=Be(n):t.removeProperty(`transform`))}else s?t.removeProperty(ce(r)):t[r]=o}}i[_]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},lt=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=C/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?x:t,r=C/n;n>ae.frameRate&&(ae.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?x:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?m.NONE:(this._lastTickTime=n>=t?e-n%t:e,m.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},ut={animation:null,update:O},dt=e=>{let t=ut.animation;return t||(t={duration:x,computeDeltaTime:O,_offset:0,_delay:0,_head:null,_tail:null},ut.animation=t,ut.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===p.COMPLEX||e===p.COLOR?H(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),it(t,1,1,0,m.FORCE)}),t},ft=l?requestAnimationFrame:setImmediate,pt=l?cancelAnimationFrame:clearImmediate,mt=class extends lt{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=ae,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=le();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Le(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):at(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):m.AUTO),r=i}ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(le()),this.reqId=ft(ht)),this}pause(){if(this.reqId)return this.paused=!0,gt()}resume(){if(this.paused)return this.paused=!1,U(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(I.timeScale===1?1:C)}set speed(e){let t=e*I.timeScale;this._speed!==t&&(this._speed=t,U(this,e=>e.speed=e._speed))}get timeUnit(){return I.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(I.timeScale!==r){I.timeScale=r,I.tickThreshold=200*r;let e=n?t:C;this.defaults.duration*=e,this._speed*=e}}get precision(){return I.precision}set precision(e){I.precision=e}},K=(()=>{let e=new mt(le());return l&&(se.engine=e,d.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(d.hidden?e.pause():e.resume())})),e})(),ht=()=>{K._head?(K.reqId=ft(ht),K.update()):K.reqId=0},gt=()=>(pt(K.reqId),K.reqId=0,K),_t={_rep:new WeakMap,_add:new Map},vt=(e,t,n=`_rep`)=>{let r=_t[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},yt=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,bt=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=x,e._currentTime=x},xt=(e,t)=>{let n=e._composition;if(n===h.replace){let n=e._absoluteStartTime;Re(t,e,yt,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){bt(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)bt(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=V(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&bt(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(U(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;U(e,e=>{e!==t&&U(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===h.blend){let t=vt(e.target,e.property,`_add`),n=dt(_t._add),r=t._head;r||(r={...e},r._composition=h.replace,r._updateDuration=x,r._startTime=0,r._numbers=H(e._fromNumbers),r._number=0,r._next=null,r._prev=null,Re(t,r),Re(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=H(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=H(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}Re(t,e,null,`_prevAdd`,`_nextAdd`)}return e},St=e=>{let t=e._composition;if(t!==h.none){let n=e.target,r=e.property,i=_t._rep.get(n)[r];if(Le(i,e,`_prevRep`,`_nextRep`),t===h.blend){let t=_t._add,i=t.get(n);if(!i)return;let a=i[r],o=ut.animation;Le(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Le(a,s,`_prevAdd`,`_nextAdd`),Le(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},Ct=(e,t,n)=>{let r=!1;return U(t,i=>{let a=i.target;if(e.includes(a)){let e=i.property,o=i._tweenType,s=st(n,a,o);(!s||s&&s===e)&&(i.parent._tail===i&&i._tweenType===f.TRANSFORM&&i._prev&&i._prev._tweenType===f.TRANSFORM&&(i._prev._renderTransforms=1),Le(t,i),St(i),r=!0)}},!0),r},wt=(e,t,n)=>{let r=t||K,i;if(r._hasChildren){let t=0;U(r,a=>{if(!a._hasChildren){if(i=Ct(e,a,n),i&&!a._head)a.cancel(),Le(r,a);else{let e=a._offset+a._delay+a.duration;e>t&&(t=e)}}a._head?wt(e,a,n):a._hasChildren=!1},!0),R(r.iterationDuration)||(r.iterationDuration=t)}else i=Ct(e,r,n);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},Tt=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Et=e=>e._cancelled?(e._hasChildren?U(e,Et):U(e,e=>{e._composition!==h.none&&xt(e,vt(e.target,e.property))}),e._cancelled=0,e):e,Dt=0,Ot=(e,t)=>e._priority>t._priority,kt=class extends lt{constructor(e={},t=null,n=0){super(0),++Dt;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;oe.current&&oe.current.register(this);let b=t?0:K._lastTickTime,x=t?t.defaults:I.defaults,S=me(i)||R(i)?x.delay:+i,C=me(a)||R(a)?1/0:+a,w=W(c,x.loop),T=W(l,x.loopDelay),E=w===!0||w===1/0||w<0?1/0:w+1,D=0;t?D=n:(K.reqId||K.requestTick(le()),D=(K._lastTickTime-K._startTime)*I.timeScale),this.id=R(r)?Dt:r,this.parent=t,this.duration=Pe((C+T)*E-T)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=h||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=C,this.iterationCount=E,this._autoplay=!t&&W(u,x.autoplay),this._offset=D,this._delay=S,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=O,this._running=!1,this._reversed=+W(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=W(s,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=W(d,x.frameRate),this._speed=W(f,x.playbackRate),this._priority=+W(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Me(V(this._currentTime,I.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Me(V(this._iterationTime,I.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Me(V(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Me(V(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Me(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return Et(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,at(this,0,1,~~e,m.FORCE),Tt(this),this._hasChildren&&U(this,Tt),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&at(this,this.duration,1,~~e,m.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!R(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*K._speed);return this._startTime=le()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?at(this,x,0,0,m.FORCE):(this._running||=(Re(K,this,Ot),K._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,K.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){Et(this),this.completed=!1;let r=this.paused;return this.paused=!0,at(this,e+this._delay,~~t,~~n,m.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Oe(S/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?U(this,e=>e.cancel(),!0):U(this,St),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=Fe(e);if(t===n)return this;let r=e/t,i=e<=x;return this.duration=i?x:n,this.iterationDuration=i?x:Fe(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){at(this,0,1,0,m.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=O){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=O};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function At(e){let t=pe(e)?oe.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function jt(e){if(he(e))return[];if(!l)return ue(e)&&e.flat(1/0)||[e];if(ue(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!he(r)){let e=At(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!he(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=At(e);return t?Array.from(t):[e]}function Mt(e){let t=jt(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[g]){n[g]=!0;let e=z(n);(n.nodeType||e)&&(n[_]=!0,n[v]=e,n[y]={})}}return t}var Nt={deg:1,rad:180/Ae,turn:360},Pt={},Ft=(e,t,n,r=!1)=>{let i=t.u,a=t.n;if(t.t===p.UNIT&&i===n)return t;let o=a+i+n,s=Pt[o];if(!R(s)&&!r)t.n=s;else{let r;if(i in Nt)r=a*Nt[i]/Nt[n];else{let t=e.cloneNode(),o=e.parentNode,s=o&&o!==d?o:d.body;s.appendChild(t);let c=t.style;c.width=100+i;let l=t.offsetWidth||100;c.width=100+n;let u=l/(t.offsetWidth||100);s.removeChild(t),r=u*a}t.n=r,Pt[o]=r}return t.t,p.UNIT,t.u=n,t},It=e=>e,Lt=(e=1.68)=>t=>Ce(t,+e),Rt={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},zt=Ae/2,Bt=Ae*2,Vt={"":Lt,Quad:Lt(2),Cubic:Lt(3),Quart:Lt(4),Quint:Lt(5),Sine:e=>1-Ee(e*zt),Circ:e=>1-we(1-e*e),Expo:e=>e?Ce(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Ce(2,--n))-1)/11;);return 1/Ce(4,3-n)-7.5625*Ce((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=Me(+e,1,10),r=Me(+t,x,2),i=r/Bt*ke(1/n),a=Bt/r;return e=>e===0||e===1?e:-n*Ce(2,-10*(1-e))*Te((1-e-i)*a)}},Ht=(()=>{let e={linear:It,none:It};for(let t in Rt)for(let n in Vt){let r=Vt[n],i=Rt[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),Ut={linear:It,none:It},Wt=e=>{if(Ut[e])return Ut[e];if(e.indexOf(`(`)<=-1){let t=Rt[e]||e.includes(`Back`)||e.includes(`Elastic`)?Ht[e]():Ht[e];return t?Ut[e]=t:It}{let t=e.slice(0,-1).split(`(`),n=Ht[t[0]];return n?Ut[e]=n(...t[1].split(`,`)):It}},Gt=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],Kt=e=>{if(pe(e)){for(let t=0,n=Gt.length;t<n;t++)if(L(e,Gt[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),It}return me(e)?e:pe(e)?Wt(e):It},q=et(),J=et(),qt={},Jt={func:null},Yt={func:null},Xt=[null],Zt=[null,null],Qt={to:null},$t=0,en=0,tn,nn,rn=(e,t)=>{let n={};if(ue(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(be);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];be(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=W(t.duration,I.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(be(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},an=class extends kt{constructor(e,t,n,r,i=!1,a=0,o){super(t,n,r),this._head,this._tail,++en;let s=Mt(e),c=s.length,l=t.keyframes,u=l?Ie(rn(l,t),t):t,{id:d,delay:m,duration:g,ease:_,playbackEase:v,modifier:y,composition:b,onRender:S}=u,C=n?n.defaults:I.defaults,T=W(_,C.ease),E=W(v,C.playbackEase),D=E?Kt(E):null,O=!R(T.ease),ee=O?T.ease:W(_,D?`linear`:C.ease),k=O?T.settlingDuration:W(g,C.duration),te=W(m,C.delay),ne=y||C.modifier,A=R(b)&&c>=1e3?h.none:R(b)?C.composition:b,j=this._offset+(n?n._offset:0);O&&(T.parent=this);let M=NaN,N=NaN,P=0,F=0;for(let e=0;e<c;e++){let t=s[e],r=a||e,c=o||s,l=NaN,d=NaN;for(let e in u)if(be(e)){let a=Xe(t,e),o=He(t,e),s=st(e,t,a),m=u[e],g=ue(m);if(i&&!g&&(Zt[0]=m,Zt[1]=m,m=Zt),g){let e=m.length,t=!de(m[0]);e===2&&t?(Qt.to=m,Xt[0]=Qt,tn=Xt):e>2&&t?(tn=[],m.forEach((e,t)=>{t?t===1?(Zt[1]=e,tn.push(Zt)):tn.push(e):Zt[0]=e})):tn=m}else Xt[0]=m,tn=Xt;let _=null,v=null,y=NaN,b=0,x=0;for(let e=tn.length;x<e;x++){let i=tn[x];de(i)?nn=i:(Qt.to=i,nn=Qt),Jt.func=null,Yt.func=null;let l=Ye(W(nn.composition,A),t,r,c,null,null),u=fe(l)?l:h[l];!_&&u!==h.none&&(_=vt(t,s));let d=_?_._tail:null,f=n&&d&&d.parent.parent===n?d:v,m=Ye(nn.to,t,r,c,Jt,f),g;de(m)&&!R(m.to)?(nn=m,g=m.to):g=m;let S=Ye(nn.from,t,r,c,Yt,f),C=nn.ease||ee,T=Ye(C,t,r,c,null,f),E=me(T)||pe(T)?T:C,D=!R(E)&&!R(E.ease),O=D?E.ease:E,M=D?E.settlingDuration:Ye(W(nn.duration,e>1?Ye(k,t,r,c,null,f)/e:k),t,r,c,null,f),N=Ye(W(nn.delay,x?0:te),t,r,c,null,f),re=nn.modifier||ne,ie=!R(S),ae=!R(g),oe=ue(g),I=oe||ie&&ae,se=v?b:0,ce=v?b+N:N,L=V(j+ce,12),le=V(j+se,12);!F&&(ie||oe)&&(F=1);let z=v;if(u!==h.none){let e=_._head;for(;e&&e._absoluteStartTime<=L;)if(e._isOverridden||(z=e),e=e._nextRep,e&&e._absoluteStartTime>=L)for(;e;)bt(e),e=e._nextRep}if(I){G(oe?Ye(g[0],t,r,c,Yt,f):S,q),G(oe?Ye(g[1],t,r,c,Jt,f):g,J);let e=Qe(t,s,a,qt);q.t===p.NUMBER&&(z?z._valueType===p.UNIT&&(q.t=p.UNIT,q.u=z._unit):(G(e,nt),nt.t===p.UNIT&&(q.t=p.UNIT,q.u=nt.u)))}else ae?G(g,J):v?tt(v,J):G(n&&z&&z.parent.parent===n?z._value:Qe(t,s,a,qt),J),ie?G(S,q):v?tt(v,q):G(n&&z&&z.parent.parent===n?z._value:Qe(t,s,a,qt),q);if(q.o&&(q.n=$e(z?z._toNumber:G(Qe(t,s,a,qt),nt).n,q.n,q.o)),J.o&&(J.n=$e(q.n,J.n,J.o)),q.t!==J.t){if(q.t===p.COMPLEX||J.t===p.COMPLEX){let e=q.t===p.COMPLEX?q:J,t=q.t===p.COMPLEX?J:q;t.t=p.COMPLEX,t.s=H(e.s),t.d=e.d.map(()=>t.n)}else if(q.t===p.UNIT||J.t===p.UNIT){let e=q.t===p.UNIT?q:J,t=q.t===p.UNIT?J:q;t.t=p.UNIT,t.u=e.u}else if(q.t===p.COLOR||J.t===p.COLOR){let e=q.t===p.COLOR?q:J,t=q.t===p.COLOR?J:q;t.t=p.COLOR,t.d=e.d.map(()=>0)}}if(q.u!==J.u){let e=J.u?q:J;e=Ft(t,e,J.u?J.u:q.u,!1)}if(J.d&&q.d&&J.d.length!==q.d.length){let e=q.d.length>J.d.length?q:J,t=e===q?J:q;t.d=e.d.map((e,n)=>R(t.d[n])?0:t.d[n]),t.s=H(e.s)}let ge=V(+M||1e-11,12),_e=qt[s];he(_e)||(qt[s]=null);let ve=o?o.set:null;b=V(ce+ge,12);let ye=q.d,be=J.d,xe=J.s,B={parent:this,id:$t++,property:s,target:t,_value:null,_toFunc:Jt.func,_fromFunc:Yt.func,_ease:Kt(O),_fromNumbers:ye?H(ye):w,_toNumbers:be?H(be):w,_strings:xe?H(xe):w,_fromNumber:q.n,_toNumber:J.n,_numbers:ye?H(ye):w,_number:q.n,_unit:J.u,_modifier:re,_currentTime:0,_startTime:ce,_delay:+N,_updateDuration:ge,_changeDuration:ge,_absoluteStartTime:L,_absoluteUpdateStartTime:le,_absoluteEndTime:V(j+b,12),_hasFromValue:ie||oe?1:0,_tweenType:a,_setter:ve,_valueType:J.t,_composition:u,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:_e,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};u!==h.none&&xt(B,_);let Se=B._valueType;if(Se===p.COMPLEX)B._value=rt(B,1,-1);else if(Se===p.UNIT)B._value=`${re(B._toNumber)}${B._unit}`;else if(Se===p.COLOR){let e=J.d;B._value=`rgba(${V(e[0],0)},${V(e[1],0)},${V(e[2],0)},${e[3]})`}else B._value=re(B._toNumber);isNaN(y)&&(y=B._startTime),v=B,P++,Re(this,B)}(isNaN(N)||y<N)&&(N=y),(isNaN(M)||b>M)&&(M=b),a===f.TRANSFORM&&(l=P-x,d=P)}if(!isNaN(l)){let e=0;U(this,t=>{e>=l&&e<d&&(t._renderTransforms=1,t._composition===h.blend&&U(ut.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),N?(U(this,e=>{e._startTime-e._delay||(e._delay-=N),e._startTime-=N}),M-=N):N=0,M||(M=x,this.iterationCount=0),this.targets=s,this.id=R(d)?en:d,this.duration=M===1e-11?x:Pe((M+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||C.onRender,this._ease=D,this._delay=N,this.iterationDuration=M,!this._autoplay&&F&&this.onRender(this)}stretch(e){let t=this.duration;if(t===Fe(e))return this;let n=e/t;return U(this,e=>{e._updateDuration=Fe(e._updateDuration*n),e._changeDuration=Fe(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return U(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(G(n(),q),q.u!==e._unit&&e.target[_]&&Ft(e.target,q,e._unit,!0),e._fromNumbers=H(q.d),e._fromNumber=q.n):t&&(G(Qe(e.target,e.property,e._tweenType),nt),e._fromNumbers=H(nt.d),e._fromNumber=nt.n),t&&(G(t(),J),e._toNumbers=H(J.d),e._strings=H(J.s),e._toNumber=J.o?$e(e._fromNumber,J.n,J.o):J.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),ct(this)}then(e){return super.then(e)}},on=(e,t)=>I.editor?I.editor.addAnimation(e,t):new an(e,t,null,0,!1).init(),sn=(e,t)=>{if(L(t,`<`)){let n=t[1]===`<`,r=e._tail,i=r?r._offset+r._delay:0;return n?i:i+r.duration}},cn=(e,t)=>{let n=e.iterationDuration;if(n===1e-11&&(n=0),R(t))return n;if(fe(+t))return+t;let r=t,i=e?e.labels:null,a=!he(i),o=sn(e,r),s=!R(o),c=re.exec(r);if(c){let e=c[0],t=r.split(e),l=a&&t[0]?i[t[0]]:n;return $e(s?o:a?l:n,+t[1],e[0])}return s?o:a?R(i[r])?n:i[r]:n},ln=(e,t)=>{if(!R(t))return I.editor&&I.editor.addSet?I.editor.addSet(e,t):(t.duration=x,t.composition=W(t.composition,h.none),new an(e,t,null,0,!0).resume())},un=(e=0,t=1,n=0)=>{let r=10**n;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},dn=0,fn=(e,t=0,n=1,r=0)=>{let i=e===void 0?dn++:e;return(e=t,a=n,o=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);let s=10**o;return Math.floor((((i^i>>>14)>>>0)/4294967296*(a-e+1/s)+e)*s)/s}},pn=(e,t=un)=>{let n=e.length,r,i;for(;n;)i=t(0,--n),r=e[n],e[n]=e[i],e[i]=r;return e},mn=(e,t={})=>{let n=[],r=0,i,a=null,o=t.from,s=t.reversed,c=t.ease,l=!R(c),u=l&&!R(c.ease)?c.ease:l?Kt(c):null,d=t.grid,f=d===!0,p=t.axis,m=t.total,h=R(o)||o===0||o===`first`,g=o===`center`,_=o===`last`,v=o===`random`,y=ue(o),b=ue(e),x=t.use,S=Se(b?e[0]:e),C=b?Se(e[1]):0,w=P.exec((b?e[1]:e)+``),T=t.start||0+(b?S:0),E=t.seed,D=!R(E)&&E!==!1?fn(E===!0?0:E):un,O=t.jitter,ee=!R(O),k=ue(O),te=k?O[0]:O||0,ne=k?O[1]:O||0,A=h?0:fe(o)?o:0;return(e,c,l,h,E)=>{let[O]=Mt(e),k=R(m)?l.length:m,j=R(x)?!1:me(x)?x(O,c,k):Qe(O,x),M=fe(j)||pe(j)&&fe(+j)?+j:c,N=M>=0&&M<k?M:c;if(g&&(A=(k-1)/2),_&&(A=k-1),!n.length){if(f){let e=!0,t=!1,r=1/0,i=1/0,a=1/0,s=-1/0,c=-1/0,u=-1/0,d=[],f=[],m=[];for(let n=0;n<k;n++){let o=l[n],p=0,h=0,g=0,_=!1;if(o&&me(o.getBoundingClientRect)){let e=o.getBoundingClientRect();p=e.left+e.width/2,h=e.top+e.height/2,_=!0}else{let e=o;e&&fe(e.x)&&fe(e.y)&&(p=e.x,h=e.y,fe(e.z)&&(g=e.z,t=!0),_=!0)}if(!_){e=!1;break}d.push(p),f.push(h),m.push(g),p<r&&(r=p),h<i&&(i=h),g<a&&(a=g),p>s&&(s=p),h>c&&(c=h),g>u&&(u=g)}if(e){let e=d[0],l=f[0],h=m[0];y?(e=r+o[0]*(s-r),l=i+o[1]*(c-i),h=t?a+(o.length>=3?o[2]:.5)*(u-a):0):g?(e=(r+s)/2,l=(i+c)/2,h=(a+u)/2):_?(e=d[k-1],l=f[k-1],h=m[k-1]):fe(o)&&(e=d[o],l=f[o],h=m[o]);for(let r=0;r<k;r++){let i=e-d[r],a=l-f[r],o=h-m[r],s=we(i*i+a*a+(t?o*o:0));p===`x`&&(s=-i),p===`y`&&(s=-a),p===`z`&&(s=-o),n.push(s)}let v=1/0;for(let e=0;e<k;e++){let t=De(n[e]);t>0&&t<v&&(v=t)}if(v>0&&v<1/0)for(let e=0;e<k;e++)n[e]=n[e]/v}else for(let e=0;e<k;e++)n.push(De(A-e))}else for(let e=0;e<k;e++)if(!d)n.push(De(A-e));else{let t=d.length,r=d[0]*d[1],i,a,s;y?(i=o[0]*(d[0]-1),a=o[1]*(d[1]-1),s=t===3?(o.length>=3?o[2]:.5)*(d[2]-1):0):g?(i=(d[0]-1)/2,a=(d[1]-1)/2,s=t===3?(d[2]-1)/2:0):(i=A%d[0],a=Oe(A/d[0])%d[1],s=t===3?Oe(A/r):0);let c=e%d[0],l=Oe(e/d[0])%d[1],u=t===3?Oe(e/r):0,f=i-c,m=a-l,h=s-u,_=we(f*f+m*m+(t===3?h*h:0));p===`x`&&(_=-f),p===`y`&&(_=-m),p===`z`&&(_=-h),n.push(_)}r=n[0];for(let e=1;e<k;e++)n[e]>r&&(r=n[e]);if(u||s)for(let e=0;e<k;e++){let t=n[e];u&&(t=u(t/r)*r),s&&(t=p?-t:De(r-t)),n[e]=t}if(ee){a=Array(k);for(let e=0;e<k;e++)a[e]=D(-1,1,4)}v&&(n=pn(n,D))}let P=b?(C-S)/r:S;R(i)&&(i=E?cn(E,R(t.start)?E.iterationDuration:T):T);let F=i+(P*V(n[N],2)||0);if(ee){let e=r?n[N]/r:0,t=te+(ne-te)*e;F+=a[N]*t}return t.modifier&&(F=t.modifier(F)),w&&(F=`${F}${w[2]}`),F}},hn=o(),gn=a(),Y=r(i(),1);function _n(){return typeof window>`u`||!window.matchMedia?!1:!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function vn(e,t){let n=setTimeout(()=>e.complete(),t+400);return()=>{clearTimeout(n),e.complete()}}function yn(e,t=700){let n=typeof e==`number`&&Number.isFinite(e)?e:null,r=n!==null&&_n(),[i,a]=(0,Y.useState)(0),o=(0,Y.useRef)(0);return(0,Y.useEffect)(()=>{if(!r)return;let e={n:o.current},i=on(e,{n,duration:t,ease:`outExpo`,onUpdate:()=>{o.current=e.n,a(e.n)},onComplete:()=>{o.current=n,a(n)}}),s=setTimeout(()=>i.complete(),t+400);return()=>{clearTimeout(s),i.pause()}},[n,t,r]),r?i:n}function bn({value:e,duration:t}){let n=yn(e,t);return n===null?e??null:Math.round(n)}function xn(e){let t=(0,Y.useRef)(null),n=(0,Y.useRef)(null),r=(0,Y.useRef)(()=>{}),i=(0,Y.useRef)(null);return(0,Y.useLayoutEffect)(()=>{let a=t.current,o=a?.querySelector(`:scope > .glide`);o&&(r.current=t=>{let r=a.querySelector(e);if(!r){o.style.opacity=`0`,n.current=null;return}let s=a.getBoundingClientRect(),c=r.getBoundingClientRect(),l={translateX:c.left-s.left+a.scrollLeft-a.clientLeft,translateY:c.top-s.top+a.scrollTop-a.clientTop,width:c.width,height:c.height},u=n.current;if(n.current={el:r,...l},!(u&&u.el===r&&[`translateX`,`translateY`,`width`,`height`].every(e=>Math.abs(u[e]-l[e])<.5))){if(o.style.opacity=`1`,i.current&&=(clearTimeout(i.current.t),i.current.anim.pause(),null),t&&u&&u.el!==r&&_n()){let e=on(o,{...l,duration:280,ease:`outExpo`});i.current={anim:e,t:setTimeout(()=>e.complete(),680)}}else ln(o,l)}},r.current(!0))}),(0,Y.useEffect)(()=>{let e=()=>r.current(!1);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),t}function Sn(){let e=(0,Y.useRef)(null),t=(0,Y.useRef)(null);return(0,Y.useLayoutEffect)(()=>{let n=e.current;if(!n){t.current=null;return}let r=[...n.querySelectorAll(`:scope > [data-flip]`)],i=new Map(r.map(e=>[e.dataset.flip,e.offsetTop])),a=t.current;if(t.current=i,a&&_n())for(let e of r){let t=a.get(e.dataset.flip);t===void 0?vn(on(e,{opacity:[0,1],translateY:[-12,0],duration:340,ease:`outExpo`}),340):Math.abs(t-i.get(e.dataset.flip))>1&&vn(on(e,{translateY:[t-i.get(e.dataset.flip),0],duration:340,ease:`outExpo`}),340)}}),e}var Cn={overview:`Overview`,laws:`Constitution`,library:`Library`,loops:`Loops`,personal:`Personal`,installs:`Installs`,docs:`Docs`,activity:`Activity`},wn={loops:[`templates`,`bricks`,`active`],personal:[`rules`,`profile`,`memory`,`notebook`],installs:[`hosts`,`edits`,`doctor`,`server`]},Tn={templates:`Templates`,bricks:`Bricks`,active:`Active`,rules:`Rules`,profile:`Profile`,memory:`Memory`,notebook:`Notebook`,hosts:`Hosts`,edits:`Local edits`,doctor:`Doctor`,server:`Server`},En={dashboard:[`overview`],constitution:[`laws`],rules:[`personal`,`rules`],profile:[`personal`,`profile`],harness:[`installs`,`hosts`],harnesses:[`installs`,`hosts`],themes:[`installs`,`hosts`],diff:[`installs`,`edits`],doctor:[`installs`,`doctor`],settings:[`installs`,`server`],about:[`installs`,`server`]},Dn=(e,t)=>t!==void 0&&Object.hasOwn(e,t),On=(e,t)=>wn[e].includes(t)?t:wn[e][0];function kn(t){let n=(t||`#/`).slice(2).split(`/`).filter(Boolean),[r,i,a]=n,o=e=>decodeURIComponent(e||``);if(r===`section`||r===`item`){let t=r===`item`&&Dn(e,i)?e[i]:i,n=r===`item`?o(a):void 0;return{page:t===`laws`?`laws`:`library`,section:t,item:n}}if(r===`docs`)return{page:`docs`,item:o(n.slice(1).join(`/`))};if(r===`activity`&&i)return{page:`activity`,item:o(i)};if(r===`skills`||r===`agents`)return{page:`library`,section:r};if(Dn(wn,r)){let e=On(r,i);return a&&e===i?{page:r,tab:e,item:o(a)}:{page:r,tab:e}}if(Dn(En,r)){let[e,t]=En[r];return t?{page:e,tab:t}:{page:e}}return{page:Dn(Cn,r)?r:`overview`}}function An(){let e=()=>kn(typeof window<`u`?window.location.hash:``),[t,n]=(0,Y.useState)(e);return(0,Y.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}var jn=e=>{window.location.hash=e},Mn={red:`#FF5C57`,green:`#4ED888`,yellow:`#E8B53D`,blue:`#5B8CFF`,magenta:`#C77DFF`,cyan:`#3AD4C4`,white:`#E9EFEA`},Nn={red:`#C53A36`,green:`#2FA864`,yellow:`#B8862A`,blue:`#3C66D8`,magenta:`#9A52D6`,cyan:`#2BA89B`,white:`#AEB8B0`},Pn=e=>Mn[e]||Mn.cyan,Fn={red:`#A92F2B`,green:`#1E7A47`,yellow:`#8A6414`,blue:`#2F55C0`,magenta:`#7E3FB8`,cyan:`#15766C`,white:`#465A51`},In=e=>e===`yellow`||e===`white`||e===`cyan`||e===`green`?`#06100D`:`#FFFFFF`;function Ln(e,t,n){if(!e)return;let r=n===`light`,i=r?Nn[t]||Nn.cyan:Pn(t),a=r?`#FFFFFF`:In(t);r&&t===`white`&&(i=`#566B62`,a=`#FFFFFF`),e.style.setProperty(`--accent`,i),e.style.setProperty(`--accent-2`,Nn[t]||Nn.cyan),e.style.setProperty(`--accent-ink`,a),e.style.setProperty(`--accent-text`,r?Fn[t]||Fn.cyan:i),t===`yellow`?e.style.setProperty(`--warn`,r?`#B4521C`:`#F08A4B`):e.style.removeProperty(`--warn`)}var Rn={cultivar:{dark:`#3AD4C4`,light:`#127E73`,ink:`#06100D`,inkLight:`#FFFFFF`},operator:{dark:`#E8A23B`,light:`#8F5E10`,ink:`#1A1306`,inkLight:`#FFFFFF`},matrix:{dark:`#19E37C`,light:`#0B7A47`,ink:`#04140C`,inkLight:`#FFFFFF`},atlas:{dark:`#8FD694`,light:`#1C8450`,ink:`#14200F`,inkLight:`#FFFFFF`}};function zn(e,t,n){let r=Rn[t];if(!e||!r)return!1;let i=n===`light`;return e.style.setProperty(`--accent`,i?r.light:r.dark),e.style.setProperty(`--accent-2`,r.light),e.style.setProperty(`--accent-ink`,i?r.inkLight:r.ink),e.style.setProperty(`--accent-text`,i?r.light:r.dark),!0}var Bn=`#101317`,Vn=`#F4F6F8`,Hn=e=>{let t=e.replace(`#`,``);return[0,2,4].map(e=>parseInt(t.slice(e,e+2),16))},Un=e=>`#`+e.map(e=>Math.round(e).toString(16).padStart(2,`0`)).join(``).toUpperCase(),Wn=e=>{let[t,n,r]=Hn(e).map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r},Gn=(e,t)=>{let[n,r]=[Wn(e),Wn(t)].sort((e,t)=>t-e);return(n+.05)/(r+.05)},Kn=(e,t,n)=>{let r=Hn(e),i=Hn(t);return Un(r.map((e,t)=>e+(i[t]-e)*n))},qn=(e,t,n,r)=>{let i=e;for(let a=.05;Gn(i,t)<n&&a<=1.0001;a+=.05)i=Kn(e,r,a);return i},Jn=e=>typeof e==`string`&&/^#[0-9a-fA-F]{6}$/.test(e);function Yn(e,t){let n=t===`light`,r=n?Vn:Bn,i=n?`#000000`:`#FFFFFF`,a=qn(e,r,3,i),o=qn(a,r,4.5,i),s=Gn(a,`#06100D`)>=Gn(a,`#FFFFFF`)?`#06100D`:`#FFFFFF`;return{accent:a,accent2:qn(a,r,4.5,i),ink:s,text:o}}function Xn(e,t,n){if(!e||!Jn(t))return!1;let r=Yn(t,n);return e.style.setProperty(`--accent`,r.accent),e.style.setProperty(`--accent-2`,r.accent2),e.style.setProperty(`--accent-ink`,r.ink),e.style.setProperty(`--accent-text`,r.text),!0}function Zn(e,t){let[n,r]=(0,Y.useState)(()=>{try{return t(localStorage.getItem(e))}catch{return t(null)}});return[n,(0,Y.useCallback)(t=>r(n=>{let r=typeof t==`function`?t(n):t;try{localStorage.setItem(e,r)}catch{}return r}),[e])]}var Qn=`geneseed-mode`;function $n(){let[e,t]=Zn(Qn,e=>e===`light`?`light`:`dark`);return[e,()=>t(e=>e===`light`?`dark`:`light`)]}var er=`geneseed-flavour`,tr=[{id:`cultivar`,short:`Cultivar`,name:`Cultivar Evolved`,tagline:`The calm default — cool teal ink, geometric sans, soft flat cards lit by one quiet shadow.`},{id:`operator`,short:`Operator`,name:`Operator HUD`,tagline:`Amber phosphor on cool charcoal — all-mono, zero-radius instrument readout.`},{id:`matrix`,short:`Matrix`,name:`Matrix`,tagline:`Acid-green order-book terminal on pure black — all Space Mono, square 2px, a faint code-grid.`},{id:`atlas`,short:`Atlas`,name:`Atlas`,tagline:`The field journal — loam dark, sage ink, the codex as a living map.`}],nr=new Set(tr.map(e=>e.id)),rr={a:`cultivar`,b:`atlas`,c:`operator`,d:`cultivar`,e:`matrix`,f:`cultivar`,g:`cultivar`,z:`cultivar`,cb:`matrix`,cm:`cultivar`,greenhouse:`atlas`,heirloom:`cultivar`,aurora:`cultivar`,perspective:`cultivar`,sequencer:`cultivar`,cobalt:`matrix`,cosmic:`cultivar`,neon:`matrix`};function ir(){return Zn(er,ar)}function ar(e){return nr.has(e)?e:rr[e]||`cultivar`}var or=`geneseed-accent`,sr=[{id:`curated`,short:`Curated`,tagline:`Each theme's own signature colour.`}],cr=[[`cyan`,`Cyan`],[`blue`,`Blue`],[`magenta`,`Violet`],[`yellow`,`Amber`],[`green`,`Green`]].map(([e,t])=>({id:`custom:${e}`,name:e,short:t,hex:Pn(e),tagline:`Always ${t.toLowerCase()}, whatever the voice or skin.`})),lr=[...sr,...cr],ur=new Set(lr.map(e=>e.id)),dr=e=>{let t=typeof e==`string`&&e.startsWith(`hex:`)?e.slice(4):null;return Jn(t)?t.toUpperCase():null},fr=e=>e&&(ur.has(e)||dr(e))?e:`curated`,pr=e=>cr.find(t=>t.id===e)?.name??null,mr=e=>{let t=dr(e);return t?`Your own colour, ${t}.`:lr.find(t=>t.id===e)?.tagline??``};function hr(){return Zn(or,fr)}var gr=`geneseed-layout`,_r=[{id:`overview`,short:`Overview`,tagline:`Every install, what needs you, cost, usage and gates.`},{id:`cultivar`,short:`Cultivar`,tagline:`Hero, KPIs & genome grid.`},{id:`greenhouse`,short:`Greenhouse`,tagline:`Ring, tiles & mix donut.`},{id:`operator`,short:`Operator`,tagline:`Dense terminal readout.`},{id:`journal`,short:`Journal`,tagline:`Growth rings & the constitution map.`}],vr=new Set(_r.map(e=>e.id));function yr(e){return e&&vr.has(e)?e:`overview`}function br(){return Zn(gr,yr)}function xr(e){let[t,n]=(0,Y.useState)(null),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)([]),s=()=>c.overview().then(e=>{n(e),i(null)}).catch(t=>{i(t?.body?.message||t?.message||String(t)),e?.(t)});return(0,Y.useEffect)(()=>{s()},[]),(0,Y.useEffect)(()=>{c.themes().then(e=>o(e.themes)).catch(()=>{})},[]),{overview:t,error:r,themes:a,reload:s}}var Sr=1e3,Cr=e=>new Promise(t=>setTimeout(t,e));async function wr(){try{return(await c.ping()).pid??null}catch{return null}}async function Tr(e=0,t=null){await Cr(e);for(let e=0;e<30;e++){let e=await wr();if(e!==null&&e!==t)break;await Cr(Sr)}window.location.reload()}async function Er(){let e=await wr();try{await c.restart()}catch(e){if(e.status)throw e}await Tr(Sr,e)}var Dr=600;function Or({onFinish:e,onError:t}={}){let[n,r]=(0,Y.useState)([]),[i,a]=(0,Y.useState)(null),[o,s]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{c.jobs().then(({jobs:e})=>{if(!e.length)return;r(e.map(e=>({id:e.id,action:e.action,status:e.status,output:e.output||``,duration:e.duration,started:e.started})));let t=e.find(e=>e.status===`running`);t&&(a(t.id),s(!0))}).catch(()=>{})},[]),(0,Y.useEffect)(()=>{if(!i)return;let t=n.find(e=>e.id===i)?.action===`update`,o=null;t&&wr().then(e=>o=e);let s=setInterval(async()=>{if(!document.hidden)try{let n=await c.job(i);if(r(e=>{let t=e.findIndex(e=>e.id===i);if(t===-1)return e;let r=e[t],a=n.output||``;if(r.output===a&&r.status===n.status&&r.duration===n.duration)return e;let o=e.slice();return o[t]={...r,output:a,status:n.status,duration:n.duration},o}),n.status!==`running`){if(clearInterval(s),a(null),t){Tr(2e3,o);return}e?.(n.status)}}catch{if(!t)return;clearInterval(s),Tr(0,o)}},Dr);return()=>clearInterval(s)},[i]),{runs:n,activeId:i,consoleOpen:o,setConsoleOpen:s,runAction:async(e,n)=>{try{let{job_id:t}=await c.action(e,n),i=e===`build`&&n?.theme?`build (${n.theme} · ${n.emit})`:e;return r(e=>[...e,{id:t,action:i,status:`running`,output:``,started:Date.now()/1e3}]),a(t),s(!0),t}catch(e){t?.(e)}},cancelJob:e=>c.cancelJob(e).catch(e=>t?.(e)),clearRuns:()=>r([])}}var kr=new Map,Ar=new Map;function jr(e){for(let t of kr.keys())t.startsWith(`${e}|`)&&kr.delete(t)}function X(e,t=[],n=null,{revalidate:r=!1}={}){let i=n===null?null:`${n}|${t.join(``)}`,[a,o]=(0,Y.useState)(()=>i!==null&&kr.has(i)?kr.get(i):null),[s,c]=(0,Y.useState)(``),[l,u]=(0,Y.useState)(()=>!(i!==null&&kr.has(i))),d=(0,Y.useRef)(e),f=(0,Y.useRef)(i);(0,Y.useLayoutEffect)(()=>{d.current=e,f.current=i});let p=(0,Y.useCallback)(()=>{u(!0),c(``);let e=f.current;return Promise.resolve(d.current()).then(t=>{if(o(t),e!==null){kr.set(e,t);for(let n of Ar.get(e)||[])n(t)}}).catch(e=>c(e.message)).finally(()=>u(!1))},t);return(0,Y.useEffect)(()=>{let e=f.current;return e!==null&&(Ar.has(e)||Ar.set(e,new Set),Ar.get(e).add(o)),e!==null&&kr.has(e)&&(o(kr.get(e)),c(``),u(!1),!r)||p(),()=>Ar.get(e)?.delete(o)},[p]),{data:a,error:s,loading:l,reload:p,setData:o}}var Mr=60,Nr=3600,Pr=86400,Fr={seconds:90,minutes:5400,hours:36*Nr};function Ir(e){let t=Math.max(0,Date.now()/1e3-e);return t<Fr.seconds?`${Math.round(t)}s`:t<Fr.minutes?`${Math.round(t/Mr)}m`:t<Fr.hours?`${Math.round(t/Nr)}h`:`${Math.round(t/Pr)}d`}function Lr(e){return e?e.replace(/\\/g,`/`).replace(/^\/?(home|Users)\/[^/]+/i,`~`).replace(/^[A-Z]:\/Users\/[^/]+/i,`~`):`~`}var Rr={deployed:.4,doctorClean:.25,doctorMinor:.15,doctorMinorMax:2,doctorFail:.05,versionSynced:.2,diskClean:.15};function zr(e,t){if(!e)return 0;let n=e.doctor?.problems?.length??99,r=e.doctor?.ok?Rr.doctorClean:n<=Rr.doctorMinorMax?Rr.doctorMinor:Rr.doctorFail,i=t&&t.installed_fp&&t.installed_fp===t.source_fp;return(e.deployed?Rr.deployed:0)+r+(i?Rr.versionSynced:0)+(e.diff&&e.diff.missing===0?Rr.diskClean:0)}var Br=e=>Math.max(...n.map(t=>e?.[t]??0),1),Vr=e=>(e?.edited??0)+(e?.added??0),Hr=e=>Vr(e)+(e?.missing??0),Ur=e=>(e?.laws??0)+(e?.doctrines?.rules??0),Z=s(),Wr={dashboard:`M3 13h7V3H3v10Zm0 8h7v-6H3v6Zm11 0h7V11h-7v10Zm0-18v6h7V3h-7Z`,library:`M4 5h10v14H4zM16 7h4v12h-4M7 9h4M7 12h4`,loop:`M19.5 9A8 8 0 1 1 15 4.6M15 1.5l.2 3.3-3.2.8`,graph:`M6 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM7.5 14.5l8-8M16.7 15.2L8.8 16.6`,changes:`M4 6h10M4 12h7M4 18h12M17 4l3 3-3 3M20 7h-6`,doctor:`M12 3v6m0 0a4 4 0 0 1-4 4H7a3 3 0 0 0-3 3v2m8-9a4 4 0 0 0 4 4h1a3 3 0 0 1 3 3v2M12 3a1.5 1.5 0 1 0 0-.01`,themes:`M12 3a9 9 0 1 0 0 18c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3-.3-.4-.5-.8-.5-1.2 0-1 .8-1.5 1.7-1.5H17a4 4 0 0 0 4-4c0-4.4-4-8-9-8Z`,settings:`M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm8-3a8 8 0 0 0-.1-1.3l2-1.6-2-3.4-2.4 1a8 8 0 0 0-2.2-1.3L15 2H9l-.3 2.6a8 8 0 0 0-2.2 1.3l-2.4-1-2 3.4 2 1.6A8 8 0 0 0 4 12c0 .4 0 .9.1 1.3l-2 1.6 2 3.4 2.4-1a8 8 0 0 0 2.2 1.3L9 22h6l.3-2.6a8 8 0 0 0 2.2-1.3l2.4 1 2-3.4-2-1.6c.1-.4.1-.9.1-1.3Z`,search:`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3`,chevron:`M9 6l6 6-6 6`,x:`M6 6l12 12M18 6L6 18`,menu:`M4 7h16M4 12h16M4 17h16`,play:`M7 5v14l11-7L7 5Z`,clear:`M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14`,download:`M12 3v12m0 0l-4-4m4 4l4-4M4 19h16`,refresh:`M21 12a9 9 0 1 1-3-6.7M21 4v5h-5`,folder:`M3 7a2 2 0 0 1 2-2h3.5l2 2H19a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z`,build:`M14 3l-1 4 4-1 3 3-4 1 1 4-3 3-1-4-4 1-3-3 4-1-1-4 3-3 5 0Z`,arrow:`M5 12h14M13 6l6 6-6 6`,external:`M14 5h5v5M19 5l-8 8M12 5H6a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-6`,copy:`M9 9h11v11H9zM5 15H4V4h11v1`,spark:`M12 3v3m0 12v3m9-9h-3M6 12H3m13.5-6.5-2 2m-7 7-2 2m11 0-2-2m-7-7-2-2`,activity:`M3 12h4l2.5-7 5 14 2.5-7H21`,agent:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8`,layers:`M12 3l9 5-9 5-9-5 9-5ZM3 13l9 5 9-5M3 17l9 5 9-5`,sun:`M12 4V2M12 22v-2M4 12H2M22 12h-2M5.6 5.6 4.2 4.2M19.8 19.8l-1.4-1.4M18.4 5.6l1.4-1.4M4.2 19.8l1.4-1.4M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z`,moon:`M21 12.8A8.5 8.5 0 1 1 11.2 3a6.5 6.5 0 0 0 9.8 9.8Z`,power:`M12 3v9M7.5 6.5a7 7 0 1 0 9 0`,docs:`M5 4h9l5 5v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1ZM14 4v5h5M8 12h7M8 16h7`,skill:`M21.7 6.6a5 5 0 0 1-6.6 6.6l-7.4 7.4a2 2 0 1 1-2.8-2.8l7.4-7.4a5 5 0 0 1 6.6-6.6l-2.6 2.6a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0Z`,law:`M12 3v18M5 6h14M8 21h8M6 6l-3 6h6zM3 12a3 3 0 0 1 6 0M18 6l-3 6h6zM15 12a3 3 0 0 1 6 0`,rule:`M7 3h10a1 1 0 0 1 1 1v17l-6-3.5L6 21V4a1 1 0 0 1 1-1ZM9.5 9.5l1.8 1.8 3.4-3.6`,profile:`M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM5 20a7 7 0 0 1 14 0`,notebook:`M7 4h11v16H7zM4 8h3M4 12h3M4 16h3M11 9h5M11 13h5M11 17h3`,about:`M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 11v6M12 7.6h.01`,github:`M12 2a10 10 0 0 0-3.2 19.5c.5.1.7-.2.7-.5v-1.8c-2.8.6-3.4-1.2-3.4-1.2-.5-1.2-1.1-1.5-1.1-1.5-.9-.6.1-.6.1-.6 1 .1 1.5 1 1.5 1 .9 1.5 2.3 1.1 2.9.8.1-.6.3-1.1.6-1.3-2.2-.3-4.6-1.1-4.6-5 0-1.1.4-2 1-2.7-.1-.3-.4-1.3.1-2.7 0 0 .8-.3 2.7 1a9.4 9.4 0 0 1 5 0c1.9-1.3 2.7-1 2.7-1 .5 1.4.2 2.4.1 2.7.6.7 1 1.6 1 2.7 0 3.9-2.4 4.7-4.6 5 .4.3.7.9.7 1.8v2.6c0 .3.2.6.7.5A10 10 0 0 0 12 2Z`};function Q({name:e,className:t=`glyph`,style:n}){return(0,Z.jsx)(`svg`,{className:t,style:n,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,Z.jsx)(`path`,{d:Wr[e]||``})})}function Gr({className:e=`sprout`}){return(0,Z.jsxs)(`svg`,{className:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,Z.jsx)(`path`,{d:`M12 21.5v-9`,stroke:`var(--accent)`,strokeWidth:`2`,strokeLinecap:`round`,fill:`none`}),(0,Z.jsx)(`path`,{d:`M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z`,fill:`var(--accent)`}),(0,Z.jsx)(`path`,{d:`M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z`,fill:`var(--accent)`,opacity:`.42`}),(0,Z.jsx)(`circle`,{cx:`12`,cy:`12.4`,r:`1.1`,fill:`var(--bg)`})]})}var Kr=[{hash:`#/`,page:`overview`,label:`Overview`,icon:`dashboard`},{hash:`#/laws`,page:`laws`,label:`Constitution`,short:`Laws`,icon:`law`,count:e=>e?.counts?(e.counts.ontology??0)+(e.counts.laws??0)+(e.counts.doctrines?.rules??0):null},{hash:`#/library`,page:`library`,label:`Library`,icon:`library`,count:e=>e?.counts?[`skills`,`agents`,`memory`,`notebook`,`wiki`,`config`].reduce((t,n)=>t+(e.counts[n]??0),0):null},{hash:`#/loops`,page:`loops`,label:`Loops`,icon:`loop`,count:e=>e?.counts?.loops??null},{hash:`#/personal`,page:`personal`,label:`Personal`,icon:`profile`},{hash:`#/installs`,page:`installs`,label:`Installs`,icon:`layers`,count:(e,t)=>t?`${t.filter(e=>e.state===`active`).length}/${t.length}`:null}],qr=[{hash:`#/docs`,page:`docs`,label:`Docs`,icon:`docs`},{hash:`#/activity`,page:`activity`,label:`Activity`,icon:`activity`}];function Jr({n:e,lit:t,count:n,onNavigate:r}){return(0,Z.jsxs)(`a`,{className:`sb-item${t?` on`:``}`,href:e.hash,"aria-current":t?`page`:void 0,onClick:()=>r?.(),children:[(0,Z.jsx)(Q,{name:e.icon}),(0,Z.jsx)(`span`,{className:`sb-label`,children:e.label}),n==null?null:(0,Z.jsx)(`span`,{className:`sb-count`,children:n})]})}function Yr({overview:e,onOpenVoice:t}){if(!e)return null;let n=e.doctor,r=Hr(e.diff);return(0,Z.jsxs)(`div`,{className:`sb-vitals`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{children:`doctor`}),(0,Z.jsx)(`b`,{className:n?n.ok?`good`:`bad`:``,children:n?n.ok?`clean`:`${n.problems.length} to fix`:`not run`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{children:`drift`}),(0,Z.jsx)(`b`,{className:r?`warn`:``,children:e.diff?r:`n/a`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{children:`built`}),(0,Z.jsx)(`b`,{title:e.build_time||void 0,children:e.build_epoch?`${Ir(e.build_epoch)} ago`:`never`})]}),(0,Z.jsxs)(`button`,{type:`button`,className:`sb-voice`,onClick:t,title:`Switch voice`,children:[(0,Z.jsx)(`span`,{children:`voice`}),(0,Z.jsxs)(`b`,{children:[e.theme||`none`,(0,Z.jsx)(Q,{name:`chevron`})]})]})]})}function Xr({route:e,overview:t,installs:n,onOpenVoice:r,onNavigate:i}){return(0,Z.jsxs)(`nav`,{className:`sidebar`,id:`rail-nav`,"aria-label":`Console`,tabIndex:-1,children:[(0,Z.jsxs)(`button`,{type:`button`,className:`sb-brand`,onClick:()=>{jn(`#/`),i?.()},"aria-label":`Geneseed, go to the overview`,children:[(0,Z.jsx)(`span`,{className:`sb-mark`,children:(0,Z.jsx)(Gr,{})}),(0,Z.jsxs)(`span`,{className:`sb-brand-text`,children:[(0,Z.jsx)(`span`,{className:`sb-name`,children:`Geneseed`}),(0,Z.jsx)(`span`,{className:`sb-ver`,children:[t?.version&&`v${t.version}`,t?.theme].filter(Boolean).join(` · `)})]})]}),Kr.map(r=>(0,Z.jsx)(Jr,{n:r,lit:e.page===r.page,count:r.count?.(t,n),onNavigate:i},r.page)),(0,Z.jsx)(`div`,{className:`sb-spacer`}),qr.map(t=>(0,Z.jsx)(Jr,{n:t,lit:e.page===t.page,onNavigate:i},t.page)),(0,Z.jsx)(Yr,{overview:t,onOpenVoice:r})]})}function Zr({route:e}){return(0,Z.jsx)(`nav`,{className:`tabbar`,"aria-label":`Console pages`,children:Kr.map(t=>(0,Z.jsxs)(`a`,{href:t.hash,className:e.page===t.page?`on`:``,"aria-current":e.page===t.page?`page`:void 0,children:[(0,Z.jsx)(Q,{name:t.icon}),t.short||t.label]},t.page))})}var Qr=[{id:`opencode`,label:`OpenCode`,deployAdds:`.opencode/ + AGENT.md`,removeProject:`.opencode/ + AGENT.md + the bundle`,removeGlobal:`~/.config/opencode's AGENT.md, agents, skills, plugins + the opencode.json entry`},{id:`claude`,label:`Claude Code`,deployAdds:`.claude/ + CLAUDE.md`,removeProject:`.claude/ + the CLAUDE.md block`,removeGlobal:`~/.claude's agents/skills + the CLAUDE.md block + settings hooks`},{id:`bob`,label:`BOB (IBM)`,deployAdds:`.bob/ + AGENTS.md`,removeProject:`.bob/ + the AGENTS.md block`,removeGlobal:`~/.bob's agents/skills + the AGENTS.md block + settings hooks`},{id:`openclaude`,label:`OpenClaude`,deployAdds:`.openclaude/ + its CLAUDE.md`,removeProject:`.openclaude/ + its CLAUDE.md block`,removeGlobal:`~/.openclaude's agents/skills + the CLAUDE.md block + settings hooks`}],$r=e=>Qr.find(t=>t.id===e)||Qr[0],ei=(e,t)=>t===`project`?$r(e).removeProject:$r(e).removeGlobal,ti=e=>String(e||``).replace(/[\\/]+$/,``).split(/[\\/]/).pop()||e,ni=e=>e.scope===`global`?$r(e.host).label:ti(e.path),ri=`geneseed-harness`,ii=Qr.map(({id:e,label:t})=>({id:e,label:t}));function ai(e=`opencode`){let[t,n]=Zn(ri,e=>ii.some(t=>t.id===e)?e:null);return[t??e,n]}function oi(e){let t=String(e||``);return Qr.find(e=>t.startsWith(e.id))?.id||`opencode`}function si(e=0){let[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(``),s=(0,Y.useRef)(null),[l]=ai(),u=`${e}|${l}`,[d,f]=(0,Y.useState)(u);return d!==u&&(f(u),i(null)),(0,Y.useEffect)(()=>{s.current=null},[u]),{index:r,error:a,prime:(0,Y.useCallback)(()=>{if(r||s.current)return s.current;let e=(async()=>{let e=Object.entries(Cn).flatMap(([e,t])=>(wn[e]||[``]).map(n=>{let r=n?t+` / `+Tn[n]:t;return{kind:`Pages`,sortKey:-1,title:r,desc:``,hay:r.toLowerCase(),route:e===`overview`?`#/`:`#/`+e+(n?`/`+n:``)}})),r=[`laws`,`skills`,...n],a=await Promise.all(r.map(async e=>{try{return{sec:e,items:(await c.catalog(e))?.items||[]}}catch{return{sec:e,items:[]}}}));for(let{sec:n,items:i}of a){let a=t[n];for(let t of i){let i=t.title||t.name;e.push({kind:a.label,sortKey:r.indexOf(n),title:i,desc:t.desc||``,hay:`${i} ${t.desc||``} ${t.name||``}`.toLowerCase(),route:`#/item/${a.type}/${encodeURIComponent(t.name)}`})}}try{let t=await c.mcp(),n=new Set;for(let r of t?.targets||[])for(let t of r.servers||[]){if(n.has(t.name))continue;n.add(t.name);let r=t.label||t.name;e.push({kind:`MCP servers`,sortKey:100,title:r,desc:t.desc||``,hay:`${r} ${t.desc||``} ${t.name||``} mcp`.toLowerCase(),route:`#/installs/hosts`})}}catch{}try{let t=await c.docs(l);for(let n of t?.groups||[])for(let t of n.pages||[])e.push({kind:`Docs`,sortKey:110,title:t.title,desc:n.label,hay:`${t.title||``} ${t.id||``} ${n.label||``} ${t.section||``} ${t.description||``}`.toLowerCase(),route:`#/docs/${encodeURIComponent(t.id)}`})}catch{}return i(e),s.current=null,e})().catch(e=>(s.current=null,o(e.message||String(e)),[]));return s.current=e,e},[r,l])}}var ci=24;function li(e,t){let n=e.title.toLowerCase();return n.startsWith(t)?0:n.includes(t)?1:e.hay.includes(t)?2:-1}function ui(e,t){let n=t.toLowerCase().trim();if(!n||!e)return[];let r=[];for(let t of e){let e=li(t,n);e>=0&&r.push({e:t,s:e})}return r.sort((e,t)=>e.s-t.s||e.e.sortKey-t.e.sortKey||e.e.title.localeCompare(t.e.title)),r.slice(0,ci).map(e=>e.e)}function di(e,t){let n=t.trim().toLowerCase(),r=n?e.toLowerCase().indexOf(n):-1;return r<0?e:(0,Z.jsxs)(Z.Fragment,{children:[e.slice(0,r),(0,Z.jsx)(`mark`,{className:`spot-hit`,children:e.slice(r,r+n.length)}),e.slice(r+n.length)]})}function fi({query:e,index:t,loading:n,error:r,active:i,onActive:a,onClose:o}){let s=(0,Y.useMemo)(()=>ui(t,e),[t,e]),c=(0,Y.useRef)(null),l=s.length>0;(0,Y.useLayoutEffect)(()=>{let e=c.current?.querySelectorAll(`[data-spot-row]`);return!l||!e?.length||!_n()?void 0:vn(on(e,{opacity:[0,1],translateY:[-4,0],duration:220,delay:mn(18),ease:`outQuart`}),220+18*e.length)},[l]),(0,Y.useEffect)(()=>{i>=s.length&&a(0)},[s,i,a]),(0,Y.useEffect)(()=>{(c.current?.querySelector(`[data-spot-row="${i}"]`))?.scrollIntoView({block:`nearest`})},[i]);let u=e=>{e&&(jn(e.route),o())},d=[],f=null;return s.forEach((e,t)=>{(!f||f.kind!==e.kind)&&(f={kind:e.kind,rows:[]},d.push(f)),f.rows.push({entry:e,index:t})}),e.trim()?(0,Z.jsxs)(`div`,{className:`spotlight`,ref:c,id:`spotlight-list`,role:`listbox`,"aria-label":`Search results`,children:[r&&!t&&(0,Z.jsxs)(`div`,{className:`spot-empty`,role:`presentation`,children:[`Could not load the search index — `,r]}),n&&!t&&!r&&(0,Z.jsx)(`div`,{className:`spot-empty`,role:`presentation`,children:`Loading…`}),!n&&s.length===0&&t&&(0,Z.jsxs)(`div`,{className:`spot-empty`,role:`presentation`,children:[`No matches for “`,e,`”.`]}),d.map(t=>(0,Z.jsxs)(`div`,{className:`spot-group`,role:`group`,"aria-label":t.kind,children:[(0,Z.jsx)(`div`,{className:`spot-group-head`,"aria-hidden":`true`,children:t.kind}),t.rows.map(({entry:t,index:n})=>(0,Z.jsxs)(`div`,{id:`spot-opt-${n}`,"data-spot-row":n,role:`option`,"aria-selected":n===i,className:`spot-row ${n===i?`on`:``}`,onMouseDown:e=>{e.preventDefault(),u(t)},onMouseEnter:()=>a(n),children:[(0,Z.jsx)(`div`,{className:`spot-title`,children:di(t.title,e)}),t.desc?(0,Z.jsx)(`div`,{className:`spot-desc`,children:t.desc}):null]},`${t.route}-${n}`))]},t.kind))]}):null}function pi({value:e,onChange:t,dataRev:n}){let r=(0,Y.useRef)(null),i=(0,Y.useRef)(null),[a,o]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(0),{index:l,error:u,prime:d}=si(n);(0,Y.useEffect)(()=>{let e=e=>{((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()===`k`||e.key===`/`&&!e.target.closest(`input, textarea, select`))&&(e.preventDefault(),r.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,Y.useEffect)(()=>{if(!a)return;let e=e=>{i.current?.contains(e.target)||o(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[a]);let f=a&&!!e.trim(),p=f&&l?ui(l,e):[],m=s<p.length?`spot-opt-${s}`:void 0;return(0,Z.jsxs)(`div`,{className:`tb-search`,ref:i,children:[(0,Z.jsx)(Q,{name:`search`,className:`mag glyph`}),(0,Z.jsx)(`input`,{ref:r,role:`combobox`,"aria-label":`Search the harness`,"aria-autocomplete":`list`,"aria-expanded":f,"aria-controls":f?`spotlight-list`:void 0,"aria-activedescendant":m,value:e,onChange:e=>{t(e.target.value),c(0)},onFocus:()=>{o(!0),d()},onKeyDown:n=>{if(f){if(n.key===`ArrowDown`)n.preventDefault(),c(e=>Math.min(e+1,Math.max(p.length-1,0)));else if(n.key===`ArrowUp`)n.preventDefault(),c(e=>Math.max(e-1,0));else if(n.key===`Enter`){let e=p[s];e&&(n.preventDefault(),jn(e.route),o(!1),r.current?.blur())}else n.key===`Escape`&&(n.preventDefault(),e?t(``):(o(!1),r.current?.blur()))}},placeholder:`Search the harness…`,title:`Press / to jump here, or Ctrl-K / ⌘K from inside any field`}),(0,Z.jsx)(`span`,{className:`kbd`,children:`Ctrl K`}),(0,Z.jsx)(`span`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:f?p.length?`${p.length} results`:`no matches`:``}),f&&(0,Z.jsx)(fi,{query:e,index:l,loading:!l,error:u,active:s,onActive:c,onClose:()=>{o(!1),r.current?.blur()}})]})}function mi({installs:e,onSwitch:t}){let n=(e||[]).filter(e=>e.state===`active`);if(n.length<2)return null;let r=n.find(e=>e.selected)||n[0];return(0,Z.jsx)(`select`,{className:`sel tb-harness`,"aria-label":`Harness to view`,title:`Harness the console is viewing`,value:r.id,onChange:async e=>{let r=n.find(t=>t.id===e.target.value);if(r)try{await c.selectView(r.host,r.path),t?.()}catch{}},children:n.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.scope===`global`?`${e.host} · global`:`${ni(e)} · ${e.host}`},e.id))})}function hi({children:e,...t}){let n=xn(`button.on`);return(0,Z.jsxs)(`div`,{className:`seg`,role:`group`,ref:n,...t,children:[(0,Z.jsx)(`span`,{className:`glide`,"aria-hidden":`true`}),e]})}function gi({value:e,onChange:t,labelledBy:n}){let r=dr(e);return(0,Z.jsxs)(`div`,{className:`accent-picker`,role:`group`,"aria-labelledby":n,children:[sr.map(n=>(0,Z.jsx)(`button`,{type:`button`,className:`accent-src${e===n.id?` on`:``}`,"aria-pressed":e===n.id,title:n.tagline,onClick:()=>t(n.id),children:n.short},n.id)),(0,Z.jsxs)(`div`,{className:`accent-swatches`,children:[cr.map(n=>(0,Z.jsx)(`button`,{type:`button`,className:`accent-swatch${e===n.id?` on`:``}`,style:{"--sw":n.hex},"aria-pressed":e===n.id,"aria-label":`${n.short} accent`,title:n.short,onClick:()=>t(n.id)},n.id)),(0,Z.jsx)(`label`,{className:`accent-swatch accent-custom${r?` on picked`:``}`,style:r?{"--sw":r}:void 0,title:r?`Your colour, ${r}`:`Pick any colour`,children:(0,Z.jsx)(`input`,{type:`color`,"aria-label":`Custom accent colour`,value:(r||`#3AD4C4`).toLowerCase(),onChange:e=>t(`hex:${e.target.value.toUpperCase()}`)})})]})]})}function _i({flavour:e,onFlavour:t,accentMode:n,onAccentMode:r,layout:i,onLayout:a,onClose:o}){let s=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&!e.target.closest?.(`.tb-pop-anchor`)&&o()},t=e=>{e.key===`Escape`&&o()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[o]);let c=(e,t,n,r,i)=>(0,Z.jsxs)(`div`,{className:`ap-group`,children:[(0,Z.jsx)(`span`,{className:`ap-label`,id:e,children:t}),(0,Z.jsx)(hi,{"aria-labelledby":e,children:n.map(e=>(0,Z.jsx)(`button`,{type:`button`,className:r===e.id?`on`:``,"aria-pressed":r===e.id,title:e.tagline,onClick:()=>i(e.id),children:e.short},e.id))})]});return(0,Z.jsxs)(`div`,{className:`appearance-pop`,ref:s,role:`dialog`,"aria-label":`Appearance`,children:[c(`ap-skin`,`Skin`,tr,e,t),(0,Z.jsxs)(`div`,{className:`ap-group`,children:[(0,Z.jsx)(`span`,{className:`ap-label`,id:`ap-accent`,children:`Accent`}),(0,Z.jsx)(gi,{value:n,onChange:r,labelledBy:`ap-accent`})]}),c(`ap-view`,`Overview view`,_r,i,a)]})}function vi({route:e,navOpen:t,onToggleNav:n,overview:r,installs:i,query:a,onQuery:o,mode:s,onToggleMode:c,appearance:l,dataRev:u,onSwitch:d}){let[f,p]=(0,Y.useState)(!1),m=r?.install,h=m?`${m.host}:${m.scope}`:Lr(r?.target),g=e.tab&&Tn[e.tab];return(0,Z.jsxs)(`header`,{className:`topbar`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`tb-menu iconbtn`,onClick:n,"aria-label":t?`Close navigation`:`Open navigation`,"aria-expanded":!!t,"aria-controls":`rail-nav`,children:(0,Z.jsx)(Q,{name:t?`x`:`menu`})}),(0,Z.jsxs)(`nav`,{className:`crumbs`,"aria-label":`Breadcrumb`,children:[(0,Z.jsx)(`span`,{className:`crumb-root mono`,title:r?.target||void 0,children:h}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,Z.jsx)(`span`,{className:g?``:`crumb-here`,"aria-current":g?void 0:`page`,children:Cn[e.page]}),g?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,Z.jsx)(`span`,{className:`crumb-here`,"aria-current":`page`,children:g})]}):null]}),(0,Z.jsx)(`div`,{className:`topbar-spacer`}),(0,Z.jsx)(mi,{installs:i,onSwitch:d}),(0,Z.jsx)(pi,{value:a,onChange:o,dataRev:u}),(0,Z.jsxs)(`div`,{className:`tb-pop-anchor`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`iconbtn`,"aria-label":`Appearance`,title:`Appearance`,"aria-expanded":f,onClick:()=>p(e=>!e),children:(0,Z.jsx)(Q,{name:`themes`})}),f?(0,Z.jsx)(_i,{...l,onClose:()=>p(!1)}):null]}),(0,Z.jsx)(`button`,{type:`button`,className:`iconbtn`,title:s===`light`?`Switch to dark`:`Switch to light`,"aria-label":s===`light`?`Switch to dark mode`:`Switch to light mode`,onClick:c,children:(0,Z.jsx)(Q,{name:s===`light`?`moon`:`sun`})})]})}function yi({themes:e,current:t,onPick:n,onClose:r}){let i=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&r()},t=e=>{e.key===`Escape`&&r()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]),(0,Y.useEffect)(()=>{i.current?.querySelector(`button.pop-item`)?.focus()},[]),(0,Z.jsxs)(`div`,{className:`pop`,ref:i,role:`menu`,"aria-label":`Switch voice`,children:[(0,Z.jsx)(`div`,{className:`tick`,style:{padding:`4px 10px 8px`},children:`Switch voice`}),e.map(e=>(0,Z.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e.name===t,className:`pop-item ${e.name===t?`on`:``}`,onClick:()=>n(e.name),children:[(0,Z.jsx)(`span`,{className:`po`,style:{background:Pn(e.accent),boxShadow:`0 0 8px ${Pn(e.accent)}`}}),(0,Z.jsx)(`span`,{className:`pn`,children:e.name})]},e.name))]})}var bi=3500;function xi({toast:e,onClose:t}){return(0,Y.useEffect)(()=>{let e=setTimeout(t,bi);return()=>clearTimeout(e)},[e]),(0,Z.jsxs)(`div`,{className:`toast ${e.kind}`,role:e.kind===`err`?`alert`:`status`,"aria-live":e.kind===`err`?void 0:`polite`,children:[(0,Z.jsx)(`div`,{children:e.msg}),(0,Z.jsx)(`div`,{style:{marginTop:8},children:(0,Z.jsx)(`button`,{className:`btn ghost`,onClick:t,children:`Dismiss`})})]})}function Si({runs:e,open:t,onToggle:n,onClear:r,onCancel:i,busy:a,finish:o}){let s=(0,Y.useRef)(null),c=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{let e=c.current;o&&e&&(e.classList.remove(`flash-ok`,`flash-bad`),e.offsetWidth,e.classList.add(o.status===`done`?`flash-ok`:`flash-bad`))},[o]);let l=e.length?e[e.length-1].output.length:0;return(0,Y.useEffect)(()=>{let e=s.current;e&&t&&(e.scrollTop=e.scrollHeight)},[e.length,l,t]),(0,Z.jsxs)(`div`,{className:`console`,style:{height:`42vh`,transform:t?`none`:`translateY(calc(42vh - 42px))`},children:[(0,Z.jsxs)(`div`,{className:`console-head`,ref:c,onClick:n,onAnimationEnd:e=>{e.target===e.currentTarget&&e.currentTarget.classList.remove(`flash-ok`,`flash-bad`)},children:[a&&(0,Z.jsx)(`span`,{className:`console-progress`,"aria-hidden":`true`}),(0,Z.jsxs)(`span`,{className:`ttl`,children:[(0,Z.jsx)(`span`,{className:`live ${a?`on`:``}`}),`terminal`]}),(0,Z.jsx)(`span`,{className:`count`,children:e.length}),(0,Z.jsxs)(`div`,{className:`right`,onClick:e=>e.stopPropagation(),children:[(0,Z.jsx)(`button`,{className:`iconbtn`,title:`Clear`,"aria-label":`Clear run history`,onClick:r,disabled:!e.length,children:(0,Z.jsx)(Q,{name:`clear`})}),(0,Z.jsx)(`button`,{className:`iconbtn`,title:t?`Collapse`:`Expand`,"aria-label":t?`Collapse console`:`Expand console`,"aria-expanded":t,onClick:n,children:(0,Z.jsx)(Q,{name:`chevron`,className:`glyph`,style:{transform:t?`rotate(90deg)`:`rotate(-90deg)`}})})]})]}),t&&(0,Z.jsxs)(`div`,{className:`console-body`,ref:s,children:[e.length===0&&(0,Z.jsx)(`div`,{className:`console-empty`,children:`No commands run yet. Actions you trigger stream here.`}),e.map(e=>(0,Z.jsxs)(`div`,{className:`run`,children:[(0,Z.jsxs)(`div`,{className:`run-head`,children:[(0,Z.jsx)(`span`,{className:`pr`,children:`$`}),(0,Z.jsx)(`span`,{className:`act`,children:e.action}),(0,Z.jsx)(`span`,{className:`st ${e.status}`,children:e.status===`running`?`…running`:`${e.status===`done`?`✓ done`:`✗ failed`}${e.duration?` · ${e.duration}s`:``}`}),e.status===`running`&&i&&(0,Z.jsx)(`button`,{className:`iconbtn run-cancel`,title:`Cancel this run`,"aria-label":`Cancel the ${e.action} run`,onClick:()=>i(e.id),children:(0,Z.jsx)(Q,{name:`x`})})]}),e.output&&(0,Z.jsx)(`pre`,{className:`run-out`,children:e.output})]},e.id))]})]})}var Ci=550,wi=`gs-splash-seen`;function Ti(){try{if(window.localStorage.getItem(wi))return 0;window.localStorage.setItem(wi,`1`)}catch{}return Ci}function Ei({ready:e,onDone:t}){let[n,r]=(0,Y.useState)(!1),[i,a]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{let e=setTimeout(()=>r(!0),Ti());return()=>clearTimeout(e)},[]),e&&n&&!i&&a(!0),(0,Y.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>t?.(),700);return()=>clearTimeout(e)},[i]),(0,Z.jsxs)(`div`,{className:`boot-splash${i?` fading`:``}`,"aria-hidden":`true`,onAnimationEnd:e=>{e.animationName===`splashOut`&&t?.()},children:[(0,Z.jsxs)(`div`,{className:`boot-dial`,children:[(0,Z.jsxs)(`svg`,{className:`boot-ring`,viewBox:`0 0 172 172`,children:[(0,Z.jsx)(`circle`,{cx:`86`,cy:`86`,r:`72`,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`9`}),(0,Z.jsx)(`circle`,{cx:`86`,cy:`86`,r:`50`,fill:`none`,stroke:`var(--line-2)`,strokeWidth:`8`,strokeDasharray:`1.2 5.3`,opacity:`.7`}),(0,Z.jsx)(`circle`,{className:`boot-progress`,cx:`86`,cy:`86`,r:`72`,fill:`none`,stroke:`var(--accent)`,strokeWidth:`9`,strokeLinecap:`round`})]}),(0,Z.jsxs)(`svg`,{className:`boot-sprout`,viewBox:`0 0 24 24`,children:[(0,Z.jsx)(`path`,{className:`bs-stem`,d:`M12 21.5v-9`,stroke:`var(--accent)`,strokeWidth:`2`,strokeLinecap:`round`,fill:`none`}),(0,Z.jsx)(`path`,{className:`bs-leaf bs-leaf-main`,d:`M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z`,fill:`var(--accent)`}),(0,Z.jsx)(`path`,{className:`bs-leaf bs-leaf-back`,d:`M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z`,fill:`var(--accent)`,opacity:`.42`}),(0,Z.jsx)(`circle`,{cx:`12`,cy:`12.4`,r:`1.1`,fill:`var(--bg)`})]})]}),(0,Z.jsxs)(`div`,{className:`boot-status`,children:[(0,Z.jsx)(`span`,{children:`germinating harness`}),(0,Z.jsx)(`span`,{className:`boot-caret`})]})]})}function Di({label:e=`Loading…`}){return(0,Z.jsxs)(`div`,{className:`loading`,role:`status`,children:[e,(0,Z.jsxs)(`div`,{className:`skel`,"aria-hidden":`true`,children:[(0,Z.jsx)(`div`,{className:`skel-bar`}),(0,Z.jsx)(`div`,{className:`skel-bar`}),(0,Z.jsx)(`div`,{className:`skel-bar`})]})]})}function Oi({open:e,title:t,children:n,confirmLabel:r,onConfirm:i,onClose:a}){let o=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let t=o.current;t&&(e&&!t.open&&(typeof t.showModal==`function`?t.showModal():t.setAttribute(`open`,``)),!e&&t.open&&(typeof t.close==`function`?t.close():t.removeAttribute(`open`)))},[e]),(0,Z.jsxs)(`dialog`,{ref:o,className:`confirm`,onCancel:a,onClose:a,children:[(0,Z.jsx)(`h3`,{className:`confirm-title`,children:t}),(0,Z.jsx)(`div`,{className:`confirm-body`,children:n}),(0,Z.jsxs)(`div`,{className:`confirm-actions`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:a,children:`Cancel`}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:i,autoFocus:!0,children:r||`Confirm`})]})]})}var ki=(0,Y.createContext)(null),Ai=()=>{throw Error(`useConfirm() needs a <ConfirmProvider> above it`)};function ji(){return(0,Y.useContext)(ki)||Ai}function Mi({children:e}){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(null),i=e=>{let t=r.current;r.current=null,n(null),t?.(e)},a=(0,Y.useCallback)((e,t={})=>new Promise(i=>{r.current?.(!1),r.current=i,n({msg:e,...t})}),[]);return(0,Z.jsxs)(ki.Provider,{value:a,children:[e,(0,Z.jsx)(Oi,{open:!!t,title:t?.title||`Are you sure?`,confirmLabel:t?.confirmLabel,onConfirm:()=>i(!0),onClose:()=>i(!1),children:t?.msg})]})}function Ni({error:e,style:t}){return e?(0,Z.jsx)(`p`,{className:`badge bad`,style:t,children:e}):null}function Pi({onAction:e}){let{data:t,error:n}=X(()=>c.themes(),[]),[r,i]=(0,Y.useState)(``),[a,o]=(0,Y.useState)(``);if(n)return(0,Z.jsx)(Ni,{error:n});if(!t)return(0,Z.jsx)(Di,{});let s=r||t.current?.theme||`neutral`,l=t.emits?.some(e=>e.name===`opencode-global`),u=a||(l?`opencode-global`:t.current?.emit||t.emits?.[0]?.name||``),d=i,f=o;return(0,Z.jsxs)(`div`,{className:`narrow-lg`,children:[(0,Z.jsx)(`div`,{className:`head-row mb-18`,children:(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`h`,children:`Deploy your harness`}),(0,Z.jsx)(`p`,{className:`sub`,children:`Geneseed isn't implanted on this machine yet. Pick a voice and an install mode, then deploy. The graft runs in the console below, and this dashboard lights up when it lands.`})]})}),(0,Z.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,Z.jsx)(`div`,{className:`card-head`,children:(0,Z.jsx)(`h3`,{children:`1 · Choose a voice`})}),(0,Z.jsx)(`div`,{className:`row wrap gap-10`,children:t.themes.map(e=>(0,Z.jsxs)(`button`,{className:`btn ${e.name===s?`soft`:`ghost`}`,onClick:()=>d(e.name),title:e.blurb||e.tagline||e.name,children:[(0,Z.jsx)(`span`,{className:`po`,style:{width:10,height:10,borderRadius:`50%`,background:Pn(e.accent),boxShadow:`0 0 8px ${Pn(e.accent)}`}}),(0,Z.jsx)(`span`,{style:{textTransform:`capitalize`},children:e.name})]},e.name))})]}),(0,Z.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,Z.jsx)(`div`,{className:`card-head`,children:(0,Z.jsx)(`h3`,{children:`2 · Install mode`})}),(0,Z.jsxs)(`p`,{className:`sub mb-16`,children:[(0,Z.jsx)(`code`,{children:`opencode-global`}),` deploys once to your global config so every repo on this machine inherits the harness (recommended). Other modes render into a chosen directory.`]}),(0,Z.jsxs)(`label`,{className:`stack`,style:{gap:6,maxWidth:360},children:[(0,Z.jsx)(`span`,{className:`tick`,children:`Mode`}),(0,Z.jsx)(`select`,{className:`sel`,value:u,onChange:e=>f(e.target.value),children:t.emits.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[e.name,e.desc?` · ${e.desc}`:``]},e.name))})]})]}),(0,Z.jsxs)(`button`,{className:`btn btn-grid`,disabled:!s||!u,onClick:()=>e(`build`,{theme:s,emit:u}),children:[(0,Z.jsx)(Q,{name:`build`}),`Deploy harness`]})]})}var Fi=e=>X(()=>c.rules().catch(()=>null),[e],`rules`,{revalidate:!0}),Ii=()=>jr(`rules`),$={security:`oklch(0.74 0.085 45)`,verify:`oklch(0.78 0.075 200)`,process:`oklch(0.76 0.075 150)`,craft:`oklch(0.78 0.085 95)`,context:`oklch(0.74 0.08 280)`,comms:`oklch(0.76 0.085 345)`},Li={security:{label:`Security`,c:$.security},verify:{label:`Verification`,c:$.verify},process:{label:`Process`,c:$.process},craft:{label:`Craft`,c:$.craft},context:{label:`Context`,c:$.context},comms:{label:`Communication`,c:$.comms}},Ri={craft:$.craft,rigor:$.verify,ops:$.process,process:$.security,comms:$.comms},zi=e=>Ri[e]||`var(--text-3)`,Bi={design:{label:`Design`,c:$.context},build:{label:`Build`,c:$.craft},review:{label:`Review`,c:$.security},ship:{label:`Ship`,c:$.process},understand:{label:`Understand`,c:$.verify},learn:{label:`Learn`,c:$.comms},harness:{label:`Harness`,c:`oklch(0.76 0.07 250)`},personal:{label:`Personal`,c:`oklch(0.72 0.025 250)`}},Vi=Object.keys(Bi);function Hi(e){let t=String(e||``),n=/\(retired\)\s*$/i.test(t);t=t.replace(/\s*\(retired\)\s*$/i,``),t=t.replace(/^(?:Rule\s+[IVXLCDM\d]+|Doctrine\s+[a-z]+\s+\d+)\s*[—-]\s*/i,``);let r=t.indexOf(` · `);return r===-1?{latin:``,name:t.trim(),retired:n}:{latin:t.slice(0,r).trim(),name:t.slice(r+3).trim(),retired:n}}var Ui=[[10,`X`],[9,`IX`],[5,`V`],[4,`IV`],[1,`I`]],Wi=e=>{let t=``;for(let[n,r]of Ui)for(;e>=n;)t+=r,e-=n;return t};function Gi(e){let t=/^([a-z]+)-(\d+)$/.exec(String(e));return t?t[1]===`law`?Wi(Number(t[2])):`${t[1]}.${t[2]}`:String(e)}var Ki=new Set([`I`,`III`,`IV`,`process.1`,`process.5`,`rigor.5`,`ops.2`]),qi={I:{key:`secretsGate`,label:`Secrets gate`},III:{key:`doneGate`,label:`Done gate`},IV:{key:`deletionGate`,label:`Deletion gate`}},Ji={I:{arm:`Writes that would carry a credential-shaped string are refused again.`,off:`A write carrying a credential-shaped string (on OpenCode, also a write to a key file) stops being refused. Rule I’s text still binds the agent; protected checks, real data loss and commit/push consent stay gated.`},III:{arm:`A turn that edited files cannot end before the project’s declared checks pass.`,off:`A turn that edited files may end without the checks in .geneseed/done-checks.txt passing. Rule III’s text still binds the agent; every other gate stays.`},IV:{arm:`Commands that would lose data nothing else holds ask again.`,off:`Commands that would really lose data — discarding uncommitted work, deleting an unpushed branch, removing untracked files — stop asking. Rule IV’s text still binds the agent; secrets, root-wide scans and commit/push consent stay gated.`}},Yi=(e,t={})=>qi[e]&&t?.[qi[e].key]===!1?`Gate off`:Ki.has(e)?`Hook gate`:`Instruction`;function Xi(e){let t={};for(let n of e||[]){let e=Bi[n.klass]?n.klass:`personal`,r=t[e]||(t[e]={key:e,label:Bi[e].label,ok:0,exp:0});n.status===`experimental`?r.exp+=1:r.ok+=1}let n=Vi.filter(e=>t[e]).map(e=>({...t[e],n:t[e].ok+t[e].exp}));return{rows:n,total:n.reduce((e,t)=>e+t.n,0),experimental:n.reduce((e,t)=>e+t.exp,0),max:Math.max(1,...n.map(e=>e.n))}}var Zi=(e,t,n=t+`s`)=>`${e} ${e===1?t:n}`;function Qi({overview:e,setup:t,rules:n,activity:r,profile:i,skills:a,laws:o}){let s=[],c=e?.doctor;c&&!c.ok&&s.push({id:`doctor`,tag:`Doctor`,tone:`bad`,title:`Doctor found ${Zi(c.problems.length,`problem`)}`,detail:c.problems[0]||``,where:`installs/doctor`,verb:`Review`,href:`#/installs/doctor`});let l=e?.diff,u=Hr(l);u&&s.push({id:`drift`,tag:`Drift`,tone:`warn`,title:`${Zi(u,`file`)} drifted from the source`,detail:`${l.edited} edited, ${l.added} added, ${l.missing} missing`,where:`installs/edits`,verb:`Review`,href:`#/installs/edits`}),i?.seeded&&s.push({id:`profile`,tag:`Profile`,tone:`warn`,title:`Profile is still the seeded template`,detail:`every section holds placeholder text`,where:`personal/profile`,verb:`Fill in`,href:`#/personal/profile`});let d=n?.exists?n.stats:null;d&&d.rules===0&&s.push({id:`rules`,tag:`Rules`,tone:``,title:`No standing rules yet`,detail:`0 of ${d.max_rules} · ${d.tokens} of ${d.max_tokens} tokens`,where:`personal/rules`,verb:`Write a rule`,href:`#/personal/rules`});let f=Object.entries(t?.gates?.asks||{}).sort((e,t)=>t[1]-e[1]);if(f.length){let[e,n]=f[0],r=Gi(e),i=(o?.items||[]).find(e=>e.name===r),a=i?Hi(i.title).name:r;s.push({id:`gates`,tag:`Gates`,tone:``,title:`${a} asked ${Zi(n,`time`)}`,detail:`${n} of ${t.gates.total} gate asks`,where:r,verb:`Review`,href:`#/item/law/${encodeURIComponent(r)}`})}if(a){let{rows:e,experimental:t}=Xi(a.items);t&&s.push({id:`skills`,tag:`Skills`,tone:``,title:`${Zi(t,`skill`)} still experimental`,detail:e.filter(e=>e.exp).sort((e,t)=>t.exp-e.exp).map(e=>`${e.label.toLowerCase()} ${e.exp}`).join(`, `),where:`library/skills`,verb:`Triage`,href:`#/skills`})}return t&&t.facts===0&&s.push({id:`memory`,tag:`Memory`,tone:``,title:`Memory holds no facts`,detail:`MEMORY.md is an empty index`,where:`library/memory`,verb:`Open`,href:`#/section/memory`}),r&&r.enabled===!1&&s.push({id:`activity`,tag:`Activity`,tone:``,title:`Session tracking is off`,detail:`no per-session trace is kept`,where:`activity`,verb:`Turn on`,href:`#/activity`}),s}var $i=e=>Hr(e.drift);function ea(e){let t=e?.installs||[],n=t.filter(e=>e.state===`active`),r=t.length-n.length,i=n.filter(e=>e.verdict===`behind`).length,a=n.reduce((e,t)=>e+$i(t),0),o=e?.doctor,s=o&&!o.ok?`bad`:i||a?`warn`:`good`;return{tone:s,head:{good:`Harness healthy.`,warn:`Harness needs a look.`,bad:`Harness has problems.`}[s],facts:[Zi(n.length,`active install`)+(r?`, ${r} disabled`:``),o?o.ok?`doctor clean`:`doctor found ${Zi(o.problems.length,`problem`)}`:`doctor not run yet`,i?`${Zi(i,`install`)} behind source`:`all in step with source`,a?`${Zi(a,`file`)} hand-edited`:`no hand edits`]}}var ta=[[`carrier`,`Root file`],[`skills`,`Skill list`],[`agents`,`Agent list`],[`context`,`Session files`]],na=e=>e?e.carrier+e.skills+e.agents+e.context:0,ra=e=>`≈${(e/4/1e3).toFixed(1)}k`,ia=e=>`${e.host} · ${e.scope}`;function aa({fleet:e,usage:t,...n}){let r=[],i=e?.doctor;i&&!i.ok&&r.push({id:`doctor`,tag:`Doctor`,tone:`bad`,title:`Doctor found ${Zi(i.problems.length,`problem`)}`,detail:i.problems[0]||``,where:`installs/doctor`,verb:`Review`,href:`#/installs/doctor`});for(let t of(e?.installs||[]).filter(e=>e.state===`active`)){t.verdict===`behind`&&r.push({id:`behind:${t.id}`,tag:`Behind`,tone:`warn`,title:`${ia(t)} is behind its source`,detail:t.built_epoch?`built ${Ir(t.built_epoch)} ago`:`never built`,where:t.host,verb:`Rebuild`,act:`build-all`});let e=$i(t);e&&r.push({id:`drift:${t.id}`,tag:`Drift`,tone:`warn`,title:`${ia(t)}: ${Zi(e,`file`)} edited by hand`,detail:`${t.drift.edited} edited, ${t.drift.added} added, ${t.drift.missing} missing`,where:`installs/edits`,verb:`Review`,href:`#/installs/edits`})}if(t&&t.days_counted>=30&&t.never?.length){let e=t.never.filter(e=>e.kind===`skill`).length;r.push({id:`usage`,tag:`Usage`,tone:``,sugg:!0,title:`${Zi(e,`skill`)} never fired in 30 days`,detail:`${Zi(t.never.length-e,`agent`)} too`,where:`library/skills`,verb:`Triage`,href:`#/skills`})}let a=Qi({...n,overview:n.overview&&{...n.overview,doctor:null,diff:null}});for(let e of a)r.push({...e,sugg:!0});return r}function oa(e,t){return(e?.rules||[]).map(e=>{let n=Gi(e.rule),r=(t?.items||[]).find(e=>e.name===n);return{...e,name:r?Hi(r.title).name:e.rule===`wiki`?`Wiki guard`:n}})}var sa=e=>e.catch(()=>null),ca=(e,t)=>`${t?Math.min(100,e/t*100):0}%`;function la({update:e,onAction:t}){return e?e.latest===null?(0,Z.jsxs)(`span`,{className:`mono dim ver-chip`,children:[e.current??``,` · update check unavailable`]}):e.available?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:`mono ver-chip`,children:[e.current,` `,(0,Z.jsxs)(`span`,{className:`ver-new`,children:[e.latest,` available`]})]}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>t(`update`),children:`Update`})]}):(0,Z.jsxs)(`span`,{className:`mono dim ver-chip`,children:[e.current,` · latest`]}):null}function ua({fleet:e}){let t=ea(e);return(0,Z.jsxs)(`div`,{className:`health ${t.tone}`,role:`status`,children:[(0,Z.jsx)(`span`,{className:`health-dot`,"aria-hidden":`true`}),(0,Z.jsxs)(`p`,{className:`verdict-facts`,children:[(0,Z.jsx)(`b`,{children:t.head}),t.facts.map(e=>(0,Z.jsx)(`span`,{className:`muted`,children:e},e))]})]})}function da({chars:e}){let t=yn(e);return(0,Z.jsxs)(`span`,{className:`mono`,children:[ra(t??e),` tok`]})}function fa({cost:e,i:t}){let n=2*Math.PI*14,r=e.ceiling?Math.min(1,e.carrier/e.ceiling):0;return(0,Z.jsxs)(`svg`,{className:`ldg-ring`,viewBox:`0 0 36 36`,"aria-hidden":`true`,children:[(0,Z.jsx)(`circle`,{className:`bg`,cx:`18`,cy:`18`,r:14}),(0,Z.jsx)(`circle`,{className:`fg`+(e.ceiling&&e.carrier>e.ceiling?` over`:``),cx:`18`,cy:`18`,r:14,strokeDasharray:n.toFixed(2),strokeDashoffset:(n*(1-r)).toFixed(2),style:{"--circ":n.toFixed(2),"--i":t}})]})}function pa({i:e,n:t,onAction:n,onOpen:r}){let i=(0,Z.jsxs)(`td`,{children:[(0,Z.jsx)(`span`,{className:`ldg-host`,children:e.host}),` `,(0,Z.jsx)(`span`,{className:`dim`,children:e.scope}),(0,Z.jsx)(`div`,{className:`mono dim ldg-path`,children:e.path})]});if(e.state!==`active`)return(0,Z.jsxs)(`tr`,{className:`ldg-off`,children:[i,(0,Z.jsxs)(`td`,{children:[e.theme,` `,(0,Z.jsxs)(`span`,{className:`dim`,children:[`· `,e.footprint]})]}),(0,Z.jsx)(`td`,{children:(0,Z.jsx)(`span`,{className:`pill off`,children:`disabled`})}),(0,Z.jsx)(`td`,{}),(0,Z.jsx)(`td`,{}),(0,Z.jsx)(`td`,{}),(0,Z.jsx)(`td`,{className:`ldg-act`,children:(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>r(e),children:`Open`})})]});let a=Hr(e.drift),o={synced:(0,Z.jsx)(`span`,{className:`pill good`,children:`in step`}),behind:(0,Z.jsx)(`span`,{className:`pill warn`,children:`behind source`}),unknown:(0,Z.jsx)(`span`,{className:`pill off`,children:`not checked`})}[e.verdict],s=na(e.cost),c=e.cost&&Math.round(e.cost.carrier/e.cost.ceiling*100);return(0,Z.jsxs)(`tr`,{children:[i,(0,Z.jsxs)(`td`,{children:[e.theme,` `,(0,Z.jsxs)(`span`,{className:`dim`,children:[`· `,e.footprint]})]}),(0,Z.jsx)(`td`,{children:o}),(0,Z.jsx)(`td`,{children:e.diffable?a?(0,Z.jsxs)(`span`,{className:`mono t-warn`,children:[a,` edited`]}):(0,Z.jsx)(`span`,{className:`mono dim`,children:`none`}):(0,Z.jsx)(`span`,{className:`dim`,title:`Drift is only checked for global installs`,children:`not checkable`})}),(0,Z.jsx)(`td`,{children:e.cost?(0,Z.jsxs)(`div`,{className:`ldg-cost`,title:`root file ${c}% of the ${e.footprint} ceiling`,children:[(0,Z.jsx)(fa,{cost:e.cost,i:t}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(da,{chars:s}),(0,Z.jsxs)(`span`,{className:`dim ldg-sub`,children:[`root file `,c,`% of ceiling`]})]})]}):(0,Z.jsx)(`span`,{className:`dim`,children:`not measured`})}),(0,Z.jsx)(`td`,{className:`mono dim`,children:e.built_epoch?`${Ir(e.built_epoch)} ago`:`never`}),(0,Z.jsx)(`td`,{className:`ldg-act`,children:e.verdict===`behind`||a?(0,Z.jsx)(`button`,{type:`button`,className:`btn sm`,onClick:()=>n(`build-all`),children:`Rebuild`}):(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>r(e),children:`Open`})})]})}function ma({rows:e,onAction:t}){let n=e.filter(e=>!e.sugg).length;return(0,Z.jsxs)(`section`,{className:`panel`,"aria-labelledby":`ldg-needs`,children:[(0,Z.jsxs)(`div`,{className:`panel-head panel-head-rule`,children:[(0,Z.jsx)(`h2`,{id:`ldg-needs`,children:`Needs attention`}),(0,Z.jsxs)(`span`,{className:`mono dim`,children:[n,` problem`,n===1?``:`s`,`, `,e.length-n,` suggestion`,e.length-n===1?``:`s`]})]}),e.length?(0,Z.jsx)(`ul`,{className:`needs`,children:e.map(e=>(0,Z.jsxs)(`li`,{className:e.sugg?`sugg`:``,children:[(0,Z.jsx)(`span`,{className:`tag ${e.tone}`,children:e.tag}),(0,Z.jsxs)(`span`,{className:`needs-what`,children:[(0,Z.jsx)(`b`,{children:e.title}),e.detail?(0,Z.jsxs)(`span`,{className:`dim`,children:[` · `,e.detail]}):null]}),(0,Z.jsx)(`span`,{className:`mono dim needs-where`,children:e.where}),e.act?(0,Z.jsx)(`button`,{type:`button`,className:`needs-verb linkish`,onClick:()=>t(e.act),children:e.verb}):(0,Z.jsx)(`a`,{className:`needs-verb`,href:e.href,children:e.verb})]},e.id))}):(0,Z.jsx)(`p`,{className:`needs-empty`,children:`Nothing needs you.`})]})}function ha({installs:e}){let t=e.filter(e=>e.state===`active`&&e.cost),n=Math.max(1,...t.map(e=>Math.max(na(e.cost),e.cost.ceiling||0)));return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-cost`,children:[(0,Z.jsxs)(`div`,{className:`panel-head`,children:[(0,Z.jsx)(`h2`,{id:`ldg-cost`,children:`Always-on cost`}),(0,Z.jsx)(`span`,{className:`mono dim`,children:`≈ tokens per session`})]}),t.length?t.map((e,t)=>(0,Z.jsxs)(`div`,{className:`cost-row`,children:[(0,Z.jsxs)(`div`,{className:`cost-lab`,children:[(0,Z.jsxs)(`span`,{children:[e.host,` `,(0,Z.jsx)(`span`,{className:`dim`,children:e.scope})]}),(0,Z.jsx)(`span`,{className:`mono`,children:ra(na(e.cost))})]}),(0,Z.jsxs)(`div`,{className:`cost-stack`,children:[(0,Z.jsx)(`span`,{className:`cost-segs`,style:{"--i":t},children:ta.map(([t])=>(0,Z.jsx)(`span`,{className:`cs-${t}`,style:{width:ca(e.cost[t],n)}},t))}),e.cost.ceiling?(0,Z.jsx)(`span`,{className:`cost-ceil`,style:{left:ca(e.cost.ceiling,n)},title:`root file ceiling`}):null]})]},e.id)):(0,Z.jsx)(`p`,{className:`dim`,children:`No install has a root file to measure.`}),(0,Z.jsxs)(`div`,{className:`cost-key`,children:[ta.map(([e,t])=>(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`i`,{className:`cs-${e}`}),t]},e)),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`i`,{className:`cost-ceil-key`}),`root file ceiling`]})]}),(0,Z.jsx)(`p`,{className:`dim chart-foot`,children:`Estimated as characters ÷ 4 from the emitted files.`})]})}function ga({usage:e}){let t=(0,Z.jsxs)(`div`,{className:`panel-head`,children:[(0,Z.jsx)(`h2`,{id:`ldg-usage`,children:`What fires`}),(0,Z.jsx)(`span`,{className:`mono dim`,children:`skills and agents, 30 d`})]});if(!e)return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsx)(`p`,{className:`dim`,children:`Usage could not be read.`})]});if(!e.enabled)return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsx)(`p`,{className:`dim`,children:`Usage counting is off on this machine.`})]});if(e.days_counted<30)return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsx)(`p`,{className:`muted`,children:e.since?(0,Z.jsxs)(Z.Fragment,{children:[`Counting since `,(0,Z.jsx)(`b`,{children:e.since}),`, `,e.days_counted,` of 30 days`]}):`No skill or agent call counted yet`}),(0,Z.jsx)(`div`,{className:`daytrack`,"aria-hidden":`true`,children:Array.from({length:30},(t,n)=>(0,Z.jsx)(`i`,{className:n<e.days_counted?`on`:``},n))}),(0,Z.jsx)(`p`,{className:`dim chart-foot`,children:`Rankings and the never-fired count appear once 30 days are counted, so a new install is not told every skill is unused.`})]});let n=e.rows.slice(0,7),r=Math.max(1,...n.map(e=>e.n)),i=Math.max(1,...e.per_day),a=e.per_day.reduce((e,t)=>e+t,0);return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsxs)(`div`,{className:`cols30-wrap`,children:[(0,Z.jsxs)(`div`,{className:`chart-axis mono dim`,children:[(0,Z.jsx)(`span`,{children:`calls per day`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(bn,{value:a}),` in 30 d`]})]}),(0,Z.jsx)(`div`,{className:`cols30`,"aria-hidden":`true`,children:e.per_day.map((e,t)=>(0,Z.jsx)(`i`,{className:t===29?`today`:``,style:{height:ca(e,i),"--i":t}},t))})]}),(0,Z.jsx)(`ul`,{className:`ubars`,children:n.map((e,t)=>(0,Z.jsxs)(`li`,{className:e.kind,children:[(0,Z.jsx)(`span`,{className:`ub-name`,children:e.name}),(0,Z.jsx)(`span`,{className:`ub-trk`,children:(0,Z.jsx)(`i`,{style:{width:ca(e.n,r),"--i":t}})}),(0,Z.jsx)(`span`,{className:`mono`,children:e.n})]},`${e.install}:${e.kind}:${e.name}`))}),e.never.length?(0,Z.jsxs)(`div`,{className:`ub-never`,children:[(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`b`,{children:e.never.filter(e=>e.kind===`skill`).length}),` skills never fired`]}),(0,Z.jsx)(`a`,{className:`needs-verb`,href:`#/skills`,children:`Triage`})]}):null]})}function _a({vals:e,i:t}){let n=Math.max(1,...e),r=96/(e.length-1),i=e.map((e,t)=>`${(t*r).toFixed(1)},${(20-e/n*17).toFixed(1)}`),[a,o]=i[i.length-1].split(`,`);return(0,Z.jsxs)(`svg`,{className:`spark`,viewBox:`0 0 96 22`,"aria-hidden":`true`,style:{"--i":t},children:[(0,Z.jsx)(`polyline`,{points:`0,21 96,21`,className:`spk-base`}),(0,Z.jsx)(`polygon`,{className:`spk-area`,points:`0,21 ${i.join(` `)} 96,21`}),(0,Z.jsx)(`polyline`,{className:`spk-line`,pathLength:`1`,points:i.join(` `)}),(0,Z.jsx)(`circle`,{className:`spk-end`,cx:a,cy:o,r:`2.4`})]})}function va({gates:e,laws:t}){let n=oa(e,t);return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-gates`,children:[(0,Z.jsxs)(`div`,{className:`panel-head`,children:[(0,Z.jsx)(`h2`,{id:`ldg-gates`,children:`Gates`}),(0,Z.jsx)(`span`,{className:`mono dim`,children:`asks per rule, 30 d`})]}),n.length?(0,Z.jsx)(`ul`,{className:`gate-rows`,children:n.slice(0,6).map((e,t)=>(0,Z.jsxs)(`li`,{children:[(0,Z.jsx)(`span`,{children:e.name}),(0,Z.jsx)(_a,{vals:e.per_day,i:t}),(0,Z.jsx)(`span`,{className:`mono`,children:e.n})]},e.rule))}):(0,Z.jsx)(`p`,{className:`dim`,children:e?`No gate asked in 30 days.`:`Gate activity could not be read.`})]})}function ya({overview:e,setup:t,onAction:n,onRetry:r,dataRev:i,banner:a}){let{data:o}=X(()=>sa(c.fleet()),[i]),{data:s}=X(()=>sa(c.usage()),[i]),{data:l}=X(()=>sa(c.gates()),[i]),{data:u}=X(()=>sa(c.update()),[i]),{data:d}=Fi(i),{data:f}=X(()=>sa(c.activity()),[i]),{data:p}=X(()=>sa(c.profile()),[i]),{data:m}=X(()=>sa(c.catalog(`skills`)),[i],`catalog:skills`),{data:h}=X(()=>sa(c.catalog(`laws`)),[i],`catalog:laws`),g=o?.installs||[],_=async e=>{try{await c.selectView(e.host,e.path)}catch{}r?.(),window.location.hash=`#/installs`},v=aa({fleet:o,usage:s,overview:e,setup:t,rules:d,activity:f,profile:p,skills:m,laws:h});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`page-head`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`h`,children:`Overview`}),(0,Z.jsx)(`p`,{className:`sub mono`,children:o?`${g.length} installed · machine-wide`:` `})]}),(0,Z.jsxs)(`div`,{className:`page-actions`,children:[(0,Z.jsx)(la,{update:u,onAction:n}),(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>n(`doctor`),children:`Run doctor`})]})]}),a,(0,Z.jsxs)(`div`,{className:`ov-stack ldg`,children:[o?(0,Z.jsx)(ua,{fleet:o}):(0,Z.jsx)(`div`,{className:`health`,"aria-busy":`true`}),(0,Z.jsxs)(`section`,{className:`panel`,"aria-labelledby":`ldg-fleet`,children:[(0,Z.jsxs)(`div`,{className:`panel-head panel-head-rule`,children:[(0,Z.jsx)(`h2`,{id:`ldg-fleet`,children:`Installs`}),o?.source_fp?(0,Z.jsxs)(`span`,{className:`mono dim`,children:[`source `,o.source_fp]}):null]}),(0,Z.jsx)(`div`,{className:`ldg-scroll`,children:(0,Z.jsxs)(`table`,{className:`ldg-fleet`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:`Install`}),(0,Z.jsx)(`th`,{children:`Voice`}),(0,Z.jsx)(`th`,{children:`Sync`}),(0,Z.jsx)(`th`,{children:`Hand edits`}),(0,Z.jsx)(`th`,{children:`Always-on`}),(0,Z.jsx)(`th`,{children:`Built`}),(0,Z.jsx)(`th`,{})]})}),(0,Z.jsx)(`tbody`,{children:g.map((e,t)=>(0,Z.jsx)(pa,{i:e,n:t,onAction:n,onOpen:_},e.id))})]})})]}),(0,Z.jsx)(ma,{rows:v,onAction:n}),(0,Z.jsxs)(`div`,{className:`ov-charts`,children:[(0,Z.jsx)(ha,{installs:g}),(0,Z.jsx)(ga,{usage:s}),(0,Z.jsx)(va,{gates:l,laws:h})]})]})]})}var ba=`geneseed-understand-seen`,xa=`understand`;function Sa(){try{let e=JSON.parse(localStorage.getItem(ba));return Array.isArray(e)?e:[]}catch{return[]}}function Ca(e){let t=Sa();if(t.includes(e))return t;let n=[...t,e];return localStorage.setItem(ba,JSON.stringify(n)),n}function wa(e,t){let n=e?.groups||[],r=n.findIndex(e=>e.id===xa),i=n[r]?.pages||[],a=i.findIndex(e=>e.id===t);if(a<0)return{prev:null,next:null};let o=n.slice(r+1).find(e=>e.pages.length);return{prev:i[a-1]||null,next:i[a+1]||o?.pages[0]||null}}function Ta(e,t){for(let n of e?.groups||[]){let e=n.pages.find(e=>e.id===t);if(e)return{part:n,section:e.section||`General`,page:e}}return{part:null,section:null,page:null}}function Ea(e,t){let{part:n,section:r}=Ta(e,t);if(!n)return{prev:null,next:null};if(n.id===`understand`)return wa(e,t);let i=n.pages.filter(e=>(e.section||`General`)===r),a=i.findIndex(e=>e.id===t);return{prev:i[a-1]||null,next:i[a+1]||null}}var Da=e=>jn(`#/docs/${encodeURIComponent(e)}`);function Oa({pages:e,seen:t}){let n=e.filter(e=>t.includes(e.id)).length;return(0,Z.jsx)(`div`,{className:`track-prog`,role:`progressbar`,"aria-label":`Pages read`,"aria-valuemin":0,"aria-valuemax":e.length,"aria-valuenow":n,children:(0,Z.jsx)(`i`,{style:{width:`${n/(e.length||1)*100}%`}})})}function ka({menu:e,pageId:t}){let{prev:n,next:r}=Ea(e,t);return!n&&!r?null:(0,Z.jsxs)(`div`,{className:`track-bar`,children:[n?(0,Z.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>Da(n.id),children:[`← `,n.title]}):(0,Z.jsx)(`span`,{}),r&&(0,Z.jsxs)(`button`,{className:`btn sm`,onClick:()=>Da(r.id),children:[`Next: `,r.title,` →`]})]})}var Aa=`modulepreload`,ja=function(e){return`/`+e},Ma={},Na=function(e){return e.pathname.endsWith(`.css`)},Pa=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Fa=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=ja(t,n);let r=s(t),i=Na(r);return Pa(Ma,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Aa,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ia=`geneseed-newhere-dismissed`,La=(0,Y.lazy)(()=>Fa(()=>import(`./Dashboard-BoEH5qyY.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3])));function Ra({harness:e}){let[t,n]=(0,Y.useState)(()=>!!localStorage.getItem(Ia)),{data:r}=X(()=>t?Promise.resolve(null):c.docs(e).catch(()=>null),[t,e]),i=r?.groups?.find(e=>e.id===`understand`)?.pages||[],a=Sa(),o=i.findIndex(e=>!a.includes(e.id));if(t||!i.length||o<0)return null;let s=i.filter(e=>a.includes(e.id)).length;return(0,Z.jsxs)(`section`,{className:`newhere`,"aria-label":`New here?`,children:[(0,Z.jsxs)(`div`,{className:`newhere-body`,children:[(0,Z.jsx)(`b`,{children:`New here? Understand your harness.`}),(0,Z.jsxs)(`p`,{children:[i.length,` short pages: what a harness is, what was installed, what changes in your day, and what is guaranteed.`]}),(0,Z.jsx)(`div`,{className:`newhere-dots`,"aria-label":`${s} of ${i.length} read`,children:i.map(e=>(0,Z.jsx)(`i`,{className:a.includes(e.id)?`f`:``},e.id))})]}),(0,Z.jsx)(`a`,{className:`btn`,href:`#/docs/${encodeURIComponent(i[o].id)}`,children:s?`Continue · step ${o+1}`:`Start`}),(0,Z.jsx)(`button`,{type:`button`,className:`newhere-x`,onClick:()=>{localStorage.setItem(Ia,`1`),n(!0)},title:`Dismiss for good`,"aria-label":`Dismiss`,children:`×`})]})}function za({overview:e,overviewError:t,onRetry:n,themes:r,setup:i,runs:a,onAction:o,layout:s=`overview`,dataRev:c}){if(!e)return t?(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Ni,{error:`Could not load the harness overview: ${t}`}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:n,children:`Retry`})]}):(0,Z.jsx)(Di,{});if(!e.deployed)return(0,Z.jsx)(Pi,{onAction:o});let l=(0,Z.jsx)(Ra,{harness:oi(e.emit)});return s===`overview`?(0,Z.jsx)(ya,{overview:e,setup:i,onAction:o,onRetry:n,dataRev:c,banner:l}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`page-head`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`h`,children:`Overview`}),(0,Z.jsx)(`p`,{className:`sub`,children:[e.theme&&`${e.theme} voice`,e.footprint&&`${e.footprint} footprint`,e.target].filter(Boolean).join(` · `)})]}),(0,Z.jsxs)(`div`,{className:`page-actions`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>o(`doctor`),children:`Run doctor`}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>o(`build-all`),children:`Rebuild`})]})]}),l,(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)(Di,{}),children:(0,Z.jsx)(La,{overview:e,overviewError:t,onRetry:n,themes:r,setup:i,runs:a,onAction:o,layout:s,dataRev:c})})]})}var Ba=(0,Y.lazy)(()=>Fa(()=>import(`./Activity-D7Igwuoo.js`),__vite__mapDeps([4,1,2,3,5,6]))),Va=(0,Y.lazy)(()=>Fa(()=>import(`./ActivityDetail-53rp05hx.js`),__vite__mapDeps([7,1,2,3,5,6]))),Ha=(0,Y.lazy)(()=>Fa(()=>import(`./Library-d4_uOGmC.js`),__vite__mapDeps([8,1,2,3,9,10]))),Ua=(0,Y.lazy)(()=>Fa(()=>import(`./Loops-BbYeWl70.js`),__vite__mapDeps([11,1,2,3,6,9,10]))),Wa=(0,Y.lazy)(()=>Fa(()=>import(`./Laws-iEheocNI.js`),__vite__mapDeps([12,1,2,3,10]))),Ga=(0,Y.lazy)(()=>Fa(()=>import(`./Personal-B_YQJjA_.js`),__vite__mapDeps([13,1,2,3,9,10,14,8]))),Ka=(0,Y.lazy)(()=>Fa(()=>import(`./Installs-Dh1tB1NK.js`),__vite__mapDeps([15,1,2,3,14]))),qa=(0,Y.lazy)(()=>Fa(()=>import(`./Docs-BM56RCT8.js`),__vite__mapDeps([16,1,2,3,9,10])));function Ja(){let e=An(),[t,n]=(0,Y.useState)(``),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(!1),[s,l]=$n(),[u,d]=ir(),f=e=>{if(!document.startViewTransition||!_n())return d(e);document.startViewTransition(()=>(0,hn.flushSync)(()=>d(e)))},[p,m]=hr(),[h,g]=br(),[_,v]=(0,Y.useState)(()=>{try{return!window.sessionStorage.getItem(`gs-booted`)}catch{return!0}}),[y,b]=(0,Y.useState)(!1),x=(0,Y.useRef)(null),S=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{if(!y)return;let e=e=>{e.key===`Escape`&&b(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]),(0,Y.useEffect)(()=>{if(!y)return;let e=S.current,t=document.activeElement;return e&&(e.inert=!0),document.getElementById(`rail-nav`)?.focus(),()=>{e&&(e.inert=!1),t instanceof HTMLElement&&t.focus()}},[y]);let C=e=>i({kind:e?.body?.kind||`err`,msg:e?.body?.message||e.message}),{overview:w,error:T,themes:E,reload:D}=xr(C),[O,ee]=(0,Y.useState)(0),k=()=>{D(),ee(e=>e+1)},[te,ne]=(0,Y.useState)(null),{runs:A,activeId:j,consoleOpen:M,setConsoleOpen:N,runAction:P,cancelJob:F,clearRuns:re}=Or({onFinish:e=>{k(),ne({status:e,at:Date.now()})},onError:C}),{data:ie}=X(()=>c.setup().catch(()=>null),[O],`setup`),{data:ae}=X(()=>c.installs().catch(()=>null),[O],`installs`),oe=ae?.installs||null,I=A[A.length-1],se=I?I.status===`running`?`${I.action} running`:`${I.action} ${I.status}`:``;(0,Y.useEffect)(()=>{let e=x.current;if(!e||Xn(e,dr(p),s))return;let t=pr(p);if(t)return Ln(e,t,s);zn(e,u,s)||w?.accent&&Ln(e,w.accent,s)},[w,s,p,u]);let ce={flavour:u,onFlavour:f,accentMode:p,onAccentMode:m,layout:h,onLayout:g};return(0,Z.jsx)(`div`,{className:`app fl-${u} ${s===`light`?`light`:``}${y?` nav-open`:``}`,ref:x,children:(0,Z.jsxs)(Mi,{children:[(0,Z.jsx)(`div`,{className:`atmos`,"aria-hidden":`true`}),(0,Z.jsx)(`a`,{className:`skip-link`,href:`#main`,children:`Skip to content`}),(0,Z.jsx)(`p`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:se}),y&&(0,Z.jsx)(`button`,{type:`button`,className:`nav-scrim`,"aria-label":`Close navigation`,onClick:()=>b(!1)}),(0,Z.jsx)(Xr,{route:e,overview:w,installs:oe,onOpenVoice:()=>o(e=>!e),onNavigate:()=>b(!1)}),a&&(0,Z.jsx)(yi,{themes:E,current:w?.theme,onPick:e=>{o(!1),P(`build`,{theme:e,emit:w?.emit})},onClose:()=>o(!1)}),(0,Z.jsxs)(`div`,{className:`col`,ref:S,children:[(0,Z.jsx)(vi,{route:e,navOpen:y,onToggleNav:()=>b(e=>!e),overview:w,installs:oe,query:t,onQuery:n,mode:s,onToggleMode:l,appearance:ce,dataRev:O,onSwitch:k}),(0,Z.jsx)(`main`,{className:`page`,id:`main`,tabIndex:-1,children:(0,Z.jsx)(`div`,{className:[`library`,`loops`,`docs`].includes(e.page)?`pad pad-wide`:`pad`,children:(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)(Di,{}),children:{overview:()=>(0,Z.jsx)(za,{overview:w,overviewError:T,onRetry:D,themes:E,setup:ie,runs:A,onAction:P,layout:h,dataRev:O}),laws:()=>(0,Z.jsx)(Wa,{selected:e.item,overview:w,setup:ie,onAction:P,dataRev:O}),library:()=>(0,Z.jsx)(Ha,{overview:w,section:e.section,selected:e.item,dataRev:O}),loops:()=>(0,Z.jsx)(Ua,{tab:e.tab,item:e.item,dataRev:O}),personal:()=>(0,Z.jsx)(Ga,{tab:e.tab,item:e.item,setup:ie,dataRev:O}),installs:()=>(0,Z.jsx)(Ka,{tab:e.tab,overview:w,setup:ie,themes:E,onAction:P,onMutated:k,dataRev:O,appearance:ce}),activity:()=>e.item?(0,Z.jsx)(Va,{sid:e.item},e.item):(0,Z.jsx)(Ba,{}),docs:()=>(0,Z.jsx)(qa,{page:e.item,onAction:P,overview:w})}[e.page]?.()})})}),(0,Z.jsx)(Zr,{route:e}),(0,Z.jsx)(Si,{runs:A,open:M,busy:!!j,finish:te,onToggle:()=>N(e=>!e),onClear:re,onCancel:F})]}),r&&(0,Z.jsx)(xi,{toast:r,onClose:()=>i(null)}),_&&(0,Z.jsx)(Ei,{ready:!!w||!!T,onDone:()=>{try{window.sessionStorage.setItem(`gs-booted`,`1`)}catch{}v(!1)}})]})})}(0,gn.createRoot)(document.getElementById(`root`)).render((0,Z.jsx)(Ja,{})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`).catch(()=>{})});export{mn as $,$r as A,X as B,Di as C,C as Ct,oi as D,m as Dt,ii as E,b as Et,Vr as F,wn as G,_r as H,Br as I,bn as J,Tn as K,zr as L,ei as M,Q as N,ai as O,Hr as P,Sn as Q,Ir as R,ji as S,I as St,hi as T,x as Tt,mr as U,Er as V,tr as W,vn as X,_n as Y,yn as Z,zi as _,pe as _t,Ca as a,jt as at,Pi as b,Fe as bt,Ji as c,ct,Gi as d,Re as dt,ln as et,Hi as f,Pe as ft,Vi as g,de as gt,Bi as h,fe as ht,Oa as i,Kt as it,ni as j,Qr as k,qi as l,at as lt,Ri as m,me as mt,ka as n,an as nt,Ta as o,kt as ot,Li as p,U as pt,jn as q,xa as r,on as rt,Sa as s,wt as st,Fa as t,cn as tt,Yi as u,W as ut,Ii as v,R as vt,gi as w,h as wt,Ni as x,we as xt,Fi as y,Ie as yt,Ur as z};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-C5ATa3ow.js","assets/sections-BET3c1WT.js","assets/react-BOF6yL40.js","assets/api-CiXlkbe0.js","assets/Activity-C8sZVIUU.js","assets/activity-DvPxoS4Y.js","assets/usePoll-NSTzLOF4.js","assets/ActivityDetail-Cc6vWUS4.js","assets/Library-BWwiy9Vb.js","assets/Markdown-iHvBrpRN.js","assets/FilterInput-zLFXoSt6.js","assets/Loops-DaPk-ckL.js","assets/Laws-BA3CzUf5.js","assets/Personal-Bwd27CmT.js","assets/Tabs-BOD7Kaz1.js","assets/Installs-CB_rvbBP.js","assets/Docs-tDW7i7mo.js"])))=>i.map(i=>d[i]);
2
+ import{i as e,n as t,r as n,s as r}from"./sections-BET3c1WT.js";import{i,n as a,r as o,t as s}from"./react-BOF6yL40.js";import{t as c}from"./api-CiXlkbe0.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=typeof window<`u`,u=l?window:null,d=l?document:null,f={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},p={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},m={NONE:0,AUTO:1,FORCE:2},h={replace:0,none:1,blend:2},g=Symbol(),_=Symbol(),v=Symbol(),y=Symbol(),b=Symbol(),x=1e-11,S=0xe8d4a51000,C=1e3,w=[],T=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),E=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],D=E.reduce((e,t)=>({...e,[t]:t+`(`}),{}),O=()=>{},ee=e=>e,k=/\)\s*[-.\d]/,te=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,ne=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,A=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,j=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,M=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,N=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,P=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,F=/([a-z])([A-Z])/g,re=/(\*=|\+=|-=)/,ie=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,ae={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:C,delay:0,loopDelay:0,ease:`out(2)`,composition:h.replace,modifier:ee,onBegin:O,onBeforeUpdate:O,onUpdate:O,onLoop:O,onPause:O,onComplete:O,onRender:O},oe={current:null,root:d},I={defaults:ae,precision:4,timeScale:1,tickThreshold:200,editor:null},se={version:`4.5.0`,engine:null};l&&(u.AnimeJS||=[],u.AnimeJS.push(se));var ce=e=>e.replace(F,`$1-$2`).toLowerCase(),L=(e,t)=>e.indexOf(t)===0,le=Date.now,ue=Array.isArray,de=e=>e&&e.constructor===Object,fe=e=>typeof e==`number`&&!isNaN(e),pe=e=>typeof e==`string`,me=e=>typeof e==`function`,R=e=>e===void 0,he=e=>R(e)||e===null,z=e=>l&&e instanceof SVGElement,ge=e=>te.test(e),_e=e=>L(e,`rgb`),ve=e=>L(e,`hsl`),ye=e=>ge(e)||(_e(e)||ve(e))&&(e[e.length-1]===`)`||!k.test(e)),be=e=>!I.defaults.hasOwnProperty(e),xe=[`opacity`,`rotate`,`overflow`,`color`],B=(e,t)=>{if(xe.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},Se=e=>pe(e)?parseFloat(e):e,Ce=Math.pow,we=Math.sqrt,Te=Math.sin,Ee=Math.cos,De=Math.abs,Oe=Math.floor,ke=Math.asin,Ae=Math.PI,je=Math.round,Me=(e,t,n)=>e<t?t:e>n?n:e,V=(e,t)=>{if(t<0)return e;if(!t)return je(e);let n=10**t;return je(e*n)/n},Ne=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,Pe=e=>e===1/0?S:e===-1/0?-S:e,Fe=e=>e<=1e-11?x:Pe(V(e,11)),H=e=>ue(e)?[...e]:e,Ie=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=R(i)?t[r]:i}return n},U=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Le=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},Re=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},ze=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[y],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!R(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:L(t,`scale`)?`1`:L(t,`rotate`)||L(t,`skew`)?`0deg`:`0px`},Be=e=>{let t=``;for(let n=0,r=E.length;n<r;n++){let r=E[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${D[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Ve=[];function He(e,t){if(!e)return null;let n=Ve.length;outer:for(let r=0;r<n;r++){let n=Ve[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=Ve[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Ue=e=>{let t=ne.exec(e)||A.exec(e),n=R(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},We=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},Ge=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Ke=e=>{let t=j.exec(e)||M.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=R(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=V(Ge(t,e,n+1/3)*255,0),s=V(Ge(t,e,n)*255,0),c=V(Ge(t,e,n-1/3)*255,0)}return[o,s,c,a]},qe=e=>_e(e)?Ue(e):ge(e)?We(e):ve(e)?Ke(e):[0,0,0,1],W=(e,t)=>R(e)?t:e,Je=(e,t)=>{let n=e.match(ie),r=t[_]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},Ye=(e,t,n,r,i,a)=>{if(me(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(pe(e)&&L(e,`var(`)){if(!i)return Je(e,t);let n=()=>Je(e,t);return i.func=n,n()}return e},Xe=(e,t)=>e[_]?e[v]&&B(e,t)?f.ATTRIBUTE:E.includes(t)||T.get(t)?f.TRANSFORM:L(t,`--`)?f.CSS_VAR:t in e.style?f.CSS:t in e?f.OBJECT:f.ATTRIBUTE:f.OBJECT,Ze=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[b]||e).getPropertyValue(t);return i===`auto`?`0`:i},Qe=(e,t,n,r)=>{let i=R(n)?Xe(e,t):n,a=He(e,t);if(a){let n=a.get(e);return n&&r&&(r[t]=n),n??0}if(i===f.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===f.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===f.TRANSFORM?ze(e,t,r):i===f.CSS_VAR?Ze(e,t,r).trimStart():Ze(e,t,r)},$e=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,et=()=>({t:p.NUMBER,n:0,u:null,o:null,d:null,s:null}),G=(e,t)=>{if(t.t=p.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&P.exec(r);if(i)return t.t=p.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(ye(r))return t.t=p.COLOR,t.d=qe(r),t;{let e=r.match(N);return t.t=p.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(N)||[],t}},tt=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=H(e._toNumbers),t.s=H(e._strings),t),nt=et(),rt=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(V(Ne(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},it=(e,t,n,r,i)=>{let a=e.parent,o=e.duration,s=e.completed,c=e.iterationDuration,l=e.iterationCount,u=e._currentIteration,d=e._loopDelay,g=e._reversed,_=e._alternate,v=e._hasChildren,b=e._delay,S=e._currentTime,C=b+c,w=t-b,T=Me(S,-b,o),E=Me(w,-b,o),D=w-S,O=E>0,ee=E>=o,k=o<=x,te=i===m.FORCE,ne=0,A=w,j=0;if(l>1){let t=c+(ee?0:d),n=~~(E/t);e._currentIteration=Me(n,0,l),ee&&e._currentIteration--,ne=e._currentIteration%2,A=E-n*t||0}let M=g^(_&&ne),N=e._ease,P=ee?M?0:o:M?c-A:A;N&&(P=c*N(P/c)||0);let F=(a?a.backwards:w<S)?!M:!!M;if(e._currentTime=w,e._iterationTime=P,e.backwards=F,O&&!e.began?(e.began=!0,!n&&(!a||!F&&a.began)&&e.onBegin(e)):w<=0&&(e.began=!1),!n&&!v&&O&&e._currentIteration!==u&&e.onLoop(e),te||i===m.AUTO&&(t>=(a&&b>0?0:b)&&t<=C||t<=b&&T>b||t>=C&&T!==o)||P>=C&&T!==o||P<=b&&T>0&&!ee||t<=T&&T===o&&s||ee&&!s&&k){if(O&&(e.computeDeltaTime(T),n||e.onBeforeUpdate(e)),!v){let t=te||(F?D*-1:D)>=I.tickThreshold,i=V(e._offset+(a?a._offset:0)+b+P,12),o=e._head,s,c,l,u,d=0;for(;o;){let e=o._composition,n=o._currentTime,a=o._changeDuration,m=o._absoluteStartTime+o._changeDuration,g=o._nextRep,_=o._prevRep,v=e!==h.none,b=_?_._absoluteStartTime+_._changeDuration:0,x=_&&_.parent!==o.parent,S=!g||g._isOverridden?m:g.parent===o.parent?m+g._delay:g._absoluteStartTime<g._absoluteUpdateStartTime?g._absoluteStartTime:g._absoluteUpdateStartTime;if((t||(n!==a||i<=S||_&&!x&&(!g||g.parent!==o.parent))&&(n!==0||i>=o._absoluteStartTime||x&&!o._hasFromValue&&!_._isOverridden&&i>=b||g&&!g._isOverridden&&g.parent===o.parent&&g._currentTime!==0&&P<g._startTime))&&(!_||x||P>=o._startTime)&&(!v||!o._isOverridden&&(!o._isOverlapped||i<=m)&&(!g||g._isOverridden||i<=S)&&(!_||_._isOverridden||(x?i>=o._absoluteStartTime||!o._hasFromValue&&i>=b:i>=b+o._delay)))){let t=o._currentTime=Me(P-o._startTime,0,a),n=o._ease(t/o._updateDuration),i=o._modifier,m=o._valueType,g=o._tweenType,_=g===f.OBJECT,b=m===p.NUMBER,x=b&&_||n===0||n===1?-1:I.precision,S,C;if(b)S=C=i(V(Ne(o._fromNumber,o._toNumber,n),x));else if(m===p.UNIT)C=i(V(Ne(o._fromNumber,o._toNumber,n),x)),S=`${C}${o._unit}`;else if(m===p.COLOR){let e=o._numbers,t=o._fromNumbers,a=o._toNumbers,s=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*s+d*d*n)),e[1]=i(Math.sqrt(l*l*s+f*f*n)),e[2]=i(Math.sqrt(u*u*s+p*p*n)),e[3]=i(Ne(t[3],a[3],n)),(!o._setter||r)&&(S=`rgba(${V(e[0],0)},${V(e[1],0)},${V(e[2],0)},${e[3]})`)}else m===p.COMPLEX&&(S=rt(o,n,x));if(v&&(o._number=C),!r&&e!==h.blend){let e=o.property;s=o.target,o._setter?o._setter(s,C,o):_?s[e]=S:g===f.ATTRIBUTE?s.setAttribute(e,S):(c=s.style,g===f.TRANSFORM?(s!==l&&(l=s,u=s[y]),u[e]=S,d=1):g===f.CSS?c[e]=S:g===f.CSS_VAR&&c.setProperty(e,S)),O&&(j=1)}else o._value=S}else n&&_&&!x&&P<o._startTime&&(o._currentTime=0);d&&o._renderTransforms&&(c.transform=Be(u),d=0),o=o._next}!n&&j&&e.onRender(e)}!n&&O&&e.onUpdate(e)}return a&&k?!n&&(a.began&&!F&&w>0&&!s||F&&w<=1e-11&&s)&&(e.onComplete(e),e.completed=!F):O&&ee?l===1/0?e._startTime+=e.duration:e._currentIteration>=l-1&&(e.paused=!0,!s&&!v&&(e.completed=!0,!n&&(!a||!F&&a.began)&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,j},at=(e,t,n,r,i)=>{let a=e._currentIteration;if(it(e,t,n,r,i),e._hasChildren){let o=e,s=o.backwards,c=r?t:o._iterationTime,l=le(),u=0,d=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;U(o,t=>{if(!s)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&it(t,e,n,1,m.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}U(o,e=>{let t=V((c-e._offset)*e._speed,12);if(s&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(l):i;u+=it(e,t,n,r,a),!e.completed&&d&&(d=!1)},s),!n&&u&&o.onRender(o),(d||s)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},ot={},st=(e,t,n)=>{if(n===f.TRANSFORM)return T.get(e)||e;if(n===f.CSS||n===f.ATTRIBUTE&&z(t)&&e in t.style){let t=ot[e];if(t)return t;{let t=e&&ce(e);return ot[e]=t,t}}return e},ct=(e,t=!1)=>{if(e._hasChildren)U(e,e=>ct(e,t),!0);else{let n=e;n.pause(),U(n,e=>{let r=e.property,i=e.target,a=e._tweenType,o=e._inlineValue,s=he(o)||o===``;if(e._setter){if(!t&&!s){if(G(o,nt),nt.d){let t=nt.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=nt.n;e._setter(e.target,e._number,e)}}else if(a===f.OBJECT)!t&&!s&&(i[r]=o);else if(i[_]){if(a===f.ATTRIBUTE)t||(s?i.removeAttribute(r):i.setAttribute(r,o));else{let t=i.style;if(a===f.TRANSFORM){let n=i[y];s?delete n[r]:n[r]=o,e._renderTransforms&&(Object.keys(n).length?t.transform=Be(n):t.removeProperty(`transform`))}else s?t.removeProperty(ce(r)):t[r]=o}}i[_]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},lt=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=C/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?x:t,r=C/n;n>ae.frameRate&&(ae.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?x:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?m.NONE:(this._lastTickTime=n>=t?e-n%t:e,m.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},ut={animation:null,update:O},dt=e=>{let t=ut.animation;return t||(t={duration:x,computeDeltaTime:O,_offset:0,_delay:0,_head:null,_tail:null},ut.animation=t,ut.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===p.COMPLEX||e===p.COLOR?H(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),it(t,1,1,0,m.FORCE)}),t},ft=l?requestAnimationFrame:setImmediate,pt=l?cancelAnimationFrame:clearImmediate,mt=class extends lt{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=ae,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=le();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Le(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):at(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):m.AUTO),r=i}ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(le()),this.reqId=ft(ht)),this}pause(){if(this.reqId)return this.paused=!0,gt()}resume(){if(this.paused)return this.paused=!1,U(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(I.timeScale===1?1:C)}set speed(e){let t=e*I.timeScale;this._speed!==t&&(this._speed=t,U(this,e=>e.speed=e._speed))}get timeUnit(){return I.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(I.timeScale!==r){I.timeScale=r,I.tickThreshold=200*r;let e=n?t:C;this.defaults.duration*=e,this._speed*=e}}get precision(){return I.precision}set precision(e){I.precision=e}},K=(()=>{let e=new mt(le());return l&&(se.engine=e,d.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(d.hidden?e.pause():e.resume())})),e})(),ht=()=>{K._head?(K.reqId=ft(ht),K.update()):K.reqId=0},gt=()=>(pt(K.reqId),K.reqId=0,K),_t={_rep:new WeakMap,_add:new Map},vt=(e,t,n=`_rep`)=>{let r=_t[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},yt=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,bt=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=x,e._currentTime=x},xt=(e,t)=>{let n=e._composition;if(n===h.replace){let n=e._absoluteStartTime;Re(t,e,yt,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){bt(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)bt(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=V(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&bt(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(U(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;U(e,e=>{e!==t&&U(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===h.blend){let t=vt(e.target,e.property,`_add`),n=dt(_t._add),r=t._head;r||(r={...e},r._composition=h.replace,r._updateDuration=x,r._startTime=0,r._numbers=H(e._fromNumbers),r._number=0,r._next=null,r._prev=null,Re(t,r),Re(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=H(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=H(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}Re(t,e,null,`_prevAdd`,`_nextAdd`)}return e},St=e=>{let t=e._composition;if(t!==h.none){let n=e.target,r=e.property,i=_t._rep.get(n)[r];if(Le(i,e,`_prevRep`,`_nextRep`),t===h.blend){let t=_t._add,i=t.get(n);if(!i)return;let a=i[r],o=ut.animation;Le(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Le(a,s,`_prevAdd`,`_nextAdd`),Le(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},Ct=(e,t,n)=>{let r=!1;return U(t,i=>{let a=i.target;if(e.includes(a)){let e=i.property,o=i._tweenType,s=st(n,a,o);(!s||s&&s===e)&&(i.parent._tail===i&&i._tweenType===f.TRANSFORM&&i._prev&&i._prev._tweenType===f.TRANSFORM&&(i._prev._renderTransforms=1),Le(t,i),St(i),r=!0)}},!0),r},wt=(e,t,n)=>{let r=t||K,i;if(r._hasChildren){let t=0;U(r,a=>{if(!a._hasChildren){if(i=Ct(e,a,n),i&&!a._head)a.cancel(),Le(r,a);else{let e=a._offset+a._delay+a.duration;e>t&&(t=e)}}a._head?wt(e,a,n):a._hasChildren=!1},!0),R(r.iterationDuration)||(r.iterationDuration=t)}else i=Ct(e,r,n);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},Tt=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Et=e=>e._cancelled?(e._hasChildren?U(e,Et):U(e,e=>{e._composition!==h.none&&xt(e,vt(e.target,e.property))}),e._cancelled=0,e):e,Dt=0,Ot=(e,t)=>e._priority>t._priority,kt=class extends lt{constructor(e={},t=null,n=0){super(0),++Dt;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;oe.current&&oe.current.register(this);let b=t?0:K._lastTickTime,x=t?t.defaults:I.defaults,S=me(i)||R(i)?x.delay:+i,C=me(a)||R(a)?1/0:+a,w=W(c,x.loop),T=W(l,x.loopDelay),E=w===!0||w===1/0||w<0?1/0:w+1,D=0;t?D=n:(K.reqId||K.requestTick(le()),D=(K._lastTickTime-K._startTime)*I.timeScale),this.id=R(r)?Dt:r,this.parent=t,this.duration=Pe((C+T)*E-T)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=h||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=C,this.iterationCount=E,this._autoplay=!t&&W(u,x.autoplay),this._offset=D,this._delay=S,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=O,this._running=!1,this._reversed=+W(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=W(s,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=W(d,x.frameRate),this._speed=W(f,x.playbackRate),this._priority=+W(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Me(V(this._currentTime,I.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Me(V(this._iterationTime,I.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Me(V(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Me(V(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Me(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return Et(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,at(this,0,1,~~e,m.FORCE),Tt(this),this._hasChildren&&U(this,Tt),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&at(this,this.duration,1,~~e,m.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!R(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*K._speed);return this._startTime=le()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?at(this,x,0,0,m.FORCE):(this._running||=(Re(K,this,Ot),K._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,K.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){Et(this),this.completed=!1;let r=this.paused;return this.paused=!0,at(this,e+this._delay,~~t,~~n,m.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Oe(S/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?U(this,e=>e.cancel(),!0):U(this,St),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=Fe(e);if(t===n)return this;let r=e/t,i=e<=x;return this.duration=i?x:n,this.iterationDuration=i?x:Fe(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){at(this,0,1,0,m.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=O){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=O};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function At(e){let t=pe(e)?oe.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function jt(e){if(he(e))return[];if(!l)return ue(e)&&e.flat(1/0)||[e];if(ue(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!he(r)){let e=At(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!he(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=At(e);return t?Array.from(t):[e]}function Mt(e){let t=jt(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[g]){n[g]=!0;let e=z(n);(n.nodeType||e)&&(n[_]=!0,n[v]=e,n[y]={})}}return t}var Nt={deg:1,rad:180/Ae,turn:360},Pt={},Ft=(e,t,n,r=!1)=>{let i=t.u,a=t.n;if(t.t===p.UNIT&&i===n)return t;let o=a+i+n,s=Pt[o];if(!R(s)&&!r)t.n=s;else{let r;if(i in Nt)r=a*Nt[i]/Nt[n];else{let t=e.cloneNode(),o=e.parentNode,s=o&&o!==d?o:d.body;s.appendChild(t);let c=t.style;c.width=100+i;let l=t.offsetWidth||100;c.width=100+n;let u=l/(t.offsetWidth||100);s.removeChild(t),r=u*a}t.n=r,Pt[o]=r}return t.t,p.UNIT,t.u=n,t},It=e=>e,Lt=(e=1.68)=>t=>Ce(t,+e),Rt={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},zt=Ae/2,Bt=Ae*2,Vt={"":Lt,Quad:Lt(2),Cubic:Lt(3),Quart:Lt(4),Quint:Lt(5),Sine:e=>1-Ee(e*zt),Circ:e=>1-we(1-e*e),Expo:e=>e?Ce(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Ce(2,--n))-1)/11;);return 1/Ce(4,3-n)-7.5625*Ce((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=Me(+e,1,10),r=Me(+t,x,2),i=r/Bt*ke(1/n),a=Bt/r;return e=>e===0||e===1?e:-n*Ce(2,-10*(1-e))*Te((1-e-i)*a)}},Ht=(()=>{let e={linear:It,none:It};for(let t in Rt)for(let n in Vt){let r=Vt[n],i=Rt[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),Ut={linear:It,none:It},Wt=e=>{if(Ut[e])return Ut[e];if(e.indexOf(`(`)<=-1){let t=Rt[e]||e.includes(`Back`)||e.includes(`Elastic`)?Ht[e]():Ht[e];return t?Ut[e]=t:It}{let t=e.slice(0,-1).split(`(`),n=Ht[t[0]];return n?Ut[e]=n(...t[1].split(`,`)):It}},Gt=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],Kt=e=>{if(pe(e)){for(let t=0,n=Gt.length;t<n;t++)if(L(e,Gt[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),It}return me(e)?e:pe(e)?Wt(e):It},q=et(),J=et(),qt={},Jt={func:null},Yt={func:null},Xt=[null],Zt=[null,null],Qt={to:null},$t=0,en=0,tn,nn,rn=(e,t)=>{let n={};if(ue(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(be);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];be(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=W(t.duration,I.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(be(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},an=class extends kt{constructor(e,t,n,r,i=!1,a=0,o){super(t,n,r),this._head,this._tail,++en;let s=Mt(e),c=s.length,l=t.keyframes,u=l?Ie(rn(l,t),t):t,{id:d,delay:m,duration:g,ease:_,playbackEase:v,modifier:y,composition:b,onRender:S}=u,C=n?n.defaults:I.defaults,T=W(_,C.ease),E=W(v,C.playbackEase),D=E?Kt(E):null,O=!R(T.ease),ee=O?T.ease:W(_,D?`linear`:C.ease),k=O?T.settlingDuration:W(g,C.duration),te=W(m,C.delay),ne=y||C.modifier,A=R(b)&&c>=1e3?h.none:R(b)?C.composition:b,j=this._offset+(n?n._offset:0);O&&(T.parent=this);let M=NaN,N=NaN,P=0,F=0;for(let e=0;e<c;e++){let t=s[e],r=a||e,c=o||s,l=NaN,d=NaN;for(let e in u)if(be(e)){let a=Xe(t,e),o=He(t,e),s=st(e,t,a),m=u[e],g=ue(m);if(i&&!g&&(Zt[0]=m,Zt[1]=m,m=Zt),g){let e=m.length,t=!de(m[0]);e===2&&t?(Qt.to=m,Xt[0]=Qt,tn=Xt):e>2&&t?(tn=[],m.forEach((e,t)=>{t?t===1?(Zt[1]=e,tn.push(Zt)):tn.push(e):Zt[0]=e})):tn=m}else Xt[0]=m,tn=Xt;let _=null,v=null,y=NaN,b=0,x=0;for(let e=tn.length;x<e;x++){let i=tn[x];de(i)?nn=i:(Qt.to=i,nn=Qt),Jt.func=null,Yt.func=null;let l=Ye(W(nn.composition,A),t,r,c,null,null),u=fe(l)?l:h[l];!_&&u!==h.none&&(_=vt(t,s));let d=_?_._tail:null,f=n&&d&&d.parent.parent===n?d:v,m=Ye(nn.to,t,r,c,Jt,f),g;de(m)&&!R(m.to)?(nn=m,g=m.to):g=m;let S=Ye(nn.from,t,r,c,Yt,f),C=nn.ease||ee,T=Ye(C,t,r,c,null,f),E=me(T)||pe(T)?T:C,D=!R(E)&&!R(E.ease),O=D?E.ease:E,M=D?E.settlingDuration:Ye(W(nn.duration,e>1?Ye(k,t,r,c,null,f)/e:k),t,r,c,null,f),N=Ye(W(nn.delay,x?0:te),t,r,c,null,f),re=nn.modifier||ne,ie=!R(S),ae=!R(g),oe=ue(g),I=oe||ie&&ae,se=v?b:0,ce=v?b+N:N,L=V(j+ce,12),le=V(j+se,12);!F&&(ie||oe)&&(F=1);let z=v;if(u!==h.none){let e=_._head;for(;e&&e._absoluteStartTime<=L;)if(e._isOverridden||(z=e),e=e._nextRep,e&&e._absoluteStartTime>=L)for(;e;)bt(e),e=e._nextRep}if(I){G(oe?Ye(g[0],t,r,c,Yt,f):S,q),G(oe?Ye(g[1],t,r,c,Jt,f):g,J);let e=Qe(t,s,a,qt);q.t===p.NUMBER&&(z?z._valueType===p.UNIT&&(q.t=p.UNIT,q.u=z._unit):(G(e,nt),nt.t===p.UNIT&&(q.t=p.UNIT,q.u=nt.u)))}else ae?G(g,J):v?tt(v,J):G(n&&z&&z.parent.parent===n?z._value:Qe(t,s,a,qt),J),ie?G(S,q):v?tt(v,q):G(n&&z&&z.parent.parent===n?z._value:Qe(t,s,a,qt),q);if(q.o&&(q.n=$e(z?z._toNumber:G(Qe(t,s,a,qt),nt).n,q.n,q.o)),J.o&&(J.n=$e(q.n,J.n,J.o)),q.t!==J.t){if(q.t===p.COMPLEX||J.t===p.COMPLEX){let e=q.t===p.COMPLEX?q:J,t=q.t===p.COMPLEX?J:q;t.t=p.COMPLEX,t.s=H(e.s),t.d=e.d.map(()=>t.n)}else if(q.t===p.UNIT||J.t===p.UNIT){let e=q.t===p.UNIT?q:J,t=q.t===p.UNIT?J:q;t.t=p.UNIT,t.u=e.u}else if(q.t===p.COLOR||J.t===p.COLOR){let e=q.t===p.COLOR?q:J,t=q.t===p.COLOR?J:q;t.t=p.COLOR,t.d=e.d.map(()=>0)}}if(q.u!==J.u){let e=J.u?q:J;e=Ft(t,e,J.u?J.u:q.u,!1)}if(J.d&&q.d&&J.d.length!==q.d.length){let e=q.d.length>J.d.length?q:J,t=e===q?J:q;t.d=e.d.map((e,n)=>R(t.d[n])?0:t.d[n]),t.s=H(e.s)}let ge=V(+M||1e-11,12),_e=qt[s];he(_e)||(qt[s]=null);let ve=o?o.set:null;b=V(ce+ge,12);let ye=q.d,be=J.d,xe=J.s,B={parent:this,id:$t++,property:s,target:t,_value:null,_toFunc:Jt.func,_fromFunc:Yt.func,_ease:Kt(O),_fromNumbers:ye?H(ye):w,_toNumbers:be?H(be):w,_strings:xe?H(xe):w,_fromNumber:q.n,_toNumber:J.n,_numbers:ye?H(ye):w,_number:q.n,_unit:J.u,_modifier:re,_currentTime:0,_startTime:ce,_delay:+N,_updateDuration:ge,_changeDuration:ge,_absoluteStartTime:L,_absoluteUpdateStartTime:le,_absoluteEndTime:V(j+b,12),_hasFromValue:ie||oe?1:0,_tweenType:a,_setter:ve,_valueType:J.t,_composition:u,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:_e,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};u!==h.none&&xt(B,_);let Se=B._valueType;if(Se===p.COMPLEX)B._value=rt(B,1,-1);else if(Se===p.UNIT)B._value=`${re(B._toNumber)}${B._unit}`;else if(Se===p.COLOR){let e=J.d;B._value=`rgba(${V(e[0],0)},${V(e[1],0)},${V(e[2],0)},${e[3]})`}else B._value=re(B._toNumber);isNaN(y)&&(y=B._startTime),v=B,P++,Re(this,B)}(isNaN(N)||y<N)&&(N=y),(isNaN(M)||b>M)&&(M=b),a===f.TRANSFORM&&(l=P-x,d=P)}if(!isNaN(l)){let e=0;U(this,t=>{e>=l&&e<d&&(t._renderTransforms=1,t._composition===h.blend&&U(ut.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),N?(U(this,e=>{e._startTime-e._delay||(e._delay-=N),e._startTime-=N}),M-=N):N=0,M||(M=x,this.iterationCount=0),this.targets=s,this.id=R(d)?en:d,this.duration=M===1e-11?x:Pe((M+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||C.onRender,this._ease=D,this._delay=N,this.iterationDuration=M,!this._autoplay&&F&&this.onRender(this)}stretch(e){let t=this.duration;if(t===Fe(e))return this;let n=e/t;return U(this,e=>{e._updateDuration=Fe(e._updateDuration*n),e._changeDuration=Fe(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return U(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(G(n(),q),q.u!==e._unit&&e.target[_]&&Ft(e.target,q,e._unit,!0),e._fromNumbers=H(q.d),e._fromNumber=q.n):t&&(G(Qe(e.target,e.property,e._tweenType),nt),e._fromNumbers=H(nt.d),e._fromNumber=nt.n),t&&(G(t(),J),e._toNumbers=H(J.d),e._strings=H(J.s),e._toNumber=J.o?$e(e._fromNumber,J.n,J.o):J.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),ct(this)}then(e){return super.then(e)}},on=(e,t)=>I.editor?I.editor.addAnimation(e,t):new an(e,t,null,0,!1).init(),sn=(e,t)=>{if(L(t,`<`)){let n=t[1]===`<`,r=e._tail,i=r?r._offset+r._delay:0;return n?i:i+r.duration}},cn=(e,t)=>{let n=e.iterationDuration;if(n===1e-11&&(n=0),R(t))return n;if(fe(+t))return+t;let r=t,i=e?e.labels:null,a=!he(i),o=sn(e,r),s=!R(o),c=re.exec(r);if(c){let e=c[0],t=r.split(e),l=a&&t[0]?i[t[0]]:n;return $e(s?o:a?l:n,+t[1],e[0])}return s?o:a?R(i[r])?n:i[r]:n},ln=(e,t)=>{if(!R(t))return I.editor&&I.editor.addSet?I.editor.addSet(e,t):(t.duration=x,t.composition=W(t.composition,h.none),new an(e,t,null,0,!0).resume())},un=(e=0,t=1,n=0)=>{let r=10**n;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},dn=0,fn=(e,t=0,n=1,r=0)=>{let i=e===void 0?dn++:e;return(e=t,a=n,o=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);let s=10**o;return Math.floor((((i^i>>>14)>>>0)/4294967296*(a-e+1/s)+e)*s)/s}},pn=(e,t=un)=>{let n=e.length,r,i;for(;n;)i=t(0,--n),r=e[n],e[n]=e[i],e[i]=r;return e},mn=(e,t={})=>{let n=[],r=0,i,a=null,o=t.from,s=t.reversed,c=t.ease,l=!R(c),u=l&&!R(c.ease)?c.ease:l?Kt(c):null,d=t.grid,f=d===!0,p=t.axis,m=t.total,h=R(o)||o===0||o===`first`,g=o===`center`,_=o===`last`,v=o===`random`,y=ue(o),b=ue(e),x=t.use,S=Se(b?e[0]:e),C=b?Se(e[1]):0,w=P.exec((b?e[1]:e)+``),T=t.start||0+(b?S:0),E=t.seed,D=!R(E)&&E!==!1?fn(E===!0?0:E):un,O=t.jitter,ee=!R(O),k=ue(O),te=k?O[0]:O||0,ne=k?O[1]:O||0,A=h?0:fe(o)?o:0;return(e,c,l,h,E)=>{let[O]=Mt(e),k=R(m)?l.length:m,j=R(x)?!1:me(x)?x(O,c,k):Qe(O,x),M=fe(j)||pe(j)&&fe(+j)?+j:c,N=M>=0&&M<k?M:c;if(g&&(A=(k-1)/2),_&&(A=k-1),!n.length){if(f){let e=!0,t=!1,r=1/0,i=1/0,a=1/0,s=-1/0,c=-1/0,u=-1/0,d=[],f=[],m=[];for(let n=0;n<k;n++){let o=l[n],p=0,h=0,g=0,_=!1;if(o&&me(o.getBoundingClientRect)){let e=o.getBoundingClientRect();p=e.left+e.width/2,h=e.top+e.height/2,_=!0}else{let e=o;e&&fe(e.x)&&fe(e.y)&&(p=e.x,h=e.y,fe(e.z)&&(g=e.z,t=!0),_=!0)}if(!_){e=!1;break}d.push(p),f.push(h),m.push(g),p<r&&(r=p),h<i&&(i=h),g<a&&(a=g),p>s&&(s=p),h>c&&(c=h),g>u&&(u=g)}if(e){let e=d[0],l=f[0],h=m[0];y?(e=r+o[0]*(s-r),l=i+o[1]*(c-i),h=t?a+(o.length>=3?o[2]:.5)*(u-a):0):g?(e=(r+s)/2,l=(i+c)/2,h=(a+u)/2):_?(e=d[k-1],l=f[k-1],h=m[k-1]):fe(o)&&(e=d[o],l=f[o],h=m[o]);for(let r=0;r<k;r++){let i=e-d[r],a=l-f[r],o=h-m[r],s=we(i*i+a*a+(t?o*o:0));p===`x`&&(s=-i),p===`y`&&(s=-a),p===`z`&&(s=-o),n.push(s)}let v=1/0;for(let e=0;e<k;e++){let t=De(n[e]);t>0&&t<v&&(v=t)}if(v>0&&v<1/0)for(let e=0;e<k;e++)n[e]=n[e]/v}else for(let e=0;e<k;e++)n.push(De(A-e))}else for(let e=0;e<k;e++)if(!d)n.push(De(A-e));else{let t=d.length,r=d[0]*d[1],i,a,s;y?(i=o[0]*(d[0]-1),a=o[1]*(d[1]-1),s=t===3?(o.length>=3?o[2]:.5)*(d[2]-1):0):g?(i=(d[0]-1)/2,a=(d[1]-1)/2,s=t===3?(d[2]-1)/2:0):(i=A%d[0],a=Oe(A/d[0])%d[1],s=t===3?Oe(A/r):0);let c=e%d[0],l=Oe(e/d[0])%d[1],u=t===3?Oe(e/r):0,f=i-c,m=a-l,h=s-u,_=we(f*f+m*m+(t===3?h*h:0));p===`x`&&(_=-f),p===`y`&&(_=-m),p===`z`&&(_=-h),n.push(_)}r=n[0];for(let e=1;e<k;e++)n[e]>r&&(r=n[e]);if(u||s)for(let e=0;e<k;e++){let t=n[e];u&&(t=u(t/r)*r),s&&(t=p?-t:De(r-t)),n[e]=t}if(ee){a=Array(k);for(let e=0;e<k;e++)a[e]=D(-1,1,4)}v&&(n=pn(n,D))}let P=b?(C-S)/r:S;R(i)&&(i=E?cn(E,R(t.start)?E.iterationDuration:T):T);let F=i+(P*V(n[N],2)||0);if(ee){let e=r?n[N]/r:0,t=te+(ne-te)*e;F+=a[N]*t}return t.modifier&&(F=t.modifier(F)),w&&(F=`${F}${w[2]}`),F}},hn=o(),gn=a(),Y=r(i(),1);function _n(){return typeof window>`u`||!window.matchMedia?!1:!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function vn(e,t){let n=setTimeout(()=>e.complete(),t+400);return()=>{clearTimeout(n),e.complete()}}function yn(e,t=700){let n=typeof e==`number`&&Number.isFinite(e)?e:null,r=n!==null&&_n(),[i,a]=(0,Y.useState)(0),o=(0,Y.useRef)(0);return(0,Y.useEffect)(()=>{if(!r)return;let e={n:o.current},i=on(e,{n,duration:t,ease:`outExpo`,onUpdate:()=>{o.current=e.n,a(e.n)},onComplete:()=>{o.current=n,a(n)}}),s=setTimeout(()=>i.complete(),t+400);return()=>{clearTimeout(s),i.pause()}},[n,t,r]),r?i:n}function bn({value:e,duration:t}){let n=yn(e,t);return n===null?e??null:Math.round(n)}function xn(e){let t=(0,Y.useRef)(null),n=(0,Y.useRef)(null),r=(0,Y.useRef)(()=>{}),i=(0,Y.useRef)(null);return(0,Y.useLayoutEffect)(()=>{let a=t.current,o=a?.querySelector(`:scope > .glide`);o&&(r.current=t=>{let r=a.querySelector(e);if(!r){o.style.opacity=`0`,n.current=null;return}let s=a.getBoundingClientRect(),c=r.getBoundingClientRect(),l={translateX:c.left-s.left+a.scrollLeft-a.clientLeft,translateY:c.top-s.top+a.scrollTop-a.clientTop,width:c.width,height:c.height},u=n.current;if(n.current={el:r,...l},!(u&&u.el===r&&[`translateX`,`translateY`,`width`,`height`].every(e=>Math.abs(u[e]-l[e])<.5))){if(o.style.opacity=`1`,i.current&&=(clearTimeout(i.current.t),i.current.anim.pause(),null),t&&u&&u.el!==r&&_n()){let e=on(o,{...l,duration:280,ease:`outExpo`});i.current={anim:e,t:setTimeout(()=>e.complete(),680)}}else ln(o,l)}},r.current(!0))}),(0,Y.useEffect)(()=>{let e=()=>r.current(!1);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),t}function Sn(){let e=(0,Y.useRef)(null),t=(0,Y.useRef)(null);return(0,Y.useLayoutEffect)(()=>{let n=e.current;if(!n){t.current=null;return}let r=[...n.querySelectorAll(`:scope > [data-flip]`)],i=new Map(r.map(e=>[e.dataset.flip,e.offsetTop])),a=t.current;if(t.current=i,a&&_n())for(let e of r){let t=a.get(e.dataset.flip);t===void 0?vn(on(e,{opacity:[0,1],translateY:[-12,0],duration:340,ease:`outExpo`}),340):Math.abs(t-i.get(e.dataset.flip))>1&&vn(on(e,{translateY:[t-i.get(e.dataset.flip),0],duration:340,ease:`outExpo`}),340)}}),e}var Cn={overview:`Overview`,laws:`Constitution`,library:`Library`,loops:`Loops`,personal:`Personal`,installs:`Installs`,docs:`Docs`,activity:`Activity`},wn={loops:[`templates`,`bricks`,`active`],personal:[`rules`,`profile`,`memory`,`notebook`],installs:[`hosts`,`edits`,`doctor`,`server`]},Tn={templates:`Templates`,bricks:`Bricks`,active:`Active`,rules:`Rules`,profile:`Profile`,memory:`Memory`,notebook:`Notebook`,hosts:`Hosts`,edits:`Local edits`,doctor:`Doctor`,server:`Server`},En={dashboard:[`overview`],constitution:[`laws`],rules:[`personal`,`rules`],profile:[`personal`,`profile`],harness:[`installs`,`hosts`],harnesses:[`installs`,`hosts`],themes:[`installs`,`hosts`],diff:[`installs`,`edits`],doctor:[`installs`,`doctor`],settings:[`installs`,`server`],about:[`installs`,`server`]},Dn=(e,t)=>t!==void 0&&Object.hasOwn(e,t),On=(e,t)=>wn[e].includes(t)?t:wn[e][0];function kn(t){let n=(t||`#/`).slice(2).split(`/`).filter(Boolean),[r,i,a]=n,o=e=>decodeURIComponent(e||``);if(r===`section`||r===`item`){let t=r===`item`&&Dn(e,i)?e[i]:i,n=r===`item`?o(a):void 0;return{page:t===`laws`?`laws`:`library`,section:t,item:n}}if(r===`docs`)return{page:`docs`,item:o(n.slice(1).join(`/`))};if(r===`activity`&&i)return{page:`activity`,item:o(i)};if(r===`skills`||r===`agents`)return{page:`library`,section:r};if(Dn(wn,r)){let e=On(r,i);return a&&e===i?{page:r,tab:e,item:o(a)}:{page:r,tab:e}}if(Dn(En,r)){let[e,t]=En[r];return t?{page:e,tab:t}:{page:e}}return{page:Dn(Cn,r)?r:`overview`}}function An(){let e=()=>kn(typeof window<`u`?window.location.hash:``),[t,n]=(0,Y.useState)(e);return(0,Y.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}var jn=e=>{window.location.hash=e},Mn={red:`#FF5C57`,green:`#4ED888`,yellow:`#E8B53D`,blue:`#5B8CFF`,magenta:`#C77DFF`,cyan:`#3AD4C4`,white:`#E9EFEA`},Nn={red:`#C53A36`,green:`#2FA864`,yellow:`#B8862A`,blue:`#3C66D8`,magenta:`#9A52D6`,cyan:`#2BA89B`,white:`#AEB8B0`},Pn=e=>Mn[e]||Mn.cyan,Fn={red:`#A92F2B`,green:`#1E7A47`,yellow:`#8A6414`,blue:`#2F55C0`,magenta:`#7E3FB8`,cyan:`#15766C`,white:`#465A51`},In=e=>e===`yellow`||e===`white`||e===`cyan`||e===`green`?`#06100D`:`#FFFFFF`;function Ln(e,t,n){if(!e)return;let r=n===`light`,i=r?Nn[t]||Nn.cyan:Pn(t),a=r?`#FFFFFF`:In(t);r&&t===`white`&&(i=`#566B62`,a=`#FFFFFF`),e.style.setProperty(`--accent`,i),e.style.setProperty(`--accent-2`,Nn[t]||Nn.cyan),e.style.setProperty(`--accent-ink`,a),e.style.setProperty(`--accent-text`,r?Fn[t]||Fn.cyan:i),t===`yellow`?e.style.setProperty(`--warn`,r?`#B4521C`:`#F08A4B`):e.style.removeProperty(`--warn`)}var Rn={cultivar:{dark:`#3AD4C4`,light:`#127E73`,ink:`#06100D`,inkLight:`#FFFFFF`},operator:{dark:`#E8A23B`,light:`#8F5E10`,ink:`#1A1306`,inkLight:`#FFFFFF`},matrix:{dark:`#19E37C`,light:`#0B7A47`,ink:`#04140C`,inkLight:`#FFFFFF`},atlas:{dark:`#8FD694`,light:`#1C8450`,ink:`#14200F`,inkLight:`#FFFFFF`}};function zn(e,t,n){let r=Rn[t];if(!e||!r)return!1;let i=n===`light`;return e.style.setProperty(`--accent`,i?r.light:r.dark),e.style.setProperty(`--accent-2`,r.light),e.style.setProperty(`--accent-ink`,i?r.inkLight:r.ink),e.style.setProperty(`--accent-text`,i?r.light:r.dark),!0}var Bn=`#101317`,Vn=`#F4F6F8`,Hn=e=>{let t=e.replace(`#`,``);return[0,2,4].map(e=>parseInt(t.slice(e,e+2),16))},Un=e=>`#`+e.map(e=>Math.round(e).toString(16).padStart(2,`0`)).join(``).toUpperCase(),Wn=e=>{let[t,n,r]=Hn(e).map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r},Gn=(e,t)=>{let[n,r]=[Wn(e),Wn(t)].sort((e,t)=>t-e);return(n+.05)/(r+.05)},Kn=(e,t,n)=>{let r=Hn(e),i=Hn(t);return Un(r.map((e,t)=>e+(i[t]-e)*n))},qn=(e,t,n,r)=>{let i=e;for(let a=.05;Gn(i,t)<n&&a<=1.0001;a+=.05)i=Kn(e,r,a);return i},Jn=e=>typeof e==`string`&&/^#[0-9a-fA-F]{6}$/.test(e);function Yn(e,t){let n=t===`light`,r=n?Vn:Bn,i=n?`#000000`:`#FFFFFF`,a=qn(e,r,3,i),o=qn(a,r,4.5,i),s=Gn(a,`#06100D`)>=Gn(a,`#FFFFFF`)?`#06100D`:`#FFFFFF`;return{accent:a,accent2:qn(a,r,4.5,i),ink:s,text:o}}function Xn(e,t,n){if(!e||!Jn(t))return!1;let r=Yn(t,n);return e.style.setProperty(`--accent`,r.accent),e.style.setProperty(`--accent-2`,r.accent2),e.style.setProperty(`--accent-ink`,r.ink),e.style.setProperty(`--accent-text`,r.text),!0}function Zn(e,t){let[n,r]=(0,Y.useState)(()=>{try{return t(localStorage.getItem(e))}catch{return t(null)}});return[n,(0,Y.useCallback)(t=>r(n=>{let r=typeof t==`function`?t(n):t;try{localStorage.setItem(e,r)}catch{}return r}),[e])]}var Qn=`geneseed-mode`;function $n(){let[e,t]=Zn(Qn,e=>e===`light`?`light`:`dark`);return[e,()=>t(e=>e===`light`?`dark`:`light`)]}var er=`geneseed-flavour`,tr=[{id:`cultivar`,short:`Cultivar`,name:`Cultivar Evolved`,tagline:`The calm default — cool teal ink, geometric sans, soft flat cards lit by one quiet shadow.`},{id:`operator`,short:`Operator`,name:`Operator HUD`,tagline:`Amber phosphor on cool charcoal — all-mono, zero-radius instrument readout.`},{id:`matrix`,short:`Matrix`,name:`Matrix`,tagline:`Acid-green order-book terminal on pure black — all Space Mono, square 2px, a faint code-grid.`},{id:`atlas`,short:`Atlas`,name:`Atlas`,tagline:`The field journal — loam dark, sage ink, the codex as a living map.`}],nr=new Set(tr.map(e=>e.id)),rr={a:`cultivar`,b:`atlas`,c:`operator`,d:`cultivar`,e:`matrix`,f:`cultivar`,g:`cultivar`,z:`cultivar`,cb:`matrix`,cm:`cultivar`,greenhouse:`atlas`,heirloom:`cultivar`,aurora:`cultivar`,perspective:`cultivar`,sequencer:`cultivar`,cobalt:`matrix`,cosmic:`cultivar`,neon:`matrix`};function ir(){return Zn(er,ar)}function ar(e){return nr.has(e)?e:rr[e]||`cultivar`}var or=`geneseed-accent`,sr=[{id:`curated`,short:`Curated`,tagline:`Each theme's own signature colour.`}],cr=[[`cyan`,`Cyan`],[`blue`,`Blue`],[`magenta`,`Violet`],[`yellow`,`Amber`],[`green`,`Green`]].map(([e,t])=>({id:`custom:${e}`,name:e,short:t,hex:Pn(e),tagline:`Always ${t.toLowerCase()}, whatever the voice or skin.`})),lr=[...sr,...cr],ur=new Set(lr.map(e=>e.id)),dr=e=>{let t=typeof e==`string`&&e.startsWith(`hex:`)?e.slice(4):null;return Jn(t)?t.toUpperCase():null},fr=e=>e&&(ur.has(e)||dr(e))?e:`curated`,pr=e=>cr.find(t=>t.id===e)?.name??null,mr=e=>{let t=dr(e);return t?`Your own colour, ${t}.`:lr.find(t=>t.id===e)?.tagline??``};function hr(){return Zn(or,fr)}var gr=`geneseed-layout`,_r=[{id:`overview`,short:`Overview`,tagline:`Every install, what needs you, cost, usage and gates.`},{id:`cultivar`,short:`Cultivar`,tagline:`Hero, KPIs & genome grid.`},{id:`greenhouse`,short:`Greenhouse`,tagline:`Ring, tiles & mix donut.`},{id:`operator`,short:`Operator`,tagline:`Dense terminal readout.`},{id:`journal`,short:`Journal`,tagline:`Growth rings & the constitution map.`}],vr=new Set(_r.map(e=>e.id));function yr(e){return e&&vr.has(e)?e:`overview`}function br(){return Zn(gr,yr)}function xr(e){let[t,n]=(0,Y.useState)(null),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)([]),s=()=>c.overview().then(e=>{n(e),i(null)}).catch(t=>{i(t?.body?.message||t?.message||String(t)),e?.(t)});return(0,Y.useEffect)(()=>{s()},[]),(0,Y.useEffect)(()=>{c.themes().then(e=>o(e.themes)).catch(()=>{})},[]),{overview:t,error:r,themes:a,reload:s}}var Sr=1e3,Cr=e=>new Promise(t=>setTimeout(t,e));async function wr(){try{return(await c.ping()).pid??null}catch{return null}}async function Tr(e=0,t=null){await Cr(e);for(let e=0;e<30;e++){let e=await wr();if(e!==null&&e!==t)break;await Cr(Sr)}window.location.reload()}async function Er(){let e=await wr();try{await c.restart()}catch(e){if(e.status)throw e}await Tr(Sr,e)}var Dr=600;function Or({onFinish:e,onError:t}={}){let[n,r]=(0,Y.useState)([]),[i,a]=(0,Y.useState)(null),[o,s]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{c.jobs().then(({jobs:e})=>{if(!e.length)return;r(e.map(e=>({id:e.id,action:e.action,status:e.status,output:e.output||``,duration:e.duration,started:e.started})));let t=e.find(e=>e.status===`running`);t&&(a(t.id),s(!0))}).catch(()=>{})},[]),(0,Y.useEffect)(()=>{if(!i)return;let t=n.find(e=>e.id===i)?.action===`update`,o=null;t&&wr().then(e=>o=e);let s=setInterval(async()=>{if(!document.hidden)try{let n=await c.job(i);if(r(e=>{let t=e.findIndex(e=>e.id===i);if(t===-1)return e;let r=e[t],a=n.output||``;if(r.output===a&&r.status===n.status&&r.duration===n.duration)return e;let o=e.slice();return o[t]={...r,output:a,status:n.status,duration:n.duration},o}),n.status!==`running`){if(clearInterval(s),a(null),t){Tr(2e3,o);return}e?.(n.status)}}catch{if(!t)return;clearInterval(s),Tr(0,o)}},Dr);return()=>clearInterval(s)},[i]),{runs:n,activeId:i,consoleOpen:o,setConsoleOpen:s,runAction:async(e,n)=>{try{let{job_id:t}=await c.action(e,n),i=e===`build`&&n?.theme?`build (${n.theme} · ${n.emit})`:e;return r(e=>[...e,{id:t,action:i,status:`running`,output:``,started:Date.now()/1e3}]),a(t),s(!0),t}catch(e){t?.(e)}},cancelJob:e=>c.cancelJob(e).catch(e=>t?.(e)),clearRuns:()=>r([])}}var kr=new Map,Ar=new Map;function jr(e){for(let t of kr.keys())t.startsWith(`${e}|`)&&kr.delete(t)}function X(e,t=[],n=null,{revalidate:r=!1}={}){let i=n===null?null:`${n}|${t.join(``)}`,[a,o]=(0,Y.useState)(()=>i!==null&&kr.has(i)?kr.get(i):null),[s,c]=(0,Y.useState)(``),[l,u]=(0,Y.useState)(()=>!(i!==null&&kr.has(i))),d=(0,Y.useRef)(e),f=(0,Y.useRef)(i);(0,Y.useLayoutEffect)(()=>{d.current=e,f.current=i});let p=(0,Y.useCallback)(()=>{u(!0),c(``);let e=f.current;return Promise.resolve(d.current()).then(t=>{if(o(t),e!==null){kr.set(e,t);for(let n of Ar.get(e)||[])n(t)}}).catch(e=>c(e.message)).finally(()=>u(!1))},t);return(0,Y.useEffect)(()=>{let e=f.current;return e!==null&&(Ar.has(e)||Ar.set(e,new Set),Ar.get(e).add(o)),e!==null&&kr.has(e)&&(o(kr.get(e)),c(``),u(!1),!r)||p(),()=>Ar.get(e)?.delete(o)},[p]),{data:a,error:s,loading:l,reload:p,setData:o}}var Mr=60,Nr=3600,Pr=86400,Fr={seconds:90,minutes:5400,hours:36*Nr};function Ir(e){let t=Math.max(0,Date.now()/1e3-e);return t<Fr.seconds?`${Math.round(t)}s`:t<Fr.minutes?`${Math.round(t/Mr)}m`:t<Fr.hours?`${Math.round(t/Nr)}h`:`${Math.round(t/Pr)}d`}function Lr(e){return e?e.replace(/\\/g,`/`).replace(/^\/?(home|Users)\/[^/]+/i,`~`).replace(/^[A-Z]:\/Users\/[^/]+/i,`~`):`~`}var Rr={deployed:.4,doctorClean:.25,doctorMinor:.15,doctorMinorMax:2,doctorFail:.05,versionSynced:.2,diskClean:.15};function zr(e,t){if(!e)return 0;let n=e.doctor?.problems?.length??99,r=e.doctor?.ok?Rr.doctorClean:n<=Rr.doctorMinorMax?Rr.doctorMinor:Rr.doctorFail,i=t&&t.installed_fp&&t.installed_fp===t.source_fp;return(e.deployed?Rr.deployed:0)+r+(i?Rr.versionSynced:0)+(e.diff&&e.diff.missing===0?Rr.diskClean:0)}var Br=e=>Math.max(...n.map(t=>e?.[t]??0),1),Vr=e=>(e?.edited??0)+(e?.added??0),Hr=e=>Vr(e)+(e?.missing??0),Ur=e=>(e?.laws??0)+(e?.doctrines?.rules??0),Z=s(),Wr={dashboard:`M3 13h7V3H3v10Zm0 8h7v-6H3v6Zm11 0h7V11h-7v10Zm0-18v6h7V3h-7Z`,library:`M4 5h10v14H4zM16 7h4v12h-4M7 9h4M7 12h4`,loop:`M19.5 9A8 8 0 1 1 15 4.6M15 1.5l.2 3.3-3.2.8`,graph:`M6 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM18 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM7.5 14.5l8-8M16.7 15.2L8.8 16.6`,changes:`M4 6h10M4 12h7M4 18h12M17 4l3 3-3 3M20 7h-6`,doctor:`M12 3v6m0 0a4 4 0 0 1-4 4H7a3 3 0 0 0-3 3v2m8-9a4 4 0 0 0 4 4h1a3 3 0 0 1 3 3v2M12 3a1.5 1.5 0 1 0 0-.01`,themes:`M12 3a9 9 0 1 0 0 18c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3-.3-.4-.5-.8-.5-1.2 0-1 .8-1.5 1.7-1.5H17a4 4 0 0 0 4-4c0-4.4-4-8-9-8Z`,settings:`M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm8-3a8 8 0 0 0-.1-1.3l2-1.6-2-3.4-2.4 1a8 8 0 0 0-2.2-1.3L15 2H9l-.3 2.6a8 8 0 0 0-2.2 1.3l-2.4-1-2 3.4 2 1.6A8 8 0 0 0 4 12c0 .4 0 .9.1 1.3l-2 1.6 2 3.4 2.4-1a8 8 0 0 0 2.2 1.3L9 22h6l.3-2.6a8 8 0 0 0 2.2-1.3l2.4 1 2-3.4-2-1.6c.1-.4.1-.9.1-1.3Z`,search:`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3`,chevron:`M9 6l6 6-6 6`,x:`M6 6l12 12M18 6L6 18`,menu:`M4 7h16M4 12h16M4 17h16`,play:`M7 5v14l11-7L7 5Z`,clear:`M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14`,download:`M12 3v12m0 0l-4-4m4 4l4-4M4 19h16`,refresh:`M21 12a9 9 0 1 1-3-6.7M21 4v5h-5`,folder:`M3 7a2 2 0 0 1 2-2h3.5l2 2H19a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z`,build:`M14 3l-1 4 4-1 3 3-4 1 1 4-3 3-1-4-4 1-3-3 4-1-1-4 3-3 5 0Z`,arrow:`M5 12h14M13 6l6 6-6 6`,external:`M14 5h5v5M19 5l-8 8M12 5H6a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-6`,copy:`M9 9h11v11H9zM5 15H4V4h11v1`,spark:`M12 3v3m0 12v3m9-9h-3M6 12H3m13.5-6.5-2 2m-7 7-2 2m11 0-2-2m-7-7-2-2`,activity:`M3 12h4l2.5-7 5 14 2.5-7H21`,agent:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8`,layers:`M12 3l9 5-9 5-9-5 9-5ZM3 13l9 5 9-5M3 17l9 5 9-5`,sun:`M12 4V2M12 22v-2M4 12H2M22 12h-2M5.6 5.6 4.2 4.2M19.8 19.8l-1.4-1.4M18.4 5.6l1.4-1.4M4.2 19.8l1.4-1.4M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z`,moon:`M21 12.8A8.5 8.5 0 1 1 11.2 3a6.5 6.5 0 0 0 9.8 9.8Z`,power:`M12 3v9M7.5 6.5a7 7 0 1 0 9 0`,docs:`M5 4h9l5 5v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1ZM14 4v5h5M8 12h7M8 16h7`,skill:`M21.7 6.6a5 5 0 0 1-6.6 6.6l-7.4 7.4a2 2 0 1 1-2.8-2.8l7.4-7.4a5 5 0 0 1 6.6-6.6l-2.6 2.6a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0Z`,law:`M12 3v18M5 6h14M8 21h8M6 6l-3 6h6zM3 12a3 3 0 0 1 6 0M18 6l-3 6h6zM15 12a3 3 0 0 1 6 0`,rule:`M7 3h10a1 1 0 0 1 1 1v17l-6-3.5L6 21V4a1 1 0 0 1 1-1ZM9.5 9.5l1.8 1.8 3.4-3.6`,profile:`M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM5 20a7 7 0 0 1 14 0`,notebook:`M7 4h11v16H7zM4 8h3M4 12h3M4 16h3M11 9h5M11 13h5M11 17h3`,about:`M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 11v6M12 7.6h.01`,github:`M12 2a10 10 0 0 0-3.2 19.5c.5.1.7-.2.7-.5v-1.8c-2.8.6-3.4-1.2-3.4-1.2-.5-1.2-1.1-1.5-1.1-1.5-.9-.6.1-.6.1-.6 1 .1 1.5 1 1.5 1 .9 1.5 2.3 1.1 2.9.8.1-.6.3-1.1.6-1.3-2.2-.3-4.6-1.1-4.6-5 0-1.1.4-2 1-2.7-.1-.3-.4-1.3.1-2.7 0 0 .8-.3 2.7 1a9.4 9.4 0 0 1 5 0c1.9-1.3 2.7-1 2.7-1 .5 1.4.2 2.4.1 2.7.6.7 1 1.6 1 2.7 0 3.9-2.4 4.7-4.6 5 .4.3.7.9.7 1.8v2.6c0 .3.2.6.7.5A10 10 0 0 0 12 2Z`};function Q({name:e,className:t=`glyph`,style:n}){return(0,Z.jsx)(`svg`,{className:t,style:n,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,Z.jsx)(`path`,{d:Wr[e]||``})})}function Gr({className:e=`sprout`}){return(0,Z.jsxs)(`svg`,{className:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,Z.jsx)(`path`,{d:`M12 21.5v-9`,stroke:`var(--accent)`,strokeWidth:`2`,strokeLinecap:`round`,fill:`none`}),(0,Z.jsx)(`path`,{d:`M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z`,fill:`var(--accent)`}),(0,Z.jsx)(`path`,{d:`M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z`,fill:`var(--accent)`,opacity:`.42`}),(0,Z.jsx)(`circle`,{cx:`12`,cy:`12.4`,r:`1.1`,fill:`var(--bg)`})]})}var Kr=[{hash:`#/`,page:`overview`,label:`Overview`,icon:`dashboard`},{hash:`#/laws`,page:`laws`,label:`Constitution`,short:`Laws`,icon:`law`,count:e=>e?.counts?(e.counts.ontology??0)+(e.counts.laws??0)+(e.counts.doctrines?.rules??0):null},{hash:`#/library`,page:`library`,label:`Library`,icon:`library`,count:e=>e?.counts?[`skills`,`agents`,`memory`,`notebook`,`wiki`,`config`].reduce((t,n)=>t+(e.counts[n]??0),0):null},{hash:`#/loops`,page:`loops`,label:`Loops`,icon:`loop`,count:e=>e?.counts?.loops??null},{hash:`#/personal`,page:`personal`,label:`Personal`,icon:`profile`},{hash:`#/installs`,page:`installs`,label:`Installs`,icon:`layers`,count:(e,t)=>t?`${t.filter(e=>e.state===`active`).length}/${t.length}`:null}],qr=[{hash:`#/docs`,page:`docs`,label:`Docs`,icon:`docs`},{hash:`#/activity`,page:`activity`,label:`Activity`,icon:`activity`}];function Jr({n:e,lit:t,count:n,onNavigate:r}){return(0,Z.jsxs)(`a`,{className:`sb-item${t?` on`:``}`,href:e.hash,"aria-current":t?`page`:void 0,onClick:()=>r?.(),children:[(0,Z.jsx)(Q,{name:e.icon}),(0,Z.jsx)(`span`,{className:`sb-label`,children:e.label}),n==null?null:(0,Z.jsx)(`span`,{className:`sb-count`,children:n})]})}function Yr({overview:e,onOpenVoice:t}){if(!e)return null;let n=e.doctor,r=Hr(e.diff);return(0,Z.jsxs)(`div`,{className:`sb-vitals`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{children:`doctor`}),(0,Z.jsx)(`b`,{className:n?n.ok?`good`:`bad`:``,children:n?n.ok?`clean`:`${n.problems.length} to fix`:`not run`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{children:`drift`}),(0,Z.jsx)(`b`,{className:r?`warn`:``,children:e.diff?r:`n/a`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{children:`built`}),(0,Z.jsx)(`b`,{title:e.build_time||void 0,children:e.build_epoch?`${Ir(e.build_epoch)} ago`:`never`})]}),(0,Z.jsxs)(`button`,{type:`button`,className:`sb-voice`,onClick:t,title:`Switch voice`,children:[(0,Z.jsx)(`span`,{children:`voice`}),(0,Z.jsxs)(`b`,{children:[e.theme||`none`,(0,Z.jsx)(Q,{name:`chevron`})]})]})]})}function Xr({route:e,overview:t,installs:n,onOpenVoice:r,onNavigate:i}){return(0,Z.jsxs)(`nav`,{className:`sidebar`,id:`rail-nav`,"aria-label":`Console`,tabIndex:-1,children:[(0,Z.jsxs)(`button`,{type:`button`,className:`sb-brand`,onClick:()=>{jn(`#/`),i?.()},"aria-label":`Geneseed, go to the overview`,children:[(0,Z.jsx)(`span`,{className:`sb-mark`,children:(0,Z.jsx)(Gr,{})}),(0,Z.jsxs)(`span`,{className:`sb-brand-text`,children:[(0,Z.jsx)(`span`,{className:`sb-name`,children:`Geneseed`}),(0,Z.jsx)(`span`,{className:`sb-ver`,children:[t?.version&&`v${t.version}`,t?.theme].filter(Boolean).join(` · `)})]})]}),Kr.map(r=>(0,Z.jsx)(Jr,{n:r,lit:e.page===r.page,count:r.count?.(t,n),onNavigate:i},r.page)),(0,Z.jsx)(`div`,{className:`sb-spacer`}),qr.map(t=>(0,Z.jsx)(Jr,{n:t,lit:e.page===t.page,onNavigate:i},t.page)),(0,Z.jsx)(Yr,{overview:t,onOpenVoice:r})]})}function Zr({route:e}){return(0,Z.jsx)(`nav`,{className:`tabbar`,"aria-label":`Console pages`,children:Kr.map(t=>(0,Z.jsxs)(`a`,{href:t.hash,className:e.page===t.page?`on`:``,"aria-current":e.page===t.page?`page`:void 0,children:[(0,Z.jsx)(Q,{name:t.icon}),t.short||t.label]},t.page))})}var Qr=[{id:`opencode`,label:`OpenCode`,deployAdds:`.opencode/ + AGENT.md`,removeProject:`.opencode/ + AGENT.md + the bundle`,removeGlobal:`~/.config/opencode's AGENT.md, agents, skills, plugins + the opencode.json entry`},{id:`claude`,label:`Claude Code`,deployAdds:`.claude/ + CLAUDE.md`,removeProject:`.claude/ + the CLAUDE.md block`,removeGlobal:`~/.claude's agents/skills + the CLAUDE.md block + settings hooks`},{id:`bob`,label:`BOB (IBM)`,deployAdds:`.bob/ + AGENTS.md`,removeProject:`.bob/ + the AGENTS.md block`,removeGlobal:`~/.bob's agents/skills + the AGENTS.md block + settings hooks`},{id:`openclaude`,label:`OpenClaude`,deployAdds:`.openclaude/ + its CLAUDE.md`,removeProject:`.openclaude/ + its CLAUDE.md block`,removeGlobal:`~/.openclaude's agents/skills + the CLAUDE.md block + settings hooks`}],$r=e=>Qr.find(t=>t.id===e)||Qr[0],ei=(e,t)=>t===`project`?$r(e).removeProject:$r(e).removeGlobal,ti=e=>String(e||``).replace(/[\\/]+$/,``).split(/[\\/]/).pop()||e,ni=e=>e.scope===`global`?$r(e.host).label:ti(e.path),ri=`geneseed-harness`,ii=Qr.map(({id:e,label:t})=>({id:e,label:t}));function ai(e=`opencode`){let[t,n]=Zn(ri,e=>ii.some(t=>t.id===e)?e:null);return[t??e,n]}function oi(e){let t=String(e||``);return Qr.find(e=>t.startsWith(e.id))?.id||`opencode`}function si(e=0){let[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(``),s=(0,Y.useRef)(null),[l]=ai(),u=`${e}|${l}`,[d,f]=(0,Y.useState)(u);return d!==u&&(f(u),i(null)),(0,Y.useEffect)(()=>{s.current=null},[u]),{index:r,error:a,prime:(0,Y.useCallback)(()=>{if(r||s.current)return s.current;let e=(async()=>{let e=Object.entries(Cn).flatMap(([e,t])=>(wn[e]||[``]).map(n=>{let r=n?t+` / `+Tn[n]:t;return{kind:`Pages`,sortKey:-1,title:r,desc:``,hay:r.toLowerCase(),route:e===`overview`?`#/`:`#/`+e+(n?`/`+n:``)}})),r=[`laws`,`skills`,...n],a=await Promise.all(r.map(async e=>{try{return{sec:e,items:(await c.catalog(e))?.items||[]}}catch{return{sec:e,items:[]}}}));for(let{sec:n,items:i}of a){let a=t[n];for(let t of i){let i=t.title||t.name;e.push({kind:a.label,sortKey:r.indexOf(n),title:i,desc:t.desc||``,hay:`${i} ${t.desc||``} ${t.name||``}`.toLowerCase(),route:`#/item/${a.type}/${encodeURIComponent(t.name)}`})}}try{let t=await c.mcp(),n=new Set;for(let r of t?.targets||[])for(let t of r.servers||[]){if(n.has(t.name))continue;n.add(t.name);let r=t.label||t.name;e.push({kind:`MCP servers`,sortKey:100,title:r,desc:t.desc||``,hay:`${r} ${t.desc||``} ${t.name||``} mcp`.toLowerCase(),route:`#/installs/hosts`})}}catch{}try{let t=await c.docs(l);for(let n of t?.groups||[])for(let t of n.pages||[])e.push({kind:`Docs`,sortKey:110,title:t.title,desc:n.label,hay:`${t.title||``} ${t.id||``} ${n.label||``} ${t.section||``} ${t.description||``}`.toLowerCase(),route:`#/docs/${encodeURIComponent(t.id)}`})}catch{}return i(e),s.current=null,e})().catch(e=>(s.current=null,o(e.message||String(e)),[]));return s.current=e,e},[r,l])}}var ci=24;function li(e,t){let n=e.title.toLowerCase();return n.startsWith(t)?0:n.includes(t)?1:e.hay.includes(t)?2:-1}function ui(e,t){let n=t.toLowerCase().trim();if(!n||!e)return[];let r=[];for(let t of e){let e=li(t,n);e>=0&&r.push({e:t,s:e})}return r.sort((e,t)=>e.s-t.s||e.e.sortKey-t.e.sortKey||e.e.title.localeCompare(t.e.title)),r.slice(0,ci).map(e=>e.e)}function di(e,t){let n=t.trim().toLowerCase(),r=n?e.toLowerCase().indexOf(n):-1;return r<0?e:(0,Z.jsxs)(Z.Fragment,{children:[e.slice(0,r),(0,Z.jsx)(`mark`,{className:`spot-hit`,children:e.slice(r,r+n.length)}),e.slice(r+n.length)]})}function fi({query:e,index:t,loading:n,error:r,active:i,onActive:a,onClose:o}){let s=(0,Y.useMemo)(()=>ui(t,e),[t,e]),c=(0,Y.useRef)(null),l=s.length>0;(0,Y.useLayoutEffect)(()=>{let e=c.current?.querySelectorAll(`[data-spot-row]`);return!l||!e?.length||!_n()?void 0:vn(on(e,{opacity:[0,1],translateY:[-4,0],duration:220,delay:mn(18),ease:`outQuart`}),220+18*e.length)},[l]),(0,Y.useEffect)(()=>{i>=s.length&&a(0)},[s,i,a]),(0,Y.useEffect)(()=>{(c.current?.querySelector(`[data-spot-row="${i}"]`))?.scrollIntoView({block:`nearest`})},[i]);let u=e=>{e&&(jn(e.route),o())},d=[],f=null;return s.forEach((e,t)=>{(!f||f.kind!==e.kind)&&(f={kind:e.kind,rows:[]},d.push(f)),f.rows.push({entry:e,index:t})}),e.trim()?(0,Z.jsxs)(`div`,{className:`spotlight`,ref:c,id:`spotlight-list`,role:`listbox`,"aria-label":`Search results`,children:[r&&!t&&(0,Z.jsxs)(`div`,{className:`spot-empty`,role:`presentation`,children:[`Could not load the search index — `,r]}),n&&!t&&!r&&(0,Z.jsx)(`div`,{className:`spot-empty`,role:`presentation`,children:`Loading…`}),!n&&s.length===0&&t&&(0,Z.jsxs)(`div`,{className:`spot-empty`,role:`presentation`,children:[`No matches for “`,e,`”.`]}),d.map(t=>(0,Z.jsxs)(`div`,{className:`spot-group`,role:`group`,"aria-label":t.kind,children:[(0,Z.jsx)(`div`,{className:`spot-group-head`,"aria-hidden":`true`,children:t.kind}),t.rows.map(({entry:t,index:n})=>(0,Z.jsxs)(`div`,{id:`spot-opt-${n}`,"data-spot-row":n,role:`option`,"aria-selected":n===i,className:`spot-row ${n===i?`on`:``}`,onMouseDown:e=>{e.preventDefault(),u(t)},onMouseEnter:()=>a(n),children:[(0,Z.jsx)(`div`,{className:`spot-title`,children:di(t.title,e)}),t.desc?(0,Z.jsx)(`div`,{className:`spot-desc`,children:t.desc}):null]},`${t.route}-${n}`))]},t.kind))]}):null}function pi({value:e,onChange:t,dataRev:n}){let r=(0,Y.useRef)(null),i=(0,Y.useRef)(null),[a,o]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(0),{index:l,error:u,prime:d}=si(n);(0,Y.useEffect)(()=>{let e=e=>{((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()===`k`||e.key===`/`&&!e.target.closest(`input, textarea, select`))&&(e.preventDefault(),r.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,Y.useEffect)(()=>{if(!a)return;let e=e=>{i.current?.contains(e.target)||o(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[a]);let f=a&&!!e.trim(),p=f&&l?ui(l,e):[],m=s<p.length?`spot-opt-${s}`:void 0;return(0,Z.jsxs)(`div`,{className:`tb-search`,ref:i,children:[(0,Z.jsx)(Q,{name:`search`,className:`mag glyph`}),(0,Z.jsx)(`input`,{ref:r,role:`combobox`,"aria-label":`Search the harness`,"aria-autocomplete":`list`,"aria-expanded":f,"aria-controls":f?`spotlight-list`:void 0,"aria-activedescendant":m,value:e,onChange:e=>{t(e.target.value),c(0)},onFocus:()=>{o(!0),d()},onKeyDown:n=>{if(f){if(n.key===`ArrowDown`)n.preventDefault(),c(e=>Math.min(e+1,Math.max(p.length-1,0)));else if(n.key===`ArrowUp`)n.preventDefault(),c(e=>Math.max(e-1,0));else if(n.key===`Enter`){let e=p[s];e&&(n.preventDefault(),jn(e.route),o(!1),r.current?.blur())}else n.key===`Escape`&&(n.preventDefault(),e?t(``):(o(!1),r.current?.blur()))}},placeholder:`Search the harness…`,title:`Press / to jump here, or Ctrl-K / ⌘K from inside any field`}),(0,Z.jsx)(`span`,{className:`kbd`,children:`Ctrl K`}),(0,Z.jsx)(`span`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:f?p.length?`${p.length} results`:`no matches`:``}),f&&(0,Z.jsx)(fi,{query:e,index:l,loading:!l,error:u,active:s,onActive:c,onClose:()=>{o(!1),r.current?.blur()}})]})}function mi({installs:e,onSwitch:t}){let n=(e||[]).filter(e=>e.state===`active`);if(n.length<2)return null;let r=n.find(e=>e.selected)||n[0];return(0,Z.jsx)(`select`,{className:`sel tb-harness`,"aria-label":`Harness to view`,title:`Harness the console is viewing`,value:r.id,onChange:async e=>{let r=n.find(t=>t.id===e.target.value);if(r)try{await c.selectView(r.host,r.path),t?.()}catch{}},children:n.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.scope===`global`?`${e.host} · global`:`${ni(e)} · ${e.host}`},e.id))})}function hi({children:e,...t}){let n=xn(`button.on`);return(0,Z.jsxs)(`div`,{className:`seg`,role:`group`,ref:n,...t,children:[(0,Z.jsx)(`span`,{className:`glide`,"aria-hidden":`true`}),e]})}function gi({value:e,onChange:t,labelledBy:n}){let r=dr(e);return(0,Z.jsxs)(`div`,{className:`accent-picker`,role:`group`,"aria-labelledby":n,children:[sr.map(n=>(0,Z.jsx)(`button`,{type:`button`,className:`accent-src${e===n.id?` on`:``}`,"aria-pressed":e===n.id,title:n.tagline,onClick:()=>t(n.id),children:n.short},n.id)),(0,Z.jsxs)(`div`,{className:`accent-swatches`,children:[cr.map(n=>(0,Z.jsx)(`button`,{type:`button`,className:`accent-swatch${e===n.id?` on`:``}`,style:{"--sw":n.hex},"aria-pressed":e===n.id,"aria-label":`${n.short} accent`,title:n.short,onClick:()=>t(n.id)},n.id)),(0,Z.jsx)(`label`,{className:`accent-swatch accent-custom${r?` on picked`:``}`,style:r?{"--sw":r}:void 0,title:r?`Your colour, ${r}`:`Pick any colour`,children:(0,Z.jsx)(`input`,{type:`color`,"aria-label":`Custom accent colour`,value:(r||`#3AD4C4`).toLowerCase(),onChange:e=>t(`hex:${e.target.value.toUpperCase()}`)})})]})]})}function _i({flavour:e,onFlavour:t,accentMode:n,onAccentMode:r,layout:i,onLayout:a,onClose:o}){let s=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&!e.target.closest?.(`.tb-pop-anchor`)&&o()},t=e=>{e.key===`Escape`&&o()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[o]);let c=(e,t,n,r,i)=>(0,Z.jsxs)(`div`,{className:`ap-group`,children:[(0,Z.jsx)(`span`,{className:`ap-label`,id:e,children:t}),(0,Z.jsx)(hi,{"aria-labelledby":e,children:n.map(e=>(0,Z.jsx)(`button`,{type:`button`,className:r===e.id?`on`:``,"aria-pressed":r===e.id,title:e.tagline,onClick:()=>i(e.id),children:e.short},e.id))})]});return(0,Z.jsxs)(`div`,{className:`appearance-pop`,ref:s,role:`dialog`,"aria-label":`Appearance`,children:[c(`ap-skin`,`Skin`,tr,e,t),(0,Z.jsxs)(`div`,{className:`ap-group`,children:[(0,Z.jsx)(`span`,{className:`ap-label`,id:`ap-accent`,children:`Accent`}),(0,Z.jsx)(gi,{value:n,onChange:r,labelledBy:`ap-accent`})]}),c(`ap-view`,`Overview view`,_r,i,a)]})}function vi({route:e,navOpen:t,onToggleNav:n,overview:r,installs:i,query:a,onQuery:o,mode:s,onToggleMode:c,appearance:l,dataRev:u,onSwitch:d}){let[f,p]=(0,Y.useState)(!1),m=r?.install,h=m?`${m.host}:${m.scope}`:Lr(r?.target),g=e.tab&&Tn[e.tab];return(0,Z.jsxs)(`header`,{className:`topbar`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`tb-menu iconbtn`,onClick:n,"aria-label":t?`Close navigation`:`Open navigation`,"aria-expanded":!!t,"aria-controls":`rail-nav`,children:(0,Z.jsx)(Q,{name:t?`x`:`menu`})}),(0,Z.jsxs)(`nav`,{className:`crumbs`,"aria-label":`Breadcrumb`,children:[(0,Z.jsx)(`span`,{className:`crumb-root mono`,title:r?.target||void 0,children:h}),(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,Z.jsx)(`span`,{className:g?``:`crumb-here`,"aria-current":g?void 0:`page`,children:Cn[e.page]}),g?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,Z.jsx)(`span`,{className:`crumb-here`,"aria-current":`page`,children:g})]}):null]}),(0,Z.jsx)(`div`,{className:`topbar-spacer`}),(0,Z.jsx)(mi,{installs:i,onSwitch:d}),(0,Z.jsx)(pi,{value:a,onChange:o,dataRev:u}),(0,Z.jsxs)(`div`,{className:`tb-pop-anchor`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`iconbtn`,"aria-label":`Appearance`,title:`Appearance`,"aria-expanded":f,onClick:()=>p(e=>!e),children:(0,Z.jsx)(Q,{name:`themes`})}),f?(0,Z.jsx)(_i,{...l,onClose:()=>p(!1)}):null]}),(0,Z.jsx)(`button`,{type:`button`,className:`iconbtn`,title:s===`light`?`Switch to dark`:`Switch to light`,"aria-label":s===`light`?`Switch to dark mode`:`Switch to light mode`,onClick:c,children:(0,Z.jsx)(Q,{name:s===`light`?`moon`:`sun`})})]})}function yi({themes:e,current:t,onPick:n,onClose:r}){let i=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&r()},t=e=>{e.key===`Escape`&&r()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]),(0,Y.useEffect)(()=>{i.current?.querySelector(`button.pop-item`)?.focus()},[]),(0,Z.jsxs)(`div`,{className:`pop`,ref:i,role:`menu`,"aria-label":`Switch voice`,children:[(0,Z.jsx)(`div`,{className:`tick`,style:{padding:`4px 10px 8px`},children:`Switch voice`}),e.map(e=>(0,Z.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e.name===t,className:`pop-item ${e.name===t?`on`:``}`,onClick:()=>n(e.name),children:[(0,Z.jsx)(`span`,{className:`po`,style:{background:Pn(e.accent),boxShadow:`0 0 8px ${Pn(e.accent)}`}}),(0,Z.jsx)(`span`,{className:`pn`,children:e.name})]},e.name))]})}var bi=3500;function xi({toast:e,onClose:t}){return(0,Y.useEffect)(()=>{let e=setTimeout(t,bi);return()=>clearTimeout(e)},[e]),(0,Z.jsxs)(`div`,{className:`toast ${e.kind}`,role:e.kind===`err`?`alert`:`status`,"aria-live":e.kind===`err`?void 0:`polite`,children:[(0,Z.jsx)(`div`,{children:e.msg}),(0,Z.jsx)(`div`,{style:{marginTop:8},children:(0,Z.jsx)(`button`,{className:`btn ghost`,onClick:t,children:`Dismiss`})})]})}function Si({runs:e,open:t,onToggle:n,onClear:r,onCancel:i,busy:a,finish:o}){let s=(0,Y.useRef)(null),c=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{let e=c.current;o&&e&&(e.classList.remove(`flash-ok`,`flash-bad`),e.offsetWidth,e.classList.add(o.status===`done`?`flash-ok`:`flash-bad`))},[o]);let l=e.length?e[e.length-1].output.length:0;return(0,Y.useEffect)(()=>{let e=s.current;e&&t&&(e.scrollTop=e.scrollHeight)},[e.length,l,t]),(0,Z.jsxs)(`div`,{className:`console`,style:{height:`42vh`,transform:t?`none`:`translateY(calc(42vh - 42px))`},children:[(0,Z.jsxs)(`div`,{className:`console-head`,ref:c,onClick:n,onAnimationEnd:e=>{e.target===e.currentTarget&&e.currentTarget.classList.remove(`flash-ok`,`flash-bad`)},children:[a&&(0,Z.jsx)(`span`,{className:`console-progress`,"aria-hidden":`true`}),(0,Z.jsxs)(`span`,{className:`ttl`,children:[(0,Z.jsx)(`span`,{className:`live ${a?`on`:``}`}),`terminal`]}),(0,Z.jsx)(`span`,{className:`count`,children:e.length}),(0,Z.jsxs)(`div`,{className:`right`,onClick:e=>e.stopPropagation(),children:[(0,Z.jsx)(`button`,{className:`iconbtn`,title:`Clear`,"aria-label":`Clear run history`,onClick:r,disabled:!e.length,children:(0,Z.jsx)(Q,{name:`clear`})}),(0,Z.jsx)(`button`,{className:`iconbtn`,title:t?`Collapse`:`Expand`,"aria-label":t?`Collapse console`:`Expand console`,"aria-expanded":t,onClick:n,children:(0,Z.jsx)(Q,{name:`chevron`,className:`glyph`,style:{transform:t?`rotate(90deg)`:`rotate(-90deg)`}})})]})]}),t&&(0,Z.jsxs)(`div`,{className:`console-body`,ref:s,children:[e.length===0&&(0,Z.jsx)(`div`,{className:`console-empty`,children:`No commands run yet. Actions you trigger stream here.`}),e.map(e=>(0,Z.jsxs)(`div`,{className:`run`,children:[(0,Z.jsxs)(`div`,{className:`run-head`,children:[(0,Z.jsx)(`span`,{className:`pr`,children:`$`}),(0,Z.jsx)(`span`,{className:`act`,children:e.action}),(0,Z.jsx)(`span`,{className:`st ${e.status}`,children:e.status===`running`?`…running`:`${e.status===`done`?`✓ done`:`✗ failed`}${e.duration?` · ${e.duration}s`:``}`}),e.status===`running`&&i&&(0,Z.jsx)(`button`,{className:`iconbtn run-cancel`,title:`Cancel this run`,"aria-label":`Cancel the ${e.action} run`,onClick:()=>i(e.id),children:(0,Z.jsx)(Q,{name:`x`})})]}),e.output&&(0,Z.jsx)(`pre`,{className:`run-out`,children:e.output})]},e.id))]})]})}var Ci=550,wi=`gs-splash-seen`;function Ti(){try{if(window.localStorage.getItem(wi))return 0;window.localStorage.setItem(wi,`1`)}catch{}return Ci}function Ei({ready:e,onDone:t}){let[n,r]=(0,Y.useState)(!1),[i,a]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{let e=setTimeout(()=>r(!0),Ti());return()=>clearTimeout(e)},[]),e&&n&&!i&&a(!0),(0,Y.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>t?.(),700);return()=>clearTimeout(e)},[i]),(0,Z.jsxs)(`div`,{className:`boot-splash${i?` fading`:``}`,"aria-hidden":`true`,onAnimationEnd:e=>{e.animationName===`splashOut`&&t?.()},children:[(0,Z.jsxs)(`div`,{className:`boot-dial`,children:[(0,Z.jsxs)(`svg`,{className:`boot-ring`,viewBox:`0 0 172 172`,children:[(0,Z.jsx)(`circle`,{cx:`86`,cy:`86`,r:`72`,fill:`none`,stroke:`var(--surface-3)`,strokeWidth:`9`}),(0,Z.jsx)(`circle`,{cx:`86`,cy:`86`,r:`50`,fill:`none`,stroke:`var(--line-2)`,strokeWidth:`8`,strokeDasharray:`1.2 5.3`,opacity:`.7`}),(0,Z.jsx)(`circle`,{className:`boot-progress`,cx:`86`,cy:`86`,r:`72`,fill:`none`,stroke:`var(--accent)`,strokeWidth:`9`,strokeLinecap:`round`})]}),(0,Z.jsxs)(`svg`,{className:`boot-sprout`,viewBox:`0 0 24 24`,children:[(0,Z.jsx)(`path`,{className:`bs-stem`,d:`M12 21.5v-9`,stroke:`var(--accent)`,strokeWidth:`2`,strokeLinecap:`round`,fill:`none`}),(0,Z.jsx)(`path`,{className:`bs-leaf bs-leaf-main`,d:`M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z`,fill:`var(--accent)`}),(0,Z.jsx)(`path`,{className:`bs-leaf bs-leaf-back`,d:`M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z`,fill:`var(--accent)`,opacity:`.42`}),(0,Z.jsx)(`circle`,{cx:`12`,cy:`12.4`,r:`1.1`,fill:`var(--bg)`})]})]}),(0,Z.jsxs)(`div`,{className:`boot-status`,children:[(0,Z.jsx)(`span`,{children:`germinating harness`}),(0,Z.jsx)(`span`,{className:`boot-caret`})]})]})}function Di({label:e=`Loading…`}){return(0,Z.jsxs)(`div`,{className:`loading`,role:`status`,children:[e,(0,Z.jsxs)(`div`,{className:`skel`,"aria-hidden":`true`,children:[(0,Z.jsx)(`div`,{className:`skel-bar`}),(0,Z.jsx)(`div`,{className:`skel-bar`}),(0,Z.jsx)(`div`,{className:`skel-bar`})]})]})}function Oi({open:e,title:t,children:n,confirmLabel:r,onConfirm:i,onClose:a}){let o=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let t=o.current;t&&(e&&!t.open&&(typeof t.showModal==`function`?t.showModal():t.setAttribute(`open`,``)),!e&&t.open&&(typeof t.close==`function`?t.close():t.removeAttribute(`open`)))},[e]),(0,Z.jsxs)(`dialog`,{ref:o,className:`confirm`,onCancel:a,onClose:a,children:[(0,Z.jsx)(`h3`,{className:`confirm-title`,children:t}),(0,Z.jsx)(`div`,{className:`confirm-body`,children:n}),(0,Z.jsxs)(`div`,{className:`confirm-actions`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:a,children:`Cancel`}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:i,autoFocus:!0,children:r||`Confirm`})]})]})}var ki=(0,Y.createContext)(null),Ai=()=>{throw Error(`useConfirm() needs a <ConfirmProvider> above it`)};function ji(){return(0,Y.useContext)(ki)||Ai}function Mi({children:e}){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(null),i=e=>{let t=r.current;r.current=null,n(null),t?.(e)},a=(0,Y.useCallback)((e,t={})=>new Promise(i=>{r.current?.(!1),r.current=i,n({msg:e,...t})}),[]);return(0,Z.jsxs)(ki.Provider,{value:a,children:[e,(0,Z.jsx)(Oi,{open:!!t,title:t?.title||`Are you sure?`,confirmLabel:t?.confirmLabel,onConfirm:()=>i(!0),onClose:()=>i(!1),children:t?.msg})]})}function Ni({error:e,style:t}){return e?(0,Z.jsx)(`p`,{className:`badge bad`,style:t,children:e}):null}function Pi({onAction:e}){let{data:t,error:n}=X(()=>c.themes(),[]),[r,i]=(0,Y.useState)(``),[a,o]=(0,Y.useState)(``);if(n)return(0,Z.jsx)(Ni,{error:n});if(!t)return(0,Z.jsx)(Di,{});let s=r||t.current?.theme||`neutral`,l=t.emits?.some(e=>e.name===`opencode-global`),u=a||(l?`opencode-global`:t.current?.emit||t.emits?.[0]?.name||``),d=i,f=o;return(0,Z.jsxs)(`div`,{className:`narrow-lg`,children:[(0,Z.jsx)(`div`,{className:`head-row mb-18`,children:(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`h`,children:`Deploy your harness`}),(0,Z.jsx)(`p`,{className:`sub`,children:`Geneseed isn't implanted on this machine yet. Pick a voice and an install mode, then deploy. The graft runs in the console below, and this dashboard lights up when it lands.`})]})}),(0,Z.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,Z.jsx)(`div`,{className:`card-head`,children:(0,Z.jsx)(`h3`,{children:`1 · Choose a voice`})}),(0,Z.jsx)(`div`,{className:`row wrap gap-10`,children:t.themes.map(e=>(0,Z.jsxs)(`button`,{className:`btn ${e.name===s?`soft`:`ghost`}`,onClick:()=>d(e.name),title:e.blurb||e.tagline||e.name,children:[(0,Z.jsx)(`span`,{className:`po`,style:{width:10,height:10,borderRadius:`50%`,background:Pn(e.accent),boxShadow:`0 0 8px ${Pn(e.accent)}`}}),(0,Z.jsx)(`span`,{style:{textTransform:`capitalize`},children:e.name})]},e.name))})]}),(0,Z.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,Z.jsx)(`div`,{className:`card-head`,children:(0,Z.jsx)(`h3`,{children:`2 · Install mode`})}),(0,Z.jsxs)(`p`,{className:`sub mb-16`,children:[(0,Z.jsx)(`code`,{children:`opencode-global`}),` deploys once to your global config so every repo on this machine inherits the harness (recommended). Other modes render into a chosen directory.`]}),(0,Z.jsxs)(`label`,{className:`stack`,style:{gap:6,maxWidth:360},children:[(0,Z.jsx)(`span`,{className:`tick`,children:`Mode`}),(0,Z.jsx)(`select`,{className:`sel`,value:u,onChange:e=>f(e.target.value),children:t.emits.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[e.name,e.desc?` · ${e.desc}`:``]},e.name))})]})]}),(0,Z.jsxs)(`button`,{className:`btn btn-grid`,disabled:!s||!u,onClick:()=>e(`build`,{theme:s,emit:u}),children:[(0,Z.jsx)(Q,{name:`build`}),`Deploy harness`]})]})}var Fi=e=>X(()=>c.rules().catch(()=>null),[e],`rules`,{revalidate:!0}),Ii=()=>jr(`rules`),$={security:`oklch(0.74 0.085 45)`,verify:`oklch(0.78 0.075 200)`,process:`oklch(0.76 0.075 150)`,craft:`oklch(0.78 0.085 95)`,context:`oklch(0.74 0.08 280)`,comms:`oklch(0.76 0.085 345)`},Li={security:{label:`Security`,c:$.security},verify:{label:`Verification`,c:$.verify},process:{label:`Process`,c:$.process},craft:{label:`Craft`,c:$.craft},context:{label:`Context`,c:$.context},comms:{label:`Communication`,c:$.comms}},Ri={craft:$.craft,rigor:$.verify,ops:$.process,process:$.security,comms:$.comms},zi=e=>Ri[e]||`var(--text-3)`,Bi={design:{label:`Design`,c:$.context},build:{label:`Build`,c:$.craft},review:{label:`Review`,c:$.security},ship:{label:`Ship`,c:$.process},understand:{label:`Understand`,c:$.verify},learn:{label:`Learn`,c:$.comms},harness:{label:`Harness`,c:`oklch(0.76 0.07 250)`},personal:{label:`Personal`,c:`oklch(0.72 0.025 250)`}},Vi=Object.keys(Bi);function Hi(e){let t=String(e||``),n=/\(retired\)\s*$/i.test(t);t=t.replace(/\s*\(retired\)\s*$/i,``),t=t.replace(/^(?:Rule\s+[IVXLCDM\d]+|Doctrine\s+[a-z]+\s+\d+)\s*[—-]\s*/i,``);let r=t.indexOf(` · `);return r===-1?{latin:``,name:t.trim(),retired:n}:{latin:t.slice(0,r).trim(),name:t.slice(r+3).trim(),retired:n}}var Ui=[[10,`X`],[9,`IX`],[5,`V`],[4,`IV`],[1,`I`]],Wi=e=>{let t=``;for(let[n,r]of Ui)for(;e>=n;)t+=r,e-=n;return t};function Gi(e){let t=/^([a-z]+)-(\d+)$/.exec(String(e));return t?t[1]===`law`?Wi(Number(t[2])):`${t[1]}.${t[2]}`:String(e)}var Ki=new Set([`I`,`III`,`IV`,`process.1`,`process.5`,`rigor.5`,`ops.2`]),qi={I:{key:`secretsGate`,label:`Secrets gate`},III:{key:`doneGate`,label:`Done gate`},IV:{key:`deletionGate`,label:`Deletion gate`}},Ji={I:{arm:`Writes that would carry a credential-shaped string are refused again.`,off:`A write carrying a credential-shaped string (on OpenCode, also a write to a key file) stops being refused. Rule I’s text still binds the agent; protected checks, real data loss and commit/push consent stay gated.`},III:{arm:`A turn that edited files cannot end before the project’s declared checks pass.`,off:`A turn that edited files may end without the checks in .geneseed/done-checks.txt passing. Rule III’s text still binds the agent; every other gate stays.`},IV:{arm:`Commands that would lose data nothing else holds ask again.`,off:`Commands that would really lose data — discarding uncommitted work, deleting an unpushed branch, removing untracked files — stop asking. Rule IV’s text still binds the agent; secrets, root-wide scans and commit/push consent stay gated.`}},Yi=(e,t={})=>qi[e]&&t?.[qi[e].key]===!1?`Gate off`:Ki.has(e)?`Hook gate`:`Instruction`;function Xi(e){let t={};for(let n of e||[]){let e=Bi[n.klass]?n.klass:`personal`,r=t[e]||(t[e]={key:e,label:Bi[e].label,ok:0,exp:0});n.status===`experimental`?r.exp+=1:r.ok+=1}let n=Vi.filter(e=>t[e]).map(e=>({...t[e],n:t[e].ok+t[e].exp}));return{rows:n,total:n.reduce((e,t)=>e+t.n,0),experimental:n.reduce((e,t)=>e+t.exp,0),max:Math.max(1,...n.map(e=>e.n))}}var Zi=(e,t,n=t+`s`)=>`${e} ${e===1?t:n}`;function Qi({overview:e,setup:t,rules:n,activity:r,profile:i,skills:a,laws:o}){let s=[],c=e?.doctor;c&&!c.ok&&s.push({id:`doctor`,tag:`Doctor`,tone:`bad`,title:`Doctor found ${Zi(c.problems.length,`problem`)}`,detail:c.problems[0]||``,where:`installs/doctor`,verb:`Review`,href:`#/installs/doctor`});let l=e?.diff,u=Hr(l);u&&s.push({id:`drift`,tag:`Drift`,tone:`warn`,title:`${Zi(u,`file`)} drifted from the source`,detail:`${l.edited} edited, ${l.added} added, ${l.missing} missing`,where:`installs/edits`,verb:`Review`,href:`#/installs/edits`}),i?.seeded&&s.push({id:`profile`,tag:`Profile`,tone:`warn`,title:`Profile is still the seeded template`,detail:`every section holds placeholder text`,where:`personal/profile`,verb:`Fill in`,href:`#/personal/profile`});let d=n?.exists?n.stats:null;d&&d.rules===0&&s.push({id:`rules`,tag:`Rules`,tone:``,title:`No standing rules yet`,detail:`0 of ${d.max_rules} · ${d.tokens} of ${d.max_tokens} tokens`,where:`personal/rules`,verb:`Write a rule`,href:`#/personal/rules`});let f=Object.entries(t?.gates?.asks||{}).sort((e,t)=>t[1]-e[1]);if(f.length){let[e,n]=f[0],r=Gi(e),i=(o?.items||[]).find(e=>e.name===r),a=i?Hi(i.title).name:r;s.push({id:`gates`,tag:`Gates`,tone:``,title:`${a} asked ${Zi(n,`time`)}`,detail:`${n} of ${t.gates.total} gate asks`,where:r,verb:`Review`,href:`#/item/law/${encodeURIComponent(r)}`})}if(a){let{rows:e,experimental:t}=Xi(a.items);t&&s.push({id:`skills`,tag:`Skills`,tone:``,title:`${Zi(t,`skill`)} still experimental`,detail:e.filter(e=>e.exp).sort((e,t)=>t.exp-e.exp).map(e=>`${e.label.toLowerCase()} ${e.exp}`).join(`, `),where:`library/skills`,verb:`Triage`,href:`#/skills`})}return t&&t.facts===0&&s.push({id:`memory`,tag:`Memory`,tone:``,title:`Memory holds no facts`,detail:`MEMORY.md is an empty index`,where:`library/memory`,verb:`Open`,href:`#/section/memory`}),r&&r.enabled===!1&&s.push({id:`activity`,tag:`Activity`,tone:``,title:`Session tracking is off`,detail:`no per-session trace is kept`,where:`activity`,verb:`Turn on`,href:`#/activity`}),s}var $i=e=>Hr(e.drift);function ea(e){let t=e?.installs||[],n=t.filter(e=>e.state===`active`),r=t.length-n.length,i=n.filter(e=>e.verdict===`behind`).length,a=n.reduce((e,t)=>e+$i(t),0),o=e?.doctor,s=o&&!o.ok?`bad`:i||a?`warn`:`good`;return{tone:s,head:{good:`Harness healthy.`,warn:`Harness needs a look.`,bad:`Harness has problems.`}[s],facts:[Zi(n.length,`active install`)+(r?`, ${r} disabled`:``),o?o.ok?`doctor clean`:`doctor found ${Zi(o.problems.length,`problem`)}`:`doctor not run yet`,i?`${Zi(i,`install`)} behind source`:`all in step with source`,a?`${Zi(a,`file`)} hand-edited`:`no hand edits`]}}var ta=[[`carrier`,`Root file`],[`skills`,`Skill list`],[`agents`,`Agent list`],[`context`,`Session files`]],na=e=>e?e.carrier+e.skills+e.agents+e.context:0,ra=e=>`≈${(e/4/1e3).toFixed(1)}k`,ia=e=>`${e.host} · ${e.scope}`;function aa({fleet:e,usage:t,...n}){let r=[],i=e?.doctor;i&&!i.ok&&r.push({id:`doctor`,tag:`Doctor`,tone:`bad`,title:`Doctor found ${Zi(i.problems.length,`problem`)}`,detail:i.problems[0]||``,where:`installs/doctor`,verb:`Review`,href:`#/installs/doctor`});for(let t of(e?.installs||[]).filter(e=>e.state===`active`)){t.verdict===`behind`&&r.push({id:`behind:${t.id}`,tag:`Behind`,tone:`warn`,title:`${ia(t)} is behind its source`,detail:t.built_epoch?`built ${Ir(t.built_epoch)} ago`:`never built`,where:t.host,verb:`Rebuild`,act:`build-all`});let e=$i(t);e&&r.push({id:`drift:${t.id}`,tag:`Drift`,tone:`warn`,title:`${ia(t)}: ${Zi(e,`file`)} edited by hand`,detail:`${t.drift.edited} edited, ${t.drift.added} added, ${t.drift.missing} missing`,where:`installs/edits`,verb:`Review`,href:`#/installs/edits`})}if(t&&t.days_counted>=30&&t.never?.length){let e=t.never.filter(e=>e.kind===`skill`).length;r.push({id:`usage`,tag:`Usage`,tone:``,sugg:!0,title:`${Zi(e,`skill`)} never fired in 30 days`,detail:`${Zi(t.never.length-e,`agent`)} too`,where:`library/skills`,verb:`Triage`,href:`#/skills`})}let a=Qi({...n,overview:n.overview&&{...n.overview,doctor:null,diff:null}});for(let e of a)r.push({...e,sugg:!0});return r}function oa(e,t){return(e?.rules||[]).map(e=>{let n=Gi(e.rule),r=(t?.items||[]).find(e=>e.name===n);return{...e,name:r?Hi(r.title).name:e.rule===`wiki`?`Wiki guard`:n}})}var sa=e=>e.catch(()=>null),ca=(e,t)=>`${t?Math.min(100,e/t*100):0}%`;function la({update:e,onAction:t}){return e?e.latest===null?(0,Z.jsxs)(`span`,{className:`mono dim ver-chip`,children:[e.current??``,` · update check unavailable`]}):e.available?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:`mono ver-chip`,children:[e.current,` `,(0,Z.jsxs)(`span`,{className:`ver-new`,children:[e.latest,` available`]})]}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>t(`update`),children:`Update`})]}):(0,Z.jsxs)(`span`,{className:`mono dim ver-chip`,children:[e.current,` · latest`]}):null}function ua({fleet:e}){let t=ea(e);return(0,Z.jsxs)(`div`,{className:`health ${t.tone}`,role:`status`,children:[(0,Z.jsx)(`span`,{className:`health-dot`,"aria-hidden":`true`}),(0,Z.jsxs)(`p`,{className:`verdict-facts`,children:[(0,Z.jsx)(`b`,{children:t.head}),t.facts.map(e=>(0,Z.jsx)(`span`,{className:`muted`,children:e},e))]})]})}function da({chars:e}){let t=yn(e);return(0,Z.jsxs)(`span`,{className:`mono`,children:[ra(t??e),` tok`]})}function fa({cost:e,i:t}){let n=2*Math.PI*14,r=e.ceiling?Math.min(1,e.carrier/e.ceiling):0;return(0,Z.jsxs)(`svg`,{className:`ldg-ring`,viewBox:`0 0 36 36`,"aria-hidden":`true`,children:[(0,Z.jsx)(`circle`,{className:`bg`,cx:`18`,cy:`18`,r:14}),(0,Z.jsx)(`circle`,{className:`fg`+(e.ceiling&&e.carrier>e.ceiling?` over`:``),cx:`18`,cy:`18`,r:14,strokeDasharray:n.toFixed(2),strokeDashoffset:(n*(1-r)).toFixed(2),style:{"--circ":n.toFixed(2),"--i":t}})]})}function pa({i:e,n:t,onAction:n,onOpen:r}){let i=(0,Z.jsxs)(`td`,{children:[(0,Z.jsx)(`span`,{className:`ldg-host`,children:e.host}),` `,(0,Z.jsx)(`span`,{className:`dim`,children:e.scope}),(0,Z.jsx)(`div`,{className:`mono dim ldg-path`,children:e.path})]});if(e.state!==`active`)return(0,Z.jsxs)(`tr`,{className:`ldg-off`,children:[i,(0,Z.jsxs)(`td`,{children:[e.theme,` `,(0,Z.jsxs)(`span`,{className:`dim`,children:[`· `,e.footprint]})]}),(0,Z.jsx)(`td`,{children:(0,Z.jsx)(`span`,{className:`pill off`,children:`disabled`})}),(0,Z.jsx)(`td`,{}),(0,Z.jsx)(`td`,{}),(0,Z.jsx)(`td`,{}),(0,Z.jsx)(`td`,{className:`ldg-act`,children:(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>r(e),children:`Open`})})]});let a=Hr(e.drift),o={synced:(0,Z.jsx)(`span`,{className:`pill good`,children:`in step`}),behind:(0,Z.jsx)(`span`,{className:`pill warn`,children:`behind source`}),unknown:(0,Z.jsx)(`span`,{className:`pill off`,children:`not checked`})}[e.verdict],s=na(e.cost),c=e.cost&&Math.round(e.cost.carrier/e.cost.ceiling*100);return(0,Z.jsxs)(`tr`,{children:[i,(0,Z.jsxs)(`td`,{children:[e.theme,` `,(0,Z.jsxs)(`span`,{className:`dim`,children:[`· `,e.footprint]})]}),(0,Z.jsx)(`td`,{children:o}),(0,Z.jsx)(`td`,{children:e.diffable?a?(0,Z.jsxs)(`span`,{className:`mono t-warn`,children:[a,` edited`]}):e.drift?.linked?(0,Z.jsxs)(`span`,{className:`mono dim`,title:`Yours: links Geneseed leaves alone`,children:[e.drift.linked,` linked`]}):(0,Z.jsx)(`span`,{className:`mono dim`,children:`none`}):(0,Z.jsx)(`span`,{className:`dim`,title:`Drift is only checked for global installs`,children:`not checkable`})}),(0,Z.jsx)(`td`,{children:e.cost?(0,Z.jsxs)(`div`,{className:`ldg-cost`,title:`root file ${c}% of the ${e.footprint} ceiling`,children:[(0,Z.jsx)(fa,{cost:e.cost,i:t}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(da,{chars:s}),(0,Z.jsxs)(`span`,{className:`dim ldg-sub`,children:[`root file `,c,`% of ceiling`]})]})]}):(0,Z.jsx)(`span`,{className:`dim`,children:`not measured`})}),(0,Z.jsx)(`td`,{className:`mono dim`,children:e.built_epoch?`${Ir(e.built_epoch)} ago`:`never`}),(0,Z.jsx)(`td`,{className:`ldg-act`,children:e.verdict===`behind`||a?(0,Z.jsx)(`button`,{type:`button`,className:`btn sm`,onClick:()=>n(`build-all`),children:`Rebuild`}):(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>r(e),children:`Open`})})]})}function ma({rows:e,onAction:t}){let n=e.filter(e=>!e.sugg).length;return(0,Z.jsxs)(`section`,{className:`panel`,"aria-labelledby":`ldg-needs`,children:[(0,Z.jsxs)(`div`,{className:`panel-head panel-head-rule`,children:[(0,Z.jsx)(`h2`,{id:`ldg-needs`,children:`Needs attention`}),(0,Z.jsxs)(`span`,{className:`mono dim`,children:[n,` problem`,n===1?``:`s`,`, `,e.length-n,` suggestion`,e.length-n===1?``:`s`]})]}),e.length?(0,Z.jsx)(`ul`,{className:`needs`,children:e.map(e=>(0,Z.jsxs)(`li`,{className:e.sugg?`sugg`:``,children:[(0,Z.jsx)(`span`,{className:`tag ${e.tone}`,children:e.tag}),(0,Z.jsxs)(`span`,{className:`needs-what`,children:[(0,Z.jsx)(`b`,{children:e.title}),e.detail?(0,Z.jsxs)(`span`,{className:`dim`,children:[` · `,e.detail]}):null]}),(0,Z.jsx)(`span`,{className:`mono dim needs-where`,children:e.where}),e.act?(0,Z.jsx)(`button`,{type:`button`,className:`needs-verb linkish`,onClick:()=>t(e.act),children:e.verb}):(0,Z.jsx)(`a`,{className:`needs-verb`,href:e.href,children:e.verb})]},e.id))}):(0,Z.jsx)(`p`,{className:`needs-empty`,children:`Nothing needs you.`})]})}function ha({installs:e}){let t=e.filter(e=>e.state===`active`&&e.cost),n=Math.max(1,...t.map(e=>Math.max(na(e.cost),e.cost.ceiling||0)));return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-cost`,children:[(0,Z.jsxs)(`div`,{className:`panel-head`,children:[(0,Z.jsx)(`h2`,{id:`ldg-cost`,children:`Always-on cost`}),(0,Z.jsx)(`span`,{className:`mono dim`,children:`≈ tokens per session`})]}),t.length?t.map((e,t)=>(0,Z.jsxs)(`div`,{className:`cost-row`,children:[(0,Z.jsxs)(`div`,{className:`cost-lab`,children:[(0,Z.jsxs)(`span`,{children:[e.host,` `,(0,Z.jsx)(`span`,{className:`dim`,children:e.scope})]}),(0,Z.jsx)(`span`,{className:`mono`,children:ra(na(e.cost))})]}),(0,Z.jsxs)(`div`,{className:`cost-stack`,children:[(0,Z.jsx)(`span`,{className:`cost-segs`,style:{"--i":t},children:ta.map(([t])=>(0,Z.jsx)(`span`,{className:`cs-${t}`,style:{width:ca(e.cost[t],n)}},t))}),e.cost.ceiling?(0,Z.jsx)(`span`,{className:`cost-ceil`,style:{left:ca(e.cost.ceiling,n)},title:`root file ceiling`}):null]})]},e.id)):(0,Z.jsx)(`p`,{className:`dim`,children:`No install has a root file to measure.`}),(0,Z.jsxs)(`div`,{className:`cost-key`,children:[ta.map(([e,t])=>(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`i`,{className:`cs-${e}`}),t]},e)),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`i`,{className:`cost-ceil-key`}),`root file ceiling`]})]}),(0,Z.jsx)(`p`,{className:`dim chart-foot`,children:`Estimated as characters ÷ 4 from the emitted files.`})]})}function ga({usage:e}){let t=(0,Z.jsxs)(`div`,{className:`panel-head`,children:[(0,Z.jsx)(`h2`,{id:`ldg-usage`,children:`What fires`}),(0,Z.jsx)(`span`,{className:`mono dim`,children:`skills and agents, 30 d`})]});if(!e)return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsx)(`p`,{className:`dim`,children:`Usage could not be read.`})]});if(!e.enabled)return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsx)(`p`,{className:`dim`,children:`Usage counting is off on this machine.`})]});if(e.days_counted<30)return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsx)(`p`,{className:`muted`,children:e.since?(0,Z.jsxs)(Z.Fragment,{children:[`Counting since `,(0,Z.jsx)(`b`,{children:e.since}),`, `,e.days_counted,` of 30 days`]}):`No skill or agent call counted yet`}),(0,Z.jsx)(`div`,{className:`daytrack`,"aria-hidden":`true`,children:Array.from({length:30},(t,n)=>(0,Z.jsx)(`i`,{className:n<e.days_counted?`on`:``},n))}),(0,Z.jsx)(`p`,{className:`dim chart-foot`,children:`Rankings and the never-fired count appear once 30 days are counted, so a new install is not told every skill is unused.`})]});let n=e.rows.slice(0,7),r=Math.max(1,...n.map(e=>e.n)),i=Math.max(1,...e.per_day),a=e.per_day.reduce((e,t)=>e+t,0);return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-usage`,children:[t,(0,Z.jsxs)(`div`,{className:`cols30-wrap`,children:[(0,Z.jsxs)(`div`,{className:`chart-axis mono dim`,children:[(0,Z.jsx)(`span`,{children:`calls per day`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(bn,{value:a}),` in 30 d`]})]}),(0,Z.jsx)(`div`,{className:`cols30`,"aria-hidden":`true`,children:e.per_day.map((e,t)=>(0,Z.jsx)(`i`,{className:t===29?`today`:``,style:{height:ca(e,i),"--i":t}},t))})]}),(0,Z.jsx)(`ul`,{className:`ubars`,children:n.map((e,t)=>(0,Z.jsxs)(`li`,{className:e.kind,children:[(0,Z.jsx)(`span`,{className:`ub-name`,children:e.name}),(0,Z.jsx)(`span`,{className:`ub-trk`,children:(0,Z.jsx)(`i`,{style:{width:ca(e.n,r),"--i":t}})}),(0,Z.jsx)(`span`,{className:`mono`,children:e.n})]},`${e.install}:${e.kind}:${e.name}`))}),e.never.length?(0,Z.jsxs)(`div`,{className:`ub-never`,children:[(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`b`,{children:e.never.filter(e=>e.kind===`skill`).length}),` skills never fired`]}),(0,Z.jsx)(`a`,{className:`needs-verb`,href:`#/skills`,children:`Triage`})]}):null]})}function _a({vals:e,i:t}){let n=Math.max(1,...e),r=96/(e.length-1),i=e.map((e,t)=>`${(t*r).toFixed(1)},${(20-e/n*17).toFixed(1)}`),[a,o]=i[i.length-1].split(`,`);return(0,Z.jsxs)(`svg`,{className:`spark`,viewBox:`0 0 96 22`,"aria-hidden":`true`,style:{"--i":t},children:[(0,Z.jsx)(`polyline`,{points:`0,21 96,21`,className:`spk-base`}),(0,Z.jsx)(`polygon`,{className:`spk-area`,points:`0,21 ${i.join(` `)} 96,21`}),(0,Z.jsx)(`polyline`,{className:`spk-line`,pathLength:`1`,points:i.join(` `)}),(0,Z.jsx)(`circle`,{className:`spk-end`,cx:a,cy:o,r:`2.4`})]})}function va({gates:e,laws:t}){let n=oa(e,t);return(0,Z.jsxs)(`section`,{className:`panel chart-card`,"aria-labelledby":`ldg-gates`,children:[(0,Z.jsxs)(`div`,{className:`panel-head`,children:[(0,Z.jsx)(`h2`,{id:`ldg-gates`,children:`Gates`}),(0,Z.jsx)(`span`,{className:`mono dim`,children:`asks per rule, 30 d`})]}),n.length?(0,Z.jsx)(`ul`,{className:`gate-rows`,children:n.slice(0,6).map((e,t)=>(0,Z.jsxs)(`li`,{children:[(0,Z.jsx)(`span`,{children:e.name}),(0,Z.jsx)(_a,{vals:e.per_day,i:t}),(0,Z.jsx)(`span`,{className:`mono`,children:e.n})]},e.rule))}):(0,Z.jsx)(`p`,{className:`dim`,children:e?`No gate asked in 30 days.`:`Gate activity could not be read.`})]})}function ya({overview:e,setup:t,onAction:n,onRetry:r,dataRev:i,banner:a}){let{data:o}=X(()=>sa(c.fleet()),[i]),{data:s}=X(()=>sa(c.usage()),[i]),{data:l}=X(()=>sa(c.gates()),[i]),{data:u}=X(()=>sa(c.update()),[i]),{data:d}=Fi(i),{data:f}=X(()=>sa(c.activity()),[i]),{data:p}=X(()=>sa(c.profile()),[i]),{data:m}=X(()=>sa(c.catalog(`skills`)),[i],`catalog:skills`),{data:h}=X(()=>sa(c.catalog(`laws`)),[i],`catalog:laws`),g=o?.installs||[],_=async e=>{try{await c.selectView(e.host,e.path)}catch{}r?.(),window.location.hash=`#/installs`},v=aa({fleet:o,usage:s,overview:e,setup:t,rules:d,activity:f,profile:p,skills:m,laws:h});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`page-head`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`h`,children:`Overview`}),(0,Z.jsx)(`p`,{className:`sub mono`,children:o?`${g.length} installed · machine-wide`:` `})]}),(0,Z.jsxs)(`div`,{className:`page-actions`,children:[(0,Z.jsx)(la,{update:u,onAction:n}),(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>n(`doctor`),children:`Run doctor`})]})]}),a,(0,Z.jsxs)(`div`,{className:`ov-stack ldg`,children:[o?(0,Z.jsx)(ua,{fleet:o}):(0,Z.jsx)(`div`,{className:`health`,"aria-busy":`true`}),(0,Z.jsxs)(`section`,{className:`panel`,"aria-labelledby":`ldg-fleet`,children:[(0,Z.jsxs)(`div`,{className:`panel-head panel-head-rule`,children:[(0,Z.jsx)(`h2`,{id:`ldg-fleet`,children:`Installs`}),o?.source_fp?(0,Z.jsxs)(`span`,{className:`mono dim`,children:[`source `,o.source_fp]}):null]}),(0,Z.jsx)(`div`,{className:`ldg-scroll`,children:(0,Z.jsxs)(`table`,{className:`ldg-fleet`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:`Install`}),(0,Z.jsx)(`th`,{children:`Voice`}),(0,Z.jsx)(`th`,{children:`Sync`}),(0,Z.jsx)(`th`,{children:`Hand edits`}),(0,Z.jsx)(`th`,{children:`Always-on`}),(0,Z.jsx)(`th`,{children:`Built`}),(0,Z.jsx)(`th`,{})]})}),(0,Z.jsx)(`tbody`,{children:g.map((e,t)=>(0,Z.jsx)(pa,{i:e,n:t,onAction:n,onOpen:_},e.id))})]})})]}),(0,Z.jsx)(ma,{rows:v,onAction:n}),(0,Z.jsxs)(`div`,{className:`ov-charts`,children:[(0,Z.jsx)(ha,{installs:g}),(0,Z.jsx)(ga,{usage:s}),(0,Z.jsx)(va,{gates:l,laws:h})]})]})]})}var ba=`geneseed-understand-seen`,xa=`understand`;function Sa(){try{let e=JSON.parse(localStorage.getItem(ba));return Array.isArray(e)?e:[]}catch{return[]}}function Ca(e){let t=Sa();if(t.includes(e))return t;let n=[...t,e];return localStorage.setItem(ba,JSON.stringify(n)),n}function wa(e,t){let n=e?.groups||[],r=n.findIndex(e=>e.id===xa),i=n[r]?.pages||[],a=i.findIndex(e=>e.id===t);if(a<0)return{prev:null,next:null};let o=n.slice(r+1).find(e=>e.pages.length);return{prev:i[a-1]||null,next:i[a+1]||o?.pages[0]||null}}function Ta(e,t){for(let n of e?.groups||[]){let e=n.pages.find(e=>e.id===t);if(e)return{part:n,section:e.section||`General`,page:e}}return{part:null,section:null,page:null}}function Ea(e,t){let{part:n,section:r}=Ta(e,t);if(!n)return{prev:null,next:null};if(n.id===`understand`)return wa(e,t);let i=n.pages.filter(e=>(e.section||`General`)===r),a=i.findIndex(e=>e.id===t);return{prev:i[a-1]||null,next:i[a+1]||null}}var Da=e=>jn(`#/docs/${encodeURIComponent(e)}`);function Oa({pages:e,seen:t}){let n=e.filter(e=>t.includes(e.id)).length;return(0,Z.jsx)(`div`,{className:`track-prog`,role:`progressbar`,"aria-label":`Pages read`,"aria-valuemin":0,"aria-valuemax":e.length,"aria-valuenow":n,children:(0,Z.jsx)(`i`,{style:{width:`${n/(e.length||1)*100}%`}})})}function ka({menu:e,pageId:t}){let{prev:n,next:r}=Ea(e,t);return!n&&!r?null:(0,Z.jsxs)(`div`,{className:`track-bar`,children:[n?(0,Z.jsxs)(`button`,{className:`btn ghost sm`,onClick:()=>Da(n.id),children:[`← `,n.title]}):(0,Z.jsx)(`span`,{}),r&&(0,Z.jsxs)(`button`,{className:`btn sm`,onClick:()=>Da(r.id),children:[`Next: `,r.title,` →`]})]})}var Aa=`modulepreload`,ja=function(e){return`/`+e},Ma={},Na=function(e){return e.pathname.endsWith(`.css`)},Pa=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Fa=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=ja(t,n);let r=s(t),i=Na(r);return Pa(Ma,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Aa,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ia=`geneseed-newhere-dismissed`,La=(0,Y.lazy)(()=>Fa(()=>import(`./Dashboard-C5ATa3ow.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3])));function Ra({harness:e}){let[t,n]=(0,Y.useState)(()=>!!localStorage.getItem(Ia)),{data:r}=X(()=>t?Promise.resolve(null):c.docs(e).catch(()=>null),[t,e]),i=r?.groups?.find(e=>e.id===`understand`)?.pages||[],a=Sa(),o=i.findIndex(e=>!a.includes(e.id));if(t||!i.length||o<0)return null;let s=i.filter(e=>a.includes(e.id)).length;return(0,Z.jsxs)(`section`,{className:`newhere`,"aria-label":`New here?`,children:[(0,Z.jsxs)(`div`,{className:`newhere-body`,children:[(0,Z.jsx)(`b`,{children:`New here? Understand your harness.`}),(0,Z.jsxs)(`p`,{children:[i.length,` short pages: what a harness is, what was installed, what changes in your day, and what is guaranteed.`]}),(0,Z.jsx)(`div`,{className:`newhere-dots`,"aria-label":`${s} of ${i.length} read`,children:i.map(e=>(0,Z.jsx)(`i`,{className:a.includes(e.id)?`f`:``},e.id))})]}),(0,Z.jsx)(`a`,{className:`btn`,href:`#/docs/${encodeURIComponent(i[o].id)}`,children:s?`Continue · step ${o+1}`:`Start`}),(0,Z.jsx)(`button`,{type:`button`,className:`newhere-x`,onClick:()=>{localStorage.setItem(Ia,`1`),n(!0)},title:`Dismiss for good`,"aria-label":`Dismiss`,children:`×`})]})}function za({overview:e,overviewError:t,onRetry:n,themes:r,setup:i,runs:a,onAction:o,layout:s=`overview`,dataRev:c}){if(!e)return t?(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Ni,{error:`Could not load the harness overview: ${t}`}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:n,children:`Retry`})]}):(0,Z.jsx)(Di,{});if(!e.deployed)return(0,Z.jsx)(Pi,{onAction:o});let l=(0,Z.jsx)(Ra,{harness:oi(e.emit)});return s===`overview`?(0,Z.jsx)(ya,{overview:e,setup:i,onAction:o,onRetry:n,dataRev:c,banner:l}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`page-head`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`h`,children:`Overview`}),(0,Z.jsx)(`p`,{className:`sub`,children:[e.theme&&`${e.theme} voice`,e.footprint&&`${e.footprint} footprint`,e.target].filter(Boolean).join(` · `)})]}),(0,Z.jsxs)(`div`,{className:`page-actions`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>o(`doctor`),children:`Run doctor`}),(0,Z.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>o(`build-all`),children:`Rebuild`})]})]}),l,(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)(Di,{}),children:(0,Z.jsx)(La,{overview:e,overviewError:t,onRetry:n,themes:r,setup:i,runs:a,onAction:o,layout:s,dataRev:c})})]})}var Ba=(0,Y.lazy)(()=>Fa(()=>import(`./Activity-C8sZVIUU.js`),__vite__mapDeps([4,1,2,3,5,6]))),Va=(0,Y.lazy)(()=>Fa(()=>import(`./ActivityDetail-Cc6vWUS4.js`),__vite__mapDeps([7,1,2,3,5,6]))),Ha=(0,Y.lazy)(()=>Fa(()=>import(`./Library-BWwiy9Vb.js`),__vite__mapDeps([8,1,2,3,9,10]))),Ua=(0,Y.lazy)(()=>Fa(()=>import(`./Loops-DaPk-ckL.js`),__vite__mapDeps([11,1,2,3,6,9,10]))),Wa=(0,Y.lazy)(()=>Fa(()=>import(`./Laws-BA3CzUf5.js`),__vite__mapDeps([12,1,2,3,10]))),Ga=(0,Y.lazy)(()=>Fa(()=>import(`./Personal-Bwd27CmT.js`),__vite__mapDeps([13,1,2,3,9,10,14,8]))),Ka=(0,Y.lazy)(()=>Fa(()=>import(`./Installs-CB_rvbBP.js`),__vite__mapDeps([15,1,2,3,14]))),qa=(0,Y.lazy)(()=>Fa(()=>import(`./Docs-tDW7i7mo.js`),__vite__mapDeps([16,1,2,3,9,10])));function Ja(){let e=An(),[t,n]=(0,Y.useState)(``),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(!1),[s,l]=$n(),[u,d]=ir(),f=e=>{if(!document.startViewTransition||!_n())return d(e);document.startViewTransition(()=>(0,hn.flushSync)(()=>d(e)))},[p,m]=hr(),[h,g]=br(),[_,v]=(0,Y.useState)(()=>{try{return!window.sessionStorage.getItem(`gs-booted`)}catch{return!0}}),[y,b]=(0,Y.useState)(!1),x=(0,Y.useRef)(null),S=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{if(!y)return;let e=e=>{e.key===`Escape`&&b(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]),(0,Y.useEffect)(()=>{if(!y)return;let e=S.current,t=document.activeElement;return e&&(e.inert=!0),document.getElementById(`rail-nav`)?.focus(),()=>{e&&(e.inert=!1),t instanceof HTMLElement&&t.focus()}},[y]);let C=e=>i({kind:e?.body?.kind||`err`,msg:e?.body?.message||e.message}),{overview:w,error:T,themes:E,reload:D}=xr(C),[O,ee]=(0,Y.useState)(0),k=()=>{D(),ee(e=>e+1)},[te,ne]=(0,Y.useState)(null),{runs:A,activeId:j,consoleOpen:M,setConsoleOpen:N,runAction:P,cancelJob:F,clearRuns:re}=Or({onFinish:e=>{k(),ne({status:e,at:Date.now()})},onError:C}),{data:ie}=X(()=>c.setup().catch(()=>null),[O],`setup`),{data:ae}=X(()=>c.installs().catch(()=>null),[O],`installs`),oe=ae?.installs||null,I=A[A.length-1],se=I?I.status===`running`?`${I.action} running`:`${I.action} ${I.status}`:``;(0,Y.useEffect)(()=>{let e=x.current;if(!e||Xn(e,dr(p),s))return;let t=pr(p);if(t)return Ln(e,t,s);zn(e,u,s)||w?.accent&&Ln(e,w.accent,s)},[w,s,p,u]);let ce={flavour:u,onFlavour:f,accentMode:p,onAccentMode:m,layout:h,onLayout:g};return(0,Z.jsx)(`div`,{className:`app fl-${u} ${s===`light`?`light`:``}${y?` nav-open`:``}`,ref:x,children:(0,Z.jsxs)(Mi,{children:[(0,Z.jsx)(`div`,{className:`atmos`,"aria-hidden":`true`}),(0,Z.jsx)(`a`,{className:`skip-link`,href:`#main`,children:`Skip to content`}),(0,Z.jsx)(`p`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:se}),y&&(0,Z.jsx)(`button`,{type:`button`,className:`nav-scrim`,"aria-label":`Close navigation`,onClick:()=>b(!1)}),(0,Z.jsx)(Xr,{route:e,overview:w,installs:oe,onOpenVoice:()=>o(e=>!e),onNavigate:()=>b(!1)}),a&&(0,Z.jsx)(yi,{themes:E,current:w?.theme,onPick:e=>{o(!1),P(`build`,{theme:e,emit:w?.emit})},onClose:()=>o(!1)}),(0,Z.jsxs)(`div`,{className:`col`,ref:S,children:[(0,Z.jsx)(vi,{route:e,navOpen:y,onToggleNav:()=>b(e=>!e),overview:w,installs:oe,query:t,onQuery:n,mode:s,onToggleMode:l,appearance:ce,dataRev:O,onSwitch:k}),(0,Z.jsx)(`main`,{className:`page`,id:`main`,tabIndex:-1,children:(0,Z.jsx)(`div`,{className:[`library`,`loops`,`docs`].includes(e.page)?`pad pad-wide`:`pad`,children:(0,Z.jsx)(Y.Suspense,{fallback:(0,Z.jsx)(Di,{}),children:{overview:()=>(0,Z.jsx)(za,{overview:w,overviewError:T,onRetry:D,themes:E,setup:ie,runs:A,onAction:P,layout:h,dataRev:O}),laws:()=>(0,Z.jsx)(Wa,{selected:e.item,overview:w,setup:ie,onAction:P,dataRev:O}),library:()=>(0,Z.jsx)(Ha,{overview:w,section:e.section,selected:e.item,dataRev:O}),loops:()=>(0,Z.jsx)(Ua,{tab:e.tab,item:e.item,dataRev:O}),personal:()=>(0,Z.jsx)(Ga,{tab:e.tab,item:e.item,setup:ie,dataRev:O}),installs:()=>(0,Z.jsx)(Ka,{tab:e.tab,overview:w,setup:ie,themes:E,onAction:P,onMutated:k,dataRev:O,appearance:ce}),activity:()=>e.item?(0,Z.jsx)(Va,{sid:e.item},e.item):(0,Z.jsx)(Ba,{}),docs:()=>(0,Z.jsx)(qa,{page:e.item,onAction:P,overview:w})}[e.page]?.()})})}),(0,Z.jsx)(Zr,{route:e}),(0,Z.jsx)(Si,{runs:A,open:M,busy:!!j,finish:te,onToggle:()=>N(e=>!e),onClear:re,onCancel:F})]}),r&&(0,Z.jsx)(xi,{toast:r,onClose:()=>i(null)}),_&&(0,Z.jsx)(Ei,{ready:!!w||!!T,onDone:()=>{try{window.sessionStorage.setItem(`gs-booted`,`1`)}catch{}v(!1)}})]})})}(0,gn.createRoot)(document.getElementById(`root`)).render((0,Z.jsx)(Ja,{})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`).catch(()=>{})});export{mn as $,$r as A,X as B,Di as C,C as Ct,oi as D,m as Dt,ii as E,b as Et,Vr as F,wn as G,_r as H,Br as I,bn as J,Tn as K,zr as L,ei as M,Q as N,ai as O,Hr as P,Sn as Q,Ir as R,ji as S,I as St,hi as T,x as Tt,mr as U,Er as V,tr as W,vn as X,_n as Y,yn as Z,zi as _,pe as _t,Ca as a,jt as at,Pi as b,Fe as bt,Ji as c,ct,Gi as d,Re as dt,ln as et,Hi as f,Pe as ft,Vi as g,de as gt,Bi as h,fe as ht,Oa as i,Kt as it,ni as j,Qr as k,qi as l,at as lt,Ri as m,me as mt,ka as n,an as nt,Ta as o,kt as ot,Li as p,U as pt,jn as q,xa as r,on as rt,Sa as s,wt as st,Fa as t,cn as tt,Yi as u,W as ut,Ii as v,R as vt,gi as w,h as wt,Ni as x,we as xt,Fi as y,Ie as yt,Ur as z};
@@ -11,7 +11,7 @@
11
11
  <!-- The brand sprout as an inline SVG favicon (no extra asset to serve). -->
12
12
  <link rel="icon" type="image/svg+xml"
13
13
  href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.5v-9' stroke='%233AD4C4' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3Cpath d='M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z' fill='%233AD4C4'/%3E%3Cpath d='M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z' fill='%233AD4C4' opacity='.42'/%3E%3C/svg%3E" />
14
- <script type="module" crossorigin src="/assets/index-BZgEGRbL.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-DQXG_mqo.js"></script>
15
15
  <link rel="modulepreload" crossorigin href="/assets/sections-BET3c1WT.js">
16
16
  <link rel="modulepreload" crossorigin href="/assets/react-BOF6yL40.js">
17
17
  <link rel="modulepreload" crossorigin href="/assets/api-CiXlkbe0.js">